Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 11 Sep 2016 16:06:17 +0000 (UTC)
From:      Navdeep Parhar <np@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r305695 - head/sys/dev/cxgbe/common
Message-ID:  <201609111606.u8BG6HoB055680@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201609111606.u8BG6HoB055680>