diff options
| author | Dragos Tatulea <dtatulea@nvidia.com> | 2025-08-27 17:39:56 +0300 |
|---|---|---|
| committer | Jakub Kicinski <kuba@kernel.org> | 2025-08-28 16:05:31 -0700 |
| commit | 59b8b32ac8d469958936fcea781c7f58e3d64742 (patch) | |
| tree | dbf45074ac7e35524c5807addfe4fd0fb9d4e70b /io_uring/zcrx.c | |
| parent | 13d8e05adf9dd06c74fcc6ba42ec4bf780fd557f (diff) | |
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 <dtatulea@nvidia.com>
Reviewed-by: Mina Almasry <almasrymina@google.com>
Reviewed-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://patch.msgid.link/20250827144017.1529208-4-dtatulea@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'io_uring/zcrx.c')
| -rw-r--r-- | io_uring/zcrx.c | 3 |
1 files changed, 2 insertions, 1 deletions
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 <net/page_pool/helpers.h> #include <net/page_pool/memory_provider.h> #include <net/netlink.h> +#include <net/netdev_queues.h> #include <net/netdev_rx_queue.h> #include <net/tcp.h> #include <net/rps.h> @@ -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; |
