patches for DPDK stable branches
 help / color / mirror / Atom feed
From: "Lu, Wenzhuo" <wenzhuo.lu@intel.com>
To: Olivier Matz <olivier.matz@6wind.com>,
	"dev@dpdk.org" <dev@dpdk.org>,
	"Zhang, Helin" <helin.zhang@intel.com>,
	"Ananyev, Konstantin" <konstantin.ananyev@intel.com>
Cc: Guo Fengtian <fengtian.guo@6wind.com>,
	"stable@dpdk.org" <stable@dpdk.org>,
	David Marchand <david.marchand@6wind.com>
Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH] net/ixgbevf: reset hardware when stopping port
Date: Fri, 24 Feb 2017 05:21:46 +0000	[thread overview]
Message-ID: <6A0DE07E22DDAD4C9103DF62FEBC09093B56823A@shsmsx102.ccr.corp.intel.com> (raw)
In-Reply-To: <1484153524-19337-1-git-send-email-olivier.matz@6wind.com>

Hi Olivier, Fengtian,


> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Olivier Matz
> Sent: Thursday, January 12, 2017 12:52 AM
> To: dev@dpdk.org; Zhang, Helin; Ananyev, Konstantin
> Cc: Guo Fengtian; stable@dpdk.org; David Marchand
> Subject: [dpdk-dev] [PATCH] net/ixgbevf: reset hardware when stopping port
> 
> From: Guo Fengtian <fengtian.guo@6wind.com>
> 
> When PF triggers a reset, VF port must acknowledge it by calling
> ixgbe_reset_hw().
> 
> Before this patch, the port link status, speed and duplex are invalid (all set
> to 0).
> 
> The patch move the call to ixgbe_reset_hw() from ixgbevf_dev_close() to
> ixgbevf_dev_stop(), so that after a port restart on the VM, the link status is
> properly marked down, with correct speed and duplex.
> 
> Fixes: f0160874c041 ("ixgbe: various updates")
> 
> CC: stable@dpdk.org
> Signed-off-by: Guo Fengtian <fengtian.guo@6wind.com>
> Signed-off-by: David Marchand <david.marchand@6wind.com>
> Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
> ---
> 
> Hi,
> 
> The use case for this problem was described some time ago, see:
> http://dpdk.org/ml/archives/dev/2015-December/030067.html
> 
> It is also part of 2.2 release note:
> http://dpdk.org/browse/dpdk/tree/doc/guides/rel_notes/release_2_2.rst#n4
> 71
> 
> Regards,
> Olivier
Seems the commit log doesn't match the code change.
This change cannot resolve the described problem. The problem is VF doesn't handle the PF reset event. 
Moving the hw_reset from close to stop doesn't help and not necessary. Because PF has already reset VF stuff during  resetting itself, that's why VF not working anymore.

> 
> 
>  drivers/net/ixgbe/ixgbe_ethdev.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c
> b/drivers/net/ixgbe/ixgbe_ethdev.c
> index b7ddd4f..2d8641a 100644
> --- a/drivers/net/ixgbe/ixgbe_ethdev.c
> +++ b/drivers/net/ixgbe/ixgbe_ethdev.c
> @@ -4268,6 +4268,7 @@ ixgbevf_dev_stop(struct rte_eth_dev *dev)
>  	PMD_INIT_FUNC_TRACE();
> 
>  	ixgbevf_intr_disable(hw);
> +	ixgbe_reset_hw(hw);
> 
>  	hw->adapter_stopped = 1;
>  	ixgbe_stop_adapter(hw);
> @@ -4294,12 +4295,8 @@ ixgbevf_dev_stop(struct rte_eth_dev *dev)  static
> void  ixgbevf_dev_close(struct rte_eth_dev *dev)  {
> -	struct ixgbe_hw *hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data-
> >dev_private);
> -
>  	PMD_INIT_FUNC_TRACE();
> 
> -	ixgbe_reset_hw(hw);
> -
>  	ixgbevf_dev_stop(dev);
> 
>  	ixgbe_dev_free_queues(dev);
> --
> 2.8.1

  parent reply	other threads:[~2017-02-24  5:21 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-11 16:52 [dpdk-stable] " Olivier Matz
2017-02-06 13:58 ` [dpdk-stable] [dpdk-dev] " Olivier Matz
2017-02-24  5:21 ` Lu, Wenzhuo [this message]
2017-02-24  8:47   ` [dpdk-stable] [dpdk-dev] [PATCH] net/ixgbevf: reset hardware when stoppingport fengtian Guo
2017-02-24  8:54     ` Lu, Wenzhuo
2017-02-24 10:15       ` [dpdk-stable] [dpdk-dev] [PATCH] net/ixgbevf: reset hardware whenstoppingport fengtian Guo
2017-02-24 10:42         ` Olivier Matz
2017-02-27 14:21           ` Olivier Matz

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=6A0DE07E22DDAD4C9103DF62FEBC09093B56823A@shsmsx102.ccr.corp.intel.com \
    --to=wenzhuo.lu@intel.com \
    --cc=david.marchand@6wind.com \
    --cc=dev@dpdk.org \
    --cc=fengtian.guo@6wind.com \
    --cc=helin.zhang@intel.com \
    --cc=konstantin.ananyev@intel.com \
    --cc=olivier.matz@6wind.com \
    --cc=stable@dpdk.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;
as well as URLs for NNTP newsgroup(s).