summaryrefslogtreecommitdiff
path: root/io_uring
diff options
context:
space:
mode:
authorDavid Wei <dw@davidwei.uk>2026-04-03 01:10:24 +0200
committerJakub Kicinski <kuba@kernel.org>2026-04-09 18:21:46 -0700
commit222b5566a02dbf136291376e4aa1806213fe9fa2 (patch)
tree3762248ad9f037a9aa1261a5829b8d7e396e0230 /io_uring
parent5602ad61ebee99c83081fba1aaf5814736edc3e7 (diff)
net: Proxy netdev_queue_get_dma_dev for leased queues
Extend netdev_queue_get_dma_dev to return the physical device of the real rxq for DMA in case the queue was leased. This allows memory providers like io_uring zero-copy or devmem to bind to the physically leased rxq via virtual devices such as netkit. Signed-off-by: David Wei <dw@davidwei.uk> Co-developed-by: Daniel Borkmann <daniel@iogearbox.net> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Reviewed-by: Nikolay Aleksandrov <razor@blackwall.org> Link: https://patch.msgid.link/20260402231031.447597-8-daniel@iogearbox.net Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'io_uring')
-rw-r--r--io_uring/zcrx.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/io_uring/zcrx.c b/io_uring/zcrx.c
index d3ec63c83d0c..f4a7809ba0c2 100644
--- a/io_uring/zcrx.c
+++ b/io_uring/zcrx.c
@@ -829,7 +829,8 @@ int io_register_zcrx_ifq(struct io_ring_ctx *ctx,
}
netdev_hold(ifq->netdev, &ifq->netdev_tracker, GFP_KERNEL);
- ifq->dev = netdev_queue_get_dma_dev(ifq->netdev, reg.if_rxq);
+ ifq->dev = netdev_queue_get_dma_dev(ifq->netdev, reg.if_rxq,
+ NETDEV_QUEUE_TYPE_RX);
if (!ifq->dev) {
ret = -EOPNOTSUPP;
goto netdev_put_unlock;