[PATCH] io_uring: add missing IORING_MAP_OFF_ZCRX_REGION in io_uring_mmap

Bui Quang Minh posted 1 patch 9 months, 3 weeks ago
io_uring/memmap.c | 2 ++
1 file changed, 2 insertions(+)
[PATCH] io_uring: add missing IORING_MAP_OFF_ZCRX_REGION in io_uring_mmap
Posted by Bui Quang Minh 9 months, 3 weeks ago
Allow user to mmap the kernel allocated zerocopy-rx refill queue.

Signed-off-by: Bui Quang Minh <minhquangbui99@gmail.com>
---
 io_uring/memmap.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/io_uring/memmap.c b/io_uring/memmap.c
index 361134544427..76fcc79656b0 100644
--- a/io_uring/memmap.c
+++ b/io_uring/memmap.c
@@ -271,6 +271,8 @@ static struct io_mapped_region *io_mmap_get_region(struct io_ring_ctx *ctx,
 		return io_pbuf_get_region(ctx, bgid);
 	case IORING_MAP_OFF_PARAM_REGION:
 		return &ctx->param_region;
+	case IORING_MAP_OFF_ZCRX_REGION:
+		return &ctx->zcrx_region;
 	}
 	return NULL;
 }
-- 
2.43.0
Re: [PATCH] io_uring: add missing IORING_MAP_OFF_ZCRX_REGION in io_uring_mmap
Posted by Jens Axboe 9 months, 3 weeks ago
On Fri, 21 Feb 2025 15:59:33 +0700, Bui Quang Minh wrote:
> Allow user to mmap the kernel allocated zerocopy-rx refill queue.
> 
> 

Applied, thanks!

[1/1] io_uring: add missing IORING_MAP_OFF_ZCRX_REGION in io_uring_mmap
      commit: 92ade52f26555f15880b42405e35f0cfbb8ea7db

Best regards,
-- 
Jens Axboe
Re: [PATCH] io_uring: add missing IORING_MAP_OFF_ZCRX_REGION in io_uring_mmap
Posted by Pavel Begunkov 9 months, 3 weeks ago
On 2/21/25 08:59, Bui Quang Minh wrote:
> Allow user to mmap the kernel allocated zerocopy-rx refill queue.

Reviewed-by: Pavel Begunkov <asml.silence@gmail.com>

> 
> Signed-off-by: Bui Quang Minh <minhquangbui99@gmail.com>
> ---
>   io_uring/memmap.c | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/io_uring/memmap.c b/io_uring/memmap.c
> index 361134544427..76fcc79656b0 100644
> --- a/io_uring/memmap.c
> +++ b/io_uring/memmap.c
> @@ -271,6 +271,8 @@ static struct io_mapped_region *io_mmap_get_region(struct io_ring_ctx *ctx,
>   		return io_pbuf_get_region(ctx, bgid);
>   	case IORING_MAP_OFF_PARAM_REGION:
>   		return &ctx->param_region;
> +	case IORING_MAP_OFF_ZCRX_REGION:
> +		return &ctx->zcrx_region;
>   	}
>   	return NULL;
>   }

-- 
Pavel Begunkov
RE: [PATCH] io_uring: add missing IORING_MAP_OFF_ZCRX_REGION in io_uring_mmap
Posted by lizetao 9 months, 3 weeks ago
Hi,

> -----Original Message-----
> From: Bui Quang Minh <minhquangbui99@gmail.com>
> Sent: Friday, February 21, 2025 5:00 PM
> To: io-uring@vger.kernel.org
> Cc: Jens Axboe <axboe@kernel.dk>; Pavel Begunkov
> <asml.silence@gmail.com>; David Wei <dw@davidwei.uk>; linux-
> kernel@vger.kernel.org; Bui Quang Minh <minhquangbui99@gmail.com>
> Subject: [PATCH] io_uring: add missing IORING_MAP_OFF_ZCRX_REGION in
> io_uring_mmap
> 
> Allow user to mmap the kernel allocated zerocopy-rx refill queue.
> 

Maybe fixed-tag should be added here.

Other than that, it looks good to me.
Reviewed-by: Li Zetao <lizetao1@huawei.com>

---
Li Zetao
Re: [PATCH] io_uring: add missing IORING_MAP_OFF_ZCRX_REGION in io_uring_mmap
Posted by Pavel Begunkov 9 months, 3 weeks ago
On 2/21/25 09:10, lizetao wrote:
> Hi,
> 
>> -----Original Message-----
>> From: Bui Quang Minh <minhquangbui99@gmail.com>
>> Sent: Friday, February 21, 2025 5:00 PM
>> To: io-uring@vger.kernel.org
>> Cc: Jens Axboe <axboe@kernel.dk>; Pavel Begunkov
>> <asml.silence@gmail.com>; David Wei <dw@davidwei.uk>; linux-
>> kernel@vger.kernel.org; Bui Quang Minh <minhquangbui99@gmail.com>
>> Subject: [PATCH] io_uring: add missing IORING_MAP_OFF_ZCRX_REGION in
>> io_uring_mmap
>>
>> Allow user to mmap the kernel allocated zerocopy-rx refill queue.
>>
> 
> Maybe fixed-tag should be added here.

No need, it's not strictly a fix, and whlist it's not yet sent to
linus, the tags only cause confusion when hashes change, e.g. on rebase.


> Other than that, it looks good to me.
> Reviewed-by: Li Zetao <lizetao1@huawei.com>

-- 
Pavel Begunkov
Re: [PATCH] io_uring: add missing IORING_MAP_OFF_ZCRX_REGION in io_uring_mmap
Posted by Jens Axboe 9 months, 3 weeks ago
On 2/21/25 5:20 AM, Pavel Begunkov wrote:
> On 2/21/25 09:10, lizetao wrote:
>> Hi,
>>
>>> -----Original Message-----
>>> From: Bui Quang Minh <minhquangbui99@gmail.com>
>>> Sent: Friday, February 21, 2025 5:00 PM
>>> To: io-uring@vger.kernel.org
>>> Cc: Jens Axboe <axboe@kernel.dk>; Pavel Begunkov
>>> <asml.silence@gmail.com>; David Wei <dw@davidwei.uk>; linux-
>>> kernel@vger.kernel.org; Bui Quang Minh <minhquangbui99@gmail.com>
>>> Subject: [PATCH] io_uring: add missing IORING_MAP_OFF_ZCRX_REGION in
>>> io_uring_mmap
>>>
>>> Allow user to mmap the kernel allocated zerocopy-rx refill queue.
>>>
>>
>> Maybe fixed-tag should be added here.
> 
> No need, it's not strictly a fix, and whlist it's not yet sent to
> linus, the tags only cause confusion when hashes change, e.g. on rebase.

I do like using fixes still, if only to provide a link to the original
commit without needing to dig for it. And yeah there's the occasional
rebase where I forget to update the sha, but those get discovered pretty
quick.

-- 
Jens Axboe
Re: [PATCH] io_uring: add missing IORING_MAP_OFF_ZCRX_REGION in io_uring_mmap
Posted by Pavel Begunkov 9 months, 3 weeks ago
On 2/21/25 16:39, Jens Axboe wrote:
> On 2/21/25 5:20 AM, Pavel Begunkov wrote:
>> On 2/21/25 09:10, lizetao wrote:
>>> Hi,
>>>
>>>> -----Original Message-----
>>>> From: Bui Quang Minh <minhquangbui99@gmail.com>
>>>> Sent: Friday, February 21, 2025 5:00 PM
>>>> To: io-uring@vger.kernel.org
>>>> Cc: Jens Axboe <axboe@kernel.dk>; Pavel Begunkov
>>>> <asml.silence@gmail.com>; David Wei <dw@davidwei.uk>; linux-
>>>> kernel@vger.kernel.org; Bui Quang Minh <minhquangbui99@gmail.com>
>>>> Subject: [PATCH] io_uring: add missing IORING_MAP_OFF_ZCRX_REGION in
>>>> io_uring_mmap
>>>>
>>>> Allow user to mmap the kernel allocated zerocopy-rx refill queue.
>>>>
>>>
>>> Maybe fixed-tag should be added here.
>>
>> No need, it's not strictly a fix, and whlist it's not yet sent to
>> linus, the tags only cause confusion when hashes change, e.g. on rebase.
> 
> I do like using fixes still, if only to provide a link to the original
> commit without needing to dig for it. And yeah there's the occasional
> rebase where I forget to update the sha, but those get discovered pretty
> quick.

Maybe a "Link" tag would be better or some more inconsequential
"Refers-to", but otherwise you can call it a feature and avoid the
hassle of fixing it up, and people getting spammed by tooling,
and Stephen having to write about broken hashes.

-- 
Pavel Begunkov
Re: [PATCH] io_uring: add missing IORING_MAP_OFF_ZCRX_REGION in io_uring_mmap
Posted by Jens Axboe 9 months, 3 weeks ago
On 2/21/25 10:06 AM, Pavel Begunkov wrote:
> On 2/21/25 16:39, Jens Axboe wrote:
>> On 2/21/25 5:20 AM, Pavel Begunkov wrote:
>>> On 2/21/25 09:10, lizetao wrote:
>>>> Hi,
>>>>
>>>>> -----Original Message-----
>>>>> From: Bui Quang Minh <minhquangbui99@gmail.com>
>>>>> Sent: Friday, February 21, 2025 5:00 PM
>>>>> To: io-uring@vger.kernel.org
>>>>> Cc: Jens Axboe <axboe@kernel.dk>; Pavel Begunkov
>>>>> <asml.silence@gmail.com>; David Wei <dw@davidwei.uk>; linux-
>>>>> kernel@vger.kernel.org; Bui Quang Minh <minhquangbui99@gmail.com>
>>>>> Subject: [PATCH] io_uring: add missing IORING_MAP_OFF_ZCRX_REGION in
>>>>> io_uring_mmap
>>>>>
>>>>> Allow user to mmap the kernel allocated zerocopy-rx refill queue.
>>>>>
>>>>
>>>> Maybe fixed-tag should be added here.
>>>
>>> No need, it's not strictly a fix, and whlist it's not yet sent to
>>> linus, the tags only cause confusion when hashes change, e.g. on rebase.
>>
>> I do like using fixes still, if only to provide a link to the original
>> commit without needing to dig for it. And yeah there's the occasional
>> rebase where I forget to update the sha, but those get discovered pretty
>> quick.
> 
> Maybe a "Link" tag would be better or some more inconsequential
> "Refers-to", but otherwise you can call it a feature and avoid the
> hassle of fixing it up, and people getting spammed by tooling,
> and Stephen having to write about broken hashes.

Having the sha is nice though so people can just look it up. But yeah
the tag doesn't really exist, and I think we have way too many tags
already, which is why I just use Fixes for stuff like that too. Link
is good for email discussion, though 99% of the time it ends up just
being a patch posting and not really interesting...

-- 
Jens Axboe