svn commit: r317847 - head/sys/dev/cxgbe

Navdeep Parhar np at FreeBSD.org
Fri May 5 19:34:07 UTC 2017


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;
 		}
 	}
 


More information about the svn-src-head mailing list