From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 461016CA5 for ; Wed, 6 Jul 2016 12:59:10 +0200 (CEST) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga101.jf.intel.com with ESMTP; 06 Jul 2016 03:59:09 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.28,318,1464678000"; d="scan'208";a="841416403" Received: from irsmsx106.ger.corp.intel.com ([163.33.3.31]) by orsmga003.jf.intel.com with ESMTP; 06 Jul 2016 03:59:08 -0700 Received: from irsmsx108.ger.corp.intel.com ([169.254.11.125]) by IRSMSX106.ger.corp.intel.com ([169.254.8.145]) with mapi id 14.03.0248.002; Wed, 6 Jul 2016 11:59:06 +0100 From: "De Lara Guarch, Pablo" To: "De Lara Guarch, Pablo" , Thomas Monjalon , "Yigit, Ferruh" CC: "dev@dpdk.org" , "Mcnamara, John" Thread-Topic: [dpdk-dev] [PATCH] doc: announce API change for virtual device initialization Thread-Index: AQHR1gM7WKlhp8QYAEuvJkVCkRWU8KAJvrqAgAAJh4CAACR80IABUMrg Date: Wed, 6 Jul 2016 10:59:05 +0000 Message-ID: References: <1467643848-14780-1-git-send-email-pablo.de.lara.guarch@intel.com> <577BB05B.3070203@intel.com> <2208144.gyRL4FDPKl@xps13> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNDJkZGM2ZDUtYWU3NC00YWEyLWE4NWQtOGI1NjU3OTdhOTgzIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6IkNlRHRYVXNQMDdaNzl5TlRqXC9HN01qcm1OZVVVRWxzaURFRU5ucUZIUW4wPSJ9 x-ctpclassification: CTP_IC x-originating-ip: [163.33.239.181] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] doc: announce API change for virtual device initialization 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, 06 Jul 2016 10:59:10 -0000 > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of De Lara Guarch, > Pablo > Sent: Tuesday, July 05, 2016 3:55 PM > To: Thomas Monjalon; Yigit, Ferruh > Cc: dev@dpdk.org; Mcnamara, John > Subject: Re: [dpdk-dev] [PATCH] doc: announce API change for virtual devi= ce > initialization >=20 >=20 >=20 > > -----Original Message----- > > From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com] > > Sent: Tuesday, July 05, 2016 2:39 PM > > To: Yigit, Ferruh > > Cc: dev@dpdk.org; De Lara Guarch, Pablo; Mcnamara, John > > Subject: Re: [dpdk-dev] [PATCH] doc: announce API change for virtual de= vice > > initialization > > > > 2016-07-05 14:04, Ferruh Yigit: > > > On 7/4/2016 3:50 PM, Pablo de Lara wrote: > > > > +* The rte_eal_vdev_init function will be changed in 16.11 to retur= n > > > > + the port/device id of the device created, instead of 0, when it = has > been > > > > + initialized successfully, so user can use the returned value str= aight > away > > > > + to call all the device functions that require that parameter. > > > > > > There is another API rte_eth_dev_attach(), which returns port_id, and= is > > > a common wrapper both for pdev and vdev. > > > So with proper devargs this API calls rte_eal_vdev_init() and returns > > > port_id (set in argument) without any extra side effect. > > > > I think rte_eth_dev_attach() should be removed from ethdev. > > Hotplugging a device belongs to device management, i.e. EAL. >=20 > Even though rte_eth_dev_attach returns the port id, I think that > rte_eal_vdev_init > can return the port id anyway (and then, we can remove the call to > rte_eth_dev_get_port_by_name > in rte_eth_dev_attach). Also, that function is only applicable to Ethernet devices, so other devices like Crypto devices cannot be used. If we want to use that function for all devices, we should move it to eal, modify it slightly and rename it, and therefore, we will need a deprecation notice as well.