Thread (27 messages) 27 messages, 4 authors, 1d ago

[PATCH net-next 00/10] net/mlx5e: Add netdev support for data direct

flat view
WARM1d

From: Tariq Toukan <tariqt@nvidia.com>
Date: 2026-10-08 13:28:55
Also in: linux-rdma, lkml

Hi,

This patch series by Dragos adds data direct support for netdev devices,
allowing a mlx5 netdev to issue DMA commands through multiple paths.
This feature is critical for improving performance and reaching line
rate in certain environments where issuing PCI transactions over one
path may be significantly faster than over another. These differences
can arise from various PCI generations in the system or the specific
system topology.

Data direct for netdev will work with devmem by returning the data
direct DMA device instead of the DMA device of the NIC. Each PF netdev
registers its own data direct device and support for RX and TX datapath
is added. The feature is selected through a new data direct priv flag.

The feature is enabled though a ethtool private flag. When this flag
is enabled, the driver will return the data direct device in the
ndo_queue_get_dma_dev op.

During data_direct device unbind, a re-creation of the channels is
triggered.

A note about the unbind: it does not does not tear down dmabuf bindings
attached to the data direct device; the recreated channels will still
pick up the binding via rxq->mp_params and post DMA addresses from the
data direct IOMMU domain to the PF, causing IOMMU faults. A devmem
revoke hook is needed to close those bindings before the switch. This is
out of scope for this series.

A note about io_uring support: currently io_uring rejects the
configuration where the dmabuf dev != page_pool dev.

Regards,
Tariq

[1] https://lore.kernel.org/all/cover.1722512548.git.leon@kernel.org/ (local)

Dragos Tatulea (10):
  net/mlx5: Log the data direct to PF device mapping
  net/mlx5e: Register supported netdevs as data direct users
  net/mlx5e: Pre-calculate UMR padding and entry size
  net/mlx5e: Add data direct ethtool private flag
  net/mlx5e: Add data direct RX infrastructure
  net/mlx5e: Add data direct TX infrastructure
  net/mlx5e: Use the correct DMA dev when data_direct pdev enabled
  net/mlx5e: Recreate netdev channels on data direct device unbind
  net: devmem: add netdev_has_dmabuf_binding() helper
  net/mlx5e: Enable the data direct netdev feature

 .../ethernet/mellanox/mlx5/core/data_direct.c |   5 +
 drivers/net/ethernet/mellanox/mlx5/core/en.h  |  13 ++
 .../ethernet/mellanox/mlx5/core/en/params.c   |   5 +
 .../ethernet/mellanox/mlx5/core/en/params.h   |   2 +
 .../mellanox/mlx5/core/en/reporter_rx.c       |   1 +
 .../mellanox/mlx5/core/en/reporter_tx.c       |   1 +
 .../ethernet/mellanox/mlx5/core/en_common.c   |  38 +++-
 .../ethernet/mellanox/mlx5/core/en_ethtool.c  |  40 ++++
 .../net/ethernet/mellanox/mlx5/core/en_main.c | 173 +++++++++++++++++-
 .../net/ethernet/mellanox/mlx5/core/en_rx.c   |  28 +--
 .../net/ethernet/mellanox/mlx5/core/en_tx.c   |   4 +-
 include/linux/mlx5/driver.h                   |   1 +
 include/net/netmem.h                          |  23 +++
 net/core/devmem.c                             |  30 +++
 net/core/devmem.h                             |   2 +
 15 files changed, 342 insertions(+), 24 deletions(-)


base-commit: 8df0638138d3e0344fd1fb36cf2d1ca1cf5028f0
-- 
2.44.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help