summaryrefslogtreecommitdiff
path: root/io_uring
diff options
context:
space:
mode:
authorPavel Begunkov <asml.silence@gmail.com>2026-03-31 22:07:42 +0100
committerJens Axboe <axboe@kernel.dk>2026-04-02 06:55:47 -0600
commit7120b87bed922ae2f1968c081377162380e1547e (patch)
tree3f9c46970503b0a367a593b085dd9e0e87f00a92 /io_uring
parent52dcd1776bed614c6a270d9237df6105feab4c14 (diff)
downloadlinux-next-7120b87bed922ae2f1968c081377162380e1547e.tar.gz
linux-next-7120b87bed922ae2f1968c081377162380e1547e.zip
io_uring/zcrx: use dma_len for chunk size calculation
Buffers are now dma-mapped earlier and we can sg_dma_len(), otherwise, since it's walking with for_each_sgtable_dma_sg(), it might wrongfully reject some configurations. As a bonus, it'd now be able to use larger chunks if dma addresses are coalesced e.g by iommu. Fixes: 8c0cab0b7bf7 ("io_uring/zcrx: always dma map in advance") Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Link: https://patch.msgid.link/03b219af3f6cfdd1cf64679b8bab7461e47cc123.1774780198.git.asml.silence@gmail.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'io_uring')
-rw-r--r--io_uring/zcrx.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/io_uring/zcrx.c b/io_uring/zcrx.c
index d84ad40eae49..3bf800426fd2 100644
--- a/io_uring/zcrx.c
+++ b/io_uring/zcrx.c
@@ -63,7 +63,7 @@ static int io_area_max_shift(struct io_zcrx_mem *mem)
unsigned i;
for_each_sgtable_dma_sg(sgt, sg, i)
- shift = min(shift, __ffs(sg->length));
+ shift = min(shift, __ffs(sg_dma_len(sg)));
return shift;
}