diff options
author | 2020-10-13 17:34:26 -0700 | |
---|---|---|
committer | 2020-10-13 17:37:37 -0700 | |
commit | a003ec1f47bc7c34e1dc96653b903c48f63adcdb (patch) | |
tree | 995db2093a9e84457f0ac54e6a048294ab41abec /include | |
parent | virtio-net: ethtool configurable RXCSUM (diff) | |
parent | xfrm: use new function dev_fetch_sw_netstats (diff) | |
download | wireguard-linux-a003ec1f47bc7c34e1dc96653b903c48f63adcdb.tar.xz wireguard-linux-a003ec1f47bc7c34e1dc96653b903c48f63adcdb.zip |
Merge branch 'net-add-and-use-function-dev_fetch_sw_netstats-for-fetching-pcpu_sw_netstats'
Heiner Kallweit says:
====================
net: add and use function dev_fetch_sw_netstats for fetching pcpu_sw_netstats
In several places the same code is used to populate rtnl_link_stats64
fields with data from pcpu_sw_netstats. Therefore factor out this code
to a new function dev_fetch_sw_netstats().
====================
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/netdevice.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 948d7105e91a..964b494b0e8d 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h @@ -4499,6 +4499,8 @@ struct rtnl_link_stats64 *dev_get_stats(struct net_device *dev, struct rtnl_link_stats64 *storage); void netdev_stats_to_stats64(struct rtnl_link_stats64 *stats64, const struct net_device_stats *netdev_stats); +void dev_fetch_sw_netstats(struct rtnl_link_stats64 *s, + const struct pcpu_sw_netstats __percpu *netstats); extern int netdev_max_backlog; extern int netdev_tstamp_prequeue; |