DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] eventdev: remove default queue overriding
@ 2017-03-01 12:49 Harry van Haaren
  2017-03-06 13:45 ` Jerin Jacob
  2017-03-10 15:19 ` [dpdk-dev] [PATCH v2] " Harry van Haaren
  0 siblings, 2 replies; 6+ messages in thread
From: Harry van Haaren @ 2017-03-01 12:49 UTC (permalink / raw)
  To: jerin.jacob; +Cc: dev, Harry van Haaren

PMDs that only do a specific type of scheduling cannot provide
CFG_ALL_TYPES, so the Eventdev infrastructure should not demand
that every PMD supports CFG_ALL_TYPES.

By not overriding the default configuration of the queue as
suggested by the PMD, the eventdev_common unit tests can pass
on all PMDs, regardless of thier capabilities.

RTE_EVENT_QUEUE_CFG_DEFAULT is no longer used by the eventdev layer
it can be removed now. Applications should use CFG_ALL_TYPES
if they require enqueue of all types a queue.

Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
---
 lib/librte_eventdev/rte_eventdev.c | 1 -
 lib/librte_eventdev/rte_eventdev.h | 6 ------
 2 files changed, 7 deletions(-)

diff --git a/lib/librte_eventdev/rte_eventdev.c b/lib/librte_eventdev/rte_eventdev.c
index 68bfc3b..c32a776 100644
--- a/lib/librte_eventdev/rte_eventdev.c
+++ b/lib/librte_eventdev/rte_eventdev.c
@@ -593,7 +593,6 @@ rte_event_queue_setup(uint8_t dev_id, uint8_t queue_id,
 		RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->queue_def_conf,
 					-ENOTSUP);
 		(*dev->dev_ops->queue_def_conf)(dev, queue_id, &def_conf);
-		def_conf.event_queue_cfg = RTE_EVENT_QUEUE_CFG_DEFAULT;
 		queue_conf = &def_conf;
 	}
 
diff --git a/lib/librte_eventdev/rte_eventdev.h b/lib/librte_eventdev/rte_eventdev.h
index 7073987..d836f61 100644
--- a/lib/librte_eventdev/rte_eventdev.h
+++ b/lib/librte_eventdev/rte_eventdev.h
@@ -471,12 +471,6 @@ rte_event_dev_configure(uint8_t dev_id,
 /* Event queue specific APIs */
 
 /* Event queue configuration bitmap flags */
-#define RTE_EVENT_QUEUE_CFG_DEFAULT            (0)
-/**< Default value of *event_queue_cfg* when rte_event_queue_setup() invoked
- * with queue_conf == NULL
- *
- * @see rte_event_queue_setup()
- */
 #define RTE_EVENT_QUEUE_CFG_TYPE_MASK          (3ULL << 0)
 /**< Mask for event queue schedule type configuration request */
 #define RTE_EVENT_QUEUE_CFG_ALL_TYPES          (0ULL << 0)
-- 
2.7.4

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [dpdk-dev] [PATCH] eventdev: remove default queue overriding
  2017-03-01 12:49 [dpdk-dev] [PATCH] eventdev: remove default queue overriding Harry van Haaren
@ 2017-03-06 13:45 ` Jerin Jacob
  2017-03-08 12:11   ` Van Haaren, Harry
  2017-03-10 15:19 ` [dpdk-dev] [PATCH v2] " Harry van Haaren
  1 sibling, 1 reply; 6+ messages in thread
From: Jerin Jacob @ 2017-03-06 13:45 UTC (permalink / raw)
  To: Harry van Haaren; +Cc: dev

On Wed, Mar 01, 2017 at 12:49:02PM +0000, Harry van Haaren wrote:
> PMDs that only do a specific type of scheduling cannot provide
> CFG_ALL_TYPES, so the Eventdev infrastructure should not demand
> that every PMD supports CFG_ALL_TYPES.

Sure. Then I think then we can enumerate CFG_ALL_TYPES as capability.
Meaning, New flag in event_dev_cap to denote PMD can support all the sched type
per queue. My reasoning for the capability flag is because, The application flow
will be depended on the logic of creating the queue with different flags.
Thoughts ?

I thought, In SW implementation, We can create 3 virtual queues per
queue. Based on en-queue's shed_type, implementation can choose the
correct underneath virtual queue. I guess, it has performance issues,
if so, Maybe capability is the way forward.

Setting to CFG_ALL_TYPES will be useful for flow based event pipeling
as I mentioned earlier in other email.

> By not overriding the default configuration of the queue as
> suggested by the PMD, the eventdev_common unit tests can pass
> on all PMDs, regardless of thier capabilities.

Make sense. We can remove the default as CFG_ALL_TYPES.

> 
> RTE_EVENT_QUEUE_CFG_DEFAULT is no longer used by the eventdev layer
> it can be removed now. Applications should use CFG_ALL_TYPES
> if they require enqueue of all types a queue.
> 
> Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
> ---
>  lib/librte_eventdev/rte_eventdev.c | 1 -
>  lib/librte_eventdev/rte_eventdev.h | 6 ------
>  2 files changed, 7 deletions(-)
> 
> diff --git a/lib/librte_eventdev/rte_eventdev.c b/lib/librte_eventdev/rte_eventdev.c
> index 68bfc3b..c32a776 100644
> --- a/lib/librte_eventdev/rte_eventdev.c
> +++ b/lib/librte_eventdev/rte_eventdev.c
> @@ -593,7 +593,6 @@ rte_event_queue_setup(uint8_t dev_id, uint8_t queue_id,
>  		RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->queue_def_conf,
>  					-ENOTSUP);
>  		(*dev->dev_ops->queue_def_conf)(dev, queue_id, &def_conf);
> -		def_conf.event_queue_cfg = RTE_EVENT_QUEUE_CFG_DEFAULT;
>  		queue_conf = &def_conf;
>  	}
>  
> diff --git a/lib/librte_eventdev/rte_eventdev.h b/lib/librte_eventdev/rte_eventdev.h
> index 7073987..d836f61 100644
> --- a/lib/librte_eventdev/rte_eventdev.h
> +++ b/lib/librte_eventdev/rte_eventdev.h
> @@ -471,12 +471,6 @@ rte_event_dev_configure(uint8_t dev_id,
>  /* Event queue specific APIs */
>  
>  /* Event queue configuration bitmap flags */
> -#define RTE_EVENT_QUEUE_CFG_DEFAULT            (0)
> -/**< Default value of *event_queue_cfg* when rte_event_queue_setup() invoked
> - * with queue_conf == NULL
> - *
> - * @see rte_event_queue_setup()
> - */
>  #define RTE_EVENT_QUEUE_CFG_TYPE_MASK          (3ULL << 0)
>  /**< Mask for event queue schedule type configuration request */
>  #define RTE_EVENT_QUEUE_CFG_ALL_TYPES          (0ULL << 0)
> -- 
> 2.7.4
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [dpdk-dev] [PATCH] eventdev: remove default queue overriding
  2017-03-06 13:45 ` Jerin Jacob
@ 2017-03-08 12:11   ` Van Haaren, Harry
  0 siblings, 0 replies; 6+ messages in thread
From: Van Haaren, Harry @ 2017-03-08 12:11 UTC (permalink / raw)
  To: Jerin Jacob; +Cc: dev

> -----Original Message-----
> From: Jerin Jacob [mailto:jerin.jacob@caviumnetworks.com]
> Sent: Monday, March 6, 2017 1:45 PM
> To: Van Haaren, Harry <harry.van.haaren@intel.com>
> Cc: dev@dpdk.org
> Subject: Re: [PATCH] eventdev: remove default queue overriding
> 
> On Wed, Mar 01, 2017 at 12:49:02PM +0000, Harry van Haaren wrote:
> > PMDs that only do a specific type of scheduling cannot provide
> > CFG_ALL_TYPES, so the Eventdev infrastructure should not demand
> > that every PMD supports CFG_ALL_TYPES.
> 
> Sure. Then I think then we can enumerate CFG_ALL_TYPES as capability.
> Meaning, New flag in event_dev_cap to denote PMD can support all the sched type
> per queue. My reasoning for the capability flag is because, The application flow
> will be depended on the logic of creating the queue with different flags.
> Thoughts ?

Yes, makes sense.

 
> I thought, In SW implementation, We can create 3 virtual queues per
> queue. Based on en-queue's shed_type, implementation can choose the
> correct underneath virtual queue. I guess, it has performance issues,
> if so, Maybe capability is the way forward.

You're right that it is possible, you're also right that the performance
hit in switching the queue to enqueue to in software is prohibitive of
supporting it.

+1 for a capability approach. I'll respin the patch, adding a capability,
and we can discuss more / merge then.

Thanks for the input!


> Setting to CFG_ALL_TYPES will be useful for flow based event pipeling
> as I mentioned earlier in other email.
> 
> > By not overriding the default configuration of the queue as
> > suggested by the PMD, the eventdev_common unit tests can pass
> > on all PMDs, regardless of thier capabilities.
> 
> Make sense. We can remove the default as CFG_ALL_TYPES.
> 
> >
> > RTE_EVENT_QUEUE_CFG_DEFAULT is no longer used by the eventdev layer
> > it can be removed now. Applications should use CFG_ALL_TYPES
> > if they require enqueue of all types a queue.
> >
> > Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
> > ---
> >  lib/librte_eventdev/rte_eventdev.c | 1 -
> >  lib/librte_eventdev/rte_eventdev.h | 6 ------
> >  2 files changed, 7 deletions(-)
> >
> > diff --git a/lib/librte_eventdev/rte_eventdev.c b/lib/librte_eventdev/rte_eventdev.c
> > index 68bfc3b..c32a776 100644
> > --- a/lib/librte_eventdev/rte_eventdev.c
> > +++ b/lib/librte_eventdev/rte_eventdev.c
> > @@ -593,7 +593,6 @@ rte_event_queue_setup(uint8_t dev_id, uint8_t queue_id,
> >  		RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->queue_def_conf,
> >  					-ENOTSUP);
> >  		(*dev->dev_ops->queue_def_conf)(dev, queue_id, &def_conf);
> > -		def_conf.event_queue_cfg = RTE_EVENT_QUEUE_CFG_DEFAULT;
> >  		queue_conf = &def_conf;
> >  	}
> >
> > diff --git a/lib/librte_eventdev/rte_eventdev.h b/lib/librte_eventdev/rte_eventdev.h
> > index 7073987..d836f61 100644
> > --- a/lib/librte_eventdev/rte_eventdev.h
> > +++ b/lib/librte_eventdev/rte_eventdev.h
> > @@ -471,12 +471,6 @@ rte_event_dev_configure(uint8_t dev_id,
> >  /* Event queue specific APIs */
> >
> >  /* Event queue configuration bitmap flags */
> > -#define RTE_EVENT_QUEUE_CFG_DEFAULT            (0)
> > -/**< Default value of *event_queue_cfg* when rte_event_queue_setup() invoked
> > - * with queue_conf == NULL
> > - *
> > - * @see rte_event_queue_setup()
> > - */
> >  #define RTE_EVENT_QUEUE_CFG_TYPE_MASK          (3ULL << 0)
> >  /**< Mask for event queue schedule type configuration request */
> >  #define RTE_EVENT_QUEUE_CFG_ALL_TYPES          (0ULL << 0)
> > --
> > 2.7.4
> >

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [dpdk-dev] [PATCH v2] eventdev: remove default queue overriding
  2017-03-01 12:49 [dpdk-dev] [PATCH] eventdev: remove default queue overriding Harry van Haaren
  2017-03-06 13:45 ` Jerin Jacob
@ 2017-03-10 15:19 ` Harry van Haaren
  2017-03-21  8:21   ` Jerin Jacob
  1 sibling, 1 reply; 6+ messages in thread
From: Harry van Haaren @ 2017-03-10 15:19 UTC (permalink / raw)
  To: dev; +Cc: jerin.jacob, Harry van Haaren

PMDs that only do a specific type of scheduling cannot provide
CFG_ALL_TYPES, so the Eventdev infrastructure should not demand
that every PMD supports CFG_ALL_TYPES.

By not overriding the default configuration of the queue as
suggested by the PMD, the eventdev_common unit tests can pass
on all PMDs, regardless of their capabilities.

RTE_EVENT_QUEUE_CFG_DEFAULT is no longer used by the eventdev layer
it can be removed now. Applications should use CFG_ALL_TYPES
if they require enqueue of all types a queue, or specify which
type of queue they require.

The CFG_DEFAULT value is changed to CFG_ALL_TYPES in event/skeleton,
to not break the compile.

A capability flag is added that indicates if the underlying PMD
supports creating queues of ALL_TYPES.

Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>

---

v2:
- added capability flag to indicate if PMD supports ALL_TYPES

---
 drivers/event/skeleton/skeleton_eventdev.c |  2 +-
 lib/librte_eventdev/rte_eventdev.c         |  1 -
 lib/librte_eventdev/rte_eventdev.h         | 13 +++++++------
 3 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/event/skeleton/skeleton_eventdev.c b/drivers/event/skeleton/skeleton_eventdev.c
index dee0faf..308e28e 100644
--- a/drivers/event/skeleton/skeleton_eventdev.c
+++ b/drivers/event/skeleton/skeleton_eventdev.c
@@ -196,7 +196,7 @@ skeleton_eventdev_queue_def_conf(struct rte_eventdev *dev, uint8_t queue_id,
 
 	queue_conf->nb_atomic_flows = (1ULL << 20);
 	queue_conf->nb_atomic_order_sequences = (1ULL << 20);
-	queue_conf->event_queue_cfg = RTE_EVENT_QUEUE_CFG_DEFAULT;
+	queue_conf->event_queue_cfg = RTE_EVENT_QUEUE_CFG_ALL_TYPES;
 	queue_conf->priority = RTE_EVENT_DEV_PRIORITY_NORMAL;
 }
 
diff --git a/lib/librte_eventdev/rte_eventdev.c b/lib/librte_eventdev/rte_eventdev.c
index 68bfc3b..c32a776 100644
--- a/lib/librte_eventdev/rte_eventdev.c
+++ b/lib/librte_eventdev/rte_eventdev.c
@@ -593,7 +593,6 @@ rte_event_queue_setup(uint8_t dev_id, uint8_t queue_id,
 		RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->queue_def_conf,
 					-ENOTSUP);
 		(*dev->dev_ops->queue_def_conf)(dev, queue_id, &def_conf);
-		def_conf.event_queue_cfg = RTE_EVENT_QUEUE_CFG_DEFAULT;
 		queue_conf = &def_conf;
 	}
 
diff --git a/lib/librte_eventdev/rte_eventdev.h b/lib/librte_eventdev/rte_eventdev.h
index 7073987..4c73a82 100644
--- a/lib/librte_eventdev/rte_eventdev.h
+++ b/lib/librte_eventdev/rte_eventdev.h
@@ -271,6 +271,13 @@ struct rte_mbuf; /* we just use mbuf pointers; no need to include rte_mbuf.h */
  *
  * @see rte_event_schedule(), rte_event_dequeue_burst()
  */
+#define RTE_EVENT_DEV_CAP_QUEUE_ALL_TYPES     (1ULL << 3)
+/**< Event device is capable of enqueuing events of any type to any queue.
+ * If this capability is not set, the queue only supports events of the
+ *  *RTE_EVENT_QUEUE_CFG_* type that it was created with.
+ *
+ * @see RTE_EVENT_QUEUE_CFG_* values
+ */
 
 /* Event device priority levels */
 #define RTE_EVENT_DEV_PRIORITY_HIGHEST   0
@@ -471,12 +478,6 @@ rte_event_dev_configure(uint8_t dev_id,
 /* Event queue specific APIs */
 
 /* Event queue configuration bitmap flags */
-#define RTE_EVENT_QUEUE_CFG_DEFAULT            (0)
-/**< Default value of *event_queue_cfg* when rte_event_queue_setup() invoked
- * with queue_conf == NULL
- *
- * @see rte_event_queue_setup()
- */
 #define RTE_EVENT_QUEUE_CFG_TYPE_MASK          (3ULL << 0)
 /**< Mask for event queue schedule type configuration request */
 #define RTE_EVENT_QUEUE_CFG_ALL_TYPES          (0ULL << 0)
-- 
2.7.4

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [dpdk-dev] [PATCH v2] eventdev: remove default queue overriding
  2017-03-10 15:19 ` [dpdk-dev] [PATCH v2] " Harry van Haaren
@ 2017-03-21  8:21   ` Jerin Jacob
  2017-03-23 10:17     ` Jerin Jacob
  0 siblings, 1 reply; 6+ messages in thread
From: Jerin Jacob @ 2017-03-21  8:21 UTC (permalink / raw)
  To: Harry van Haaren; +Cc: dev

On Fri, Mar 10, 2017 at 03:19:15PM +0000, Harry van Haaren wrote:
> PMDs that only do a specific type of scheduling cannot provide
> CFG_ALL_TYPES, so the Eventdev infrastructure should not demand
> that every PMD supports CFG_ALL_TYPES.
> 
> By not overriding the default configuration of the queue as
> suggested by the PMD, the eventdev_common unit tests can pass
> on all PMDs, regardless of their capabilities.
> 
> RTE_EVENT_QUEUE_CFG_DEFAULT is no longer used by the eventdev layer
> it can be removed now. Applications should use CFG_ALL_TYPES
> if they require enqueue of all types a queue, or specify which
> type of queue they require.
> 
> The CFG_DEFAULT value is changed to CFG_ALL_TYPES in event/skeleton,
> to not break the compile.
> 
> A capability flag is added that indicates if the underlying PMD
> supports creating queues of ALL_TYPES.
> 
> Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>

I think It is reasonable to have this capability if SW PMD can not
support it for performance reasons. The only downside is, In application
side there will be changes in the fast path.I think, The reasonable
trade-off between performance and portability to keep packet processing
functions as common and keep the pipeline advancement logic as different
main loop based on capability.

Two reasons why CFG_ALL_TYPES important for HW
- Event queue is the precious resource and it is very limited and it
  consumes power and internal resources like SRAM
- The use case like flow based event pipelining will not have constraint
  on which event queues it enqueues to

I think We can add this capability flag now and once we have performance
and latency test cases for eventdev then we can check is there any scope
for improvement in SW PMD.With that note,

Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>

> 
> ---
> 
> v2:
> - added capability flag to indicate if PMD supports ALL_TYPES
> 
> ---
>  drivers/event/skeleton/skeleton_eventdev.c |  2 +-
>  lib/librte_eventdev/rte_eventdev.c         |  1 -
>  lib/librte_eventdev/rte_eventdev.h         | 13 +++++++------
>  3 files changed, 8 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/event/skeleton/skeleton_eventdev.c b/drivers/event/skeleton/skeleton_eventdev.c
> index dee0faf..308e28e 100644
> --- a/drivers/event/skeleton/skeleton_eventdev.c
> +++ b/drivers/event/skeleton/skeleton_eventdev.c
> @@ -196,7 +196,7 @@ skeleton_eventdev_queue_def_conf(struct rte_eventdev *dev, uint8_t queue_id,
>  
>  	queue_conf->nb_atomic_flows = (1ULL << 20);
>  	queue_conf->nb_atomic_order_sequences = (1ULL << 20);
> -	queue_conf->event_queue_cfg = RTE_EVENT_QUEUE_CFG_DEFAULT;
> +	queue_conf->event_queue_cfg = RTE_EVENT_QUEUE_CFG_ALL_TYPES;
>  	queue_conf->priority = RTE_EVENT_DEV_PRIORITY_NORMAL;
>  }
>  
> diff --git a/lib/librte_eventdev/rte_eventdev.c b/lib/librte_eventdev/rte_eventdev.c
> index 68bfc3b..c32a776 100644
> --- a/lib/librte_eventdev/rte_eventdev.c
> +++ b/lib/librte_eventdev/rte_eventdev.c
> @@ -593,7 +593,6 @@ rte_event_queue_setup(uint8_t dev_id, uint8_t queue_id,
>  		RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->queue_def_conf,
>  					-ENOTSUP);
>  		(*dev->dev_ops->queue_def_conf)(dev, queue_id, &def_conf);
> -		def_conf.event_queue_cfg = RTE_EVENT_QUEUE_CFG_DEFAULT;
>  		queue_conf = &def_conf;
>  	}
>  
> diff --git a/lib/librte_eventdev/rte_eventdev.h b/lib/librte_eventdev/rte_eventdev.h
> index 7073987..4c73a82 100644
> --- a/lib/librte_eventdev/rte_eventdev.h
> +++ b/lib/librte_eventdev/rte_eventdev.h
> @@ -271,6 +271,13 @@ struct rte_mbuf; /* we just use mbuf pointers; no need to include rte_mbuf.h */
>   *
>   * @see rte_event_schedule(), rte_event_dequeue_burst()
>   */
> +#define RTE_EVENT_DEV_CAP_QUEUE_ALL_TYPES     (1ULL << 3)
> +/**< Event device is capable of enqueuing events of any type to any queue.
> + * If this capability is not set, the queue only supports events of the
> + *  *RTE_EVENT_QUEUE_CFG_* type that it was created with.
> + *
> + * @see RTE_EVENT_QUEUE_CFG_* values
> + */
>  
>  /* Event device priority levels */
>  #define RTE_EVENT_DEV_PRIORITY_HIGHEST   0
> @@ -471,12 +478,6 @@ rte_event_dev_configure(uint8_t dev_id,
>  /* Event queue specific APIs */
>  
>  /* Event queue configuration bitmap flags */
> -#define RTE_EVENT_QUEUE_CFG_DEFAULT            (0)
> -/**< Default value of *event_queue_cfg* when rte_event_queue_setup() invoked
> - * with queue_conf == NULL
> - *
> - * @see rte_event_queue_setup()
> - */
>  #define RTE_EVENT_QUEUE_CFG_TYPE_MASK          (3ULL << 0)
>  /**< Mask for event queue schedule type configuration request */
>  #define RTE_EVENT_QUEUE_CFG_ALL_TYPES          (0ULL << 0)
> -- 
> 2.7.4
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [dpdk-dev] [PATCH v2] eventdev: remove default queue overriding
  2017-03-21  8:21   ` Jerin Jacob
@ 2017-03-23 10:17     ` Jerin Jacob
  0 siblings, 0 replies; 6+ messages in thread
From: Jerin Jacob @ 2017-03-23 10:17 UTC (permalink / raw)
  To: Harry van Haaren; +Cc: dev

On Tue, Mar 21, 2017 at 01:51:45PM +0530, Jerin Jacob wrote:
> On Fri, Mar 10, 2017 at 03:19:15PM +0000, Harry van Haaren wrote:
> > PMDs that only do a specific type of scheduling cannot provide
> > CFG_ALL_TYPES, so the Eventdev infrastructure should not demand
> > that every PMD supports CFG_ALL_TYPES.
> > 
> > By not overriding the default configuration of the queue as
> > suggested by the PMD, the eventdev_common unit tests can pass
> > on all PMDs, regardless of their capabilities.
> > 
> > RTE_EVENT_QUEUE_CFG_DEFAULT is no longer used by the eventdev layer
> > it can be removed now. Applications should use CFG_ALL_TYPES
> > if they require enqueue of all types a queue, or specify which
> > type of queue they require.
> > 
> > The CFG_DEFAULT value is changed to CFG_ALL_TYPES in event/skeleton,
> > to not break the compile.
> > 
> > A capability flag is added that indicates if the underlying PMD
> > supports creating queues of ALL_TYPES.
> > 
> > Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
> 
> I think It is reasonable to have this capability if SW PMD can not
> support it for performance reasons. The only downside is, In application
> side there will be changes in the fast path.I think, The reasonable
> trade-off between performance and portability to keep packet processing
> functions as common and keep the pipeline advancement logic as different
> main loop based on capability.
> 
> Two reasons why CFG_ALL_TYPES important for HW
> - Event queue is the precious resource and it is very limited and it
>   consumes power and internal resources like SRAM
> - The use case like flow based event pipelining will not have constraint
>   on which event queues it enqueues to
> 
> I think We can add this capability flag now and once we have performance
> and latency test cases for eventdev then we can check is there any scope
> for improvement in SW PMD.With that note,
> 
> Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>

Applied to dpdk-next-eventdev/master. Thanks.


> 
> > 
> > ---
> > 
> > v2:
> > - added capability flag to indicate if PMD supports ALL_TYPES
> > 
> > ---
> >  drivers/event/skeleton/skeleton_eventdev.c |  2 +-
> >  lib/librte_eventdev/rte_eventdev.c         |  1 -
> >  lib/librte_eventdev/rte_eventdev.h         | 13 +++++++------
> >  3 files changed, 8 insertions(+), 8 deletions(-)
> > 
> > diff --git a/drivers/event/skeleton/skeleton_eventdev.c b/drivers/event/skeleton/skeleton_eventdev.c
> > index dee0faf..308e28e 100644
> > --- a/drivers/event/skeleton/skeleton_eventdev.c
> > +++ b/drivers/event/skeleton/skeleton_eventdev.c
> > @@ -196,7 +196,7 @@ skeleton_eventdev_queue_def_conf(struct rte_eventdev *dev, uint8_t queue_id,
> >  
> >  	queue_conf->nb_atomic_flows = (1ULL << 20);
> >  	queue_conf->nb_atomic_order_sequences = (1ULL << 20);
> > -	queue_conf->event_queue_cfg = RTE_EVENT_QUEUE_CFG_DEFAULT;
> > +	queue_conf->event_queue_cfg = RTE_EVENT_QUEUE_CFG_ALL_TYPES;
> >  	queue_conf->priority = RTE_EVENT_DEV_PRIORITY_NORMAL;
> >  }
> >  
> > diff --git a/lib/librte_eventdev/rte_eventdev.c b/lib/librte_eventdev/rte_eventdev.c
> > index 68bfc3b..c32a776 100644
> > --- a/lib/librte_eventdev/rte_eventdev.c
> > +++ b/lib/librte_eventdev/rte_eventdev.c
> > @@ -593,7 +593,6 @@ rte_event_queue_setup(uint8_t dev_id, uint8_t queue_id,
> >  		RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->queue_def_conf,
> >  					-ENOTSUP);
> >  		(*dev->dev_ops->queue_def_conf)(dev, queue_id, &def_conf);
> > -		def_conf.event_queue_cfg = RTE_EVENT_QUEUE_CFG_DEFAULT;
> >  		queue_conf = &def_conf;
> >  	}
> >  
> > diff --git a/lib/librte_eventdev/rte_eventdev.h b/lib/librte_eventdev/rte_eventdev.h
> > index 7073987..4c73a82 100644
> > --- a/lib/librte_eventdev/rte_eventdev.h
> > +++ b/lib/librte_eventdev/rte_eventdev.h
> > @@ -271,6 +271,13 @@ struct rte_mbuf; /* we just use mbuf pointers; no need to include rte_mbuf.h */
> >   *
> >   * @see rte_event_schedule(), rte_event_dequeue_burst()
> >   */
> > +#define RTE_EVENT_DEV_CAP_QUEUE_ALL_TYPES     (1ULL << 3)
> > +/**< Event device is capable of enqueuing events of any type to any queue.
> > + * If this capability is not set, the queue only supports events of the
> > + *  *RTE_EVENT_QUEUE_CFG_* type that it was created with.
> > + *
> > + * @see RTE_EVENT_QUEUE_CFG_* values
> > + */
> >  
> >  /* Event device priority levels */
> >  #define RTE_EVENT_DEV_PRIORITY_HIGHEST   0
> > @@ -471,12 +478,6 @@ rte_event_dev_configure(uint8_t dev_id,
> >  /* Event queue specific APIs */
> >  
> >  /* Event queue configuration bitmap flags */
> > -#define RTE_EVENT_QUEUE_CFG_DEFAULT            (0)
> > -/**< Default value of *event_queue_cfg* when rte_event_queue_setup() invoked
> > - * with queue_conf == NULL
> > - *
> > - * @see rte_event_queue_setup()
> > - */
> >  #define RTE_EVENT_QUEUE_CFG_TYPE_MASK          (3ULL << 0)
> >  /**< Mask for event queue schedule type configuration request */
> >  #define RTE_EVENT_QUEUE_CFG_ALL_TYPES          (0ULL << 0)
> > -- 
> > 2.7.4
> > 

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-03-23 10:17 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-01 12:49 [dpdk-dev] [PATCH] eventdev: remove default queue overriding Harry van Haaren
2017-03-06 13:45 ` Jerin Jacob
2017-03-08 12:11   ` Van Haaren, Harry
2017-03-10 15:19 ` [dpdk-dev] [PATCH v2] " Harry van Haaren
2017-03-21  8:21   ` Jerin Jacob
2017-03-23 10:17     ` 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).