[dpdk-dev] [PATCH 6/7] eal: add struct rte_vdev_device

Ferruh Yigit ferruh.yigit at intel.com
Wed Feb 15 18:11:40 CET 2017


On 2/15/2017 10:02 AM, Jan Blunck wrote:
> This adds the rte_vdev_device structure which embeds a generic rte_device.
> 
> Signed-off-by: Jan Blunck <jblunck at infradead.org>

<...>

>  
> +struct rte_vdev_device {
> +	TAILQ_ENTRY(rte_vdev_device) next;      /**< Next attached vdev */
> +	struct rte_device device;               /**< Inherit core device */

What do you think adding a name field here ?

"dev->device.devargs->virt.drv_name" used a few times, since probing
virtual devices done based on name.

This is device name, and accessing it via "devargs->virt.drv_name" is
not that clear. It is possible to create a name field here, set it
during probe or init to point devargs field and use it wherever
required, does it make sense?

> +};
> +
>  /** Double linked list of virtual device drivers. */
>  TAILQ_HEAD(vdev_driver_list, rte_vdev_driver);
>  
> 



More information about the dev mailing list