aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/dsa.h
diff options
context:
space:
mode:
authorAlvin Šipraga <alsi@bang-olufsen.dk>2021-10-18 11:37:57 +0200
committerDavid S. Miller <davem@davemloft.net>2021-10-18 14:02:55 +0100
commit487d3855b641b22a5875166de914c7253b63368b (patch)
tree4b48b002390b6587ab21aa4401c40b74aea6163b /include/net/dsa.h
parentether: add EtherType for proprietary Realtek protocols (diff)
downloadlinux-dev-487d3855b641b22a5875166de914c7253b63368b.tar.xz
linux-dev-487d3855b641b22a5875166de914c7253b63368b.zip
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>
Diffstat (limited to 'include/net/dsa.h')
-rw-r--r--include/net/dsa.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/net/dsa.h b/include/net/dsa.h
index d784e76113b8..8fefd58ced8f 100644
--- a/include/net/dsa.h
+++ b/include/net/dsa.h
@@ -645,6 +645,12 @@ struct dsa_switch_ops {
int (*get_sset_count)(struct dsa_switch *ds, int port, int sset);
void (*get_ethtool_phy_stats)(struct dsa_switch *ds,
int port, uint64_t *data);
+ void (*get_eth_phy_stats)(struct dsa_switch *ds, int port,
+ struct ethtool_eth_phy_stats *phy_stats);
+ void (*get_eth_mac_stats)(struct dsa_switch *ds, int port,
+ struct ethtool_eth_mac_stats *mac_stats);
+ void (*get_eth_ctrl_stats)(struct dsa_switch *ds, int port,
+ struct ethtool_eth_ctrl_stats *ctrl_stats);
void (*get_stats64)(struct dsa_switch *ds, int port,
struct rtnl_link_stats64 *s);
void (*self_test)(struct dsa_switch *ds, int port,