From mboxrd@z Thu Jan 1 00:00:00 1970 From: Olivier Matz Subject: Re: [PATCH] net/ixgbevf: reset hardware whenstoppingport Date: Fri, 24 Feb 2017 11:42:56 +0100 Message-ID: <20170224114256.186222f0@platinum> References: <1484153524-19337-1-git-send-email-olivier.matz@6wind.com> <6A0DE07E22DDAD4C9103DF62FEBC09093B56823A@shsmsx102.ccr.corp.intel.com> <6A0DE07E22DDAD4C9103DF62FEBC09093B56833D@shsmsx102.ccr.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: "Lu, Wenzhuo" , "dev@dpdk.org" , "Zhang, Helin" , "Ananyev, Konstantin" , "stable@dpdk.org" , "David Marchand" To: "fengtian Guo" Return-path: Received: from mail-wm0-f41.google.com (mail-wm0-f41.google.com [74.125.82.41]) by dpdk.org (Postfix) with ESMTP id F3BF82BB2 for ; Fri, 24 Feb 2017 11:42:59 +0100 (CET) Received: by mail-wm0-f41.google.com with SMTP id 196so7925000wmm.1 for ; Fri, 24 Feb 2017 02:42:59 -0800 (PST) In-Reply-To: List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Hi Fengtian, On Fri, 24 Feb 2017 18:15:27 +0800, "fengtian Guo" wrote: > Hi, Wenzhuo >=20 > The attachment is test report without product. The test report uses is a use-case with 6WINDGate, so it cannot be reproduced by Intel guys. I'll see how to reproduce the same case with testpmd and send an update. Thanks, Olivier >=20 > =20 > ------------------ Original ------------------ > From: "Lu, Wenzhuo"; > Date: Fri, Feb 24, 2017 04:54 PM > To: "fengtian Guo"; "Olivier > Matz"; "dev@dpdk.org"; "Zhang, > Helin"; "Ananyev, > Konstantin"; Cc: > "stable@dpdk.org"; "David > Marchand"; Subject: RE: Re:RE: [dpdk-dev] > [PATCH] net/ixgbevf: reset hardware whenstoppingport >=20 > =20 > =20 > Hi Fengtian, > =20 > Would you like to let us know how you validate this patch? As I=E2=80=99ve > tried just stop -> start VF can make it work again after PF down -> > up. Thanks.=20 > =20 > =20 > =20 > From: fengtian.guo@6wind.com.cn [mailto:fengtian.guo@6wind.com.cn] On > Behalf Of fengtian Guo Sent: Friday, February 24, 2017 4:47 PM > To: Lu, Wenzhuo; Olivier Matz; dev@dpdk.org; Zhang, Helin; Ananyev, > Konstantin Cc: stable@dpdk.org; David Marchand > Subject: Re:RE: [dpdk-dev] [PATCH] net/ixgbevf: reset hardware when > stoppingport=20 > =20 > =20 > =20 > =20 > Hi, Wenzhuo > =20 > Sorry, Now I just notice the email is related with me. > =20 > > 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. =20 > =20 > Explain the problem of this issue. > 1) it seems VF have to call ixgbe_reset_hw() when it receive PF > reset event. it seems VF is client and PF is server and VF has to > reset the register on his side, after PF has reset the register on > his side. 2) with this patch, when VF receive the event after PF is > set link down, it will call ixgbe_reset_hw() in ixgbevf_dev_close(). > and we have validate this patch=20 > =20 > Thanks > Fengtian > =20 > =20 > =20 > =20 > =20 > =20 > =20 > ------------------ Original ------------------ > =20 > =20 > From: "Lu, Wenzhuo"; > =20 > =20 > Date: Fri, Feb 24, 2017 01:21 PM > =20 > =20 > To: "Olivier Matz"; > "dev@dpdk.org"; "Zhang, Helin"; > "Ananyev, Konstantin";=20 > Cc: "Guo Fengtian"; > "stable@dpdk.org"; "David > Marchand";=20 > Subject: RE: [dpdk-dev] [PATCH] net/ixgbevf: reset hardware when > stoppingport=20 > =20 > =20 > =20 > =20 > =20 > Hi Olivier, Fengtian, > =20 > =20 > > -----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 > >=20 > > From: Guo Fengtian > >=20 > > When PF triggers a reset, VF port must acknowledge it by calling > > ixgbe_reset_hw(). > >=20 > > Before this patch, the port link status, speed and duplex are > > invalid (all set to 0). > >=20 > > 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. > >=20 > > Fixes: f0160874c041 ("ixgbe: various updates") > >=20 > > CC: stable@dpdk.org > > Signed-off-by: Guo Fengtian > > Signed-off-by: David Marchand > > Signed-off-by: Olivier Matz > > --- > >=20 > > Hi, > >=20 > > The use case for this problem was described some time ago, see: > > http://dpdk.org/ml/archives/dev/2015-December/030067.html > >=20 > > 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 > >=20 > > Regards, > > Olivier =20 > 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.=20 > >=20 > >=20 > > drivers/net/ixgbe/ixgbe_ethdev.c | 5 +---- > > 1 file changed, 1 insertion(+), 4 deletions(-) > >=20 > > 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(); > >=20 > > ixgbevf_intr_disable(hw); > > + ixgbe_reset_hw(hw); > >=20 > > hw->adapter_stopped =3D 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 =3D IXGBE_DEV_PRIVATE_TO_HW(dev->data- =20 > > >dev_private); =20 > > - > > PMD_INIT_FUNC_TRACE(); > >=20 > > - ixgbe_reset_hw(hw); > > - > > ixgbevf_dev_stop(dev); > >=20 > > ixgbe_dev_free_queues(dev); > > -- > > 2.8. =20