[RFC net-next 2/4] io_uring/zcrx: Use the new netdev_get_dma_dev() API

Dragos Tatulea posted 4 patches 3 months, 1 week ago
[RFC net-next 2/4] io_uring/zcrx: Use the new netdev_get_dma_dev() API
Posted by Dragos Tatulea 3 months, 1 week ago
Using the new DMA dev helper API, there will be an early failure if the
device does not support DMA.

Signed-off-by: Dragos Tatulea <dtatulea@nvidia.com>
---
 io_uring/zcrx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/io_uring/zcrx.c b/io_uring/zcrx.c
index 797247a34cb7..93462e5b2207 100644
--- a/io_uring/zcrx.c
+++ b/io_uring/zcrx.c
@@ -584,7 +584,7 @@ int io_register_zcrx_ifq(struct io_ring_ctx *ctx,
 		goto err;
 	}
 
-	ifq->dev = ifq->netdev->dev.parent;
+	ifq->dev = netdev_get_dma_dev(ifq->netdev);
 	if (!ifq->dev) {
 		ret = -EOPNOTSUPP;
 		goto err;
-- 
2.50.0