History

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).

Daniel Borkmann committed 9 years ago

Commit e8628301 parent 34cfb544 files · +8 −0Browse files

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

Unified · Split

2 files
  1. include/uapi/linux/pkt_cls.h +1 −0
  2. include/uapi/linux/tc_act/tc_bpf.h +1 −0
include/uapi/linux/pkt_cls.h+1−0
@@ -369,6 +369,7 @@ enum { · 368 unmodified lines
369 TCA_BPF_FLAGS,369 TCA_BPF_FLAGS,
370 TCA_BPF_FLAGS_GEN,370 TCA_BPF_FLAGS_GEN,
371 TCA_BPF_TAG,371 TCA_BPF_TAG,
372 TCA_BPF_ID,
372 __TCA_BPF_MAX,373 __TCA_BPF_MAX,
373};374};
374 375
include/uapi/linux/tc_act/tc_bpf.h+1−0
@@ -28,6 +28,7 @@ enum { · 27 unmodified lines
28 TCA_ACT_BPF_NAME,28 TCA_ACT_BPF_NAME,
29 TCA_ACT_BPF_PAD,29 TCA_ACT_BPF_PAD,
30 TCA_ACT_BPF_TAG,30 TCA_ACT_BPF_TAG,
31 TCA_ACT_BPF_ID,
31 __TCA_ACT_BPF_MAX,32 __TCA_ACT_BPF_MAX,
32};33};
33#define TCA_ACT_BPF_MAX (__TCA_ACT_BPF_MAX - 1)34#define TCA_ACT_BPF_MAX (__TCA_ACT_BPF_MAX - 1)