]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net/mlx5: Don't request more than supported EQs
authorDaniel Jurgens <danielj@mellanox.com>
Thu, 5 Dec 2019 22:58:10 +0000 (16:58 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 14 Apr 2021 06:47:20 +0000 (08:47 +0200)
commitc896de640df7a4809d8c3d9861bad7f007ff8e10
tree519e31bcfd9cf9a4b19e729787afb5d2e0790ee4
parentacea114d3c46148358f36ce1a7eecc0e83e4e1c1
net/mlx5: Don't request more than supported EQs

[ Upstream commit a7b76002ae78cd230ee652ccdfedf21aa94fcecc ]

Calculating the number of compeltion EQs based on the number of
available IRQ vectors doesn't work now that all async EQs share one IRQ.
Thus the max number of EQs can be exceeded on systems with more than
approximately 256 CPUs. Take this into account when calculating the
number of available completion EQs.

Fixes: 81bfa206032a ("net/mlx5: Use a single IRQ for all async EQs")
Signed-off-by: Daniel Jurgens <danielj@mellanox.com>
Reviewed-by: Parav Pandit <parav@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/mellanox/mlx5/core/eq.c