From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f42.google.com (mail-wm0-f42.google.com [74.125.82.42]) by dpdk.org (Postfix) with ESMTP id 7540B2BB2 for ; Mon, 27 Feb 2017 15:21:25 +0100 (CET) Received: by mail-wm0-f42.google.com with SMTP id 196so18522620wmm.1 for ; Mon, 27 Feb 2017 06:21:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ZXaFauHWURaNdVl2WeWnURow5JP+SX+GEInbxkWlyKs=; b=IlI2ROGGqnJjzL8slJSqAyf9YHJnIY7aMPwVp7reJtOKARFKMAI8RKOzLwqKBgRb0d 6K3RiWB+87P0pTi9AGObGMIzrukdf6C4VcCM8MYDWQRbeV0nTtTgxaOWJJV9/VfGA+bC dAqw0O7ANi1eKGbxi0Ask+H9g2LS6JlznbogpAyosCRTgfx2tcSqU+QeayyXHPoU8JnO piw8uEflsdQcihhiDU+fG+q0lUOGQC12FKh5DzBTWdiLyekyAjk7ap3hqurg34WFLK1t fD4kvHiZAUg6WRsC4ORN/Vfby64CQR+g4/UBY6nMTmOeq9MDwDlKjFtSs9JQB0oVvfmR xZ8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ZXaFauHWURaNdVl2WeWnURow5JP+SX+GEInbxkWlyKs=; b=MeKI6d8oSp6byGAgfYJT3gqW+2MBtxjXA036KiRMQbn8/c9nnVxQsoHYoB+t3tW4n4 m9LKo/IKHKdKLbYpb6iIhLBEy9tqBv6KoC3ZyyN4+4S6ye3g0ePmS9+YtlLD6aqmA3Jx llkHxKg+egLecBNzoZVJBK0K6cuTOr5LRhaE4WC0aIKI4Bymx3rx4OTgyUAe2KY9/7zW KcRxnE5EREUtewU73FVe+7XPPUl9nZoA5PTx882dPwKTR97QzcVbRHJTHRRqBEUFFsHI iBpzlrLTh8hEP48RDe5A15qUUkAnV1aApdzJqJ1obdH6zHCIxyQBgDzZ5CdykOYTc+AU 6jCg== X-Gm-Message-State: AMke39nkjBIcnVew3pow9w9wWf23y6jivKNdgqIOCtdZlbRPJCZahDaIf9iqPXTP+iXAuNcb X-Received: by 10.28.217.136 with SMTP id q130mr14357692wmg.13.1488205284949; Mon, 27 Feb 2017 06:21:24 -0800 (PST) Received: from platinum (2a01cb0c03c651000226b0fffeed02fc.ipv6.abo.wanadoo.fr. [2a01:cb0c:3c6:5100:226:b0ff:feed:2fc]) by smtp.gmail.com with ESMTPSA id b17sm14475108wma.33.2017.02.27.06.21.24 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2017 06:21:24 -0800 (PST) Date: Mon, 27 Feb 2017 15:21:21 +0100 From: Olivier Matz To: "fengtian Guo" Cc: "Lu, Wenzhuo" , "dev@dpdk.org" , "Zhang, Helin" , "Ananyev, Konstantin" , "stable@dpdk.org" , "David Marchand" Message-ID: <20170227152121.0779e406@platinum> In-Reply-To: <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> <20170224114256.186222f0@platinum> X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH] net/ixgbevf: reset hardware whenstoppingport X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Feb 2017 14:21:25 -0000 Hi Wenzhuo, On Fri, 24 Feb 2017 11:42:56 +0100, Olivier Matz wrote: > Hi Fengtian, >=20 > On Fri, 24 Feb 2017 18:15:27 +0800, "fengtian Guo" > wrote: > > Hi, Wenzhuo > >=20 > > The attachment is test report without product. =20 >=20 > The test report uses is a use-case with 6WINDGate, so it cannot be > reproduced by Intel guys. >=20 > I'll see how to reproduce the same case with testpmd and send an > update. I failed to reproduce the issue with testpmd. After a deeper analysis, it turn outs that the issue we've seen is not related to the ixgbe dpdk driver. Sorry for the noise. I changed the patch status as rejected in patchwork. Thanks, Olivier >=20 > Thanks, > Olivier >=20 >=20 >=20 >=20 >=20 > >=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.r= st#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 >=20