- Increase descriptors per call to start

- enqueue per-txq task
- fix per-txq task initialization

Approved by: re (blanket)
This commit is contained in:
Kip Macy 2007-07-17 06:12:22 +00:00
parent fb62eea266
commit 8870f0e16b
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=171469
3 changed files with 10 additions and 13 deletions

View File

@ -1689,8 +1689,8 @@ cxgb_start_proc(void *arg, int ncount)
txq = &qs->txq[TXQ_ETH];
do {
if (desc_reclaimable(txq) > TX_CLEAN_MAX_DESC)
taskqueue_enqueue(pi->adapter->tq, &txq->qreclaim_task);
if (desc_reclaimable(txq) > TX_CLEAN_MAX_DESC >> 2)
taskqueue_enqueue(pi->tq, &txq->qreclaim_task);
error = cxgb_start_tx(ifp, TX_START_MAX_DESC);
} while (error == 0);
@ -1707,9 +1707,9 @@ cxgb_start(struct ifnet *ifp)
qs = &pi->adapter->sge.qs[pi->first_qset];
txq = &qs->txq[TXQ_ETH];
if (desc_reclaimable(txq) > TX_CLEAN_MAX_DESC)
taskqueue_enqueue(pi->adapter->tq,
&pi->timer_reclaim_task);
if (desc_reclaimable(txq) > TX_CLEAN_MAX_DESC >> 2)
taskqueue_enqueue(pi->tq,
&txq->qreclaim_task);
err = cxgb_start_tx(ifp, TX_START_MAX_DESC);

View File

@ -95,7 +95,7 @@ struct sge_rspq;
#define TX_MAX_SIZE (1 << 16) /* 64KB */
#define TX_MAX_SEGS 36 /* maximum supported by card */
#define TX_MAX_DESC 4 /* max descriptors per packet */
#define TX_START_MAX_DESC (TX_MAX_DESC << 2) /* maximum number of descriptors
#define TX_START_MAX_DESC (TX_MAX_DESC << 3) /* maximum number of descriptors
* call to start used per */
#define TX_CLEAN_MAX_DESC (TX_MAX_DESC << 4) /* maximum tx descriptors
* to clean per iteration */
@ -107,7 +107,7 @@ struct sge_rspq;
#define wmb() __asm volatile("sfence" ::: "memory")
#define smp_mb() mb()
#define L1_CACHE_BYTES 32
#define L1_CACHE_BYTES 64
static __inline
void prefetch(void *x)
{

View File

@ -2040,8 +2040,8 @@ t3_sge_alloc_qset(adapter_t *sc, u_int id, int nports, int irq_vec_idx,
TASK_INIT(&q->txq[TXQ_OFLD].qresume_task, 0, restart_offloadq, q);
TASK_INIT(&q->txq[TXQ_CTRL].qresume_task, 0, restart_ctrlq, q);
TASK_INIT(&q->txq[TXQ_OFLD].qreclaim_task, 0, sge_txq_reclaim_handler, &q->txq[TXQ_ETH]);
TASK_INIT(&q->txq[TXQ_CTRL].qreclaim_task, 0, sge_txq_reclaim_handler, &q->txq[TXQ_OFLD]);
TASK_INIT(&q->txq[TXQ_ETH].qreclaim_task, 0, sge_txq_reclaim_handler, &q->txq[TXQ_ETH]);
TASK_INIT(&q->txq[TXQ_OFLD].qreclaim_task, 0, sge_txq_reclaim_handler, &q->txq[TXQ_OFLD]);
@ -2418,12 +2418,9 @@ process_responses(adapter_t *adap, struct sge_qset *qs, int budget)
ngathered = rx_offload(&adap->tdev, rspq, rspq->m,
offload_mbufs, ngathered);
}
#ifdef notyet
taskqueue_enqueue(adap->tq, &adap->timer_reclaim_task);
#else
__refill_fl(adap, &qs->fl[0]);
__refill_fl(adap, &qs->fl[1]);
#endif
}
--budget_left;
}