IB/cma: Send MRA for reply messages
PATCH 1/1 IB/cma: Send MRA for reply messages
From: Moni Shoua <monis-VPRAkNaXOzVWk0Htik3J/[email protected]>
Current implementation of RDMA_CM sends MRA (Message Receipt Acknowledgment) only for request messages but not for response messages.
As a result, a slow active side of the connection may send a ready-to-use message to the passive side in a delay that is too long for the passive side to wait for.
This patch adds a call to ib_send_cm_mra() upon receiving a response message and by this tells the other side to modify the service timeout to a bigger value, 16 times than before. As in the request case, MRA for reply will be sent only if a duplicate response has arrived.
--- drivers/infiniband/core/cma.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/infiniband/core/cma.c +3 -0
@@ -1755,6 +1755,9 @@ static int cma_ib_handler(struct ib_cm_id *cm_id, struct ib_cm_event *ib_event) event.status = -ETIMEDOUT ;break ;case IB_CM_REP_RECEIVED : +if (cma_comp (id_priv,RDMA_CM_CONNECT ) && + (id_priv->id.qp_type !=IB_QPT_UD )) +ib_send_cm_mra (cm_id,CMA_CM_MRA_SETTING ,NULL ,0 );if (id_priv->id.qp) { event.status =cma_rep_recv (id_priv); event.event = event.status ? RDMA_CM_EVENT_CONNECT_ERROR :
--
2.12.2
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): 20170416043134.18860-1-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org
Doug Ledford
AppliedQuoted 18 lines · Leon Romanovsky
From: Moni Shoua <monis-VPRAkNaXOzVWk0Htik3J/[email protected]>
Current implementation of
RDMA_CMsends MRA (Message Receipt Acknowledgment) only for request messages but not for response messages.As a result, a slow active side of the connection may send a ready- to-use
message to the passive side in a delay that is too long for the passive
side to wait for.This patch adds a call to
ib_send_cm_mra()upon receiving a response message and by this tells the other side to modify the service timeout
to a bigger value, 16 times than before. As in the request case, MRA for reply will be sent only if a duplicate response has arrived.
Quoted 3 lines
Signed-off-by Leon Romanovsky <[email protected]>
Thanks, applied.
Signature · 9 lines
Doug Ledford <[email protected]> GPG KeyID: B826A3330E572FDD Key fingerprint = AE6B 1BDA 122B 23B4 265B 1274 B826 A333 0E57 2FDD -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html