netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
To: davem@davemloft.net
Cc: Shannon Nelson <shannon.nelson@oracle.com>,
	netdev@vger.kernel.org, nhorman@redhat.com, sassmann@redhat.com,
	jogreene@redhat.com, Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Subject: [net-next 2/9] i40e: only redistribute MSI-X vectors when needed
Date: Tue, 31 Oct 2017 11:40:05 -0700	[thread overview]
Message-ID: <20171031184012.29690-3-jeffrey.t.kirsher@intel.com> (raw)
In-Reply-To: <20171031184012.29690-1-jeffrey.t.kirsher@intel.com>

From: Shannon Nelson <shannon.nelson@oracle.com>

Whether or not there are vectors_left, we only need to redistribute
our vectors if we didn't get as many as we requested.  With the current
check, the code will try to redistribute even if we did in fact get all
the vectors we requested - this can happen when we have more CPUs than
we do vectors.  This restores an earlier check to be sure we only
redistribute if we didn't get the full count we requested.

Fixes: 4ce20abc645f (i40e: fix MSI-X vector redistribution if hw limit is reached)
Signed-off-by: Shannon Nelson <shannon.nelson@oracle.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 drivers/net/ethernet/intel/i40e/i40e_main.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index 2a087319c09b..1cf9ba2d9a41 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -9346,7 +9346,7 @@ static int i40e_init_msix(struct i40e_pf *pf)
 		pf->num_lan_qps = 1;
 		pf->num_lan_msix = 1;
 
-	} else if (!vectors_left) {
+	} else if (v_actual != v_budget) {
 		/* If we have limited resources, we will start with no vectors
 		 * for the special features and then allocate vectors to some
 		 * of these features based on the policy and at the end disable
@@ -9355,7 +9355,8 @@ static int i40e_init_msix(struct i40e_pf *pf)
 		int vec;
 
 		dev_info(&pf->pdev->dev,
-			 "MSI-X vector limit reached, attempting to redistribute vectors\n");
+			 "MSI-X vector limit reached with %d, wanted %d, attempting to redistribute vectors\n",
+			 v_actual, v_budget);
 		/* reserve the misc vector */
 		vec = v_actual - 1;
 
-- 
2.14.2

  parent reply	other threads:[~2017-10-31 18:40 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-31 18:40 [net-next 0/9][pull request] 40GbE Intel Wired LAN Driver Updates 2017-10-31 Jeff Kirsher
2017-10-31 18:40 ` [net-next 1/9] i40e: mark PM functions as __maybe_unused Jeff Kirsher
2017-10-31 18:40 ` Jeff Kirsher [this message]
2017-10-31 18:40 ` [net-next 3/9] i40e/i40evf: Revert "i40e/i40evf: bump tail only in multiples of 8" Jeff Kirsher
2017-10-31 18:40 ` [net-next 4/9] net: sched: Identify hardware traffic classes using classid Jeff Kirsher
2017-10-31 18:40 ` [net-next 5/9] i40e: Map TCs with the VSI seids Jeff Kirsher
2017-10-31 18:40 ` [net-next 6/9] i40e: Cloud filter mode for set_switch_config command Jeff Kirsher
2017-10-31 18:40 ` [net-next 7/9] i40e: Admin queue definitions for cloud filters Jeff Kirsher
2017-10-31 18:40 ` [net-next 8/9] i40e: Clean up of " Jeff Kirsher
2017-10-31 18:40 ` [net-next 9/9] i40e: Enable cloud filters via tc-flower Jeff Kirsher
2017-11-01  2:10 ` [net-next 0/9][pull request] 40GbE Intel Wired LAN Driver Updates 2017-10-31 David Miller

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=20171031184012.29690-3-jeffrey.t.kirsher@intel.com \
    --to=jeffrey.t.kirsher@intel.com \
    --cc=davem@davemloft.net \
    --cc=jogreene@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=nhorman@redhat.com \
    --cc=sassmann@redhat.com \
    --cc=shannon.nelson@oracle.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).