public inbox for dev@dpdk.org
 help / color / mirror / Atom feed
From: Raslan Darawsheh <rasland@nvidia.com>
To: Dariusz Sosnowski <dsosnowski@nvidia.com>,
	Viacheslav Ovsiienko <viacheslavo@nvidia.com>,
	Bing Zhao <bingz@nvidia.com>, Ori Kam <orika@nvidia.com>,
	Suanming Mou <suanmingm@nvidia.com>,
	Matan Azrad <matan@nvidia.com>
Cc: dev@dpdk.org
Subject: Re: [PATCH v2 0/3] net/mlx5: net/mlx5: fix probing to allow BlueField Socket Direct
Date: Tue, 10 Mar 2026 10:16:19 +0200	[thread overview]
Message-ID: <b30b45a5-1a23-465f-9787-2d85559d2593@nvidia.com> (raw)
In-Reply-To: <20260304105718.93412-1-dsosnowski@nvidia.com>

Hi,

On 04/03/2026 12:57 PM, Dariusz Sosnowski wrote:
> Goal of this patchset is to fix probing logic in mlx5 networking PMD
> to allow support of BlueField DPUs with Socket Direct.
> In such use case, BlueField DPU will be connected through PCI
> to 2 different CPUs on the host.
> Each host CPU sees 2 PFs.
> Each PF is connected to one of the physical ports.
> 
>      +--------+               +--------+
>      |CPU 0   |               |CPU 1   |
>      |        |               |        |
>      |    pf0 |               |    pf0 |
>      |        |               |        |
>      |    pf1 |               |    pf1 |
>      |        |               |        |
>      +---+----+               +-+------+
>          |                      |
>          |                      |
>          |                      |
>          +----+           +-----+
>               |           |
>               |           |
>               |           |
>           +---+-----------+----+
>           |BF3 DPU             |
>           |                    |
>           | pf0hpf      pf1hpf |
>           |                    |
>           | pf2hpf      pf3hpf |
>           |                    |
>           |  p0          p1    |
>           +------+------+------+
>           | phy0 |      | phy1 |
>           +------+      +------+
> 
> On BlueField DPU ARM Linux netdevs map to PFs/ports as follows:
> 
> - p0 and p1 to physical ports 0 and 1 respectively,
> - pf0hpf and pf2hpf to CPU0 pf0 and CPU1 pf0 respectively,
> - pf1hpf and pf3hpf to CPU0 pf1 and CPU1 pf1 respectively.
> 
> There are several possible ways to use such a setup:
> 
> - Single E-Switch (embedded switch) per each CPU PF to
>    physical port connection.
> - Shared E-Switch for related CPU PFs:
>      - For example, both pf0hpf and pf2hpf are in the same E-Switch.
> - Multiport E-Switch.
> 
> Existing probing logic in mlx5 PMD did not support case (2).
> In this case there is one physical port (uplink in mlx5 naming)
> and 2 host PFs.
> On such a setup mlx5 generated port names with the following syntax:
> 
>      03:00.0_representor_vfX
> 
> Port name syntax was selected based on specific setup type.
> Since setup was not recognized as neither bond nor MPESW,
> mlx5 selected the default name without PF index.
> Since BlueField with Socket Direct would have 2 host PFs,
> such probing logic caused DPDK port name collisions
> on the attempt to probe 2 host PFs at the same time.
> 
> More over there were some false positives during probing on systems
> with or without specific udev rules which change mlx5 IB device
> name to include "bond" in the name.
> 
> This patchset addresses the above:
> 
> - Patch 1 and 2 - Fixes bond detection logic.
>    Previously mlx5 PMD relied on "bond" appearing in IB device name
>    which is not always the case. Moved to sysfs checks.
> - Patch 3 - Fixed uplink and host PF probing logic.
>    Previously mlx5 PMD relied on specific setup type.
>    With this patch probing is more generic and based on
>    types and number of available ports on the E-Switch.
> 
> With this patchset, a DPDK application run on BlueField ARM is able to
> probe all the relevant representors (corresponding to available netdevs).
> Using testpmd syntax users will be able to do the following:
> 
>      # Probe both physical ports
>      port attach 03:00.0,dv_flow_en=2,representor=pf0-1
> 
>      # Probe both host PF 0 from CPU 0
>      # (VF representor index -1 is special encoding for host PF)
>      port attach 03:00.0,dv_flow_en=2,representor=pf0vf65535
>      # or with explicit controller index
>      port attach 03:00.0,dv_flow_en=2,representor=c1pf0vf65535
> 
>      # Probe both host PF 0 from CPU 1
>      port attach 03:00.0,dv_flow_en=2,representor=pf2vf65535
>      # or with explicit controller index
>      port attach 03:00.0,dv_flow_en=2,representor=c2pf2vf65535
> 
> v1: https://patches.dpdk.org/project/dpdk/cover/20260302113443.16648-1-dsosnowski@nvidia.com/
> 
> v1->v2:
> - Squash patches 3-5 and add Fixes tag,
>    since these patches fix existing probing logic.
> 
> Dariusz Sosnowski (3):
>    common/mlx5: fix bond check
>    net/mlx5: fix bond check
>    net/mlx5: fix probing to allow BlueField Socket Direct
> 
>   drivers/common/mlx5/linux/mlx5_common_os.c |  86 ++++-
>   drivers/common/mlx5/linux/mlx5_common_os.h |   9 +
>   drivers/net/mlx5/linux/mlx5_os.c           | 356 ++++++++++++++-------
>   drivers/net/mlx5/mlx5.h                    |   2 +
>   4 files changed, 338 insertions(+), 115 deletions(-)
> 
> --
> 2.47.3
> 


Series applied to next-net-mlx,

Kindest regards
Raslan Darawsheh


      parent reply	other threads:[~2026-03-10  8:16 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-02 11:34 [PATCH 0/5] net/mlx5: add BlueField socket direct support Dariusz Sosnowski
2026-03-02 11:34 ` [PATCH 1/5] common/mlx5: fix bond check Dariusz Sosnowski
2026-03-02 11:34 ` [PATCH 2/5] net/mlx5: " Dariusz Sosnowski
2026-03-02 11:34 ` [PATCH 3/5] net/mlx5: calculate number of uplinks and host PFs Dariusz Sosnowski
2026-03-02 11:34 ` [PATCH 4/5] net/mlx5: compare representors explicitly Dariusz Sosnowski
2026-03-02 11:34 ` [PATCH 5/5] net/mlx5: build port name dynamically Dariusz Sosnowski
2026-03-04  7:26 ` [PATCH 0/5] net/mlx5: add BlueField socket direct support Bing Zhao
2026-03-04 10:57 ` [PATCH v2 0/3] net/mlx5: net/mlx5: fix probing to allow BlueField Socket Direct Dariusz Sosnowski
2026-03-04 10:57   ` [PATCH v2 1/3] common/mlx5: fix bond check Dariusz Sosnowski
2026-03-04 10:57   ` [PATCH v2 2/3] net/mlx5: " Dariusz Sosnowski
2026-03-04 10:57   ` [PATCH v2 3/3] net/mlx5: fix probing to allow BlueField Socket Direct Dariusz Sosnowski
2026-03-10  8:16   ` Raslan Darawsheh [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b30b45a5-1a23-465f-9787-2d85559d2593@nvidia.com \
    --to=rasland@nvidia.com \
    --cc=bingz@nvidia.com \
    --cc=dev@dpdk.org \
    --cc=dsosnowski@nvidia.com \
    --cc=matan@nvidia.com \
    --cc=orika@nvidia.com \
    --cc=suanmingm@nvidia.com \
    --cc=viacheslavo@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox