diff options
author | Jiawen Wu <jiawenwu@trustnetic.com> | 2025-05-23 11:04:37 +0300 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2025-05-28 04:17:11 +0300 |
commit | 06ac0776d549d93adf23c823b810118980265ad9 (patch) | |
tree | 09051e82c8ed4768dc382b9462d80995453162d5 | |
parent | e9cb929670a1e98b592b30f03f06e9e20110f318 (diff) | |
download | linux-06ac0776d549d93adf23c823b810118980265ad9.tar.xz |
net: libwx: Fix statistics of multicast packets
When SR-IOV is enabled, the number of multicast packets is mistakenly
counted starting from queue 0. It would be a wrong count that includes
the packets received on VF. Fix it to count from the correct offset.
Fixes: c52d4b898901 ("net: libwx: Redesign flow when sriov is enabled")
Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/F70910CFE86C1F6F+20250523080438.27968-1-jiawenwu@trustnetic.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
-rw-r--r-- | drivers/net/ethernet/wangxun/libwx/wx_hw.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/ethernet/wangxun/libwx/wx_hw.c b/drivers/net/ethernet/wangxun/libwx/wx_hw.c index c6744a363e97..0f4be72116b8 100644 --- a/drivers/net/ethernet/wangxun/libwx/wx_hw.c +++ b/drivers/net/ethernet/wangxun/libwx/wx_hw.c @@ -2778,7 +2778,8 @@ void wx_update_stats(struct wx *wx) hwstats->fdirmiss += rd32(wx, WX_RDB_FDIR_MISS); } - for (i = 0; i < wx->mac.max_rx_queues; i++) + for (i = wx->num_vfs * wx->num_rx_queues_per_pool; + i < wx->mac.max_rx_queues; i++) hwstats->qmprc += rd32(wx, WX_PX_MPRC(i)); } EXPORT_SYMBOL(wx_update_stats); |