Author: jfv
Date: Thu Aug 15 21:24:43 2013
New Revision: 254385
URL: http://svnweb.freebsd.org/changeset/base/254385

Log:
  MFC r254264  Make the igb_mq_start() routine use TRYLOCK rather than simple
               queuing, there were latency and other problems with the latter.

Modified:
  stable/9/sys/dev/e1000/if_igb.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/dev/   (props changed)
  stable/9/sys/dev/e1000/   (props changed)

Modified: stable/9/sys/dev/e1000/if_igb.c
==============================================================================
--- stable/9/sys/dev/e1000/if_igb.c     Thu Aug 15 21:09:05 2013        
(r254384)
+++ stable/9/sys/dev/e1000/if_igb.c     Thu Aug 15 21:24:43 2013        
(r254385)
@@ -972,7 +972,13 @@ igb_mq_start(struct ifnet *ifp, struct m
        que = &adapter->queues[i];
 
        err = drbr_enqueue(ifp, txr->br, m);
-       taskqueue_enqueue(que->tq, &txr->txq_task);
+       if (err)
+               return (err);
+       if (IGB_TX_TRYLOCK(txr)) {
+               err = igb_mq_start_locked(ifp, txr);
+               IGB_TX_UNLOCK(txr);
+       } else
+               taskqueue_enqueue(que->tq, &txr->txq_task);
 
        return (err);
 }
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to