[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Fri, 7 Jul 2023 14:31:34 -0700
From: Stanislav Fomichev <sdf@...gle.com>
To: Daniel Borkmann <daniel@...earbox.net>
Cc: ast@...nel.org, andrii@...nel.org, martin.lau@...ux.dev,
razor@...ckwall.org, john.fastabend@...il.com, kuba@...nel.org, dxu@...uu.xyz,
joe@...ium.io, toke@...nel.org, davem@...emloft.net, bpf@...r.kernel.org,
netdev@...r.kernel.org
Subject: Re: [PATCH bpf-next v3 6/8] bpftool: Extend net dump with tcx progs
On 07/07, Daniel Borkmann wrote:
> Add support to dump fd-based attach types via bpftool. This includes both
> the tc BPF link and attach ops programs. Dumped information contain the
> attach location, function entry name, program ID and link ID when applicable.
>
> Example with tc BPF link:
>
> # ./bpftool net
> xdp:
>
> tc:
> bond0(4) bpf/ingress cil_from_netdev prog id 784 link id 10
> bond0(4) bpf/egress cil_to_netdev prog id 804 link id 11
>
> flow_dissector:
>
> netfilter:
>
> Example with tc BPF attach ops:
>
> # ./bpftool net
> xdp:
>
> tc:
> bond0(4) bpf/ingress cil_from_netdev prog id 654
> bond0(4) bpf/egress cil_to_netdev prog id 672
>
> flow_dissector:
>
> netfilter:
>
> Signed-off-by: Daniel Borkmann <daniel@...earbox.net>
> ---
> tools/bpf/bpftool/net.c | 86 +++++++++++++++++++++++++++++++++++++++--
> 1 file changed, 82 insertions(+), 4 deletions(-)
>
> diff --git a/tools/bpf/bpftool/net.c b/tools/bpf/bpftool/net.c
> index 26a49965bf71..1ef1e880de61 100644
> --- a/tools/bpf/bpftool/net.c
> +++ b/tools/bpf/bpftool/net.c
> @@ -76,6 +76,11 @@ static const char * const attach_type_strings[] = {
> [NET_ATTACH_TYPE_XDP_OFFLOAD] = "xdpoffload",
> };
>
> +static const char * const attach_loc_strings[] = {
> + [BPF_TCX_INGRESS] = "bpf/ingress",
> + [BPF_TCX_EGRESS] = "bpf/egress",
Any reason we are not doing tcx/ingress & egress? To match the section
names.
Powered by blists - more mailing lists