]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: expose prog id for cls_bpf and act_bpf
authorDaniel Borkmann <daniel@iogearbox.net>
Wed, 21 Jun 2017 18:16:11 +0000 (20:16 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 21 Jun 2017 19:14:23 +0000 (15:14 -0400)
commit1e08b4c937c32c4be48883c4c0140c5f08d15b0a
tree83111eeb6166417c89287659f2014e8cd2fb79d6
parent1996b49e5ad9c221266f6f25009dc354ec08c786
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 <daniel@iogearbox.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/uapi/linux/pkt_cls.h
include/uapi/linux/tc_act/tc_bpf.h
net/sched/act_bpf.c
net/sched/cls_bpf.c