From: "Maxime Chevallier (Netdev Foundation)" <maxime.chevallier@bootlin.com>
To: Andrew Lunn <andrew+netdev@lunn.ch>,
davem@davemloft.net, Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Donald Hunter <donald.hunter@gmail.com>,
Simon Horman <horms@kernel.org>, Shuah Khan <shuah@kernel.org>,
matttbe@kernel.org, Stanislav Fomichev <sdf@fomichev.me>
Cc: "Maxime Chevallier (Netdev Foundation)"
<maxime.chevallier@bootlin.com>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
thomas.petazzoni@bootlin.com, linux-kselftest@vger.kernel.org
Subject: [PATCH net-next v2 2/2] selftests: drv-net: Use cross-compilation environment for the io_uring check
Date: Thu, 3 Sep 2026 17:55:23 +0200 [thread overview]
Message-ID: <20260903155524.2241065-3-maxime.chevallier@bootlin.com> (raw)
In-Reply-To: <20260903155524.2241065-1-maxime.chevallier@bootlin.com>
To test for the presence of zerocopy support in the available liburing,
a small check program is compiled.
The CC value used for the io_uring library check defaults to the host
compiler, which will fail in cross-compiling environments.
Normally the CC for cross-compile is set in lib.mk, but this also
requires the test list to be set when we include it, and this check
needs to run first.
Note that this doesn't cover the LLVM cross-compiling case though.
Suggested-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Signed-off-by: Maxime Chevallier (Netdev Foundation) <maxime.chevallier@bootlin.com>
---
V2: Use an LLVM-aware construct for CC construction, from Mattieu
tools/testing/selftests/drivers/net/hw/Makefile | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/tools/testing/selftests/drivers/net/hw/Makefile b/tools/testing/selftests/drivers/net/hw/Makefile
index 6105be8e590f..f9458dc6c150 100644
--- a/tools/testing/selftests/drivers/net/hw/Makefile
+++ b/tools/testing/selftests/drivers/net/hw/Makefile
@@ -1,5 +1,10 @@
# SPDX-License-Identifier: GPL-2.0+ OR MIT
+# Set CC for the io_uring check
+ifeq ($(LLVM)$(CC),cc)
+CC := $(CROSS_COMPILE)gcc
+endif
+
# Check if io_uring supports zero-copy receive
HAS_IOURING_ZCRX := $(shell \
echo -e '#include <liburing.h>\n' \
--
2.55.0
next prev parent reply other threads:[~2026-09-03 15:55 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-03 15:55 [PATCH net-next v2 0/2] selftests: drv-net: Allow cross-compiling the hardware tests Maxime Chevallier (Netdev Foundation)
2026-09-03 15:55 ` [PATCH net-next v2 1/2] tools: ynl: Allow cross-compiling ynl and associated tools Maxime Chevallier (Netdev Foundation)
2026-09-03 16:22 ` Matthieu Baerts
2026-09-03 15:55 ` Maxime Chevallier (Netdev Foundation) [this message]
2026-09-03 16:22 ` [PATCH net-next v2 2/2] selftests: drv-net: Use cross-compilation environment for the io_uring check Matthieu Baerts
2026-09-03 16:51 ` [PATCH net-next v2 0/2] selftests: drv-net: Allow cross-compiling the hardware tests Andrew Lunn
2026-09-03 17:25 ` Matthieu Baerts
2026-09-03 21:44 ` Maxime Chevallier
2026-09-03 21:59 ` Andrew Lunn
2026-09-04 6:11 ` Maxime Chevallier
2026-09-03 23:40 ` Jakub Kicinski
2026-09-03 17:11 ` Andrew Lunn
2026-09-03 17:25 ` Matthieu Baerts
2026-09-03 20:55 ` Andrew Lunn
2026-09-04 9:43 ` Matthieu Baerts
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260903155524.2241065-3-maxime.chevallier@bootlin.com \
--to=maxime.chevallier@bootlin.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=donald.hunter@gmail.com \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=matttbe@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=sdf@fomichev.me \
--cc=shuah@kernel.org \
--cc=thomas.petazzoni@bootlin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox