summaryrefslogtreecommitdiffstats
path: root/tools/include
diff options
context:
space:
mode:
authorYonghong Song <yhs@fb.com>2018-06-03 18:59:42 -0400
committerAlexei Starovoitov <ast@kernel.org>2018-06-03 21:22:41 -0400
commitc7ddbbaf1e73e2f4e95cfda7b1da1be7fd199a4d (patch)
tree748ad0b4742b384d6ce5a2271608ae871382c431 /tools/include
parentbf6fa2c893c5237b48569a13fa3c673041430b6c (diff)
tools/bpf: sync uapi bpf.h for bpf_get_current_cgroup_id() helper
Sync kernel uapi/linux/bpf.h with tools uapi/linux/bpf.h. Also add the necessary helper define in bpf_helpers.h. Acked-by: Alexei Starovoitov <ast@kernel.org> Signed-off-by: Yonghong Song <yhs@fb.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/include')
-rw-r--r--tools/include/uapi/linux/bpf.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/tools/include/uapi/linux/bpf.h b/tools/include/uapi/linux/bpf.h
index f0b6608b1f1c..18712b0dbfe7 100644
--- a/tools/include/uapi/linux/bpf.h
+++ b/tools/include/uapi/linux/bpf.h
@@ -2070,6 +2070,11 @@ union bpf_attr {
2070 * **CONFIG_SOCK_CGROUP_DATA** configuration option. 2070 * **CONFIG_SOCK_CGROUP_DATA** configuration option.
2071 * Return 2071 * Return
2072 * The id is returned or 0 in case the id could not be retrieved. 2072 * The id is returned or 0 in case the id could not be retrieved.
2073 *
2074 * u64 bpf_get_current_cgroup_id(void)
2075 * Return
2076 * A 64-bit integer containing the current cgroup id based
2077 * on the cgroup within which the current task is running.
2073 */ 2078 */
2074#define __BPF_FUNC_MAPPER(FN) \ 2079#define __BPF_FUNC_MAPPER(FN) \
2075 FN(unspec), \ 2080 FN(unspec), \
@@ -2151,7 +2156,8 @@ union bpf_attr {
2151 FN(lwt_seg6_action), \ 2156 FN(lwt_seg6_action), \
2152 FN(rc_repeat), \ 2157 FN(rc_repeat), \
2153 FN(rc_keydown), \ 2158 FN(rc_keydown), \
2154 FN(skb_cgroup_id), 2159 FN(skb_cgroup_id), \
2160 FN(get_current_cgroup_id),
2155 2161
2156/* integer value in 'imm' field of BPF_CALL instruction selects which helper 2162/* integer value in 'imm' field of BPF_CALL instruction selects which helper
2157 * function eBPF program intends to call 2163 * function eBPF program intends to call