diff mbox series

[v3,1/2] api: queue: added queue size param

Message ID 1491214261-7177-1-git-send-email-petri.savolainen@linaro.org
State New
Headers show
Series [v3,1/2] api: queue: added queue size param | expand

Commit Message

Petri Savolainen April 3, 2017, 10:11 a.m. UTC
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 | 35 ++++++++++++++++++++++++++++++++++-
 1 file changed, 34 insertions(+), 1 deletion(-)

-- 
2.8.1

Comments

Savolainen, Petri (Nokia - FI/Espoo) April 7, 2017, 7:53 a.m. UTC | #1
Ping.

> -----Original Message-----

> From: lng-odp [mailto:lng-odp-bounces@lists.linaro.org] On Behalf Of Petri

> Savolainen

> Sent: Monday, April 03, 2017 1:11 PM

> To: lng-odp@lists.linaro.org

> Subject: [lng-odp] [PATCH v3 1/2] api: queue: added queue size param

> 

> 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 | 35 ++++++++++++++++++++++++++++++++++-

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

> 

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

> index 7972fea..9c83322 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. 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,28 @@ typedef struct odp_queue_capability_t {

>  	/** Number of scheduling priorities */

>  	unsigned sched_prios;

> 

> +	/** Plain queue capabilities */

> +	struct {

> +		/** Maximum number of a plain queues. */

> +		uint32_t max_num;

> +

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

> +		  * simultaneously. The value of zero means

> unlimited. */

> +		uint32_t max_size;

> +

> +	} plain;

> +

> +	/** Scheduled queue capabilities */

> +	struct {

> +		/** Maximum number of a scheduled queues. */

> +		uint32_t max_num;

> +

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

> store

> +		  * simultaneously. The value of zero means

> unlimited. */

> +		uint32_t max_size;

> +

> +	} sched;

> +

>  } odp_queue_capability_t;

> 

>  /**

> @@ -165,6 +189,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.8.1
Savolainen, Petri (Nokia - FI/Espoo) April 11, 2017, 6:29 a.m. UTC | #2
Ping. Spec for queue size and capability.


> -----Original Message-----

> From: lng-odp [mailto:lng-odp-bounces@lists.linaro.org] On Behalf Of

> Savolainen, Petri (Nokia - FI/Espoo)

> Sent: Friday, April 07, 2017 10:53 AM

> To: lng-odp@lists.linaro.org

> Subject: Re: [lng-odp] [PATCH v3 1/2] api: queue: added queue size param

> 

> Ping.

> 

> > -----Original Message-----

> > From: lng-odp [mailto:lng-odp-bounces@lists.linaro.org] On Behalf Of

> Petri

> > Savolainen

> > Sent: Monday, April 03, 2017 1:11 PM

> > To: lng-odp@lists.linaro.org

> > Subject: [lng-odp] [PATCH v3 1/2] api: queue: added queue size param

> >

> > 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 | 35 ++++++++++++++++++++++++++++++++++-

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

> >

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

> > index 7972fea..9c83322 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. 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,28 @@ typedef struct odp_queue_capability_t {

> >  	/** Number of scheduling priorities */

> >  	unsigned sched_prios;

> >

> > +	/** Plain queue capabilities */

> > +	struct {

> > +		/** Maximum number of a plain queues. */

> > +		uint32_t max_num;

> > +

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

> > +		  * simultaneously. The value of zero means

> > unlimited. */

> > +		uint32_t max_size;

> > +

> > +	} plain;

> > +

> > +	/** Scheduled queue capabilities */

> > +	struct {

> > +		/** Maximum number of a scheduled queues. */

> > +		uint32_t max_num;

> > +

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

> > store

> > +		  * simultaneously. The value of zero means

> > unlimited. */

> > +		uint32_t max_size;

> > +

> > +	} sched;

> > +

> >  } odp_queue_capability_t;

> >

> >  /**

> > @@ -165,6 +189,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.8.1
Maxim Uvarov April 11, 2017, 9:47 a.m. UTC | #3
Petri,  whom review is needed for that?

Maxim.

On 11 April 2017 at 09:29, Savolainen, Petri (Nokia - FI/Espoo) <
petri.savolainen@nokia-bell-labs.com> wrote:

> Ping. Spec for queue size and capability.

>

>

> > -----Original Message-----

> > From: lng-odp [mailto:lng-odp-bounces@lists.linaro.org] On Behalf Of

> > Savolainen, Petri (Nokia - FI/Espoo)

> > Sent: Friday, April 07, 2017 10:53 AM

> > To: lng-odp@lists.linaro.org

> > Subject: Re: [lng-odp] [PATCH v3 1/2] api: queue: added queue size param

> >

> > Ping.

> >

> > > -----Original Message-----

> > > From: lng-odp [mailto:lng-odp-bounces@lists.linaro.org] On Behalf Of

> > Petri

> > > Savolainen

> > > Sent: Monday, April 03, 2017 1:11 PM

> > > To: lng-odp@lists.linaro.org

> > > Subject: [lng-odp] [PATCH v3 1/2] api: queue: added queue size param

> > >

> > > 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 | 35 ++++++++++++++++++++++++++++++++++-

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

> > >

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

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

> > > index 7972fea..9c83322 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. 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,28 @@ typedef struct odp_queue_capability_t {

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

> > >     unsigned sched_prios;

> > >

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

> > > +   struct {

> > > +           /** Maximum number of a plain queues. */

> > > +           uint32_t max_num;

> > > +

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

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

> > > unlimited. */

> > > +           uint32_t max_size;

> > > +

> > > +   } plain;

> > > +

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

> > > +   struct {

> > > +           /** Maximum number of a scheduled queues. */

> > > +           uint32_t max_num;

> > > +

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

> > > store

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

> > > unlimited. */

> > > +           uint32_t max_size;

> > > +

> > > +   } sched;

> > > +

> > >  } odp_queue_capability_t;

> > >

> > >  /**

> > > @@ -165,6 +189,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.8.1

>

>
Bill Fischofer April 11, 2017, 12:17 p.m. UTC | #4
On Tue, Apr 11, 2017 at 4:47 AM, Maxim Uvarov <maxim.uvarov@linaro.org> wrote:
> Petri,  whom review is needed for that?


We currently have conflicting approaches to this from Petri and
Honnappa. They need to come to some consensus on this to move forward.

>

> Maxim.

>

> On 11 April 2017 at 09:29, Savolainen, Petri (Nokia - FI/Espoo) <

> petri.savolainen@nokia-bell-labs.com> wrote:

>

>> Ping. Spec for queue size and capability.

>>

>>

>> > -----Original Message-----

>> > From: lng-odp [mailto:lng-odp-bounces@lists.linaro.org] On Behalf Of

>> > Savolainen, Petri (Nokia - FI/Espoo)

>> > Sent: Friday, April 07, 2017 10:53 AM

>> > To: lng-odp@lists.linaro.org

>> > Subject: Re: [lng-odp] [PATCH v3 1/2] api: queue: added queue size param

>> >

>> > Ping.

>> >

>> > > -----Original Message-----

>> > > From: lng-odp [mailto:lng-odp-bounces@lists.linaro.org] On Behalf Of

>> > Petri

>> > > Savolainen

>> > > Sent: Monday, April 03, 2017 1:11 PM

>> > > To: lng-odp@lists.linaro.org

>> > > Subject: [lng-odp] [PATCH v3 1/2] api: queue: added queue size param

>> > >

>> > > 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 | 35 ++++++++++++++++++++++++++++++++++-

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

>> > >

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

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

>> > > index 7972fea..9c83322 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. 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,28 @@ typedef struct odp_queue_capability_t {

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

>> > >     unsigned sched_prios;

>> > >

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

>> > > +   struct {

>> > > +           /** Maximum number of a plain queues. */

>> > > +           uint32_t max_num;

>> > > +

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

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

>> > > unlimited. */

>> > > +           uint32_t max_size;

>> > > +

>> > > +   } plain;

>> > > +

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

>> > > +   struct {

>> > > +           /** Maximum number of a scheduled queues. */

>> > > +           uint32_t max_num;

>> > > +

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

>> > > store

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

>> > > unlimited. */

>> > > +           uint32_t max_size;

>> > > +

>> > > +   } sched;

>> > > +

>> > >  } odp_queue_capability_t;

>> > >

>> > >  /**

>> > > @@ -165,6 +189,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.8.1

>>

>>
Savolainen, Petri (Nokia - FI/Espoo) April 11, 2017, 12:22 p.m. UTC | #5
> -----Original Message-----

> From: Bill Fischofer [mailto:bill.fischofer@linaro.org]

> Sent: Tuesday, April 11, 2017 3:18 PM

> To: Maxim Uvarov <maxim.uvarov@linaro.org>; Honnappa Nagarahalli

> <honnappa.nagarahalli@linaro.org>

> Cc: Savolainen, Petri (Nokia - FI/Espoo) <petri.savolainen@nokia-bell-

> labs.com>; lng-odp@lists.linaro.org

> Subject: Re: [lng-odp] [PATCH v3 1/2] api: queue: added queue size param

> 

> On Tue, Apr 11, 2017 at 4:47 AM, Maxim Uvarov <maxim.uvarov@linaro.org>

> wrote:

> > Petri,  whom review is needed for that?

> 

> We currently have conflicting approaches to this from Petri and

> Honnappa. They need to come to some consensus on this to move forward.

> 


This is my proposal to move forward. What is conflicting here with Honappa's proposal? This should cover his requirement, right?

-Petri
Bill Fischofer April 12, 2017, 3:19 p.m. UTC | #6
Based on today's ARCH call, this seems to be a good approach, with
some slight wording clarification (noted below)

On Mon, Apr 3, 2017 at 5:11 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 | 35 ++++++++++++++++++++++++++++++++++-

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

>

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

> index 7972fea..9c83322 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. Use this in addition to

> +         * queue type specific 'max_num', if both queue types are used

> +         * simultaneously. */

>         uint32_t max_queues;


These fields tell the application how many queues it is guaranteed to
be able to create, hence this is really a minimum number, not a
maximum number. An application may in fact be able to create more, but
it's guaranteed to be able to create at least this number. So I
suggest the following rename/rewording to clarify this point.

             /** Minimum guaranteed number of event queues of any
type. Use this in addition to
              * queue type specific 'min_num', if both queue types are
used simultaneously */
            uint32_t min_queues;

>

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

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

>         /** Number of scheduling priorities */

>         unsigned sched_prios;

>

> +       /** Plain queue capabilities */

> +       struct {

> +               /** Maximum number of a plain queues. */

> +               uint32_t max_num;


                    /** Minimum guaranteed number of plain queues that
may be created in this ODP instance */
                    uint32_t min_num;

> +

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

> +                 * simultaneously. The value of zero means unlimited. */

> +               uint32_t max_size;

> +

> +       } plain;

> +

> +       /** Scheduled queue capabilities */

> +       struct {

> +               /** Maximum number of a scheduled queues. */

> +               uint32_t max_num;


                    /** Minimum guaranteed number of scheduled queues
that may be created in this ODP instance */
                    uint32_t min_num;

> +

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

> +                 * simultaneously. The value of zero means unlimited. */

> +               uint32_t max_size;

> +

> +       } sched;

> +

>  } odp_queue_capability_t;

>

>  /**

> @@ -165,6 +189,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.8.1

>
Honnappa Nagarahalli April 13, 2017, 4:13 a.m. UTC | #7
Small change as noted below.


On 12 April 2017 at 10:19, Bill Fischofer <bill.fischofer@linaro.org> wrote:
> Based on today's ARCH call, this seems to be a good approach, with

> some slight wording clarification (noted below)

>

> On Mon, Apr 3, 2017 at 5:11 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 | 35 ++++++++++++++++++++++++++++++++++-

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

>>

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

>> index 7972fea..9c83322 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. Use this in addition to

>> +         * queue type specific 'max_num', if both queue types are used

>> +         * simultaneously. */

>>         uint32_t max_queues;

>

> These fields tell the application how many queues it is guaranteed to

> be able to create, hence this is really a minimum number, not a

> maximum number. An application may in fact be able to create more, but

> it's guaranteed to be able to create at least this number. So I

> suggest the following rename/rewording to clarify this point.

>

>              /** Minimum guaranteed number of event queues of any

> type. Use this in addition to

>               * queue type specific 'min_num', if both queue types are

> used simultaneously */

>             uint32_t min_queues;

>

>>

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

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

>>         /** Number of scheduling priorities */

>>         unsigned sched_prios;

>>

>> +       /** Plain queue capabilities */

>> +       struct {

>> +               /** Maximum number of a plain queues. */

>> +               uint32_t max_num;

>

>                     /** Minimum guaranteed number of plain queues that

> may be created in this ODP instance */

>                     uint32_t min_num;

>

>> +

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

>> +                 * simultaneously. The value of zero means unlimited. */

>> +               uint32_t max_size;


Can we change the wording to say "The value of zero means limited only
by available resources" or "The value of zero means limited only by
available memory"

This will make it consistent/similar with wordings in other files (for
ex: pool capabilities)

>> +

>> +       } plain;

>> +

>> +       /** Scheduled queue capabilities */

>> +       struct {

>> +               /** Maximum number of a scheduled queues. */

>> +               uint32_t max_num;

>

>                     /** Minimum guaranteed number of scheduled queues

> that may be created in this ODP instance */

>                     uint32_t min_num;

>

>> +

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

>> +                 * simultaneously. The value of zero means unlimited. */

>> +               uint32_t max_size;

>> +

>> +       } sched;

>> +

>>  } odp_queue_capability_t;

>>

>>  /**

>> @@ -165,6 +189,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.8.1

>>
Balasubramanian Manoharan April 13, 2017, 5:19 a.m. UTC | #8
Regards,
Bala


On 3 April 2017 at 15:41, 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 | 35 ++++++++++++++++++++++++++++++++++-

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

>

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

> index 7972fea..9c83322 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. 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,28 @@ typedef struct odp_queue_capability_t {

>         /** Number of scheduling priorities */

>         unsigned sched_prios;

>

> +       /** Plain queue capabilities */

> +       struct {

> +               /** Maximum number of a plain queues. */

> +               uint32_t max_num;

> +

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

> +                 * simultaneously. The value of zero means unlimited. */


As discussed in the ARCH call, I believe the above wordings needs to
be updated to indicate the physical limitation
in the system.

> +               uint32_t max_size;

> +

> +       } plain;

> +

> +       /** Scheduled queue capabilities */

> +       struct {

> +               /** Maximum number of a scheduled queues. */

> +               uint32_t max_num;

> +

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

> +                 * simultaneously. The value of zero means unlimited. */

> +               uint32_t max_size;

> +

> +       } sched;

> +

>  } odp_queue_capability_t;

>

>  /**

> @@ -165,6 +189,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.8.1

>
diff mbox series

Patch

diff --git a/include/odp/api/spec/queue.h b/include/odp/api/spec/queue.h
index 7972fea..9c83322 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. 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,28 @@  typedef struct odp_queue_capability_t {
 	/** Number of scheduling priorities */
 	unsigned sched_prios;
 
+	/** Plain queue capabilities */
+	struct {
+		/** Maximum number of a plain queues. */
+		uint32_t max_num;
+
+		/** Maximum number of events a plain queue can store
+		  * simultaneously. The value of zero means unlimited. */
+		uint32_t max_size;
+
+	} plain;
+
+	/** Scheduled queue capabilities */
+	struct {
+		/** Maximum number of a scheduled queues. */
+		uint32_t max_num;
+
+		/** Maximum number of events a scheduled queue can store
+		  * simultaneously. The value of zero means unlimited. */
+		uint32_t max_size;
+
+	} sched;
+
 } odp_queue_capability_t;
 
 /**
@@ -165,6 +189,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;
 
 /**