From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 061B6ADE2 for ; Thu, 23 Jun 2016 02:45:59 +0200 (CEST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP; 22 Jun 2016 17:45:59 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.26,509,1459839600"; d="scan'208";a="1007804214" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by fmsmga002.fm.intel.com with ESMTP; 22 Jun 2016 17:45:59 -0700 Received: from fmsmsx119.amr.corp.intel.com (10.18.124.207) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.248.2; Wed, 22 Jun 2016 17:45:59 -0700 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by FMSMSX119.amr.corp.intel.com (10.18.124.207) with Microsoft SMTP Server (TLS) id 14.3.248.2; Wed, 22 Jun 2016 17:45:58 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.147]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.8]) with mapi id 14.03.0248.002; Thu, 23 Jun 2016 08:45:56 +0800 From: "Lu, Wenzhuo" To: Jerin Jacob , Thomas Monjalon CC: "dev@dpdk.org" , "Ananyev, Konstantin" , Stephen Hemminger , "Richardson, Bruce" , "Chen, Jing D" , "Liang, Cunming" , "Wu, Jingjing" , "Zhang, Helin" Thread-Topic: [dpdk-dev] [PATCH v6 1/4] lib/librte_ether: support device reset Thread-Index: AQHRyrx6NqZsK6LoQ0Kr0EDRoXtySZ/xjKGAgAB2MwCAAMH0gIAAqwkw//+UC4CAAIsykP//irIAgAAIkQCAABmdAIAAJRoAgAAFmQCAAAkYgIAAB1CAgAE5dBD//5INgAASMuVg//+JcoD//22SwIAAsrIA//9zMjCAAKtmAIAABPIA//942+AAEwcbgAADyN+A//6WufA= Date: Thu, 23 Jun 2016 00:45:56 +0000 Message-ID: <6A0DE07E22DDAD4C9103DF62FEBC090903489D91@shsmsx102.ccr.corp.intel.com> References: <20160621133041.GA7509@localhost.localdomain> <6749084.arHGZf8DkE@xps13> <6A0DE07E22DDAD4C9103DF62FEBC09090348995A@shsmsx102.ccr.corp.intel.com> <6984459.KfxJSr4bsX@xps13> <20160622110642.GA12751@localhost.localdomain> In-Reply-To: <20160622110642.GA12751@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: Thu, 23 Jun 2016 00:46:00 -0000 Hi Jerin, > -----Original Message----- > From: Jerin Jacob [mailto:jerin.jacob@caviumnetworks.com] > Sent: Wednesday, June 22, 2016 7:07 PM > To: Thomas Monjalon > Cc: Lu, Wenzhuo; dev@dpdk.org; Ananyev, Konstantin; Stephen Hemminger; > Richardson, Bruce; Chen, Jing D; Liang, Cunming; Wu, Jingjing; Zhang, Hel= in > Subject: Re: [dpdk-dev] [PATCH v6 1/4] lib/librte_ether: support device r= eset >=20 > On Wed, Jun 22, 2016 at 11:18:21AM +0200, Thomas Monjalon wrote: > > 2016-06-22 08:25, Lu, Wenzhuo: > > > From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com] > > > > 2016-06-22 13:29, Jerin Jacob: > > > > > Thomas, > > > > > As a librte_ether maintainer any comments on this? > > > > > > > > +1 for adding details and make sure naming is good. > > > > I don't really need to comment here because I have already done > > > > this comment > > > > earlier: > > > > http://dpdk.org/ml/archives/dev/2016-June/041845.html > > > > Thank you for insisting. > > > I've add some details in this patch set. If it's not enough, please l= et me know. > > > And I think this discussion is about what the API name should be like= . Actually > I think all the existing name is describing what is done by the API not w= hen and > where it should be used, like dev_start/stop. > > > > You're right, I overlooked it: > > > > + * The API will stop the port, clear the rx/tx queues, re-setup the > > + rx/tx > > + * queues, restart the port. > > > > Jerin, which detail do you think is needed? >=20 > When to use what ? In what scenarios application need to use generic stop= /start > vs this new API? I'll add more explanation. Actually I've written an example. But after disc= ussion we agree it's not a good idea to add a totally new example just for = one function. I'm thinking about now to fuse this example into testpmd. >=20 > How about calling it as rte_eth_dev_restart() ? Sounds good :) >=20 > If existing stop and then start is same the new API in functional perspec= tive, How > about having generic implementation of rte_eth_dev_restart() if PMD speci= fic > restart handlers are NOT found. Good suggestion, thanks. >=20 > That why application need to call only rte_eth_dev_restart() for port res= tart. It > can internally decide optimized stop/start or generic restart >=20 > Jerin >=20 > > > > Wenzhuo, why this function is needed? > > All these actions are already possible independently. > > When looking at ixgbe implementation, I see: > > ixgbevf_dev_stats_reset() which is not documented in the API > > rte_delay_ms(1000); > > do {} while > > It looks to be some hacks. > > If you really need some workarounds to handle some tricky situations, > > maybe that the API is not detailed enough. > > > > > But anyway I'm open for changing the name. Is the name process_reset_= intr > you prefer? Thanks. > > > > Not sure. > > If you really intend to add a generic reset, maybe rte_eth_dev_reset() > > is a good name. We just need more justification. > > After reading the doc, the user can understand it is just a wrapper of > > existing functions. But it appears in the code that it does more and > > can help in some situations.