and return errno with verbs post failures.

Signed-off by: Arlin Davis [EMAIL PROTECTED]
---
 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


_______________________________________________
general mailing list
[email protected]
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general

Reply via email to