From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 1C5406CAA for ; Tue, 21 Jun 2016 08:14:32 +0200 (CEST) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga101.jf.intel.com with ESMTP; 20 Jun 2016 23:14:32 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.26,502,1459839600"; d="scan'208";a="125772454" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by fmsmga004.fm.intel.com with ESMTP; 20 Jun 2016 23:14:31 -0700 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.248.2; Mon, 20 Jun 2016 23:14:31 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.147]) by SHSMSX104.ccr.corp.intel.com ([169.254.5.116]) with mapi id 14.03.0248.002; Tue, 21 Jun 2016 14:14:30 +0800 From: "Lu, Wenzhuo" To: Jerin Jacob , Stephen Hemminger CC: "dev@dpdk.org" , "Ananyev, Konstantin" , "Richardson, Bruce" , "Chen, Jing D" , "Liang, Cunming" , "Wu, Jingjing" , "Zhang, Helin" , "thomas.monjalon@6wind.com" Thread-Topic: [dpdk-dev] [PATCH v6 1/4] lib/librte_ether: support device reset Thread-Index: AQHRyrx6NqZsK6LoQ0Kr0EDRoXtySZ/xjKGAgAB2MwCAAMH0gIAAqwkw Date: Tue, 21 Jun 2016 06:14:29 +0000 Message-ID: <6A0DE07E22DDAD4C9103DF62FEBC090903488DD1@shsmsx102.ccr.corp.intel.com> References: <1465191653-28408-1-git-send-email-wenzhuo.lu@intel.com> <1466403870-6840-1-git-send-email-wenzhuo.lu@intel.com> <1466403870-6840-2-git-send-email-wenzhuo.lu@intel.com> <20160620091410.GA9323@localhost.localdomain> <20160620091714.276c186c@xeon-e3> <20160621035124.GC4903@localhost.localdomain> In-Reply-To: <20160621035124.GC4903@localhost.localdomain> 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-dev] [PATCH v6 1/4] lib/librte_ether: support device reset X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Jun 2016 06:14:33 -0000 Hi Jerin, Stephen, > -----Original Message----- > From: Jerin Jacob [mailto:jerin.jacob@caviumnetworks.com] > Sent: Tuesday, June 21, 2016 11:51 AM > To: Stephen Hemminger > Cc: Lu, Wenzhuo; dev@dpdk.org; Ananyev, Konstantin; Richardson, Bruce; Ch= en, > Jing D; Liang, Cunming; Wu, Jingjing; Zhang, Helin; > thomas.monjalon@6wind.com > Subject: Re: [dpdk-dev] [PATCH v6 1/4] lib/librte_ether: support device r= eset >=20 > On Mon, Jun 20, 2016 at 09:17:14AM -0700, Stephen Hemminger wrote: > > On Mon, 20 Jun 2016 14:44:11 +0530 > > Jerin Jacob wrote: > > > > > On Mon, Jun 20, 2016 at 02:24:27PM +0800, Wenzhuo Lu wrote: > > > > Add an API to reset the device. > > > > It's for VF device in this scenario, kernel PF + DPDK VF. > > > > When the PF port down->up, APP should call this API to reset VF > > > > port. Most likely, APP should call it in its management thread and > > > > guarantee the thread safe. It means APP should stop the rx/tx and > > > > the device, then reset the device, then recover the device and > > > > rx/tx. > > > > > > Following is _a_ use-case for Device reset. But may be not be _the_ > > > use case. IMO, We need to first say expected behavior of this API > > > and add a use-case later. > > > > > > Other use-case would be, PCIe VF with functional level reset for > > > SRIOV migration. > > > Are we on same page? > > > > > > In my experience with Linux devices, this is normally handled by the > > device driver in the start routine. Since any use case which needs > > this is going to do a stop/reset/start sequence, why not just have the > > VF device driver do this in the start routine?. > > > > Adding yet another API and state transistion if not necessary > > increases the complexity and required test cases for all devices. >=20 > I agree with Stephen here.I think if application needs to call start afte= r the > device reset then we could add this logic in start itself rather exposing= a yet > another API Do you mean changing the device_start to include all these actions, stop de= vice -> stop queue -> re-setup queue -> start queue -> start device ? >=20 > >