summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjfv <jfv@FreeBSD.org>2010-04-16 16:33:05 +0000
committerjfv <jfv@FreeBSD.org>2010-04-16 16:33:05 +0000
commit18191dba8ac9602e66c57c55d7ddf905bf7dec6d (patch)
treec4237ab4864ed0ae99904b0b4ca3a654be79d229
parent0cfb62fa2abac760cac45dcc887b8d8eb42d83f2 (diff)
downloadFreeBSD-src-18191dba8ac9602e66c57c55d7ddf905bf7dec6d.zip
FreeBSD-src-18191dba8ac9602e66c57c55d7ddf905bf7dec6d.tar.gz
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.
-rw-r--r--sys/dev/ixgbe/ixgbe.c28
1 files changed, 15 insertions, 13 deletions
diff --git a/sys/dev/ixgbe/ixgbe.c b/sys/dev/ixgbe/ixgbe.c
index f8338e9..9cc392d 100644
--- a/sys/dev/ixgbe/ixgbe.c
+++ b/sys/dev/ixgbe/ixgbe.c
@@ -759,6 +759,7 @@ ixgbe_start_locked(struct tx_ring *txr, struct ifnet * ifp)
/* Set watchdog on */
txr->watchdog_check = TRUE;
+ txr->watchdog_time = ticks;
}
return;
@@ -798,8 +799,6 @@ ixgbe_mq_start(struct ifnet *ifp, struct mbuf *m)
/* 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, struct tx_ring *txr, struct mbuf *m)
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 pending)
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 pending)
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 mbuf **m_headp)
* 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 */
OpenPOWER on IntegriCloud