From b048a305a3d3cbb5375e32757e70aa129b4c7c4f Mon Sep 17 00:00:00 2001 From: Tony Ambardar Date: Sat, 20 Feb 2021 08:56:20 -0800 Subject: iproute2: update to 5.11.0 The latest iproute2 version brings various improvements and fixes: https://git.kernel.org/pub/scm/network/iproute2/iproute2.git/log/?qt=range&q=v5.10.0..v5.11.0 In particular, ip and tc now use libbpf as the standard way to load BPF programs, rather than the old, limited custom loader. This allows more consistent and featureful BPF program handling e.g. support for global initialized variables. Also fix a longstanding problem with iproute2 builds where unneeded DSO dependencies are added to most utilities, bloating their installation footprint. From research and testing, explicitly using a "--as-needed" linker flag avoids the issue. Update accordingly and drop extra package dependencies from Makefile. Additional build and packaging updates include: - install missing development header to iproute2/bpf_elf.h - propagate OpenWrt verbose flag during build - update and refresh patches Compile and run tested: QEMU/malta-mips32be on kernels 5.4 & 5.10. All iproute2 packages were built and installed to the test image. Some regression testing using ip-full and tc was successfully performed to exercise several kmods, tc modules, and simple BPF programs. Signed-off-by: Tony Ambardar --- package/network/utils/iproute2/patches/170-ip_tiny.patch | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'package/network/utils/iproute2/patches/170-ip_tiny.patch') diff --git a/package/network/utils/iproute2/patches/170-ip_tiny.patch b/package/network/utils/iproute2/patches/170-ip_tiny.patch index c9b28dfe77..d5e5b36936 100644 --- a/package/network/utils/iproute2/patches/170-ip_tiny.patch +++ b/package/network/utils/iproute2/patches/170-ip_tiny.patch @@ -25,7 +25,7 @@ sed -n '/'$$s'[^ ]* =/{s:.* \([^ ]*'$$s'[^ ]*\) .*:extern char \1[] __attribute__((weak)); if (!strcmp(sym, "\1")) return \1;:;p}' $$files ; \ --- a/ip/ip.c +++ b/ip/ip.c -@@ -48,10 +48,16 @@ static void usage(void) +@@ -64,10 +64,16 @@ static void usage(void) fprintf(stderr, "Usage: ip [ OPTIONS ] OBJECT { COMMAND | help }\n" " ip [ -force ] -batch filename\n" @@ -42,7 +42,7 @@ " OPTIONS := { -V[ersion] | -s[tatistics] | -d[etails] | -r[esolve] |\n" " -h[uman-readable] | -iec | -j[son] | -p[retty] |\n" " -f[amily] { inet | inet6 | mpls | bridge | link } |\n" -@@ -74,36 +80,50 @@ static const struct cmd { +@@ -90,36 +96,50 @@ static const struct cmd { int (*func)(int argc, char **argv); } cmds[] = { { "address", do_ipaddr }, @@ -103,6 +103,6 @@ + CFLAGS += -DIPROUTE2_TINY +endif + - UTILOBJ = utils.o rt_names.o ll_map.o ll_types.o ll_proto.o ll_addr.o \ - inet_proto.o namespace.o json_writer.o json_print.o \ - names.o color.o bpf.o exec.o fs.o cg_map.o + UTILOBJ = utils.o utils_math.o rt_names.o ll_map.o ll_types.o ll_proto.o ll_addr.o \ + inet_proto.o namespace.o json_writer.o json_print.o json_print_math.o \ + names.o color.o bpf_legacy.o bpf_glue.o exec.o fs.o cg_map.o -- cgit v1.2.3