Commit 06ac0776 authored by Jiawen Wu's avatar Jiawen Wu Committed by Jakub Kicinski
Browse files

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: c52d4b89 ("net: libwx: Redesign flow when sriov is enabled")
Signed-off-by: default avatarJiawen Wu <jiawenwu@trustnetic.com>
Reviewed-by: default avatarSimon Horman <horms@kernel.org>
Link: https://patch.msgid.link/F70910CFE86C1F6F+20250523080438.27968-1-jiawenwu@trustnetic.com


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent e9cb9296
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -2778,7 +2778,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);