From e6c89ec1ed9d7060d4717dbed75f984844f0496b Mon Sep 17 00:00:00 2001 From: leonidk Date: Thu, 23 Oct 2008 13:43:19 +0000 Subject: [PATCH] [MTHCA] debug print improvement. [mlnx: 3353] git-svn-id: svn://openib.tc.cornell.edu/gen1@1689 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86 --- trunk/hw/mthca/user/mlnx_uvp_qp.c | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/trunk/hw/mthca/user/mlnx_uvp_qp.c b/trunk/hw/mthca/user/mlnx_uvp_qp.c index 270c7787..85f7acb0 100644 --- a/trunk/hw/mthca/user/mlnx_uvp_qp.c +++ b/trunk/hw/mthca/user/mlnx_uvp_qp.c @@ -74,20 +74,19 @@ static enum mthca_wr_opcode conv_ibal_wr_opcode(struct _ib_send_wr *wr) } -static void dump_wqe(uint32_t print_lvl, uint32_t *wqe_ptr , struct mthca_qp *qp_ptr) +static void dump_wqe(uint32_t print_lvl, uint32_t *wqe_ptr , struct mthca_qp *qp_ptr, int size) { net32_t *wqe = wqe_ptr; + int i; (void) wqe; /* avoid warning if mthca_dbg compiled away... */ - UVP_PRINT(print_lvl,UVP_DBG_QP,("WQE contents QPN 0x%06x \n",qp_ptr->ibv_qp.qp_num)); - UVP_PRINT(print_lvl,UVP_DBG_QP,("WQE contents [%02x] %08x %08x %08x %08x \n",0 - , cl_ntoh32(wqe[0]), cl_ntoh32(wqe[1]), cl_ntoh32(wqe[2]), cl_ntoh32(wqe[3]))); - UVP_PRINT(print_lvl,UVP_DBG_QP,("WQE contents [%02x] %08x %08x %08x %08x \n",4 - , cl_ntoh32(wqe[4]), cl_ntoh32(wqe[5]), cl_ntoh32(wqe[6]), cl_ntoh32(wqe[7]))); - UVP_PRINT(print_lvl,UVP_DBG_QP,("WQE contents [%02x] %08x %08x %08x %08x \n",8 - , cl_ntoh32(wqe[8]), cl_ntoh32(wqe[9]), cl_ntoh32(wqe[10]), cl_ntoh32(wqe[11]))); - UVP_PRINT(print_lvl,UVP_DBG_QP,("WQE contents [%02x] %08x %08x %08x %08x \n",12 - , cl_ntoh32(wqe[12]), cl_ntoh32(wqe[13]), cl_ntoh32(wqe[14]), cl_ntoh32(wqe[15]))); + UVP_PRINT(print_lvl,UVP_DBG_QP,("WQE: QPN 0x%06x, buf %p , buf_sz %d, send_offset %d\n", + qp_ptr->ibv_qp.qp_num, qp_ptr->buf, qp_ptr->buf_size, qp_ptr->send_wqe_offset )); + for (i=0; isq.last,qp); + dump_wqe( TRACE_LEVEL_VERBOSE, (uint32_t*)qp->sq.last,qp, size); ++ind; if (unlikely(ind >= qp->sq.max)) @@ -770,6 +769,8 @@ int mthca_arbel_post_send(struct ibv_qp *ibqp, struct _ib_send_wr *wr, op0 = opcode; } + dump_wqe( TRACE_LEVEL_VERBOSE, (uint32_t*)qp->sq.last,qp, size); + ++ind; if (unlikely(ind >= qp->sq.max)) ind -= qp->sq.max; -- 2.46.0