Helper function bpf_skb_under_cgroup
Definition
Copyright (c) 2015 The Libbpf Authors. All rights reserved.
Check whether skb is a descendant of the cgroup2 held by map of type BPF_MAP_TYPE_CGROUP_ARRAY, at index.
Returns
The return value depends on the result of the test, and can be:
- 0, if the skb failed the cgroup2 descendant test.
- 1, if the skb succeeded the cgroup2 descendant test.
- A negative error code, if an error occurred.
static long (* const bpf_skb_under_cgroup)(struct __sk_buff *skb, void *map, __u32 index) = (void *) 33;
Usage
Docs could be improved
This part of the docs is incomplete, contributions are very welcome
Program types
This helper call can be used in the following program types:
BPF_PROG_TYPE_LWT_IN
BPF_PROG_TYPE_LWT_OUT
BPF_PROG_TYPE_LWT_SEG6LOCAL
BPF_PROG_TYPE_LWT_XMIT
BPF_PROG_TYPE_SCHED_ACT
BPF_PROG_TYPE_SCHED_CLS
Example
Docs could be improved
This part of the docs is incomplete, contributions are very welcome