From: Jakub Kicinski <jakub.kicinski@netronome.com>
To: "Daniel T. Lee" <danieltimlee@gmail.com>
Cc: Daniel Borkmann <daniel@iogearbox.net>,
Alexei Starovoitov <ast@kernel.org>,
netdev@vger.kernel.org
Subject: Re: [v5,0/4] tools: bpftool: add net attach/detach command to attach XDP prog
Date: Tue, 13 Aug 2019 14:43:03 -0700 [thread overview]
Message-ID: <20190813144303.10da8ff0@cakuba.netronome.com> (raw)
In-Reply-To: <20190813024621.29886-1-danieltimlee@gmail.com>
On Tue, 13 Aug 2019 11:46:17 +0900, Daniel T. Lee wrote:
> Currently, bpftool net only supports dumping progs attached on the
> interface. To attach XDP prog on interface, user must use other tool
> (eg. iproute2). By this patch, with `bpftool net attach/detach`, user
> can attach/detach XDP prog on interface.
>
> # bpftool prog
> 16: xdp name xdp_prog1 tag 539ec6ce11b52f98 gpl
> loaded_at 2019-08-07T08:30:17+0900 uid 0
> ...
> 20: xdp name xdp_fwd_prog tag b9cb69f121e4a274 gpl
> loaded_at 2019-08-07T08:30:17+0900 uid 0
>
> # bpftool net attach xdpdrv id 16 dev enp6s0np0
> # bpftool net
> xdp:
> enp6s0np0(4) driver id 16
>
> # bpftool net attach xdpdrv id 20 dev enp6s0np0 overwrite
> # bpftool net
> xdp:
> enp6s0np0(4) driver id 20
>
> # bpftool net detach xdpdrv dev enp6s0np0
> # bpftool net
> xdp:
>
>
> While this patch only contains support for XDP, through `net
> attach/detach`, bpftool can further support other prog attach types.
>
> XDP attach/detach tested on Mellanox ConnectX-4 and Netronome Agilio.
>
> ---
> Changes in v5:
> - fix wrong error message, from errno to err with do_attach/detach
The inconsistency in libbpf's error reporting is generally troubling,
but a problem of this set, so:
Reviewed-by: Jakub Kicinski <jakub.kicinski@netronome.com>
In the future please keep review tags if you have only made minor
changes to the code.
next prev parent reply other threads:[~2019-08-13 21:43 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-13 2:46 [v5,0/4] tools: bpftool: add net attach/detach command to attach XDP prog Daniel T. Lee
2019-08-13 2:46 ` [v5,1/4] tools: bpftool: add net attach command to attach XDP on interface Daniel T. Lee
2019-08-13 2:46 ` [v5,2/4] tools: bpftool: add net detach command to detach " Daniel T. Lee
2019-08-13 2:46 ` [v5,3/4] tools: bpftool: add bash-completion for net attach/detach Daniel T. Lee
2019-08-13 2:46 ` [v5,4/4] tools: bpftool: add documentation " Daniel T. Lee
2019-08-13 21:43 ` Jakub Kicinski [this message]
2019-08-14 8:25 ` [v5,0/4] tools: bpftool: add net attach/detach command to attach XDP prog Daniel T. Lee
2019-08-16 0:02 ` Alexei Starovoitov
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=20190813144303.10da8ff0@cakuba.netronome.com \
--to=jakub.kicinski@netronome.com \
--cc=ast@kernel.org \
--cc=daniel@iogearbox.net \
--cc=danieltimlee@gmail.com \
--cc=netdev@vger.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).