Date: Thu, 26 Jul 2018 06:42:09 +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: r336734 - head/sys/dev/cxgbe Message-ID: <201807260642.w6Q6g91q013513@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: np Date: Thu Jul 26 06:42:09 2018 New Revision: 336734 URL: https://svnweb.freebsd.org/changeset/base/336734 Log: cxgbe(4): Better defaults for all cl-rl rate limiters. Start in "class" instead of "flow" mode. This eliminates the need to specify an MTU, which is not available that early anyway. It also allows the user to manually configure ch-rl rate limiting after attach. This used to fail because ch-rl isn't supported if cl-rl "flow" mode is configured. Set all traffic classes to 1Gbps during initialization. The goal is to start off with _any_ valid configuration and 1Gbps works even for gigabit cards. 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 Thu Jul 26 05:08:58 2018 (r336733) +++ head/sys/dev/cxgbe/t4_sched.c Thu Jul 26 06:42:09 2018 (r336734) @@ -356,24 +356,6 @@ t4_init_tx_sched(struct adapter *sc) const int n = sc->chip_params->nsched_cls; struct port_info *pi; struct tx_cl_rl_params *tc; - static const uint32_t init_kbps[] = { - 100 * 1000, - 200 * 1000, - 400 * 1000, - 500 * 1000, - 800 * 1000, - 1000 * 1000, - 1200 * 1000, - 1500 * 1000, - 1800 * 1000, - 2000 * 1000, - 2500 * 1000, - 3000 * 1000, - 3500 * 1000, - 4000 * 1000, - 5000 * 1000, - 10000 * 1000 - }; mtx_init(&sc->tc_lock, "tx_sched lock", NULL, MTX_DEF); TASK_INIT(&sc->tc_task, 0, update_tx_sched, sc); @@ -386,9 +368,8 @@ t4_init_tx_sched(struct adapter *sc) tc->refcount = 0; tc->ratemode = FW_SCHED_PARAMS_RATE_ABS; tc->rateunit = FW_SCHED_PARAMS_UNIT_BITRATE; - tc->mode = FW_SCHED_PARAMS_MODE_FLOW; - tc->maxrate = init_kbps[min(j, nitems(init_kbps) - 1)]; - tc->pktsize = ETHERMTU; /* XXX */ + tc->mode = FW_SCHED_PARAMS_MODE_CLASS; + tc->maxrate = 1000 * 1000; /* 1 Gbps. Arbitrary */ if (t4_sched_params_cl_rl_kbps(sc, pi->tx_chan, j, tc->mode, tc->maxrate, tc->pktsize, 1) == 0)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201807260642.w6Q6g91q013513>