net: add softnet_data.in_net_rx_action
authorEric Dumazet <edumazet@google.com>
Tue, 28 Mar 2023 23:50:19 +0000 (23:50 +0000)
committerPaolo Abeni <pabeni@redhat.com>
Thu, 30 Mar 2023 11:40:00 +0000 (13:40 +0200)
commitc59647c0dc679008886756a888368da1c6d4ccd3
treee9085b988a2ac89d8c73f1388cac8f8fd0471b4d
parent8fcb76b934daff12cde76adeab3d502eeb0734b1
net: add softnet_data.in_net_rx_action

We want to make two optimizations in napi_schedule_rps() and
____napi_schedule() which require to know if these helpers are
called from net_rx_action(), instead of being called from
other contexts.

sd.in_net_rx_action is only read/written by the owning cpu.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Jason Xing <kerneljasonxing@gmail.com>
Tested-by: Jason Xing <kerneljasonxing@gmail.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
include/linux/netdevice.h
net/core/dev.c