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)
commitce3aa9cc5109363099b7c4ac82e2c9768afcaf31
treeeeb94dffcd871572d88389730be81a9448663fd6
parentbfdfa51702dec67e9fcd52568b4cf3c7f799db8b
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