]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
net: dsa: netc: add support for the standardized counters
authorWei Fang <wei.fang@nxp.com>
Mon, 18 May 2026 08:25:05 +0000 (16:25 +0800)
committerPaolo Abeni <pabeni@redhat.com>
Thu, 21 May 2026 11:04:42 +0000 (13:04 +0200)
commit25049d8b6e6b87f7ffcf53ce5ea1b51528b8677f
tree74db2bcbc654858d4c2fb81ff7b721529444104e
parenta5ccb7f5e067eae23707a61e4fc5d6214b0e4777
net: dsa: netc: add support for the standardized counters

Each user port of the NETC switch supports 802.3 basic and mandatory
managed objects statistic counters and IETF Management Information
Database (MIB) package (RFC2665) and Remote Network Monitoring (RMON)
counters. And all of these counters are 64-bit registers. In addition,
some user ports support preemption, so these ports have two MACs, MAC
0 is the express MAC (eMAC), MAC 1 is the preemptible MAC (pMAC). So
for ports that support preemption, the statistics are the sum of the
pMAC and eMAC statistics.

Note that the current switch driver does not support preemption, all
frames are sent and received via the eMAC by default. The statistics
read from the pMAC should be zero.

Signed-off-by: Wei Fang <wei.fang@nxp.com>
Link: https://patch.msgid.link/20260518082506.1318236-15-wei.fang@nxp.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/dsa/netc/Makefile
drivers/net/dsa/netc/netc_ethtool.c [new file with mode: 0644]
drivers/net/dsa/netc/netc_main.c
drivers/net/dsa/netc/netc_switch.h
drivers/net/dsa/netc/netc_switch_hw.h
include/linux/fsl/netc_global.h