Răsfoiți Sursa

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 <[email protected]>
Link: https://github.com/openwrt/openwrt/pull/15705
Signed-off-by: Christian Marangi <[email protected]>
Konstantin Demin 1 an în urmă
părinte
comite
f3080677f5

+ 2 - 2
package/network/utils/xdp-tools/Makefile

@@ -2,8 +2,8 @@ include $(TOPDIR)/rules.mk
 
 
 PKG_NAME:=xdp-tools
 PKG_NAME:=xdp-tools
 PKG_RELEASE:=1
 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:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/xdp-project/xdp-tools/tar.gz/v$(PKG_VERSION)?
 PKG_SOURCE_URL:=https://codeload.github.com/xdp-project/xdp-tools/tar.gz/v$(PKG_VERSION)?

+ 6 - 6
package/network/utils/xdp-tools/patches/010-configure-respect-LDFLAGS.patch

@@ -1,6 +1,6 @@
 --- a/configure
 --- a/configure
 +++ b/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;
      return 0;
  }
  }
  EOF
  EOF
@@ -9,16 +9,16 @@
      if [ "$?" -eq "0" ]; then
      if [ "$?" -eq "0" ]; then
          echo "HAVE_PCAP:=y" >>$CONFIG
          echo "HAVE_PCAP:=y" >>$CONFIG
          [ -n "$LIBPCAP_CFLAGS" ] && echo 'CFLAGS += ' $LIBPCAP_CFLAGS >> $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;
      return 0;
  }
  }
  EOF
  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
      if [ "$?" -eq "0" ]; then
          echo "HAVE_FEATURES+=${config_var}" >>"$CONFIG"
          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
  EOF
  
  

+ 3 - 3
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 <[email protected]>
 
 
 --- a/lib/libxdp/protocol.org
 --- a/lib/libxdp/protocol.org
 +++ b/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
  /* The volatile return value prevents the compiler from assuming it knows the
   * return value and optimising based on that.
   * return value and optimising based on that.
   */
   */
@@ -29,7 +29,7 @@ Signed-off-by: Andre Heider <[email protected]>
  
  
 --- a/lib/libxdp/xdp-dispatcher.c.in
 --- a/lib/libxdp/xdp-dispatcher.c.in
 +++ b/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.
   * return value and optimising based on that.
   */
   */
  forloop(`i', `0', NUM_PROGS,
  forloop(`i', `0', NUM_PROGS,
@@ -38,7 +38,7 @@ Signed-off-by: Andre Heider <[email protected]>
  int format(`prog%d', i)(struct xdp_md *ctx) {
  int format(`prog%d', i)(struct xdp_md *ctx) {
          volatile int ret = XDP_DISPATCHER_RETVAL;
          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
  }
  }
  ')
  ')
  
  

+ 1 - 1
package/network/utils/xdp-tools/patches/023-libxdp-fix-compilation-on-multiarch-systems.patch

@@ -19,7 +19,7 @@ Signed-off-by: Andre Heider <[email protected]>
 
 
 --- a/lib/libxdp/Makefile
 --- a/lib/libxdp/Makefile
 +++ b/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
  TEMPLATED_SOURCES := xdp-dispatcher.c
  
  
  CFLAGS += -I$(HEADER_DIR)
  CFLAGS += -I$(HEADER_DIR)

+ 2 - 2
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 <[email protected]>
 
 
 --- a/lib/common.mk
 --- a/lib/common.mk
 +++ b/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 \
  	$(QUIET_CLANG)$(CLANG) -S \
  	    -target $(BPF_TARGET) \
  	    -target $(BPF_TARGET) \
  	    -D __BPF_TRACING__ \
  	    -D __BPF_TRACING__ \
@@ -33,7 +33,7 @@ Signed-off-by: Andre Heider <[email protected]>
  
  
 --- a/lib/libxdp/Makefile
 --- a/lib/libxdp/Makefile
 +++ b/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 \
  	$(QUIET_CLANG)$(CLANG) -S \
  	    -target $(BPF_TARGET) \
  	    -target $(BPF_TARGET) \
  	    -D __BPF_TRACING__ \
  	    -D __BPF_TRACING__ \

+ 4 - 4
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 <[email protected]>
  find_tool()
  find_tool()
 --- a/lib/common.mk
 --- a/lib/common.mk
 +++ b/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 \
  	    -Werror \
  	    $(BPF_CFLAGS) \
  	    $(BPF_CFLAGS) \
  	    -O2 -emit-llvm -c -g -o ${@:.o=.ll} $<
  	    -O2 -emit-llvm -c -g -o ${@:.o=.ll} $<
 -	$(QUIET_LLC)$(LLC) -march=$(BPF_TARGET) -filetype=obj -o $@ ${@:.o=.ll}
 -	$(QUIET_LLC)$(LLC) -march=$(BPF_TARGET) -filetype=obj -o $@ ${@:.o=.ll}
 +	$(QUIET_LLC)$(LLC) $(BPF_LDFLAGS) -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
 --- a/lib/libxdp/Makefile
 +++ b/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 \
  	    -Werror \
  	    $(BPF_CFLAGS) \
  	    $(BPF_CFLAGS) \
  	    -O2 -emit-llvm -c -g -o ${@:.o=.ll} $<
  	    -O2 -emit-llvm -c -g -o ${@:.o=.ll} $<