]> Git Repo - linux.git/commit
net/mlx5e: Fix division by 0 in mlx5e_select_queue for representors
authorMaxim Mikityanskiy <[email protected]>
Mon, 11 Oct 2021 15:39:35 +0000 (18:39 +0300)
committerSaeed Mahameed <[email protected]>
Tue, 12 Oct 2021 20:52:03 +0000 (13:52 -0700)
commit84c8a87402cf073ba7948dd62d4815a3f4a224c8
tree6ec2706ef59b7ef549657ef58d36a08fd9a4981b
parent0bc73ad46a76ed6ece4dcacb28858e7b38561e1c
net/mlx5e: Fix division by 0 in mlx5e_select_queue for representors

Commit 846d6da1fcdb ("net/mlx5e: Fix division by 0 in
mlx5e_select_queue") makes mlx5e_build_nic_params assign a non-zero
initial value to priv->num_tc_x_num_ch, so that mlx5e_select_queue
doesn't fail with division by 0 if called before the first activation of
channels. However, the initialization flow of representors doesn't call
mlx5e_build_nic_params, so this bug can still happen with representors.

This commit fixes the bug by adding the missing assignment to
mlx5e_build_rep_params.

Fixes: 846d6da1fcdb ("net/mlx5e: Fix division by 0 in mlx5e_select_queue")
Signed-off-by: Maxim Mikityanskiy <[email protected]>
Reviewed-by: Tariq Toukan <[email protected]>
Signed-off-by: Saeed Mahameed <[email protected]>
drivers/net/ethernet/mellanox/mlx5/core/en_rep.c
This page took 0.061826 seconds and 4 git commands to generate.