diff options
| author | Chiara Meiohas <cmeiohas@nvidia.com> | 2025-02-26 16:01:06 +0300 |
|---|---|---|
| committer | Leon Romanovsky <leon@kernel.org> | 2025-03-08 21:22:36 +0300 |
| commit | 0a34fad1bed45ff2245ab8c315bc3d4c6471af46 (patch) | |
| tree | a662d163cc67536143fe68e75d0bf0595abd7922 /include/linux | |
| parent | f6f425f3d251c059d1251edd4f37024290d3efca (diff) | |
| download | linux-0a34fad1bed45ff2245ab8c315bc3d4c6471af46.tar.xz | |
net/mlx5: Allow the throttle mechanism to be more dynamic
Previously, throttle commands were identified and limited based on
opcode. These commands were limited to half the command slots using a
semaphore, and callback commands checked the opcode to determine
semaphore release.
To allow exceptions, we introduce a variable to indicate when the
throttle lock is held. This allows scenarios where throttle commands
are not limited. Callback functions use this variable to determine
if the throttle semaphore needs to be released.
This patch contains no functional changes. It's a preparation for the
next patch.
Signed-off-by: Chiara Meiohas <cmeiohas@nvidia.com>
Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
Reviewed-by: Moshe Shemesh <moshe@nvidia.com>
Link: https://patch.msgid.link/055d975edeb816ac4c0fd1e665c6157d11947d26.1740574103.git.leon@kernel.org
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/mlx5/driver.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/mlx5/driver.h b/include/linux/mlx5/driver.h index af86097641b0..876d6b03a87a 100644 --- a/include/linux/mlx5/driver.h +++ b/include/linux/mlx5/driver.h @@ -989,6 +989,7 @@ struct mlx5_async_work { mlx5_async_cbk_t user_callback; u16 opcode; /* cmd opcode */ u16 op_mod; /* cmd op_mod */ + u8 throttle_locked:1; void *out; /* pointer to the cmd output buffer */ }; |
