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 S70 03/12] i40e: don't hold RTNL lock while waiting for VF reset to finish
Date: Thu, 13 Apr 2017 04:45:46 -0400	[thread overview]
Message-ID: <20170413084555.6962-3-alice.michael@intel.com> (raw)
In-Reply-To: <20170413084555.6962-1-alice.michael@intel.com>

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

We made some effort to reduce the RTNL lock scope when resetting and
rebuilding the PF. Unfortunately we still held the RTNL lock during the
VF reset operation, which meant that multiple PFs could not reset in
parallel due to the global lock. For now, further reduce the scope by
not holding the RTNL lock while resetting VFs. This allows multiple PFs
to reset in a timely manner.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Change-ID: I2fbf823a0063f24dff67676cad09f0bbf83ee4ce
---
 drivers/net/ethernet/intel/i40e/i40e_main.c | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index 4b507ce..1c06693 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -7151,6 +7151,10 @@ static void i40e_rebuild(struct i40e_pf *pf, bool reinit, bool lock_acquired)
 	/* restart the VSIs that were rebuilt and running before the reset */
 	i40e_pf_unquiesce_all_vsi(pf);
 
+	/* Release the RTNL lock before we start resetting VFs */
+	if (!lock_acquired)
+		rtnl_unlock();
+
 	if (pf->num_alloc_vfs) {
 		for (v = 0; v < pf->num_alloc_vfs; v++)
 			i40e_reset_vf(&pf->vf[v], true);
@@ -7159,9 +7163,12 @@ static void i40e_rebuild(struct i40e_pf *pf, bool reinit, bool lock_acquired)
 	/* tell the firmware that we're starting */
 	i40e_send_version(pf);
 
+	/* We've already released the lock, so don't do it again */
+	goto end_core_reset;
+
 end_unlock:
-if (!lock_acquired)
-	rtnl_unlock();
+	if (!lock_acquired)
+		rtnl_unlock();
 end_core_reset:
 	clear_bit(__I40E_RESET_FAILED, &pf->state);
 clear_recovery:
-- 
2.9.3


  parent reply	other threads:[~2017-04-13  8:45 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-13  8:45 [Intel-wired-lan] [next PATCH S70 01/12] i40e/i40evf: Add tracepoints Alice Michael
2017-04-13  8:45 ` [Intel-wired-lan] [next PATCH S70 02/12] i40e: DCR 287 new AQ commands Alice Michael
2017-04-14 19:17   ` Shannon Nelson
2017-04-17 17:34   ` Bowers, AndrewX
2017-04-13  8:45 ` Alice Michael [this message]
2017-04-13 17:21   ` [Intel-wired-lan] [next PATCH S70 03/12] i40e: don't hold RTNL lock while waiting for VF reset to finish Keller, Jacob E
2017-04-14 21:46   ` Bowers, AndrewX
2017-04-13  8:45 ` [Intel-wired-lan] [next PATCH S70 04/12] i40e: factor out queue control from i40e_vsi_control_(tx|rx) Alice Michael
2017-04-13 17:22   ` Keller, Jacob E
2017-04-14 21:47   ` Bowers, AndrewX
2017-04-13  8:45 ` [Intel-wired-lan] [next PATCH S70 05/12] i40e: fix CONFIG_BUSY checks in i40e_set_settings function Alice Michael
2017-04-13 17:21   ` Keller, Jacob E
2017-04-14 21:48   ` Bowers, AndrewX
2017-04-13  8:45 ` [Intel-wired-lan] [next PATCH S70 06/12] i40e: reduce wait time for adminq command completion Alice Michael
2017-04-14 19:06   ` Shannon Nelson
2017-04-17 17:25   ` Bowers, AndrewX
2017-04-13  8:45 ` [Intel-wired-lan] [next PATCH S70 07/12] i40e: remove I40E_FLAG_IN_NETPOLL entirely Alice Michael
2017-04-17 17:25   ` Bowers, AndrewX
2017-04-13  8:45 ` [Intel-wired-lan] [next PATCH S70 08/12] i40e: split some code in i40e_reset_vf into helpers Alice Michael
2017-04-17 17:26   ` Bowers, AndrewX
2017-04-13  8:45 ` [Intel-wired-lan] [next PATCH S70 09/12] i40e: reset all VFs in parallel when rebuilding PF Alice Michael
2017-04-17 17:31   ` Bowers, AndrewX
2017-04-13  8:45 ` [Intel-wired-lan] [next PATCH S70 10/12] i40e: use i40e_stop_rings_no_wait to implement PORT_SUSPENDED state Alice Michael
2017-04-14 19:21   ` Shannon Nelson
2017-04-17 17:32   ` Bowers, AndrewX
2017-04-13  8:45 ` [Intel-wired-lan] [next PATCH S70 11/12] i40e: properly spell I40E_VF_STATE_* flags Alice Michael
2017-04-17 17:32   ` Bowers, AndrewX
2017-04-13  8:45 ` [Intel-wired-lan] [next PATCH S70 12/12] i40e: make use of i40e_reset_all_vfs when initializing new VFs Alice Michael
2017-04-17 17:33   ` Bowers, AndrewX
2017-04-13 23:12 ` [Intel-wired-lan] [next PATCH S70 01/12] i40e/i40evf: Add tracepoints Peterson, Scott D
2017-04-14 21:42 ` 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=20170413084555.6962-3-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.