Discussion:
[ofw] [PATCH 9/13] DAPL v2.0: scm: incorrectly sends user reject during CR callback errors
Davis, Arlin R
2012-01-13 23:55:43 UTC
Permalink
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 <***@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 = (voi

Loading...