diff options
author | Dragos Tatulea <[email protected]> | 2024-08-16 12:01:50 +0300 |
---|---|---|
committer | Michael S. Tsirkin <[email protected]> | 2024-09-25 07:07:41 -0400 |
commit | 7d627137dc1062aba6276a7d2ebe7f5ff8d542c5 (patch) | |
tree | c1a4c2e6822a70ac222ef56c733dcada79defe84 /tools/testing/selftests/bpf/prog_tests/autoload.c | |
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 <[email protected]>
Cc: Leon Romanovsky <[email protected]>
Reviewed-by: Tariq Toukan <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Michael S. Tsirkin <[email protected]>
Tested-by: Lei Yang <[email protected]>
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/autoload.c')
0 files changed, 0 insertions, 0 deletions