Re: [libbpf] Questions about XDP/TC

Toke Høiland-Jørgensen

chenhengqi@... writes:

1. How do I attach `BPF_PROG_TYPE_SCHED_CLS`/`classifier` BPF programs to specific data path(i.e. ingress or egress) using libbpf ?
libbpf does not yet support attaching to TC hooks, but there is work in
progress to add this. See

(an updated version should hopefully show up soon).

I found some comments related in the source:
The **BPF_F_INGRESS** value in *flags* is used to make the distinction (ingress path is selected if the flag is present, egress path otherwise).

How can I get that flag, am I missing something ?

2. How do I attach `XDP` BPF programs using specific mode(i.e.
Just set XDP_FLAGS_SKB_MODE or XDP_FLAGS_DRV_MODE when attaching...


Join to automatically receive all group messages.