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");
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to