All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stanislav Fomichev <sdf@google.com>
To: Daniel Borkmann <daniel@iogearbox.net>
Cc: ast@kernel.org, andrii@kernel.org, martin.lau@linux.dev,
	 razor@blackwall.org, john.fastabend@gmail.com, kuba@kernel.org,
	dxu@dxuuu.xyz,  joe@cilium.io, toke@kernel.org,
	davem@davemloft.net, bpf@vger.kernel.org,
	 netdev@vger.kernel.org
Subject: Re: [PATCH bpf-next v3 6/8] bpftool: Extend net dump with tcx progs
Date: Fri, 7 Jul 2023 14:31:34 -0700	[thread overview]
Message-ID: <ZKiENoYiElPyQqrL@google.com> (raw)
In-Reply-To: <20230707172455.7634-7-daniel@iogearbox.net>

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@iogearbox.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.

  reply	other threads:[~2023-07-07 21:31 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-07 17:24 [PATCH bpf-next v3 0/8] BPF link support for tc BPF programs Daniel Borkmann
2023-07-07 17:24 ` [PATCH bpf-next v3 1/8] bpf: Add generic attach/detach/query API for multi-progs Daniel Borkmann
2023-07-07 21:27   ` Stanislav Fomichev
2023-07-10  7:42     ` Daniel Borkmann
2023-07-10 14:26       ` Daniel Borkmann
2023-07-10 18:18       ` Stanislav Fomichev
2023-07-10 18:26         ` Alexei Starovoitov
2023-07-10 19:00           ` Stanislav Fomichev
2023-07-10 20:16             ` Alexei Starovoitov
2023-07-10 21:13               ` Stanislav Fomichev
2023-07-10 22:38                 ` Alexei Starovoitov
2023-07-10 22:46                   ` Stanislav Fomichev
2023-07-10 18:29         ` Daniel Borkmann
2023-07-09 17:17   ` Alexei Starovoitov
2023-07-10  7:10     ` Daniel Borkmann
2023-07-10 13:15       ` Daniel Borkmann
2023-07-07 17:24 ` [PATCH bpf-next v3 2/8] bpf: Add fd-based tcx multi-prog infra with link support Daniel Borkmann
2023-07-09 17:19   ` Alexei Starovoitov
2023-07-10  6:57     ` Daniel Borkmann
2023-07-07 17:24 ` [PATCH bpf-next v3 3/8] libbpf: Add opts-based attach/detach/query API for tcx Daniel Borkmann
2023-07-07 17:24 ` [PATCH bpf-next v3 4/8] libbpf: Add link-based " Daniel Borkmann
2023-07-07 17:24 ` [PATCH bpf-next v3 5/8] libbpf: Add helper macro to clear opts structs Daniel Borkmann
2023-07-07 17:24 ` [PATCH bpf-next v3 6/8] bpftool: Extend net dump with tcx progs Daniel Borkmann
2023-07-07 21:31   ` Stanislav Fomichev [this message]
2023-07-10  6:53     ` Daniel Borkmann
2023-07-07 17:24 ` [PATCH bpf-next v3 7/8] selftests/bpf: Add mprog API tests for BPF tcx opts Daniel Borkmann
2023-07-07 17:24 ` [PATCH bpf-next v3 8/8] selftests/bpf: Add mprog API tests for BPF tcx links Daniel Borkmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZKiENoYiElPyQqrL@google.com \
    --to=sdf@google.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=dxu@dxuuu.xyz \
    --cc=joe@cilium.io \
    --cc=john.fastabend@gmail.com \
    --cc=kuba@kernel.org \
    --cc=martin.lau@linux.dev \
    --cc=netdev@vger.kernel.org \
    --cc=razor@blackwall.org \
    --cc=toke@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.