• Andrey Ignatov's avatar
    libbpf: Support cgroup_skb/{e,in}gress section names · bafa7afe
    Andrey Ignatov authored
    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: default avatarAndrey Ignatov <rdna@fb.com>
    Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
    bafa7afe
libbpf.c 57.1 KB