]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: offload: don't require rtnl for dev list manipulation
authorJakub Kicinski <jakub.kicinski@netronome.com>
Thu, 28 Dec 2017 02:39:03 +0000 (18:39 -0800)
committerDaniel Borkmann <daniel@iogearbox.net>
Sun, 31 Dec 2017 15:12:22 +0000 (16:12 +0100)
commita8c32e7761ae56d07fe63b1d84b3040902112e3d
treece33ba273117c2a945de08734867f60aa75a7c58
parent1588d54d0c9aae6a5f1871104b7a1433440781f4
bpf: offload: don't require rtnl for dev list manipulation

We don't need the RTNL lock for all operations on offload state.
We only need to hold it around ndo calls.  The device offload
initialization doesn't require it.  The soon-to-come querying
of the offload info will only need it partially.  We will also
be able to remove the waitqueue in following patches.

Use struct rw_semaphore because map offload will require sleeping
with the semaphore held for read.

Suggested-by: Kirill Tkhai <ktkhai@virtuozzo.com>
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: Quentin Monnet <quentin.monnet@netronome.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
kernel/bpf/offload.c