mirror of
https://git.proxmox.com/git/mirror_ubuntu-kernels.git
synced 2025-12-08 05:34:14 +00:00
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>
|
||
|---|---|---|
| .. | ||
| bnx2x | ||
| bnxt | ||
| genet | ||
| b44.c | ||
| b44.h | ||
| bcm63xx_enet.c | ||
| bcm63xx_enet.h | ||
| bcm4908_enet.c | ||
| bcm4908_enet.h | ||
| bcmsysport.c | ||
| bcmsysport.h | ||
| bgmac-bcma-mdio.c | ||
| bgmac-bcma.c | ||
| bgmac-platform.c | ||
| bgmac.c | ||
| bgmac.h | ||
| bnx2_fw.h | ||
| bnx2.c | ||
| bnx2.h | ||
| cnic_defs.h | ||
| cnic_if.h | ||
| cnic.c | ||
| cnic.h | ||
| Kconfig | ||
| Makefile | ||
| sb1250-mac.c | ||
| tg3.c | ||
| tg3.h | ||
| unimac.h | ||