All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alice Michael <alice.michael@intel.com>
To: intel-wired-lan@osuosl.org
Subject: [Intel-wired-lan] [next PATCH S71 10/10] i40evf: allocate queues before we setup the interrupts and q_vectors
Date: Wed, 19 Apr 2017 09:25:59 -0400	[thread overview]
Message-ID: <20170419132559.20459-10-alice.michael@intel.com> (raw)
In-Reply-To: <20170419132559.20459-1-alice.michael@intel.com>

From: Jacob Keller <jacob.e.keller@intel.com>

This matches the ordering of how we free stuff during reset and remove.
It also makes logical sense because we set the interrupts based on the
number of queues. Currently this doesn't really matter in practice.
However a future patch moves the assignment of num_active_queues into
i40evf_alloc_queues, which is required by
i40evf_set_interrupt_capability.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
---
 drivers/net/ethernet/intel/i40evf/i40evf_main.c | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/drivers/net/ethernet/intel/i40evf/i40evf_main.c b/drivers/net/ethernet/intel/i40evf/i40evf_main.c
index 89035ee..445a97a 100644
--- a/drivers/net/ethernet/intel/i40evf/i40evf_main.c
+++ b/drivers/net/ethernet/intel/i40evf/i40evf_main.c
@@ -1508,6 +1508,13 @@ int i40evf_init_interrupt_scheme(struct i40evf_adapter *adapter)
 {
 	int err;
 
+	err = i40evf_alloc_queues(adapter);
+	if (err) {
+		dev_err(&adapter->pdev->dev,
+			"Unable to allocate memory for queues\n");
+		goto err_alloc_queues;
+	}
+
 	rtnl_lock();
 	err = i40evf_set_interrupt_capability(adapter);
 	rtnl_unlock();
@@ -1524,23 +1531,16 @@ int i40evf_init_interrupt_scheme(struct i40evf_adapter *adapter)
 		goto err_alloc_q_vectors;
 	}
 
-	err = i40evf_alloc_queues(adapter);
-	if (err) {
-		dev_err(&adapter->pdev->dev,
-			"Unable to allocate memory for queues\n");
-		goto err_alloc_queues;
-	}
-
 	dev_info(&adapter->pdev->dev, "Multiqueue %s: Queue pair count = %u",
 		 (adapter->num_active_queues > 1) ? "Enabled" : "Disabled",
 		 adapter->num_active_queues);
 
 	return 0;
-err_alloc_queues:
-	i40evf_free_q_vectors(adapter);
 err_alloc_q_vectors:
 	i40evf_reset_interrupt_capability(adapter);
 err_set_interrupt:
+	i40evf_free_queues(adapter);
+err_alloc_queues:
 	return err;
 }
 
-- 
2.9.3


  parent reply	other threads:[~2017-04-19 13:25 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-19 13:25 [Intel-wired-lan] [next PATCH S71 01/10] i40e: rename index to port to avoid confusion Alice Michael
2017-04-19 13:25 ` [Intel-wired-lan] [next PATCH S71 02/10] i40e: Reprogram port offloads after reset Alice Michael
2017-04-21 16:04   ` Bowers, AndrewX
2017-04-19 13:25 ` [Intel-wired-lan] [next PATCH S71 03/10] i40e: amortize wait time when disabling lots of VFs Alice Michael
2017-04-21 18:07   ` Bowers, AndrewX
2017-04-19 13:25 ` [Intel-wired-lan] [next PATCH S71 04/10] i40e: remove unnecessary msleep() delay in i40e_free_vfs Alice Michael
2017-04-19 22:03   ` Shannon Nelson
2017-04-21 18:08   ` Bowers, AndrewX
2017-04-19 13:25 ` [Intel-wired-lan] [next PATCH S71 05/10] i40e: separate PF and VSI state flags Alice Michael
2017-04-20 23:01   ` Bowers, AndrewX
2017-04-21 20:15     ` Keller, Jacob E
2017-04-19 13:25 ` [Intel-wired-lan] [next PATCH S71 06/10] i40e: use DECLARE_BITMAP for state fields Alice Michael
2017-04-21 18:09   ` Bowers, AndrewX
2017-04-19 13:25 ` [Intel-wired-lan] [next PATCH S71 07/10] i40evf: remove needless min_t() on num_online_cpus()*2 Alice Michael
2017-04-20 23:02   ` Bowers, AndrewX
2017-04-19 13:25 ` [Intel-wired-lan] [next PATCH S71 08/10] i40e: remove hw_disabled_flags in favor of using separate flag bits Alice Michael
2017-04-19 13:25 ` [Intel-wired-lan] [next PATCH S71 09/10] i40evf: remove I40E_FLAG_FDIR_ATR_ENABLED Alice Michael
2017-04-20 23:03   ` Bowers, AndrewX
2017-04-19 13:25 ` Alice Michael [this message]
2017-04-21 18:13   ` [Intel-wired-lan] [next PATCH S71 10/10] i40evf: allocate queues before we setup the interrupts and q_vectors Bowers, AndrewX
2017-04-20 23:00 ` [Intel-wired-lan] [next PATCH S71 01/10] i40e: rename index to port to avoid confusion Bowers, AndrewX

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=20170419132559.20459-10-alice.michael@intel.com \
    --to=alice.michael@intel.com \
    --cc=intel-wired-lan@osuosl.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.