Need to use cookie opcode during failures in lieu of cqe opcode.

Signed-off by: Arlin Davis [EMAIL PROTECTED]
---
 dapl/common/dapl_evd_util.c |   24 +++++++++++++++++++++---
 1 files changed, 21 insertions(+), 3 deletions(-)
 mode change 100755 => 100644 dapl/common/dapl_evd_util.c

diff --git a/dapl/common/dapl_evd_util.c b/dapl/common/dapl_evd_util.c
old mode 100755
new mode 100644
index 87a0194..ea3e27c
--- a/dapl/common/dapl_evd_util.c
+++ b/dapl/common/dapl_evd_util.c
@@ -45,6 +45,10 @@
 #include "dapl_cookie.h"
 #include "dapl.h"
 
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+
 STATIC _INLINE_ void dapli_evd_eh_print_cqe (
        IN  ib_work_completion_t        *cqe);
 
@@ -543,6 +547,19 @@ bail:
     return dat_status;
 }
 
+STATIC _INLINE_ char * DAPL_GET_DTO_OP_STR(int op)
+{
+    static char *dto_ops[] =
+    {
+        "OP_SEND",
+        "OP_RECEIVE",
+        "OP_RDMA_WRITE",
+        "OP_RDMA_READ",
+        0
+    };
+    return ((op < 0 || op > 3) ? "Invalid DTO OP?" : dto_ops[op]);
+}
+
 #if !defined(DAPL_GET_CQE_OP_STR)
 #define DAPL_GET_CQE_OP_STR(e) "Unknown CEQ OP String?"
 #endif
@@ -1210,10 +1227,11 @@ dapli_evd_cqe_to_event (
        }
 
        dapl_log(DAPL_DBG_TYPE_ERR,
-                "DTO completion ERR: status %d, opcode %s, vendor_err
0x%x\n",
+                "DTO completion ERR: status %d, op %s, vendor_err 0x%x
- %s\n",
                 DAPL_GET_CQE_STATUS(cqe_ptr),
-                DAPL_GET_CQE_OP_STR(cqe_ptr),
-                DAPL_GET_CQE_VENDOR_ERR(cqe_ptr));
+                DAPL_GET_DTO_OP_STR(cookie->val.dto.type),
+                DAPL_GET_CQE_VENDOR_ERR(cqe_ptr),
+                inet_ntoa(((struct sockaddr_in
*)&ep_ptr->remote_ia_address)->sin_addr));
     }
 }
 
-- 
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