From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jerin Jacob Subject: Re: [PATCH v6 1/4] lib/librte_ether: support device reset Date: Wed, 22 Jun 2016 11:40:02 +0530 Message-ID: <20160622061000.GA8698@localhost.localdomain> References: <20160621105751.GA737@localhost.localdomain> <2601191342CEEE43887BDE71AB97725836B74226@irsmsx105.ger.corp.intel.com> <20160621133041.GA7509@localhost.localdomain> <2601191342CEEE43887BDE71AB97725836B7433B@irsmsx105.ger.corp.intel.com> <20160621142924.GA8670@localhost.localdomain> <6A0DE07E22DDAD4C9103DF62FEBC09090348971F@shsmsx102.ccr.corp.intel.com> <20160622023745.GA4437@localhost.localdomain> <6A0DE07E22DDAD4C9103DF62FEBC0909034897FC@shsmsx102.ccr.corp.intel.com> <20160622041431.GA6219@localhost.localdomain> <6A0DE07E22DDAD4C9103DF62FEBC090903489838@shsmsx102.ccr.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Cc: "Ananyev, Konstantin" , Stephen Hemminger , "dev@dpdk.org" , "Richardson, Bruce" , "Chen, Jing D" , "Liang, Cunming" , "Wu, Jingjing" , "Zhang, Helin" , "thomas.monjalon@6wind.com" To: "Lu, Wenzhuo" Return-path: Received: from na01-by2-obe.outbound.protection.outlook.com (mail-by2on0066.outbound.protection.outlook.com [207.46.100.66]) by dpdk.org (Postfix) with ESMTP id 5A132ADE0 for ; Wed, 22 Jun 2016 08:10:29 +0200 (CEST) Content-Disposition: inline In-Reply-To: <6A0DE07E22DDAD4C9103DF62FEBC090903489838@shsmsx102.ccr.corp.intel.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Wed, Jun 22, 2016 at 05:05:14AM +0000, Lu, Wenzhuo wrote: > > > > -----Original Message----- > > From: Jerin Jacob [mailto:jerin.jacob@caviumnetworks.com] > > Sent: Wednesday, June 22, 2016 12:15 PM > > To: Lu, Wenzhuo > > Cc: Ananyev, Konstantin; Stephen Hemminger; dev@dpdk.org; Richardson, > > Bruce; Chen, 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 reset > > > > On Wed, Jun 22, 2016 at 03:32:16AM +0000, Lu, Wenzhuo wrote: > > > Lost here. I think these RTE_ETH_EVENTs are used to connect the APP call > > back functions with the events. > > > Actually I want the APP to register a callback function reset_event_callback for > > the reset event. Like this, > > > /* register reset interrupt callback */ > > > rte_eth_dev_callback_register(portid, > > > RTE_ETH_EVENT_INTR_RESET, reset_event_callback, > > NULL); And when the > > > VF driver finds PF link down/up, it should use > > _rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_RESET) to run into > > the callback which is provided by APP. Means reset_event_callback here. > > > > me too. Their is existing RTE_ETH_EVENT_INTR_RESET event to notify the PF > > reset.I guess it is not for the PF link change or it isfor generic VF reset request > > initiated by PF for everything. > I think this event is for device reset not only for PF but also can for VF. I think we can use this event when the driver want the APP to reset the device. The PF link down/up caused VF reset is one of the cases. Then please correct description for the RTE_ETH_EVENT_INTR_RESET in lib/librte_ether/rte_ethdev.h "/**< reset interrupt event, sent to VF on PF reset */" > > > > > file: lib/librte_ether/rte_ethdev.h > > RTE_ETH_EVENT_INTR_RESET, > > /**< reset interrupt event, sent to VF on PF reset */ > > ^^^^^^^^^^^^^^^^^^^^^^^^^^^ > > > > if application need to call rte_ethdev_reset() on RTE_ETH_EVENT_INTR_RESET > > event then please mention it commit log or API description. > Good suggestion. I'll try to find where's the good place to add more explanation. I guess then reset API can be changed to rte_ethdev_process_reset_intr() or similar to reflect the use case(API called by application on reset event from PF) The PMDs were PF does not generate the RTE_ETH_EVENT_INTR_RESET to VF then VF's reset PMD callback shall be a 'nop' Jerin > > >