All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matthieu Baerts <matttbe@kernel.org>
To: Maxime Chevallier <maxime.chevallier@bootlin.com>,
	netdev-bot+sashiko@kernel.org
Cc: andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@google.com,
	kuba@kernel.org, pabeni@redhat.com, donald.hunter@gmail.com,
	horms@kernel.org, shuah@kernel.org, sdf@fomichev.me,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	thomas.petazzoni@bootlin.com, linux-kselftest@vger.kernel.org
Subject: Re: [PATCH net-next v2 2/2] selftests: drv-net: Use cross-compilation environment for the io_uring check
Date: Mon, 7 Sep 2026 15:58:07 +0200	[thread overview]
Message-ID: <ab86a29e-2825-4ae9-aaa9-b26580ac49a9@kernel.org> (raw)
In-Reply-To: <318ed226-ec5a-42f8-a2be-c41959970ef5@bootlin.com>

On 07/09/2026 15:51, Maxime Chevallier wrote:
> Hi,
> 
> On 9/6/26 17:00, netdev-bot+sashiko@kernel.org wrote:
>> Thank you for your contribution! Sashiko AI review found 2 potential
>> issue(s) to consider:
>>
>> Critical: 0 · High: 0 · Medium: 1 · Low: 1
>>
>> - [Medium] Incomplete fix: the capability probe still uses a different
>>   compiler than the one lib.mk installs to build `iou-zcrx`, in two…
>> - [Low] Missing `Fixes:` tag.
>>
>> --
>>
>> selftests: drv-net: Use cross-compilation environment for the io_uring check
>>
>> This patch sets CC to $(CROSS_COMPILE)gcc at the top of
>> tools/testing/selftests/drivers/net/hw/Makefile so that the liburing
>> zero-copy capability probe (HAS_IOURING_ZCRX) is compiled with the
>> cross compiler instead of make's built-in default. The override is
>> guarded by ifeq ($(LLVM)$(CC),cc).
>>
>> [Severity: Low]
>>
>> Should this carry a Fixes: tag?  git blame on the baseline attributes the
>> whole probe block, including the ifeq ($(HAS_IOURING_ZCRX),y) gating, to
>> f81171fecd0c3 ("selftests: hw-net: auto-disable building the iouring C
>> code").  Since no CC is set before the probe in this Makefile, in
>> tools/testing/selftests/Makefile, or in lib.mk, that commit is where the
>> probe started evaluating with the built-in CC=cc in cross builds:
>>
>>   Fixes: f81171fecd0c3 ("selftests: hw-net: auto-disable building the iouring C code")
> 
> Yeah but OTHO this never worked, and apparently was never tested before.
> 
>>
>> On the changelog wording:
>>
>>> The CC value used for the io_uring library check defaults to the host
>>> compiler, which will fail in cross-compiling environments.
> 
> I'll reword yeah...
> 
> [...]
> 
>>
>> Since the probe is expanded well before include ../../../lib.mk, would it
>> be possible to mirror lib.mk's own CC derivation here, or to move the probe
>> after lib.mk is included, so the gate always matches the compiler that
>> builds iou-zcrx?
> 
> Well this is what I wanted to avoid :(
> 
> Let me reword the commit log for V2, Matthieu if that's OK I'll also keep your
> R-b, as I'll leave the code as-is unless someone has any objection ?

Fine by me to document this "limitation" but keep it as is: I think the
proposed "workaround" is enough for this case.

Cheers,
Matt

  reply	other threads:[~2026-09-07 13:58 UTC|newest]

Thread overview: 21+ 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-06 15:00   ` netdev-bot+sashiko
2026-09-07  8:22     ` Maxime Chevallier
2026-09-07  9:36       ` Matthieu Baerts
2026-09-03 15:55 ` [PATCH net-next v2 2/2] selftests: drv-net: Use cross-compilation environment for the io_uring check Maxime Chevallier (Netdev Foundation)
2026-09-03 16:22   ` Matthieu Baerts
2026-09-06 15:00   ` netdev-bot+sashiko
2026-09-07 13:51     ` Maxime Chevallier
2026-09-07 13:58       ` Matthieu Baerts [this message]
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=ab86a29e-2825-4ae9-aaa9-b26580ac49a9@kernel.org \
    --to=matttbe@kernel.org \
    --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=maxime.chevallier@bootlin.com \
    --cc=netdev-bot+sashiko@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.