public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mlx4_core: request MSIX vectors as much as there CPU cores
@ 2010-05-05 11:30 Eli Cohen
       [not found] ` <20100505113047.GA12242-8YAHvHwT2UEvbXDkjdHOrw/a8Rv0c6iv@public.gmane.org>
  0 siblings, 1 reply; 7+ messages in thread
From: Eli Cohen @ 2010-05-05 11:30 UTC (permalink / raw)
  To: Roland Dreier; +Cc: Linux RDMA list, ewg

The current code requires num_possible_cpus() + 1 MSIX vectors. However,
num_possible_cpus() stands for the max number of supported CPUs by the kernel.
We should use num_online_cpus() which is the number of available CPUs for the
system.

Signed-off-by: Eli Cohen <eli-VPRAkNaXOzVS1MOuV/RT9w@public.gmane.org>
---
 drivers/net/mlx4/main.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/mlx4/main.c b/drivers/net/mlx4/main.c
index e3e0d54..0559df4 100644
--- a/drivers/net/mlx4/main.c
+++ b/drivers/net/mlx4/main.c
@@ -969,7 +969,7 @@ static void mlx4_enable_msi_x(struct mlx4_dev *dev)
 
 	if (msi_x) {
 		nreq = min_t(int, dev->caps.num_eqs - dev->caps.reserved_eqs,
-			     num_possible_cpus() + 1);
+			     num_online_cpus() + 1);
 		entries = kcalloc(nreq, sizeof *entries, GFP_KERNEL);
 		if (!entries)
 			goto no_msi;
-- 
1.7.1

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2010-05-06  7:49 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-05 11:30 [PATCH] mlx4_core: request MSIX vectors as much as there CPU cores Eli Cohen
     [not found] ` <20100505113047.GA12242-8YAHvHwT2UEvbXDkjdHOrw/a8Rv0c6iv@public.gmane.org>
2010-05-05 14:54   ` Roland Dreier
     [not found]     ` <adahbmmpfep.fsf-BjVyx320WGW9gfZ95n9DRSW4+XlvGpQz@public.gmane.org>
2010-05-05 16:32       ` Jason Gunthorpe
     [not found]         ` <20100505163252.GG15969-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2010-05-05 19:34           ` [ewg] " Tziporet Koren
     [not found]             ` <4BE1C82F.4000009-VPRAkNaXOzVS1MOuV/RT9w@public.gmane.org>
2010-05-05 19:51               ` Roland Dreier
     [not found]                 ` <adaaasejfew.fsf-BjVyx320WGW9gfZ95n9DRSW4+XlvGpQz@public.gmane.org>
2010-05-05 19:55                   ` Roland Dreier
     [not found]                     ` <ada6332jf79.fsf-BjVyx320WGW9gfZ95n9DRSW4+XlvGpQz@public.gmane.org>
2010-05-06  7:49                       ` [ewg] " Eli Cohen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox