net/qede/base: revise tunnel APIs/structs
[dpdk.git] / drivers / net / i40e / rte_pmd_i40e.h
index f4bd0fd..3ca49a4 100644 (file)
@@ -84,7 +84,7 @@ int rte_pmd_i40e_ping_vfs(uint8_t port, uint16_t vf);
  *
  * @param port
  *    The port identifier of the Ethernet device.
- * @param vf
+ * @param vf_id
  *    VF on which to set MAC anti spoofing.
  * @param on
  *    1 - Enable VFs MAC anti spoofing.
@@ -103,7 +103,7 @@ int rte_pmd_i40e_set_vf_mac_anti_spoof(uint8_t port,
  *
  * @param port
  *    The port identifier of the Ethernet device.
- * @param vf
+ * @param vf_id
  *    VF on which to set VLAN anti spoofing.
  * @param on
  *    1 - Enable VFs VLAN anti spoofing.
@@ -138,7 +138,7 @@ int rte_pmd_i40e_set_tx_loopback(uint8_t port,
  *
  * @param port
  *    The port identifier of the Ethernet device.
- * @param vf
+ * @param vf_id
  *    VF on which to set.
  * @param on
  *    1 - Enable.
@@ -157,7 +157,7 @@ int rte_pmd_i40e_set_vf_unicast_promisc(uint8_t port,
  *
  * @param port
  *    The port identifier of the Ethernet device.
- * @param vf
+ * @param vf_id
  *    VF on which to set.
  * @param on
  *    1 - Enable.
@@ -218,7 +218,7 @@ rte_pmd_i40e_set_vf_vlan_stripq(uint8_t port, uint16_t vf, uint8_t on);
  *
  * @param port
  *    The port identifier of the Ethernet device.
- * @param vf
+ * @param vf_id
  *    ID specifying VF.
  * @param vlan_id
  *    0 - Disable VF's vlan insert.
@@ -237,7 +237,7 @@ int rte_pmd_i40e_set_vf_vlan_insert(uint8_t port, uint16_t vf_id,
  *
  * @param port
  *    The port identifier of the Ethernet device.
- * @param vf
+ * @param vf_id
  *    ID specifying VF.
  * @param on
  *    0 - Disable broadcast.
@@ -256,9 +256,9 @@ int rte_pmd_i40e_set_vf_broadcast(uint8_t port, uint16_t vf_id,
  *
  * @param port
  *    The port identifier of the Ethernet device.
- * @param vf
+ * @param vf_id
  *    ID specifying VF.
- * @param vlan_id
+ * @param on
  *    0 - Disable VF's vlan tag.
  *    n - Enable VF's vlan tag.
  *
@@ -332,4 +332,90 @@ int rte_pmd_i40e_get_vf_stats(uint8_t port,
 int rte_pmd_i40e_reset_vf_stats(uint8_t port,
                                uint16_t vf_id);
 
+/**
+ * Set VF's max bandwidth.
+ *
+ * Per VF bandwidth limitation and per TC bandwidth limitation cannot
+ * be enabled in parallel. If per TC bandwidth is enabled, this function
+ * will disable it.
+ *
+ * @param port
+ *    The port identifier of the Ethernet device.
+ * @param vf_id
+ *    ID specifying VF.
+ * @param bw
+ *    Bandwidth for this VF.
+ * @return
+ *   - (0) if successful.
+ *   - (-ENODEV) if *port* invalid.
+ *   - (-EINVAL) if bad parameter.
+ *   - (-ENOTSUP) not supported by firmware.
+ */
+int rte_pmd_i40e_set_vf_max_bw(uint8_t port,
+                              uint16_t vf_id,
+                              uint32_t bw);
+
+/**
+ * Set all the TCs' bandwidth weight on a specific VF.
+ *
+ * The bw_weight means the percentage occupied by the TC.
+ * It can be taken as the relative min bandwidth setting.
+ *
+ * @param port
+ *    The port identifier of the Ethernet device.
+ * @param vf_id
+ *    ID specifying VF.
+ * @param tc_num
+ *    Number of TCs.
+ * @param bw_weight
+ *    An array of relative bandwidth weight for all the TCs.
+ *    The summary of the bw_weight should be 100.
+ * @return
+ *   - (0) if successful.
+ *   - (-ENODEV) if *port* invalid.
+ *   - (-EINVAL) if bad parameter.
+ *   - (-ENOTSUP) not supported by firmware.
+ */
+int rte_pmd_i40e_set_vf_tc_bw_alloc(uint8_t port,
+                                   uint16_t vf_id,
+                                   uint8_t tc_num,
+                                   uint8_t *bw_weight);
+
+/**
+ * Set a specific TC's max bandwidth on a specific VF.
+ *
+ * @param port
+ *    The port identifier of the Ethernet device.
+ * @param vf_id
+ *    ID specifying VF.
+ * @param tc_no
+ *    Number specifying TC.
+ * @param bw
+ *    Max bandwidth for this TC.
+ * @return
+ *   - (0) if successful.
+ *   - (-ENODEV) if *port* invalid.
+ *   - (-EINVAL) if bad parameter.
+ *   - (-ENOTSUP) not supported by firmware.
+ */
+int rte_pmd_i40e_set_vf_tc_max_bw(uint8_t port,
+                                 uint16_t vf_id,
+                                 uint8_t tc_no,
+                                 uint32_t bw);
+
+/**
+ * Set some TCs to strict priority mode on a physical port.
+ *
+ * @param port
+ *    The port identifier of the Ethernet device.
+ * @param tc_map
+ *    A bit map for the TCs.
+ * @return
+ *   - (0) if successful.
+ *   - (-ENODEV) if *port* invalid.
+ *   - (-EINVAL) if bad parameter.
+ *   - (-ENOTSUP) not supported by firmware.
+ */
+int rte_pmd_i40e_set_tc_strict_prio(uint8_t port, uint8_t tc_map);
+
 #endif /* _PMD_I40E_H_ */