mirror of
https://github.com/opnsense/src.git
synced 2026-06-11 09:41:03 -04:00
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
This commit is contained in:
parent
1e354803ee
commit
f7c6e09244
1 changed files with 2 additions and 21 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue