linux-sg2042/net/hsr
Eric Dumazet 625788b584 net: add per-cpu storage and net->core_stats
Before adding yet another possibly contended atomic_long_t,
it is time to add per-cpu storage for existing ones:
 dev->tx_dropped, dev->rx_dropped, and dev->rx_nohandler

Because many devices do not have to increment such counters,
allocate the per-cpu storage on demand, so that dev_get_stats()
does not have to spend considerable time folding zero counters.

Note that some drivers have abused these counters which
were supposed to be only used by core networking stack.

v4: should use per_cpu_ptr() in dev_get_stats() (Jakub)
v3: added a READ_ONCE() in netdev_core_stats_alloc() (Paolo)
v2: add a missing include (reported by kernel test robot <lkp@intel.com>)
    Change in netdev_core_stats_alloc() (Jakub)

Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: jeffreyji <jeffreyji@google.com>
Reviewed-by: Brian Vazquez <brianvv@google.com>
Reviewed-by: Jakub Kicinski <kuba@kernel.org>
Acked-by: Paolo Abeni <pabeni@redhat.com>
Link: https://lore.kernel.org/r/20220311051420.2608812-1-eric.dumazet@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2022-03-11 23:17:24 -08:00
..
Kconfig hsr: enhance netlink socket interface to support PRP 2020-07-27 12:20:40 -07:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
hsr_debugfs.c net: hsr: use hlist_head instead of list_head for mac addresses 2022-02-06 10:55:52 +00:00
hsr_device.c net: add per-cpu storage and net->core_stats 2022-03-11 23:17:24 -08:00
hsr_device.h net: hsr: add offloading support 2021-02-11 13:24:44 -08:00
hsr_forward.c net: hsr: use hlist_head instead of list_head for mac addresses 2022-02-06 10:55:52 +00:00
hsr_forward.h net: hsr: fix mac_len checks 2021-05-24 14:10:28 -07:00
hsr_framereg.c net: hsr: fix hsr build error when lockdep is not enabled 2022-02-21 20:43:10 -08:00
hsr_framereg.h net: hsr: fix hsr build error when lockdep is not enabled 2022-02-21 20:43:10 -08:00
hsr_main.c net: use eth_hw_addr_set() instead of ether_addr_copy() 2021-10-02 14:18:25 +01:00
hsr_main.h flow_dissector: Add support for HSR 2022-03-02 22:44:49 -08:00
hsr_netlink.c net: hsr: use hlist_head instead of list_head for mac addresses 2022-02-06 10:55:52 +00:00
hsr_netlink.h hsr: enhance netlink socket interface to support PRP 2020-07-27 12:20:40 -07:00
hsr_slave.c net: hsr: fix mac_len checks 2021-05-24 14:10:28 -07:00
hsr_slave.h net: prp: add packet handling support 2020-07-27 12:20:40 -07:00