From owner-svn-src-head@freebsd.org Fri May 5 19:34:07 2017 Return-Path: Delivered-To: svn-src-head@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 05798D5F536; Fri, 5 May 2017 19:34:07 +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 CBDF814BB; Fri, 5 May 2017 19:34:06 +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 v45JY5gw022774; Fri, 5 May 2017 19:34:05 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v45JY5Gr022773; Fri, 5 May 2017 19:34:05 GMT (envelope-from np@FreeBSD.org) Message-Id: <201705051934.v45JY5Gr022773@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Fri, 5 May 2017 19:34:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317847 - head/sys/dev/cxgbe X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 May 2017 19:34:07 -0000 Author: np Date: Fri May 5 19:34:05 2017 New Revision: 317847 URL: https://svnweb.freebsd.org/changeset/base/317847 Log: cxgbe(4): The Tx scheduler initialization either works or doesn't. It doesn't need a refresh in either case. Sponsored by: Chelsio Communications Modified: head/sys/dev/cxgbe/t4_sched.c Modified: head/sys/dev/cxgbe/t4_sched.c ============================================================================== --- head/sys/dev/cxgbe/t4_sched.c Fri May 5 18:50:22 2017 (r317846) +++ head/sys/dev/cxgbe/t4_sched.c Fri May 5 19:34:05 2017 (r317847) @@ -357,7 +357,6 @@ t4_init_tx_sched(struct adapter *sc) n * sizeof(*tc), M_CXGBE, M_ZERO | M_WAITOK); tc = &pi->sched_params->cl_rl[0]; for (j = 0; j < n; j++, tc++) { - tc->flags = TX_CLRL_REFRESH; tc->refcount = 0; tc->ratemode = FW_SCHED_PARAMS_RATE_ABS; tc->rateunit = FW_SCHED_PARAMS_UNIT_BITRATE; @@ -365,8 +364,11 @@ t4_init_tx_sched(struct adapter *sc) tc->maxrate = init_kbps[min(j, nitems(init_kbps) - 1)]; tc->pktsize = ETHERMTU; /* XXX */ - t4_sched_params_cl_rl_kbps(sc, pi->tx_chan, j, tc->mode, - tc->maxrate, tc->pktsize, 1); + if (t4_sched_params_cl_rl_kbps(sc, pi->tx_chan, j, + tc->mode, tc->maxrate, tc->pktsize, 1) == 0) + tc->flags = 0; + else + tc->flags = TX_CLRL_ERROR; } }