Skip to contentSkip to conversation

io_uring: add missing IORING_MAP_OFF_ZCRX_REGION in io_uring_mmap

PATCH Applied Bui Quang Minh 4 participants 8 messages Feb 21, 2025 io_uring

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 io_uring: add missing IORING_MAP_OFF_ZCRX_REGION in io_uring_mmap

Allow user to mmap the kernel allocated zerocopy-rx refill queue.

---
 io_uring/memmap.c | 2 ++
 1 file changed, 2 insertions(+)
io_uring/memmap.c +2 -0
index 361134544427..76fcc79656b0 100644
@@ -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;
 }
Signature · 1 line
2.43.0
Reviewed-by on v1 1/1
#1 lore raw

Hi,

Quoted 10 lines

-----Original Message-----
From: Bui Quang Minh <[email protected]>
Sent: Friday, February 21, 2025 5:00 PM
To: [email protected]
Cc: Jens Axboe <[email protected]>; Pavel Begunkov <[email protected]>; David Wei <[email protected]>; linux- [email protected]; Bui Quang Minh <[email protected]>
Subject: [PATCH] io_uring: add missing IORING_MAP_OFF_ZCRX_REGION in io_uring_mmap

Quoted 2 lines

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.

---
Li Zetao

#2 lore raw
Quoted 12 lines · lizetao

Hi,

Quoted 10 lines

-----Original Message-----
From: Bui Quang Minh <[email protected]>
Sent: Friday, February 21, 2025 5:00 PM
To: [email protected]
Cc: Jens Axboe <[email protected]>; Pavel Begunkov <[email protected]>; David Wei <[email protected]>; linux- [email protected]; Bui Quang Minh <[email protected]>
Subject: [PATCH] io_uring: add missing IORING_MAP_OFF_ZCRX_REGION in io_uring_mmap

Quoted 4 lines
Quoted 2 lines

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.

Quoted 2 lines

Other than that, it looks good to me.

Signature · 1 line
Pavel Begunkov
maintainer
#3 lore raw
Quoted 13 lines · Pavel Begunkov
Quoted 12 lines · lizetao

Hi,

Quoted 10 lines

-----Original Message-----
From: Bui Quang Minh <[email protected]>
Sent: Friday, February 21, 2025 5:00 PM
To: [email protected]
Cc: Jens Axboe <[email protected]>; Pavel Begunkov <[email protected]>; David Wei <[email protected]>; linux- [email protected]; Bui Quang Minh <[email protected]>
Subject: [PATCH] io_uring: add missing IORING_MAP_OFF_ZCRX_REGION in io_uring_mmap

Quoted 7 lines
Quoted 4 lines
Quoted 2 lines

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.

Signature · 1 line
Jens Axboe
#4 lore raw
Quoted 19 lines · Jens Axboe
Quoted 18 lines · Pavel Begunkov
Quoted 16 lines · lizetao

Hi,

Quoted 10 lines

-----Original Message-----
From: Bui Quang Minh <[email protected]>
Sent: Friday, February 21, 2025 5:00 PM
To: [email protected]
Cc: Jens Axboe <[email protected]>; Pavel Begunkov <[email protected]>; David Wei <[email protected]>; linux- [email protected]; Bui Quang Minh <[email protected]>
Subject: [PATCH] io_uring: add missing IORING_MAP_OFF_ZCRX_REGION in io_uring_mmap

Quoted 2 lines

Allow user to mmap the kernel allocated zerocopy-rx refill queue.

Maybe fixed-tag should be added here.

Quoted 7 lines
Quoted 2 lines

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.

Signature · 1 line
Pavel Begunkov
maintainer
#5 lore raw
Quoted 28 lines · Pavel Begunkov
Quoted 19 lines · Jens Axboe
Quoted 18 lines · Pavel Begunkov
Quoted 16 lines · lizetao

Hi,

Quoted 10 lines

-----Original Message-----
From: Bui Quang Minh <[email protected]>
Sent: Friday, February 21, 2025 5:00 PM
To: [email protected]
Cc: Jens Axboe <[email protected]>; Pavel Begunkov <[email protected]>; David Wei <[email protected]>; linux- [email protected]; Bui Quang Minh <[email protected]>
Subject: [PATCH] io_uring: add missing IORING_MAP_OFF_ZCRX_REGION in io_uring_mmap

Quoted 2 lines

Allow user to mmap the kernel allocated zerocopy-rx refill queue.

Maybe fixed-tag should be added here.

Quoted 7 lines
Quoted 2 lines

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.

Quoted 4 lines

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...

Signature · 1 line
Jens Axboe
Reviewed-by on v1 1/1
#6 lore raw
In reply to Bui Quang Minh
Quoted 1 line · Bui Quang Minh

Allow user to mmap the kernel allocated zerocopy-rx refill queue.

Quoted 19 lines
---
  io_uring/memmap.c | 2 ++
  1 file changed, 2 insertions(+)
io_uring/memmap.c +2 -0
index 361134544427..76fcc79656b0 100644
@@ -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;
  }
Signature · 1 line
Pavel Begunkov
maintainer Applied
#7 lore raw
In reply to Bui Quang Minh
Quoted 3 lines · Bui Quang Minh

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,

Signature · 1 line
Jens Axboe