public inbox for io-uring@vger.kernel.org
 help / color / mirror / Atom feed
From: Pavel Begunkov <asml.silence@gmail.com>
To: io-uring@vger.kernel.org
Cc: axboe@kernel.dk
Subject: Re: [PATCH liburing 1/1] tests: fix zcrx tests
Date: Tue, 14 Apr 2026 12:32:09 +0100	[thread overview]
Message-ID: <2f7a77ea-dcfe-4fdd-bd18-e7e48a8ec073@gmail.com> (raw)
In-Reply-To: <35996dec32a78ce0c93dff43197b52cadc2696ea.1776003410.git.asml.silence@gmail.com>

On 4/12/26 15:17, Pavel Begunkov wrote:
> zcrx.c is broken and clearly nobody is running it, do a complete
> rewrite. It covers most of the cases it was supposed to check,
> especially around invalid parameters, but also adds tests for different
> control commands like rq flush and export. It relies on ZCRX_REG_NODEV
> and doesn't require real hardware. It can get !NODEV support later, but
> at least it allows to exercise most of paths on any machine.
> 
> Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
> ---
>   src/include/liburing/io_uring.h |    6 +
>   test/zcrx.c                     | 1561 ++++++++++++++++++-------------
>   2 files changed, 913 insertions(+), 654 deletions(-)
> 
> diff --git a/src/include/liburing/io_uring.h b/src/include/liburing/io_uring.h
> index 1e58bc72..983aa265 100644
> --- a/src/include/liburing/io_uring.h
> +++ b/src/include/liburing/io_uring.h
> @@ -1054,6 +1054,12 @@ struct io_uring_zcrx_area_reg {
>   
>   enum zcrx_reg_flags {
>   	ZCRX_REG_IMPORT	= 1,
> +	/*
> +	 * Register a zcrx instance without a net device. All data will be
> +	 * copied. The refill queue entries might not be automatically
> +	 * consumed and need to be flushed, see ZCRX_CTRL_FLUSH_RQ.
> +	 */
> +	ZCRX_REG_NODEV		= 2,
>   };
>   
>   enum zcrx_features {
> diff --git a/test/zcrx.c b/test/zcrx.c
> index 572e1185..04add8ce 100644
> --- a/test/zcrx.c
> +++ b/test/zcrx.c
> @@ -1,6 +1,6 @@
>   /* SPDX-License-Identifier: MIT */
>   /*
> - * Simple test case showing using send and recv through io_uring
> + * Zero copy receive tests
>    */
>   #include <errno.h>
>   #include <stdio.h>
> @@ -17,69 +17,111 @@
>   #include "liburing.h"
>   #include "helpers.h"

It also needs:

#include <linux/mman.h>

I'll resend later unless you can add it while applying.

-- 
Pavel Begunkov


      reply	other threads:[~2026-04-14 11:32 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-12 14:17 [PATCH liburing 1/1] tests: fix zcrx tests Pavel Begunkov
2026-04-14 11:32 ` Pavel Begunkov [this message]

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=2f7a77ea-dcfe-4fdd-bd18-e7e48a8ec073@gmail.com \
    --to=asml.silence@gmail.com \
    --cc=axboe@kernel.dk \
    --cc=io-uring@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox