Re: [PATCH net-next 7/7] selftests: net: Test XDP on io_uring RX
From: Björn Töpel
Date: Sun Nov 22 2026 - 15:13:45 EST
Stanislav Fomichev <sdf.kernel@xxxxxxxxx> writes:
> On 11/17, Björn Töpel wrote:
>> diff --git a/tools/testing/selftests/drivers/net/hw/iou-zcrx.c b/tools/testing/selftests/drivers/net/hw/iou-zcrx.c
>> index 91b025a8771e..f7e909fd6840 100644
>> --- a/tools/testing/selftests/drivers/net/hw/iou-zcrx.c
>> +++ b/tools/testing/selftests/drivers/net/hw/iou-zcrx.c
>> @@ -258,6 +404,34 @@ static void add_recvzc_oneshot(struct thread_ctx *ctx, int conn_idx, size_t len)
>> sqe->user_data = conn_idx;
>> }
>>
>
> [..]
>
>> +static void verify_data(struct thread_ctx *ctx, int conn_idx,
>> + const char *data, size_t len)
>> +{
>> + size_t offset = ctx->received[conn_idx];
>> + size_t i;
>> +
>> + for (i = 0; i < len; i++) {
>> + if (data[i] != payload[offset + i])
>> + error(1, 0, "payload mismatch at %zu", i);
>> + }
>> + ctx->received[conn_idx] += len;
>> +}
>
> Move some of the refactoring/fixes out into a separate patch?
Ya, makes sense! Will do!
> But in general feels like a wrong test to extend.. Why not call
> ncdevmem somewhere in python wrapper (and attach xdp prog that you
> have in this patch)? To decouple xdp testing from the entity that
> generates/receives unreadable frags.
Good idea, I'll try that!
Björn