From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id 0C7312B88; Fri, 24 Feb 2017 06:21:50 +0100 (CET) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga105.fm.intel.com with ESMTP; 23 Feb 2017 21:21:49 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.35,200,1484035200"; d="scan'208";a="229150749" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by fmsmga004.fm.intel.com with ESMTP; 23 Feb 2017 21:21:49 -0800 Received: from fmsmsx156.amr.corp.intel.com (10.18.116.74) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.248.2; Thu, 23 Feb 2017 21:21:49 -0800 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by fmsmsx156.amr.corp.intel.com (10.18.116.74) with Microsoft SMTP Server (TLS) id 14.3.248.2; Thu, 23 Feb 2017 21:21:49 -0800 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.88]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.132]) with mapi id 14.03.0248.002; Fri, 24 Feb 2017 13:21:47 +0800 From: "Lu, Wenzhuo" To: Olivier Matz , "dev@dpdk.org" , "Zhang, Helin" , "Ananyev, Konstantin" CC: Guo Fengtian , "stable@dpdk.org" , David Marchand Thread-Topic: [dpdk-dev] [PATCH] net/ixgbevf: reset hardware when stopping port Thread-Index: AQHSbCzXKKc4LhcD4Uu5jb4PDGnVnKF34cDA Date: Fri, 24 Feb 2017 05:21:46 +0000 Message-ID: <6A0DE07E22DDAD4C9103DF62FEBC09093B56823A@shsmsx102.ccr.corp.intel.com> References: <1484153524-19337-1-git-send-email-olivier.matz@6wind.com> In-Reply-To: <1484153524-19337-1-git-send-email-olivier.matz@6wind.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH] net/ixgbevf: reset hardware when stopping port 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: Fri, 24 Feb 2017 05:21:51 -0000 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 por= t >=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 (al= l 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 stat= us 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 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.=20 Moving the hw_reset from close to stop doesn't help and not necessary. Beca= use PF has already reset VF stuff during resetting itself, that's why VF n= ot working anymore. >=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- > >dev_private); > - > PMD_INIT_FUNC_TRACE(); >=20 > - ixgbe_reset_hw(hw); > - > ixgbevf_dev_stop(dev); >=20 > ixgbe_dev_free_queues(dev); > -- > 2.8.1