[PATCH io_uring-7.1 v2 5/5] io_uring/zcrx: use correct mmap off constants

Pavel Begunkov
2026-03-25T13:09:24Z

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>
---
io_uring/zcrx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/io_uring/zcrx.c b/io_uring/zcrx.c
index e1d2e1f1b766..df8dae724be4 100644
--- a/io_uring/zcrx.c
+++ b/io_uring/zcrx.c
@@ -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 += id << IORING_OFF_PBUF_SHIFT;
+ mmap_offset += id << IORING_OFF_ZCRX_SHIFT;

ret = io_create_region(ctx, &ifq->rq_region, rd, mmap_offset);
if (ret < 0)
--
2.53.0