selftests: net: refactor server state into struct thread_ctx

Move server-side state (io_uring ring, zcrx area, refill ring, receive
tracking) from global variables into a local struct thread_ctx. This is
a pure refactor with no behavior change: run_server still allocates a
single context on the stack and runs single-threaded, using io_uring
accept and recvzc as before.

This prepares the ground for the multithread server support in the
following commits, which spawns N worker threads each with their own
struct thread_ctx.

Reviewed-by: David Wei <dw@davidwei.uk>
Signed-off-by: Juanlu Herrero <juanlu@fastmail.com>
Link: https://patch.msgid.link/20260909-iou-zcrx-v7-3-6b5d48a2a922@fastmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
Juanlu Herrero 2026-09-09 14:51:25 -05:00 • committed by Jakub Kicinski
commit 72ac4f0c53