i40e: fix stats offsets
Subsystems (2)
PATCH 1/1 i40e: fix stats offsets
The code was setting up stats that were not being initialized. This caused several counters to be displayed incorrectly, due to indexing beyond the array of strings when printing stats.
--- drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 6 ++++++ 1 file changed, 6 insertions(+)
drivers/net/ethernet/intel/i40e/i40e_ethtool.c +6 -0
@@ -1407,6 +1407,12 @@ static void i40e_get_ethtool_stats(struct net_device *netdev, data[i++] = (i40e_gstrings_veb_stats[j].sizeof_stat ==sizeof (u64)) ? *(u64 *)p : *(u32 *)p; } +for (j =0 ; j <I40E_MAX_TRAFFIC_CLASS ; j++) { + data[i++] = veb->tc_stats.tc_tx_packets[j]; + data[i++] = veb->tc_stats.tc_tx_bytes[j]; + data[i++] = veb->tc_stats.tc_rx_packets[j]; + data[i++] = veb->tc_stats.tc_rx_bytes[j]; + } }for (j =0 ; j <I40E_GLOBAL_STATS_LEN ; j++) { p = (char *)pf + i40e_gstrings_stats[j].stat_offset;
Signature · 1 line
2.1.0
Bowers
PATCH 1/1 i40e: fix stats offsets
Quoted 7 lines
-----Original Message-----
From: Intel-wired-lan [mailto:intel-wired-lan-bounces at lists.osuosl.org] On Behalf Of Jesse Brandeburg
Sent: Friday, October 02, 2015 7:10 PM
To: intel-wired-lan at lists.osuosl.org
Subject: [Intel-wired-lan] [net PATCH] i40e: fix stats offsets
Quoted 8 lines
The code was setting up stats that were not being initialized. This caused several counters to be displayed incorrectly, due to indexing beyond the array of strings when printing stats.
Signed-off-by Jesse Brandeburg <[email protected]>--- drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 6 ++++++ 1 file changed, 6 insertions(+)
Code changes not applied, counters display correctly in ethtool