[dpdk-dev] [PATCH] eventdev: event device to contain rte device holder

Stephen Hemminger stephen at networkplumber.org
Fri Feb 17 20:30:20 CET 2017


On Thu, 16 Feb 2017 16:22:29 +0530
Nipun Gupta <nipun.gupta at nxp.com> wrote:

> Signed-off-by: Nipun Gupta <nipun.gupta at nxp.com>
> 
> rte_device is a generic device which is available to the applications
> and EAL. This patch replaces rte_pci_device in 'struct rte_eventdev'
> and in 'struct rte_event_dev_info' with common rte_device.
> ---
>  drivers/event/skeleton/skeleton_eventdev.c | 2 +-
>  lib/librte_eventdev/rte_eventdev.c         | 6 +++---
>  lib/librte_eventdev/rte_eventdev.h         | 6 +++---
>  3 files changed, 7 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/event/skeleton/skeleton_eventdev.c b/drivers/event/skeleton/skeleton_eventdev.c
> index dee0faf..770dce3 100644
> --- a/drivers/event/skeleton/skeleton_eventdev.c
> +++ b/drivers/event/skeleton/skeleton_eventdev.c
> @@ -383,7 +383,7 @@
>  	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
>  		return 0;
>  
> -	pci_dev = eventdev->pci_dev;
> +	pci_dev = RTE_DEV_TO_PCI(eventdev->dev);

How will this work when there are more than just PCI devices?
For example, upcoming patches will add rte_vmbus_device.  There is no
run time type checking in C.


More information about the dev mailing list