net: dsa: allow reporting of standard ethtool stats for slave devices
authorAlvin Šipraga <alsi@bang-olufsen.dk>
Mon, 18 Oct 2021 09:37:57 +0000 (11:37 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 18 Oct 2021 13:02:55 +0000 (14:02 +0100)
commit487d3855b641b22a5875166de914c7253b63368b
tree4b48b002390b6587ab21aa4401c40b74aea6163b
parent7bbbbfaa7a1b0b03890f25fba5f28bb8c7ef145a
net: dsa: allow reporting of standard ethtool stats for slave devices

Jakub pointed out that we have a new ethtool API for reporting device
statistics in a standardized way, via .get_eth_{phy,mac,ctrl}_stats.
Add a small amount of plumbing to allow DSA drivers to take advantage of
this when exposing statistics.

Suggested-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Alvin Šipraga <alsi@bang-olufsen.dk>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/dsa.h
net/dsa/slave.c