From patchwork Wed May 5 11:30:48 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eli Cohen X-Patchwork-Id: 97057 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o45BTddH028990 for ; Wed, 5 May 2010 11:29:40 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756860Ab0EEL3j (ORCPT ); Wed, 5 May 2010 07:29:39 -0400 Received: from mail.mellanox.co.il ([194.90.237.43]:59941 "EHLO mellanox.co.il" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1756508Ab0EEL3i (ORCPT ); Wed, 5 May 2010 07:29:38 -0400 Received: from Internal Mail-Server by MTLPINE1 (envelope-from eli@mellanox.co.il) with SMTP; 5 May 2010 14:29:32 +0300 Received: from localhost ([10.4.1.30]) by mtlexch01.mtl.com with Microsoft SMTPSVC(6.0.3790.3959); Wed, 5 May 2010 14:29:32 +0300 Date: Wed, 5 May 2010 14:30:48 +0300 From: Eli Cohen To: Roland Dreier Cc: Linux RDMA list , ewg Subject: [PATCH] mlx4_core: request MSIX vectors as much as there CPU cores Message-ID: <20100505113047.GA12242@mtldesk030.lab.mtl.com> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) X-OriginalArrivalTime: 05 May 2010 11:29:32.0683 (UTC) FILETIME=[3BB16DB0:01CAEC46] X-TM-AS-Product-Ver: SMEX-8.0.0.1181-6.000.1038-17364.006 X-TM-AS-Result: No--6.739500-8.000000-31 X-TM-AS-User-Approved-Sender: No X-TM-AS-User-Blocked-Sender: No Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Wed, 05 May 2010 11:29:40 +0000 (UTC) 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;