devlink eswitch inactive mode
Status from this message: This series was applied to netdev/net-next.git (main)
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v3 Latest3 patches 0 repliesApplied 3/3
- v23 patches 5 repliesSuperseded
Changes in v3 from the cover letter
- Fix cocci check %pe
- minor improvement: create FDB drop counter once.
Patches in v3 All 3 applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | devlink: Introduce switchdev_inactive eswitch modeDocumentation/ Documentation/ include/ +1 more | +17 | 0 replies | Applied |
| 2/3 | net/mlx5: MPFS, add support for dynamic enable/disabledrivers/ drivers/ | +108 | 0 replies | Applied |
| 3/3 | net/mlx5: E-Switch, support eswitch inactive modedrivers/ drivers/ drivers/ +3 more | +214 | 0 replies | Applied |
Reviews trailers per patch
All 3 patches have a Reviewed-by or Acked-by.
| Patch | Jiri Pirko |
|---|---|
| 1/3 | R-b |
| 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 V3 0/3] devlink eswitch inactive mode
From: Saeed Mahameed <[email protected]>
v2->v3:
- Fix cocci check %pe
- minor improvement: create FDB drop counter once.
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'
v2: https://lore.kernel.org/all/[email protected]/
v1: https://lore.kernel.org/all/[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 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 | 207 +++++++++++++++++- .../net/ethernet/mellanox/mlx5/core/fs_core.c | 5 + .../ethernet/mellanox/mlx5/core/lib/mpfs.c | 116 ++++++++-- .../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, 338 insertions(+), 39 deletions(-)
Signature · 1 line
2.51.1