Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 16 Apr 2010 16:33:05 +0000 (UTC)
From:      Jack F Vogel <jfv@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r206705 - head/sys/dev/ixgbe
Message-ID:  <201004161633.o3GGX5Pi077701@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jfv
Date: Fri Apr 16 16:33:05 2010
New Revision: 206705
URL: http://svn.freebsd.org/changeset/base/206705

Log:
  Remove the tx queue selection based on the cpu whe
  no flowid is present, this was causing some bad
  reordering, now just use 0.
  
  Also, add a few watchdog bits, and tx handler bits
  that were corrected in igb.

Modified:
  head/sys/dev/ixgbe/ixgbe.c

Modified: head/sys/dev/ixgbe/ixgbe.c
==============================================================================
--- head/sys/dev/ixgbe/ixgbe.c	Fri Apr 16 16:15:30 2010	(r206704)
+++ head/sys/dev/ixgbe/ixgbe.c	Fri Apr 16 16:33:05 2010	(r206705)
@@ -759,6 +759,7 @@ ixgbe_start_locked(struct tx_ring *txr, 
 
 		/* Set watchdog on */
 		txr->watchdog_check = TRUE;
+		txr->watchdog_time = ticks;
 
 	}
 	return;
@@ -798,8 +799,6 @@ ixgbe_mq_start(struct ifnet *ifp, struct
 	/* Which queue to use */
 	if ((m->m_flags & M_FLOWID) != 0)
 		i = m->m_pkthdr.flowid % adapter->num_queues;
-	else	/* use the cpu we're on */
-		i = curcpu % adapter->num_queues;
 
 	txr = &adapter->tx_rings[i];
 
@@ -856,8 +855,11 @@ ixgbe_mq_start_locked(struct ifnet *ifp,
 		next = drbr_dequeue(ifp, txr->br);
 	}
 
-	if (enqueued > 0) 
+	if (enqueued > 0) {
+		/* Set watchdog on */
 		txr->watchdog_check = TRUE;
+		txr->watchdog_time = ticks;
+	}
 
 	return (err);
 }
@@ -1251,16 +1253,12 @@ ixgbe_handle_que(void *context, int pend
 	struct adapter  *adapter = que->adapter;
 	struct tx_ring  *txr = que->txr;
 	struct ifnet    *ifp = adapter->ifp;
-	u32		loop = MAX_LOOP;
-	bool		more_rx, more_tx;
-
-	IXGBE_TX_LOCK(txr);
-	do {
-		more_rx = ixgbe_rxeof(que, adapter->rx_process_limit);
-		more_tx = ixgbe_txeof(txr);
-	} while (loop-- && (more_rx || more_tx));
+	bool		more;
 
 	if (ifp->if_drv_flags & IFF_DRV_RUNNING) {
+		more = ixgbe_rxeof(que, adapter->rx_process_limit);
+		IXGBE_TX_LOCK(txr);
+		ixgbe_txeof(txr);
 #if __FreeBSD_version >= 800000
 		if (!drbr_empty(ifp, txr->br))
 			ixgbe_mq_start_locked(ifp, txr, NULL);
@@ -1268,11 +1266,16 @@ ixgbe_handle_que(void *context, int pend
 		if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd))
 			ixgbe_start_locked(txr, ifp);
 #endif
+		IXGBE_TX_UNLOCK(txr);
+		if (more) {
+			taskqueue_enqueue(que->tq, &que->que_task);
+			return;
+		}
 	}
 
-	IXGBE_TX_UNLOCK(txr);
 	/* Reenable this interrupt */
 	ixgbe_enable_queue(adapter, que->msix);
+	return;
 }
 
 
@@ -1718,7 +1721,6 @@ ixgbe_xmit(struct tx_ring *txr, struct m
 	 * hardware that this frame is available to transmit.
 	 */
 	++txr->total_packets;
-	txr->watchdog_time = ticks;
 	IXGBE_WRITE_REG(&adapter->hw, IXGBE_TDT(txr->me), i);
 
 	/* Do a clean if descriptors are low */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201004161633.o3GGX5Pi077701>