Skip to content

Commit 0d7c061

Browse files
chentao-kernelanakryiko
authored andcommitted
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 <[email protected]> Signed-off-by: Daniel Borkmann <[email protected]> Acked-by: Quentin Monnet <[email protected]> Link: https://lore.kernel.org/bpf/[email protected] Signed-off-by: Andrii Nakryiko <[email protected]>
1 parent 4f88dde commit 0d7c061

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

tools/bpf/bpftool/Documentation/bpftool-net.rst

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ NET COMMANDS
2929
| **bpftool** **net help**
3030
|
3131
| *PROG* := { **id** *PROG_ID* | **pinned** *FILE* | **tag** *PROG_TAG* | **name** *PROG_NAME* }
32-
| *ATTACH_TYPE* := { **xdp** | **xdpgeneric** | **xdpdrv** | **xdpoffload** }
32+
| *ATTACH_TYPE* := { **xdp** | **xdpgeneric** | **xdpdrv** | **xdpoffload** | **tcx_ingress** | **tcx_egress** }
3333
3434
DESCRIPTION
3535
===========
@@ -69,6 +69,8 @@ bpftool net attach *ATTACH_TYPE* *PROG* dev *NAME* [ overwrite ]
6969
**xdpgeneric** - Generic XDP. runs at generic XDP hook when packet already enters receive path as skb;
7070
**xdpdrv** - Native XDP. runs earliest point in driver's receive path;
7171
**xdpoffload** - Offload XDP. runs directly on NIC on each packet reception;
72+
**tcx_ingress** - Ingress TCX. runs on ingress net traffic;
73+
**tcx_egress** - Egress TCX. runs on egress net traffic;
7274

7375
bpftool net detach *ATTACH_TYPE* dev *NAME*
7476
Detach bpf program attached to network interface *NAME* with type specified
@@ -178,3 +180,21 @@ EXAMPLES
178180
::
179181

180182
xdp:
183+
184+
|
185+
| **# bpftool net attach tcx_ingress name tc_prog dev lo**
186+
| **# bpftool net**
187+
|
188+
189+
::
190+
tc:
191+
lo(1) tcx/ingress tc_prog prog_id 29
192+
193+
|
194+
| **# bpftool net attach tcx_ingress name tc_prog dev lo**
195+
| **# bpftool net detach tcx_ingress dev lo**
196+
| **# bpftool net**
197+
|
198+
199+
::
200+
tc:

0 commit comments

Comments
 (0)