diff options
author | Inbar Karmy <inbark@mellanox.com> | 2017-06-29 14:07:56 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-06-29 22:56:15 +0300 |
commit | f21ad61424f7c623eddbcf54425a86afb68ca55f (patch) | |
tree | e8052cb2fd73167eec9fc79e6539a10796ee17fa /drivers/net/ethernet/mellanox/mlx4/en_dcb_nl.c | |
parent | cddbb79f7a80adbe5f2b2dfddb9c0611bdba6cdb (diff) | |
download | linux-f21ad61424f7c623eddbcf54425a86afb68ca55f.tar.xz |
net/mlx4_en: Add dynamic variable to hold the number of user priorities (UP)
Until this patch, the number of UPs was hard coded for eight.
Replace this with a variable in struct "mlx4_en_port_profile".
Currently, the variable will hold the maximum number of UP,
as before.
The patch creates an infrastructure to add an option for dynamic
change of the actual number of TCs.
Signed-off-by: Inbar Karmy <inbark@mellanox.com>
Signed-off-by: Tariq Toukan <tariqt@mellanox.com>
Cc: Tarick Bedeir <tarick@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx4/en_dcb_nl.c')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx4/en_dcb_nl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx4/en_dcb_nl.c b/drivers/net/ethernet/mellanox/mlx4/en_dcb_nl.c index 1dae8e40fb25..91481f117daa 100644 --- a/drivers/net/ethernet/mellanox/mlx4/en_dcb_nl.c +++ b/drivers/net/ethernet/mellanox/mlx4/en_dcb_nl.c @@ -303,7 +303,7 @@ static int mlx4_en_ets_validate(struct mlx4_en_priv *priv, struct ieee_ets *ets) int has_ets_tc = 0; for (i = 0; i < IEEE_8021QAZ_MAX_TCS; i++) { - if (ets->prio_tc[i] >= MLX4_EN_NUM_UP) { + if (ets->prio_tc[i] >= priv->prof->num_up) { en_err(priv, "Bad priority in UP <=> TC mapping. TC: %d, UP: %d\n", i, ets->prio_tc[i]); return -EINVAL; |