Intel-Wired-Lan Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Bowers, AndrewX <andrewx.bowers@intel.com>
To: intel-wired-lan@osuosl.org
Subject: [Intel-wired-lan] [PATCH S40 05/15] ice: Fix removing driver while bare-metal VFs pass traffic
Date: Tue, 3 Mar 2020 19:05:41 +0000	[thread overview]
Message-ID: <61f3b1bb1e64437188e201536d753122@intel.com> (raw)
In-Reply-To: <20200227181505.61720-5-anthony.l.nguyen@intel.com>

> -----Original Message-----
> From: Intel-wired-lan [mailto:intel-wired-lan-bounces at osuosl.org] On
> Behalf Of Tony Nguyen
> Sent: Thursday, February 27, 2020 10:15 AM
> To: intel-wired-lan at lists.osuosl.org
> Subject: [Intel-wired-lan] [PATCH S40 05/15] ice: Fix removing driver while
> bare-metal VFs pass traffic
> 
> From: Brett Creeley <brett.creeley@intel.com>
> 
> Currently, if there are bare-metal VFs passing traffic and the ice driver is
> removed, there is a possibility of VFs triggering a Tx timeout right before
> iavf_remove(). This is causing iavf_close() to not be called because there is a
> check in the beginning of iavf_remove() that bails out early if (adapter->state
> < IAVF_DOWN_PENDING). This makes it so some resources do not get
> cleaned up. Specifically, free_irq() is never called for data interrupts, which
> results in the following line of code to trigger:
> 
> pci_disable_msix()
> 	free_msi_irqs()
> 		...
> 		BUG_ON(irq_has_action(entry->irq + i));
> 		...
> 
> To prevent the Tx timeout from occurring on the VF during driver unload for
> ice and the iavf there are a few changes that are needed.
> 
> [1] Don't disable all active VF Tx/Rx queues prior to calling pci_disable_sriov.
> 
> [2] Call ice_free_vfs() before disabling the service task.
> 
> [3] Disable VF resets when the ice driver is being unloaded by setting the pf-
> >state flag __ICE_VF_RESETS_DISABLED.
> 
> Changing [1] and [2] allow each VF driver's remove flow to successfully send
> VIRTCHNL requests, which includes queue disable. This prevents unexpected
> Tx timeouts because the PF driver is no longer forcefully disabling queues.
> 
> Due to [1] and [2] there is a possibility that the PF driver will get a VFLR or
> reset request over VIRTCHNL from a VF during PF driver unload.
> Prevent that by doing [3].
> 
> Signed-off-by: Brett Creeley <brett.creeley@intel.com>
> ---
>  drivers/net/ethernet/intel/ice/ice.h          |  1 +
>  drivers/net/ethernet/intel/ice/ice_main.c     | 19 +++++++++++++++----
>  .../net/ethernet/intel/ice/ice_virtchnl_pf.c  | 19 +++++++++++++------
>  3 files changed, 29 insertions(+), 10 deletions(-)

Tested-by: Andrew Bowers <andrewx.bowers@intel.com>



  reply	other threads:[~2020-03-03 19:05 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-27 18:14 [Intel-wired-lan] [PATCH S40 01/15] iavf: Enable support for up to 16 queues Tony Nguyen
2020-02-27 18:14 ` [Intel-wired-lan] [PATCH S40 02/15] ice: allow bigger VFs Tony Nguyen
2020-03-03 19:04   ` Bowers, AndrewX
2020-02-27 18:14 ` [Intel-wired-lan] [PATCH S40 03/15] ice: Improve clarity of prints and variables Tony Nguyen
2020-03-03 19:04   ` Bowers, AndrewX
2020-02-27 18:14 ` [Intel-wired-lan] [PATCH S40 04/15] ice: Add support for tunnel offloads Tony Nguyen
2020-03-03 19:05   ` Bowers, AndrewX
2020-02-27 18:14 ` [Intel-wired-lan] [PATCH S40 05/15] ice: Fix removing driver while bare-metal VFs pass traffic Tony Nguyen
2020-03-03 19:05   ` Bowers, AndrewX [this message]
2020-02-27 18:14 ` [Intel-wired-lan] [PATCH S40 06/15] ice: Display Link detected via Ethtool in safe mode Tony Nguyen
2020-03-03 19:06   ` Bowers, AndrewX
2020-02-27 18:14 ` [Intel-wired-lan] [PATCH S40 07/15] ice: Fix corner case when switching from IEEE to CEE Tony Nguyen
2020-03-03 19:06   ` Bowers, AndrewX
2020-02-27 18:14 ` [Intel-wired-lan] [PATCH S40 08/15] ice: renegotiate link after FW DCB on Tony Nguyen
2020-03-03 19:07   ` Bowers, AndrewX
2020-02-27 18:14 ` [Intel-wired-lan] [PATCH S40 09/15] ice: Correct setting VLAN pruning Tony Nguyen
2020-03-03 19:07   ` Bowers, AndrewX
2020-02-27 18:15 ` [Intel-wired-lan] [PATCH S40 10/15] ice: Increase mailbox receive queue length to maximum Tony Nguyen
2020-03-03 19:07   ` Bowers, AndrewX
2020-02-27 18:15 ` [Intel-wired-lan] [PATCH S40 11/15] ice: fix use of deprecated strlcpy() Tony Nguyen
2020-03-03 19:08   ` Bowers, AndrewX
2020-02-27 18:15 ` [Intel-wired-lan] [PATCH S40 12/15] ice: Fix format specifier Tony Nguyen
2020-03-03 19:09   ` Bowers, AndrewX
2020-02-27 18:15 ` [Intel-wired-lan] [PATCH S40 13/15] ice: Use EOPNOTSUPP instead of ENOTSUPP Tony Nguyen
2020-03-03 19:09   ` Bowers, AndrewX
2020-02-27 18:15 ` [Intel-wired-lan] [PATCH S40 14/15] ice: use variable name more descriptive than type Tony Nguyen
2020-03-03 19:10   ` Bowers, AndrewX
2020-02-27 18:15 ` [Intel-wired-lan] [PATCH S40 15/15] ice: fix incorrect size description of ice_get_nvm_version Tony Nguyen
2020-03-03 19:10   ` Bowers, AndrewX
2020-03-03 19:11 ` [Intel-wired-lan] [PATCH S40 01/15] iavf: Enable support for up to 16 queues 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=61f3b1bb1e64437188e201536d753122@intel.com \
    --to=andrewx.bowers@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox