Skip to content

net/mlx5: Prepare eswitch infrastructure for satellite PF support

Tariq Toukan linux-rdma lkml netdev 2 versions – Applied

Status from this message: This series was applied to netdev/net-next.git (main)

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest8 patches 2 repliesApplied 8/8
  2. v18 patches 11 repliesSuperseded

Changes in v2 from the cover letter

- Add clarifications on vhca states of PFs.
- Add background on satellite PF feature.

Patches in v2 All 8 applied

#Subject and filesSizeRepliesApplied
1/8net/mlx5: Use helper to parse host PF infodrivers/net/ethernet/mellanox/mlx5/core/eswitch.c drivers/net/ethernet/mellanox/mlx5/core/eswitch.h drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c +1 more+62 -380 repliesApplied
2/8net/mlx5: Use v1 response layout for query_esw_functionsdrivers/net/ethernet/mellanox/mlx5/core/eswitch.c drivers/net/ethernet/mellanox/mlx5/core/eswitch.h drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c +1 more+89 -120 repliesApplied
3/8net/mlx5: Use mlx5_eswitch_is_vf_vport() for IPsec VF checksdrivers/net/ethernet/mellanox/mlx5/core/esw/ipsec.c drivers/net/ethernet/mellanox/mlx5/core/eswitch.c+3 -31 replyApplied
4/8net/mlx5: Switch vport HCA cap helpers to kvzallocdrivers/net/ethernet/mellanox/mlx5/core/vport.c+4 -41 replyApplied
5/8net/mlx5: Add mlx5_vport_set_other_func_general_cap macrodrivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c drivers/net/ethernet/mellanox/mlx5/core/mlx5_core.h+6 -20 repliesApplied
6/8net/mlx5: Refactor mlx5_set_msix_vec_count() SET_HCA_CAPdrivers/net/ethernet/mellanox/mlx5/core/pci_irq.c+7 -200 repliesApplied
7/8net/mlx5: Use vport helper for IPsec eswitch set capsdrivers/net/ethernet/mellanox/mlx5/core/esw/ipsec.c+23 -580 repliesApplied
8/8net/mlx5: Generalize enable/disable HCA for any PF vportdrivers/net/ethernet/mellanox/mlx5/core/ecpf.c drivers/net/ethernet/mellanox/mlx5/core/ecpf.h drivers/net/ethernet/mellanox/mlx5/core/eswitch.c +2 more+42 -200 repliesApplied

Reviews trailers per patch

1 of 8 patches has a Reviewed-by or Acked-by.

PatchSimon Horman
1/8R-b
2/8
3/8
4/8
5/8
6/8
7/8
8/8

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH net-next V2 0/8] net/mlx5: Prepare eswitch infrastructure for satellite PF support

Hi,

See detailed description by Moshe below.

Regards,
Tariq

A satellite PF is a new SmartNIC configuration that adds another physical function on the DPU that is not an eswitch manager and not a page manager. The satellite PF can have its own SFs and can be passed through to a VM on the DPU, providing an isolated function for users who should not have access to the privileged ECPF. The ECPF handles the satellite PF and the host PF in a similar way, using the same management framework.

This series prepares the mlx5 eswitch command interface and vport infrastructure for satellite PF support.

The first two patches abstract host PF data parsing behind a helper and switch to the v1 response layout for query_esw_functions when supported, so callers are insulated from layout differences.

The IPsec VF checks are tightened to use mlx5_eswitch_is_vf_vport() instead of comparing against a specific vport number.

The remaining patches refactor SET_HCA_CAP and enable/disable_hca command helpers to support vhca_id-based addressing, which is required for managing functions that are not directly addressable by function_id.

A follow-up series will introduce satellite PF discovery and management using this infrastructure.

V2:
- Add clarifications on vhca states of PFs.
- Add background on satellite PF feature.

V1:
https://lore.kernel.org/all/[email protected]/

Moshe Shemesh (8):
net/mlx5: Use helper to parse host PF info net/mlx5: Use v1 response layout for query_esw_functions net/mlx5: Use mlx5_eswitch_is_vf_vport() for IPsec VF checks net/mlx5: Switch vport HCA cap helpers to kvzalloc net/mlx5: Add mlx5_vport_set_other_func_general_cap macro net/mlx5: Refactor mlx5_set_msix_vec_count() SET_HCA_CAP net/mlx5: Use vport helper for IPsec eswitch set caps net/mlx5: Generalize enable/disable HCA for any PF vport

 .../net/ethernet/mellanox/mlx5/core/ecpf.c    |  24 ++-
 .../net/ethernet/mellanox/mlx5/core/ecpf.h    |   4 +-
 .../ethernet/mellanox/mlx5/core/esw/ipsec.c   |  83 +++------
 .../net/ethernet/mellanox/mlx5/core/eswitch.c | 157 +++++++++++++++---
 .../net/ethernet/mellanox/mlx5/core/eswitch.h |  16 ++
 .../mellanox/mlx5/core/eswitch_offloads.c     |  38 ++---
 .../ethernet/mellanox/mlx5/core/mlx5_core.h   |   6 +
 .../net/ethernet/mellanox/mlx5/core/pci_irq.c |  27 +--
 .../net/ethernet/mellanox/mlx5/core/sriov.c   |   8 +-
 .../net/ethernet/mellanox/mlx5/core/vport.c   |  12 +-
 10 files changed, 227 insertions(+), 148 deletions(-)

base-commit: 627ac78f2741e2ebd2225e2e953b6964a8a9182f

Signature · 1 line
2.44.0