]> git.openfabrics.org - ~ardavis/dapl.git/commitdiff
dapl: add vendor_err with DTO error logging
authorArlin Davis <arlin.r.davis@intel.com>
Mon, 28 Apr 2008 15:41:05 +0000 (08:41 -0700)
committerArlin Davis <arlin.r.davis@intel.com>
Mon, 28 Apr 2008 15:41:05 +0000 (08:41 -0700)
DAPL_GET_CQE_VENDOR_ERR added to get vendor_err via cq entry.

Signed-off by: Arlin Davis ardavis@ichips.intel.com

dapl/common/dapl_evd_util.c
dapl/openib_cma/dapl_ib_dto.h

index 32fbabad164db8d334f087f060e9f08cb5a47a7a..293759fa64b6c8e7e46615535f4fc28b3807958f 100755 (executable)
@@ -543,9 +543,12 @@ bail:
     return dat_status;
 }
 
-#if defined(DAPL_DBG) && !defined(DAPL_GET_CQE_OP_STR)
+#if !defined(DAPL_GET_CQE_OP_STR)
 #define DAPL_GET_CQE_OP_STR(e) "Unknown CEQ OP String?"
 #endif
+#if !defined(DAPL_GET_CQE_VENDOR_ERR)
+#define DAPL_GET_CQE_VENDOR_ERR(e) 0
+#endif
 
 /*
  * dapli_evd_eh_print_cqe
@@ -565,7 +568,6 @@ dapli_evd_eh_print_cqe (
     IN         ib_work_completion_t    *cqe_ptr)
 {
 #ifdef DAPL_DBG
-
     dapl_dbg_log (DAPL_DBG_TYPE_CALLBACK,
                  "\t >>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<\n");
     dapl_dbg_log (DAPL_DBG_TYPE_CALLBACK,
@@ -583,8 +585,9 @@ dapli_evd_eh_print_cqe (
                  DAPL_GET_CQE_BYTESNUM (cqe_ptr));
     }
     dapl_dbg_log (DAPL_DBG_TYPE_CALLBACK,
-                 "\t\t status %d\n",
-                 DAPL_GET_CQE_STATUS (cqe_ptr));
+                 "\t\t status %d vendor_err 0x%x\n",
+                 DAPL_GET_CQE_STATUS(cqe_ptr),
+                 DAPL_GET_CQE_VENDOR_ERR(cqe_ptr));
     dapl_dbg_log (DAPL_DBG_TYPE_CALLBACK,
                  "\t >>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<\n");
 #endif
@@ -1215,9 +1218,10 @@ dapli_evd_cqe_to_event (
        }
 
        dapl_log(DAPL_DBG_TYPE_ERR,
-                "DTO completion ERR: status %d, opcode %s \n",
+                "DTO completion ERR: status %d, opcode %s, vendor_err 0x%x\n",
                 DAPL_GET_CQE_STATUS(cqe_ptr),
-                DAPL_GET_CQE_OP_STR(cqe_ptr));
+                DAPL_GET_CQE_OP_STR(cqe_ptr),
+                DAPL_GET_CQE_VENDOR_ERR(cqe_ptr));
     }
 }
 
index a90aea289dd4631c30b2292fa6ee6562e4568e56..b111e5e52893ad45a66c934648aa3542ff395eec 100644 (file)
@@ -458,10 +458,10 @@ STATIC _INLINE_ int dapls_cqe_opcode(ib_work_completion_t *cqe_p)
        }
 }
 
-
 #define DAPL_GET_CQE_OPTYPE(cqe_p) dapls_cqe_opcode(cqe_p)
 #define DAPL_GET_CQE_WRID(cqe_p) ((ib_work_completion_t*)cqe_p)->wr_id
 #define DAPL_GET_CQE_STATUS(cqe_p) ((ib_work_completion_t*)cqe_p)->status
+#define DAPL_GET_CQE_VENDOR_ERR(cqe_p) ((ib_work_completion_t*)cqe_p)->vendor_err
 #define DAPL_GET_CQE_BYTESNUM(cqe_p) ((ib_work_completion_t*)cqe_p)->byte_len
 #define DAPL_GET_CQE_IMMED_DATA(cqe_p) ((ib_work_completion_t*)cqe_p)->imm_data