[ofw] [PACH] handle pending CM sends correctly
Smith, Stan
stan.smith at intel.com
Wed Feb 23 20:28:10 PST 2011
NDIS can overrun QP send_q resources (sq_depth) when pushed hard; when send q resources are exhausted the current send is marked pending. In the CM CQ callback routine, detect pending sends and resume them; exactly what is done for the UD send case. Allows cases of CM send_q resource exhaustion to correctly continue.
Now passes test of 7 simultaneous TCP streams of PingPong using 30 MB PingPong buffers.
The fact that NDIS can/does overrun send_q depth is a separate problem and when understood perhaps this logic can be removed.
Signed-off-by: stan smith <stan.smith at intel.com>
--- A/ulp/ipoib_NDIS6_CM/kernel/ipoib_cm.cpp Wed Feb 23 19:57:30 2011
+++ B/ulp/ipoib_NDIS6_CM/kernel/ipoib_cm.cpp Wed Feb 23 19:54:00 2011
@@ -1631,6 +1631,7 @@
PERF_DECLARE( CMSendCb );
PERF_DECLARE( CMPollSend );
PERF_DECLARE( CMFreeSendBuf );
+ PERF_DECLARE( PortResume );
IPOIB_ENTER( IPOIB_DBG_SEND );
@@ -1747,9 +1748,20 @@
p_endpt->conn.h_send_qp = NULL; // prevent Tx on invalid QP
__queue_tx_resource_free( p_port, p_endpt );
endpt_cm_set_state( p_endpt, IPOIB_CM_DISCONNECT_CLEANUP );
+ /* Resume any sends awaiting resources as UD. */
+ cl_perf_start( PortResume );
+ ipoib_port_resume( p_port, TRUE, &complete_list );
+ cl_perf_stop( &p_port->p_adapter->perf, PortResume );
}
else
{
+ if (p_port->send_mgr.pending_list.count > 0)
+ {
+ /* Resume any sends awaiting resources. */
+ cl_perf_start( PortResume );
+ ipoib_port_resume( p_port, TRUE, &complete_list );
+ cl_perf_stop( &p_port->p_adapter->perf, PortResume );
+ }
/* Rearm the CQ. */
ib_status = p_ibal->rearm_cq( h_cq, FALSE );
CL_ASSERT( ib_status == IB_SUCCESS );
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ipoib_cm.cpp.patch
Type: application/octet-stream
Size: 1123 bytes
Desc: ipoib_cm.cpp.patch
URL: <http://lists.openfabrics.org/pipermail/ofw/attachments/20110223/60b76b2d/attachment.obj>
More information about the ofw
mailing list