tools: bpftool: add net attach/detach command to attach XDP prog
Status from this message: Applied. Thanks
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v5 Latest4 patches 3 repliesApplied
- v44 patches 4 repliesSuperseded
- v34 patches 16 repliesSuperseded
Earlier versions · 2
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v2 | 2 patches | 12 replies | Superseded | |
| v1 | 2 patches | 12 replies | Superseded |
Changes in v5 from the cover letter
- fix wrong error message, from errno to err with do_attach/detach
Patches in v5 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | tools: bpftool: add net attach command to attach XDP on interfacetools/ | +129 | 0 replies | |
| 2/4 | tools: bpftool: add net detach command to detach XDP on interfacetools/ | +41 | 0 replies | |
| 3/4 | tools: bpftool: add bash-completion for net attach/detachtools/ | +55 | 0 replies | |
| 4/4 | tools: bpftool: add documentation for net attach/detachtools/ | +54 | 0 replies |
Reviews trailers per patch
2 of 4 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.
| Patch | Yonghong Song | Jakub Kicinski |
|---|---|---|
| Series | R-b | |
| 1/4 | A-b | |
| 2/4 | A-b | |
| 3/4 | ||
| 4/4 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [v5,0/4] tools: bpftool: add net attach/detach command to attach XDP prog
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
Changes in v4:
- rename variable, attach/detach error message enhancement
- bash-completion cleanup, doc update with brief description (attach types)
Changes in v3:
- added 'overwrite' option for replacing previously attached XDP prog
- command argument order has been changed ('ATTACH_TYPE' comes first)
- add 'dev' keyword in front of <devname>
- added bash-completion and documentation
Changes in v2:
- command 'load/unload' changed to 'attach/detach' for the consistency
Daniel T. Lee (4):
tools: bpftool: add net attach command to attach XDP on interface
tools: bpftool: add net detach command to detach XDP on interface
tools: bpftool: add bash-completion for net attach/detach
tools: bpftool: add documentation for net attach/detach
.../bpf/bpftool/Documentation/bpftool-net.rst | 57 +++++- tools/bpf/bpftool/bash-completion/bpftool | 65 ++++++- tools/bpf/bpftool/net.c | 176 +++++++++++++++++- 3 files changed, 278 insertions(+), 20 deletions(-)
Signature · 1 line
2.20.1