diff options
| author | Selvin Xavier <selvin.xavier@broadcom.com> | 2026-10-28 04:33:59 -0700 |
|---|---|---|
| committer | Leon Romanovsky <leon@kernel.org> | 2026-11-03 07:07:41 -0500 |
| commit | 5ea08e2dcf736a7c81cd3c33683a76cc66de10be (patch) | |
| tree | 129a8c643e90305ca493b3ecfa7dbc6b78046e73 /tools/perf/scripts/python | |
| parent | 756cfa339d1b117676107049f650dad5414d6ec4 (diff) | |
RDMA/bnxt_re: Honor a completion that races with a wait timeout
If the wait helper gives up (timeout or firmware stall) and the CREQ
tasklet processes the command before the waiter takes hwq->lock, the
response is already copied into the caller's buffer and is_in_used is
clear. The waiter still returns -ETIMEDOUT and may set
FIRMWARE_STALL_DETECTED, and for CREATE_AH the handler skips
destroy_timedout_ah() because the waiter was alive, so the AH leaks in
firmware.
Under the lock, if the slot no longer holds this command's response
buffer, a completion was delivered. Use its status instead of failing.
To keep that check valid, never reuse a cookie slot that is still in
use: __send_message() returns -EAGAIN and __send_message_no_waiter()
drops the internal command.
A slot stays in use only while its completion is outstanding. If that
completion never arrives, the cause is a PCI error or firmware still
processing the command, so there is no point in posting more commands.
Continuing to return -EAGAIN until firmware completes the command in
order is intended; otherwise recovery is initiated.
An internal destroy_ah dropped for the same reason leaks the AH in
firmware; this is accepted and the comment in
bnxt_qplib_service_creq() is updated to say so.
Fixes: 691eb7c6110f ("RDMA/bnxt_re: handle command completions after driver detect a timedout")
Signed-off-by: Selvin Xavier <selvin.xavier@broadcom.com>
Link: https://patch.msgid.link/20261028113404.33289-3-selvin.xavier@broadcom.com
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
