]> git.baikalelectronics.ru Git - kernel.git/commit
bpf, netns: Handle multiple link attachments
authorJakub Sitnicki <jakub@cloudflare.com>
Fri, 17 Jul 2020 10:35:22 +0000 (12:35 +0200)
committerAlexei Starovoitov <ast@kernel.org>
Sat, 18 Jul 2020 03:18:16 +0000 (20:18 -0700)
commitda48671cdc3be6655a0b0dd172b0f3aa1ac19fc3
treeeeb94dffcd871572d88389730be81a9448663fd6
parent728840a4289681bfd0a021c5487615d8cc7bf03c
bpf, netns: Handle multiple link attachments

Extend the BPF netns link callbacks to rebuild (grow/shrink) or update the
prog_array at given position when link gets attached/updated/released.

This let's us lift the limit of having just one link attached for the new
attach type introduced by subsequent patch.

No functional changes intended.

Signed-off-by: Jakub Sitnicki <jakub@cloudflare.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Andrii Nakryiko <andriin@fb.com>
Link: https://lore.kernel.org/bpf/20200717103536.397595-2-jakub@cloudflare.com
include/linux/bpf.h
kernel/bpf/core.c
kernel/bpf/net_namespace.c