]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: fix bpf_skb_in_cgroup helper naming
authorDaniel Borkmann <daniel@iogearbox.net>
Fri, 12 Aug 2016 20:17:17 +0000 (22:17 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sat, 13 Aug 2016 04:53:33 +0000 (21:53 -0700)
commitcc652ad18e1ae3d63ab8946e07fe29d42caf09c1
tree95db28dc3288ef964ebd07270880233b98ba09a3
parent4096666bf042e499f1b666ada74235015c1c9d7b
bpf: fix bpf_skb_in_cgroup helper naming

While hashing out BPF's current_task_under_cgroup helper bits, it came
to discussion that the skb_in_cgroup helper name was suboptimally chosen.

Tejun says:

  So, I think in_cgroup should mean that the object is in that
  particular cgroup while under_cgroup in the subhierarchy of that
  cgroup. Let's rename the other subhierarchy test to under too. I
  think that'd be a lot less confusing going forward.

  [...]

  It's more intuitive and gives us the room to implement the real
  "in" test if ever necessary in the future.

Since this touches uapi bits, we need to change this as long as v4.8
is not yet officially released. Thus, change the helper enum and rename
related bits.

Fixes: a7a66e65a016 ("cgroup: bpf: Add bpf_skb_in_cgroup_proto")
Reference: http://patchwork.ozlabs.org/patch/658500/
Suggested-by: Sargun Dhillon <sargun@sargun.me>
Suggested-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Alexei Starovoitov <ast@kernel.org>
include/uapi/linux/bpf.h
kernel/bpf/verifier.c
net/core/filter.c
samples/bpf/bpf_helpers.h
samples/bpf/test_cgrp2_tc_kern.c