[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <0250972BC2F238FA+20250520063900.37370-1-jiawenwu@trustnetic.com>
Date: Tue, 20 May 2025 14:38:59 +0800
From: Jiawen Wu <jiawenwu@...stnetic.com>
To: netdev@...r.kernel.org,
pabeni@...hat.com,
kuba@...nel.org,
edumazet@...gle.com,
davem@...emloft.net,
andrew+netdev@...n.ch,
mengyuanlou@...-swift.com
Cc: Jiawen Wu <jiawenwu@...stnetic.com>
Subject: [PATCH net-next 1/2] 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@...stnetic.com>
---
drivers/net/ethernet/wangxun/libwx/wx_hw.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/wangxun/libwx/wx_hw.c b/drivers/net/ethernet/wangxun/libwx/wx_hw.c
index 143cc1088eea..17ff3c21539a 100644
--- a/drivers/net/ethernet/wangxun/libwx/wx_hw.c
+++ b/drivers/net/ethernet/wangxun/libwx/wx_hw.c
@@ -2792,7 +2792,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);
--
2.48.1
Powered by blists - more mailing lists