libbpf / bpftool

Automated upstream mirror for bpftool stand-alone build.
Other
377 stars 69 forks source link

Attach programs to tcx #124

Closed qmonnet closed 1 month ago

qmonnet commented 9 months ago

For networking programs, we support attaching to XDP (bpftool net attach) but not to tc. This is because attaching to tc would require supporting the creating of tc qdiscs and filters, and eventually recreated a good chunk of tc from iproute2, which is not exactly suitable.

However, we now have tcx programs that should be simpler to attach, and for which we could maybe add support in bpftool (to be confirmed).

chentao-kernel commented 2 months ago

Hi,qmonent, i have implemented a version simeplly for tc and will send it to upstream laster. Some implementations are not confirmed, for example: the tc handle and priority setting etc.

chentao-kernel commented 2 months ago

https://lore.kernel.org/bpf/20240715113704.1279881-1-chen.dylane@gmail.com/T/#t

qmonnet commented 1 month ago

v3 looks good, thanks!

As a side note - I'm not sure what might be the cause, but it seems you're patches aren't threaded "properly" on the mailing list. See on https://lore.kernel.org/bpf/, each of your patch starts a new thread instead of being a reply to the cover-letter. It's probably related to whatever tool you're using to send your patches. (Actually, I'm not sure there's a fixed etiquette on that on the ML, but I thought I'd let you know just in case.)

qmonnet commented 1 month ago

Oh Daniel just merged it, great! Thanks again!

chentao-kernel commented 1 month ago

v3 looks good, thanks!

As a side note - I'm not sure what might be the cause, but it seems you're patches aren't threaded "properly" on the mailing list. See on https://lore.kernel.org/bpf/, each of your patch starts a new thread instead of being a reply to the cover-letter. It's probably related to whatever tool you're using to send your patches. (Actually, I'm not sure there's a fixed etiquette on that on the ML, but I thought I'd let you know just in case.)

Hi qmonnet,thank you for your reminder. Actually, when i sent the patch set the network is bad, only 2 patches sent successly, so i sent the remaining patches separately again. Will this cause the problem you mentioned? the command i used: git format-patch -4 --subject-prefix="v3 PATCH bpf-next" --cover-letter -o test3

git send-email --to "Quentin Monnet qmo@kernel.org" --to "Alexei Starovoitov ast@kernel.org" --to "Daniel Borkmann daniel@iogearbox.net" --to "Andrii Nakryiko andrii@kernel.org" --to "Martin KaFai Lau martin.lau@linux.dev" --cc "Martin KaFai Lau martin.lau@linux.dev" --cc "Eduard Zingerman eddyz87@gmail.com" --cc "Song Liu song@kernel.org" --cc "Yonghong Song yonghong.song@linux.dev" --cc "John Fastabend john.fastabend@gmail.com" --cc "bpf@vger.kernel.org" --cc "linux-kernel@vger.kernel.org" --to "chen.dylane@gmail.com" test3/*.patch

qmonnet commented 1 month ago

This command should work fine, this is pretty much what I'm using, usually. (Note: You have Martin both in --to and --cc)