[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251107000831.157375-1-saeed@kernel.org>
Date: Thu, 6 Nov 2025 16:08:28 -0800
From: Saeed Mahameed <saeed@...nel.org>
To: "David S. Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>,
Eric Dumazet <edumazet@...gle.com>
Cc: Saeed Mahameed <saeedm@...dia.com>,
netdev@...r.kernel.org,
Tariq Toukan <tariqt@...dia.com>,
Gal Pressman <gal@...dia.com>,
Leon Romanovsky <leonro@...dia.com>,
Jiri Pirko <jiri@...dia.com>,
mbloch@...dia.com
Subject: [PATCH net-next V2 0/3] devlink eswitch inactive mode
From: Saeed Mahameed <saeedm@...dia.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
Powered by blists - more mailing lists