summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorCosmin Ratiu <cratiu@nvidia.com>2026-07-01 10:32:51 +0300
committerPaolo Abeni <pabeni@redhat.com>2026-07-07 11:31:27 +0200
commit450ed6b182de3a56cc5877464ddabe9938e7ccfa (patch)
treea7d72a95b3158056ae7dc2ea66c30f1c5760b2c0 /tools/perf/scripts/python
parent22d32def3ced2c51f97323476940658a0fb21855 (diff)
net/mlx5: qos: Remove qos domains and use shd
E-Switch QoS domains were added with the intention of eventually implementing shared qos domains to support cross-esw scheduling in the previous approach ([1]), but they are no longer necessary in the new approach. Remove QoS domains and switch to using the shd lock for protecting against concurrent QoS modifications. Enable the supported_cross_device_rate_nodes devlink ops attribute so that all calls originating from devlink rate acquire the shd lock. Only the additional entry points into QoS need to acquire the shd lock. The wrinkle is that since shd can be NULL (e.g. on older HW without serial number available), there needs to be a fallback locking mechanism. The devlink instance lock cannot be used, as some code paths into QoS (get, set & modify vport rate) happen with RTNL held, and the existing devlink -> RTNL order prevents devlink lock usage there. The other two options are either esw->state_lock or a new lock as fallback when shd is NULL. This patch adds esw->state_lock, which implies: - 3 new lock/unlock helper pairs to acquire/release the missing lock: - esw_qos_{,un}lock: acquire/release esw->state_lock when shd is NULL. - esw_qos_shd_{,un}lock: when esw->state_lock is already held. - esw_qos_devlink_{,un}lock: when shd is already held. - esw_assert_qos_lock_held now asserts esw->state_lock is held when shd is NULL. Use the corresponding lock/unlock function in all places where either shd or state_lock would need to be acquired. Document all of this trickery next to esw_assert_qos_lock_held. Enabling supported_cross_device_rate_nodes now is safe, because mlx5_esw_qos_vport_update_parent rejects cross-esw parent updates. This will change in the next patch. [1] https://lore.kernel.org/netdev/20250213180134.323929-1-tariqt@nvidia.com/ Signed-off-by: Cosmin Ratiu <cratiu@nvidia.com> Reviewed-by: Carolina Jubran <cjubran@nvidia.com> Signed-off-by: Tariq Toukan <tariqt@nvidia.com> Link: https://patch.msgid.link/20260701073254.754518-12-tariqt@nvidia.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions