]> git.baikalelectronics.ru Git - kernel.git/commit
libbpf: Support cgroup_skb/{e,in}gress section names
authorAndrey Ignatov <rdna@fb.com>
Wed, 26 Sep 2018 22:24:54 +0000 (15:24 -0700)
committerDaniel Borkmann <daniel@iogearbox.net>
Thu, 27 Sep 2018 19:14:59 +0000 (21:14 +0200)
commita4a10f51bdc39499284911268fad7f83b2c64631
tree9e89eef0fe3410ad694da97c9f0c66a03e1ca470
parent7a3c13ff2cae1b128be417c5c03c667a6e881d37
libbpf: Support cgroup_skb/{e,in}gress section names

Add section names for BPF_CGROUP_INET_INGRESS and BPF_CGROUP_INET_EGRESS
attach types to be able to identify them in libbpf_attach_type_by_name.

"cgroup_skb" is used instead of "cgroup/skb" mostly to easy possible
unifying of how libbpf and bpftool works with section names:
* bpftool uses "cgroup_skb" to in "prog list" sub-command;
* bpftool uses "ingress" and "egress" in "cgroup list" sub-command;
* having two parts instead of three in a string like "cgroup_skb/ingress"
  can be leveraged to split it to prog_type part and attach_type part,
  or vise versa: use two parts to make a section name.

Signed-off-by: Andrey Ignatov <rdna@fb.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
tools/lib/bpf/libbpf.c