From: Jens Axboe <axboe@kernel.dk>
To: Anuj Gupta <anuj20.g@samsung.com>
Cc: Ming Lei <ming.lei@redhat.com>, io-uring@vger.kernel.org
Subject: Re: [PATCH 1/4] io_uring/uring_cmd: get rid of using req->imu
Date: Tue, 22 Oct 2024 07:24:16 -0600 [thread overview]
Message-ID: <52becd2a-7042-4506-a42a-b50d643cdf25@kernel.dk> (raw)
In-Reply-To: <b7741a2f-a6b6-4a92-aa6e-9eab3f018804@kernel.dk>
On 10/22/24 7:18 AM, Jens Axboe wrote:
> On 10/22/24 2:34 AM, Anuj Gupta wrote:
>>>
>>> Gah indeed, in fact it always should be, unless it's forcefully punted
>>> to io-wq. I'll sort that out, thanks. And looks like we have zero tests
>>> for uring_cmd + fixed buffers :-(
>>>
>>
>> We do have tests for uring_cmd + fixed-buffers in liburing [*].
>>
>> [*] https://github.com/axboe/liburing/blob/master/test/io_uring_passthrough.c
>
> We seem to yes, but its not actually importing a fixed buffer...
The test is buggy, this should fix it:
diff --git a/test/io_uring_passthrough.c b/test/io_uring_passthrough.c
index 345c65b1faa4..f18a1862c524 100644
--- a/test/io_uring_passthrough.c
+++ b/test/io_uring_passthrough.c
@@ -167,6 +167,8 @@ static int __test_io(const char *file, struct io_uring *ring, int tc, int read,
}
}
sqe->opcode = IORING_OP_URING_CMD;
+ if (do_fixed)
+ sqe->uring_cmd_flags |= IORING_URING_CMD_FIXED;
sqe->user_data = ((uint64_t)offset << 32) | i;
if (sqthread)
sqe->flags |= IOSQE_FIXED_FILE;
--
Jens Axboe
next prev parent reply other threads:[~2024-10-22 13:24 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-22 2:03 [PATCHSET v2 for-next 0/4] Get rid of io_kiocb->imu Jens Axboe
2024-10-22 2:03 ` [PATCH 1/4] io_uring/uring_cmd: get rid of using req->imu Jens Axboe
2024-10-22 2:43 ` Ming Lei
2024-10-22 2:59 ` Jens Axboe
2024-10-22 8:34 ` Anuj Gupta
2024-10-22 13:18 ` Jens Axboe
2024-10-22 13:24 ` Jens Axboe [this message]
2024-10-22 2:03 ` [PATCH 2/4] io_uring/rw: " Jens Axboe
2024-10-22 2:03 ` [PATCH 3/4] io_uring/net: move send zc fixed buffer import to issue path Jens Axboe
2024-10-22 2:03 ` [PATCH 4/4] io_uring: kill 'imu' from struct io_kiocb Jens Axboe
-- strict thread matches above, loose matches on Subject: below --
2024-10-22 13:32 [PATCHSET v3 for-next 0/4] Get rid of io_kiocb->imu Jens Axboe
2024-10-22 13:32 ` [PATCH 1/4] io_uring/uring_cmd: get rid of using req->imu Jens Axboe
2024-10-18 18:38 [PATCHSET for-next 0/4] Get rid of io_kiocb->imu Jens Axboe
2024-10-18 18:38 ` [PATCH 1/4] io_uring/uring_cmd: get rid of using req->imu Jens Axboe
2024-10-18 19:34 ` Pavel Begunkov
2024-10-19 21:56 ` Jens Axboe
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=52becd2a-7042-4506-a42a-b50d643cdf25@kernel.dk \
--to=axboe@kernel.dk \
--cc=anuj20.g@samsung.com \
--cc=io-uring@vger.kernel.org \
--cc=ming.lei@redhat.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