From: Keith Busch <kbusch@kernel.org>
To: Caleb Sander Mateos <csander@purestorage.com>
Cc: Keith Busch <kbusch@meta.com>, io-uring@vger.kernel.org, axboe@kernel.dk
Subject: Re: [PATCHv5 1/4] liburing: provide uring_cmd prep function
Date: Tue, 21 Oct 2025 10:45:12 -0600 [thread overview]
Message-ID: <aPe4mOU56C_dh2ky@kbusch-mbp> (raw)
In-Reply-To: <CADUfDZp-6s8QYAoeikMG98MhvfsZ0V-Vu_EGVoHUhthM=xth6Q@mail.gmail.com>
On Sun, Oct 19, 2025 at 09:24:10AM -0700, Caleb Sander Mateos wrote:
> On Mon, Oct 13, 2025 at 11:00 AM Keith Busch <kbusch@meta.com> wrote:
> > + int fd)
> > + LIBURING_NOEXCEPT
> > +{
> > + sqe->opcode = (__u8) IORING_OP_URING_CMD;
>
> Casting the constant seems unnecessary. Do compilers really warn about this?
Oh, not necessary here, but the next patch wants the cast. This was
copied from io_uring_prep_rw(), which passes the 'opcode' as an 'int'
type. I don't know why that type was used, so just trying to match the
local convention.
But I digress, I'll move the cast to the next patch where it is actually
needed.
> > + io_uring_prep_uring_cmd(sqe, NVME_URING_CMD_IO, use_fd);
>
> I guess this works because io_uring_prep_uring_cmd() doesn't touch
> sqe->buf_index or sqe->flags, but it seems like it would be less
> brittle to call io_uring_prep_uring_cmd() before setting any of the
> other sqe fields.
Good point, it happens to be "okay", but is safer to move the generic
init before initializing command specific fields.
next prev parent reply other threads:[~2025-10-21 16:45 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-13 18:00 [PATCHv5 0/4] liburing: support for mix sized sqe's Keith Busch
2025-10-13 18:00 ` [PATCHv5 0/1] io_uring: mixed submission queue entries sizes Keith Busch
2025-10-13 18:00 ` [PATCHv5 1/1] io_uring: add support for IORING_SETUP_SQE_MIXED Keith Busch
2025-10-14 22:33 ` Caleb Sander Mateos
2025-10-15 2:03 ` Keith Busch
2025-10-16 18:06 ` Keith Busch
2025-10-13 18:00 ` [PATCHv5 1/4] liburing: provide uring_cmd prep function Keith Busch
2025-10-19 16:24 ` Caleb Sander Mateos
2025-10-21 16:45 ` Keith Busch [this message]
2025-10-13 18:00 ` [PATCHv5 2/4] Add support IORING_SETUP_SQE_MIXED Keith Busch
2025-10-13 18:00 ` [PATCHv5 3/4] Add nop testing for IORING_SETUP_SQE_MIXED Keith Busch
2025-10-13 18:00 ` [PATCHv5 4/4] Add mixed sqe test for uring commands Keith Busch
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=aPe4mOU56C_dh2ky@kbusch-mbp \
--to=kbusch@kernel.org \
--cc=axboe@kernel.dk \
--cc=csander@purestorage.com \
--cc=io-uring@vger.kernel.org \
--cc=kbusch@meta.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