public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH net] net: libwx: fix multicast packets received count
@ 2025-07-09  6:35 Jiawen Wu
  2025-07-09 11:29 ` Simon Horman
  0 siblings, 1 reply; 4+ messages in thread
From: Jiawen Wu @ 2025-07-09  6:35 UTC (permalink / raw)
  To: netdev, andrew+netdev, davem, edumazet, kuba, pabeni, horms
  Cc: mengyuanlou, Jiawen Wu, stable

Multicast good packets received by PF rings that pass ethternet MAC
address filtering are counted for rtnl_link_stats64.multicast. The
counter is not cleared on read. Fix the duplicate counting on updating
statistics.

Fixes: 46b92e10d631 ("net: libwx: support hardware statistics")
Cc: stable@vger.kernel.org
Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
 drivers/net/ethernet/wangxun/libwx/wx_hw.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/ethernet/wangxun/libwx/wx_hw.c b/drivers/net/ethernet/wangxun/libwx/wx_hw.c
index 0f4be72116b8..a9519997286b 100644
--- a/drivers/net/ethernet/wangxun/libwx/wx_hw.c
+++ b/drivers/net/ethernet/wangxun/libwx/wx_hw.c
@@ -2778,6 +2778,7 @@ void wx_update_stats(struct wx *wx)
 		hwstats->fdirmiss += rd32(wx, WX_RDB_FDIR_MISS);
 	}
 
+	hwstats->qmprc = 0;
 	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));
-- 
2.48.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-07-10 10:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-09  6:35 [PATCH net] net: libwx: fix multicast packets received count Jiawen Wu
2025-07-09 11:29 ` Simon Horman
2025-07-10  1:54   ` Jiawen Wu
2025-07-10 10:54     ` Simon Horman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox