From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from na01-bn1-obe.outbound.protection.outlook.com (mail-bn1bon0083.outbound.protection.outlook.com [157.56.111.83]) by dpdk.org (Postfix) with ESMTP id A02188D3D for ; Wed, 22 Jun 2016 09:59:54 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=BBBjnK+ISXv2LkWJg/lr05OdLSyr9Ay4hOjSSsk+2j4=; b=mzFnQ+Dw4aTalHJKT+iFHR6Lxt6CjJ0GcUBrop3vO5GKTff6nZkR705FygbLrarG6CrUi7TDOcSKN0yXb7MS6ircy9r3Bw/xKA2Feqr79PVjFd3vix7eMPBBogNmH72XRfnKrNBIcA36PCtiaUdVUm8PcM16CdJrl2uqmoQUKko= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerin.Jacob@cavium.com; Received: from localhost.localdomain (122.171.34.83) by BY1PR0701MB1723.namprd07.prod.outlook.com (10.162.111.142) with Microsoft SMTP Server (TLS) id 15.1.523.12; Wed, 22 Jun 2016 07:59:48 +0000 Date: Wed, 22 Jun 2016 13:29:32 +0530 From: Jerin Jacob 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" Message-ID: <20160622075930.GA2577@localhost.localdomain> References: <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> <20160622061000.GA8698@localhost.localdomain> <6A0DE07E22DDAD4C9103DF62FEBC09090348987B@shsmsx102.ccr.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <6A0DE07E22DDAD4C9103DF62FEBC09090348987B@shsmsx102.ccr.corp.intel.com> User-Agent: Mutt/1.6.1 (2016-04-27) X-Originating-IP: [122.171.34.83] X-ClientProxiedBy: MAXPR01CA0067.INDPRD01.PROD.OUTLOOK.COM (10.164.146.167) To BY1PR0701MB1723.namprd07.prod.outlook.com (10.162.111.142) X-MS-Office365-Filtering-Correlation-Id: de56c01b-1c50-4422-87fd-08d39a7330f3 X-Microsoft-Exchange-Diagnostics: 1; BY1PR0701MB1723; 2:PD8vI5eXz4XxdJcMJmPfWnfpsVEw/nGhLLHkhfQTdFobx8fG7bTjwsboLv7dSFjUWJar1F2uAMQ9/kHmv3b8tRmmyjRKOahU9B0i74AK4T/gKHy3FMNUYLnYtEJKRa9FDKxnXhUqsMj0CVNhBP505xaBkb47nfN+O46D7hT9aHFPkVnt0cZjafGkRhsbLE6C; 3:1mQFhX6fG7jTQgoOVadOr9s8E409Sqxj9MAROe1qfW3W5zvQO1dolD5cParZuqINLEytm1j1bP0C8TDz+wzxN/jGnjBd2mle2lyL79hnalbcZzRRTpfHVo8i4AatCs4n; 25:sCrjvXT+m1j7ZS9gGUQC6iYu5D934anTewzorn0xmJYPYuhiPNB7WNZz44qBrEbltvzgAfcyGI/XTz/dMoRiXpOXruOrm94gFpM80HtuvCjUDpOFgxMfPPcdDQH2NxtYze2IOTYc0//94+5pR40QN4x02GFnYvZ42/ebBJrhlKoKiTmYIlCyntYGWiBov+cz4LpHJD3IWbkfK1BgUJtoGC6gWDlGca5I09OTReS7YhL+WAYiX6uJdDsJVzWRN0E7OgFYyJAKVIaYhruBt7d/Gyjrc35EuDAbX4z3UsUSorC5IGQfCiULvolwy/uG4Bh4p38jC/cFZcvuLcNBOeRUBvuCrq4ddCsxhZKfWk3sK9RA4tJjUJBntbGP9oJ7s5xErCbonKKN7LrfNbDhT+0A38Lp0FAfjz0QZp0rCdPJ3vc= X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BY1PR0701MB1723; X-Microsoft-Exchange-Diagnostics: 1; BY1PR0701MB1723; 20:MnuE8eUbDVGDLWdwRrtCTwNKMLQGWgKa54HTVC8xKojKX3s/XzZDxDQUdL7/CzNnQOHdLM1C3icl2a6IWFFTXCPcyBRuGfczxAY5Db1YmJafkgTJCB9SaNjOa198Obd0541CnFBZU5ZNtfsnZBmfv5vztCpeZM9lDRAc/4SHJZiTvnDebhJzJMozu0m6R0Ci9rojY/FM3qCQJZCeY/75ZsoNhBM/nTHuwU0ba5WaGCYi0HLmCFnuAt2tmCD44QFqE3KG/m8RHIfaTbAmH84/j5D9e8+Tvm0YrQ6FdYXN+P8JwbVHJvSYYrORPof6Po0DxttrZw5OA/pxzKrA5Mh8XpJPy16oI/8iT9eoChMqeR3f76fClt1VddKB/IiVKimgOnAm1NapiYr0VWMW4BG404evoxmCkqFm9zMOy4N2AUU+aSXdeTJM6lpnM+MSAU+EpHKLXNKDwyvRbgILqq5OGh9UWzB6I6ISOSs2zMgs7U4un/SgUxgBsDsiGjaE3x67xj0zAnLLZC3mhP+whtJxVolsIN/Air/Fvi2C+A5HdMSpZFyPCq5OIMyCLlZ+WlZpTQ1PP6vFKXvtn98Srso1C0sUrf189K4xpSD5jbxoLTk= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(244540007438412)(21532816269658); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046); SRVR:BY1PR0701MB1723; BCL:0; PCL:0; RULEID:; SRVR:BY1PR0701MB1723; X-Microsoft-Exchange-Diagnostics: 1; BY1PR0701MB1723; 4:krRCwsLjQSzPbY9uZJHZAVG8J/otsHjlsYYDyQBh3NT7ivnQmm+rLrNa+DfFxWm7hdL9+j97Xac4zU1SqMhD3VaithA61DEx2sLS9rRYIDC1y7c9rhFlXa//xUhfnNw62WmPeib/jjfPsRQLnU+Rib6kB3z5hfAAC+3CzNIn6pdF7qlW9PkG0ANuEgwpTVKzZI3NNm1AAYIol/v0PVzlLEomEmRFVCmsRlI61ClUqdkWm+NBtZT4v0PJx7z7ye8+Rc8bBFt/NlfHvABQZzugi+bPW56ZitZQAg6dfZ9tgPxvmAE6vigIrIfCLd/bmrO7B0cwQYyAybpUMyZPjszrY7ZKDIQHvgAM9jIviFn6Za/4Sht1K7wCM8km22dvojVT/8CZykf+iwHR8VuF8nC0lNa2OsNWuzDuLlioOYSCc2sPj6OMkaMcL2B3X51kx/Mw1Kswg1cH9dtMlPuZPvDKEw== X-Forefront-PRVS: 0981815F2F X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6069001)(6009001)(7916002)(377454003)(199003)(13464003)(24454002)(189002)(83506001)(42186005)(101416001)(33656002)(106356001)(61506002)(9686002)(1076002)(110136002)(7846002)(97756001)(105586002)(586003)(2906002)(7736002)(46406003)(189998001)(47776003)(23726003)(50466002)(68736007)(81166006)(54356999)(81156014)(76176999)(50986999)(97736004)(3846002)(4326007)(19580405001)(8676002)(4001350100001)(66066001)(93886004)(19580395003)(77096005)(92566002)(2950100001)(6116002); DIR:OUT; SFP:1101; SCL:1; SRVR:BY1PR0701MB1723; H:localhost.localdomain; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BY1PR0701MB1723; 23:SxjrOCdeWI0qWLQsx++bKfSPcNsoUFMrCXIaJTk?= =?us-ascii?Q?0qYRwo7VTHd+podGkcnry/P2wX2ZE+cq7jmurAi6rcrepduq8DOBP1c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bgkX/753aX5xY095aCA4n8Fdw4/D45C2oiJdDZ3Qzo71Ze7UGsBZ+0XEiLMl0LcZY5TBqsw0ZCXKB4KYqb0HGhabYoDq5KitUDJtUaJdN6vhK16G1suU2XqLyKITNh2p9mG8i4z7CQ== SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Jun 2016 07:59:48.9835 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR0701MB1723 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: Wed, 22 Jun 2016 07:59:55 -0000 On Wed, Jun 22, 2016 at 06:42:43AM +0000, Lu, Wenzhuo wrote: > Hi Jerin, > > > > -----Original Message----- > > From: Jerin Jacob [mailto:jerin.jacob@caviumnetworks.com] > > Sent: Wednesday, June 22, 2016 2:10 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 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 > But I don't think it's appropriate to bind the RTE_ETH_EVENTs with the APIs. This patch set provide a reset API to reset the device. Don't mean this reset API only can be used when the APP hit the event RTE_ETH_EVENT_INTR_RESET. I can add some comments to suggest the user to call the reset API at that time. But I think APP can call the reset API anytime when it thinks it's necessary. So I don't like the name *process_reset_intr*, it hints that this API is only for the INTR_RESET event. That's where scope of API and PMD implementation its not getting clear. Can you tell me any other use case where we need to call this API from application. The name rte_ethdev_reset() is too generic. If you are going with that generic name then you may need add lot of details in API description. Thomas, As a librte_ether maintainer any comments on this? > > > > > > > > > >