svn commit: r353188 - stable/12/sys/dev/mlx5/mlx5_core
Hans Petter Selasky
hselasky at FreeBSD.org
Mon Oct 7 08:39:56 UTC 2019
Author: hselasky
Date: Mon Oct 7 08:39:55 2019
New Revision: 353188
URL: https://svnweb.freebsd.org/changeset/base/353188
Log:
MFC r352958:
Make sure the number of IRQ vectors doesn't exceed 256 in mlx5core.
The "intr" field in "struct mlx5_ifc_eqc_bits" is only 8 bits wide.
Sponsored by: Mellanox Technologies
Modified:
stable/12/sys/dev/mlx5/mlx5_core/mlx5_main.c
Directory Properties:
stable/12/ (props changed)
Modified: stable/12/sys/dev/mlx5/mlx5_core/mlx5_main.c
==============================================================================
--- stable/12/sys/dev/mlx5/mlx5_core/mlx5_main.c Mon Oct 7 08:39:12 2019 (r353187)
+++ stable/12/sys/dev/mlx5/mlx5_core/mlx5_main.c Mon Oct 7 08:39:55 2019 (r353188)
@@ -275,7 +275,10 @@ static int mlx5_enable_msix(struct mlx5_core_dev *dev)
else
nvec += MLX5_CAP_GEN(dev, num_ports) * num_online_cpus();
- nvec = min_t(int, nvec, num_eqs);
+ if (nvec > num_eqs)
+ nvec = num_eqs;
+ if (nvec > 256)
+ nvec = 256; /* limit of firmware API */
if (nvec <= MLX5_EQ_VEC_COMP_BASE)
return -ENOMEM;
More information about the svn-src-all
mailing list