Lines Matching refs:ets
288 struct ieee_ets *ets)
291 struct ieee_ets *my_ets = &priv->ets;
296 ets->ets_cap = IEEE_8021QAZ_MAX_TCS;
297 ets->cbs = my_ets->cbs;
298 memcpy(ets->tc_tx_bw, my_ets->tc_tx_bw, sizeof(ets->tc_tx_bw));
299 memcpy(ets->tc_tsa, my_ets->tc_tsa, sizeof(ets->tc_tsa));
300 memcpy(ets->prio_tc, my_ets->prio_tc, sizeof(ets->prio_tc));
305 static int mlx4_en_ets_validate(struct mlx4_en_priv *priv, struct ieee_ets *ets)
312 if (ets->prio_tc[i] >= MLX4_EN_NUM_UP_HIGH) {
314 i, ets->prio_tc[i]);
318 switch (ets->tc_tsa[i]) {
324 total_ets_bw += ets->tc_tx_bw[i];
328 i, ets->tc_tsa[i]);
343 struct ieee_ets *ets, u16 *ratelimit)
351 ets = ets ?: &priv->ets;
356 switch (ets->tc_tsa[i]) {
367 tc_tx_bw[i] = ets->tc_tx_bw[i] ?: MLX4_EN_BW_MIN;
377 mlx4_en_dcbnl_ieee_setets(struct net_device *dev, struct ieee_ets *ets)
383 err = mlx4_en_ets_validate(priv, ets);
387 err = mlx4_SET_PORT_PRIO2TC(mdev->dev, priv->port, ets->prio_tc);
391 err = mlx4_en_config_port_scheduler(priv, ets, NULL);
395 memcpy(&priv->ets, ets, sizeof(priv->ets));
460 struct ieee_ets ets = {0};
474 ets.ets_cap = IEEE_8021QAZ_MAX_TCS;
478 if (mlx4_en_dcbnl_ieee_setets(dev, &ets))
486 if (mlx4_en_dcbnl_ieee_setets(dev, &ets))