]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
queue_api: add support for fetching per queue DMA dev
authorDragos Tatulea <dtatulea@nvidia.com>
Wed, 27 Aug 2025 14:39:55 +0000 (17:39 +0300)
committerJakub Kicinski <kuba@kernel.org>
Thu, 28 Aug 2025 23:05:31 +0000 (16:05 -0700)
commit13d8e05adf9dd06c74fcc6ba42ec4bf780fd557f
tree2483b3ad5fc18805b57f0cac4dc17b08e81baf6f
parent14cd01c28fb1e77d9bb55bd43fd8df6d584e284a
queue_api: add support for fetching per queue DMA dev

For zerocopy (io_uring, devmem), there is an assumption that the
parent device can do DMA. However that is not always the case:
- Scalable Function netdevs [1] have the DMA device in the grandparent.
- For Multi-PF netdevs [2] queues can be associated to different DMA
devices.

This patch introduces the a queue based interface for allowing drivers
to expose a different DMA device for zerocopy.

[1] Documentation/networking/device_drivers/ethernet/mellanox/mlx5/switchdev.rst
[2] Documentation/networking/multi-pf-netdev.rst

Signed-off-by: Dragos Tatulea <dtatulea@nvidia.com>
Reviewed-by: Pavel Begunkov <asml.silence@gmail.com>
Reviewed-by: Mina Almasry <almasrymina@google.com>
Link: https://patch.msgid.link/20250827144017.1529208-3-dtatulea@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
include/net/netdev_queues.h
net/core/Makefile
net/core/netdev_queues.c [new file with mode: 0644]