summaryrefslogtreecommitdiff
path: root/tools/lib/python
diff options
context:
space:
mode:
authorDragos Tatulea <dtatulea@nvidia.com>2026-09-30 14:42:24 +0300
committerLeon Romanovsky <leon@kernel.org>2026-10-01 11:40:42 -0400
commit26f27809b0034e5df3ae201659604b39c4ff88ab (patch)
tree8128cc8a419f6aa890802f6913465d36470df976 /tools/lib/python
parent1c879b1e9f2ed620523e17ca239683bc8029e143 (diff)
RDMA/mlx5: Extract IB specific lock out of data direct
The data_direct_lock from struct mlx5_ib_dev is an IB specific lock. It protects from unbind while mlx5_data_direct_dev is being accessed. So move data_direct_lock out of the generic bind/unbind functions and into the IB specific notifier callback. data_direct_dev can be set during bind/unbind with a simple WRITE_ONCE, the lock is no longer needed. Each user of the data direct registration API has to do their own locking if necessary. During unbind, the data_direct_dev is set to NULL before calling the notifiers to avoid multiple users still accessing the data_direct_dev while unbind is in progress. This is to avoid another data direct specific lock which can lead to lock ordering issues. This patch has no functional changes. Signed-off-by: Dragos Tatulea <dtatulea@nvidia.com> Reviewed-by: Leon Romanovsky <leonro@nvidia.com> Reviewed-by: Cosmin Ratiu <cratiu@nvidia.com> Signed-off-by: Tariq Toukan <tariqt@nvidia.com> Link: https://patch.msgid.link/20260930114227.139274-8-tariqt@nvidia.com Signed-off-by: Leon Romanovsky <leon@kernel.org>
Diffstat (limited to 'tools/lib/python')
0 files changed, 0 insertions, 0 deletions