* [PATCH net] selftests: iou-zcrx: defer listen() until after zcrx setup
@ 2026-06-11 16:03 Dragos Tatulea
2026-06-13 0:40 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: Dragos Tatulea @ 2026-06-11 16:03 UTC (permalink / raw)
To: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, Shuah Khan, David Wei, Jens Axboe
Cc: dtatulea, Cosmin Ratiu, netdev, linux-kselftest, linux-kernel
The server binds the queues for zero-copy after listen(). If the client
does a connect() during this time it can fail with EHOSTUNREACH on
a cold system. This was encountered with the mlx5 driver where binding
the .ndo_queue_start() is a slow operation during which no packets
can be exchanged.
This change moves listen() after queue binding, when the test server is
fully operational.
Fixes: 71082faa2c64 ("io_uring/zcrx: add selftest")
Signed-off-by: Dragos Tatulea <dtatulea@nvidia.com>
Reviewed-by: Cosmin Ratiu <cratiu@nvidia.com>
---
tools/testing/selftests/drivers/net/hw/iou-zcrx.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/tools/testing/selftests/drivers/net/hw/iou-zcrx.c b/tools/testing/selftests/drivers/net/hw/iou-zcrx.c
index 240d13dbc54e..f6a8fc5fac24 100644
--- a/tools/testing/selftests/drivers/net/hw/iou-zcrx.c
+++ b/tools/testing/selftests/drivers/net/hw/iou-zcrx.c
@@ -351,9 +351,6 @@ static void run_server(void)
if (ret < 0)
error(1, 0, "bind()");
- if (listen(fd, 1024) < 0)
- error(1, 0, "listen()");
-
flags |= IORING_SETUP_COOP_TASKRUN;
flags |= IORING_SETUP_SINGLE_ISSUER;
flags |= IORING_SETUP_DEFER_TASKRUN;
@@ -366,6 +363,9 @@ static void run_server(void)
if (cfg_dry_run)
return;
+ if (listen(fd, 1024) < 0)
+ error(1, 0, "listen()");
+
add_accept(&ring, fd);
tstop = gettimeofday_ms() + 5000;
--
2.54.0
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH net] selftests: iou-zcrx: defer listen() until after zcrx setup
2026-06-11 16:03 [PATCH net] selftests: iou-zcrx: defer listen() until after zcrx setup Dragos Tatulea
@ 2026-06-13 0:40 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2026-06-13 0:40 UTC (permalink / raw)
To: Dragos Tatulea
Cc: andrew+netdev, davem, edumazet, kuba, pabeni, shuah, dw, axboe,
cratiu, netdev, linux-kselftest, linux-kernel
Hello:
This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Thu, 11 Jun 2026 19:03:41 +0300 you wrote:
> The server binds the queues for zero-copy after listen(). If the client
> does a connect() during this time it can fail with EHOSTUNREACH on
> a cold system. This was encountered with the mlx5 driver where binding
> the .ndo_queue_start() is a slow operation during which no packets
> can be exchanged.
>
> This change moves listen() after queue binding, when the test server is
> fully operational.
>
> [...]
Here is the summary with links:
- [net] selftests: iou-zcrx: defer listen() until after zcrx setup
https://git.kernel.org/netdev/net-next/c/ec782be97d2d
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-06-13 0:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-11 16:03 [PATCH net] selftests: iou-zcrx: defer listen() until after zcrx setup Dragos Tatulea
2026-06-13 0:40 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox