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 AB0281B566 for ; Wed, 27 Jun 2018 14:32:16 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 27 Jun 2018 05:32:15 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,278,1526367600"; d="scan'208";a="60553879" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by FMSMGA003.fm.intel.com with ESMTP; 27 Jun 2018 05:32:13 -0700 Received: from FMSMSX109.amr.corp.intel.com (10.18.116.9) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 27 Jun 2018 05:32:13 -0700 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by fmsmsx109.amr.corp.intel.com (10.18.116.9) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 27 Jun 2018 05:32:13 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.51]) by shsmsx102.ccr.corp.intel.com ([169.254.2.223]) with mapi id 14.03.0319.002; Wed, 27 Jun 2018 20:32:08 +0800 From: "Zhang, Qi Z" To: =?iso-8859-1?Q?Ga=EBtan_Rivet?= CC: "Burakov, Anatoly" , "thomas@monjalon.net" , "Ananyev, Konstantin" , "dev@dpdk.org" , "Richardson, Bruce" , "Yigit, Ferruh" , "Shelton, Benjamin H" , "Vangati, Narender" Thread-Topic: [dpdk-dev] [PATCH v4 01/24] eal: introduce one device scan Thread-Index: AQHUDRxtePLFuJXeMEWcLVSlsTW1LaRx5pwAgACQIBD//7/ZAIAB033A Date: Wed, 27 Jun 2018 12:32:07 +0000 Message-ID: <039ED4275CED7440929022BC67E706115323F389@SHSMSX103.ccr.corp.intel.com> References: <20180607123849.14439-1-qi.z.zhang@intel.com> <20180626070832.3055-1-qi.z.zhang@intel.com> <20180626070832.3055-2-qi.z.zhang@intel.com> <039ED4275CED7440929022BC67E706115323E74C@SHSMSX103.ccr.corp.intel.com> <20180626163348.ds35fttkd5easc6k@bidouze.vm.6wind.com> In-Reply-To: <20180626163348.ds35fttkd5easc6k@bidouze.vm.6wind.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNTNlOWI5NTctM2I4NC00ZjFkLTkzYTYtZWU3MzcyNTRkMTVmIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiQVJJTWV0UXRXdXdmVkl0YmlvK2FHQXhlYjdybXh1NWJBS2hQUkxJdWZBRVRpSmtLc3RrZzEzb2IxOWpnaVRSTiJ9 x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.200.100 dlp-reaction: no-action x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v4 01/24] eal: introduce one device scan 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: Wed, 27 Jun 2018 12:32:19 -0000 > -----Original Message----- > From: Ga=EBtan Rivet [mailto:gaetan.rivet@6wind.com] > Sent: Wednesday, June 27, 2018 12:34 AM > To: Zhang, Qi Z > Cc: Burakov, Anatoly ; thomas@monjalon.net; > Ananyev, Konstantin ; dev@dpdk.org; > Richardson, Bruce ; Yigit, Ferruh > ; Shelton, Benjamin H > ; Vangati, Narender > > Subject: Re: [dpdk-dev] [PATCH v4 01/24] eal: introduce one device scan >=20 > On Tue, Jun 26, 2018 at 12:26:05PM +0000, Zhang, Qi Z wrote: > > > > > > > -----Original Message----- > > > From: Burakov, Anatoly > > > Sent: Tuesday, June 26, 2018 7:48 PM > > > To: Zhang, Qi Z ; thomas@monjalon.net > > > Cc: Ananyev, Konstantin ; > > > dev@dpdk.org; Richardson, Bruce ; Yigit, > > > Ferruh ; Shelton, Benjamin H > > > ; Vangati, Narender > > > > > > Subject: Re: [PATCH v4 01/24] eal: introduce one device scan > > > > > > On 26-Jun-18 8:08 AM, Qi Zhang wrote: > > > > When hot plug a new device, it is not necessary to scan everything > > > > on the bus since the devname and devargs are already there. So new > > > > rte_bus ops "scan_one" is introduced, bus driver can implement > > > > this function to simplify the hotplug process. > > > > > > > > Signed-off-by: Qi Zhang > > > > --- > > > > > > > > > > > > > > > > > + * NULL for unsuccessful scan > > > > + */ > > > > +typedef struct rte_device *(*rte_bus_scan_one_t)(struct > > > > +rte_devargs *devargs); > > > > + > > > > +/** > > > > * Implementation specific probe function which is responsible fo= r > linking > > > > * devices on that bus with applicable drivers. > > > > * > > > > @@ -204,6 +219,7 @@ struct rte_bus { > > > > TAILQ_ENTRY(rte_bus) next; /**< Next bus object in linked list= */ > > > > const char *name; /**< Name of the bus */ > > > > rte_bus_scan_t scan; /**< Scan for devices attached to > > > bus */ > > > > + rte_bus_scan_one_t scan_one; /**< Scan one device using devargs > > > > +*/ > > > > rte_bus_probe_t probe; /**< Probe devices on bus */ > > > > rte_bus_find_device_t find_device; /**< Find a device on the bus= */ > > > > rte_bus_plug_t plug; /**< Probe single device for driver= s > > > */ > > > > > > > > > > Does changing this structure break ABI for bus drivers? > > > > For bus driver, I think yes, but I'm not sure what I should do for > > this, since this is not for application > > > > >=20 > This should be appropriately announced in advance, in general. > However, it seems there is some leeway if the new field will not move the > others and not make the structure grow (i.e. replace a padding). >=20 > There is an ABI check script that can be used. >=20 > This however breaks the bus ABI, which breaks the EAL ABI. > This is usually an issue. OK, since we are able to invoke IPC request in a separate thread and also w= ith below fix, there is no issue on the vdev->scan during hotplug on secondary. https://patches.dpdk.org/patch/41647/ ABI break is not necessary, I will withdraw patch 1 and 2.=20 Thanks Qi >=20 > More generally, I was in favor of changing the whole bus scan process to = a > per-device iteration. I was shut down on this when adding hotplug. > As a result, bus->scan() process was made to require the operation to be > idempotent. >=20 > Adding a new ops adds noise to the bus API. It should be kept as clean as > possible. This new one seems unnecessary, now that all bus scans are > idempotent (when supporting hotplug). >=20 > Regards, > -- > Ga=EBtan Rivet > 6WIND