From 3a0ac202534bcd397e6fd744b6d1038d372c5b5e Mon Sep 17 00:00:00 2001 From: Feng Zhou Date: Fri, 12 Sep 2025 22:01:33 +0800 Subject: [PATCH] io_uring/zcrx: fix ifq->if_rxq is -1, get dma_dev is NULL ifq->if_rxq has not been assigned, is -1, the correct value is in reg.if_rxq. Fixes: 59b8b32ac8d469958936fcea781c7f58e3d64742 ("io_uring/zcrx: add support for custom DMA devices") Signed-off-by: Feng Zhou Reviewed-by: Jens Axboe Link: https://patch.msgid.link/20250912140133.97741-1-zhoufeng.zf@bytedance.com Signed-off-by: Jakub Kicinski --- 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 319eddfd30e09..3639283c87ca6 100644 --- a/io_uring/zcrx.c +++ b/io_uring/zcrx.c @@ -600,7 +600,7 @@ int io_register_zcrx_ifq(struct io_ring_ctx *ctx, goto err; } - ifq->dev = netdev_queue_get_dma_dev(ifq->netdev, ifq->if_rxq); + ifq->dev = netdev_queue_get_dma_dev(ifq->netdev, reg.if_rxq); if (!ifq->dev) { ret = -EOPNOTSUPP; goto err; -- 2.47.3