diff options
author | Dragos Tatulea <dtatulea@nvidia.com> | 2024-08-16 12:01:50 +0300 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2024-09-25 07:07:41 -0400 |
commit | 7d627137dc1062aba6276a7d2ebe7f5ff8d542c5 (patch) | |
tree | c1a4c2e6822a70ac222ef56c733dcada79defe84 /drivers/vdpa/mlx5/core/mlx5_vdpa.h | |
parent | 6d17035a74028f0b0e77affefbfb5d71e6d32713 (diff) |
net/mlx5: Support throttled commands from async API
Currently, commands that qualify as throttled can't be used via the
async API. That's due to the fact that the throttle semaphore can sleep
but the async API can't.
This patch allows throttling in the async API by using the tentative
variant of the semaphore and upon failure (semaphore at 0) returns EBUSY
to signal to the caller that they need to wait for the completion of
previously issued commands.
Furthermore, make sure that the semaphore is released in the callback.
Signed-off-by: Dragos Tatulea <dtatulea@nvidia.com>
Cc: Leon Romanovsky <leonro@nvidia.com>
Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
Message-Id: <20240816090159.1967650-2-dtatulea@nvidia.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Tested-by: Lei Yang <leiyang@redhat.com>
Diffstat (limited to 'drivers/vdpa/mlx5/core/mlx5_vdpa.h')
0 files changed, 0 insertions, 0 deletions