net: dpaa2-mac: export standard statistics
authorIoana Ciornei <ioana.ciornei@nxp.com>
Mon, 23 Mar 2026 11:50:39 +0000 (13:50 +0200)
committerPaolo Abeni <pabeni@redhat.com>
Thu, 26 Mar 2026 11:47:28 +0000 (12:47 +0100)
commitdd1d4ccb860289ad3dee33178cc2705c5ed1143b
treec77432f06019364fd460aaab5af638671d0937a6
parentd369154d9d7fa7530a2520b945905fbecd35b05b
net: dpaa2-mac: export standard statistics

Take advantage of all the newly added MAC counters available through the
MC API and export them through the standard statistics structures -
rmon, eth-ctrl, eth-mac and pause.

A new version based feature is added into dpaa2-mac -
DPAA2_MAC_FEATURE_STANDARD_STATS - and based on the two memory zones
needed for gathering the MAC counters are setup for each statistics
group.

The dpmac_counter structure is extended with a new field - size_t offset
- which is being used to instruct the dpaa2_mac_transfer_stats()
function where exactly to store a counter value inside the standard
statistics structure.

The newly added support is used both in the dpaa2-eth driver as well as
the dpaa2-switch one.

Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Link: https://patch.msgid.link/20260323115039.3932600-4-ioana.ciornei@nxp.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/ethernet/freescale/dpaa2/dpaa2-ethtool.c
drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.c
drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.h
drivers/net/ethernet/freescale/dpaa2/dpaa2-switch-ethtool.c