Netdev Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Tony Nguyen <anthony.l.nguyen@intel.com>
To: davem@davemloft.net, kuba@kernel.org
Cc: Haiyue Wang <haiyue.wang@intel.com>,
	netdev@vger.kernel.org, sassmann@redhat.com,
	anthony.l.nguyen@intel.com,
	Konrad Jankowski <konrad0.jankowski@intel.com>
Subject: [PATCH net 3/6] ice: handle the VF VSI rebuild failure
Date: Fri,  4 Jun 2021 09:08:13 -0700	[thread overview]
Message-ID: <20210604160816.3391716-4-anthony.l.nguyen@intel.com> (raw)
In-Reply-To: <20210604160816.3391716-1-anthony.l.nguyen@intel.com>

From: Haiyue Wang <haiyue.wang@intel.com>

VSI rebuild can be failed for LAN queue config, then the VF's VSI will
be NULL, the VF reset should be stopped with the VF entering into the
disable state.

Fixes: 12bb018c538c ("ice: Refactor VF reset")
Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
Tested-by: Konrad Jankowski <konrad0.jankowski@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
---
 drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c b/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c
index 944d861c8579..97a46c616aca 100644
--- a/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c
+++ b/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c
@@ -1700,7 +1700,12 @@ bool ice_reset_vf(struct ice_vf *vf, bool is_vflr)
 		ice_vf_ctrl_vsi_release(vf);
 
 	ice_vf_pre_vsi_rebuild(vf);
-	ice_vf_rebuild_vsi_with_release(vf);
+
+	if (ice_vf_rebuild_vsi_with_release(vf)) {
+		dev_err(dev, "Failed to release and setup the VF%u's VSI\n", vf->vf_id);
+		return false;
+	}
+
 	ice_vf_post_vsi_rebuild(vf);
 
 	/* if the VF has been reset allow it to come up again */
-- 
2.26.2


  parent reply	other threads:[~2021-06-04 16:10 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-04 16:08 [PATCH net 0/6][pull request] Intel Wired LAN Driver Updates 2021-06-04 Tony Nguyen
2021-06-04 16:08 ` [PATCH net 1/6] ice: Fix allowing VF to request more/less queues via virtchnl Tony Nguyen
2021-06-04 16:08 ` [PATCH net 2/6] ice: Fix VFR issues for AVF drivers that expect ATQLEN cleared Tony Nguyen
2021-06-04 16:08 ` Tony Nguyen [this message]
2021-06-04 16:08 ` [PATCH net 4/6] ice: report supported and advertised autoneg using PHY capabilities Tony Nguyen
2021-06-04 16:08 ` [PATCH net 5/6] ice: Allow all LLDP packets from PF to Tx Tony Nguyen
2021-06-04 16:08 ` [PATCH net 6/6] virtchnl: Add missing padding to virtchnl_proto_hdrs Tony Nguyen
2021-06-04 21:40 ` [PATCH net 0/6][pull request] Intel Wired LAN Driver Updates 2021-06-04 patchwork-bot+netdevbpf

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=20210604160816.3391716-4-anthony.l.nguyen@intel.com \
    --to=anthony.l.nguyen@intel.com \
    --cc=davem@davemloft.net \
    --cc=haiyue.wang@intel.com \
    --cc=konrad0.jankowski@intel.com \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=sassmann@redhat.com \
    --subject='Re: [PATCH net 3/6] ice: handle the VF VSI rebuild failure' \
    /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

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).