Skip to content

Commit 7a9ffcf

Browse files
isilenceaxboe
authored andcommitted
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: 8c0cab0 ("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>
1 parent 5c34e65 commit 7a9ffcf

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

io_uring/zcrx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ static int io_area_max_shift(struct io_zcrx_mem *mem)
6363
unsigned i;
6464

6565
for_each_sgtable_dma_sg(sgt, sg, i)
66-
shift = min(shift, __ffs(sg->length));
66+
shift = min(shift, __ffs(sg_dma_len(sg)));
6767
return shift;
6868
}
6969

0 commit comments

Comments
 (0)