]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
io_uring/zcrx: use correct mmap off constants
authorPavel Begunkov <asml.silence@gmail.com>
Tue, 31 Mar 2026 21:07:43 +0000 (22:07 +0100)
committerJens Axboe <axboe@kernel.dk>
Thu, 2 Apr 2026 12:55:48 +0000 (06:55 -0600)
zcrx was using IORING_OFF_PBUF_SHIFT during first iterations, but there
is now a separate constant it should use. Both are 16 so it doesn't
change anything, but improve it for the future.

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://patch.msgid.link/fe16ebe9ba4048a7e12f9b3b50880bd175b1ce03.1774780198.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
io_uring/zcrx.c

index 3bf800426fd20be204e004af6b313f1f099c1993..bd970fb084c19af7c13a87651f26d5031c2f9419 100644 (file)
@@ -386,7 +386,7 @@ static int io_allocate_rbuf_ring(struct io_ring_ctx *ctx,
                return -EINVAL;
 
        mmap_offset = IORING_MAP_OFF_ZCRX_REGION;
-       mmap_offset += (u64)id << IORING_OFF_PBUF_SHIFT;
+       mmap_offset += (u64)id << IORING_OFF_ZCRX_SHIFT;
 
        ret = io_create_region(ctx, &ifq->rq_region, rd, mmap_offset);
        if (ret < 0)