]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
net/mlx5: devcom, expose locked variant of send_event
authorShay Drory <shayd@nvidia.com>
Fri, 12 Jun 2026 11:38:51 +0000 (14:38 +0300)
committerJakub Kicinski <kuba@kernel.org>
Mon, 15 Jun 2026 18:40:49 +0000 (11:40 -0700)
commit95e26588c84b7fb0e91c0c544ea29168ffd3de70
treedabfcc9a4db22fd29c057a815d8dbbddbaa06925
parent597baeb467d8892e3804d3b33397187a49731a98
net/mlx5: devcom, expose locked variant of send_event

Factor mlx5_devcom_send_event() into two functions:
- mlx5_devcom_locked_send_event(): performs the dispatch (and
  rollback) with comp->sem already held by the caller.
- mlx5_devcom_send_event(): unchanged wrapper that takes comp->sem,
  calls the locked variant, and releases it.

This lets callers bracket multiple event broadcasts under a single
held write lock, eliminating the gap between consecutive dispatches
where peer state could change.

Will be used by a downstream patch.

Signed-off-by: Shay Drory <shayd@nvidia.com>
Reviewed-by: Mark Bloch <mbloch@nvidia.com>
Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
Link: https://patch.msgid.link/20260612113904.537595-3-tariqt@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/mellanox/mlx5/core/lib/devcom.c
drivers/net/ethernet/mellanox/mlx5/core/lib/devcom.h