net/mlx5e: Fix offload lifetime and exclusion bugs
Status from this message: This series was applied to netdev/net.git (main)
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v3 Latest8 patches 0 repliesApplied 8/8
- v24 patches 4 repliesSuperseded
- v17 patches 8 repliesSuperseded
Changes in v3 from the cover letter
- Added several new fixes, all found by internal Sashiko.
- Addressed a few Sashiko comments from V2.
- Renamed V2 patches 1-2 to "Block E-Switch mode changes during IPsec policy creation" and "... during IPsec state creation".
- Dropped V2 patch 4, "net/mlx5e: tc: Tie esw & accel blocking refs to the flow's lifetime", to be submitted separately.
- Exclusion counters: use a spinlock instead of a mutex, as some callers run in atomic context.
Patches in v3 All 8 applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/8 | net/mlx5e: Release IPsec root table reference on RX setup failuredrivers/ drivers/ drivers/ | +31 | 0 replies | Applied |
| 2/8 | net/mlx5e: Serialize ipsec encap reservations with eswitch operationsdrivers/ drivers/ drivers/ +2 more | +35 | 0 replies | Applied |
| 3/8 | net/mlx5e: Take HCA devcom lock before esw->mode_lockdrivers/ | +5 | 0 replies | Applied |
| 4/8 | net/mlx5e: Fix E-Switch races in uplink unbinddrivers/ drivers/ drivers/ | +48 | 0 replies | Applied |
| 5/8 | net/mlx5e: Fix ipsec core device access during profile changesdrivers/ drivers/ | +30 | 0 replies | Applied |
| 6/8 | net/mlx5e: Block E-Switch mode changes during IPsec policy creationdrivers/ drivers/ drivers/ +1 more | +32 | 0 replies | Applied |
| 7/8 | net/mlx5e: Block E-Switch mode changes during IPsec state creationdrivers/ | +23 | 0 replies | Applied |
| 8/8 | net/mlx5e: Serialize TC and IPsec offload exclusion countersdrivers/ drivers/ drivers/ +1 more | +31 | 0 replies | Applied |
Reviews trailers per patch
All 8 patches have a Reviewed-by or Acked-by.
| Patch | Jianbo Liu | Dragos Tatulea |
|---|---|---|
| 1/8 | R-b | |
| 2/8 | R-b | |
| 3/8 | R-b | |
| 4/8 | R-b | |
| 5/8 | R-b | |
| 6/8 | R-b | R-b |
| 7/8 | R-b | R-b |
| 8/8 | R-b | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH net V3 0/8] net/mlx5e: Fix offload lifetime and exclusion bugs
Hi,
This series by Cosmin fixes several mlx5e offload issues.
1. Fix fs root table cleanup bug. 2. Fix IPsec encap serialization bugs. 3. Fix a deadlock between HCA devcom lock and mode_lock. 4. Fix uplink unbind deadlocks by not holding mode_lock across
removal. All eswitch operation initiators wait for ongoing ones to finish first. Unblocked by 3.
5. Fix races between profile cleanup/init and IPsec policy/state add.
Unblocked by 4.
6+7. Block eswitch mode changes before accessing the IPsec context
during policy and SA creation. Unblocked by 5.
8. Serialize TC/IPsec exclusion counters with a per-device spinlock.
Unblocked by 6+7.
Regards,
Tariq
V3:
- Added several new fixes, all found by internal Sashiko.
- Addressed a few Sashiko comments from V2.
- Renamed V2 patches 1-2 to "Block E-Switch mode changes during IPsec policy creation" and "... during IPsec state creation".
- Dropped V2 patch 4, "net/mlx5e: tc: Tie esw & accel blocking refs to the flow's lifetime", to be submitted separately.
- Exclusion counters: use a spinlock instead of a mutex, as some callers run in atomic context.
V2:
https://lore.kernel.org/netdev/[email protected]/
- Use mlx5_esw_lock() in mlx5_eswitch_block_mode() (Sashiko)
- Clarified the fix split across first two patches (Sashiko)
- More careful dereferencing priv->mdev in mlx5e_xfrm_add_state() (Sashiko)
- Avoided spurious error message during IPsec SW fallback (Sashiko)
- Harmonized check_users arg for policy & state add (Sashiko)
- Clarified the scope of the "tc: tie..." fix (Sashiko)
- Moved macsec patches into a separate series.
V1:
https://lore.kernel.org/netdev/[email protected]/
Cosmin Ratiu (8):
net/mlx5e: Release IPsec root table reference on RX setup failure net/mlx5e: Serialize ipsec encap reservations with eswitch operations net/mlx5e: Take HCA devcom lock before esw->mode_lock net/mlx5e: Fix E-Switch races in uplink unbind
net/mlx5e: Fix ipsec core device access during profile changes net/mlx5e: Block E-Switch mode changes during IPsec policy creation net/mlx5e: Block E-Switch mode changes during IPsec state creation net/mlx5e: Serialize TC and IPsec offload exclusion counters
.../mellanox/mlx5/core/en_accel/ipsec.c | 95 +++++++++++++------ .../mellanox/mlx5/core/en_accel/ipsec.h | 2 +- .../mellanox/mlx5/core/en_accel/ipsec_fs.c | 88 ++++++++--------- .../net/ethernet/mellanox/mlx5/core/en_main.c | 4 +- .../net/ethernet/mellanox/mlx5/core/en_tc.c | 18 ++-- .../mellanox/mlx5/core/esw/ipsec_fs.c | 15 ++- .../mellanox/mlx5/core/esw/ipsec_fs.h | 6 ++ .../net/ethernet/mellanox/mlx5/core/eswitch.c | 24 +++++ .../net/ethernet/mellanox/mlx5/core/eswitch.h | 15 ++- .../mellanox/mlx5/core/eswitch_offloads.c | 88 +++++++++-------- .../net/ethernet/mellanox/mlx5/core/main.c | 1 + include/linux/mlx5/driver.h | 8 +- 12 files changed, 231 insertions(+), 133 deletions(-)
base-commit: fafbc4051123d5459ea6950899cec08ed946e278
Signature · 1 line
2.44.0