cxgbe(4): The T5 allows for a different freelist starvation threshold
for queues with buffer packing. Use the correct value to calculate a freelist's low water mark. MFC after: 1 week
This commit is contained in:
parent
3b8ad66ea9
commit
7293a15f54
@ -517,6 +517,7 @@ struct sge {
|
||||
int timer_val[SGE_NTIMERS];
|
||||
int counter_val[SGE_NCOUNTERS];
|
||||
int fl_starve_threshold;
|
||||
int fl_starve_threshold2;
|
||||
int eq_s_qpp;
|
||||
int iq_s_qpp;
|
||||
|
||||
|
@ -569,6 +569,10 @@ t4_read_chip_settings(struct adapter *sc)
|
||||
|
||||
r = t4_read_reg(sc, A_SGE_CONM_CTRL);
|
||||
s->fl_starve_threshold = G_EGRTHRESHOLD(r) * 2 + 1;
|
||||
if (is_t4(sc))
|
||||
s->fl_starve_threshold2 = s->fl_starve_threshold;
|
||||
else
|
||||
s->fl_starve_threshold2 = G_EGRTHRESHOLDPACKING(r) * 2 + 1;
|
||||
|
||||
/* egress queues: log2 of # of doorbells per BAR2 page */
|
||||
r = t4_read_reg(sc, A_SGE_EGRESS_QUEUES_PER_PAGE_PF);
|
||||
@ -2233,7 +2237,9 @@ alloc_iq_fl(struct port_info *pi, struct sge_iq *iq, struct sge_fl *fl,
|
||||
return (rc);
|
||||
}
|
||||
fl->needed = fl->cap;
|
||||
fl->lowat = roundup2(sc->sge.fl_starve_threshold, 8);
|
||||
fl->lowat = fl->flags & FL_BUF_PACKING ?
|
||||
roundup2(sc->sge.fl_starve_threshold2, 8) :
|
||||
roundup2(sc->sge.fl_starve_threshold, 8);
|
||||
|
||||
c.iqns_to_fl0congen |=
|
||||
htobe32(V_FW_IQ_CMD_FL0HOSTFCMODE(X_HOSTFCMODE_NONE) |
|
||||
|
Loading…
Reference in New Issue
Block a user