Message ID | 20250221085933.26034-1-minhquangbui99@gmail.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | io_uring: add missing IORING_MAP_OFF_ZCRX_REGION in io_uring_mmap | expand |
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
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; > }
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>
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.
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,
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.
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...
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; }
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(+)