[ofw] [PATCH 9/13] DAPL v2.0: scm: incorrectly sends user reject during CR callback errors

Davis, Arlin R arlin.r.davis at intel.com
Fri Jan 13 15:55:43 PST 2012


Add reason checking on provider rejects and set appropriate op type
in reject message. Reject can be called from cr callback during
failures. User reject will be IB_CM_REJ_REASON_CONSUMER_REJ.

Signed-off-by: Arlin Davis <arlin.r.davis at intel.com>
---
 dapl/openib_scm/cm.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/dapl/openib_scm/cm.c b/dapl/openib_scm/cm.c
index b6109f1..a34965b 100644
--- a/dapl/openib_scm/cm.c
+++ b/dapl/openib_scm/cm.c
@@ -1666,7 +1666,11 @@ dapls_ib_reject_connection(IN dp_ib_cm_handle_t cm_ptr,
                 return DAT_LENGTH_ERROR;
 
 	/* write reject data to indicate reject */
-	cm_ptr->msg.op = htons(DCM_REJ_USER);
+	if (reason == IB_CM_REJ_REASON_CONSUMER_REJ)
+		cm_ptr->msg.op = htons(DCM_REJ_USER);
+	else
+		cm_ptr->msg.op = htons(DCM_REJ_CM);
+
 	cm_ptr->msg.p_size = htons(psize);
 	
 	iov[0].iov_base = (void *)&cm_ptr->msg;
-- 
1.7.3





More information about the ofw mailing list