]> git.openfabrics.org - ~ardavis/dapl.git/commitdiff
ucm: release UD cm objects after AH is exchanged to avoid duplicate request drops
authorArlin Davis <arlin.r.davis@intel.com>
Fri, 3 Dec 2010 22:56:21 +0000 (14:56 -0800)
committerArlin Davis <arlin.r.davis@intel.com>
Fri, 3 Dec 2010 22:56:21 +0000 (14:56 -0800)
When EP is in UD mode, AH resolution is handled with DAT connection semantics
connect and accept. Since AH info can be resolved for the same EPs you can
get false duplicate requests because a previous CR from is still on the
CM processing list. The CM object will remain on the EP free list and not
be freed until EP is destroyed given the possibilty of consumer accessing CR
private data buffer.

Signed-off-by: Arlin Davis <arlin.r.davis@intel.com>
dapl/openib_ucm/cm.c

index 36291fdf0ccf76cbed5c40233a3643921ae7c3d8..5b157fdb998656d5209aa8b80ecf9c0324063847 100644 (file)
@@ -1186,6 +1186,7 @@ ud_bail:
                                (DAT_COUNT)ntohs(cm->msg.p_size),
                                (DAT_PVOID *)cm->msg.p_data,
                                (DAT_PVOID *)&xevent);
+               dapli_cm_free(cm); /* still attached to EP */
        } else
 #endif
        {
@@ -1358,6 +1359,7 @@ static void ucm_accept_rtu(dp_ib_cm_handle_t cm, ib_cm_msg_t *msg)
                                (DAT_COUNT)ntohs(cm->msg.p_size),
                                (DAT_PVOID *)cm->msg.p_data,
                                (DAT_PVOID *)&xevent);
+               dapli_cm_free(cm); /* still attached to EP */
        } else {
 #endif
                dapls_cr_callback(cm, IB_CME_CONNECTED, NULL, 0, cm->sp);