From nobody Sat Sep 26 12:28:31 2026 Received: from smtpout-02.galae.net (smtpout-02.galae.net [185.246.84.56]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D5761481FC2; Tue, 1 Sep 2026 16:42:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.246.84.56 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788280951; cv=none; b=PfJo4jukb0gflOvAvicTcWqwNtl8Lqtszf8/+GMsNEWVaQNboKW3nSweuDx4Jwp6IZ0iVulDaQWd96AkXXbyhGyHaOxOmGpf2CnEquOmL9eG66GGBfY4ctTk7TqtTtegg4k87L5kgfNyUsT8i2iIZtpYRa2VG8xwGBsq1Hf7nT4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788280951; c=relaxed/simple; bh=oL9d0Go6mi/VGMPgcxhNO52d25NV0sdszCMETabh+Jw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=NPHkd/ZyvaeGsA1QJiu/Ld0MsNSwU1kYxW1ggzh9Y5KqZsUaUi1aPpEkaYY5d/S4sR9envEZopzZxbb9OIjRhV2Uy+M0DYaZGDxFiBGH+UF2Gc2UdMnMSFOWSEn1mWqKX6WKJSRNwp/RbiWHfCdpqgWPHBjoxCkcGoQMLZvKxgk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=yhQAZO0W; arc=none smtp.client-ip=185.246.84.56 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="yhQAZO0W" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-02.galae.net (Postfix) with ESMTPS id 3961E1A1932; Tue, 1 Sep 2026 16:42:27 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 0DDB66053C; Tue, 1 Sep 2026 16:42:27 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id B01F011C7922D; Tue, 1 Sep 2026 18:42:20 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1788280942; h=from:subject:date:message-id:to:cc:mime-version: content-transfer-encoding:in-reply-to:references; bh=974G8/uKW2m5xLDzr1nWHC21XZpOSQqOpsO68GXI/VA=; b=yhQAZO0WCajjv4QXwzr5oZr1LWHWpehWWvxlWc6Orix731TBzvvaFah9Nlch5ZBgp2oDLg DkTzAdnKQXTVhUWDtu2h1ejNfl4ISNCbKgrwgASgBXTfuJhJQZ08jufYmWrCIHuq6Lm4er XeNa+Vj0HaksrXhDS7H2NRmR1royzKzKmKtN4ttwhLCLm5ubiY9S50BJ/4dRE+LIl38B6D bNYlGb0bWxdIgKRPKH463gy5Q31HFjGtyBtIiVRVYxGg6wDmaaRdwd4rhwJl27UElIs3E/ ewi7KaRSjsxy4YHImDbE1TsSytouAQKfADiOREB5ObwiAtCGRrpQpgN4S8+Tsw== From: "Maxime Chevallier (Netdev Foundation)" To: Andrew Lunn , davem@davemloft.net, Eric Dumazet , Jakub Kicinski , Paolo Abeni , Donald Hunter , Simon Horman , Shuah Khan , matttbe@kernel.org, Stanislav Fomichev Cc: "Maxime Chevallier (Netdev Foundation)" , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, thomas.petazzoni@bootlin.com, linux-kselftest@vger.kernel.org Subject: [PATCH net-next 1/2] selftests: drv-net: ynl: Allow cross-compiling ynl and associated tools Date: Tue, 1 Sep 2026 18:41:58 +0200 Message-ID: <20260901164200.1124343-2-maxime.chevallier@bootlin.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260901164200.1124343-1-maxime.chevallier@bootlin.com> References: <20260901164200.1124343-1-maxime.chevallier@bootlin.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Last-TLS-Session-Version: TLSv1.3 Content-Type: text/plain; charset="utf-8" The ynl tool and libraries may be built standalone or through the drivers/net/hw selftest machinery. This may target a different arch, so we need to account for the cross-compiling options such as CROSS_COMPILE or the LLVM-specific variables. Let's include the tools/scripts/Makefile.include that deals with the CC/AR resolution. Fixup the ynltool CFLAGS handling to use +=3D, so that we don't override the ones set in Makefile.include Signed-off-by: Maxime Chevallier (Netdev Foundation) --- tools/net/ynl/Makefile | 1 + tools/net/ynl/generated/Makefile | 3 ++- tools/net/ynl/lib/Makefile | 3 ++- tools/net/ynl/tests/Makefile | 2 +- tools/net/ynl/ynltool/Makefile | 4 ++-- 5 files changed, 8 insertions(+), 5 deletions(-) diff --git a/tools/net/ynl/Makefile b/tools/net/ynl/Makefile index 3cefe4ed96cb..8bf72c063e86 100644 --- a/tools/net/ynl/Makefile +++ b/tools/net/ynl/Makefile @@ -1,6 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 =20 include ../../scripts/Makefile.arch +include ../../scripts/Makefile.include =20 INSTALL ?=3D install prefix ?=3D /usr diff --git a/tools/net/ynl/generated/Makefile b/tools/net/ynl/generated/Mak= efile index ea4128f612d6..5a186349b5a8 100644 --- a/tools/net/ynl/generated/Makefile +++ b/tools/net/ynl/generated/Makefile @@ -1,6 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 =20 -CC=3Dgcc +include ../../../scripts/Makefile.include + CFLAGS +=3D -std=3Dgnu11 -O2 -W -Wall -Wextra -Wno-unused-parameter -Wshad= ow \ -I../lib/ -idirafter $(UAPI_PATH) ifeq ("$(DEBUG)","1") diff --git a/tools/net/ynl/lib/Makefile b/tools/net/ynl/lib/Makefile index 9b98c0599600..7b3eae89982f 100644 --- a/tools/net/ynl/lib/Makefile +++ b/tools/net/ynl/lib/Makefile @@ -1,6 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 =20 -CC=3Dgcc +include ../../../scripts/Makefile.include + CFLAGS +=3D -std=3Dgnu11 -O2 -W -Wall -Wextra -Wno-unused-parameter -Wshad= ow ifeq ("$(DEBUG)","1") CFLAGS +=3D -g -fsanitize=3Daddress -fsanitize=3Dleak -static-libasan diff --git a/tools/net/ynl/tests/Makefile b/tools/net/ynl/tests/Makefile index 40827ca8e579..99ae7dcd6348 100644 --- a/tools/net/ynl/tests/Makefile +++ b/tools/net/ynl/tests/Makefile @@ -2,8 +2,8 @@ # Makefile for YNL tests =20 include ../Makefile.deps +include ../../../scripts/Makefile.include =20 -CC=3Dgcc CFLAGS +=3D -std=3Dgnu11 -O2 -W -Wall -Wextra -Wno-unused-parameter -Wshad= ow \ -I../lib/ -I../generated/ -I../../../testing/selftests/ \ -idirafter $(UAPI_PATH) diff --git a/tools/net/ynl/ynltool/Makefile b/tools/net/ynl/ynltool/Makefile index 48b0f32050f0..85cc0840b403 100644 --- a/tools/net/ynl/ynltool/Makefile +++ b/tools/net/ynl/ynltool/Makefile @@ -1,12 +1,12 @@ # SPDX-License-Identifier: GPL-2.0-only =20 include ../Makefile.deps +include ../../../scripts/Makefile.include =20 INSTALL ?=3D install prefix ?=3D /usr =20 -CC :=3D gcc -CFLAGS :=3D -Wall -Wextra -Werror -O2 +CFLAGS +=3D -Wall -Wextra -Werror -O2 ifeq ("$(DEBUG)","1") CFLAGS +=3D -g -fsanitize=3Daddress -fsanitize=3Dleak -static-libasan endif --=20 2.55.0 From nobody Sat Sep 26 12:28:31 2026 Received: from smtpout-02.galae.net (smtpout-02.galae.net [185.246.84.56]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D36FA481669; Tue, 1 Sep 2026 16:42:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.246.84.56 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788280957; cv=none; b=gnsyo6fCXwDjwusEsKAxNqRJRjVfM2hguKRAfKCZk+1zcXPiTFlADEVRXrBBKcHi8sjfH4+tV9LnKXFgqLmMXfC2pDTmhY7GBLnB9oTfHT6Uub6bHo/wy+WD3iRclCjV4pNe4SE/mKz7iangzRq3OBTfFLOD2zwsoozEJiE5Mhc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788280957; c=relaxed/simple; bh=OuzuyHS6Aee0uqjsgz3eDjQwQT5qFFkxKPDmF1PtJcY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=a927PF+s6X2KA0C3o3hyvPU8dpCMOj35ld3Ash76KBpuM4aXHElwi3ikfizbyOqDtgsnrdNiZA2nYGBbVW7idiXOry3R80mZeb5FAdxCQoGdSDBgwKfuPx5QuZ2w3Yz75jZ8UvpR8QC6bIJymFpBghL62sybBKPhIl/YrkzqurI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=uA75FqSO; arc=none smtp.client-ip=185.246.84.56 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="uA75FqSO" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-02.galae.net (Postfix) with ESMTPS id 18D421A192A; Tue, 1 Sep 2026 16:42:33 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id E2E676053C; Tue, 1 Sep 2026 16:42:32 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 8B67111C7927A; Tue, 1 Sep 2026 18:42:26 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1788280948; h=from:subject:date:message-id:to:cc:mime-version: content-transfer-encoding:in-reply-to:references; bh=mwD6RNRMS6GTy4KFntwUfx5v5Cnc7n48MawaxDnu5rk=; b=uA75FqSOHXllWbUkiHXCN4q9wbW9WuN71f+SWoonih5FPwUPRx1mfjDe7XeE/rQ+h4pcQ1 Ni5UkVlLMAkamN2VA0QkN5d8aw8TUBjMExin0S0gSREtxPGnR4TxgNGOmqkH0j3cd58SnA eMzP/nI0a6LmPhKPo1vanpZ/LIeDg9SbIZqTcY6CoQ6mXJGFE0RUUCqojv+tQRDRyzcB7q HzxhaTGQjxY+qLG9nxb7Z2gV1iq8DkoTt1iJGgeVB+bKwpyI+vMfX31E5kWzFBAOwZmP9Q F02ngTvTYY1rsXeXROWop6Z0CXX/LHtdeknM1k6pxWyu968g+AaYbd7JugmPYA== From: "Maxime Chevallier (Netdev Foundation)" To: Andrew Lunn , davem@davemloft.net, Eric Dumazet , Jakub Kicinski , Paolo Abeni , Donald Hunter , Simon Horman , Shuah Khan , matttbe@kernel.org, Stanislav Fomichev Cc: "Maxime Chevallier (Netdev Foundation)" , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, thomas.petazzoni@bootlin.com, linux-kselftest@vger.kernel.org Subject: [PATCH net-next 2/2] selftests: drv-net: Use cross-compilation environment for the io_uring check Date: Tue, 1 Sep 2026 18:41:59 +0200 Message-ID: <20260901164200.1124343-3-maxime.chevallier@bootlin.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260901164200.1124343-1-maxime.chevallier@bootlin.com> References: <20260901164200.1124343-1-maxime.chevallier@bootlin.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Last-TLS-Session-Version: TLSv1.3 Content-Type: text/plain; charset="utf-8" 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. Signed-off-by: Maxime Chevallier (Netdev Foundation) --- tools/testing/selftests/drivers/net/hw/Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/testing/selftests/drivers/net/hw/Makefile b/tools/testin= g/selftests/drivers/net/hw/Makefile index 78bb0169350b..0ebb4767cd57 100644 --- a/tools/testing/selftests/drivers/net/hw/Makefile +++ b/tools/testing/selftests/drivers/net/hw/Makefile @@ -1,5 +1,8 @@ # SPDX-License-Identifier: GPL-2.0+ OR MIT =20 +# Set CC for the io_uring check +CC :=3D $(CROSS_COMPILE)gcc + # Check if io_uring supports zero-copy receive HAS_IOURING_ZCRX :=3D $(shell \ echo -e '#include \n' \ --=20 2.55.0