summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/mellanox/mlx4/en_dcb_nl.c
diff options
context:
space:
mode:
authorInbar Karmy2017-06-29 13:07:56 +0200
committerDavid S. Miller2017-06-29 21:56:15 +0200
commitf21ad61424f7c623eddbcf54425a86afb68ca55f (patch)
treee8052cb2fd73167eec9fc79e6539a10796ee17fa /drivers/net/ethernet/mellanox/mlx4/en_dcb_nl.c
parentnet: bridge: constify attribute_group structures. (diff)
downloadkernel-qcow2-linux-f21ad61424f7c623eddbcf54425a86afb68ca55f.tar.gz
kernel-qcow2-linux-f21ad61424f7c623eddbcf54425a86afb68ca55f.tar.xz
kernel-qcow2-linux-f21ad61424f7c623eddbcf54425a86afb68ca55f.zip
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.c2
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;