From: Konstantin Demin Date: Thu, 13 Jun 2024 18:00:31 +0000 (+0300) Subject: xdp-tools: update to v1.4.2 X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=f3080677f506d2670c1911a91c19eec4ace5d085;p=openwrt%2Fstaging%2Fthess.git xdp-tools: update to v1.4.2 - release notes: https://github.com/xdp-project/xdp-tools/releases/tag/v1.4.2 - patches rebased manually: - 010-configure-respect-LDFLAGS.patch Signed-off-by: Konstantin Demin Link: https://github.com/openwrt/openwrt/pull/15705 Signed-off-by: Christian Marangi --- diff --git a/package/network/utils/xdp-tools/Makefile b/package/network/utils/xdp-tools/Makefile index 8a839954e9..4d6ca312f6 100644 --- a/package/network/utils/xdp-tools/Makefile +++ b/package/network/utils/xdp-tools/Makefile @@ -2,8 +2,8 @@ include $(TOPDIR)/rules.mk PKG_NAME:=xdp-tools PKG_RELEASE:=1 -PKG_VERSION:=1.2.9 -PKG_HASH:=159ed8d3c8195d812ec3cde83bd736245a72743af372998320d39c2ba69ab142 +PKG_VERSION:=1.4.2 +PKG_HASH:=49c2b96b2be878449a797a74ca515a63e13418cb8ea904df08f8ef9cb2ac5570 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://codeload.github.com/xdp-project/xdp-tools/tar.gz/v$(PKG_VERSION)? diff --git a/package/network/utils/xdp-tools/patches/010-configure-respect-LDFLAGS.patch b/package/network/utils/xdp-tools/patches/010-configure-respect-LDFLAGS.patch index e2fbfa57dc..512ef09c7e 100644 --- a/package/network/utils/xdp-tools/patches/010-configure-respect-LDFLAGS.patch +++ b/package/network/utils/xdp-tools/patches/010-configure-respect-LDFLAGS.patch @@ -1,6 +1,6 @@ --- a/configure +++ b/configure -@@ -174,7 +174,7 @@ int main(int argc, char **argv) { +@@ -191,7 +191,7 @@ int main(int argc, char **argv) { return 0; } EOF @@ -9,16 +9,16 @@ if [ "$?" -eq "0" ]; then echo "HAVE_PCAP:=y" >>$CONFIG [ -n "$LIBPCAP_CFLAGS" ] && echo 'CFLAGS += ' $LIBPCAP_CFLAGS >> $CONFIG -@@ -222,7 +222,7 @@ int main(int argc, char **argv) { +@@ -267,7 +267,7 @@ int main(int argc, char **argv) { return 0; } EOF -- libbpf_err=$($CC -o $TMPDIR/libbpftest $TMPDIR/libbpftest.c -Werror $LIBBPF_CFLAGS $LIBBPF_LDLIBS 2>&1) -+ libbpf_err=$($CC -o $TMPDIR/libbpftest $TMPDIR/libbpftest.c -Werror $LIBBPF_CFLAGS $LIBBPF_LDLIBS $LDFLAGS 2>&1) +- compile_cmd="$CC -o $TMPDIR/libbpftest $TMPDIR/libbpftest.c -Werror $LIBBPF_CFLAGS $LIBBPF_LDLIBS" ++ compile_cmd="$CC -o $TMPDIR/libbpftest $TMPDIR/libbpftest.c -Werror $LIBBPF_CFLAGS $LIBBPF_LDLIBS $LDFLAGS" + libbpf_err=$($compile_cmd 2>&1) if [ "$?" -eq "0" ]; then echo "HAVE_FEATURES+=${config_var}" >>"$CONFIG" - echo "yes" -@@ -289,7 +289,7 @@ int main(int argc, char **argv) { +@@ -345,7 +345,7 @@ int main(int argc, char **argv) { } EOF diff --git a/package/network/utils/xdp-tools/patches/020-libxdp-Use-__noinline__-reserved-attribute-for-XDP-d.patch b/package/network/utils/xdp-tools/patches/020-libxdp-Use-__noinline__-reserved-attribute-for-XDP-d.patch index 1a157df32c..bd6c0786b7 100644 --- a/package/network/utils/xdp-tools/patches/020-libxdp-Use-__noinline__-reserved-attribute-for-XDP-d.patch +++ b/package/network/utils/xdp-tools/patches/020-libxdp-Use-__noinline__-reserved-attribute-for-XDP-d.patch @@ -18,7 +18,7 @@ Signed-off-by: Andre Heider --- a/lib/libxdp/protocol.org +++ b/lib/libxdp/protocol.org -@@ -54,7 +54,7 @@ static volatile const struct xdp_dispatc +@@ -59,7 +59,7 @@ static volatile const struct xdp_dispatc /* The volatile return value prevents the compiler from assuming it knows the * return value and optimising based on that. */ @@ -29,7 +29,7 @@ Signed-off-by: Andre Heider --- a/lib/libxdp/xdp-dispatcher.c.in +++ b/lib/libxdp/xdp-dispatcher.c.in -@@ -30,7 +30,7 @@ static volatile const struct xdp_dispatc +@@ -29,7 +29,7 @@ static volatile const struct xdp_dispatc * return value and optimising based on that. */ forloop(`i', `0', NUM_PROGS, @@ -38,7 +38,7 @@ Signed-off-by: Andre Heider int format(`prog%d', i)(struct xdp_md *ctx) { volatile int ret = XDP_DISPATCHER_RETVAL; -@@ -40,7 +40,7 @@ int format(`prog%d', i)(struct xdp_md *c +@@ -39,7 +39,7 @@ int format(`prog%d', i)(struct xdp_md *c } ') diff --git a/package/network/utils/xdp-tools/patches/023-libxdp-fix-compilation-on-multiarch-systems.patch b/package/network/utils/xdp-tools/patches/023-libxdp-fix-compilation-on-multiarch-systems.patch index cc60ebf611..89276fca89 100644 --- a/package/network/utils/xdp-tools/patches/023-libxdp-fix-compilation-on-multiarch-systems.patch +++ b/package/network/utils/xdp-tools/patches/023-libxdp-fix-compilation-on-multiarch-systems.patch @@ -19,7 +19,7 @@ Signed-off-by: Andre Heider --- a/lib/libxdp/Makefile +++ b/lib/libxdp/Makefile -@@ -30,7 +30,7 @@ PC_FILE := $(OBJDIR)/libxdp.pc +@@ -28,7 +28,7 @@ PC_FILE := $(OBJDIR)/libxdp.pc TEMPLATED_SOURCES := xdp-dispatcher.c CFLAGS += -I$(HEADER_DIR) diff --git a/package/network/utils/xdp-tools/patches/024-lib-allow-overwriting-W-flags-via-BPF_CFLAGS.patch b/package/network/utils/xdp-tools/patches/024-lib-allow-overwriting-W-flags-via-BPF_CFLAGS.patch index 16835eae37..2b47dd4c54 100644 --- a/package/network/utils/xdp-tools/patches/024-lib-allow-overwriting-W-flags-via-BPF_CFLAGS.patch +++ b/package/network/utils/xdp-tools/patches/024-lib-allow-overwriting-W-flags-via-BPF_CFLAGS.patch @@ -17,7 +17,7 @@ Signed-off-by: Andre Heider --- a/lib/common.mk +++ b/lib/common.mk -@@ -108,12 +108,12 @@ $(XDP_OBJ): %.o: %.c $(KERN_USER_H) $(EX +@@ -111,12 +111,12 @@ $(XDP_OBJ): %.o: %.c $(KERN_USER_H) $(EX $(QUIET_CLANG)$(CLANG) -S \ -target $(BPF_TARGET) \ -D __BPF_TRACING__ \ @@ -33,7 +33,7 @@ Signed-off-by: Andre Heider --- a/lib/libxdp/Makefile +++ b/lib/libxdp/Makefile -@@ -139,12 +139,12 @@ $(XDP_OBJS): %.o: %.c $(BPF_HEADERS) $(L +@@ -138,12 +138,12 @@ $(XDP_OBJS): %.o: %.c $(BPF_HEADERS) $(L $(QUIET_CLANG)$(CLANG) -S \ -target $(BPF_TARGET) \ -D __BPF_TRACING__ \ diff --git a/package/network/utils/xdp-tools/patches/025-Add-BPF_LDFLAGS-to-allow-overwriting-llc-s-march-arg.patch b/package/network/utils/xdp-tools/patches/025-Add-BPF_LDFLAGS-to-allow-overwriting-llc-s-march-arg.patch index d375e1db0c..d6d592b259 100644 --- a/package/network/utils/xdp-tools/patches/025-Add-BPF_LDFLAGS-to-allow-overwriting-llc-s-march-arg.patch +++ b/package/network/utils/xdp-tools/patches/025-Add-BPF_LDFLAGS-to-allow-overwriting-llc-s-march-arg.patch @@ -33,18 +33,18 @@ Signed-off-by: Andre Heider find_tool() --- a/lib/common.mk +++ b/lib/common.mk -@@ -115,7 +115,7 @@ $(XDP_OBJ): %.o: %.c $(KERN_USER_H) $(EX +@@ -118,7 +118,7 @@ $(XDP_OBJ): %.o: %.c $(KERN_USER_H) $(EX -Werror \ $(BPF_CFLAGS) \ -O2 -emit-llvm -c -g -o ${@:.o=.ll} $< - $(QUIET_LLC)$(LLC) -march=$(BPF_TARGET) -filetype=obj -o $@ ${@:.o=.ll} + $(QUIET_LLC)$(LLC) $(BPF_LDFLAGS) -filetype=obj -o $@ ${@:.o=.ll} - .PHONY: man - ifeq ($(EMACS),) + $(BPF_SKEL_H): %.skel.h: %.bpf.o + $(QUIET_GEN)$(BPFTOOL) gen skeleton $< name ${@:.skel.h=} > $@ --- a/lib/libxdp/Makefile +++ b/lib/libxdp/Makefile -@@ -146,7 +146,7 @@ $(XDP_OBJS): %.o: %.c $(BPF_HEADERS) $(L +@@ -145,7 +145,7 @@ $(XDP_OBJS): %.o: %.c $(BPF_HEADERS) $(L -Werror \ $(BPF_CFLAGS) \ -O2 -emit-llvm -c -g -o ${@:.o=.ll} $<