]> git.baikalelectronics.ru Git - kernel.git/commit
tc/act: remove unneeded RCU lock in action callback
authorPaolo Abeni <pabeni@redhat.com>
Mon, 30 Jul 2018 12:30:43 +0000 (14:30 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 30 Jul 2018 16:31:13 +0000 (09:31 -0700)
commit831611103a3204c456f7152adeb478751d49d122
tree6d839e231aeb7764681d03ef13732b0fd408ff72
parenta573d458b0e65a8622836980c9340158f2e3378d
tc/act: remove unneeded RCU lock in action callback

Each lockless action currently does its own RCU locking in ->act().
This allows using plain RCU accessor, even if the context
is really RCU BH.

This change drops the per action RCU lock, replace the accessors
with the _bh variant, cleans up a bit the surrounding code and
documents the RCU status in the relevant header.
No functional nor performance change is intended.

The goal of this patch is clarifying that the RCU critical section
used by the tc actions extends up to the classifier's caller.

v1 -> v2:
 - preserve rcu lock in act_bpf: it's needed by eBPF helpers,
   as pointed out by Daniel

v3 -> v4:
 - fixed some typos in the commit message (JiriP)

Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/act_api.h
include/net/sch_generic.h
net/sched/act_csum.c
net/sched/act_ife.c
net/sched/act_mirred.c
net/sched/act_sample.c
net/sched/act_skbedit.c
net/sched/act_skbmod.c
net/sched/act_tunnel_key.c
net/sched/act_vlan.c