[dpdk-dev] [PATCH] doc: announce API change for virtual device initialization
Ferruh Yigit
ferruh.yigit at intel.com
Tue Jul 5 15:04:27 CEST 2016
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 <pablo.de.lara.guarch at intel.com>
> ---
> 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
More information about the dev
mailing list