diff options
author | Tariq Toukan <tariqt@nvidia.com> | 2021-07-06 13:44:19 +0300 |
---|---|---|
committer | Saeed Mahameed <saeedm@nvidia.com> | 2021-08-16 16:17:28 -0700 |
commit | 86d747a3f9697abe477ad8fe847afa738d3991a0 (patch) | |
tree | f5de44bcf4545977fec8457ddcd4f84df16d02e5 /drivers/net/ethernet/mellanox/mlx5/core/en/qos.c | |
parent | 248d3b4c9a396f89da43ec7f6becf377e69efeca (diff) | |
download | linux-86d747a3f9697abe477ad8fe847afa738d3991a0.tar.bz2 |
net/mlx5e: Abstract MQPRIO params
Abstract the MQPRIO params into a struct.
Use a getter for DCB mode num_tcs.
Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
Reviewed-by: Maxim Mikityanskiy <maximmi@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx5/core/en/qos.c')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx5/core/en/qos.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/qos.c b/drivers/net/ethernet/mellanox/mlx5/core/en/qos.c index 5efe3278b0f6..c9ac69f62f21 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en/qos.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en/qos.c @@ -132,7 +132,7 @@ static u16 mlx5e_qid_from_qos(struct mlx5e_channels *chs, u16 qid) */ bool is_ptp = MLX5E_GET_PFLAG(&chs->params, MLX5E_PFLAG_TX_PORT_TS); - return (chs->params.num_channels + is_ptp) * chs->params.num_tc + qid; + return (chs->params.num_channels + is_ptp) * mlx5e_get_dcb_num_tc(&chs->params) + qid; } int mlx5e_get_txq_by_classid(struct mlx5e_priv *priv, u16 classid) |