net/i40e/base: add VF offload flags
[dpdk.git] / drivers / net / i40e / rte_pmd_i40e.h
index 6dff242..a0ad88c 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.
@@ -232,4 +232,104 @@ rte_pmd_i40e_set_vf_vlan_stripq(uint8_t port, uint16_t vf, uint8_t on);
 int rte_pmd_i40e_set_vf_vlan_insert(uint8_t port, uint16_t vf_id,
                                    uint16_t vlan_id);
 
+/**
+ * Enable/Disable vf broadcast mode
+ *
+ * @param port
+ *    The port identifier of the Ethernet device.
+ * @param vf_id
+ *    ID specifying VF.
+ * @param on
+ *    0 - Disable broadcast.
+ *    1 - Enable broadcast.
+ *
+ * @return
+ *   - (0) if successful.
+ *   - (-ENODEV) if *port* invalid.
+ *   - (-EINVAL) if bad parameter.
+ */
+int rte_pmd_i40e_set_vf_broadcast(uint8_t port, uint16_t vf_id,
+                                 uint8_t on);
+
+/**
+ * Enable/Disable vf vlan tag
+ *
+ * @param port
+ *    The port identifier of the Ethernet device.
+ * @param vf_id
+ *    ID specifying VF.
+ * @param on
+ *    0 - Disable VF's vlan tag.
+ *    n - Enable VF's vlan tag.
+ *
+ * @return
+ *   - (0) if successful.
+ *   - (-ENODEV) if *port* invalid.
+ *   - (-EINVAL) if bad parameter.
+ */
+int rte_pmd_i40e_set_vf_vlan_tag(uint8_t port, uint16_t vf_id, uint8_t on);
+
+/**
+ * Enable/Disable VF VLAN filter
+ *
+ * @param port
+ *    The port identifier of the Ethernet device.
+ * @param vlan_id
+ *    ID specifying VLAN
+ * @param vf_mask
+ *    Mask to filter VF's
+ * @param on
+ *    0 - Disable VF's VLAN filter.
+ *    1 - Enable VF's VLAN filter.
+ *
+ * @return
+ *   - (0) if successful.
+ *   - (-ENODEV) if *port* invalid.
+ *   - (-EINVAL) if bad parameter.
+ *   - (-ENOTSUP) not supported by firmware.
+ */
+int rte_pmd_i40e_set_vf_vlan_filter(uint8_t port, uint16_t vlan_id,
+                                   uint64_t vf_mask, uint8_t on);
+
+/**
+ * Get VF's statistics
+ *
+ * @param port
+ *    The port identifier of the Ethernet device.
+ * @param vf_id
+ *    VF on which to get.
+ * @param stats
+ *    A pointer to a structure of type *rte_eth_stats* to be filled with
+ *    the values of device counters for the following set of statistics:
+ *   - *ipackets* with the total of successfully received packets.
+ *   - *opackets* with the total of successfully transmitted packets.
+ *   - *ibytes*   with the total of successfully received bytes.
+ *   - *obytes*   with the total of successfully transmitted bytes.
+ *   - *ierrors*  with the total of erroneous received packets.
+ *   - *oerrors*  with the total of failed transmitted packets.
+ * @return
+ *   - (0) if successful.
+ *   - (-ENODEV) if *port* invalid.
+ *   - (-EINVAL) if bad parameter.
+ */
+
+int rte_pmd_i40e_get_vf_stats(uint8_t port,
+                             uint16_t vf_id,
+                             struct rte_eth_stats *stats);
+
+/**
+ * Clear VF's statistics
+ *
+ * @param port
+ *    The port identifier of the Ethernet device.
+ * @param vf_id
+ *    VF on which to get.
+ * @return
+ *   - (0) if successful.
+ *   - (-ENODEV) if *port* invalid.
+ *   - (-EINVAL) if bad parameter.
+ */
+int rte_pmd_i40e_reset_vf_stats(uint8_t port,
+                               uint16_t vf_id);
+
 #endif /* _PMD_I40E_H_ */