summaryrefslogtreecommitdiffstats
path: root/sys/dev
diff options
context:
space:
mode:
authornp <np@FreeBSD.org>2014-02-06 03:21:43 +0000
committernp <np@FreeBSD.org>2014-02-06 03:21:43 +0000
commitbbaa0236fdf40ecff3740738ef1504d7291c4054 (patch)
treea8a7814343dc5cabdcfc66fc60ad045bb1e14f44 /sys/dev
parent43b14859d6e13b20db97dfee5389355a783eeabb (diff)
downloadFreeBSD-src-bbaa0236fdf40ecff3740738ef1504d7291c4054.zip
FreeBSD-src-bbaa0236fdf40ecff3740738ef1504d7291c4054.tar.gz
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
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/cxgbe/adapter.h1
-rw-r--r--sys/dev/cxgbe/t4_sge.c8
2 files changed, 8 insertions, 1 deletions
diff --git a/sys/dev/cxgbe/adapter.h b/sys/dev/cxgbe/adapter.h
index 2bb9fa0..81779a7 100644
--- a/sys/dev/cxgbe/adapter.h
+++ b/sys/dev/cxgbe/adapter.h
@@ -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;
diff --git a/sys/dev/cxgbe/t4_sge.c b/sys/dev/cxgbe/t4_sge.c
index f8e283d..4f93ca2 100644
--- a/sys/dev/cxgbe/t4_sge.c
+++ b/sys/dev/cxgbe/t4_sge.c
@@ -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) |
OpenPOWER on IntegriCloud