Skip to content

Commit 06ac077

Browse files
Jiawen Wukuba-moo
authored andcommitted
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: c52d4b8 ("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>
1 parent e9cb929 commit 06ac077

File tree

1 file changed

+2
-1
lines changed
  • drivers/net/ethernet/wangxun/libwx

1 file changed

+2
-1
lines changed

drivers/net/ethernet/wangxun/libwx/wx_hw.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2778,7 +2778,8 @@ void wx_update_stats(struct wx *wx)
27782778
hwstats->fdirmiss += rd32(wx, WX_RDB_FDIR_MISS);
27792779
}
27802780

2781-
for (i = 0; i < wx->mac.max_rx_queues; i++)
2781+
for (i = wx->num_vfs * wx->num_rx_queues_per_pool;
2782+
i < wx->mac.max_rx_queues; i++)
27822783
hwstats->qmprc += rd32(wx, WX_PX_MPRC(i));
27832784
}
27842785
EXPORT_SYMBOL(wx_update_stats);

0 commit comments

Comments
 (0)