diff --git a/.dockerignore b/.dockerignore index 0605e70..64ad55b 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,7 +1,10 @@ .github .gitlab-ci.yml +.git Dockerfile +.dockerignore .vscode .idea README.md CODEOWNERS + diff --git a/Dockerfile b/Dockerfile index c2a2c08..183d9f4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,66 +1,74 @@ # syntax = docker/dockerfile:experimental -FROM ubuntu:20.04 AS build-base-stage +FROM ubuntu:22.04 AS build-base-stage WORKDIR / -ENV BUILDKIT_VERSION "v0.8.2" -ENV BUILDCTL_SHA256 "b64aec46fb438ea844616b3205c33b01a3a49ea7de1f8539abd0daeb4f07b9f9" -ENV INDENT_SHA256 "12185be748db620f8f7799ea839f0d10ce643b9f5ab1805c960e56eb27941236" -ENV LIBC_SHA256 "9a8caf9f33448a8f2f526e94d00c70cdbdd735caec510df57b3283413df7882a" -# Go version in ppa:longsleep/golang-backports -ENV GO_PACKAGE "golang-1.22-go" - -COPY vpp/Makefile /vpp-src/Makefile -COPY vpp/build/external /vpp-src/build/external - -RUN echo "wireshark-common wireshark-common/install-setuid boolean true" | debconf-set-selections - -# netbase is needed for Scapy RUN --mount=target=/var/lib/apt/lists,type=cache,sharing=private \ --mount=target=/var/cache/apt,type=cache,sharing=private \ + echo "wireshark-common wireshark-common/install-setuid boolean true" | debconf-set-selections && \ + echo "debconf debconf/frontend select Noninteractive" | debconf-set-selections && \ apt-get update && \ + apt-get install -y software-properties-common && \ apt-get dist-upgrade -yy && \ - apt-get install -y software-properties-common ccache && \ + # add reporistory for newer golang releases add-apt-repository ppa:longsleep/golang-backports && \ apt-get update && \ - DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ - build-essential sudo git netbase curl ca-certificates \ - ${GO_PACKAGE} iproute2 gdb tcpdump iputils-ping libpcap-dev \ - dumb-init gdbserver clang-11 && \ - curl -sSL "https://github.com/moby/buildkit/releases/download/${BUILDKIT_VERSION}/buildkit-${BUILDKIT_VERSION}.linux-amd64.tar.gz" | \ - tar -xvz -C /usr/local bin/buildctl && \ - echo "${BUILDCTL_SHA256} /usr/local/bin/buildctl" | sha256sum -c && \ + apt-get install -y --no-install-recommends \ + software-properties-common build-essential sudo git \ + # netbase is needed for Scapy + netbase curl ca-certificates iproute2 gdb tcpdump iputils-ping \ + # use ccache for clang object files caching + ccache libpcap-dev dumb-init gdbserver \ + # golang installed from ppa + golang-1.24-go \ + # clang also installed in vpp Makefile, make sure to match versions + clang \ + # llvm provides llc for xdp-tools build + llvm \ + # gnu linker is used, add missing c++ library + g++-12 \ + && \ + ln -s /usr/lib/go-1.24/bin/go /usr/bin/go && \ + ln -s /usr/lib/go-1.24/bin/gofmt /usr/bin/gofmt && \ + # set clang as default C and C++ compiler + update-alternatives --set c++ /usr/bin/clang++ && \ + update-alternatives --set cc /usr/bin/clang &&\ + apt-get clean + +# configure ccache, but do not provide it in path +# each RUN should provide it separately +ENV CCACHE_DIR=/ccache \ + CCACHE_MAXSIZE=600M \ + CCACHE_COMPRESS=true \ + CCACHE_COMPRESSLEVEL=6 \ + GOPATH=/go + +# golang uses ccache as well +RUN --mount=target=/ccache,type=cache \ + PATH="/usr/lib/ccache:$PATH" && \ + go install github.com/onsi/ginkgo/ginkgo@v1.16.5 && \ + mv /go/bin/ginkgo /usr/local/bin && \ + go install golang.org/x/tools/gopls@v0.11.0 && \ + mv /go/bin/gopls /usr/local/bin + +COPY vpp/Makefile /vpp-src/Makefile +COPY vpp/build/external /vpp-src/build/external + +RUN --mount=target=/var/lib/apt/lists,type=cache,sharing=private \ + --mount=target=/var/cache/apt,type=cache,sharing=private \ + --mount=target=/ccache,type=cache \ + PATH="/usr/lib/ccache:$PATH" && \ cd /vpp-src && \ - curl -sSL -O http://mirrors.kernel.org/ubuntu/pool/main/i/indent/indent_2.2.12-1_amd64.deb && \ - echo "${INDENT_SHA256} /vpp-src/indent_2.2.12-1_amd64.deb" | sha256sum -c && \ - apt-get install -y --no-install-recommends \ - /vpp-src/indent_2.2.12-1_amd64.deb && \ - rm /vpp-src/indent_2.2.12-1_amd64.deb && \ git config --global user.email "dummy@example.com" && \ git config --global user.name "dummy user" && \ git init && \ git add Makefile && \ git commit -m "dummy commit" && \ - git tag -a v20.05-rc0 -m "dummy tag" && \ + # version requred to have this format + git tag -a v24.02-rc0 -m "dummy tag" && \ make UNATTENDED=yes install-dep install-ext-dep && \ - apt-get clean && \ rm -rf /vpp-src && \ - ln -s /usr/lib/go-1.22/bin/go /usr/bin/go && \ - ln -s /usr/lib/go-1.22/bin/gofmt /usr/bin/gofmt - -ENV PATH="/usr/lib/ccache:$PATH" -ENV CCACHE_DIR=/ccache -ENV CCACHE_MAXSIZE=400M -ENV CCACHE_COMPRESS=true -ENV CCACHE_COMPRESSLEVEL=6 - -ENV GOPATH /go - -RUN go install github.com/onsi/ginkgo/ginkgo@v1.16.5 && \ - mv /go/bin/ginkgo /usr/local/bin - -RUN go install golang.org/x/tools/gopls@v0.11.0 && \ - mv /go/bin/gopls /usr/local/bin + apt-get clean FROM build-base-stage AS build-stage @@ -69,14 +77,22 @@ ADD vpp /vpp-src # starting from this point, the debug and release buffers differ ARG BUILD_TYPE -RUN --mount=target=/vpp-src/build-root/.ccache,type=cache \ - --mount=target=/ccache,type=cache \ +RUN --mount=target=/ccache,type=cache \ + PATH="/usr/lib/ccache:$PATH" && \ case ${BUILD_TYPE} in \ - debug) target="pkg-deb-debug"; args="-DVPP_ENABLE_TRAJECTORY_TRACE=1";; \ - release) target="pkg-deb"; args="";; \ - *) echo >&2 "Bad BUILD_TYPE: ${BUILD_TYPE}";; \ + debug) \ + target="pkg-deb-debug"; \ + args="-DVPP_ENABLE_TRAJECTORY_TRACE=1"; \ + ;; \ + release) \ + target="pkg-deb"; \ + args=""; \ + ;; \ + *) \ + echo >&2 "Bad BUILD_TYPE: ${BUILD_TYPE}"; \ + ;; \ esac; \ - echo "TARGET: ${target}" && \ + echo "Building target: ${target} with flags ${args}" && \ make -C /vpp-src "${target}" V=1 VPP_EXTRA_CMAKE_ARGS="${args}" && \ ccache -s && \ mkdir -p /out/debs && \ @@ -89,32 +105,33 @@ COPY --from=build-stage /out/debs . # dev image starts here FROM build-base-stage AS dev-stage +ARG BUILD_TYPE RUN --mount=target=/var/lib/apt/lists,type=cache,sharing=private \ --mount=target=/var/cache/apt,type=cache,sharing=private \ --mount=target=/debs,source=/out/debs,from=build-stage,type=bind \ apt-get install --no-install-recommends -yy \ - /debs/vpp_*.deb \ - /debs/vpp-dbg_*.deb \ - /debs/vpp-plugin-core_*.deb \ - /debs/vpp-plugin-devtools_*.deb \ - /debs/vpp-plugin-dpdk*.deb \ - /debs/libvppinfra_*.deb \ - /debs/python3-vpp-api_*.deb \ - /debs/vpp-dev_*.deb \ - /debs/libvppinfra-dev_*.deb && \ + /debs/vpp_*.deb \ + /debs/vpp-dbg_*.deb \ + /debs/vpp-plugin-core_*.deb \ + /debs/vpp-plugin-devtools_*.deb \ + /debs/vpp-plugin-dpdk*.deb \ + /debs/libvppinfra_*.deb \ + /debs/python3-vpp-api_*.deb \ + /debs/vpp-dev_*.deb \ + /debs/libvppinfra-dev_*.deb && \ apt-get clean # use clean vpp source so as not to make the image too bloated ADD vpp /vpp-src # provide symlinks needed for running the Pythonic integration tests RUN mkdir -p /vpp-src/build-root/build-test/src && \ - ln -fs /vpp-src/test/* /vpp-src/build-root/build-test/src/ -# fix git repo ownership issue -RUN git config --global --add safe.directory /src + ln -fs /vpp-src/test/* /vpp-src/build-root/build-test/src/ && \ + # fix git repo ownership issue + git config --global --add safe.directory /src # final image starts here -FROM ubuntu:20.04 AS final-stage +FROM ubuntu:22.04 AS final-stage ARG BUILD_TYPE WORKDIR / @@ -122,29 +139,30 @@ ENV VPP_INSTALL_SKIP_SYSCTL=1 RUN --mount=target=/var/lib/apt/lists,type=cache,sharing=private \ --mount=target=/var/cache/apt,type=cache,sharing=private \ apt-get update && apt-get dist-upgrade -yy && \ - apt-get install --no-install-recommends -yy liblz4-tool tar gdb gdbserver strace \ - libhyperscan5 libmbedcrypto3 libmbedtls12 libmbedx509-0 apt-utils \ - libpython3-stdlib \ - python3 python3-minimal python3.6 python3-minimal \ - python3-cffi python3-cffi-backend libnuma1 \ - libnl-3-200 libnl-route-3-200 libpcap0.8 + apt-get install --no-install-recommends -yy \ + liblz4-tool tar gdb gdbserver strace apt-utils \ + libhyperscan5 libmbedcrypto7 libmbedtls-dev libmbedx509-1 \ + python3 python3-minimal libpython3-stdlib \ + python3-cffi python3-cffi-backend libnuma1 \ + libnl-3-200 libnl-route-3-200 libpcap0.8 RUN --mount=target=/var/lib/apt/lists,type=cache,sharing=private \ --mount=target=/var/cache/apt,type=cache,sharing=private \ --mount=target=/debs,source=/out/debs,from=build-stage,type=bind \ extra_debs=; \ if [ "${BUILD_TYPE}" = "debug" ]; then \ - extra_debs="/debs/vpp-dev_*.deb /debs/libvppinfra-dev_*.deb"; \ + extra_debs="${extra_debs} /debs/vpp-dev_*.deb"; \ + extra_debs="${extra_debs} /debs/libvppinfra-dev_*.deb"; \ fi && \ apt-get install --no-install-recommends -yy \ - /debs/vpp_*.deb \ - /debs/vpp-dbg_*.deb \ - /debs/vpp-plugin-core_*.deb \ - /debs/vpp-plugin-devtools_*.deb \ - /debs/vpp-plugin-dpdk*.deb \ - /debs/libvppinfra_*.deb \ - /debs/python3-vpp-api_*.deb \ - ${extra_debs} && \ + /debs/vpp_*.deb \ + /debs/vpp-dbg_*.deb \ + /debs/vpp-plugin-core_*.deb \ + /debs/vpp-plugin-devtools_*.deb \ + /debs/vpp-plugin-dpdk*.deb \ + /debs/libvppinfra_*.deb \ + /debs/python3-vpp-api_*.deb \ + ${extra_debs} && \ apt-get clean ENTRYPOINT /usr/bin/vpp diff --git a/vpp-patches/0031-fix-ASAN-stack-size-calculation.patch b/vpp-patches/0031-fix-ASAN-stack-size-calculation.patch new file mode 100644 index 0000000..cf1bde5 --- /dev/null +++ b/vpp-patches/0031-fix-ASAN-stack-size-calculation.patch @@ -0,0 +1,25 @@ +From 44e584a2004c4196f9f2eac3cb3f11fd696fa982 Mon Sep 17 00:00:00 2001 +From: Vladimir Zhigulin +Date: Mon, 6 Jan 2025 01:13:34 +0100 +Subject: [PATCH] fix: ASAN stack size calculation + +--- + src/vlib/node_funcs.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/vlib/node_funcs.h b/src/vlib/node_funcs.h +index 1beac33cf..f20396f52 100644 +--- a/src/vlib/node_funcs.h ++++ b/src/vlib/node_funcs.h +@@ -60,7 +60,7 @@ vlib_process_start_switch_stack (vlib_main_t * vm, vlib_process_t * p) + #ifdef CLIB_SANITIZE_ADDR + void *stack = p ? (void *) p->stack : vlib_thread_stacks[vm->thread_index]; + u32 stack_bytes = +- p ? (1ULL < p->log2_n_stack_bytes) : VLIB_THREAD_STACK_SIZE; ++ p ? (1ULL << p->log2_n_stack_bytes) : VLIB_THREAD_STACK_SIZE; + __sanitizer_start_switch_fiber (&vm->asan_stack_save, stack, stack_bytes); + #endif + } +-- +2.47.1 + diff --git a/vpp-patches/0032-bump-xdp-tools-to-1.5.5.patch b/vpp-patches/0032-bump-xdp-tools-to-1.5.5.patch new file mode 100644 index 0000000..c44b9ab --- /dev/null +++ b/vpp-patches/0032-bump-xdp-tools-to-1.5.5.patch @@ -0,0 +1,241 @@ +From cd899f8f3a9967e5e046ff16a0bf20dc8605ad63 Mon Sep 17 00:00:00 2001 +From: Vladimir Zhigulin +Date: Thu, 31 Jul 2025 10:51:38 +0200 +Subject: [PATCH] bump xdp-tools to 1.5.5 + +--- + build/external/packages/xdp-tools.mk | 4 +- + ...ibxdp-add-fPIC-with-static-lib-build.patch | 26 --------- + ...fix-asm-types.h-file-not-found-issue.patch | 32 ----------- + ...0004-Fix-transposed-calloc-arguments.patch | 54 ------------------- + ...ibxdp-add-fPIC-with-static-lib-build.patch | 26 +++++++++ + ...aybe-uninitialized-compiler-warning.patch} | 14 ++--- + 6 files changed, 35 insertions(+), 121 deletions(-) + delete mode 100644 build/external/patches/xdp-tools_1.2.9/0001-libxdp-add-fPIC-with-static-lib-build.patch + delete mode 100644 build/external/patches/xdp-tools_1.2.9/0002-libxdp-fix-asm-types.h-file-not-found-issue.patch + delete mode 100644 build/external/patches/xdp-tools_1.2.9/0004-Fix-transposed-calloc-arguments.patch + create mode 100644 build/external/patches/xdp-tools_1.5.5/0001-libxdp-add-fPIC-with-static-lib-build.patch + rename build/external/patches/{xdp-tools_1.2.9/0003-libxdp-fix-maybe-uninitialized-compiler-warning.patch => xdp-tools_1.5.5/0002-libxdp-fix-maybe-uninitialized-compiler-warning.patch} (71%) + +diff --git a/build/external/packages/xdp-tools.mk b/build/external/packages/xdp-tools.mk +index b65ae1361..3745f9030 100644 +--- a/build/external/packages/xdp-tools.mk ++++ b/build/external/packages/xdp-tools.mk +@@ -12,9 +12,9 @@ + # See the License for the specific language governing permissions and + # limitations under the License. + +-xdp-tools_version := 1.2.9 ++xdp-tools_version := 1.5.5 + xdp-tools_tarball := xdp-tools-$(xdp-tools_version).tar.gz +-xdp-tools_tarball_md5sum_1.2.9:= 6e4a49ceea8354bb7bb3b55990e9aed7 ++xdp-tools_tarball_md5sum_1.5.5:= e0dce3935fe44a7eb91d667037d5c0e5 + xdp-tools_tarball_md5sum := $(xdp-tools_tarball_md5sum_$(xdp-tools_version)) + xdp-tools_tarball_strip_dirs := 1 + xdp-tools_url := https://github.com/xdp-project/xdp-tools/releases/download/v$(xdp-tools_version)/$(xdp-tools_tarball) +diff --git a/build/external/patches/xdp-tools_1.2.9/0001-libxdp-add-fPIC-with-static-lib-build.patch b/build/external/patches/xdp-tools_1.2.9/0001-libxdp-add-fPIC-with-static-lib-build.patch +deleted file mode 100644 +index 98b85a271..000000000 +--- a/build/external/patches/xdp-tools_1.2.9/0001-libxdp-add-fPIC-with-static-lib-build.patch ++++ /dev/null +@@ -1,26 +0,0 @@ +-From e83f80443a2f23a68037bf4c7ba16b3723d193a4 Mon Sep 17 00:00:00 2001 +-From: Yulong +-Date: Tue, 3 Jan 2023 14:16:17 +0000 +-Subject: [PATCH] libxdp: add fPIC with static lib build +- +-Signed-off-by: Yulong +---- +- lib/libxdp/Makefile | 2 +- +- 1 file changed, 1 insertion(+), 1 deletion(-) +- +-diff --git a/lib/libxdp/Makefile b/lib/libxdp/Makefile +-index 358b751..a9bb414 100644 +---- a/lib/libxdp/Makefile +-+++ b/lib/libxdp/Makefile +-@@ -88,7 +88,7 @@ $(SHARED_OBJDIR): +- $(Q)mkdir -p $(SHARED_OBJDIR) +- +- $(STATIC_OBJDIR)/%.o: %.c $(EXTRA_LIB_DEPS) | $(STATIC_OBJDIR) +-- $(QUIET_CC)$(CC) $(CFLAGS) $(CPPFLAGS) -D LIBXDP_STATIC=1 -Wall -I../../headers -c $< -o $@ +-+ $(QUIET_CC)$(CC) $(CFLAGS) $(CPPFLAGS) -fPIC -D LIBXDP_STATIC=1 -Wall -I../../headers -c $< -o $@ +- +- $(SHARED_OBJDIR)/%.o: %.c $(EXTRA_LIB_DEPS) | $(SHARED_OBJDIR) +- $(QUIET_CC)$(CC) $(CFLAGS) $(CPPFLAGS) $(SHARED_CFLAGS) -Wall -I../../headers -c $< -o $@ +--- +-2.25.1 +- +diff --git a/build/external/patches/xdp-tools_1.2.9/0002-libxdp-fix-asm-types.h-file-not-found-issue.patch b/build/external/patches/xdp-tools_1.2.9/0002-libxdp-fix-asm-types.h-file-not-found-issue.patch +deleted file mode 100644 +index 1ba3cc541..000000000 +--- a/build/external/patches/xdp-tools_1.2.9/0002-libxdp-fix-asm-types.h-file-not-found-issue.patch ++++ /dev/null +@@ -1,32 +0,0 @@ +-From 51ea3b590f5e0a6b34b5148af43996029fd60ac6 Mon Sep 17 00:00:00 2001 +-From: Yulong +-Date: Fri, 6 Jan 2023 07:46:10 +0000 +-Subject: [PATCH 2/2] libxdp: fix asm/types.h file not found issue +- +-The file asm/types.h located in /usr/include/$(uname -m)-linux-gnu, +-the path string already assigned to ARCH_INCLUDES when run xdp-tools +-configure, so include ARCH_INCLUDES to CFLAGS and BPF_CFLAGS directly. +- +-Signed-off-by: Yulong +---- +- lib/defines.mk | 4 ++-- +- 1 file changed, 2 insertions(+), 2 deletions(-) +- +-diff --git a/lib/defines.mk b/lib/defines.mk +-index f134c43..515411c 100644 +---- a/lib/defines.mk +-+++ b/lib/defines.mk +-@@ -40,8 +40,8 @@ endif +- +- DEFINES += -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 +- +--CFLAGS += -std=gnu11 -Wextra -Werror $(DEFINES) +--BPF_CFLAGS += $(DEFINES) $(filter -ffile-prefix-map=%,$(CFLAGS)) +-+CFLAGS += -std=gnu11 -Wextra -Werror $(DEFINES) $(ARCH_INCLUDES) +-+BPF_CFLAGS += $(DEFINES) $(filter -ffile-prefix-map=%,$(CFLAGS)) $(ARCH_INCLUDES) +- +- CONFIGMK := $(LIB_DIR)/../config.mk +- LIBMK := Makefile $(CONFIGMK) $(LIB_DIR)/defines.mk $(LIB_DIR)/common.mk $(LIB_DIR)/../version.mk +--- +-2.25.1 +- +diff --git a/build/external/patches/xdp-tools_1.2.9/0004-Fix-transposed-calloc-arguments.patch b/build/external/patches/xdp-tools_1.2.9/0004-Fix-transposed-calloc-arguments.patch +deleted file mode 100644 +index 1e9c15005..000000000 +--- a/build/external/patches/xdp-tools_1.2.9/0004-Fix-transposed-calloc-arguments.patch ++++ /dev/null +@@ -1,54 +0,0 @@ +-From b184d103bd767e2286cdb2b0639a2470dce205d5 Mon Sep 17 00:00:00 2001 +-From: =?UTF-8?q?Toke=20H=C3=B8iland-J=C3=B8rgensen?= +-Date: Thu, 18 Jan 2024 13:22:47 +0100 +-Subject: [PATCH] Fix transposed calloc() arguments +-MIME-Version: 1.0 +-Content-Type: text/plain; charset=UTF-8 +-Content-Transfer-Encoding: 8bit +- +-Calls to calloc() are supposed to have the number of elements as the first +-argument, but we erroneously transposed the arguments in a couple of places. It +-seems GCC 14 has started to warn about this, which exposed this as build +-breakage. +- +-Signed-off-by: Toke Høiland-Jørgensen +---- +- lib/util/params.c | 2 +- +- lib/util/xpcapng.c | 6 +++--- +- xdp-trafficgen/xdp-trafficgen.c | 4 ++-- +- 3 files changed, 6 insertions(+), 6 deletions(-) +- +-diff --git a/lib/util/xpcapng.c b/lib/util/xpcapng.c +-index e453b88..8cfc947 100644 +---- a/lib/util/xpcapng.c +-+++ b/lib/util/xpcapng.c +-@@ -226,7 +226,7 @@ static bool pcapng_write_shb(struct xpcapng_dumper *pd, const char *comment, +- shb_length += sizeof(uint32_t); +- +- /* Allocate the SHB and fill it. */ +-- shb = calloc(shb_length, 1); +-+ shb = calloc(1, shb_length); +- if (shb == NULL) { +- errno = ENOMEM; +- return false; +-@@ -318,7 +318,7 @@ static bool pcapng_write_idb(struct xpcapng_dumper *pd, const char *name, +- idb_length += sizeof(uint32_t); +- +- /* Allocate the IDB and fill it. */ +-- idb = calloc(idb_length, 1); +-+ idb = calloc(1, idb_length); +- if (idb == NULL) { +- errno = ENOMEM; +- return false; +-@@ -549,7 +549,7 @@ struct xpcapng_dumper *xpcapng_dump_open(const char *file, +- goto error_exit; +- } +- +-- pd = calloc(sizeof(*pd), 1); +-+ pd = calloc(1, sizeof(*pd)); +- if (pd == NULL) { +- errno = ENOMEM; +- goto error_exit; +--- +-2.43.0 +- +diff --git a/build/external/patches/xdp-tools_1.5.5/0001-libxdp-add-fPIC-with-static-lib-build.patch b/build/external/patches/xdp-tools_1.5.5/0001-libxdp-add-fPIC-with-static-lib-build.patch +new file mode 100644 +index 000000000..61f144731 +--- /dev/null ++++ b/build/external/patches/xdp-tools_1.5.5/0001-libxdp-add-fPIC-with-static-lib-build.patch +@@ -0,0 +1,26 @@ ++From ed3c7a0d204127521cb0bd11160d003a0cbb251e Mon Sep 17 00:00:00 2001 ++From: Yulong ++Date: Tue, 3 Jan 2023 14:16:17 +0000 ++Subject: [PATCH 1/2] libxdp: add fPIC with static lib build ++ ++Signed-off-by: Yulong ++--- ++ lib/libxdp/Makefile | 2 +- ++ 1 file changed, 1 insertion(+), 1 deletion(-) ++ ++diff --git a/lib/libxdp/Makefile b/lib/libxdp/Makefile ++index 4716fb0..f1828da 100644 ++--- a/lib/libxdp/Makefile +++++ b/lib/libxdp/Makefile ++@@ -20,7 +20,7 @@ MAN_FILES := $(MAN_PAGE) ++ TEST_DIR := tests ++ ++ SHARED_CFLAGS += -fPIC -DSHARED ++-STATIC_CFLAGS += -D LIBXDP_STATIC=1 +++STATIC_CFLAGS += -fPIC -D LIBXDP_STATIC=1 ++ LIB_HEADERS := $(wildcard $(HEADER_DIR)/xdp/*.h) ++ BPF_HEADERS := $(wildcard $(HEADER_DIR)/bpf/*.h) $(wildcard $(HEADER_DIR)/xdp/*.h) ++ EXTRA_LIB_DEPS := $(OBJECT_LIBBPF) $(LIBMK) $(LIB_OBJS) $(LIB_HEADERS) compat.h libxdp_internal.h xsk_def_xdp_prog.h bpf_instr.h ++-- ++2.50.1 ++ +diff --git a/build/external/patches/xdp-tools_1.2.9/0003-libxdp-fix-maybe-uninitialized-compiler-warning.patch b/build/external/patches/xdp-tools_1.5.5/0002-libxdp-fix-maybe-uninitialized-compiler-warning.patch +similarity index 71% +rename from build/external/patches/xdp-tools_1.2.9/0003-libxdp-fix-maybe-uninitialized-compiler-warning.patch +rename to build/external/patches/xdp-tools_1.5.5/0002-libxdp-fix-maybe-uninitialized-compiler-warning.patch +index 6ab74171d..ffa9349b0 100644 +--- a/build/external/patches/xdp-tools_1.2.9/0003-libxdp-fix-maybe-uninitialized-compiler-warning.patch ++++ b/build/external/patches/xdp-tools_1.5.5/0002-libxdp-fix-maybe-uninitialized-compiler-warning.patch +@@ -1,7 +1,7 @@ +-From 3033b9bdbcdb270f15373b27933d554f847e01d4 Mon Sep 17 00:00:00 2001 ++From 804f7d523e111c49477e9eca986e3d7cccb28ffc Mon Sep 17 00:00:00 2001 + From: Yulong + Date: Fri, 6 Jan 2023 14:31:24 +0000 +-Subject: [PATCH 3/3] libxdp: fix maybe-uninitialized compiler warning ++Subject: [PATCH 2/2] libxdp: fix maybe-uninitialized compiler warning + + Signed-off-by: Yulong + --- +@@ -9,18 +9,18 @@ Signed-off-by: Yulong + 1 file changed, 1 insertion(+), 1 deletion(-) + + diff --git a/lib/common.mk b/lib/common.mk +-index 56c0406..f7a88a1 100644 ++index ce24c48..e964bd8 100644 + --- a/lib/common.mk + +++ b/lib/common.mk +-@@ -101,7 +101,7 @@ $(LIB_OBJS): %.o: %.c %.h $(LIB_H) ++@@ -104,7 +104,7 @@ $(LIB_OBJS): %.o: %.c %.h $(LIB_H) + + ALL_EXEC_TARGETS=$(USER_TARGETS) $(TEST_TARGETS) +- $(ALL_EXEC_TARGETS): %: %.c $(OBJECT_LIBBPF) $(OBJECT_LIBXDP) $(LIBMK) $(LIB_OBJS) $(KERN_USER_H) $(EXTRA_DEPS) $(EXTRA_USER_DEPS) ++ $(ALL_EXEC_TARGETS): %: %.c $(OBJECT_LIBBPF) $(OBJECT_LIBXDP) $(LIBMK) $(LIB_OBJS) $(KERN_USER_H) $(EXTRA_DEPS) $(EXTRA_USER_DEPS) $(BPF_SKEL_H) $(USER_EXTRA_C) + - $(QUIET_CC)$(CC) -Wall $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $@ $(LIB_OBJS) \ + + $(QUIET_CC)$(CC) -Wall -Wno-maybe-uninitialized $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $@ $(LIB_OBJS) \ +- $< $(LDLIBS) ++ $< $(USER_EXTRA_C) $(LDLIBS) + + $(XDP_OBJ): %.o: %.c $(KERN_USER_H) $(EXTRA_DEPS) $(BPF_HEADERS) $(LIBMK) + -- +-2.25.1 ++2.50.1 + +-- +2.50.1 +