mlxsw: Maintain candidate RIFs
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
Patches in v1 All 8 applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/8 | mlxsw: spectrum_router: Add extack argument to mlxsw_sp_lb_rif_init()drivers/ | +3 | 0 replies | Applied |
| 2/8 | mlxsw: spectrum_router: Use mlxsw_sp_ul_rif_get() to get main VRF LB RIFdrivers/ | +6 | 0 replies | Applied |
| 3/8 | mlxsw: spectrum_router: Maintain a hash table of CRIFsdrivers/ drivers/ | +176 | 0 replies | Applied |
| 4/8 | mlxsw: spectrum_router: Maintain CRIF for fallback loopback RIFdrivers/ drivers/ | +12 | 0 replies | Applied |
| 5/8 | mlxsw: spectrum_router: Link CRIFs to RIFsdrivers/ | +47 | 0 replies | Applied |
| 6/8 | mlxsw: spectrum_router: Use router.lb_crif instead of .lb_rif_indexdrivers/ drivers/ | +4 | 0 replies | Applied |
| 7/8 | mlxsw: spectrum_router: Split nexthop finalization to two stagesdrivers/ | +9 | 0 replies | Applied |
| 8/8 | mlxsw: spectrum_router: Track next hops at CRIFsdrivers/ | +75 | 0 replies | Applied |
Reviews trailers per patch
All 8 patches have a Reviewed-by or Acked-by.
| Patch | Danielle Ratson |
|---|---|
| 1/8 | R-b |
| 2/8 | R-b |
| 3/8 | R-b |
| 4/8 | R-b |
| 5/8 | R-b |
| 6/8 | R-b |
| 7/8 | R-b |
| 8/8 | 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/8] mlxsw: Maintain candidate RIFs
The mlxsw driver currently makes the assumption that the user applies configuration in a bottom-up manner. Thus netdevices need to be added to the bridge before IP addresses are configured on that bridge or SVI added on top of it. Enslaving a netdevice to another netdevice that already has uppers is in fact forbidden by mlxsw for this reason. Despite this safety, it is rather easy to get into situations where the offloaded configuration is just plain wrong.
As an example, take a front panel port, configure an IP address: it gets a RIF. Now enslave the port to the bridge, and the RIF is gone. Remove the port from the bridge again, but the RIF never comes back. There is a number of similar situations, where changing the configuration there and back utterly breaks the offload.
The situation is going to be made better by implementing a range of replays and post-hoc offloads.
This patch set lays the ground for replay of next hops. The particular issue that it deals with is that currently, driver-specific bookkeeping for next hops is hooked off RIF objects, which come and go across the lifetime of a netdevice. We would rather keep these objects at an entity that mirrors the lifetime of the netdevice itself. That way they are at hand and can be offloaded when a RIF is eventually created.
To that end, with this patchset, mlxsw keeps a hash table of CRIFs:
candidate RIFs, persistent handles for netdevices that mlxsw deems potentially interesting. The lifetime of a CRIF matches that of the underlying netdevice, and thus a RIF can always assume a CRIF exists. A CRIF is where next hops are kept, and when RIF is created, these next hops can be easily offloaded. (Previously only the next hops created after the RIF was created were offloaded.)
- Patches #1 and #2 are minor adjustments.
- In patches #3 and #4, add CRIF bookkeeping.
- In patch #5, link CRIFs to RIFs such that given a netdevice-backed RIF, the corresponding CRIF is easy to look up.
- Patch #6 is a clean-up allowed by the previous patches
- Patches #7 and #8 move next hop tracking to CRIFs
No observable effects are intended as of yet. This will be useful once there is support for RIF creation for netdevices that become mlxsw uppers, which will come in following patch sets.
Petr Machata (8):
mlxsw: spectrum_router: Add extack argument to mlxsw_sp_lb_rif_init()
mlxsw: spectrum_router: Use mlxsw_sp_ul_rif_get() to get main VRF LB
RIF
mlxsw: spectrum_router: Maintain a hash table of CRIFs
mlxsw: spectrum_router: Maintain CRIF for fallback loopback RIF
mlxsw: spectrum_router: Link CRIFs to RIFs
mlxsw: spectrum_router: Use router.lb_crif instead of .lb_rif_index
mlxsw: spectrum_router: Split nexthop finalization to two stages
mlxsw: spectrum_router: Track next hops at CRIFs
.../ethernet/mellanox/mlxsw/spectrum_router.c | 402 ++++++++++++++---- .../ethernet/mellanox/mlxsw/spectrum_router.h | 3 +- 2 files changed, 326 insertions(+), 79 deletions(-)
Signature · 1 line
2.40.1