[IPoIB NDIS 6.0 CM] Fixing the problem when MCast packet stuck the pending list....
authortzachid <tzachid@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Mon, 30 Nov 2009 15:34:19 +0000 (15:34 +0000)
committertzachid <tzachid@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Mon, 30 Nov 2009 15:34:19 +0000 (15:34 +0000)
git-svn-id: svn://openib.tc.cornell.edu/gen1/trunk@2601 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86

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

index bce1326..215eeb3 100644 (file)
@@ -2122,6 +2122,25 @@ ipoib_check_for_hang(
                IPOIB_EXIT( IPOIB_DBG_INIT );\r
                return FALSE;\r
        }\r
+       \r
+       if (p_adapter->p_port)\r
+       {\r
+               if (p_adapter->p_port->send_mgr.pending_list.count > 0)\r
+               {\r
+                       ++(p_adapter->p_port->n_no_progress);\r
+                       if (p_adapter->p_port->n_no_progress >= 4)\r
+                       {\r
+                               IPOIB_PRINT( TRACE_LEVEL_ERROR,IPOIB_DBG_ERROR, ("port got stuck, reseting it !!!\n"));\r
+                               //CL_ASSERT(FALSE); //?????\r
+                               p_adapter->hung = TRUE;\r
+                       }\r
+               }\r
+               else \r
+               {\r
+                       p_adapter->p_port->n_no_progress = 0;\r
+               }\r
+       }\r
+       \r
        if (p_adapter->hung) {\r
                ipoib_resume_oids(p_adapter);\r
        }\r
index 003f802..cfb8e73 100644 (file)
@@ -3912,6 +3912,7 @@ mc_end:
        IPOIB_PRINT( TRACE_LEVEL_VERBOSE, IPOIB_DBG_SEND, ("sending packet with wr-id =0x%p\n",p_net_buffer_list ));\r
        \r
        ib_status = p_port->p_adapter->p_ifc->post_send( p_port->ib_mgr.h_qp, &(p_port->p_desc->send_wr[0].wr), &p_wr_failed );\r
+       p_port->n_no_progress = 0; // IPoIB can send, reset the failure counter\r
        ret = true;\r
        cl_perf_stop( &p_port->p_adapter->perf, PostSend );\r
        if( ib_status != IB_SUCCESS )\r
@@ -6688,6 +6689,7 @@ ipoib_port_up(
        IPOIB_ENTER( IPOIB_DBG_INIT );\r
        IPOIB_PRINT( TRACE_LEVEL_ERROR, IPOIB_DBG_INIT,\r
                        ("[%d] Entering port_up.\n", ++cnt) ); \r
+       p_port->n_no_progress = 0; // Init the send failure counter\r
        \r
        cl_obj_lock( &p_port->obj );\r
        if ( p_port->state == IB_QPS_INIT ) \r
index fa0562c..0e0ace3 100644 (file)
@@ -628,6 +628,7 @@ typedef struct _ipoib_port
        KTIMER                                  gc_timer;\r
        uint32_t                                bc_join_retry_cnt;\r
        ib_net16_t                              base_lid;\r
+       LONG                                    n_no_progress;\r
        ipoib_hdr_t                             hdr[1]; /* Must be last! */\r
 \r
 }      ipoib_port_t;\r