summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNick Hainke2026-02-06 19:48:36 +0000
committerNick Hainke2026-04-20 14:43:23 +0000
commit282309648b83f6eeb359d3d9b353c6cb0ca740fe (patch)
tree4d0871a27445363ec758731afcb9ab67700291a1
parent8b792e77c61478ccc01acd028772cc644b12d4c3 (diff)
downloadopenwrt-282309648b83f6eeb359d3d9b353c6cb0ca740fe.tar.gz
xdp-tools: update to 1.6.3
Add patch "0001-params-avoid-linux-if_ether.h-in-header-to-fix-musl-.patch". Release Notes: - https://github.com/xdp-project/xdp-tools/releases/tag/v1.6.0 - https://github.com/xdp-project/xdp-tools/releases/tag/v1.6.1 - https://github.com/xdp-project/xdp-tools/releases/tag/v1.6.2 - https://github.com/xdp-project/xdp-tools/releases/tag/v1.6.3 Link: https://github.com/openwrt/openwrt/pull/21903 (cherry picked from commit 59549b8f15f0668a9894c1966bc8f133286e1c4a) Link: https://github.com/openwrt/openwrt/pull/23015 Signed-off-by: Nick Hainke <vincent@systemli.org>
-rw-r--r--package/network/utils/xdp-tools/Makefile6
-rw-r--r--package/network/utils/xdp-tools/patches/0001-params-avoid-linux-if_ether.h-in-header-to-fix-musl-.patch30
-rw-r--r--package/network/utils/xdp-tools/patches/0001-xdp-avoid-stddef.h-and-size_t-in-BPF-headers.patch64
3 files changed, 33 insertions, 67 deletions
diff --git a/package/network/utils/xdp-tools/Makefile b/package/network/utils/xdp-tools/Makefile
index cb7db9dece..fb9ea95458 100644
--- a/package/network/utils/xdp-tools/Makefile
+++ b/package/network/utils/xdp-tools/Makefile
@@ -1,9 +1,9 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=xdp-tools
-PKG_RELEASE:=2
-PKG_VERSION:=1.5.8
-PKG_HASH:=e7b9717074c511fef34aab6e22b16af55fb33307505a5785d25a82b542e596ae
+PKG_RELEASE:=1
+PKG_VERSION:=1.6.3
+PKG_HASH:=78da363ff7dcf1a586f47800f16d644022bd33f3844864061a44616fce854fd8
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/0001-params-avoid-linux-if_ether.h-in-header-to-fix-musl-.patch b/package/network/utils/xdp-tools/patches/0001-params-avoid-linux-if_ether.h-in-header-to-fix-musl-.patch
new file mode 100644
index 0000000000..1fee5e974c
--- /dev/null
+++ b/package/network/utils/xdp-tools/patches/0001-params-avoid-linux-if_ether.h-in-header-to-fix-musl-.patch
@@ -0,0 +1,30 @@
+From: Nick Hainke <vincent@systemli.org>
+Subject: [PATCH] params: avoid linux/if_ether.h in header to fix musl build
+
+On musl-based toolchains (e.g. MIPS), including <linux/if_ether.h>
+from params.h triggers a chain through net/ethernet.h ->
+netinet/if_ether.h which also defines struct ethhdr, causing a
+redefinition conflict with the direct <linux/if_ether.h> include in
+params.c.
+
+params.h only uses ETH_ALEN from that header, so define it directly
+to avoid the conflict.
+
+Signed-off-by: Nick Hainke <vincent@systemli.org>
+---
+ lib/util/params.h | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+--- a/lib/util/params.h
++++ b/lib/util/params.h
+@@ -8,7 +8,9 @@
+ #include <stdlib.h>
+ #include <linux/in.h>
+ #include <linux/in6.h>
+-#include <linux/if_ether.h>
++#ifndef ETH_ALEN
++#define ETH_ALEN 6
++#endif
+ #include <bpf/libbpf.h>
+
+ enum option_type {
diff --git a/package/network/utils/xdp-tools/patches/0001-xdp-avoid-stddef.h-and-size_t-in-BPF-headers.patch b/package/network/utils/xdp-tools/patches/0001-xdp-avoid-stddef.h-and-size_t-in-BPF-headers.patch
deleted file mode 100644
index e32e8a458b..0000000000
--- a/package/network/utils/xdp-tools/patches/0001-xdp-avoid-stddef.h-and-size_t-in-BPF-headers.patch
+++ /dev/null
@@ -1,64 +0,0 @@
-From a90c30902e6dc4d220738248dd7785e51bb19904 Mon Sep 17 00:00:00 2001
-From: Nick Hainke <vincent@systemli.org>
-Date: Tue, 10 Feb 2026 19:59:42 +0100
-Subject: [PATCH] xdp: avoid stddef.h and size_t in BPF headers
-
-Remove <stddef.h> includes that break BPF builds on some toolchains.
-Replace size_t in xdp_sample_shared.h with unsigned long long to keep
-structs usable without stddef definitions.
-
-Signed-off-by: Nick Hainke <vincent@systemli.org>
----
- headers/xdp/parsing_helpers.h | 1 -
- headers/xdp/xdp_sample_common.bpf.h | 1 -
- headers/xdp/xdp_sample_shared.h | 16 +++++++---------
- 3 files changed, 7 insertions(+), 11 deletions(-)
-
---- a/headers/xdp/parsing_helpers.h
-+++ b/headers/xdp/parsing_helpers.h
-@@ -15,7 +15,6 @@
- #ifndef __PARSING_HELPERS_H
- #define __PARSING_HELPERS_H
-
--#include <stddef.h>
- #include <linux/if_ether.h>
- #include <linux/if_packet.h>
- #include <linux/ip.h>
---- a/headers/xdp/xdp_sample_common.bpf.h
-+++ b/headers/xdp/xdp_sample_common.bpf.h
-@@ -6,7 +6,6 @@
- #include "xdp_sample.bpf.h"
-
- #include <bpf/vmlinux.h>
--#include <stddef.h>
- #include <stdbool.h>
- #include <bpf/bpf_tracing.h>
- #include <bpf/bpf_core_read.h>
---- a/headers/xdp/xdp_sample_shared.h
-+++ b/headers/xdp/xdp_sample_shared.h
-@@ -2,18 +2,16 @@
- #ifndef _XDP_SAMPLE_SHARED_H
- #define _XDP_SAMPLE_SHARED_H
-
--#include <stddef.h>
--
- struct datarec {
-- size_t processed;
-- size_t dropped;
-- size_t issue;
-+ unsigned long long processed;
-+ unsigned long long dropped;
-+ unsigned long long issue;
- union {
-- size_t xdp_pass;
-- size_t info;
-+ unsigned long long xdp_pass;
-+ unsigned long long info;
- };
-- size_t xdp_drop;
-- size_t xdp_redirect;
-+ unsigned long long xdp_drop;
-+ unsigned long long xdp_redirect;
- } __attribute__((aligned(64)));
-
- #endif