From patchwork Mon Jun 25 17:53:38 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eilon Greenstein X-Patchwork-Id: 167195 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 65A5FB6FAF for ; Tue, 26 Jun 2012 03:53:57 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754634Ab2FYRxz (ORCPT ); Mon, 25 Jun 2012 13:53:55 -0400 Received: from mms1.broadcom.com ([216.31.210.17]:1754 "EHLO mms1.broadcom.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754029Ab2FYRxy (ORCPT ); Mon, 25 Jun 2012 13:53:54 -0400 Received: from [10.9.200.131] by mms1.broadcom.com with ESMTP (Broadcom SMTP Relay (Email Firewall v6.5)); Mon, 25 Jun 2012 10:53:03 -0700 X-Server-Uuid: 06151B78-6688-425E-9DE2-57CB27892261 Received: from mail-irva-13.broadcom.com (10.11.16.103) by IRVEXCHHUB01.corp.ad.broadcom.com (10.9.200.131) with Microsoft SMTP Server id 8.2.247.2; Mon, 25 Jun 2012 10:53:43 -0700 Received: from [10.185.6.73] (lb-tlvb-eilong.il.broadcom.com [10.185.6.73]) by mail-irva-13.broadcom.com (Postfix) with ESMTP id 0FF099F9F8; Mon, 25 Jun 2012 10:53:40 -0700 (PDT) Subject: Re: [RFC net-next (v2) 12/14] ixgbe: set maximal number of default RSS queues From: "Eilon Greenstein" Reply-to: eilong@broadcom.com To: "Alexander Duyck" cc: "Yuval Mintz" , davem@davemloft.net, netdev@vger.kernel.org, "Jeff Kirsher" , "John Fastabend" In-Reply-To: <4FE88770.7070007@intel.com> References: <1340624745-8650-1-git-send-email-yuvalmin@broadcom.com> <1340624745-8650-13-git-send-email-yuvalmin@broadcom.com> <4FE88770.7070007@intel.com> Organization: Broadcom Date: Mon, 25 Jun 2012 20:53:38 +0300 Message-ID: <1340646818.2486.27.camel@lb-tlvb-eilong.il.broadcom.com> MIME-Version: 1.0 X-Mailer: Evolution 2.28.3 X-WSS-ID: 63F67AF53MK4259567-01-01 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Mon, 2012-06-25 at 08:44 -0700, Alexander Duyck wrote: > This doesn't limit queues, only interrupt vectors. As I told you before > you should look at the ixgbe_set_rss_queues function if you actually > want to limit the number of RSS queues. How about this: --- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c index af1a531..23a8609 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c @@ -277,6 +277,8 @@ static inline bool ixgbe_set_rss_queues(struct ixgbe_adapter *adapter) bool ret = false; struct ixgbe_ring_feature *f = &adapter->ring_feature[RING_F_RSS]; + f->indices = min_t(int, netif_get_num_default_rss_queues(), f->indices); + if (adapter->flags & IXGBE_FLAG_RSS_ENABLED) { f->mask = 0xF; adapter->num_rx_queues = f->indices; @@ -302,7 +304,9 @@ static inline bool ixgbe_set_fdir_queues(struct ixgbe_adapter *adapter) bool ret = false; struct ixgbe_ring_feature *f_fdir = &adapter->ring_feature[RING_F_FDIR]; - f_fdir->indices = min_t(int, num_online_cpus(), f_fdir->indices); + f_fdir->indices = min_t(int, netif_get_num_default_rss_queues(), + f_fdir->indices); + f_fdir->mask = 0; /* @@ -339,8 +343,7 @@ static inline bool ixgbe_set_fcoe_queues(struct ixgbe_adapter *adapter) if (!(adapter->flags & IXGBE_FLAG_FCOE_ENABLED)) return false; - f->indices = min_t(int, num_online_cpus(), f->indices); - + f->indices = min_t(int, f->indices, netif_get_num_default_rss_queues()); adapter->num_rx_queues = 1; adapter->num_tx_queues = 1;