]> git.openfabrics.org - ~shefty/rdma-win.git/commitdiff
[MTHCA] debug print improvement. [mlnx: 3353]
authorleonidk <leonidk@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Thu, 23 Oct 2008 13:43:51 +0000 (13:43 +0000)
committerleonidk <leonidk@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Thu, 23 Oct 2008 13:43:51 +0000 (13:43 +0000)
git-svn-id: svn://openib.tc.cornell.edu/gen1@1690 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86

branches/WOF2-0/trunk/hw/mthca/user/mlnx_uvp_qp.c

index 270c7787af2e2998e9c3e63eb9f3d7b853f1c137..85f7acb014d8c3d5ac469351ed5930a14410a126 100644 (file)
@@ -74,20 +74,19 @@ static enum mthca_wr_opcode conv_ibal_wr_opcode(struct _ib_send_wr *wr)
 }\r
 \r
 \r
-static void dump_wqe(uint32_t print_lvl, uint32_t *wqe_ptr , struct mthca_qp *qp_ptr)\r
+static void dump_wqe(uint32_t print_lvl, uint32_t *wqe_ptr , struct mthca_qp *qp_ptr, int size)\r
 {\r
        net32_t *wqe = wqe_ptr;\r
+       int i;\r
 \r
        (void) wqe;     /* avoid warning if mthca_dbg compiled away... */\r
-       UVP_PRINT(print_lvl,UVP_DBG_QP,("WQE contents  QPN 0x%06x \n",qp_ptr->ibv_qp.qp_num));\r
-       UVP_PRINT(print_lvl,UVP_DBG_QP,("WQE contents [%02x] %08x %08x %08x %08x \n",0\r
-               , cl_ntoh32(wqe[0]), cl_ntoh32(wqe[1]), cl_ntoh32(wqe[2]), cl_ntoh32(wqe[3])));\r
-       UVP_PRINT(print_lvl,UVP_DBG_QP,("WQE contents [%02x] %08x %08x %08x %08x \n",4\r
-               , cl_ntoh32(wqe[4]), cl_ntoh32(wqe[5]), cl_ntoh32(wqe[6]), cl_ntoh32(wqe[7])));\r
-       UVP_PRINT(print_lvl,UVP_DBG_QP,("WQE contents [%02x] %08x %08x %08x %08x \n",8\r
-               , cl_ntoh32(wqe[8]), cl_ntoh32(wqe[9]), cl_ntoh32(wqe[10]), cl_ntoh32(wqe[11])));\r
-       UVP_PRINT(print_lvl,UVP_DBG_QP,("WQE contents [%02x] %08x %08x %08x %08x \n",12\r
-               , cl_ntoh32(wqe[12]), cl_ntoh32(wqe[13]), cl_ntoh32(wqe[14]), cl_ntoh32(wqe[15])));\r
+       UVP_PRINT(print_lvl,UVP_DBG_QP,("WQE: QPN 0x%06x, buf %p , buf_sz %d, send_offset %d\n",\r
+               qp_ptr->ibv_qp.qp_num, qp_ptr->buf, qp_ptr->buf_size, qp_ptr->send_wqe_offset ));\r
+       for (i=0; i<size; ++i) {\r
+               UVP_PRINT(print_lvl,UVP_DBG_QP,("  segment[%d] %08x %08x %08x %08x \n",i,\r
+                       cl_ntoh32(wqe[4*i+0]), cl_ntoh32(wqe[4*i+1]), \r
+                       cl_ntoh32(wqe[4*i+2]), cl_ntoh32(wqe[4*i+3])));\r
+       }\r
 \r
 }\r
 static void *get_recv_wqe(struct mthca_qp *qp, int n)\r
@@ -361,7 +360,7 @@ int mthca_tavor_post_send(struct ibv_qp *ibqp, struct _ib_send_wr *wr,
                        op0   = opcode;\r
                }\r
                \r
-               dump_wqe( TRACE_LEVEL_VERBOSE, (uint32_t*)qp->sq.last,qp);\r
+               dump_wqe( TRACE_LEVEL_VERBOSE, (uint32_t*)qp->sq.last,qp, size);\r
                \r
                ++ind;\r
                if (unlikely(ind >= qp->sq.max))\r
@@ -770,6 +769,8 @@ int mthca_arbel_post_send(struct ibv_qp *ibqp, struct _ib_send_wr *wr,
                        op0   = opcode;\r
                }\r
 \r
+               dump_wqe( TRACE_LEVEL_VERBOSE, (uint32_t*)qp->sq.last,qp, size);\r
+\r
                ++ind;\r
                if (unlikely(ind >= qp->sq.max))\r
                        ind -= qp->sq.max;\r