* [dpdk-dev] [PATCH v2] eventdev: event device to contain rte device holder
@ 2017-03-03 15:33 Nipun Gupta
2017-03-07 6:50 ` Jerin Jacob
2017-03-13 8:50 ` Jerin Jacob
0 siblings, 2 replies; 3+ messages in thread
From: Nipun Gupta @ 2017-03-03 15:33 UTC (permalink / raw)
To: dev
Cc: hemant.agrawal, jerin.jacob, bruce.richardson, gage.eads,
harry.van.haaren, shreyansh.jain, Nipun Gupta
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.
Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>
---
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);
skel->reg_base = (uintptr_t)pci_dev->mem_resource[0].addr;
if (!skel->reg_base) {
diff --git a/lib/librte_eventdev/rte_eventdev.c b/lib/librte_eventdev/rte_eventdev.c
index 68bfc3b..b8be5da 100644
--- a/lib/librte_eventdev/rte_eventdev.c
+++ b/lib/librte_eventdev/rte_eventdev.c
@@ -125,7 +125,7 @@
dev_info->dequeue_timeout_ns = dev->data->dev_conf.dequeue_timeout_ns;
- dev_info->pci_dev = dev->pci_dev;
+ dev_info->dev = dev->dev;
if (dev->driver)
dev_info->driver_name = dev->driver->pci_drv.driver.name;
return 0;
@@ -1196,7 +1196,7 @@ struct rte_eventdev *
"device data");
}
- eventdev->pci_dev = pci_dev;
+ eventdev->dev = &pci_dev->device;
eventdev->driver = eventdrv;
/* Invoke PMD device initialization function */
@@ -1250,7 +1250,7 @@ struct rte_eventdev *
/* Free event device */
rte_event_pmd_release(eventdev);
- eventdev->pci_dev = NULL;
+ eventdev->dev = NULL;
eventdev->driver = NULL;
return 0;
diff --git a/lib/librte_eventdev/rte_eventdev.h b/lib/librte_eventdev/rte_eventdev.h
index 7073987..6140078 100644
--- a/lib/librte_eventdev/rte_eventdev.h
+++ b/lib/librte_eventdev/rte_eventdev.h
@@ -330,7 +330,7 @@
*/
struct rte_event_dev_info {
const char *driver_name; /**< Event driver name */
- struct rte_pci_device *pci_dev; /**< PCI information */
+ struct rte_device *dev; /**< Device information */
uint32_t min_dequeue_timeout_ns;
/**< Minimum supported global dequeue timeout(ns) by this device */
uint32_t max_dequeue_timeout_ns;
@@ -1059,8 +1059,8 @@ struct rte_eventdev {
/**< Pointer to device data */
const struct rte_eventdev_ops *dev_ops;
/**< Functions exported by PMD */
- struct rte_pci_device *pci_dev;
- /**< PCI info. supplied by probing */
+ struct rte_device *dev;
+ /**< Device info. supplied by probing */
const struct rte_eventdev_driver *driver;
/**< Driver for this device */
--
1.9.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-dev] [PATCH v2] eventdev: event device to contain rte device holder
2017-03-03 15:33 [dpdk-dev] [PATCH v2] eventdev: event device to contain rte device holder Nipun Gupta
@ 2017-03-07 6:50 ` Jerin Jacob
2017-03-13 8:50 ` Jerin Jacob
1 sibling, 0 replies; 3+ messages in thread
From: Jerin Jacob @ 2017-03-07 6:50 UTC (permalink / raw)
To: Nipun Gupta
Cc: dev, hemant.agrawal, bruce.richardson, gage.eads,
harry.van.haaren, shreyansh.jain
On Fri, Mar 03, 2017 at 09:03:02PM +0530, Nipun Gupta wrote:
> 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.
Does anyone have any objection on this patch? If not, I would like to
apply this patch to next-eventdev tree
>
> Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
> Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Nipun,
Looks like this patch is not sent with "--in-reply-to". Please check
the same in future patches.
> ---
> 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);
>
> skel->reg_base = (uintptr_t)pci_dev->mem_resource[0].addr;
> if (!skel->reg_base) {
> diff --git a/lib/librte_eventdev/rte_eventdev.c b/lib/librte_eventdev/rte_eventdev.c
> index 68bfc3b..b8be5da 100644
> --- a/lib/librte_eventdev/rte_eventdev.c
> +++ b/lib/librte_eventdev/rte_eventdev.c
> @@ -125,7 +125,7 @@
>
> dev_info->dequeue_timeout_ns = dev->data->dev_conf.dequeue_timeout_ns;
>
> - dev_info->pci_dev = dev->pci_dev;
> + dev_info->dev = dev->dev;
> if (dev->driver)
> dev_info->driver_name = dev->driver->pci_drv.driver.name;
> return 0;
> @@ -1196,7 +1196,7 @@ struct rte_eventdev *
> "device data");
> }
>
> - eventdev->pci_dev = pci_dev;
> + eventdev->dev = &pci_dev->device;
> eventdev->driver = eventdrv;
>
> /* Invoke PMD device initialization function */
> @@ -1250,7 +1250,7 @@ struct rte_eventdev *
> /* Free event device */
> rte_event_pmd_release(eventdev);
>
> - eventdev->pci_dev = NULL;
> + eventdev->dev = NULL;
> eventdev->driver = NULL;
>
> return 0;
> diff --git a/lib/librte_eventdev/rte_eventdev.h b/lib/librte_eventdev/rte_eventdev.h
> index 7073987..6140078 100644
> --- a/lib/librte_eventdev/rte_eventdev.h
> +++ b/lib/librte_eventdev/rte_eventdev.h
> @@ -330,7 +330,7 @@
> */
> struct rte_event_dev_info {
> const char *driver_name; /**< Event driver name */
> - struct rte_pci_device *pci_dev; /**< PCI information */
> + struct rte_device *dev; /**< Device information */
> uint32_t min_dequeue_timeout_ns;
> /**< Minimum supported global dequeue timeout(ns) by this device */
> uint32_t max_dequeue_timeout_ns;
> @@ -1059,8 +1059,8 @@ struct rte_eventdev {
> /**< Pointer to device data */
> const struct rte_eventdev_ops *dev_ops;
> /**< Functions exported by PMD */
> - struct rte_pci_device *pci_dev;
> - /**< PCI info. supplied by probing */
> + struct rte_device *dev;
> + /**< Device info. supplied by probing */
> const struct rte_eventdev_driver *driver;
> /**< Driver for this device */
>
> --
> 1.9.1
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-dev] [PATCH v2] eventdev: event device to contain rte device holder
2017-03-03 15:33 [dpdk-dev] [PATCH v2] eventdev: event device to contain rte device holder Nipun Gupta
2017-03-07 6:50 ` Jerin Jacob
@ 2017-03-13 8:50 ` Jerin Jacob
1 sibling, 0 replies; 3+ messages in thread
From: Jerin Jacob @ 2017-03-13 8:50 UTC (permalink / raw)
To: Nipun Gupta
Cc: dev, hemant.agrawal, bruce.richardson, gage.eads,
harry.van.haaren, shreyansh.jain
On Fri, Mar 03, 2017 at 09:03:02PM +0530, Nipun Gupta wrote:
> 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.
>
> Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
> Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Applied to dpdk-next-eventdev/master. Thanks.
> ---
> 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);
>
> skel->reg_base = (uintptr_t)pci_dev->mem_resource[0].addr;
> if (!skel->reg_base) {
> diff --git a/lib/librte_eventdev/rte_eventdev.c b/lib/librte_eventdev/rte_eventdev.c
> index 68bfc3b..b8be5da 100644
> --- a/lib/librte_eventdev/rte_eventdev.c
> +++ b/lib/librte_eventdev/rte_eventdev.c
> @@ -125,7 +125,7 @@
>
> dev_info->dequeue_timeout_ns = dev->data->dev_conf.dequeue_timeout_ns;
>
> - dev_info->pci_dev = dev->pci_dev;
> + dev_info->dev = dev->dev;
> if (dev->driver)
> dev_info->driver_name = dev->driver->pci_drv.driver.name;
> return 0;
> @@ -1196,7 +1196,7 @@ struct rte_eventdev *
> "device data");
> }
>
> - eventdev->pci_dev = pci_dev;
> + eventdev->dev = &pci_dev->device;
> eventdev->driver = eventdrv;
>
> /* Invoke PMD device initialization function */
> @@ -1250,7 +1250,7 @@ struct rte_eventdev *
> /* Free event device */
> rte_event_pmd_release(eventdev);
>
> - eventdev->pci_dev = NULL;
> + eventdev->dev = NULL;
> eventdev->driver = NULL;
>
> return 0;
> diff --git a/lib/librte_eventdev/rte_eventdev.h b/lib/librte_eventdev/rte_eventdev.h
> index 7073987..6140078 100644
> --- a/lib/librte_eventdev/rte_eventdev.h
> +++ b/lib/librte_eventdev/rte_eventdev.h
> @@ -330,7 +330,7 @@
> */
> struct rte_event_dev_info {
> const char *driver_name; /**< Event driver name */
> - struct rte_pci_device *pci_dev; /**< PCI information */
> + struct rte_device *dev; /**< Device information */
> uint32_t min_dequeue_timeout_ns;
> /**< Minimum supported global dequeue timeout(ns) by this device */
> uint32_t max_dequeue_timeout_ns;
> @@ -1059,8 +1059,8 @@ struct rte_eventdev {
> /**< Pointer to device data */
> const struct rte_eventdev_ops *dev_ops;
> /**< Functions exported by PMD */
> - struct rte_pci_device *pci_dev;
> - /**< PCI info. supplied by probing */
> + struct rte_device *dev;
> + /**< Device info. supplied by probing */
> const struct rte_eventdev_driver *driver;
> /**< Driver for this device */
>
> --
> 1.9.1
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-03-13 8:50 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-03 15:33 [dpdk-dev] [PATCH v2] eventdev: event device to contain rte device holder Nipun Gupta
2017-03-07 6:50 ` Jerin Jacob
2017-03-13 8:50 ` Jerin Jacob
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).