Re: [v3 PATCH bpf-next 2/4] bpftool: add net attach/detach command to tcx prog

From: Quentin Monnet
Date: Mon Jul 22 2024 - 10:17:14 EST


2024-07-21 22:42 UTC+0800 ~ Tao Chen <chen.dylane@xxxxxxxxx>
> Now, attach/detach tcx prog supported in libbpf, so we can add new
> command 'bpftool attach/detach tcx' to attach tcx prog with bpftool
> for user.
>
> # bpftool prog load tc_prog.bpf.o /sys/fs/bpf/tc_prog
> # bpftool prog show
> ...
> 192: sched_cls name tc_prog tag 187aeb611ad00cfc gpl
> loaded_at 2024-07-11T15:58:16+0800 uid 0
> xlated 152B jited 97B memlock 4096B map_ids 100,99,97
> btf_id 260
> # bpftool net attach tcx_ingress name tc_prog dev lo
> # bpftool net
> ...
> tc:
> lo(1) tcx/ingress tc_prog prog_id 29
>
> # bpftool net detach tcx_ingress dev lo
> # bpftool net
> ...
> tc:
> # bpftool net attach tcx_ingress name tc_prog dev lo
> # bpftool net
> tc:
> lo(1) tcx/ingress tc_prog prog_id 29
>
> Test environment: ubuntu_22_04, 6.7.0-060700-generic
>
> Signed-off-by: Tao Chen <chen.dylane@xxxxxxxxx>

The series looks good from my side, thanks for this work!

Acked-by: Quentin Monnet <qmo@xxxxxxxxxx>