OSDN Git Service

net/mlx5: Fix setting number of EQs of SFs
authorShay Drory <shayd@nvidia.com>
Tue, 14 Sep 2021 07:13:02 +0000 (10:13 +0300)
committerSaeed Mahameed <saeedm@nvidia.com>
Thu, 30 Sep 2021 21:07:56 +0000 (14:07 -0700)
commitf88c4876347400a577598e06f1b230a7b19ee0e9
treefbc36895bd33691e8318b6ff7c86c5ea5a1fe1d7
parentac8b7d50ae4c3f5325c599f3d6e939ecef6a585a
net/mlx5: Fix setting number of EQs of SFs

When setting number of completion EQs of the SF, consider number of
online CPUs.
Without this consideration, when number of online cpus are less than 8,
unnecessary 8 completion EQs are allocated.

Fixes: c36326d38d93 ("net/mlx5: Round-Robin EQs over IRQs")
Signed-off-by: Shay Drory <shayd@nvidia.com>
Reviewed-by: Parav Pandit <parav@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/pci_irq.c