bpf_skb_ancestor_cgroup_id helper
Status from this message: Applied to bpf-next, thanks Andrey!
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest4 patches 1 replyApplied
- v14 patches 4 repliesSuperseded
Changes in v2 from the cover letter
- more reliable check for testing IPv6 to become ready in selftest.
Patches in v2 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | bpf: Introduce bpf_skb_ancestor_cgroup_id helperinclude/ include/ net/ | +78 | 0 replies | |
| 2/4 | bpf: Sync bpf.h to tools/tools/ | +20 | 0 replies | |
| 3/4 | selftests/bpf: Add cgroup id helpers to bpf_helpers.htools/ | +4 | 0 replies | |
| 4/4 | selftests/bpf: Selftest for bpf_skb_ancestor_cgroup_idtools/ tools/ tools/ +1 more | +302 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.
Cover letter [PATCH v2 bpf-next 0/4] bpf_skb_ancestor_cgroup_id helper
v1->v2:
- more reliable check for testing IPv6 to become ready in selftest.
This patch set adds new BPF helper bpf_skb_ancestor_cgroup_id that returns id of cgroup v2 that is ancestor of cgroup associated with the skb at the ancestor_level.
The helper is useful to implement policies in TC based on cgroups that are upper in hierarchy than immediate cgroup associated with skb.
Patch 0001 provides more details and describes use-cases. Patch 0002 syncs UAPI changes to tools/.
Patch 0003 adds skb*cgroup_id helpers to bpf_helper.h header. Patch 0004 adds selftest for the new helper and is an example of usage.
Andrey Ignatov (4):
bpf: Introduce bpf_skb_ancestor_cgroup_id helper
bpf: Sync bpf.h to tools/
selftests/bpf: Add cgroup id helpers to bpf_helpers.h selftests/bpf: Selftest for bpf_skb_ancestor_cgroup_id
include/linux/cgroup.h | 30 +++ include/uapi/linux/bpf.h | 21 +- net/core/filter.c | 28 +++ tools/include/uapi/linux/bpf.h | 21 +- tools/testing/selftests/bpf/Makefile | 9 +- tools/testing/selftests/bpf/bpf_helpers.h | 4 + .../selftests/bpf/test_skb_cgroup_id.sh | 62 ++++++ .../selftests/bpf/test_skb_cgroup_id_kern.c | 47 +++++ .../selftests/bpf/test_skb_cgroup_id_user.c | 187 ++++++++++++++++++ 9 files changed, 404 insertions(+), 5 deletions(-) create mode 100755 tools/testing/selftests/bpf/test_skb_cgroup_id.sh create mode 100644 tools/testing/selftests/bpf/test_skb_cgroup_id_kern.c create mode 100644 tools/testing/selftests/bpf/test_skb_cgroup_id_user.c
Signature · 1 line
2.17.1