[ofw] [QLGCVNIC] flow control patch.

Alex Estrin alex.estrin at qlogic.com
Tue Mar 25 09:07:03 PDT 2008


This patch will help viport to sustain a heavy load.

Thanks,
Alex 

Index: qlgcvnic/kernel/vnic_data.c
===================================================================
--- qlgcvnic/kernel/vnic_data.c	(revision 1024)
+++ qlgcvnic/kernel/vnic_data.c	(working copy)
@@ -611,7 +611,7 @@
 	}
 	pRdmaIo->p_trailer->connectionHashAndValid = CHV_VALID;
 
-	if( last )
+	if( last || pData->xmitPool.needBuffers )
 		pRdmaIo->p_trailer->pktFlags |= PF_KICK;
 
 	/* fill last data segment with trailer and pad */
@@ -925,6 +925,7 @@
 		VNIC_TRACE( VNIC_DBG_ERROR,
 					("Out of xmit buffers\n") );
 
+		p_xmitPool->needBuffers = TRUE;
 		viport_stopXmit( pData->p_viport );
 
 		NdisReleaseSpinLock( &pData->xmitBufLock );
Index: qlgcvnic/kernel/vnic_viport.c
===================================================================
--- qlgcvnic/kernel/vnic_viport.c	(revision 1024)
+++ qlgcvnic/kernel/vnic_viport.c	(working copy)
@@ -537,7 +537,7 @@
 				("IOC[%d] Xmit Pending Packet failed\n",
p_viport->ioc_num ));
 
 			/* put it back on pending list - will complete
it on cleanup */
-			NdisInterlockedInsertTailList( 
+			NdisInterlockedInsertHeadList( 
 
&p_adapter->send_pending_list,
 
VNIC_LIST_ITEM_FROM_PACKET( p_pending_packet ),
 
&p_adapter->pending_list_lock );
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vnic_flow_control.diff
Type: application/octet-stream
Size: 1255 bytes
Desc: vnic_flow_control.diff
URL: <http://lists.openfabrics.org/pipermail/ofw/attachments/20080325/522b91b8/attachment.obj>


More information about the ofw mailing list