linux-stable/net
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
..
6lowpan
9p xen: branch for v6.2-rc4 2023-01-12 17:02:20 -06:00
802 treewide: Convert del_timer*() to timer_shutdown*() 2022-12-25 13:38:09 -08:00
8021q
appletalk
atm driver core: make struct class.dev_uevent() take a const * 2022-11-24 17:12:15 +01:00
ax25 ax25: af_ax25: Remove unnecessary (void*) conversions 2022-11-16 13:31:03 +00:00
batman-adv Networking changes for 6.2. 2022-12-13 15:47:48 -08:00
bluetooth net/sock: Introduce trace_sk_data_ready() 2023-01-23 11:26:50 +00:00
bpf New Feature: 2022-12-17 14:06:53 -06:00
bpfilter
bridge treewide: Convert del_timer*() to timer_shutdown*() 2022-12-25 13:38:09 -08:00
caif caif: don't assume iov_iter type 2023-01-13 20:44:20 -08:00
can Networking changes for 6.2. 2022-12-13 15:47:48 -08:00
ceph net/sock: Introduce trace_sk_data_ready() 2023-01-23 11:26:50 +00:00
core net/sock: Introduce trace_sk_data_ready() 2023-01-23 11:26:50 +00:00
dcb net: dcb: add helper functions to retrieve PCP and DSCP rewrite maps 2023-01-20 09:33:22 +00:00
dccp Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2022-11-29 13:04:52 -08:00
devlink devlink: add instance lock assertion in devl_is_registered() 2023-01-19 19:08:38 -08:00
dns_resolver
dsa net: dsa: microchip: ptp: move pdelay_rsp correction field to tail tag 2023-01-13 08:40:41 +00:00
ethernet net: ethernet: use sysfs_emit() to instead of scnprintf() 2022-12-07 20:02:44 -08:00
ethtool net: ethtool: add helpers for aggregate statistics 2023-01-23 12:44:18 +00:00
hsr hsr: Use a single struct for self_node. 2022-12-01 20:26:22 -08:00
ieee802154 Merge tag 'ieee802154-for-net-next-2022-12-05' of git://git.kernel.org/pub/scm/linux/kernel/git/sschmidt/wpan-next 2022-12-07 17:33:26 -08:00
ife
ipv4 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2023-01-20 12:28:23 -08:00
ipv6 ipv6: Remove extra counter pull before gc 2023-01-18 13:00:16 +00:00
iucv
kcm net/sock: Introduce trace_sk_data_ready() 2023-01-23 11:26:50 +00:00
key Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec-next 2022-11-29 20:50:51 -08:00
l2tp l2tp: prevent lockdep issue in l2tp_tunnel_register() 2023-01-18 14:44:54 +00:00
l3mdev
lapb
llc
mac80211 Revert "wifi: mac80211: fix memory leak in ieee80211_if_add()" 2023-01-16 17:28:52 +02:00
mac802154 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2022-12-08 18:19:59 -08:00
mctp mctp: Remove device type check at unregister 2022-12-19 17:20:22 -08:00
mpls
mptcp net/sock: Introduce trace_sk_data_ready() 2023-01-23 11:26:50 +00:00
ncsi net/ncsi: Silence runtime memcpy() false positive warning 2022-12-06 17:29:14 -08:00
netfilter Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2023-01-20 12:28:23 -08:00
netlabel
netlink Networking changes for 6.2. 2022-12-13 15:47:48 -08:00
netrom
nfc net: nfc: Fix use-after-free in local_cleanup() 2023-01-13 20:53:44 -08:00
nsh
openvswitch net: openvswitch: release vport resources on failure 2022-12-21 17:48:12 -08:00
packet Networking changes for 6.2. 2022-12-13 15:47:48 -08:00
phonet net/sock: Introduce trace_sk_data_ready() 2023-01-23 11:26:50 +00:00
psample
qrtr net/sock: Introduce trace_sk_data_ready() 2023-01-23 11:26:50 +00:00
rds net/sock: Introduce trace_sk_data_ready() 2023-01-23 11:26:50 +00:00
rfkill driver core: make struct class.dev_uevent() take a const * 2022-11-24 17:12:15 +01:00
rose
rxrpc rxrpc: Fix wrong error return in rxrpc_connect_call() 2023-01-12 21:51:55 -08:00
sched Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2023-01-20 12:28:23 -08:00
sctp net/sock: Introduce trace_sk_data_ready() 2023-01-23 11:26:50 +00:00
smc net/sock: Introduce trace_sk_data_ready() 2023-01-23 11:26:50 +00:00
strparser
sunrpc net/sock: Introduce trace_sk_data_ready() 2023-01-23 11:26:50 +00:00
switchdev
tipc net/sock: Introduce trace_sk_data_ready() 2023-01-23 11:26:50 +00:00
tls net/sock: Introduce trace_sk_data_ready() 2023-01-23 11:26:50 +00:00
unix unix: Improve locking scheme in unix_show_fdinfo() 2023-01-16 11:21:11 +00:00
vmw_vsock virtio/vsock: replace virtio_vsock_pkt with sk_buff 2023-01-16 13:26:33 +00:00
wireless Driver Core changes for 6.2-rc1 2022-12-16 03:54:54 -08:00
x25 net/x25: Fix skb leak in x25_lapb_receive_frame() 2022-11-15 20:22:19 -08:00
xdp bpf: Expand map key argument of bpf_redirect_map to u64 2022-11-15 09:00:27 -08:00
xfrm net/sock: Introduce trace_sk_data_ready() 2023-01-23 11:26:50 +00:00
compat.c use less confusing names for iov_iter direction initializers 2022-11-25 13:01:55 -05:00
devres.c
Kconfig
Kconfig.debug
Makefile devlink: move code to a dedicated directory 2023-01-05 22:12:00 -08:00
socket.c sock: add tracepoint for send recv length 2023-01-13 10:25:10 +00:00
sysctl_net.c