X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=include%2Fuapi%2Flinux%2Fbpf.h;h=f896dfac4ac0e90bc6c0c5ca1667c8b469317bc2;hb=326dbf4a27d8cc308a411b2ff2df615522915992;hp=9e5fc168c8a3d8cb3d8ef424eed6d67a74f2e8ac;hpb=2c02d62980fc92f4cc26a335184e0c2c76498881;p=deliverable%2Flinux.git diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h index 9e5fc168c8a3..f896dfac4ac0 100644 --- a/include/uapi/linux/bpf.h +++ b/include/uapi/linux/bpf.h @@ -95,6 +95,7 @@ enum bpf_prog_type { BPF_PROG_TYPE_SCHED_ACT, BPF_PROG_TYPE_TRACEPOINT, BPF_PROG_TYPE_XDP, + BPF_PROG_TYPE_PERF_EVENT, }; #define BPF_PSEUDO_MAP_FD 1 @@ -375,6 +376,28 @@ enum bpf_func_id { */ BPF_FUNC_probe_write_user, + /** + * bpf_current_task_under_cgroup(map, index) - Check cgroup2 membership of current task + * @map: pointer to bpf_map in BPF_MAP_TYPE_CGROUP_ARRAY type + * @index: index of the cgroup in the bpf_map + * Return: + * == 0 current failed the cgroup2 descendant test + * == 1 current succeeded the cgroup2 descendant test + * < 0 error + */ + BPF_FUNC_current_task_under_cgroup, + + /** + * bpf_skb_change_tail(skb, len, flags) + * The helper will resize the skb to the given new size, + * to be used f.e. with control messages. + * @skb: pointer to skb + * @len: new skb length + * @flags: reserved + * Return: 0 on success or negative error + */ + BPF_FUNC_skb_change_tail, + __BPF_FUNC_MAX_ID, };