diff --git a/sys/dev/cxgb/cxgb_main.c b/sys/dev/cxgb/cxgb_main.c index 79246a83e893..3cc930f8a23d 100644 --- a/sys/dev/cxgb/cxgb_main.c +++ b/sys/dev/cxgb/cxgb_main.c @@ -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); diff --git a/sys/dev/cxgb/cxgb_osdep.h b/sys/dev/cxgb/cxgb_osdep.h index fd98a6e0b0ad..9159e1a6cf1d 100644 --- a/sys/dev/cxgb/cxgb_osdep.h +++ b/sys/dev/cxgb/cxgb_osdep.h @@ -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) { diff --git a/sys/dev/cxgb/cxgb_sge.c b/sys/dev/cxgb/cxgb_sge.c index 48dbe4547b0c..cf7a981c0c04 100644 --- a/sys/dev/cxgb/cxgb_sge.c +++ b/sys/dev/cxgb/cxgb_sge.c @@ -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; }