From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 270A25922 for ; Tue, 5 Jul 2016 15:04:42 +0200 (CEST) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga101.fm.intel.com with ESMTP; 05 Jul 2016 06:04:39 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.26,579,1459839600"; d="scan'208";a="134115090" Received: from nnguy21-mobl3.ccr.corp.intel.com (HELO [10.255.149.189]) ([10.255.149.189]) by fmsmga004.fm.intel.com with ESMTP; 05 Jul 2016 06:04:36 -0700 To: Pablo de Lara , dev@dpdk.org References: <1467643848-14780-1-git-send-email-pablo.de.lara.guarch@intel.com> Cc: john.mcnamara@intel.com From: Ferruh Yigit Message-ID: <577BB05B.3070203@intel.com> Date: Tue, 5 Jul 2016 14:04:27 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 MIME-Version: 1.0 In-Reply-To: <1467643848-14780-1-git-send-email-pablo.de.lara.guarch@intel.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit 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: Tue, 05 Jul 2016 13:04:43 -0000 On 7/4/2016 3:50 PM, Pablo de Lara wrote: > In order to create a virtual device, user needs to call > rte_eal_vdev_init generally, but this function returns 0 > on success or negative number if error. Instead, something > more useful would be to return the port or device id of the > device created, so the user can call rte_eal_vdev_init > function and use the device straight away, using the id returned > by the function. > > Signed-off-by: Pablo de Lara > --- > doc/guides/rel_notes/deprecation.rst | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst > index f502f86..60cc7c7 100644 > --- a/doc/guides/rel_notes/deprecation.rst > +++ b/doc/guides/rel_notes/deprecation.rst > @@ -41,3 +41,8 @@ Deprecation Notices > * The mempool functions for single/multi producer/consumer are deprecated and > will be removed in 16.11. > It is replaced by rte_mempool_generic_get/put functions. > + > +* 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 has been > + initialized successfully, so user can use the returned value straight away > + to call all the device functions that require that parameter. > Hi Pablo, 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 just would like remind it in case that works for you, since what rte_eth_dev_attach() does sounds like what is targeted with this API change. Thanks, ferruh