]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
net: enetc: show RX drop counters only for assigned RX rings
authorWei Fang <wei.fang@nxp.com>
Wed, 8 Apr 2026 05:58:46 +0000 (13:58 +0800)
committerJakub Kicinski <kuba@kernel.org>
Sun, 12 Apr 2026 20:03:48 +0000 (13:03 -0700)
commitc571d309d4cf9ac4c3129cdf312696e1c6b18cce
tree39a136023ba06a6b70dc9b20faaa70a664c00717
parentc6c223fd06edbc34c7b04170e375abfb2a13cbf8
net: enetc: show RX drop counters only for assigned RX rings

For ENETC v1, each SI provides 16 RBDCR registers for RX ring drop
counters, but this does not imply that an SI actually owns 16 RX rings.
The ENETC hardware supports a total of 16 RX rings, which are assigned
to 3 SIs (1 PSI and 2 VSIs), so each SI is assigned fewer than 16 RX
rings.

The current implementation always reports 16 RX drop counters per SI,
leading to redundant output for SIs with fewer RX rings. Update the
logic to display drop counters only for the RX rings that are actually
assigned to the SI.

Signed-off-by: Wei Fang <wei.fang@nxp.com>
Link: https://patch.msgid.link/20260408055849.1314033-3-wei.fang@nxp.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/freescale/enetc/enetc_ethtool.c