linux-stable/net/ethtool
Vladimir Oltean 449c545964 net: ethtool: add helpers for aggregate statistics
When a pMAC exists but the driver is unable to atomically query the
aggregate eMAC+pMAC statistics, the user should be given back at least
the sum of eMAC and pMAC counters queried separately.

This is a generic problem, so add helpers in ethtool to do this
operation, if the driver doesn't have a better way to report aggregate
stats. Do this in a way that does not require changes to these functions
when new stats are added (basically treat the structures as an array of
u64 values, except for the first element which is the stats source).

In include/linux/ethtool.h, there is already a section where helper
function prototypes should be placed. The trouble is, this section is
too early, before the definitions of struct ethtool_eth_mac_stats et.al.
Move that section at the end and append these new helpers to it.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2023-01-23 12:44:18 +00:00
..
bitset.c ethtool: fix stack overflow in ethnl_parse_bitset() 2020-12-09 15:50:38 -08:00
bitset.h ethtool: add ethnl_parse_bitset() helper 2020-03-12 15:32:32 -07:00
cabletest.c net: delete extra space and tab in blank line 2022-07-25 19:38:31 -07:00
channels.c ethtool: Fail number of channels change when it conflicts with rxnfc 2022-11-08 12:08:44 +01:00
coalesce.c ethtool: add tx aggregation parameters 2023-01-13 10:23:52 +00:00
common.c drivers/net/phy: add the link modes for the 10BASE-T1S Ethernet PHY 2023-01-11 08:35:02 +00:00
common.h net: ethtool: netlink: retrieve stats from multiple sources (eMAC, pMAC) 2023-01-23 12:44:18 +00:00
debug.c ethtool: use ethnl_parse_header_dev_put() 2021-12-15 10:27:47 +00:00
eee.c ethtool: use ethnl_parse_header_dev_put() 2021-12-15 10:27:47 +00:00
eeprom.c ethtool: eeprom: fix null-deref on genl_info in dump 2022-10-24 19:08:07 -07:00
features.c ethtool: use ethnl_parse_header_dev_put() 2021-12-15 10:27:47 +00:00
fec.c ethtool: use ethnl_parse_header_dev_put() 2021-12-15 10:27:47 +00:00
ioctl.c net/ethtool/ioctl: split ethtool_get_phy_stats into multiple helpers 2022-12-28 11:55:24 +00:00
linkinfo.c ethtool: use ethnl_parse_header_dev_put() 2021-12-15 10:27:47 +00:00
linkmodes.c net: phy: Add support for rate matching 2022-09-23 11:55:35 +01:00
linkstate.c ethtool: linkstate: add a statistic for PHY down events 2022-11-08 10:36:54 +01:00
Makefile net: ethtool: add support for MAC Merge layer 2023-01-23 12:44:18 +00:00
mm.c net: ethtool: netlink: retrieve stats from multiple sources (eMAC, pMAC) 2023-01-23 12:44:18 +00:00
module.c ethtool: use ethnl_parse_header_dev_put() 2021-12-15 10:27:47 +00:00
netlink.c net: ethtool: add support for MAC Merge layer 2023-01-23 12:44:18 +00:00
netlink.h net: ethtool: netlink: retrieve stats from multiple sources (eMAC, pMAC) 2023-01-23 12:44:18 +00:00
pause.c net: ethtool: netlink: retrieve stats from multiple sources (eMAC, pMAC) 2023-01-23 12:44:18 +00:00
phc_vclocks.c ethtool: add a new command for getting PHC virtual clocks 2021-07-01 13:08:18 -07:00
plca.c plca.c: fix obvious mistake in checking retval 2023-01-13 21:42:53 -08:00
privflags.c ethtool: use ethnl_parse_header_dev_put() 2021-12-15 10:27:47 +00:00
pse-pd.c ethtool: pse-pd: fix null-deref on genl_info in dump 2022-10-21 13:18:05 +01:00
rings.c net: ethtool: move checks before rtnl_lock() in ethnl_set_rings 2022-04-15 11:41:45 -07:00
rss.c ethtool: add netlink attr in rss get reply only if value is not null 2023-01-12 21:52:46 -08:00
stats.c net: ethtool: add helpers for aggregate statistics 2023-01-23 12:44:18 +00:00
strset.c ethtool: strset: report missing ETHTOOL_A_STRINGSET_ID via ext_ack 2022-08-30 12:20:43 +02:00
tsinfo.c ethtool: link up ethnl_header_policy as a nested policy 2020-10-06 06:25:55 -07:00
tunnels.c ethtool: tunnels: check the return value of nla_nest_start() 2022-09-22 19:28:10 -07:00
wol.c ethtool: use ethnl_parse_header_dev_put() 2021-12-15 10:27:47 +00:00