]> git.ipfire.org Git - thirdparty/linux.git/commit
RDMA/cm: Base cm_id destruction timeout on CMA values
authorHåkon Bugge <haakon.bugge@oracle.com>
Tue, 21 Oct 2025 13:27:33 +0000 (15:27 +0200)
committerLeon Romanovsky <leon@kernel.org>
Mon, 27 Oct 2025 11:36:39 +0000 (07:36 -0400)
commit58aca1f3de059c19262550fab6dba150f9d5f989
treef5f4032510ad3aef7ffb26f8987867a9aa989cdf
parentbe180c847a6db6646d7bb4740a1d73f6f67d1030
RDMA/cm: Base cm_id destruction timeout on CMA values

When a GSI MAD packet is sent on the QP, it will potentially be
retried CMA_MAX_CM_RETRIES times with a timeout value of:

    4.096usec * 2 ^ CMA_CM_RESPONSE_TIMEOUT

The above equates to ~64 seconds using the default CMA values.

The cm_id_priv's refcount will be incremented for this period.
Therefore, the timeout value waiting for a cm_id destruction must be
based on the effective timeout of MAD packets.  To provide additional
leeway, we add 25% to this timeout and use that instead of the
constant 10 seconds timeout, which may result in false negatives.

Signed-off-by: Håkon Bugge <haakon.bugge@oracle.com>
Link: https://patch.msgid.link/20251021132738.4179604-1-haakon.bugge@oracle.com
Signed-off-by: Leon Romanovsky <leon@kernel.org>
drivers/infiniband/core/cm.c