From: "Daniel T. Lee" <danieltimlee@gmail.com>
To: Daniel Borkmann <daniel@iogearbox.net>,
Alexei Starovoitov <ast@kernel.org>
Cc: netdev@vger.kernel.org
Subject: [v2,0/2] tools: bpftool: add net attach/detach command to attach XDP prog
Date: Thu, 1 Aug 2019 17:11:31 +0900 [thread overview]
Message-ID: <20190801081133.13200-1-danieltimlee@gmail.com> (raw)
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
...
208: xdp name xdp_prog1 tag ad822e38b629553f gpl
loaded_at 2019-07-28T18:03:11+0900 uid 0
...
$ ./bpftool net attach id 208 xdpdrv enp6s0np1
$ ./bpftool net
xdp:
enp6s0np1(5) driver id 208
...
$ ./bpftool net detach xdpdrv enp6s0np1
$ ./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 v2:
- command 'load/unload' changed to 'attach/detach' for the consistency
Daniel T. Lee (2):
tools: bpftool: add net attach command to attach XDP on interface
tools: bpftool: add net detach command to detach XDP on interface
tools/bpf/bpftool/net.c | 160 +++++++++++++++++++++++++++++++++++++++-
1 file changed, 159 insertions(+), 1 deletion(-)
--
2.20.1
next reply other threads:[~2019-08-01 8:11 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-01 8:11 Daniel T. Lee [this message]
2019-08-01 8:11 ` [v2,1/2] tools: bpftool: add net attach command to attach XDP on interface Daniel T. Lee
2019-08-01 23:36 ` Jakub Kicinski
2019-08-02 5:02 ` Daniel T. Lee
2019-08-02 18:39 ` Jakub Kicinski
2019-08-03 9:39 ` Daniel T. Lee
2019-08-04 2:13 ` Jakub Kicinski
2019-08-02 6:23 ` Y Song
2019-08-02 8:49 ` Daniel T. Lee
2019-08-01 8:11 ` [v2,2/2] tools: bpftool: add net detach command to detach " Daniel T. Lee
2019-08-02 6:25 ` Y Song
2019-08-02 8:33 ` Daniel T. Lee
2019-08-01 23:21 ` [v2,0/2] tools: bpftool: add net attach/detach command to attach XDP prog Jakub Kicinski
2019-08-02 5:07 ` Daniel T. Lee
2019-08-02 6:26 ` Y Song
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=20190801081133.13200-1-danieltimlee@gmail.com \
--to=danieltimlee@gmail.com \
--cc=ast@kernel.org \
--cc=daniel@iogearbox.net \
--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).