DPDK patches and discussions
 help / color / mirror / Atom feed
* TAP device BPF build process broken
@ 2023-07-17 15:30 Stephen Hemminger
  0 siblings, 0 replies; only message in thread
From: Stephen Hemminger @ 2023-07-17 15:30 UTC (permalink / raw)
  To: Bruce Richardson, olivier.matz, ophirmu, shahafs, thomas; +Cc: dev

The current way the BPF code is handled in the TAP driver is a mess.

1. The source is provided with partial instructions in the documentation.
   No script or automated build process. And it should get tested.

2. No longer builds without modification.
   The header file is missing. You have to manually go copy it out of iproute2
   source. Commit ef5baf3486e0 (replace packed attributes, 2020-02-09)
   broke the build step.

3. The source is based on the old legacy model of tc-bpf. The newer libbpf
   based model used BTF and is not compatible.

4. The resulting object file needs to get transformed into an array by
   some awkward steps poorly described in the doc. Go take the source out
   of iproute2 modify and use that is what it says.

5. The algorithm used is incorrect for fragmented packets and uses
   slower version of Toeplitz.

Is there a way to have a make style rule in meson?
I.e if file A.c is newer that file A.o then use this clang invocation to make A.o.

It should be possible to skip the transform to array in source by
linking the ELF object file of the eBPF code into the tap driver and using
dlopen introspection to find it.

Alternatively, the tap driver could use libbpf as a loading mechanism.



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-07-17 15:30 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-17 15:30 TAP device BPF build process broken Stephen Hemminger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).