i40e: implement VF stats NDO
Subsystems (2)
PATCH v2 1/1 i40e: implement VF stats NDO
Implement the VF stats gathering via the kernel via ndo_get_vf_stats(). The driver will show per-VF stats in the output of the command:
ip -s link show dev <PF>
Testing Hints:
ip -s link show dev eth0
will return non-zero VF stats.
...
vf 0 MAC 00:55:aa:00:55:aa, spoof checking on, link-state enable, trust off
RX: bytes packets mcast bcast 128000 1000 104 104 TX: bytes packets 128000 1000
---
v2: remove transmit stats from multicast and broadcast based on feedback, add a little to commit message.
--- drivers/net/ethernet/intel/i40e/i40e_main.c | 1 + .../ethernet/intel/i40e/i40e_virtchnl_pf.c | 48 +++++++++++++++++++ .../ethernet/intel/i40e/i40e_virtchnl_pf.h | 2 + 3 files changed, 51 insertions(+)
drivers/net/ethernet/intel/i40e/i40e_main.c +1 -0
@@ -12870,6 +12870,7 @@ static const struct net_device_ops i40e_netdev_ops = { .ndo_set_features = i40e_set_features, .ndo_set_vf_mac = i40e_ndo_set_vf_mac, .ndo_set_vf_vlan = i40e_ndo_set_vf_port_vlan, + .ndo_get_vf_stats = i40e_get_vf_stats, .ndo_set_vf_rate = i40e_ndo_set_vf_bw, .ndo_get_vf_config = i40e_ndo_get_vf_config, .ndo_set_vf_link_state = i40e_ndo_set_vf_link_state,
drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c +48 -0
51 lines not on this page · raw message
drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.h +2 -0
@@ -138,5 +138,7 @@ int i40e_ndo_set_vf_spoofchk(struct net_device *netdev, int vf_id, bool enable);void i40e_vc_notify_link_state (struct i40e_pf *pf);void i40e_vc_notify_reset (struct i40e_pf *pf); +int i40e_get_vf_stats (struct net_device *netdev,int vf_id, +struct ifla_vf_stats *vf_stats);#endif /* _I40E_VIRTCHNL_PF_H_ */
Signature · 1 line
2.17.2
Bowers
PATCH v2 1/1 i40e: implement VF stats NDO
Quoted 25 lines
-----Original Message-----
From: Intel-wired-lan [mailto:intel-wired-lan-bounces at osuosl.org] On Behalf Of Jesse Brandeburg
Sent: Monday, October 28, 2019 5:37 PM
To: intel-wired-lan at lists.osuosl.org
Subject: [Intel-wired-lan] [PATCH net-next v2] i40e: implement VF stats NDOImplement the VF stats gathering via the kernel via
ndo_get_vf_stats(). The driver will show per-VF stats in the output of the command:
ip -s link show dev <PF>Testing Hints:
ip -s link show dev eth0
will return non-zero VF stats.
...
vf 0 MAC 00:55:aa:00:55:aa, spoof checking on, link-state enable, trust offRX: bytes packets mcast bcast 128000 1000 104 104 TX: bytes packets 128000 1000Signed-off-by Jesse Brandeburg <[email protected]>---
Quoted 7 lines
v2: remove transmit stats from multicast and broadcast based on feedback, add a little to commit message.
--- drivers/net/ethernet/intel/i40e/i40e_main.c | 1 + .../ethernet/intel/i40e/i40e_virtchnl_pf.c | 48 +++++++++++++++++++ .../ethernet/intel/i40e/i40e_virtchnl_pf.h | 2 + 3 files changed, 51 insertions(+)