* [dpdk-dev] [PATCH v2 1/1] eventdev: add PCI probe named convenience function
@ 2020-10-05 20:12 Timothy McDaniel
2020-10-08 16:26 ` Jerin Jacob
0 siblings, 1 reply; 4+ messages in thread
From: Timothy McDaniel @ 2020-10-05 20:12 UTC (permalink / raw)
To: Jerin Jacob; +Cc: dev, erik.g.carrillo, gage.eads, harry.van.haaren
Add new internal wrapper function for use by pci drivers as a
.probe function to attach to an event interface. Same as
rte_event_pmd_pci_probe, except the caller can specify the name.
Updated rte_event_pmd_pci_probe so as to not duplicate
code.
Signed-off-by: Timothy McDaniel <timothy.mcdaniel@intel.com>
---
lib/librte_eventdev/rte_eventdev_pmd_pci.h | 44 ++++++++++++++++++++++--------
1 file changed, 32 insertions(+), 12 deletions(-)
diff --git a/lib/librte_eventdev/rte_eventdev_pmd_pci.h b/lib/librte_eventdev/rte_eventdev_pmd_pci.h
index a3f9244..fa9954d 100644
--- a/lib/librte_eventdev/rte_eventdev_pmd_pci.h
+++ b/lib/librte_eventdev/rte_eventdev_pmd_pci.h
@@ -32,28 +32,25 @@ typedef int (*eventdev_pmd_pci_callback_t)(struct rte_eventdev *dev);
/**
* @internal
- * Wrapper for use by pci drivers as a .probe function to attach to a event
- * interface.
+ * Wrapper for use by pci drivers as a .probe function to attach to an event
+ * interface. Same as rte_event_pmd_pci_probe, except caller can specify
+ * the name.
*/
static inline int
-rte_event_pmd_pci_probe(struct rte_pci_driver *pci_drv,
- struct rte_pci_device *pci_dev,
- size_t private_data_size,
- eventdev_pmd_pci_callback_t devinit)
+rte_event_pmd_pci_probe_named(struct rte_pci_driver *pci_drv,
+ struct rte_pci_device *pci_dev,
+ size_t private_data_size,
+ eventdev_pmd_pci_callback_t devinit,
+ const char *name)
{
struct rte_eventdev *eventdev;
- char eventdev_name[RTE_EVENTDEV_NAME_MAX_LEN];
-
int retval;
if (devinit == NULL)
return -EINVAL;
- rte_pci_device_name(&pci_dev->addr, eventdev_name,
- sizeof(eventdev_name));
-
- eventdev = rte_event_pmd_allocate(eventdev_name,
+ eventdev = rte_event_pmd_allocate(name,
pci_dev->device.numa_node);
if (eventdev == NULL)
return -ENOMEM;
@@ -90,6 +87,29 @@ rte_event_pmd_pci_probe(struct rte_pci_driver *pci_drv,
/**
* @internal
+ * Wrapper for use by pci drivers as a .probe function to attach to a event
+ * interface.
+ */
+static inline int
+rte_event_pmd_pci_probe(struct rte_pci_driver *pci_drv,
+ struct rte_pci_device *pci_dev,
+ size_t private_data_size,
+ eventdev_pmd_pci_callback_t devinit)
+{
+ char eventdev_name[RTE_EVENTDEV_NAME_MAX_LEN];
+
+ rte_pci_device_name(&pci_dev->addr, eventdev_name,
+ sizeof(eventdev_name));
+
+ return rte_event_pmd_pci_probe_named(pci_drv,
+ pci_dev,
+ private_data_size,
+ devinit,
+ eventdev_name);
+}
+
+/**
+ * @internal
* Wrapper for use by pci drivers as a .remove function to detach a event
* interface.
*/
--
2.6.4
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-dev] [PATCH v2 1/1] eventdev: add PCI probe named convenience function
2020-10-05 20:12 [dpdk-dev] [PATCH v2 1/1] eventdev: add PCI probe named convenience function Timothy McDaniel
@ 2020-10-08 16:26 ` Jerin Jacob
2020-10-11 9:54 ` Jerin Jacob
0 siblings, 1 reply; 4+ messages in thread
From: Jerin Jacob @ 2020-10-08 16:26 UTC (permalink / raw)
To: Timothy McDaniel
Cc: Jerin Jacob, dpdk-dev, Erik Gabriel Carrillo, Gage Eads,
Van Haaren, Harry
On Tue, Oct 6, 2020 at 1:41 AM Timothy McDaniel
<timothy.mcdaniel@intel.com> wrote:
>
> Add new internal wrapper function for use by pci drivers as a
> .probe function to attach to an event interface. Same as
> rte_event_pmd_pci_probe, except the caller can specify the name.
>
> Updated rte_event_pmd_pci_probe so as to not duplicate
> code.
>
> Signed-off-by: Timothy McDaniel <timothy.mcdaniel@intel.com>
> ---
> lib/librte_eventdev/rte_eventdev_pmd_pci.h | 44 ++++++++++++++++++++++--------
> 1 file changed, 32 insertions(+), 12 deletions(-)
>
> * @internal
> + * Wrapper for use by pci drivers as a .probe function to attach to a event
> + * interface.
> + */
> +static inline int
> +rte_event_pmd_pci_probe(struct rte_pci_driver *pci_drv,
> + struct rte_pci_device *pci_dev,
> + size_t private_data_size,
> + eventdev_pmd_pci_callback_t devinit)
rte_event_pmd_pci_probe() added in
lib/librte_eventdev/rte_eventdev_version.map file.
Please add the new function in the map file. With above change:
Acked-by: Jerin Jacob <jerinj@marvell.com>
> +{
> + char eventdev_name[RTE_EVENTDEV_NAME_MAX_LEN];
> +
> + rte_pci_device_name(&pci_dev->addr, eventdev_name,
> + sizeof(eventdev_name));
> +
> + return rte_event_pmd_pci_probe_named(pci_drv,
> + pci_dev,
> + private_data_size,
> + devinit,
> + eventdev_name);
> +}
> +
> +/**
> + * @internal
> * Wrapper for use by pci drivers as a .remove function to detach a event
> * interface.
> */
> --
> 2.6.4
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-dev] [PATCH v2 1/1] eventdev: add PCI probe named convenience function
2020-10-08 16:26 ` Jerin Jacob
@ 2020-10-11 9:54 ` Jerin Jacob
2020-10-12 14:02 ` McDaniel, Timothy
0 siblings, 1 reply; 4+ messages in thread
From: Jerin Jacob @ 2020-10-11 9:54 UTC (permalink / raw)
To: Timothy McDaniel
Cc: Jerin Jacob, dpdk-dev, Erik Gabriel Carrillo, Gage Eads,
Van Haaren, Harry
On Thu, Oct 8, 2020 at 9:56 PM Jerin Jacob <jerinjacobk@gmail.com> wrote:
>
> On Tue, Oct 6, 2020 at 1:41 AM Timothy McDaniel
> <timothy.mcdaniel@intel.com> wrote:
> >
> > Add new internal wrapper function for use by pci drivers as a
> > .probe function to attach to an event interface. Same as
> > rte_event_pmd_pci_probe, except the caller can specify the name.
> >
> > Updated rte_event_pmd_pci_probe so as to not duplicate
> > code.
> >
> > Signed-off-by: Timothy McDaniel <timothy.mcdaniel@intel.com>
> > ---
> > lib/librte_eventdev/rte_eventdev_pmd_pci.h | 44 ++++++++++++++++++++++--------
> > 1 file changed, 32 insertions(+), 12 deletions(-)
> >
>
> > * @internal
> > + * Wrapper for use by pci drivers as a .probe function to attach to a event
> > + * interface.
> > + */
> > +static inline int
> > +rte_event_pmd_pci_probe(struct rte_pci_driver *pci_drv,
> > + struct rte_pci_device *pci_dev,
> > + size_t private_data_size,
> > + eventdev_pmd_pci_callback_t devinit)
>
>
> rte_event_pmd_pci_probe() added in
> lib/librte_eventdev/rte_eventdev_version.map file.
> Please add the new function in the map file. With above change:
>
> Acked-by: Jerin Jacob <jerinj@marvell.com>
@McDaniel, Timothy
Could you send the updated version, I would like to merge this for RC1.
>
>
>
> > +{
> > + char eventdev_name[RTE_EVENTDEV_NAME_MAX_LEN];
> > +
> > + rte_pci_device_name(&pci_dev->addr, eventdev_name,
> > + sizeof(eventdev_name));
> > +
> > + return rte_event_pmd_pci_probe_named(pci_drv,
> > + pci_dev,
> > + private_data_size,
> > + devinit,
> > + eventdev_name);
> > +}
> > +
> > +/**
> > + * @internal
> > * Wrapper for use by pci drivers as a .remove function to detach a event
> > * interface.
> > */
> > --
> > 2.6.4
> >
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-dev] [PATCH v2 1/1] eventdev: add PCI probe named convenience function
2020-10-11 9:54 ` Jerin Jacob
@ 2020-10-12 14:02 ` McDaniel, Timothy
0 siblings, 0 replies; 4+ messages in thread
From: McDaniel, Timothy @ 2020-10-12 14:02 UTC (permalink / raw)
To: Jerin Jacob
Cc: Jerin Jacob, dpdk-dev, Carrillo, Erik G, Eads, Gage, Van Haaren, Harry
> -----Original Message-----
> From: Jerin Jacob <jerinjacobk@gmail.com>
> Sent: Sunday, October 11, 2020 4:54 AM
> To: McDaniel, Timothy <timothy.mcdaniel@intel.com>
> Cc: Jerin Jacob <jerinj@marvell.com>; dpdk-dev <dev@dpdk.org>; Carrillo, Erik
> G <erik.g.carrillo@intel.com>; Eads, Gage <gage.eads@intel.com>; Van Haaren,
> Harry <harry.van.haaren@intel.com>
> Subject: Re: [dpdk-dev] [PATCH v2 1/1] eventdev: add PCI probe named
> convenience function
>
> On Thu, Oct 8, 2020 at 9:56 PM Jerin Jacob <jerinjacobk@gmail.com> wrote:
> >
> > On Tue, Oct 6, 2020 at 1:41 AM Timothy McDaniel
> > <timothy.mcdaniel@intel.com> wrote:
> > >
> > > Add new internal wrapper function for use by pci drivers as a
> > > .probe function to attach to an event interface. Same as
> > > rte_event_pmd_pci_probe, except the caller can specify the name.
> > >
> > > Updated rte_event_pmd_pci_probe so as to not duplicate
> > > code.
> > >
> > > Signed-off-by: Timothy McDaniel <timothy.mcdaniel@intel.com>
> > > ---
> > > lib/librte_eventdev/rte_eventdev_pmd_pci.h | 44
> ++++++++++++++++++++++--------
> > > 1 file changed, 32 insertions(+), 12 deletions(-)
> > >
> >
> > > * @internal
> > > + * Wrapper for use by pci drivers as a .probe function to attach to a event
> > > + * interface.
> > > + */
> > > +static inline int
> > > +rte_event_pmd_pci_probe(struct rte_pci_driver *pci_drv,
> > > + struct rte_pci_device *pci_dev,
> > > + size_t private_data_size,
> > > + eventdev_pmd_pci_callback_t devinit)
> >
> >
> > rte_event_pmd_pci_probe() added in
> > lib/librte_eventdev/rte_eventdev_version.map file.
> > Please add the new function in the map file. With above change:
> >
> > Acked-by: Jerin Jacob <jerinj@marvell.com>
>
>
> @McDaniel, Timothy
> Could you send the updated version, I would like to merge this for RC1.
>
>
> >
> >
> >
> > > +{
> > > + char eventdev_name[RTE_EVENTDEV_NAME_MAX_LEN];
> > > +
> > > + rte_pci_device_name(&pci_dev->addr, eventdev_name,
> > > + sizeof(eventdev_name));
> > > +
> > > + return rte_event_pmd_pci_probe_named(pci_drv,
> > > + pci_dev,
> > > + private_data_size,
> > > + devinit,
> > > + eventdev_name);
> > > +}
> > > +
> > > +/**
> > > + * @internal
> > > * Wrapper for use by pci drivers as a .remove function to detach a event
> > > * interface.
> > > */
> > > --
> > > 2.6.4
> > >
I will get that uploaded today.
Thanks,
Tim
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-10-12 14:02 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-05 20:12 [dpdk-dev] [PATCH v2 1/1] eventdev: add PCI probe named convenience function Timothy McDaniel
2020-10-08 16:26 ` Jerin Jacob
2020-10-11 9:54 ` Jerin Jacob
2020-10-12 14:02 ` McDaniel, Timothy
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).