X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fnet%2Fi40e%2Frte_pmd_i40e.h;h=a0ad88c6b2af6d61acca6b31555a8a223ddfab4c;hb=1661615d9a356fa318d0a24476de3536251ed90d;hp=6dff242d92c41d2549c22ff566a444b49de00b0d;hpb=83bb95e3fefcd86110e7d8bd4035ed5de32908b7;p=dpdk.git diff --git a/drivers/net/i40e/rte_pmd_i40e.h b/drivers/net/i40e/rte_pmd_i40e.h index 6dff242d92..a0ad88c6b2 100644 --- a/drivers/net/i40e/rte_pmd_i40e.h +++ b/drivers/net/i40e/rte_pmd_i40e.h @@ -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_ */