summaryrefslogtreecommitdiffstats
path: root/sys/dev/cxgb
diff options
context:
space:
mode:
authorkmacy <kmacy@FreeBSD.org>2008-09-23 01:55:36 +0000
committerkmacy <kmacy@FreeBSD.org>2008-09-23 01:55:36 +0000
commit3c671d9bb6a8e709ab8fd0a8e3b874acf6ea4fac (patch)
tree127fdf47bfbef7514587c3134a54a71bf584f789 /sys/dev/cxgb
parent912c9cbc117cc846ace9c2953f02f767c1d3bd58 (diff)
downloadFreeBSD-src-3c671d9bb6a8e709ab8fd0a8e3b874acf6ea4fac.zip
FreeBSD-src-3c671d9bb6a8e709ab8fd0a8e3b874acf6ea4fac.tar.gz
- Fix flag check
- Fix adaptive thread sleep - set oactive when queue is full
Diffstat (limited to 'sys/dev/cxgb')
-rw-r--r--sys/dev/cxgb/cxgb_multiq.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/sys/dev/cxgb/cxgb_multiq.c b/sys/dev/cxgb/cxgb_multiq.c
index 10bd092..1a42dc8 100644
--- a/sys/dev/cxgb/cxgb_multiq.c
+++ b/sys/dev/cxgb/cxgb_multiq.c
@@ -93,6 +93,7 @@ __FBSDID("$FreeBSD$");
#include <dev/cxgb/sys/mvec.h>
#endif
+extern int txq_fills;
extern struct sysctl_oid_list sysctl__hw_cxgb_children;
static int cxgb_pcpu_tx_coalesce = 0;
TUNABLE_INT("hw.cxgb.tx_coalesce", &cxgb_pcpu_tx_coalesce);
@@ -398,8 +399,10 @@ cxgb_pcpu_reclaim_tx(struct sge_txq *txq)
txq->cleaned += reclaimable;
txq->in_use -= reclaimable;
- if (isset(&qs->txq_stopped, TXQ_ETH))
+ if (isset(&qs->txq_stopped, TXQ_ETH)) {
+ qs->port->ifp->if_drv_flags &= ~IFF_DRV_OACTIVE;
clrbit(&qs->txq_stopped, TXQ_ETH);
+ }
return (reclaimable);
}
@@ -586,7 +589,7 @@ cxgb_pcpu_start_proc(void *arg)
if (qs->qs_flags & QS_EXITING)
break;
- if ((qs->port->ifp->if_drv_flags && IFF_DRV_RUNNING) == 0) {
+ if ((qs->port->ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) {
idleticks = hz;
if (!buf_ring_empty(&txq->txq_mr) ||
!mbufq_empty(&txq->sendq))
@@ -621,7 +624,7 @@ cxgb_pcpu_start_proc(void *arg)
continue;
}
done:
- tsleep(qs, 1, "cxgbidle", sleep_ticks);
+ tsleep(qs, 1, "cxgbidle", idleticks);
}
if (bootverbose)
@@ -782,6 +785,7 @@ cxgb_tx(struct sge_qset *qs, uint32_t txmax)
err = ENOSPC;
txq_fills++;
setbit(&qs->txq_stopped, TXQ_ETH);
+ ifp->if_drv_flags |= IFF_DRV_OACTIVE;
}
if (err == ENOMEM) {
int i;
OpenPOWER on IntegriCloud