[ofa-general] [PATCH] [dat1.2] dapl: fix post_send, post_recv to handle 0 byte's and NULL iov handles
Arlin Davis
arlin.r.davis at intel.com
Wed Apr 30 15:57:50 PDT 2008
and return errno with verbs post failures.
Signed-off by: Arlin Davis ardavis at ichips.intel.com
---
dapl/openib_cma/dapl_ib_dto.h | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/dapl/openib_cma/dapl_ib_dto.h b/dapl/openib_cma/dapl_ib_dto.h
index 52b189b..f45da35 100644
--- a/dapl/openib_cma/dapl_ib_dto.h
+++ b/dapl/openib_cma/dapl_ib_dto.h
@@ -120,7 +120,7 @@ dapls_ib_post_recv (
dapl_os_free(ds_array_start_p, segments * sizeof(ib_data_segment_t));
if (ret)
- return( dapl_convert_errno(EFAULT,"ibv_recv") );
+ return( dapl_convert_errno(errno,"ibv_recv") );
return DAT_SUCCESS;
}
@@ -199,7 +199,8 @@ dapls_ib_post_send (
if (cookie != NULL)
cookie->val.dto.size = total_len;
- if ((op_type == OP_RDMA_WRITE) || (op_type == OP_RDMA_READ)) {
+ if (wr.num_sge &&
+ (op_type == OP_RDMA_WRITE || op_type == OP_RDMA_READ)) {
wr.wr.rdma.remote_addr = remote_iov->target_address;
wr.wr.rdma.rkey = remote_iov->rmr_context;
dapl_dbg_log(DAPL_DBG_TYPE_EP,
@@ -230,7 +231,7 @@ dapls_ib_post_send (
dapl_os_free(ds_array_start_p, segments * sizeof(ib_data_segment_t));
if (ret)
- return( dapl_convert_errno(EFAULT,"ibv_send") );
+ return( dapl_convert_errno(errno,"ibv_send") );
dapl_dbg_log(DAPL_DBG_TYPE_EP," post_snd: returned\n");
return DAT_SUCCESS;
--
1.5.2.5
More information about the general
mailing list