[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240811223135.1173783-1-stefan.maetje@esd.eu>
Date: Mon, 12 Aug 2024 00:31:33 +0200
From: Stefan Mätje <stefan.maetje@....eu>
To: David Ahern <dsahern@...il.com>
Cc: netdev@...r.kernel.org
Subject: [PATCH 0/2] iproute2: ss: clarify build warnings when building with libbpf 0.5.0
Hi,
when building current iproute2 source on Ubuntu 22.04 with libbpf0
0.5.0 installed, I stumbled over the warning "libbpf version 0.5 or
later is required, ...". This prompted me to look closer having the
version 0.5.0 installed which should suppress this warning.
The warning lured me into the impression that building without
warning should be possible using libbpf 0.5.0.
I found out that this warning came from ss.c where a conditional
compile path depends on LIBBPF_MAJOR_VERSION and LIBBPF_MINOR_VERSION.
Newer libbpf versions define these in libbpf_version.h but the library
version 0.5.0 and earlier on Ubuntu and Debian don't package this header.
The version 0.7.0 on Debian packages the header libbpf_version.h.
Therefore these defines were undefined during the build and prompted
the output of the warning message. I derived these version defines
from the library version in the configure script and provided them
via CFLAGS. This is the first patch.
Now building ss.c against the libbpf 0.5.0 with ENABLE_BPF_SKSTORAGE_SUPPORT
enabled, triggered compilation errors. The function btf_dump__new is
used there with a calling convention that was introduced with libbpf
version 0.6.0. Therefore ENABLE_BPF_SKSTORAGE_SUPPORT shall only be
enabled for libbpf versions >= 0.6.0.
Best regards,
Stefan Mätje
Stefan Mätje (2):
configure: provide surrogates for possibly missing libbpf_version.h
ss: fix libbpf version check for ENABLE_BPF_SKSTORAGE_SUPPORT
configure | 6 ++++++
misc/ss.c | 6 +++---
2 files changed, 9 insertions(+), 3 deletions(-)
base-commit: 354d8a36885172b6e27ca65ff85c2c51e740fda0
--
2.34.1
Powered by blists - more mailing lists