mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00
bpftool: Add document for net attach/detach on tcx subcommand
This commit adds sample output for net attach/detach on tcx subcommand. Signed-off-by: Tao Chen <chen.dylane@gmail.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Acked-by: Quentin Monnet <qmo@kernel.org> Link: https://lore.kernel.org/bpf/20240721144252.96264-1-chen.dylane@gmail.com Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
This commit is contained in:
parent
4f88dde0e1
commit
0d7c06125c
1 changed files with 21 additions and 1 deletions
|
@ -29,7 +29,7 @@ NET COMMANDS
|
||||||
| **bpftool** **net help**
|
| **bpftool** **net help**
|
||||||
|
|
|
|
||||||
| *PROG* := { **id** *PROG_ID* | **pinned** *FILE* | **tag** *PROG_TAG* | **name** *PROG_NAME* }
|
| *PROG* := { **id** *PROG_ID* | **pinned** *FILE* | **tag** *PROG_TAG* | **name** *PROG_NAME* }
|
||||||
| *ATTACH_TYPE* := { **xdp** | **xdpgeneric** | **xdpdrv** | **xdpoffload** }
|
| *ATTACH_TYPE* := { **xdp** | **xdpgeneric** | **xdpdrv** | **xdpoffload** | **tcx_ingress** | **tcx_egress** }
|
||||||
|
|
||||||
DESCRIPTION
|
DESCRIPTION
|
||||||
===========
|
===========
|
||||||
|
@ -69,6 +69,8 @@ bpftool net attach *ATTACH_TYPE* *PROG* dev *NAME* [ overwrite ]
|
||||||
**xdpgeneric** - Generic XDP. runs at generic XDP hook when packet already enters receive path as skb;
|
**xdpgeneric** - Generic XDP. runs at generic XDP hook when packet already enters receive path as skb;
|
||||||
**xdpdrv** - Native XDP. runs earliest point in driver's receive path;
|
**xdpdrv** - Native XDP. runs earliest point in driver's receive path;
|
||||||
**xdpoffload** - Offload XDP. runs directly on NIC on each packet reception;
|
**xdpoffload** - Offload XDP. runs directly on NIC on each packet reception;
|
||||||
|
**tcx_ingress** - Ingress TCX. runs on ingress net traffic;
|
||||||
|
**tcx_egress** - Egress TCX. runs on egress net traffic;
|
||||||
|
|
||||||
bpftool net detach *ATTACH_TYPE* dev *NAME*
|
bpftool net detach *ATTACH_TYPE* dev *NAME*
|
||||||
Detach bpf program attached to network interface *NAME* with type specified
|
Detach bpf program attached to network interface *NAME* with type specified
|
||||||
|
@ -178,3 +180,21 @@ EXAMPLES
|
||||||
::
|
::
|
||||||
|
|
||||||
xdp:
|
xdp:
|
||||||
|
|
||||||
|
|
|
||||||
|
| **# bpftool net attach tcx_ingress name tc_prog dev lo**
|
||||||
|
| **# bpftool net**
|
||||||
|
|
|
||||||
|
|
||||||
|
::
|
||||||
|
tc:
|
||||||
|
lo(1) tcx/ingress tc_prog prog_id 29
|
||||||
|
|
||||||
|
|
|
||||||
|
| **# bpftool net attach tcx_ingress name tc_prog dev lo**
|
||||||
|
| **# bpftool net detach tcx_ingress dev lo**
|
||||||
|
| **# bpftool net**
|
||||||
|
|
|
||||||
|
|
||||||
|
::
|
||||||
|
tc:
|
||||||
|
|
Loading…
Add table
Reference in a new issue