svn commit: r289157 - head/sys/dev/ntb/if_ntb

Conrad E. Meyer cem at FreeBSD.org
Sun Oct 11 21:01:16 UTC 2015


Author: cem
Date: Sun Oct 11 21:01:14 2015
New Revision: 289157
URL: https://svnweb.freebsd.org/changeset/base/289157

Log:
  NTB: MFV c336acd3: memcpy lockup workaround
  
  The system will appear to lockup for long periods of time due to the NTB
  driver spending too much time in memcpy.  Avoid this by reducing the
  number of packets that can be serviced on a given interrupt.
  
  Authored by:	Jon Mason
  Obtained from:	Linux
  Sponsored by:	EMC / Isilon Storage Division

Modified:
  head/sys/dev/ntb/if_ntb/if_ntb.c

Modified: head/sys/dev/ntb/if_ntb/if_ntb.c
==============================================================================
--- head/sys/dev/ntb/if_ntb/if_ntb.c	Sun Oct 11 21:00:19 2015	(r289156)
+++ head/sys/dev/ntb/if_ntb/if_ntb.c	Sun Oct 11 21:01:14 2015	(r289157)
@@ -853,7 +853,8 @@ ntb_rx_pendq_full(void *arg)
 static void
 ntb_transport_rx(struct ntb_transport_qp *qp)
 {
-	int rc, i;
+	uint64_t i;
+	int rc;
 
 	/* 
 	 * Limit the number of packets processed in a single interrupt to
@@ -861,7 +862,7 @@ ntb_transport_rx(struct ntb_transport_qp
 	 */
 	mtx_lock(&qp->transport->rx_lock);
 	CTR0(KTR_NTB, "RX: transport_rx");
-	for (i = 0; i < NTB_RX_MAX_PKTS; i++) {
+	for (i = 0; i < qp->rx_max_entry; i++) {
 		rc = ntb_process_rxc(qp);
 		if (rc != 0) {
 			CTR0(KTR_NTB, "RX: process_rxc failed");


More information about the svn-src-head mailing list