Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 5 May 2017 19:34:05 +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: r317847 - head/sys/dev/cxgbe
Message-ID:  <201705051934.v45JY5Gr022773@repo.freebsd.org>

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



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