From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
To: davem@davemloft.net
Cc: Jesse Brandeburg <jesse.brandeburg@intel.com>,
netdev@vger.kernel.org, gospo@redhat.com, sassmann@redhat.com,
Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Subject: [net-next 08/15] i40e: use same number of queues as CPUs
Date: Thu, 12 Dec 2013 04:40:44 -0800 [thread overview]
Message-ID: <1386852051-27907-9-git-send-email-jeffrey.t.kirsher@intel.com> (raw)
In-Reply-To: <1386852051-27907-1-git-send-email-jeffrey.t.kirsher@intel.com>
From: Jesse Brandeburg <jesse.brandeburg@intel.com>
The current driver default sets the number of transmit/receive
queue pairs based on the current node's CPU count.
A better method is to use the total number of CPUs in the system
to suggest the number of queue pairs, which aligns better with
the behavior of ixgbe, and also with the expectations of the
kernel XPS and other subsystems in the stack.
Change-Id: If3e20c7f100f13e51d69762594d948f247ffe0c8
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
drivers/net/ethernet/intel/i40e/i40e_main.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index 909b341..b94783f 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -5404,7 +5404,7 @@ static int i40e_init_msix(struct i40e_pf *pf)
/* The number of vectors we'll request will be comprised of:
* - Add 1 for "other" cause for Admin Queue events, etc.
* - The number of LAN queue pairs
- * already adjusted for the NUMA node
+ * already adjusted for the number of cpus in the system
* assumes symmetric Tx/Rx pairing
* - The number of VMDq pairs
* Once we count this up, try the request.
@@ -5731,8 +5731,7 @@ static int i40e_sw_init(struct i40e_pf *pf)
pf->hw.func_caps.num_tx_qp);
if (pf->hw.func_caps.rss) {
pf->flags |= I40E_FLAG_RSS_ENABLED;
- pf->rss_size = min_t(int, pf->rss_size_max,
- nr_cpus_node(numa_node_id()));
+ pf->rss_size = min_t(int, pf->rss_size_max, num_online_cpus());
} else {
pf->rss_size = 1;
}
@@ -7067,7 +7066,7 @@ static u16 i40e_set_rss_size(struct i40e_pf *pf, int queues_left)
int num_tc0;
num_tc0 = min_t(int, queues_left, pf->rss_size_max);
- num_tc0 = min_t(int, num_tc0, nr_cpus_node(numa_node_id()));
+ num_tc0 = min_t(int, num_tc0, num_online_cpus());
num_tc0 = rounddown_pow_of_two(num_tc0);
return num_tc0;
--
1.8.3.1
next prev parent reply other threads:[~2013-12-12 12:41 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-12 12:40 [net-next 00/15][pull request] Intel Wired LAN Driver Updates Jeff Kirsher
2013-12-12 12:40 ` [net-next 01/15] i40e: fix null dereference Jeff Kirsher
2013-12-12 14:30 ` Sergei Shtylyov
2013-12-12 12:40 ` [net-next 02/15] i40e: fix up some of the ethtool connection reporting Jeff Kirsher
2013-12-12 12:40 ` [net-next 03/15] i40e: fix pf reset after offline test Jeff Kirsher
2013-12-12 12:40 ` [net-next 04/15] i40e: add netdev ops helper function Jeff Kirsher
2013-12-12 14:27 ` Sergei Shtylyov
2013-12-12 12:40 ` [net-next 05/15] i40e: Tell the stack about our actual number of queues Jeff Kirsher
2013-12-12 12:40 ` [net-next 06/15] i40e: init flow control settings to disabled Jeff Kirsher
2013-12-12 12:40 ` [net-next 07/15] i40e: trivial fixes Jeff Kirsher
2013-12-12 12:40 ` Jeff Kirsher [this message]
2013-12-12 12:40 ` [net-next 09/15] i40e: reinit flow for the main VSI Jeff Kirsher
2013-12-12 12:40 ` [net-next 10/15] i40e: function to reconfigure RSS queues and rebuild Jeff Kirsher
2013-12-12 12:40 ` [net-next 11/15] i40e: debugfs command to change RSS queue count Jeff Kirsher
2013-12-12 14:13 ` Sergei Shtylyov
2013-12-12 20:41 ` Ben Hutchings
2013-12-12 12:40 ` [net-next 12/15] i40e: Add basic support for get/set channels for RSS Jeff Kirsher
2013-12-12 12:40 ` [net-next 13/15] i40e: rtnl_lock in reset path fixes Jeff Kirsher
2013-12-12 12:40 ` [net-next 14/15] i40e: support for suspend and resume Jeff Kirsher
2013-12-12 12:40 ` [net-next 15/15] i40e: Remove FCoE in i40e_virtchnl_pf.c code Jeff Kirsher
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1386852051-27907-9-git-send-email-jeffrey.t.kirsher@intel.com \
--to=jeffrey.t.kirsher@intel.com \
--cc=davem@davemloft.net \
--cc=gospo@redhat.com \
--cc=jesse.brandeburg@intel.com \
--cc=netdev@vger.kernel.org \
--cc=sassmann@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).