mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
synced 2026-10-29 05:12:59 +01:00
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 <[email protected]> Reviewed-by: Mina Almasry <[email protected]> Reviewed-by: Pavel Begunkov <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
This commit is contained in:
1 parent
13d8e05adf
commit
59b8b32ac8
1 file changed
+2
-1
+2
-1
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user