aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/mellanox/mlx4/en_main.c
diff options
context:
space:
mode:
authorInbar Karmy <inbark@mellanox.com>2017-06-29 14:07:56 +0300
committerDavid S. Miller <davem@davemloft.net>2017-06-29 15:56:15 -0400
commitf21ad61424f7c623eddbcf54425a86afb68ca55f (patch)
treee8052cb2fd73167eec9fc79e6539a10796ee17fa /drivers/net/ethernet/mellanox/mlx4/en_main.c
parentnet: bridge: constify attribute_group structures. (diff)
downloadlinux-dev-f21ad61424f7c623eddbcf54425a86afb68ca55f.tar.xz
linux-dev-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_main.c')
-rw-r--r--drivers/net/ethernet/mellanox/mlx4/en_main.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx4/en_main.c b/drivers/net/ethernet/mellanox/mlx4/en_main.c
index 56cdf38d150e..a8eb856b0158 100644
--- a/drivers/net/ethernet/mellanox/mlx4/en_main.c
+++ b/drivers/net/ethernet/mellanox/mlx4/en_main.c
@@ -169,8 +169,9 @@ static int mlx4_en_get_profile(struct mlx4_en_dev *mdev)
params->prof[i].tx_ppp = pfctx;
params->prof[i].tx_ring_size = MLX4_EN_DEF_TX_RING_SIZE;
params->prof[i].rx_ring_size = MLX4_EN_DEF_RX_RING_SIZE;
+ params->prof[i].num_up = MLX4_EN_NUM_UP_HIGH;
params->prof[i].tx_ring_num[TX] = params->num_tx_rings_p_up *
- MLX4_EN_NUM_UP;
+ params->prof[i].num_up;
params->prof[i].rss_rings = 0;
params->prof[i].inline_thold = inline_thold;
}