summaryrefslogtreecommitdiff
path: root/rust/helpers/signal.c
diff options
context:
space:
mode:
authorCosmin Ratiu <cratiu@nvidia.com>2024-10-08 21:32:20 +0300
committerPaolo Abeni <pabeni@redhat.com>2024-10-10 13:12:00 +0200
commit40efb0b7c755f7803abe59a81c3bdd73edf025d3 (patch)
tree280f72d289726f9847214759b31e8a09742812f5 /rust/helpers/signal.c
parent107a034d5c1e9cf86fdf4c8801ec8a07e6669520 (diff)
net/mlx5: qos: Refactor locking to a qos domain mutex
E-Switch qos changes used the esw state_lock to serialize qos changes. With the introduction of cross-esw scheduling, multiple E-Switches might be involved in a qos operation, so prepare for that by switching locking to use a qos domain mutex. Add three helper functions: - esw_qos_lock - esw_qos_unlock - esw_assert_qos_lock_held Convert existing direct lock/unlock/lockdep calls to them. Also call esw_assert_qos_lock_held in a couple more places. mlx5_esw_qos_set_vport_rate expected to be called with the esw state_lock already held. Change it to instead acquire the qos lock directly. mlx5_eswitch_get_vport_config also accessed qos properties with the esw state lock. Introduce a new function mlx5_esw_qos_get_vport_rate to access those with the correct lock and change get_vport_config to use it. Finally, mlx5_vport_disable is called from the cleanup path with the esw state_lock held, so have it additionally acquire the qos lock to make sure there are no races. Signed-off-by: Cosmin Ratiu <cratiu@nvidia.com> Signed-off-by: Tariq Toukan <tariqt@nvidia.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'rust/helpers/signal.c')
0 files changed, 0 insertions, 0 deletions