From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id 070E51BEF2 for ; Wed, 4 Jul 2018 12:57:19 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 04 Jul 2018 03:57:18 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,306,1526367600"; d="scan'208";a="64365923" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by orsmga003.jf.intel.com with ESMTP; 04 Jul 2018 03:57:17 -0700 Received: from fmsmsx120.amr.corp.intel.com (10.18.124.208) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 4 Jul 2018 03:57:17 -0700 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by fmsmsx120.amr.corp.intel.com (10.18.124.208) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 4 Jul 2018 03:57:17 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.124]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.57]) with mapi id 14.03.0319.002; Wed, 4 Jul 2018 18:57:14 +0800 From: "Zhang, Qi Z" To: Thomas Monjalon CC: "dev@dpdk.org" , "Burakov, Anatoly" , "Ananyev, Konstantin" , "Richardson, Bruce" , "Yigit, Ferruh" , "Shelton, Benjamin H" , "Vangati, Narender" , "gaetan.rivet@6wind.com" Thread-Topic: [dpdk-dev] [PATCH v8 03/19] ethdev: enable hotplug on multi-process Thread-Index: AQHUEcfCBI2Nb01f+EKoUu5M4S3vPKR8u1QAgAC41gD//5GRAIAAh/dg///6RoCAAAq/AIAAvsmA///XhoAAF7jjAA== Date: Wed, 4 Jul 2018 10:57:14 +0000 Message-ID: <039ED4275CED7440929022BC67E706115324B039@shsmsx102.ccr.corp.intel.com> References: <20180607123849.14439-1-qi.z.zhang@intel.com> <6685892.NTdOAgpAes@xps> <039ED4275CED7440929022BC67E7061153249D11@shsmsx102.ccr.corp.intel.com> <3322666.pe3fEbMk70@xps> In-Reply-To: <3322666.pe3fEbMk70@xps> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMzhjODEwZjgtNDQ1NS00YmNjLWFmYjgtYWQ3N2U5NmNmMzI5IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoibmtZUW51V1VTOVpScjdWZHE1VEF6OFo0bkNkNU9uOENEWEwxR0dBQkhpQjZUTDZEejltZisrc1JiWmxRRTVMQSJ9 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="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v8 03/19] ethdev: enable hotplug on multi-process 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, 04 Jul 2018 10:57:21 -0000 > -----Original Message----- > From: Thomas Monjalon [mailto:thomas@monjalon.net] > Sent: Wednesday, July 4, 2018 3:34 PM > To: Zhang, Qi Z > Cc: dev@dpdk.org; Burakov, Anatoly ; Ananyev, > Konstantin ; Richardson, Bruce > ; Yigit, Ferruh ; She= lton, > Benjamin H ; Vangati, Narender > ; gaetan.rivet@6wind.com > Subject: Re: [dpdk-dev] [PATCH v8 03/19] ethdev: enable hotplug on > multi-process >=20 > 04/07/2018 04:26, Zhang, Qi Z: > > From: Thomas Monjalon [mailto:thomas@monjalon.net] > > > 03/07/2018 23:57, Thomas Monjalon: > > > > 03/07/2018 17:03, Zhang, Qi Z: > > > > > From: Thomas Monjalon [mailto:thomas@monjalon.net] > > > > > > 03/07/2018 14:59, Zhang, Qi Z: > > > > > > > > > +do_eth_dev_attach(const char *devargs, uint16_t > > > > > > > > > +*port_id); > > > > > > > > > > > > > > > > So you are duplicating rte_eth_dev_attach which is flawed > > > > > > > > in its design and should be deprecated... > > > > > > > > > > > > > > OK, just to know this, but I guess it will not be the issue, > > > > > > > if we move the dev > > > > > > sync mechanism into eal layer in future right? > > > > > > > > > > > > Future is now :) > > > > > > We must stop mixing devargs and port id in the same layer. > > > > > > > > > > Ok, is there any RFC I can learn? > > > > > > > > RFC for what? > > > > It is just a design issue that we must stop propagating. > > > > > > Please read at this commit, which is 2 years old: > > > http://git.dpdk.org/dpdk/commit/?id=3Db0fb26685570 > > > It was starting to fix early design mistakes, but unfortunately it > > > is not yet totally fixed today. > > > > OK, rte_eth_dev_attach is going to be deprecated. > > Do you mean we will use rte_eal_hotplug_add to attach a device > > directly, then the device driver will be responsible for propagating > > all the ethdev port, and application could register callback for > > RTE_ETH_EVENT_NEW to know new ports are created, is that correct? >=20 > Exact! > All what you describe is already implemented. >=20 > To make it clear, EAL and ethdev must stay 2 separate layers. > The bridge between these 2 layers is done only by PMDs. OK, I will move the IPC stuff from ethdev layer into eal layer in v9 Thanks! >=20 >=20 > > > > > > > > As you may have noticed, rte_eth_dev_attach() is calling > > > > > > > > rte_eal_hotplug_add() which manages the EAL device. > > > > > > > > It is wrong because the relation between an ethdev port > > > > > > > > and an EAL device is not a 1:1 mapping. > > > > > > > > We must manage the ethdev port as one of the possible > > > > > > > > abstractions of a device represented by rte_device. >=20 >=20