From e86283071fb0eed28136adb52997888f4beb202b Mon Sep 17 00:00:00 2001 From: Daniel Borkmann Date: Wed, 21 Jun 2017 20:16:11 +0200 Subject: bpf: expose prog id for cls_bpf and act_bpf In order to be able to retrieve the attached programs from cls_bpf and act_bpf, we need to expose the prog ids via netlink so that an application can later on get an fd based on the id through the BPF_PROG_GET_FD_BY_ID command, and dump related prog info via BPF_OBJ_GET_INFO_BY_FD command for bpf(2). Signed-off-by: Daniel Borkmann Signed-off-by: David S. Miller --- include/uapi/linux/pkt_cls.h | 1 + include/uapi/linux/tc_act/tc_bpf.h | 1 + 2 files changed, 2 insertions(+) (limited to 'include/uapi') diff --git a/include/uapi/linux/pkt_cls.h b/include/uapi/linux/pkt_cls.h index 2055783e6ee9..d5e2bf68d0d4 100644 --- a/include/uapi/linux/pkt_cls.h +++ b/include/uapi/linux/pkt_cls.h @@ -369,6 +369,7 @@ enum { TCA_BPF_FLAGS, TCA_BPF_FLAGS_GEN, TCA_BPF_TAG, + TCA_BPF_ID, __TCA_BPF_MAX, }; diff --git a/include/uapi/linux/tc_act/tc_bpf.h b/include/uapi/linux/tc_act/tc_bpf.h index 975b50dc8d1d..8dc2ac05eecf 100644 --- a/include/uapi/linux/tc_act/tc_bpf.h +++ b/include/uapi/linux/tc_act/tc_bpf.h @@ -28,6 +28,7 @@ enum { TCA_ACT_BPF_NAME, TCA_ACT_BPF_PAD, TCA_ACT_BPF_TAG, + TCA_ACT_BPF_ID, __TCA_ACT_BPF_MAX, }; #define TCA_ACT_BPF_MAX (__TCA_ACT_BPF_MAX - 1) -- cgit v1.2.3-59-g8ed1b