From dec6a99c7787fa2318f641dcccc45bb9f92e3937 Mon Sep 17 00:00:00 2001 From: Vincent Li Date: Tue, 7 Jan 2025 21:49:15 -0800 Subject: [PATCH] xdp-tools: add xdp-tailcall Loongarch64 does not support bpf trampoline and freplace, so we can't use libxdp to attach multiple XDP program to same network interface. Loongarch64 supports bpf tail call, so we can still use xdp-loader to load XDP program, and use bpf tail call to call each XDP program. now we can tail call DNS and TLS SNI XDP program on green0 interface change user space program to take bpf map path as command line argument so X86 and Loongarch64 can share same user space program https://github.com/vincentmli/xdp-tools commit d18f8a7b48094c861a8ee0d5c0d52e93a01edca4 Author: Vincent Li Date: Tue Jan 7 22:14:40 2025 -0800 xdp-tools: add bpf map path as cmd line argument add XDP DNS and TLS SNI user space program command line argument for bpf map so X86 and Loongarch can share the same XDP user space program commit 5d713b40dd2d0ce399f618179a2add6c07882e2a Author: Vincent Li Date: Mon Jan 6 21:09:25 2025 -0800 xdp-tailcall: add DNS XDP program add DNS XDP program as tail called program commit ad2a4e600140f8bf7a577470566efcdf11f6e214 Author: Vincent Li Date: Mon Jan 6 20:36:43 2025 -0800 xdp-tailcall: add XDP tailcall Loongarch64 does not support bpf trampoline and freplace, so use tail call to call XDP program. Signed-off-by: Vincent Li --- config/rootfiles/common/xdp-tools | 5 +++++ lfs/xdp-tools | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/config/rootfiles/common/xdp-tools b/config/rootfiles/common/xdp-tools index 4fa51b47c..3707f68b3 100644 --- a/config/rootfiles/common/xdp-tools +++ b/config/rootfiles/common/xdp-tools @@ -7,12 +7,17 @@ usr/lib/bpf/xdp_dns.bpf.o usr/lib/bpf/xdp_sni.bpf.o usr/lib/bpf/xdp_geoip.bpf.o usr/lib/bpf/xdp_udpddos.bpf.o +usr/lib/bpf/xdp_tailcall.bpf.o usr/sbin/xdp-udp usr/sbin/xdp_dns +usr/sbin/xdp_tailcall_dns #etc/rc.d/rc3.d/S102xdpdns usr/sbin/xdp_dns_log +usr/sbin/xdp_tailcall_dns_log usr/sbin/xdp_sni +usr/sbin/xdp_tailcall_sni usr/sbin/xdp_sni_log +usr/sbin/xdp_tailcall_sni_log #etc/rc.d/rc3.d/S103xdpsni usr/sbin/xdp_geoip #etc/rc.d/rc3.d/S104xdpgeoip diff --git a/lfs/xdp-tools b/lfs/xdp-tools index 5f6a5d465..14d00f96a 100644 --- a/lfs/xdp-tools +++ b/lfs/xdp-tools @@ -41,7 +41,7 @@ objects = $(DL_FILE) $(DL_FILE) = $(DL_FROM)/$(DL_FILE) -$(DL_FILE)_BLAKE2 = a5fe72d39ecf0a870b386898454fe438e121eb9fde7b721214b9a985ccb4a7f85d1e17eef99e8f426e5d3c0baacb9f147e37cb0eb754188aa1c94ac43aba47c9 +$(DL_FILE)_BLAKE2 = 69cf5ca38bbe3a2fdd5a121a04766dc2b8dcb1c6259409756a83e6cbb927a19def6804d9ef17e6279e66bfd85f4d34e6582be28f54efa6dc12b2864b52dc4437 install : $(TARGET)