aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrey Ignatov <rdna@fb.com>2018-08-12 13:49:28 -0400
committerDaniel Borkmann <daniel@iogearbox.net>2018-08-12 19:02:39 -0400
commit539764d07b49c5b322cc065d275f65df275e4991 (patch)
tree12292f4e8e47300e99c3c8535b6898a10838bcb3
parent7723628101aaeb1d723786747529b4ea65c5b5c5 (diff)
bpf: Sync bpf.h to tools/
Sync skb_ancestor_cgroup_id() related bpf UAPI changes to tools/. Signed-off-by: Andrey Ignatov <rdna@fb.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
-rw-r--r--tools/include/uapi/linux/bpf.h21
1 files changed, 20 insertions, 1 deletions
diff --git a/tools/include/uapi/linux/bpf.h b/tools/include/uapi/linux/bpf.h
index 3102a2a23c31..66917a4eba27 100644
--- a/tools/include/uapi/linux/bpf.h
+++ b/tools/include/uapi/linux/bpf.h
@@ -2093,6 +2093,24 @@ union bpf_attr {
2093 * Return 2093 * Return
2094 * The id is returned or 0 in case the id could not be retrieved. 2094 * The id is returned or 0 in case the id could not be retrieved.
2095 * 2095 *
2096 * u64 bpf_skb_ancestor_cgroup_id(struct sk_buff *skb, int ancestor_level)
2097 * Description
2098 * Return id of cgroup v2 that is ancestor of cgroup associated
2099 * with the *skb* at the *ancestor_level*. The root cgroup is at
2100 * *ancestor_level* zero and each step down the hierarchy
2101 * increments the level. If *ancestor_level* == level of cgroup
2102 * associated with *skb*, then return value will be same as that
2103 * of **bpf_skb_cgroup_id**\ ().
2104 *
2105 * The helper is useful to implement policies based on cgroups
2106 * that are upper in hierarchy than immediate cgroup associated
2107 * with *skb*.
2108 *
2109 * The format of returned id and helper limitations are same as in
2110 * **bpf_skb_cgroup_id**\ ().
2111 * Return
2112 * The id is returned or 0 in case the id could not be retrieved.
2113 *
2096 * u64 bpf_get_current_cgroup_id(void) 2114 * u64 bpf_get_current_cgroup_id(void)
2097 * Return 2115 * Return
2098 * A 64-bit integer containing the current cgroup id based 2116 * A 64-bit integer containing the current cgroup id based
@@ -2207,7 +2225,8 @@ union bpf_attr {
2207 FN(skb_cgroup_id), \ 2225 FN(skb_cgroup_id), \
2208 FN(get_current_cgroup_id), \ 2226 FN(get_current_cgroup_id), \
2209 FN(get_local_storage), \ 2227 FN(get_local_storage), \
2210 FN(sk_select_reuseport), 2228 FN(sk_select_reuseport), \
2229 FN(skb_ancestor_cgroup_id),
2211 2230
2212/* integer value in 'imm' field of BPF_CALL instruction selects which helper 2231/* integer value in 'imm' field of BPF_CALL instruction selects which helper
2213 * function eBPF program intends to call 2232 * function eBPF program intends to call