[API-NEXT,v4,1/2] api: queue: added queue size param

Message ID 20170413144051.22456-1-petri.savolainen@linaro.org
State Accepted
Commit 48ad38ac169c48ac67e0758d3d45eb146255ed09
Headers show
Series
  • [API-NEXT,v4,1/2] api: queue: added queue size param
Related show

Commit Message

Petri Savolainen April 13, 2017, 2:40 p.m.
Added capability information about maximum number of queues
and queue sizes. Both are defined per queue type, since
plain and scheduled queues may have different implementations
(e.g. one uses HW while the other is SW).

Added queue size parameter, which specifies how large
storage size application requires in minimum.

Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org>

---
 include/odp/api/spec/queue.h | 39 ++++++++++++++++++++++++++++++++++++++-
 1 file changed, 38 insertions(+), 1 deletion(-)

-- 
2.11.0

Comments

Bill Fischofer April 13, 2017, 3:14 p.m. | #1
For this series: Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org>

This should still have Honnappa's review as well.

On Thu, Apr 13, 2017 at 9:40 AM, Petri Savolainen
<petri.savolainen@linaro.org> wrote:
> Added capability information about maximum number of queues

> and queue sizes. Both are defined per queue type, since

> plain and scheduled queues may have different implementations

> (e.g. one uses HW while the other is SW).

>

> Added queue size parameter, which specifies how large

> storage size application requires in minimum.

>

> Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org>

> ---

>  include/odp/api/spec/queue.h | 39 ++++++++++++++++++++++++++++++++++++++-

>  1 file changed, 38 insertions(+), 1 deletion(-)

>

> diff --git a/include/odp/api/spec/queue.h b/include/odp/api/spec/queue.h

> index 7972feac..9dd0a561 100644

> --- a/include/odp/api/spec/queue.h

> +++ b/include/odp/api/spec/queue.h

> @@ -100,7 +100,9 @@ typedef enum odp_queue_op_mode_t {

>   * Queue capabilities

>   */

>  typedef struct odp_queue_capability_t {

> -       /** Maximum number of event queues */

> +       /** Maximum number of event queues of any type (default size). Use

> +         * this in addition to queue type specific 'max_num', if both queue

> +         * types are used simultaneously. */

>         uint32_t max_queues;

>

>         /** Maximum number of ordered locks per queue */

> @@ -112,6 +114,32 @@ typedef struct odp_queue_capability_t {

>         /** Number of scheduling priorities */

>         unsigned sched_prios;

>

> +       /** Plain queue capabilities */

> +       struct {

> +               /** Maximum number of plain queues of the default size. */

> +               uint32_t max_num;

> +

> +               /** Maximum number of events a plain queue can store

> +                 * simultaneously. The value of zero means that plain

> +                 * queues do not have a size limit, but a single queue can

> +                 * store all available events. */

> +               uint32_t max_size;

> +

> +       } plain;

> +

> +       /** Scheduled queue capabilities */

> +       struct {

> +               /** Maximum number of scheduled queues of the default size. */

> +               uint32_t max_num;

> +

> +               /** Maximum number of events a scheduled queue can store

> +                 * simultaneously. The value of zero means that scheduled

> +                 * queues do not have a size limit, but a single queue can

> +                 * store all available events. */

> +               uint32_t max_size;

> +

> +       } sched;

> +

>  } odp_queue_capability_t;

>

>  /**

> @@ -165,6 +193,15 @@ typedef struct odp_queue_param_t {

>           * The implementation may use this value as a hint for the number of

>           * context data bytes to prefetch. Default value is zero (no hint). */

>         uint32_t context_len;

> +

> +       /** Queue size

> +         *

> +         * The queue must be able to store at minimum this many events

> +         * simultaneously. The value must not exceed 'max_size' queue

> +         * capability. The value of zero means implementation specific

> +         * default size. */

> +       uint32_t size;

> +

>  } odp_queue_param_t;

>

>  /**

> --

> 2.11.0

>
Honnappa Nagarahalli April 13, 2017, 3:43 p.m. | #2
For this series: Reviewed-by: Honnappa Nagarahalli
<honnappa.nagarahalli@linaro.org>

On 13 April 2017 at 10:14, Bill Fischofer <bill.fischofer@linaro.org> wrote:
> For this series: Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org>

>

> This should still have Honnappa's review as well.

>

> On Thu, Apr 13, 2017 at 9:40 AM, Petri Savolainen

> <petri.savolainen@linaro.org> wrote:

>> Added capability information about maximum number of queues

>> and queue sizes. Both are defined per queue type, since

>> plain and scheduled queues may have different implementations

>> (e.g. one uses HW while the other is SW).

>>

>> Added queue size parameter, which specifies how large

>> storage size application requires in minimum.

>>

>> Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org>

>> ---

>>  include/odp/api/spec/queue.h | 39 ++++++++++++++++++++++++++++++++++++++-

>>  1 file changed, 38 insertions(+), 1 deletion(-)

>>

>> diff --git a/include/odp/api/spec/queue.h b/include/odp/api/spec/queue.h

>> index 7972feac..9dd0a561 100644

>> --- a/include/odp/api/spec/queue.h

>> +++ b/include/odp/api/spec/queue.h

>> @@ -100,7 +100,9 @@ typedef enum odp_queue_op_mode_t {

>>   * Queue capabilities

>>   */

>>  typedef struct odp_queue_capability_t {

>> -       /** Maximum number of event queues */

>> +       /** Maximum number of event queues of any type (default size). Use

>> +         * this in addition to queue type specific 'max_num', if both queue

>> +         * types are used simultaneously. */

>>         uint32_t max_queues;

>>

>>         /** Maximum number of ordered locks per queue */

>> @@ -112,6 +114,32 @@ typedef struct odp_queue_capability_t {

>>         /** Number of scheduling priorities */

>>         unsigned sched_prios;

>>

>> +       /** Plain queue capabilities */

>> +       struct {

>> +               /** Maximum number of plain queues of the default size. */

>> +               uint32_t max_num;

>> +

>> +               /** Maximum number of events a plain queue can store

>> +                 * simultaneously. The value of zero means that plain

>> +                 * queues do not have a size limit, but a single queue can

>> +                 * store all available events. */

>> +               uint32_t max_size;

>> +

>> +       } plain;

>> +

>> +       /** Scheduled queue capabilities */

>> +       struct {

>> +               /** Maximum number of scheduled queues of the default size. */

>> +               uint32_t max_num;

>> +

>> +               /** Maximum number of events a scheduled queue can store

>> +                 * simultaneously. The value of zero means that scheduled

>> +                 * queues do not have a size limit, but a single queue can

>> +                 * store all available events. */

>> +               uint32_t max_size;

>> +

>> +       } sched;

>> +

>>  } odp_queue_capability_t;

>>

>>  /**

>> @@ -165,6 +193,15 @@ typedef struct odp_queue_param_t {

>>           * The implementation may use this value as a hint for the number of

>>           * context data bytes to prefetch. Default value is zero (no hint). */

>>         uint32_t context_len;

>> +

>> +       /** Queue size

>> +         *

>> +         * The queue must be able to store at minimum this many events

>> +         * simultaneously. The value must not exceed 'max_size' queue

>> +         * capability. The value of zero means implementation specific

>> +         * default size. */

>> +       uint32_t size;

>> +

>>  } odp_queue_param_t;

>>

>>  /**

>> --

>> 2.11.0

>>
Honnappa Nagarahalli April 13, 2017, 4:07 p.m. | #3
Hi Maxim,
    Appreciate if this can be merged quickly, it will unblock some
more patches that are dependent on queue size.

Thank you,
Honnappa

On 13 April 2017 at 10:43, Honnappa Nagarahalli
<honnappa.nagarahalli@linaro.org> wrote:
> For this series: Reviewed-by: Honnappa Nagarahalli

> <honnappa.nagarahalli@linaro.org>

>

> On 13 April 2017 at 10:14, Bill Fischofer <bill.fischofer@linaro.org> wrote:

>> For this series: Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org>

>>

>> This should still have Honnappa's review as well.

>>

>> On Thu, Apr 13, 2017 at 9:40 AM, Petri Savolainen

>> <petri.savolainen@linaro.org> wrote:

>>> Added capability information about maximum number of queues

>>> and queue sizes. Both are defined per queue type, since

>>> plain and scheduled queues may have different implementations

>>> (e.g. one uses HW while the other is SW).

>>>

>>> Added queue size parameter, which specifies how large

>>> storage size application requires in minimum.

>>>

>>> Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org>

>>> ---

>>>  include/odp/api/spec/queue.h | 39 ++++++++++++++++++++++++++++++++++++++-

>>>  1 file changed, 38 insertions(+), 1 deletion(-)

>>>

>>> diff --git a/include/odp/api/spec/queue.h b/include/odp/api/spec/queue.h

>>> index 7972feac..9dd0a561 100644

>>> --- a/include/odp/api/spec/queue.h

>>> +++ b/include/odp/api/spec/queue.h

>>> @@ -100,7 +100,9 @@ typedef enum odp_queue_op_mode_t {

>>>   * Queue capabilities

>>>   */

>>>  typedef struct odp_queue_capability_t {

>>> -       /** Maximum number of event queues */

>>> +       /** Maximum number of event queues of any type (default size). Use

>>> +         * this in addition to queue type specific 'max_num', if both queue

>>> +         * types are used simultaneously. */

>>>         uint32_t max_queues;

>>>

>>>         /** Maximum number of ordered locks per queue */

>>> @@ -112,6 +114,32 @@ typedef struct odp_queue_capability_t {

>>>         /** Number of scheduling priorities */

>>>         unsigned sched_prios;

>>>

>>> +       /** Plain queue capabilities */

>>> +       struct {

>>> +               /** Maximum number of plain queues of the default size. */

>>> +               uint32_t max_num;

>>> +

>>> +               /** Maximum number of events a plain queue can store

>>> +                 * simultaneously. The value of zero means that plain

>>> +                 * queues do not have a size limit, but a single queue can

>>> +                 * store all available events. */

>>> +               uint32_t max_size;

>>> +

>>> +       } plain;

>>> +

>>> +       /** Scheduled queue capabilities */

>>> +       struct {

>>> +               /** Maximum number of scheduled queues of the default size. */

>>> +               uint32_t max_num;

>>> +

>>> +               /** Maximum number of events a scheduled queue can store

>>> +                 * simultaneously. The value of zero means that scheduled

>>> +                 * queues do not have a size limit, but a single queue can

>>> +                 * store all available events. */

>>> +               uint32_t max_size;

>>> +

>>> +       } sched;

>>> +

>>>  } odp_queue_capability_t;

>>>

>>>  /**

>>> @@ -165,6 +193,15 @@ typedef struct odp_queue_param_t {

>>>           * The implementation may use this value as a hint for the number of

>>>           * context data bytes to prefetch. Default value is zero (no hint). */

>>>         uint32_t context_len;

>>> +

>>> +       /** Queue size

>>> +         *

>>> +         * The queue must be able to store at minimum this many events

>>> +         * simultaneously. The value must not exceed 'max_size' queue

>>> +         * capability. The value of zero means implementation specific

>>> +         * default size. */

>>> +       uint32_t size;

>>> +

>>>  } odp_queue_param_t;

>>>

>>>  /**

>>> --

>>> 2.11.0

>>>
Balasubramanian Manoharan April 13, 2017, 4:08 p.m. | #4
For the series:
Reviewed-by: Balasubramanian Manoharan <bala.manoharan@linaro.org>



> On 13-Apr-2017, at 9:13 PM, Honnappa Nagarahalli <honnappa.nagarahalli@linaro.org> wrote:

> 

> For this series: Reviewed-by: Honnappa Nagarahalli

> <honnappa.nagarahalli@linaro.org>

> 

>> On 13 April 2017 at 10:14, Bill Fischofer <bill.fischofer@linaro.org> wrote:

>> For this series: Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org>

>> 

>> This should still have Honnappa's review as well.

>> 

>> On Thu, Apr 13, 2017 at 9:40 AM, Petri Savolainen

>> <petri.savolainen@linaro.org> wrote:

>>> Added capability information about maximum number of queues

>>> and queue sizes. Both are defined per queue type, since

>>> plain and scheduled queues may have different implementations

>>> (e.g. one uses HW while the other is SW).

>>> 

>>> Added queue size parameter, which specifies how large

>>> storage size application requires in minimum.

>>> 

>>> Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org>

>>> ---

>>> include/odp/api/spec/queue.h | 39 ++++++++++++++++++++++++++++++++++++++-

>>> 1 file changed, 38 insertions(+), 1 deletion(-)

>>> 

>>> diff --git a/include/odp/api/spec/queue.h b/include/odp/api/spec/queue.h

>>> index 7972feac..9dd0a561 100644

>>> --- a/include/odp/api/spec/queue.h

>>> +++ b/include/odp/api/spec/queue.h

>>> @@ -100,7 +100,9 @@ typedef enum odp_queue_op_mode_t {

>>>  * Queue capabilities

>>>  */

>>> typedef struct odp_queue_capability_t {

>>> -       /** Maximum number of event queues */

>>> +       /** Maximum number of event queues of any type (default size). Use

>>> +         * this in addition to queue type specific 'max_num', if both queue

>>> +         * types are used simultaneously. */

>>>        uint32_t max_queues;

>>> 

>>>        /** Maximum number of ordered locks per queue */

>>> @@ -112,6 +114,32 @@ typedef struct odp_queue_capability_t {

>>>        /** Number of scheduling priorities */

>>>        unsigned sched_prios;

>>> 

>>> +       /** Plain queue capabilities */

>>> +       struct {

>>> +               /** Maximum number of plain queues of the default size. */

>>> +               uint32_t max_num;

>>> +

>>> +               /** Maximum number of events a plain queue can store

>>> +                 * simultaneously. The value of zero means that plain

>>> +                 * queues do not have a size limit, but a single queue can

>>> +                 * store all available events. */

>>> +               uint32_t max_size;

>>> +

>>> +       } plain;

>>> +

>>> +       /** Scheduled queue capabilities */

>>> +       struct {

>>> +               /** Maximum number of scheduled queues of the default size. */

>>> +               uint32_t max_num;

>>> +

>>> +               /** Maximum number of events a scheduled queue can store

>>> +                 * simultaneously. The value of zero means that scheduled

>>> +                 * queues do not have a size limit, but a single queue can

>>> +                 * store all available events. */

>>> +               uint32_t max_size;

>>> +

>>> +       } sched;

>>> +

>>> } odp_queue_capability_t;

>>> 

>>> /**

>>> @@ -165,6 +193,15 @@ typedef struct odp_queue_param_t {

>>>          * The implementation may use this value as a hint for the number of

>>>          * context data bytes to prefetch. Default value is zero (no hint). */

>>>        uint32_t context_len;

>>> +

>>> +       /** Queue size

>>> +         *

>>> +         * The queue must be able to store at minimum this many events

>>> +         * simultaneously. The value must not exceed 'max_size' queue

>>> +         * capability. The value of zero means implementation specific

>>> +         * default size. */

>>> +       uint32_t size;

>>> +

>>> } odp_queue_param_t;

>>> 

>>> /**

>>> --

>>> 2.11.0

>>>
Maxim Uvarov April 14, 2017, 9:01 a.m. | #5
merged.
Maxim.

On 04/13/17 19:08, Bala Manoharan wrote:
> For the series:

> Reviewed-by: Balasubramanian Manoharan <bala.manoharan@linaro.org>

>

>

>> On 13-Apr-2017, at 9:13 PM, Honnappa Nagarahalli <honnappa.nagarahalli@linaro.org> wrote:

>>

>> For this series: Reviewed-by: Honnappa Nagarahalli

>> <honnappa.nagarahalli@linaro.org>

>>

>>> On 13 April 2017 at 10:14, Bill Fischofer <bill.fischofer@linaro.org> wrote:

>>> For this series: Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org>

>>>

>>> This should still have Honnappa's review as well.

>>>

>>> On Thu, Apr 13, 2017 at 9:40 AM, Petri Savolainen

>>> <petri.savolainen@linaro.org> wrote:

>>>> Added capability information about maximum number of queues

>>>> and queue sizes. Both are defined per queue type, since

>>>> plain and scheduled queues may have different implementations

>>>> (e.g. one uses HW while the other is SW).

>>>>

>>>> Added queue size parameter, which specifies how large

>>>> storage size application requires in minimum.

>>>>

>>>> Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org>

>>>> ---

>>>> include/odp/api/spec/queue.h | 39 ++++++++++++++++++++++++++++++++++++++-

>>>> 1 file changed, 38 insertions(+), 1 deletion(-)

>>>>

>>>> diff --git a/include/odp/api/spec/queue.h b/include/odp/api/spec/queue.h

>>>> index 7972feac..9dd0a561 100644

>>>> --- a/include/odp/api/spec/queue.h

>>>> +++ b/include/odp/api/spec/queue.h

>>>> @@ -100,7 +100,9 @@ typedef enum odp_queue_op_mode_t {

>>>>   * Queue capabilities

>>>>   */

>>>> typedef struct odp_queue_capability_t {

>>>> -       /** Maximum number of event queues */

>>>> +       /** Maximum number of event queues of any type (default size). Use

>>>> +         * this in addition to queue type specific 'max_num', if both queue

>>>> +         * types are used simultaneously. */

>>>>         uint32_t max_queues;

>>>>

>>>>         /** Maximum number of ordered locks per queue */

>>>> @@ -112,6 +114,32 @@ typedef struct odp_queue_capability_t {

>>>>         /** Number of scheduling priorities */

>>>>         unsigned sched_prios;

>>>>

>>>> +       /** Plain queue capabilities */

>>>> +       struct {

>>>> +               /** Maximum number of plain queues of the default size. */

>>>> +               uint32_t max_num;

>>>> +

>>>> +               /** Maximum number of events a plain queue can store

>>>> +                 * simultaneously. The value of zero means that plain

>>>> +                 * queues do not have a size limit, but a single queue can

>>>> +                 * store all available events. */

>>>> +               uint32_t max_size;

>>>> +

>>>> +       } plain;

>>>> +

>>>> +       /** Scheduled queue capabilities */

>>>> +       struct {

>>>> +               /** Maximum number of scheduled queues of the default size. */

>>>> +               uint32_t max_num;

>>>> +

>>>> +               /** Maximum number of events a scheduled queue can store

>>>> +                 * simultaneously. The value of zero means that scheduled

>>>> +                 * queues do not have a size limit, but a single queue can

>>>> +                 * store all available events. */

>>>> +               uint32_t max_size;

>>>> +

>>>> +       } sched;

>>>> +

>>>> } odp_queue_capability_t;

>>>>

>>>> /**

>>>> @@ -165,6 +193,15 @@ typedef struct odp_queue_param_t {

>>>>           * The implementation may use this value as a hint for the number of

>>>>           * context data bytes to prefetch. Default value is zero (no hint). */

>>>>         uint32_t context_len;

>>>> +

>>>> +       /** Queue size

>>>> +         *

>>>> +         * The queue must be able to store at minimum this many events

>>>> +         * simultaneously. The value must not exceed 'max_size' queue

>>>> +         * capability. The value of zero means implementation specific

>>>> +         * default size. */

>>>> +       uint32_t size;

>>>> +

>>>> } odp_queue_param_t;

>>>>

>>>> /**

>>>> --

>>>> 2.11.0

>>>>

Patch hide | download patch | download mbox

diff --git a/include/odp/api/spec/queue.h b/include/odp/api/spec/queue.h
index 7972feac..9dd0a561 100644
--- a/include/odp/api/spec/queue.h
+++ b/include/odp/api/spec/queue.h
@@ -100,7 +100,9 @@  typedef enum odp_queue_op_mode_t {
  * Queue capabilities
  */
 typedef struct odp_queue_capability_t {
-	/** Maximum number of event queues */
+	/** Maximum number of event queues of any type (default size). Use
+	  * this in addition to queue type specific 'max_num', if both queue
+	  * types are used simultaneously. */
 	uint32_t max_queues;
 
 	/** Maximum number of ordered locks per queue */
@@ -112,6 +114,32 @@  typedef struct odp_queue_capability_t {
 	/** Number of scheduling priorities */
 	unsigned sched_prios;
 
+	/** Plain queue capabilities */
+	struct {
+		/** Maximum number of plain queues of the default size. */
+		uint32_t max_num;
+
+		/** Maximum number of events a plain queue can store
+		  * simultaneously. The value of zero means that plain
+		  * queues do not have a size limit, but a single queue can
+		  * store all available events. */
+		uint32_t max_size;
+
+	} plain;
+
+	/** Scheduled queue capabilities */
+	struct {
+		/** Maximum number of scheduled queues of the default size. */
+		uint32_t max_num;
+
+		/** Maximum number of events a scheduled queue can store
+		  * simultaneously. The value of zero means that scheduled
+		  * queues do not have a size limit, but a single queue can
+		  * store all available events. */
+		uint32_t max_size;
+
+	} sched;
+
 } odp_queue_capability_t;
 
 /**
@@ -165,6 +193,15 @@  typedef struct odp_queue_param_t {
 	  * The implementation may use this value as a hint for the number of
 	  * context data bytes to prefetch. Default value is zero (no hint). */
 	uint32_t context_len;
+
+	/** Queue size
+	  *
+	  * The queue must be able to store at minimum this many events
+	  * simultaneously. The value must not exceed 'max_size' queue
+	  * capability. The value of zero means implementation specific
+	  * default size. */
+	uint32_t size;
+
 } odp_queue_param_t;
 
 /**