@@ -305,7 +305,17 @@ static void mlx5e_ipsec_update_esn_state(struct mlx5e_ipsec_sa_entry *sa_entry,
305
305
}
306
306
307
307
mlx5e_ipsec_build_accel_xfrm_attrs (sa_entry , & attrs );
308
+
309
+ /* It is safe to execute the modify below unlocked since the only flows
310
+ * that could affect this HW object, are create, destroy and this work.
311
+ *
312
+ * Creation flow can't co-exist with this modify work, the destruction
313
+ * flow would cancel this work, and this work is a single entity that
314
+ * can't conflict with it self.
315
+ */
316
+ spin_unlock_bh (& sa_entry -> x -> lock );
308
317
mlx5_accel_esp_modify_xfrm (sa_entry , & attrs );
318
+ spin_lock_bh (& sa_entry -> x -> lock );
309
319
310
320
data .data_offset_condition_operand =
311
321
MLX5_IPSEC_ASO_REMOVE_FLOW_PKT_CNT_OFFSET ;
@@ -431,7 +441,7 @@ static void mlx5e_ipsec_handle_event(struct work_struct *_work)
431
441
aso = sa_entry -> ipsec -> aso ;
432
442
attrs = & sa_entry -> attrs ;
433
443
434
- spin_lock (& sa_entry -> x -> lock );
444
+ spin_lock_bh (& sa_entry -> x -> lock );
435
445
ret = mlx5e_ipsec_aso_query (sa_entry , NULL );
436
446
if (ret )
437
447
goto unlock ;
@@ -447,7 +457,7 @@ static void mlx5e_ipsec_handle_event(struct work_struct *_work)
447
457
mlx5e_ipsec_handle_limits (sa_entry );
448
458
449
459
unlock :
450
- spin_unlock (& sa_entry -> x -> lock );
460
+ spin_unlock_bh (& sa_entry -> x -> lock );
451
461
kfree (work );
452
462
}
453
463
0 commit comments