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 <[email protected]> --- 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 );
ipoib_cm.cpp.patch
Description: ipoib_cm.cpp.patch
_______________________________________________ ofw mailing list [email protected] http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ofw
