Skip to content

Commit

Permalink
api: queue: clarify odp_queue_param_t default value specification
Browse files Browse the repository at this point in the history
Move default queue type specification from odp_queue_create() to
odp_queue_param_t to make it conform with the other parameters.

Also, explicitly state that queue size default value is zero. This was
already tested by the validation test.

Signed-off-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
Reviewed-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
  • Loading branch information
MatiasElo committed Oct 20, 2023
1 parent a90db16 commit a1f172a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
11 changes: 5 additions & 6 deletions include/odp/api/spec/queue.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,11 @@ extern "C" {
/**
* Queue create
*
* Create a queue according to the queue parameters. Queue type is specified by
* queue parameter 'type'. Use odp_queue_param_init() to initialize parameters
* into their default values. Default values are also used when 'param' pointer
* is NULL. The default queue type is ODP_QUEUE_TYPE_PLAIN. The use of queue
* name is optional. Unique names are not required. However, odp_queue_lookup()
* returns only a single matching queue.
* Create a queue according to the queue parameters. The use of queue name is
* optional. Unique names are not required. However, odp_queue_lookup() returns
* only a single matching queue. Use odp_queue_param_init() to initialize
* parameters into their default values. Default values are also used when
* 'param' pointer is NULL.
*
* @param name Name of the queue or NULL. Maximum string length is
* ODP_QUEUE_NAME_LEN.
Expand Down
4 changes: 2 additions & 2 deletions include/odp/api/spec/queue_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ typedef struct odp_queue_param_t {
/** Queue type
*
* Valid values for other parameters in this structure depend on
* the queue type. */
* the queue type. The default value is ODP_QUEUE_TYPE_PLAIN. */
odp_queue_type_t type;

/** Enqueue mode
Expand Down Expand Up @@ -288,7 +288,7 @@ typedef struct odp_queue_param_t {
* 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. */
* default size. The default value is 0. */
uint32_t size;

} odp_queue_param_t;
Expand Down

0 comments on commit a1f172a

Please sign in to comment.