Skip to content

Commit affb46d

Browse files
Jiawen Wugregkh
authored andcommitted
net: libwx: fix multicast packets received count
commit 2b30a3d upstream. 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: 46b92e1 ("net: libwx: support hardware statistics") Cc: [email protected] Signed-off-by: Jiawen Wu <[email protected]> Reviewed-by: Simon Horman <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 75747e2 commit affb46d

File tree

1 file changed

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

1 file changed

+2
-0
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2355,6 +2355,8 @@ void wx_update_stats(struct wx *wx)
23552355
hwstats->fdirmiss += rd32(wx, WX_RDB_FDIR_MISS);
23562356
}
23572357

2358+
/* qmprc is not cleared on read, manual reset it */
2359+
hwstats->qmprc = 0;
23582360
for (i = 0; i < wx->mac.max_rx_queues; i++)
23592361
hwstats->qmprc += rd32(wx, WX_PX_MPRC(i));
23602362
}

0 commit comments

Comments
 (0)