From: Dragos Tatulea Date: Wed, 27 Aug 2025 14:39:56 +0000 (+0300) Subject: io_uring/zcrx: add support for custom DMA devices X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=59b8b32ac8d469958936fcea781c7f58e3d64742;p=users%2Fhch%2Fmisc.git io_uring/zcrx: add support for custom DMA devices Use the new API for getting a DMA device for a specific netdev queue. This patch will allow io_uring zero-copy rx to work with devices where the DMA device is not stored in the parent device. mlx5 SFs are an example of such a device. Signed-off-by: Dragos Tatulea Reviewed-by: Mina Almasry Reviewed-by: Pavel Begunkov Link: https://patch.msgid.link/20250827144017.1529208-4-dtatulea@nvidia.com Signed-off-by: Jakub Kicinski --- diff --git a/io_uring/zcrx.c b/io_uring/zcrx.c index e5ff49f3425e..319eddfd30e0 100644 --- a/io_uring/zcrx.c +++ b/io_uring/zcrx.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include @@ -599,7 +600,7 @@ int io_register_zcrx_ifq(struct io_ring_ctx *ctx, goto err; } - ifq->dev = ifq->netdev->dev.parent; + ifq->dev = netdev_queue_get_dma_dev(ifq->netdev, ifq->if_rxq); if (!ifq->dev) { ret = -EOPNOTSUPP; goto err;