PERFORCE change 126994 for review

Kip Macy kmacy at FreeBSD.org
Sat Sep 29 15:37:17 PDT 2007


http://perforce.freebsd.org/chv.cgi?CH=126994

Change 126994 by kmacy at kmacy_home:ethng on 2007/09/29 22:36:57

	don't defer immediate send if enough packets have been enqueued

Affected files ...

.. //depot/projects/ethng/src/sys/dev/cxgb/cxgb_multiq.c#22 edit

Differences ...

==== //depot/projects/ethng/src/sys/dev/cxgb/cxgb_multiq.c#22 (text+ko) ====

@@ -135,6 +135,7 @@
 	if (((prod + 1) & mask) != cons) {
 		mr->mr_ring[prod] = m;
 		mr->mr_prod = (prod + 1) & mask;
+		mb();
 	} else {
 		txq->txq_drops++;
 		err = ENOBUFS;
@@ -497,7 +498,7 @@
 	
 	txq = &qs->txq[TXQ_ETH];
 
-	if ((sc->tunq_coalesce == 0) && mtx_trylock(&txq->lock)) {
+	if (((sc->tunq_coalesce == 0) || (mbuf_ring_count(&txq->txq_mr) > TX_WR_COUNT_MAX)) && mtx_trylock(&txq->lock)) {
 		txq->flags |= TXQ_TRANSMITTING;
 		err = cxgb_pcpu_start_(qs, immpkt, FALSE);
 		txq->flags &= ~TXQ_TRANSMITTING;


More information about the p4-projects mailing list