Files
linux/include/linux
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
..
2022-02-01 14:25:50 +02:00
2022-01-22 08:33:34 +02:00
2022-01-15 08:47:31 -08:00
2021-10-18 14:43:23 -06:00
2022-01-09 10:36:51 -07:00
2021-11-17 10:36:15 -05:00
2021-12-10 17:10:55 -08:00
2021-12-10 12:51:28 +01:00
2021-12-01 00:06:43 +01:00
2022-01-15 08:47:31 -08:00
2022-01-20 08:52:54 +02:00
2021-10-18 07:49:38 -04:00
2022-01-04 13:15:33 -05:00
2022-03-02 22:44:49 -08:00
2021-12-17 09:06:15 +01:00
2021-12-20 09:03:05 +01:00
2022-02-05 15:20:34 +00:00
2021-10-18 07:49:39 -04:00
2022-01-27 13:53:26 +00:00
2021-12-16 22:22:20 +01:00
2022-02-09 09:24:40 -05:00
2022-01-12 10:14:09 -06:00
2021-11-16 19:07:53 -08:00
2021-10-14 13:29:18 +02:00
2022-01-22 08:33:37 +02:00
2022-01-08 12:43:57 -06:00
2021-11-18 09:36:39 +01:00
2022-01-24 14:45:02 +01:00
2021-11-30 17:25:20 -08:00
2021-10-18 07:49:39 -04:00
2021-10-18 17:20:50 +02:00
2022-01-22 08:33:37 +02:00
2022-01-22 08:33:38 +02:00
2022-03-09 11:22:58 +00:00
2021-11-03 11:41:25 -07:00
2021-11-25 18:35:23 +01:00
2022-01-27 13:53:27 +00:00
2021-10-12 11:41:39 -03:00
2021-12-30 12:13:04 +01:00
2021-12-09 10:49:56 -08:00
2022-01-08 00:28:41 -05:00
2021-10-19 23:44:30 +08:00