Thread (28 messages) flat view 28 messages, 7 authors, 2020-09-25

Re: [PATCH bpf-next 1/6] bpf: add classid helper only based on skb->sk

From: Jakub Kicinski <kuba@kernel.org>
Date: 2020-09-25 14:46:24
Also in: bpf

On Thu, 24 Sep 2020 20:21:22 +0200 Daniel Borkmann wrote:
Similarly to 5a52ae4e32a6 ("bpf: Allow to retrieve cgroup v1 classid
from v2 hooks"), add a helper to retrieve cgroup v1 classid solely
based on the skb->sk, so it can be used as key as part of BPF map
lookups out of tc from host ns, in particular given the skb->sk is
retained these days when crossing net ns thanks to 9c4c325252c5
("skbuff: preserve sock reference when scrubbing the skb."). This
is similar to bpf_skb_cgroup_id() which implements the same for v2.
Kubernetes ecosystem is still operating on v1 however, hence net_cls
needs to be used there until this can be dropped in with the v2
helper of bpf_skb_cgroup_id().

Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
FWIW lot's of whitespace warnings from checkpatch --strict about
comments having spaces before tabs here.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help