pay attention to default cluster limits when sizing receive queues
This commit is contained in:
parent
ae058e4be5
commit
db590514fa
@ -500,7 +500,7 @@ cxgb_controller_attach(device_t dev)
|
||||
error = ENODEV;
|
||||
goto out;
|
||||
}
|
||||
/* Allocate the BAR for doing MSI-X. If it succeeds, try to allocate
|
||||
/* Allocate the BAR for doing MSI-X. If it succeeds, try to allocate
|
||||
* enough messages for the queue sets. If that fails, try falling
|
||||
* back to MSI. If that fails, then try falling back to the legacy
|
||||
* interrupt pin model.
|
||||
@ -549,7 +549,9 @@ cxgb_controller_attach(device_t dev)
|
||||
sc->cxgb_intr = t3b_intr;
|
||||
}
|
||||
|
||||
|
||||
if ((sc->flags & USING_MSIX) && !singleq)
|
||||
port_qsets = min((SGE_QSETS/(sc)->params.nports), mp_ncpus);
|
||||
|
||||
/* Create a private taskqueue thread for handling driver events */
|
||||
#ifdef TASKQUEUE_CURRENT
|
||||
sc->tq = taskqueue_create("cxgb_taskq", M_NOWAIT,
|
||||
@ -594,9 +596,6 @@ cxgb_controller_attach(device_t dev)
|
||||
sc->flags |= TPS_UPTODATE;
|
||||
}
|
||||
|
||||
if ((sc->flags & USING_MSIX) && !singleq)
|
||||
port_qsets = min((SGE_QSETS/(sc)->params.nports), mp_ncpus);
|
||||
|
||||
/*
|
||||
* Create a child device for each MAC. The ethernet attachment
|
||||
* will be done in these children.
|
||||
|
@ -83,8 +83,16 @@ int cxgb_cached_allocations;
|
||||
int cxgb_cached;
|
||||
int cxgb_ext_freed = 0;
|
||||
int cxgb_ext_inited = 0;
|
||||
int fl_q_size = 0;
|
||||
int jumbo_q_size = 0;
|
||||
|
||||
extern int cxgb_use_16k_clusters;
|
||||
extern int cxgb_pcpu_cache_enable;
|
||||
extern int nmbjumbo4;
|
||||
extern int nmbjumbo9;
|
||||
extern int nmbjumbo16;
|
||||
|
||||
|
||||
|
||||
|
||||
#define USE_GTS 0
|
||||
@ -360,8 +368,25 @@ t3_sge_err_intr_handler(adapter_t *adapter)
|
||||
void
|
||||
t3_sge_prep(adapter_t *adap, struct sge_params *p)
|
||||
{
|
||||
int i;
|
||||
int i, nqsets;
|
||||
|
||||
nqsets = min(SGE_QSETS, mp_ncpus*4);
|
||||
|
||||
fl_q_size = min(nmbclusters/(3*nqsets), FL_Q_SIZE);
|
||||
|
||||
while (!powerof2(fl_q_size))
|
||||
fl_q_size--;
|
||||
#if __FreeBSD_version > 800000
|
||||
if (cxgb_use_16k_clusters)
|
||||
jumbo_q_size = min(nmbjumbo16/(3*nqsets), JUMBO_Q_SIZE);
|
||||
else
|
||||
jumbo_q_size = min(nmbjumbo9/(3*nqsets), JUMBO_Q_SIZE);
|
||||
#else
|
||||
jumbo_q_size = min(nmbjumbo4/(3*nqsets), JUMBO_Q_SIZE);
|
||||
#endif
|
||||
while (!powerof2(jumbo_q_size))
|
||||
jumbo_q_size--;
|
||||
|
||||
/* XXX Does ETHER_ALIGN need to be accounted for here? */
|
||||
p->max_pkt_size = adap->sge.qs[0].fl[1].buf_size - sizeof(struct cpl_rx_data);
|
||||
|
||||
@ -379,8 +404,8 @@ t3_sge_prep(adapter_t *adap, struct sge_params *p)
|
||||
}
|
||||
q->polling = adap->params.rev > 0;
|
||||
q->rspq_size = RSPQ_Q_SIZE;
|
||||
q->fl_size = FL_Q_SIZE;
|
||||
q->jumbo_size = JUMBO_Q_SIZE;
|
||||
q->fl_size = fl_q_size;
|
||||
q->jumbo_size = jumbo_q_size;
|
||||
q->txq_size[TXQ_ETH] = TX_ETH_Q_SIZE;
|
||||
q->txq_size[TXQ_OFLD] = 1024;
|
||||
q->txq_size[TXQ_CTRL] = 256;
|
||||
|
Loading…
Reference in New Issue
Block a user