All of lore.kernel.org
 help / color / mirror / Atom feed
From: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
To: intel-wired-lan@osuosl.org
Subject: [Intel-wired-lan] [PATCH net v2] i40e: Fix call trace in setup_tx_descriptors
Date: Thu, 19 May 2022 12:21:04 +0200	[thread overview]
Message-ID: <YoYaECJZabzgNK7D@boxer> (raw)
In-Reply-To: <20220519080246.1906390-1-aleksandr.loktionov@intel.com>

On Thu, May 19, 2022 at 10:02:46AM +0200, Loktionov, Aleksandr wrote:
> From: Aleksandr Loktionov <aleksandr.loktionov@intel.com> 
> 
> After pf reset and ethtool -t there was call trace is dmesg

s/pf/PF
s/trace is dmesg/trace in dmesg

> sometimes providing to panic. When there was some time, around 5

s/providing/leading ?
please include the splat from panic

> seconds, between reset and test there was no errors.

s/was/were

> 
> Problem was that pf reset calls i40e_vsi_close in prep_for_reset
> and ethtool -t calls i40e_vsi_close in diag_test. If there was not
> enough time between those commands the second i40e_vsi_close starts
> before previous i40e_vsi_close was done which leads to crash.
> 
> Add check to diag_test if pf is in reset and don't start offline
> tests if it is true.
> 
> Fixes: e17bc411aea8 ("i40e: Disable offline diagnostics if VFs are enabled")

Hard to say which commit should we pick as fixes candidate, but if we stay
with the current one then I think it would be good to include a second
fixes tag that points to the commit that added "|| i40e_active_vmdqs(pf)"
part.

> Signed-off-by: Michal Jaron <michalx.jaron@intel.com>
> Signed-off-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
> ---
>  .../net/ethernet/intel/i40e/i40e_ethtool.c    | 25 +++++++++++++------
>  1 file changed, 17 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
> index e484996..06c05a6 100644
> --- a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
> +++ b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
> @@ -2584,15 +2584,16 @@ static void i40e_diag_test(struct net_device *netdev,
>  
>  		set_bit(__I40E_TESTING, pf->state);
>  
> +		if (test_bit(__I40E_RESET_RECOVERY_PENDING, pf->state) ||
> +		    test_bit(__I40E_RESET_INTR_RECEIVED, pf->state)) {
> +			dev_warn(&pf->pdev->dev,
> +				 "Cannot start offline testing when PF is in reset state.\n");
> +			goto skip_ol_tests;
> +		}
> +
>  		if (i40e_active_vfs(pf) || i40e_active_vmdqs(pf)) {
>  			dev_warn(&pf->pdev->dev,
>  				 "Please take active VFs and Netqueues offline and restart the adapter before running NIC diagnostics\n");
> -			data[I40E_ETH_TEST_REG]		= 1;
> -			data[I40E_ETH_TEST_EEPROM]	= 1;
> -			data[I40E_ETH_TEST_INTR]	= 1;
> -			data[I40E_ETH_TEST_LINK]	= 1;
> -			eth_test->flags |= ETH_TEST_FL_FAILED;
> -			clear_bit(__I40E_TESTING, pf->state);
>  			goto skip_ol_tests;
>  		}
>  
> @@ -2639,9 +2640,17 @@ static void i40e_diag_test(struct net_device *netdev,
>  		data[I40E_ETH_TEST_INTR] = 0;
>  	}
>  
> -skip_ol_tests:
> -
>  	netif_info(pf, drv, netdev, "testing finished\n");
> +	return;
> +
> +skip_ol_tests:
> +	data[I40E_ETH_TEST_REG]		= 1;
> +	data[I40E_ETH_TEST_EEPROM]	= 1;
> +	data[I40E_ETH_TEST_INTR]	= 1;
> +	data[I40E_ETH_TEST_LINK]	= 1;
> +	eth_test->flags |= ETH_TEST_FL_FAILED;
> +	clear_bit(__I40E_TESTING, pf->state);
> +	netif_info(pf, drv, netdev, "testing failed\n");
>  }
>  
>  static void i40e_get_wol(struct net_device *netdev,
> -- 
> 2.31.1
> 
> _______________________________________________
> Intel-wired-lan mailing list
> Intel-wired-lan at osuosl.org
> https://lists.osuosl.org/mailman/listinfo/intel-wired-lan

      parent reply	other threads:[~2022-05-19 10:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-19  8:02 [Intel-wired-lan] [PATCH net v2] i40e: Fix call trace in setup_tx_descriptors Loktionov, Aleksandr
2022-05-19  8:28 ` Paul Menzel
2022-05-19 10:21 ` Maciej Fijalkowski [this message]

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=YoYaECJZabzgNK7D@boxer \
    --to=maciej.fijalkowski@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.