netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
To: davem@davemloft.net
Cc: Akeem G Abodunrin <akeem.g.abodunrin@intel.com>,
	netdev@vger.kernel.org, nhorman@redhat.com, sassmann@redhat.com,
	Andrew Bowers <andrewx.bowers@intel.com>,
	Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Subject: [net-next 13/15] ice: Fix VF configuration issues due to reset
Date: Tue, 27 Aug 2019 09:38:30 -0700	[thread overview]
Message-ID: <20190827163832.8362-14-jeffrey.t.kirsher@intel.com> (raw)
In-Reply-To: <20190827163832.8362-1-jeffrey.t.kirsher@intel.com>

From: Akeem G Abodunrin <akeem.g.abodunrin@intel.com>

This patch fixes a critical reset issue that resulting to the server
reboot when an Admin changes VF configuration on the host, for example
changing VF to Trusted/non_Trusted mode, the PF driver send reset
notification to AVF driver while also continue with reset flow. However,
AVF driver schedule another reset due to notification, which causes two
concurrent reset going on, and trigger lock up in the FW, with AQ call to
delete VSI.

Signed-off-by: Akeem G Abodunrin <akeem.g.abodunrin@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c b/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c
index 78fd3fa8ac8b..b93324e9f4bc 100644
--- a/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c
+++ b/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c
@@ -1152,12 +1152,19 @@ static bool ice_reset_vf(struct ice_vf *vf, bool is_vflr)
 	u32 reg;
 	int i;
 
-	/* If the VFs have been disabled, this means something else is
-	 * resetting the VF, so we shouldn't continue.
+	/* If the PF has been disabled, there is no need resetting VF until
+	 * PF is active again.
 	 */
 	if (test_bit(__ICE_VF_DIS, pf->state))
 		return false;
 
+	/* If the VF has been disabled, this means something else is
+	 * resetting the VF, so we shouldn't continue. Otherwise, set
+	 * disable VF state bit for actual reset, and continue.
+	 */
+	if (test_and_set_bit(ICE_VF_STATE_DIS, vf->vf_states))
+		return false;
+
 	ice_trigger_vf_reset(vf, is_vflr);
 
 	vsi = pf->vsi[vf->lan_vsi_idx];
-- 
2.21.0


  parent reply	other threads:[~2019-08-27 16:38 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-27 16:38 [net-next 00/15][pull request] 100GbE Intel Wired LAN Driver Updates 2019-08-26 Jeff Kirsher
2019-08-27 16:38 ` [net-next 01/15] ice: Fix ethtool port and PFC stats for 4x25G cards Jeff Kirsher
2019-08-27 16:38 ` [net-next 02/15] ice: added sibling head to parse nodes Jeff Kirsher
2019-08-27 16:38 ` [net-next 03/15] ice: Sanitize ice_ena_vsi and ice_dis_vsi Jeff Kirsher
2019-08-27 16:38 ` [net-next 04/15] ice: shorten local and add debug prints Jeff Kirsher
2019-08-27 16:38 ` [net-next 05/15] ice: Introduce a local variable for a VSI in the rebuild path Jeff Kirsher
2019-08-27 16:38 ` [net-next 06/15] ice: Don't clog kernel debug log with VF MDD events errors Jeff Kirsher
2019-08-27 16:38 ` [net-next 07/15] ice: add validation in OP_CONFIG_VSI_QUEUES VF message Jeff Kirsher
2019-08-27 16:38 ` [net-next 08/15] ice: fix ice_is_tc_ena Jeff Kirsher
2019-08-27 16:38 ` [net-next 09/15] ice: fix potential infinite loop Jeff Kirsher
2019-08-27 16:38 ` [net-next 10/15] ice: add support for enabling/disabling single queues Jeff Kirsher
2019-08-27 16:38 ` [net-next 11/15] ice: add support for virtchnl_queue_select.[tx|rx]_queues bitmap Jeff Kirsher
2019-08-27 16:38 ` [net-next 12/15] ice: Alloc queue management bitmaps and arrays dynamically Jeff Kirsher
2019-08-27 16:38 ` Jeff Kirsher [this message]
2019-08-27 16:38 ` [net-next 14/15] ice: Rework ice_ena_msix_range Jeff Kirsher
2019-08-27 16:38 ` [net-next 15/15] ice: fix adminq calls during remove Jeff Kirsher
2019-08-28  4:09 ` [net-next 00/15][pull request] 100GbE Intel Wired LAN Driver Updates 2019-08-26 Jakub Kicinski
2019-08-28  4:17   ` Jeff Kirsher
2019-08-28 22:47 ` 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=20190827163832.8362-14-jeffrey.t.kirsher@intel.com \
    --to=jeffrey.t.kirsher@intel.com \
    --cc=akeem.g.abodunrin@intel.com \
    --cc=andrewx.bowers@intel.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=nhorman@redhat.com \
    --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).