Linux io-uring development
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: Ming Lei <tom.leiming@gmail.com>, io-uring@vger.kernel.org
Subject: Re: [PATCH 1/2] io_uring/net: support registered buffer for plain send and recv
Date: Sun, 7 Jun 2026 21:08:00 -0600	[thread overview]
Message-ID: <2a7adb67-2c39-41dd-8f79-9738d422fb71@kernel.dk> (raw)
In-Reply-To: <20260601095853.3670199-2-ming.lei@redhat.com>

On 6/1/26 3:58 AM, Ming Lei wrote:
> diff --git a/io_uring/net.c b/io_uring/net.c
> index f01f1d25e930..9c42c3dbccd7 100644
> --- a/io_uring/net.c
> +++ b/io_uring/net.c
> @@ -431,6 +432,14 @@ int io_sendmsg_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)
>  	sr->flags = READ_ONCE(sqe->ioprio);
>  	if (sr->flags & ~SENDMSG_FLAGS)
>  		return -EINVAL;
> +	if (sr->flags & IORING_RECVSEND_FIXED_BUF) {
> +		/* registered buffer send only supported for plain IORING_OP_SEND */
> +		if (req->opcode != IORING_OP_SEND ||
> +		    (sr->flags & IORING_RECVSEND_BUNDLE) ||
> +		    (req->flags & REQ_F_BUFFER_SELECT))
> +			return -EINVAL;
> +		req->buf_index = READ_ONCE(sqe->buf_index);
> +	}

I think this should either reject IORING_SEND_VECTORIZED, or if there's
a use case for it, ensure that it actually works.

Outside of that, change seems straight forward to me.

-- 
Jens Axboe

  reply	other threads:[~2026-06-08  3:08 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-01  9:58 [PATCH 0/2] io_uring/net: support registered buffer for plain send and recv Ming Lei
2026-06-01  9:58 ` [PATCH 1/2] " Ming Lei
2026-06-08  3:08   ` Jens Axboe [this message]
2026-06-01  9:58 ` [PATCH 2/2] liburing test: add fixed-buf-send-recv for registered buffer send/recv Ming Lei
2026-06-07 23:30 ` [PATCH 0/2] io_uring/net: support registered buffer for plain send and recv Ming Lei

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=2a7adb67-2c39-41dd-8f79-9738d422fb71@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=io-uring@vger.kernel.org \
    --cc=tom.leiming@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox