svn commit: r305695 - head/sys/dev/cxgbe/common
Navdeep Parhar
np at FreeBSD.org
Sun Sep 11 16:06:18 UTC 2016
Author: np
Date: Sun Sep 11 16:06:17 2016
New Revision: 305695
URL: https://svnweb.freebsd.org/changeset/base/305695
Log:
cxgbe(4): Set up fl_starve_threshold2 accurately for T6.
Sponsored by: Chelsio Communications
Modified:
head/sys/dev/cxgbe/common/t4_hw.c
head/sys/dev/cxgbe/common/t4vf_hw.c
Modified: head/sys/dev/cxgbe/common/t4_hw.c
==============================================================================
--- head/sys/dev/cxgbe/common/t4_hw.c Sun Sep 11 15:55:11 2016 (r305694)
+++ head/sys/dev/cxgbe/common/t4_hw.c Sun Sep 11 16:06:17 2016 (r305695)
@@ -7866,8 +7866,10 @@ int t4_init_sge_params(struct adapter *a
sp->fl_starve_threshold = G_EGRTHRESHOLD(r) * 2 + 1;
if (is_t4(adapter))
sp->fl_starve_threshold2 = sp->fl_starve_threshold;
- else
+ else if (is_t5(adapter))
sp->fl_starve_threshold2 = G_EGRTHRESHOLDPACKING(r) * 2 + 1;
+ else
+ sp->fl_starve_threshold2 = G_T6_EGRTHRESHOLDPACKING(r) * 2 + 1;
/* egress queues: log2 of # of doorbells per BAR2 page */
r = t4_read_reg(adapter, A_SGE_EGRESS_QUEUES_PER_PAGE_PF);
Modified: head/sys/dev/cxgbe/common/t4vf_hw.c
==============================================================================
--- head/sys/dev/cxgbe/common/t4vf_hw.c Sun Sep 11 15:55:11 2016 (r305694)
+++ head/sys/dev/cxgbe/common/t4vf_hw.c Sun Sep 11 16:06:17 2016 (r305695)
@@ -130,9 +130,10 @@ int t4vf_get_sge_params(struct adapter *
sp->fl_starve_threshold = G_EGRTHRESHOLD(vals[5]) * 2 + 1;
if (is_t4(adapter))
sp->fl_starve_threshold2 = sp->fl_starve_threshold;
+ else if (is_t5(adapter))
+ sp->fl_starve_threshold2 = G_EGRTHRESHOLDPACKING(vals[5]) * 2 + 1;
else
- sp->fl_starve_threshold2 = G_EGRTHRESHOLDPACKING(vals[5]) * 2 +
- 1;
+ sp->fl_starve_threshold2 = G_T6_EGRTHRESHOLDPACKING(vals[5]) * 2 + 1;
/*
* We need the Queues/Page and Host Page Size for our VF.
More information about the svn-src-all
mailing list