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

Tariq Toukan posted 8 patches 2 weeks, 6 days ago
There is a newer version of this series
.../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(-)
[PATCH net-next 0/8] net/mlx5: Prepare eswitch infrastructure for satellite PF support
Posted by Tariq Toukan 2 weeks, 6 days ago
Hi,

See detailed description by Moshe below.

Regards,
Tariq

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.

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: 8b2feced65cd3aa0597d596ed5733a1abd4c4d78
-- 
2.44.0
Re: [PATCH net-next 0/8] net/mlx5: Prepare eswitch infrastructure for satellite PF support
Posted by Jakub Kicinski 2 weeks, 2 days ago
On Sun, 10 May 2026 08:34:40 +0300 Tariq Toukan wrote:
> This series prepares the mlx5 eswitch command interface and vport
> infrastructure for satellite PF support.

Could you perhaps start by explaining what "satellite PF" is?
And how it differs from "socket direct"
Re: [PATCH net-next 0/8] net/mlx5: Prepare eswitch infrastructure for satellite PF support
Posted by Moshe Shemesh 2 weeks, 1 day ago

On 5/14/2026 5:25 AM, Jakub Kicinski wrote:
> External email: Use caution opening links or attachments
> 
> 
> On Sun, 10 May 2026 08:34:40 +0300 Tariq Toukan wrote:
>> This series prepares the mlx5 eswitch command interface and vport
>> infrastructure for satellite PF support.
> 
> Could you perhaps start by explaining what "satellite PF" is?
> And how it differs from "socket direct"

Satellite PF is another type of Physical Function, its role and 
privileges are similar to the host PF, but unlike host PF the Satellite 
PF is on the DPU and not on another host. So it's kind of "Satellite" 
for the ECPF which is also on the DPU.

The next patchset will introduce the Satellite PF, while this patchset 
only does some preparations. Small changes to prepare the eswitch to 
manage another PF.

While Socket Direct is a hardware PCIe topology, that adds another PCIe 
link to the NIC, the Satellite PF is just logical entity, by firmware 
configuration, no hardware change.

Thanks, Moshe.
Re: [PATCH net-next 0/8] net/mlx5: Prepare eswitch infrastructure for satellite PF support
Posted by Jakub Kicinski 2 weeks, 1 day ago
On Thu, 14 May 2026 10:56:26 +0300 Moshe Shemesh wrote:
> Satellite PF is another type of Physical Function, its role and 
> privileges are similar to the host PF, but unlike host PF the Satellite 
> PF is on the DPU and not on another host. So it's kind of "Satellite" 
> for the ECPF which is also on the DPU.

Do you genuinely think these 2 sentences explain anything?

Maybe it's just me. If anyone reading this thinks Moshe's explanation
clarifies things - please speak up..
Re: [PATCH net-next 0/8] net/mlx5: Prepare eswitch infrastructure for satellite PF support
Posted by Moshe Shemesh 2 weeks ago

On 5/15/2026 2:16 AM, Jakub Kicinski wrote:
> On Thu, 14 May 2026 10:56:26 +0300 Moshe Shemesh wrote:
>> Satellite PF is another type of Physical Function, its role and
>> privileges are similar to the host PF, but unlike host PF the Satellite
>> PF is on the DPU and not on another host. So it's kind of "Satellite"
>> for the ECPF which is also on the DPU.
> 
> Do you genuinely think these 2 sentences explain anything?
> 
> Maybe it's just me. If anyone reading this thinks Moshe's explanation
> clarifies things - please speak up..

OK, let me explain the idea of this feature:
Currently in Smartnic configuration we have 2 Physical Functions : one 
is the ECPF on the DPU, and it is the eswitch manager and page manager, 
while the other is the host PF on the external host and it doesn't have 
privileges of eswitch manager or page manager.

Now we have a new Smartnic configuration that adds another physical 
function, on the DPU, that is not eswitch manager and not page manager. 
The new PF can have its own SFs and the customer can passthrough this 
Satellite PF to a VM on the DPU and give it to a user that should not 
have access to the ECPF privileged function.
As will be shown in the next patchset, the ECPF handles the Satellite PF 
and the Host PF in a similar way, using the same management framework.
Re: [PATCH net-next 0/8] net/mlx5: Prepare eswitch infrastructure for satellite PF support
Posted by Jakub Kicinski 2 weeks ago
On Fri, 15 May 2026 12:36:50 +0300 Moshe Shemesh wrote:
> Now we have a new Smartnic configuration that adds another physical 
> function, on the DPU, that is not eswitch manager and not page manager. 
> The new PF can have its own SFs and the customer can passthrough this 
> Satellite PF to a VM on the DPU and give it to a user that should not 
> have access to the ECPF privileged function.
> As will be shown in the next patchset, the ECPF handles the Satellite PF 
> and the Host PF in a similar way, using the same management framework.

Makes sense! Please respin with this in the cover letter and the
clarification in patch 2. Thanks!
Re: [PATCH net-next 0/8] net/mlx5: Prepare eswitch infrastructure for satellite PF support
Posted by Paolo Abeni 2 weeks, 1 day ago
On 5/14/26 9:56 AM, Moshe Shemesh wrote:
> On 5/14/2026 5:25 AM, Jakub Kicinski wrote:
>> External email: Use caution opening links or attachments
>>
>>
>> On Sun, 10 May 2026 08:34:40 +0300 Tariq Toukan wrote:
>>> This series prepares the mlx5 eswitch command interface and vport
>>> infrastructure for satellite PF support.
>>
>> Could you perhaps start by explaining what "satellite PF" is?
>> And how it differs from "socket direct"
> 
> Satellite PF is another type of Physical Function, its role and 
> privileges are similar to the host PF, but unlike host PF the Satellite 
> PF is on the DPU and not on another host. So it's kind of "Satellite" 
> for the ECPF which is also on the DPU.
> 
> The next patchset will introduce the Satellite PF, while this patchset 
> only does some preparations. Small changes to prepare the eswitch to 
> manage another PF.
> 
> While Socket Direct is a hardware PCIe topology, that adds another PCIe 
> link to the NIC, the Satellite PF is just logical entity, by firmware 
> configuration, no hardware change.

My understanding is that Jakub wants you to capture the above info in
the cover letter.

Thanks,

Paolo
Re: [PATCH net-next 0/8] net/mlx5: Prepare eswitch infrastructure for satellite PF support
Posted by Paolo Abeni 2 weeks, 1 day ago
On 5/14/26 11:53 AM, Paolo Abeni wrote:
> On 5/14/26 9:56 AM, Moshe Shemesh wrote:
>> On 5/14/2026 5:25 AM, Jakub Kicinski wrote:
>>> External email: Use caution opening links or attachments
>>>
>>>
>>> On Sun, 10 May 2026 08:34:40 +0300 Tariq Toukan wrote:
>>>> This series prepares the mlx5 eswitch command interface and vport
>>>> infrastructure for satellite PF support.
>>>
>>> Could you perhaps start by explaining what "satellite PF" is?
>>> And how it differs from "socket direct"
>>
>> Satellite PF is another type of Physical Function, its role and 
>> privileges are similar to the host PF, but unlike host PF the Satellite 
>> PF is on the DPU and not on another host. So it's kind of "Satellite" 
>> for the ECPF which is also on the DPU.
>>
>> The next patchset will introduce the Satellite PF, while this patchset 
>> only does some preparations. Small changes to prepare the eswitch to 
>> manage another PF.
>>
>> While Socket Direct is a hardware PCIe topology, that adds another PCIe 
>> link to the NIC, the Satellite PF is just logical entity, by firmware 
>> configuration, no hardware change.
> 
> My understanding is that Jakub wants you to capture the above info in
> the cover letter.

I take my own words back. Actually I'm not sure about the above and
given the constant ML flood I think we prefer to avoid a repost if
possible. The series LGTM, please wait a bit for Jakub eventual explicit
repost request.

Thanks,

Paolo