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>
This commit is contained in:
Родитель
386a0afa70
Коммит
58ce51753f
|
@ -1224,7 +1224,7 @@ static int i40e_get_sset_count(struct net_device *netdev, int sset)
|
||||||
case ETH_SS_TEST:
|
case ETH_SS_TEST:
|
||||||
return I40E_TEST_LEN;
|
return I40E_TEST_LEN;
|
||||||
case ETH_SS_STATS:
|
case ETH_SS_STATS:
|
||||||
if (vsi == pf->vsi[pf->lan_vsi]) {
|
if (vsi == pf->vsi[pf->lan_vsi] && pf->hw.partition_id == 1) {
|
||||||
int len = I40E_PF_STATS_LEN(netdev);
|
int len = I40E_PF_STATS_LEN(netdev);
|
||||||
|
|
||||||
if (pf->lan_veb != I40E_NO_VEB)
|
if (pf->lan_veb != I40E_NO_VEB)
|
||||||
|
@ -1297,7 +1297,7 @@ static void i40e_get_ethtool_stats(struct net_device *netdev,
|
||||||
i += 2;
|
i += 2;
|
||||||
}
|
}
|
||||||
rcu_read_unlock();
|
rcu_read_unlock();
|
||||||
if (vsi != pf->vsi[pf->lan_vsi])
|
if (vsi != pf->vsi[pf->lan_vsi] || pf->hw.partition_id != 1)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (pf->lan_veb != I40E_NO_VEB) {
|
if (pf->lan_veb != I40E_NO_VEB) {
|
||||||
|
@ -1370,7 +1370,7 @@ static void i40e_get_strings(struct net_device *netdev, u32 stringset,
|
||||||
snprintf(p, ETH_GSTRING_LEN, "rx-%u.rx_bytes", i);
|
snprintf(p, ETH_GSTRING_LEN, "rx-%u.rx_bytes", i);
|
||||||
p += ETH_GSTRING_LEN;
|
p += ETH_GSTRING_LEN;
|
||||||
}
|
}
|
||||||
if (vsi != pf->vsi[pf->lan_vsi])
|
if (vsi != pf->vsi[pf->lan_vsi] || pf->hw.partition_id != 1)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (pf->lan_veb != I40E_NO_VEB) {
|
if (pf->lan_veb != I40E_NO_VEB) {
|
||||||
|
|
Загрузка…
Ссылка в новой задаче