]> www.infradead.org Git - users/hch/misc.git/commit
IB/cm: Explicitly mark if a response MAD is a retransmission
authorSean Hefty <shefty@nvidia.com>
Wed, 13 Nov 2024 11:12:54 +0000 (13:12 +0200)
committerLeon Romanovsky <leon@kernel.org>
Sun, 17 Nov 2024 09:51:38 +0000 (04:51 -0500)
commit0492458750c9fbd69cfc7baddd3ddcac77f2a0c8
treeb7133eca778e2f62b26cfcfd468f7a57b7ed1112
parentede132a5cf559f3ab35a4c28bac4f4a6c20334d8
IB/cm: Explicitly mark if a response MAD is a retransmission

In several situations the CM may send a reply to a received MAD
without the reply being directly linked with a cm_id.  For
example, it may send a REJ in response to a REQ which does not
match a listener.  Or, it may send a DREP in response to a DREQ
if the cm_id has already been destroyed.  This can happen if the
original DREP was lost and the DREQ was retried.

When such a response MAD completes, it updates a counter tracking
how many MADs were retried.  However, not all response MADs issued
directly by the CM may be retries.  The REJ mentioned in the example
above is such a case.  To distinguish between responses which were
retries versus those that are not, the send_handler performs the
following check: is a retry if the response is not associated with
a cm_id and the response is not a REJ message.

Replace this indirect method of checking if a response is a retry
with an explicit check.  Note that these retries are generated
directly by the CM, rather than retried by the MAD layer.

This change will be needed by later changes which would otherwise
break the indirect check.

Signed-off-by: Sean Hefty <shefty@nvidia.com>
Signed-off-by: Or Har-Toov <ohartoov@nvidia.com>
Signed-off-by: Vlad Dumitrescu <vdumitrescu@nvidia.com>
Link: https://patch.msgid.link/1ee6e2a68f8de1992b9da23aa1d7e3f9f25e0036.1731495873.git.leon@kernel.org
Signed-off-by: Leon Romanovsky <leon@kernel.org>
drivers/infiniband/core/cm.c