From owner-svn-src-all@freebsd.org Sun Sep 11 16:06:18 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B50FEBD67EE; Sun, 11 Sep 2016 16:06:18 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 85672914; Sun, 11 Sep 2016 16:06:18 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8BG6HDW055682; Sun, 11 Sep 2016 16:06:17 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8BG6HoB055680; Sun, 11 Sep 2016 16:06:17 GMT (envelope-from np@FreeBSD.org) Message-Id: <201609111606.u8BG6HoB055680@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Sun, 11 Sep 2016 16:06:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r305695 - head/sys/dev/cxgbe/common X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Sep 2016 16:06:18 -0000 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.