From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id 0DBE423D for ; Thu, 9 Aug 2018 02:41:54 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 Aug 2018 17:41:54 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.53,212,1531810800"; d="scan'208";a="80127078" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by orsmga001.jf.intel.com with ESMTP; 08 Aug 2018 17:41:53 -0700 Received: from fmsmsx125.amr.corp.intel.com (10.18.125.40) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 8 Aug 2018 17:41:53 -0700 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by FMSMSX125.amr.corp.intel.com (10.18.125.40) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 8 Aug 2018 17:41:53 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.240]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.205]) with mapi id 14.03.0319.002; Thu, 9 Aug 2018 08:41:52 +0800 From: "Zhang, Qi Z" To: Stephen Hemminger CC: "thomas@monjalon.net" , "Ananyev, Konstantin" , "Doherty, Declan" , "Yigit, Ferruh" , "dev@dpdk.org" , "Shelton, Benjamin H" , "Vangati, Narender" , "Xing, Beilei" , "Lu, Wenzhuo" Thread-Topic: [dpdk-dev] [RFC 1/4] ethdev: claim device reset as async Thread-Index: AQHULuV1tRDFBPxq20mwuaPX/Wnw1aS1cM2AgAEgZkA= Date: Thu, 9 Aug 2018 00:41:52 +0000 Message-ID: <039ED4275CED7440929022BC67E706115327434A@SHSMSX103.ccr.corp.intel.com> References: <20180808070045.13334-1-qi.z.zhang@intel.com> <20180808081325.00df3024@xeon-e3> In-Reply-To: <20180808081325.00df3024@xeon-e3> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNDJlODViOWMtMGM4Yy00NDY0LWJhMzgtZjgxOWI5ZGVjNjY5IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiNEx4ZVdVOUNEcTRqNXFiYUs2dys4RWRKbll3NFdha2grS3hnYldWOHJcL29vckFhb0pibHFrK3h6Y2FVZWpZcXAifQ== x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.400.15 dlp-reaction: no-action 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] [RFC 1/4] ethdev: claim device reset as async X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Aug 2018 00:41:55 -0000 > -----Original Message----- > From: Stephen Hemminger [mailto:stephen@networkplumber.org] > Sent: Wednesday, August 8, 2018 11:13 PM > To: Zhang, Qi Z > Cc: thomas@monjalon.net; Ananyev, Konstantin > ; Doherty, Declan > ; Yigit, Ferruh ; > dev@dpdk.org; Shelton, Benjamin H ; > Vangati, Narender ; Xing, Beilei > ; Lu, Wenzhuo ; > 0000-cover-letter.patch@dpdk.org > Subject: Re: [dpdk-dev] [RFC 1/4] ethdev: claim device reset as async >=20 > On Wed, 8 Aug 2018 15:00:42 +0800 > Qi Zhang wrote: >=20 > > rte_eth_dev_reset should be implemented in an async way since it is > > possible be invoked in interrupt thread and sometimes to reset a > > device need to wait for some dependency, for example, a VF expects for > > PF ready, or a NIC function as part of a SOC wait for the whole system > > reset complete, all these time consuming task will block the the > > interrupt thread. > > The patch claims rte_eth_dev_reset is an async function and introduce > > a new event RTE_ETH_EVENT_RESET_COMPLETE. PMD should raise this > event > > when finish reset in background. The applicaiton should always wait > > for this event before continue to configure and restart the device. >=20 >=20 > If you have to change every driver to spawn a thread, then this doesn't s= eem > that useful. If you have to have a thread, then the base layer code in E= AL > should do it. It may not necessary for PMD which can do device reset quickly to spawn a t= hread, in that case, it just need to raise RTE_ETH_EVENT_RESET_COMPLETE in the same thread. But I agree it is better to move thread spawn and event= raise into ether layer as a standard way. >=20 > Lots of DPDK changes seem to require every driver to change (a nuisance), > and then every driver changes in the same boilerplate way (indicates poor > design choice).