diff options
| author | Jakub Kicinski <kuba@kernel.org> | 2021-01-12 20:17:11 -0800 |
|---|---|---|
| committer | Jakub Kicinski <kuba@kernel.org> | 2021-01-12 20:17:12 -0800 |
| commit | 8243fe8a9abbde5b25d9bc700e4007b60728bb6f (patch) | |
| tree | 10164311574441be3fd5e618ce9696b470521309 /include | |
| parent | 46e05e1df628ab054486eafcc06a3c6512b338a1 (diff) | |
| parent | bf9ce385932b61584684d31e2e5f8f485791e409 (diff) | |
Merge branch 'net-dsa-add-stats64-support'
Oleksij Rempel says:
====================
net: dsa: add stats64 support
changes v8:
- stats.no_handler should not be assigned from HW stats
changes v7:
- move raw.filtered from rx_errors to rx_dropped counter
changes v6:
- move stats64 callback to ethtool section
- ar9331: diff. fixes
- ar9331: move stats calculation to the worker
- ar9331: extend rx/tx error counters
- use spin lock instead of u64_stats*
changes v5:
- read all stats in one regmap_bulk_read() request
- protect stats with u64_stats* helpers.
changes v4:
- do no read MIBs withing stats64 call
- change polling frequency to 0.3Hz
changes v3:
- fix wrong multiplication
- cancel port workers on remove
changes v2:
- use stats64 instead of get_ethtool_stats
- add worked to poll for the stats
====================
Link: https://lore.kernel.org/r/20210111104658.21930-1-o.rempel@pengutronix.de
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include')
| -rw-r--r-- | include/net/dsa.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/net/dsa.h b/include/net/dsa.h index c9a3dd7588df..c3485ba6c312 100644 --- a/include/net/dsa.h +++ b/include/net/dsa.h @@ -482,7 +482,7 @@ struct dsa_switch_ops { void (*phylink_fixed_state)(struct dsa_switch *ds, int port, struct phylink_link_state *state); /* - * ethtool hardware statistics. + * Port statistics counters. */ void (*get_strings)(struct dsa_switch *ds, int port, u32 stringset, uint8_t *data); @@ -491,6 +491,8 @@ 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_stats64)(struct dsa_switch *ds, int port, + struct rtnl_link_stats64 *s); /* * ethtool Wake-on-LAN |
