]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net/mlx5e: add op for getting netdev DMA device
authorDragos Tatulea <dtatulea@nvidia.com>
Wed, 27 Aug 2025 14:39:58 +0000 (17:39 +0300)
committerJakub Kicinski <kuba@kernel.org>
Thu, 28 Aug 2025 23:05:31 +0000 (16:05 -0700)
commitf1debf1a2ef44ca1baa15a0cc088cb2be1f95449
treec98d8c0a7a25abec8ba959aaef00bbb288d62842
parent7c7e94603a76d62efbc4da4d0eb7a221add0ecfa
net/mlx5e: add op for getting netdev DMA device

For zero-copy (devmem, io_uring), the netdev DMA device used
is the parent device of the net device. However that is not
always accurate for mlx5 devices:
- SFs: The parent device is an auxdev.
- Multi-PF netdevs: The DMA device should be determined by
  the queue.

This change implements the DMA device queue API that returns the DMA
device appropriately for all cases.

Signed-off-by: Dragos Tatulea <dtatulea@nvidia.com>
Reviewed-by: Mina Almasry <almasrymina@google.com>
Link: https://patch.msgid.link/20250827144017.1529208-6-dtatulea@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/mellanox/mlx5/core/en_main.c