This patch set adds support for standard ethtool statistics - rmon, eth-ctrl, eth-mac and pause - to dpaa2-mac and its users dpaa2-eth and dpaa2-switch.
The first patch extends the firmware APIs related to MAC counters and adds dpmac_get_statistics() which can be used to retrieve multiple counter values through a single firmware call. This new API is put in use in the second patch by gathering all previously exported ethtool statistics through a single MC firmware call. In this patch we are also adding the setup and cleanup infrastructure which will be also used for the standard ethtool counters. The third patch adds the actual suppord for rmon, eth-ctrl, eth-mac and pause statistics in dpaa2-mac and its users. The support was validated against the ethtool_rmon.sh and ethtool_std_stats.sh scripts from the following patch set: https://lore.kernel.org/all/[email protected]/T/#t Changes in v2: - 2/3: fix fallback usecase by using dpaa2_mac_ethtool_stats[i].id - 2/3: use the __le32/__le64 types for cnt_idx, cnt_values etc Ioana Ciornei (3): net: dpaa2-mac: extend APIs related to statistics net: dpaa2-mac: retrieve MAC statistics in one firmware command net: dpaa2-mac: export standard statistics .../ethernet/freescale/dpaa2/dpaa2-ethtool.c | 59 ++- .../net/ethernet/freescale/dpaa2/dpaa2-mac.c | 383 ++++++++++++++++-- .../net/ethernet/freescale/dpaa2/dpaa2-mac.h | 23 +- .../freescale/dpaa2/dpaa2-switch-ethtool.c | 45 +- .../net/ethernet/freescale/dpaa2/dpmac-cmd.h | 11 +- drivers/net/ethernet/freescale/dpaa2/dpmac.c | 30 +- drivers/net/ethernet/freescale/dpaa2/dpmac.h | 86 +++- 7 files changed, 594 insertions(+), 43 deletions(-) -- 2.25.1

