[IPoIB NDIS 6.0 CM] (mlnx 5232)
authortzachid <tzachid@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Mon, 7 Dec 2009 11:24:16 +0000 (11:24 +0000)
committertzachid <tzachid@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Mon, 7 Dec 2009 11:24:16 +0000 (11:24 +0000)
Bug at s_buf->p_endpt initialization
Debug prints for Endpoint Communication

git-svn-id: svn://openib.tc.cornell.edu/gen1/trunk@2623 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86

ulp/ipoib_NDIS6_CM/kernel/ipoib_endpoint.h
ulp/ipoib_NDIS6_CM/kernel/ipoib_port.cpp

index 844a81f..a6d25e8 100644 (file)
@@ -211,6 +211,7 @@ static inline void
 ipoib_endpt_deref(\r
        IN                              ipoib_endpt_t* const            p_endpt )\r
 {\r
+       CL_ASSERT(p_endpt->obj.ref_cnt);\r
        cl_obj_deref( &p_endpt->obj );\r
 #if DBG\r
        IPOIB_PRINT( TRACE_LEVEL_INFORMATION, IPOIB_DBG_OBJ,\r
index 3f4171f..641c094 100644 (file)
@@ -3773,6 +3773,7 @@ ipoib_process_sg_list_real(
        {\r
                cl_perf_start( GetEndpt );\r
                status = __endpt_mgr_ref( p_port, p_eth_hdr->dst, &(p_port->p_desc->p_endpt) );\r
+               IPOIB_PRINT( TRACE_LEVEL_INFORMATION, IPOIB_DBG_ENDPT,("__endpt_mgr_ref called for %p\n", p_port->p_desc->p_endpt));\r
                cl_perf_stop( &p_port->p_adapter->perf, GetEndpt );\r
                if( status == NDIS_STATUS_PENDING )\r
                {\r
@@ -4311,6 +4312,7 @@ __send_mgr_filter_igmp_v2(
                IPOIB_PRINT( TRACE_LEVEL_INFORMATION, IPOIB_DBG_MCAST,\r
                        ("Catched IGMP_V2_MEMBERSHIP_REPORT message\n") );\r
                endpt_status = __endpt_mgr_ref( p_port, fake_mcast_mac, &p_endpt );\r
+               IPOIB_PRINT( TRACE_LEVEL_INFORMATION, IPOIB_DBG_ENDPT,("__endpt_mgr_ref called for %p\n", p_endpt));\r
                if ( p_endpt )\r
                {\r
                        cl_obj_lock( &p_port->obj );\r
@@ -4329,6 +4331,7 @@ __send_mgr_filter_igmp_v2(
                IPOIB_PRINT( TRACE_LEVEL_INFORMATION, IPOIB_DBG_MCAST,\r
                             ("Catched IGMP_V2_LEAVE_GROUP message\n") );\r
                endpt_status = __endpt_mgr_ref( p_port, fake_mcast_mac, &p_endpt );\r
+               IPOIB_PRINT( TRACE_LEVEL_INFORMATION, IPOIB_DBG_ENDPT,("__endpt_mgr_ref called for %p\n", p_endpt));\r
                if ( p_endpt )\r
                {\r
                        cl_obj_lock( &p_port->obj );\r
@@ -4841,6 +4844,7 @@ __send_mgr_queue(
 \r
        cl_perf_start( GetEndpt );\r
        status = __endpt_mgr_ref( p_port, p_eth_hdr->dst, pp_endpt );\r
+       IPOIB_PRINT( TRACE_LEVEL_INFORMATION, IPOIB_DBG_ENDPT,("__endpt_mgr_ref called for %p\n", *pp_endpt));\r
        cl_perf_stop( &p_port->p_adapter->perf, GetEndpt );\r
 \r
        if( status == NDIS_STATUS_NO_ROUTE_TO_DESTINATION &&\r
@@ -4887,6 +4891,14 @@ __build_send_desc(
        IPOIB_ENTER( IPOIB_DBG_SEND );\r
 \r
        ipoib_send_desc_t *p_desc = s_buf->p_port->p_desc;\r
+       \r
+       /* Store context in our reserved area of the packet. */\r
+\r
+       ASSERT(s_buf == (ipoib_send_NB_SG *) IPOIB_INFO_FROM_NB(s_buf->p_curr_nb));\r
+       s_buf->p_endpt = p_desc->p_endpt;\r
+       //TODO IMPORTANT: Send buffer should not be allocated within global struct !!!\r
+       // Otherwise, the next send may override its content\r
+       //s_buf->p_send_buf= p_desc->p_buf;\r
 \r
        /* Format the send descriptor. */\r
        PVOID* ppTemp           = &NET_BUFFER_LIST_INFO(s_buf->p_nbl, TcpIpChecksumNetBufferListInfo);\r
@@ -5009,13 +5021,7 @@ __build_send_desc(
                p_desc->send_wr[p_desc->num_wrs - 1].wr.p_next = NULL;\r
        }\r
 \r
-       /* Store context in our reserved area of the packet. */\r
 \r
-       ASSERT(s_buf == (ipoib_send_NB_SG *) IPOIB_INFO_FROM_NB(s_buf->p_curr_nb));\r
-       s_buf->p_endpt = p_desc->p_endpt;\r
-       //TODO IMPORTANT: Send buffer should not be allocated within global struct !!!\r
-       // Otherwise, the next send may override its content\r
-       //s_buf->p_send_buf= p_desc->p_buf;\r
        \r
        IPOIB_EXIT( IPOIB_DBG_SEND );\r
        return NDIS_STATUS_SUCCESS;\r
@@ -6523,7 +6529,7 @@ __endpt_mgr_insert(
                return IB_INVALID_STATE;\r
        }\r
 \r
-#if 0\r
+#if DBG\r
        cl_atomic_inc( &p_port->ref[ref_endpt_track] );\r
        IPOIB_PRINT( TRACE_LEVEL_INFORMATION, IPOIB_DBG_OBJ,\r
                ("ref  type %d ref_cnt %d\n", ref_endpt_track, p_port->obj.ref_cnt) );\r
@@ -6662,7 +6668,7 @@ ipoib_port_remove_endpt(
                //TODO CM\r
                //endpt_cm_destroy_conn( p_port, p_endpt );\r
 \r
-#if 0\r
+#if DBG\r
                cl_atomic_dec( &p_port->ref[ref_endpt_track] );\r
                IPOIB_PRINT( TRACE_LEVEL_INFORMATION, IPOIB_DBG_ENDPT,\r
                        ("ref type %d ref_cnt %d\n", ref_endpt_track, p_port->obj.ref_cnt) );\r
@@ -7537,9 +7543,10 @@ ipoib_port_join_mcast(
        case NDIS_STATUS_PENDING:\r
                IPOIB_PRINT( TRACE_LEVEL_INFORMATION, IPOIB_DBG_MCAST,\r
                        ("<ipoib_port_join_mcast> PENDING\n") );\r
+               IPOIB_PRINT( TRACE_LEVEL_INFORMATION, IPOIB_DBG_ENDPT,("__endpt_mgr_ref called for %p\n", p_endpt));\r
                return IB_SUCCESS;\r
        }\r
-\r
+       IPOIB_PRINT( TRACE_LEVEL_INFORMATION, IPOIB_DBG_ENDPT,("__endpt_mgr_ref called for %p\n", p_endpt));\r
        /*\r
         * Issue the mcast request, using the parameters of the broadcast group.\r
         * This allows us to do a create request that should always succeed since\r