[QLGCVNIC]flow control patch to help viport sustain a heavy load.
authoraestrin <aestrin@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Wed, 26 Mar 2008 14:10:36 +0000 (14:10 +0000)
committeraestrin <aestrin@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Wed, 26 Mar 2008 14:10:36 +0000 (14:10 +0000)
git-svn-id: svn://openib.tc.cornell.edu/gen1/trunk@1025 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86

ulp/qlgcvnic/kernel/vnic_data.c
ulp/qlgcvnic/kernel/vnic_viport.c

index 4f39a64..14733d4 100644 (file)
@@ -611,7 +611,7 @@ data_xmitPacket(
        }\r
        pRdmaIo->p_trailer->connectionHashAndValid = CHV_VALID;\r
 \r
-       if( last )\r
+       if( last || pData->xmitPool.needBuffers )\r
                pRdmaIo->p_trailer->pktFlags |= PF_KICK;\r
 \r
        /* fill last data segment with trailer and pad */\r
@@ -925,6 +925,7 @@ data_allocXmitBuffer(
                VNIC_TRACE( VNIC_DBG_ERROR,\r
                                        ("Out of xmit buffers\n") );\r
 \r
+               p_xmitPool->needBuffers = TRUE;\r
                viport_stopXmit( pData->p_viport );\r
 \r
                NdisReleaseSpinLock( &pData->xmitBufLock );\r
index f34c8bf..fe3adac 100644 (file)
@@ -537,7 +537,7 @@ viport_xmitPacket(
                                ("IOC[%d] Xmit Pending Packet failed\n", p_viport->ioc_num ));\r
 \r
                        /* put it back on pending list - will complete it on cleanup */\r
-                       NdisInterlockedInsertTailList( \r
+                       NdisInterlockedInsertHeadList( \r
                                                                &p_adapter->send_pending_list,\r
                                                                VNIC_LIST_ITEM_FROM_PACKET( p_pending_packet ),\r
                                                                &p_adapter->pending_list_lock );\r