From 81f5ac17d9039e2edcd8324f7d5ed5f66fcff9f2 Mon Sep 17 00:00:00 2001 From: Arlin Davis Date: Fri, 16 Oct 2009 08:52:21 -0700 Subject: [PATCH] ucm: using UD type QP's, ucm reports wrong reject event when user rejects AH resolution request. During rejects, both usr and ucm internal, the qp_type does not get initialized so the check for UD type QP messages fail on active side and the wrong event gets generated. Initialize saddr.ib information before sending reject back to active side. Signed-off-by: Arlin Davis --- dapl/openib_ucm/cm.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/dapl/openib_ucm/cm.c b/dapl/openib_ucm/cm.c index 7ce3aab..cc480c4 100644 --- a/dapl/openib_ucm/cm.c +++ b/dapl/openib_ucm/cm.c @@ -304,6 +304,13 @@ static int ucm_reject(ib_hca_transport_t *tp, ib_cm_msg_t *msg) smsg.sqpn = msg->dqpn; dapl_os_memcpy(&smsg.daddr, &msg->saddr, sizeof(union dcm_addr)); + + /* no dst_addr IB info in REQ, init lid, gid, get type from saddr */ + smsg.saddr.ib.lid = tp->addr.ib.lid; + smsg.saddr.ib.qp_type = msg->saddr.ib.qp_type; + dapl_os_memcpy(&smsg.saddr.ib.gid[0], + &tp->addr.ib.gid, 16); + dapl_os_memcpy(&smsg.saddr, &msg->daddr, sizeof(union dcm_addr)); dapl_dbg_log(DAPL_DBG_TYPE_CM, @@ -1736,10 +1743,11 @@ dapls_ib_reject_connection(IN dp_ib_cm_handle_t cm, if (psize > DCM_MAX_PDATA_SIZE) return DAT_LENGTH_ERROR; - /* cr_thread will destroy CR, update saddr lid, gid info */ + /* cr_thread will destroy CR, update saddr lid, gid, qp_type info */ dapl_os_lock(&cm->lock); cm->state = DCM_REJECTED; cm->msg.saddr.ib.lid = cm->hca->ib_trans.addr.ib.lid; + cm->msg.saddr.ib.qp_type = cm->msg.daddr.ib.qp_type; dapl_os_memcpy(&cm->msg.saddr.ib.gid[0], &cm->hca->ib_trans.addr.ib.gid, 16); cm->msg.op = htons(DCM_REJ_USER); -- 2.46.0