[ofa-general] [PATCH][dat1.2] dapl: add vendor_err with DTO error logging
Arlin Davis
arlin.r.davis at intel.com
Mon Apr 28 10:17:07 PDT 2008
DAPL_GET_CQE_VENDOR_ERR added to get vendor_err via cq entry.
Signed-off by: Arlin Davis ardavis at ichips.intel.com
---
dapl/common/dapl_evd_util.c | 50 ++++++++++++++++++----------------------
dapl/openib_cma/dapl_ib_dto.h | 1 +
2 files changed, 24 insertions(+), 27 deletions(-)
diff --git a/dapl/common/dapl_evd_util.c b/dapl/common/dapl_evd_util.c
index 36b776c..2c95c6d 100644
--- a/dapl/common/dapl_evd_util.c
+++ b/dapl/common/dapl_evd_util.c
@@ -485,6 +485,12 @@ bail:
return dat_status;
}
+#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
@@ -504,39 +510,28 @@ dapli_evd_eh_print_cqe (
IN ib_work_completion_t *cqe_ptr)
{
#ifdef DAPL_DBG
- static char *optable[] =
- {
- "OP_SEND",
- "OP_RDMA_READ",
- "OP_RDMA_WRITE",
- "OP_COMP_AND_SWAP",
- "OP_FETCH_AND_ADD",
- "OP_RECEIVE",
- "OP_BIND_MW",
- 0
- };
-
dapl_dbg_log (DAPL_DBG_TYPE_CALLBACK,
- "\t >>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<\n");
+ "\t >>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<\n");
dapl_dbg_log (DAPL_DBG_TYPE_CALLBACK,
- "\t dapl_evd_dto_callback : CQE \n");
+ "\t dapl_evd_dto_callback : CQE \n");
dapl_dbg_log (DAPL_DBG_TYPE_CALLBACK,
- "\t\t work_req_id %lli\n",
- DAPL_GET_CQE_WRID (cqe_ptr));
+ "\t\t work_req_id %lli\n",
+ DAPL_GET_CQE_WRID (cqe_ptr));
if (DAPL_GET_CQE_STATUS (cqe_ptr) == 0)
{
- dapl_dbg_log (DAPL_DBG_TYPE_CALLBACK,
- "\t\t op_type: %s\n",
- optable[DAPL_GET_CQE_OPTYPE (cqe_ptr)]);
- dapl_dbg_log (DAPL_DBG_TYPE_CALLBACK,
- "\t\t bytes_num %d\n",
- DAPL_GET_CQE_BYTESNUM (cqe_ptr));
+ dapl_dbg_log (DAPL_DBG_TYPE_CALLBACK,
+ "\t\t op_type: %s\n",
+ DAPL_GET_CQE_OP_STR(cqe_ptr));
+ dapl_dbg_log (DAPL_DBG_TYPE_CALLBACK,
+ "\t\t bytes_num %d\n",
+ 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");
+ "\t >>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<\n");
#endif
return;
}
@@ -1171,9 +1166,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));
}
}
diff --git a/dapl/openib_cma/dapl_ib_dto.h b/dapl/openib_cma/dapl_ib_dto.h
index 1a83718..52b189b 100644
--- a/dapl/openib_cma/dapl_ib_dto.h
+++ b/dapl/openib_cma/dapl_ib_dto.h
@@ -272,6 +272,7 @@ 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
--
1.5.2.5
More information about the general
mailing list