History

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.

Yonghong Song committed 8 years ago

Commit c7ddbba1 parent bf6fa2c2 files · +9 −1Browse files

Showing the changes to tools/include/uapi/linux (1 of 2 files). Show all

Unified · Split

tools/include/uapi/linux/bpf.h+7−1
@@ -2070,6 +2070,11 @@ union bpf_attr { · 2069 unmodified lines
20702070 * **CONFIG_SOCK_CGROUP_DATA** configuration option.
20712071 * Return
20722072 * 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.
20732078 */
20742079 #define __BPF_FUNC_MAPPER(FN) \
20752080 FN(unspec), \
@@ -2151,7 +2156,8 @@ union bpf_attr { · 75 unmodified lines
21512156 FN(lwt_seg6_action), \
21522157 FN(rc_repeat), \
21532158 FN(rc_keydown), \
2154− FN(skb_cgroup_id),
2159+ FN(skb_cgroup_id), \
2160+ FN(get_current_cgroup_id),
21552161
21562162 /* integer value in 'imm' field of BPF_CALL instruction selects which helper
21572163 * function eBPF program intends to call