Skip to content

Commit 58ce517

Browse files
Shannon NelsonJeff Kirsher
authored andcommitted
i40e: print port stats only on partition 1
Only print the port and veb stats if this is the first partition of a multiplexed port. Change-ID: I7ce0c323cdee5cfd2e54d8bea5b0b9102987e671 Signed-off-by: Shannon Nelson <shannon.nelson@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
1 parent 386a0af commit 58ce517

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/net/ethernet/intel/i40e/i40e_ethtool.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1224,7 +1224,7 @@ static int i40e_get_sset_count(struct net_device *netdev, int sset)
12241224
case ETH_SS_TEST:
12251225
return I40E_TEST_LEN;
12261226
case ETH_SS_STATS:
1227-
if (vsi == pf->vsi[pf->lan_vsi]) {
1227+
if (vsi == pf->vsi[pf->lan_vsi] && pf->hw.partition_id == 1) {
12281228
int len = I40E_PF_STATS_LEN(netdev);
12291229

12301230
if (pf->lan_veb != I40E_NO_VEB)
@@ -1297,7 +1297,7 @@ static void i40e_get_ethtool_stats(struct net_device *netdev,
12971297
i += 2;
12981298
}
12991299
rcu_read_unlock();
1300-
if (vsi != pf->vsi[pf->lan_vsi])
1300+
if (vsi != pf->vsi[pf->lan_vsi] || pf->hw.partition_id != 1)
13011301
return;
13021302

13031303
if (pf->lan_veb != I40E_NO_VEB) {
@@ -1370,7 +1370,7 @@ static void i40e_get_strings(struct net_device *netdev, u32 stringset,
13701370
snprintf(p, ETH_GSTRING_LEN, "rx-%u.rx_bytes", i);
13711371
p += ETH_GSTRING_LEN;
13721372
}
1373-
if (vsi != pf->vsi[pf->lan_vsi])
1373+
if (vsi != pf->vsi[pf->lan_vsi] || pf->hw.partition_id != 1)
13741374
return;
13751375

13761376
if (pf->lan_veb != I40E_NO_VEB) {

0 commit comments

Comments
 (0)