From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <pablo.de.lara.guarch@intel.com>
Received: from mga14.intel.com (mga14.intel.com [192.55.52.115])
 by dpdk.org (Postfix) with ESMTP id 43C6C5689
 for <dev@dpdk.org>; Tue,  5 Jul 2016 16:55:05 +0200 (CEST)
Received: from fmsmga004.fm.intel.com ([10.253.24.48])
 by fmsmga103.fm.intel.com with ESMTP; 05 Jul 2016 07:55:04 -0700
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="5.26,580,1459839600"; d="scan'208";a="134172526"
Received: from irsmsx154.ger.corp.intel.com ([163.33.192.96])
 by fmsmga004.fm.intel.com with ESMTP; 05 Jul 2016 07:55:02 -0700
Received: from irsmsx108.ger.corp.intel.com ([169.254.11.125]) by
 IRSMSX154.ger.corp.intel.com ([169.254.12.28]) with mapi id 14.03.0248.002;
 Tue, 5 Jul 2016 15:55:01 +0100
From: "De Lara Guarch, Pablo" <pablo.de.lara.guarch@intel.com>
To: Thomas Monjalon <thomas.monjalon@6wind.com>, "Yigit, Ferruh"
 <ferruh.yigit@intel.com>
CC: "dev@dpdk.org" <dev@dpdk.org>, "Mcnamara, John" <john.mcnamara@intel.com>
Thread-Topic: [dpdk-dev] [PATCH] doc: announce API change for virtual device
 initialization
Thread-Index: AQHR1gM7WKlhp8QYAEuvJkVCkRWU8KAJvrqAgAAJh4CAACR80A==
Date: Tue, 5 Jul 2016 14:55:01 +0000
Message-ID: <E115CCD9D858EF4F90C690B0DCB4D8973C988EF2@IRSMSX108.ger.corp.intel.com>
References: <1467643848-14780-1-git-send-email-pablo.de.lara.guarch@intel.com>
 <577BB05B.3070203@intel.com> <2208144.gyRL4FDPKl@xps13>
In-Reply-To: <2208144.gyRL4FDPKl@xps13>
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.180]
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 <dev.dpdk.org>
List-Unsubscribe: <http://dpdk.org/ml/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://dpdk.org/ml/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <http://dpdk.org/ml/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Tue, 05 Jul 2016 14:55:05 -0000



> -----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 devi=
ce
> initialization
>=20
> 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 return
> > > +  the port/device id of the device created, instead of 0, when it ha=
s been
> > > +  initialized successfully, so user can use the returned value strai=
ght away
> > > +  to call all the device functions that require that parameter.
> >
> > There is another API rte_eth_dev_attach(), which returns port_id, and i=
s
> > 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.
>=20
> I think rte_eth_dev_attach() should be removed from ethdev.
> Hotplugging a device belongs to device management, i.e. EAL.

Even though rte_eth_dev_attach returns the port id, I think that rte_eal_vd=
ev_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).=20