[ofa-general] [PATCH] uDAPL v2 openib_cma: DTO extended cookie cleanup issue with inbound rdma write with immediate completions

Davis, Arlin R arlin.r.davis at intel.com
Tue Jan 22 16:01:04 PST 2008


Fix for uDAPL v2 using extended operation. After extension completion,
the DTO cookie must be checked for type before deallocating to handle
inbound immediate data in receive. The sample dtestx client will fail
when running loopback if the rdma immediate is received from remote
before the rdma immediate request completion fires.

dtestx client error:
dat_ib_post_rdma_write_immed returned DAT_INSUFFICIENT_RESOURCES :
DAT_RESOURCE_MEMORY

Signed-off by: Arlin Davis <ardavis at ichips.intel.com>

diff --git a/dapl/common/dapl_evd_util.c b/dapl/common/dapl_evd_util.c
index a3bcbd5..a993b02 100755
--- a/dapl/common/dapl_evd_util.c
+++ b/dapl/common/dapl_evd_util.c
@@ -1041,7 +1041,10 @@ dapli_evd_cqe_to_event (
                DAPL_GET_CQE_OPTYPE(cqe_ptr) !=  OP_RECEIVE))
            {
                dapls_cqe_to_event_extension (ep_ptr, cookie, cqe_ptr,
event_ptr);
-               dapls_cookie_dealloc (&ep_ptr->req_buffer, cookie);
+                if (cookie->val.dto.type == DAPL_DTO_TYPE_RECV)
+                        dapls_cookie_dealloc (&ep_ptr->recv_buffer,
cookie);
+                else
+                        dapls_cookie_dealloc (&ep_ptr->req_buffer,
cookie);
                break;
            }
 #endif




More information about the general mailing list