* [PATCH net v2] net: libwx: fix multicast packets received count
@ 2025-07-14 1:56 Jiawen Wu
2025-07-14 11:06 ` Simon Horman
2025-07-16 0:40 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: Jiawen Wu @ 2025-07-14 1:56 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>
---
v1 -> v2:
- add code comment
---
drivers/net/ethernet/wangxun/libwx/wx_hw.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/ethernet/wangxun/libwx/wx_hw.c b/drivers/net/ethernet/wangxun/libwx/wx_hw.c
index 0f4be72116b8..7ae3786d90b8 100644
--- a/drivers/net/ethernet/wangxun/libwx/wx_hw.c
+++ b/drivers/net/ethernet/wangxun/libwx/wx_hw.c
@@ -2778,6 +2778,8 @@ void wx_update_stats(struct wx *wx)
hwstats->fdirmiss += rd32(wx, WX_RDB_FDIR_MISS);
}
+ /* qmprc is not cleared on read, manual reset it */
+ 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] 3+ messages in thread
* Re: [PATCH net v2] net: libwx: fix multicast packets received count
2025-07-14 1:56 [PATCH net v2] net: libwx: fix multicast packets received count Jiawen Wu
@ 2025-07-14 11:06 ` Simon Horman
2025-07-16 0:40 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Simon Horman @ 2025-07-14 11:06 UTC (permalink / raw)
To: Jiawen Wu
Cc: netdev, andrew+netdev, davem, edumazet, kuba, pabeni, mengyuanlou,
stable
On Mon, Jul 14, 2025 at 09:56:56AM +0800, Jiawen Wu wrote:
> 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>
> ---
> v1 -> v2:
> - add code comment
Thanks for the update.
Reviewed-by: Simon Horman <horms@kernel.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net v2] net: libwx: fix multicast packets received count
2025-07-14 1:56 [PATCH net v2] net: libwx: fix multicast packets received count Jiawen Wu
2025-07-14 11:06 ` Simon Horman
@ 2025-07-16 0:40 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2025-07-16 0:40 UTC (permalink / raw)
To: Jiawen Wu
Cc: netdev, andrew+netdev, davem, edumazet, kuba, pabeni, horms,
mengyuanlou, stable
Hello:
This patch was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Mon, 14 Jul 2025 09:56:56 +0800 you wrote:
> 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>
>
> [...]
Here is the summary with links:
- [net,v2] net: libwx: fix multicast packets received count
https://git.kernel.org/netdev/net/c/2b30a3d1ec25
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-07-16 0:39 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-14 1:56 [PATCH net v2] net: libwx: fix multicast packets received count Jiawen Wu
2025-07-14 11:06 ` Simon Horman
2025-07-16 0:40 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).