devlink eswitch active/inactive state
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest3 patches 4 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | devlink: Introduce devlink eswitch stateDocumentation/ Documentation/ include/ +3 more | +73 | 3 replies | |
| 2/3 | net/mlx5: MPFS, add support for dynamic enable/disabledrivers/ drivers/ | +103 | 0 replies | |
| 3/3 | net/mlx5: E-Switch, support eswitch statedrivers/ drivers/ drivers/ +4 more | +182 | 1 reply |
Reviews trailers per patch
2 of 3 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.
| Patch | Jiri Pirko | Mark Bloch |
|---|---|---|
| Series | R-b | |
| 1/3 | ||
| 2/3 | R-b | |
| 3/3 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH net-next 0/3] devlink eswitch active/inactive state
From: Saeed Mahameed <[email protected]>
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 states for an eswitch that allows dynamically switching between active and inactive states. 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 state 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 mode in either active or inactive state. To preserve backwards compatibility, the default state is active.
Active: Traffic is enabled on this eswitch FDB.
Inactive: Traffic is ignored/dropped on this eswitch FDB.
An example of starting the switch in active state is following.
1. Default is active (backward compatible)
$ devlink dev eswitch set pci/0000:08:00.1 mode switchdev
2. Explicitly set the state
$ devlink dev eswitch set pci/0000:08:00.1 mode switchdev state active
To bring up the esw in 'inactive' state:
$ devlink dev eswitch set pci/0000:08:00.1 mode switchdev state inactive
When querying the eswitch, we also see the state of it:
$ devlink dev eswitch show pci/0000:01:01.0 pci/0000:01:01.0: mode switchdev inline-mode none encap-mode basic state inactive
Parav Pandit (1):
devlink: Introduce devlink eswitch state
Saeed Mahameed (2):
net/mlx5: MPFS, add support for dynamic enable/disable net/mlx5: E-Switch, support eswitch state
Documentation/netlink/specs/devlink.yaml | 13 ++ .../devlink/devlink-eswitch-attr.rst | 15 ++ .../net/ethernet/mellanox/mlx5/core/devlink.c | 2 + .../mellanox/mlx5/core/esw/adj_vport.c | 15 +- .../net/ethernet/mellanox/mlx5/core/eswitch.c | 1 + .../net/ethernet/mellanox/mlx5/core/eswitch.h | 12 ++ .../mellanox/mlx5/core/eswitch_offloads.c | 157 ++++++++++++++++++ .../net/ethernet/mellanox/mlx5/core/fs_core.c | 5 + .../ethernet/mellanox/mlx5/core/lib/mpfs.c | 111 +++++++++++-- .../ethernet/mellanox/mlx5/core/lib/mpfs.h | 9 + include/linux/mlx5/fs.h | 1 + include/net/devlink.h | 5 + include/uapi/linux/devlink.h | 7 + net/devlink/dev.c | 30 ++++ net/devlink/netlink_gen.c | 5 +- 15 files changed, 358 insertions(+), 30 deletions(-)
Signature · 1 line
2.51.0