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 26.07 0/5] net/mlx5: legacy vport match support with HWS
Date: Sun, 19 Apr 2026 14:14:24 +0300 [thread overview]
Message-ID: <e588c722-7c68-44de-a8d8-315cd08fd3e0@nvidia.com> (raw)
In-Reply-To: <20260325090758.42403-1-dsosnowski@nvidia.com>
Hi,
On 25/03/2026 11:07 AM, Dariusz Sosnowski wrote:
> NVIDIA NICs and DPUs have an embedded switch (E-Switch)
> to which all associated functions (PFs, VFs, SFs) and physical ports
> are connected through virtual ports (vports).
> mlx5 PMD supports devices with E-Switch enabled and
> also exposes flow rule offloading to the E-Switch
> through transfer flow rules.
>
> Flow rules matching on vports (with flow item REPRESENTED_PORT)
> can match on specific vport using one of the two internal mechanisms:
>
> - vport metadata - E-Switch internally tags all packets with a metadata value
> associated with originating vport.
> mlx5 PMD can match on that metadata through a specialized HW register in each flow rule.
> vport metadata enables features such as VF-LAG, Multiport E-Switch and
> others mentioned in [1].
> - legacy match - A static value known as "source vport" is assigned to each vport.
> These values are not globally unique, because they are statically assigned per E-Switch
> (e.g., VF0 on each of the PFs will have the same source_vport number).
>
> Users can select the vport matching mode through devlink [1].
> vport metadata matching mode is the default and is enough for most of the use cases.
> However, internally tagging all the packets with metadata values,
> increases the packet latency in the E-Switch. As described in the linked kernel docs,
> disabling vport metadata matching can increase packet rate up to 20%.
> If features provided by vport metadata matching are not required,
> it can be disabled to increase E-Switch's throughput.
>
> mlx5 PMD with HW Steering flow engine enabled, only supported
> vport metadata mode when running on a device with enabled E-Switch.
> Goal of this patchset is to enable support of devices with
> disabled vport metadata matching. This is purely an internal change in mlx5 PMD.
> No changes in DPDK applications should be required.
>
> - Patches 1-2 - Extend information queried from the device by mlx5 PMD
> to include information necessary to implement legacy vport match.
> This data is always available, regardless of selected E-Switch matching mode.
> - Patch 3 - Adjusts internal translation of DPDK port ID to flow rule matching data,
> so that returned data is always valid even if vport metadata matching is disabled.
> Also adds detection of vport matching mode to HWS layer.
> - Patch 4 - Adds support for REPRESENTED_PORT item in HWS layer
> whenever vport metadata matching mode is disabled.
> This involves correctly translating DPDK port index to "source vport".
> - Patch 5 - Removes all validation checks from mlx5 PMD which prevented probing
> on devices with disabled vport metadata matching mode.
> Adjusts internal PMD logic to work with "source vport" whenever needed.
>
> [1]: https://docs.kernel.org/networking/devlink/mlx5.html
>
> Dariusz Sosnowski (5):
> common/mlx5: query vport VHCA ID
> net/mlx5: store port VHCA ID
> net/mlx5: return port info regardless of register mask
> net/mlx5/hws: add source vport match in HWS
> net/mlx5: allow legacy source vport match
>
> drivers/common/mlx5/linux/mlx5_glue.c | 4 ++
> drivers/common/mlx5/linux/mlx5_glue.h | 2 +
> drivers/net/mlx5/hws/mlx5dr_cmd.c | 13 +++-
> drivers/net/mlx5/hws/mlx5dr_cmd.h | 1 +
> drivers/net/mlx5/hws/mlx5dr_definer.c | 99 ++++++++++++++++++++++-----
> drivers/net/mlx5/hws/mlx5dr_definer.h | 2 +
> drivers/net/mlx5/hws/mlx5dr_table.c | 6 ++
> drivers/net/mlx5/linux/mlx5_os.c | 38 +++-------
> drivers/net/mlx5/mlx5.h | 4 ++
> drivers/net/mlx5/mlx5_flow.h | 3 +-
> drivers/net/mlx5/mlx5_flow_dv.c | 3 +
> drivers/net/mlx5/mlx5_flow_hw.c | 34 ++++-----
> 12 files changed, 140 insertions(+), 69 deletions(-)
>
> --
> 2.47.3
>
Series applied to next-net-mlx,
Kindest regards
Raslan Darawsheh
prev parent reply other threads:[~2026-04-19 11:14 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-25 9:07 [PATCH 26.07 0/5] net/mlx5: legacy vport match support with HWS Dariusz Sosnowski
2026-03-25 9:07 ` [PATCH 26.07 1/5] common/mlx5: query vport VHCA ID Dariusz Sosnowski
2026-03-25 9:07 ` [PATCH 26.07 2/5] net/mlx5: store port " Dariusz Sosnowski
2026-03-25 9:07 ` [PATCH 26.07 3/5] net/mlx5: return port info regardless of register mask Dariusz Sosnowski
2026-03-25 9:07 ` [PATCH 26.07 4/5] net/mlx5/hws: add source vport match in HWS Dariusz Sosnowski
2026-03-25 9:07 ` [PATCH 26.07 5/5] net/mlx5: allow legacy source vport match Dariusz Sosnowski
2026-04-19 11:14 ` 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=e588c722-7c68-44de-a8d8-315cd08fd3e0@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