The first patch fixes the build of the XDP forwarder and ensures it does not include any libc headers. The second patch is a significant cleanup and also should improve performance a tiny amount. Signed-off-by: Demi Marie Obenour <demiobenour@gmail.com> --- Changes in v4: - Use find_program instead of passing clang path as Meson option. - Use path to Linux kernel package instead of path to include directory. - Split the patch into two parts: a minimal one that just fixes the build, and a bigger one that refactors the BPF programs. - Link to v3: https://spectrum-os.org/lists/archives/spectrum-devel/20251008-fix-forwarder... Changes in v3: - Fix build. - Clean up XDP programs. - Link to v2: https://spectrum-os.org/lists/archives/spectrum-devel/20251006-fix-forwarder... Changes in v2: - Rewrite the programs to not use the helpers. - This doesn't build. Link to v1: https://spectrum-os.org/lists/archives/spectrum-devel/20251003-fix-forwarder... --- Demi Marie Obenour (2): tools/xdp-forwarder: Do not include libc headers in eBPF programs tools/xdp-forwarder: Simplify forwarder programs tools/default.nix | 11 +- tools/meson.options | 4 + tools/xdp-forwarder/helpers.h | 54 +++++++ tools/xdp-forwarder/meson.build | 11 +- tools/xdp-forwarder/parsing_helpers.h | 274 ---------------------------------- tools/xdp-forwarder/prog_physical.c | 52 ++++--- tools/xdp-forwarder/prog_router.c | 48 ++++-- tools/xdp-forwarder/rewrite_helpers.h | 146 ------------------ 8 files changed, 138 insertions(+), 462 deletions(-) --- base-commit: c5d5786d3dc938af0b279c542d1e43bce381b4b9 change-id: 20251003-fix-forwarder-build-2889ea9aec91 -- Sincerely, Demi Marie Obenour (she/her/hers)