From: Saeed Mahameed <saeed@kernel.org>
To: "David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Eric Dumazet <edumazet@google.com>
Cc: Saeed Mahameed <saeedm@nvidia.com>,
netdev@vger.kernel.org, Tariq Toukan <tariqt@nvidia.com>,
Gal Pressman <gal@nvidia.com>,
Leon Romanovsky <leonro@nvidia.com>, Jiri Pirko <jiri@nvidia.com>,
mbloch@nvidia.com
Subject: [PATCH net-next V2 0/3] devlink eswitch inactive mode
Date: Thu, 6 Nov 2025 16:08:28 -0800 [thread overview]
Message-ID: <20251107000831.157375-1-saeed@kernel.org> (raw)
From: Saeed Mahameed <saeedm@nvidia.com>
v1->v2:
- Introduce new devlink mode instead of state, Jiri's suggestion.
- Address kernel robot issues reported in v1.
no previous prototype for 'mlx5_mpfs_enable'
v1: https://lore.kernel.org/all/20251016013618.2030940-1-saeed@kernel.org/
Before having traffic flow through an eswitch, a user may want to have the
ability to block traffic towards the FDB until FDB is fully programmed and the
user is ready to send traffic to it. For example: when two eswitches are present
for vports in a multi-PF setup, one eswitch may take over the traffic from the
other when the user chooses. Before this take over, a user may want to first
program the inactive eswitch and then once ready redirect traffic to this new
eswitch.
This series introduces a user-configurable mode for an eswitch that allows
dynamically switching between active and inactive modes. When inactive, traffic
does not flow through the eswitch. While inactive, steering pipeline
configuration can be done (e.g. adding TC rules, discovering representors,
enabling the desired SDN modes such as bridge/OVS/DPDK/etc). Once configuration
is completed, a user can set the eswitch mode to active and have traffic flow
through. This allows admins to upgrade forwarding pipeline rules with very
minimal downtime and packet drops.
A user can start the eswitch in switchdev or switchdev_inactive mode.
Active: Traffic is enabled on this eswitch FDB.
Inactive: Traffic is ignored/dropped on this eswitch FDB.
An example use case:
$ devlink dev eswitch set pci/0000:08:00.1 mode switchdev_inactive
Setup FDB pipeline and netdev representors
...
Once ready to start receiving traffic
$ devlink dev eswitch set pci/0000:08:00.1 mode switchdev
Saeed Mahameed (3):
devlink: Introduce switchdev_inactive eswitch mode
net/mlx5: MPFS, add support for dynamic enable/disable
net/mlx5: E-Switch, support eswitch inactive mode
Documentation/netlink/specs/devlink.yaml | 2 +
.../devlink/devlink-eswitch-attr.rst | 13 ++
.../mellanox/mlx5/core/esw/adj_vport.c | 15 +-
.../net/ethernet/mellanox/mlx5/core/eswitch.h | 6 +
.../mellanox/mlx5/core/eswitch_offloads.c | 194 +++++++++++++++++-
.../net/ethernet/mellanox/mlx5/core/fs_core.c | 5 +
.../ethernet/mellanox/mlx5/core/lib/mpfs.c | 115 +++++++++--
.../ethernet/mellanox/mlx5/core/lib/mpfs.h | 9 +
include/linux/mlx5/fs.h | 1 +
include/uapi/linux/devlink.h | 1 +
net/devlink/netlink_gen.c | 2 +-
11 files changed, 325 insertions(+), 38 deletions(-)
--
2.51.1
next reply other threads:[~2025-11-07 0:09 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-07 0:08 Saeed Mahameed [this message]
2025-11-07 0:08 ` [PATCH net-next V2 1/3] devlink: Introduce switchdev_inactive eswitch mode Saeed Mahameed
2025-11-07 0:08 ` [PATCH net-next V2 2/3] net/mlx5: MPFS, add support for dynamic enable/disable Saeed Mahameed
2025-11-08 15:21 ` Simon Horman
2025-11-08 19:39 ` Saeed Mahameed
2025-11-11 14:27 ` Simon Horman
2025-11-07 0:08 ` [PATCH net-next V2 3/3] net/mlx5: E-Switch, support eswitch inactive mode Saeed Mahameed
2025-11-08 2:28 ` Jakub Kicinski
2025-11-08 4:53 ` Saeed Mahameed
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=20251107000831.157375-1-saeed@kernel.org \
--to=saeed@kernel.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=gal@nvidia.com \
--cc=jiri@nvidia.com \
--cc=kuba@kernel.org \
--cc=leonro@nvidia.com \
--cc=mbloch@nvidia.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=saeedm@nvidia.com \
--cc=tariqt@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;
as well as URLs for NNTP newsgroup(s).