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.


Reply via email to