From 91cb5789cce4a4dd8228d6a1c2ea24ed64e13b49 Mon Sep 17 00:00:00 2001 From: Matias Elo Date: Mon, 25 Sep 2023 09:22:24 +0300 Subject: [PATCH] api: queue: clarify odp_queue_param_t default value specification 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 Reviewed-by: Petri Savolainen Reviewed-by: Pavan Nikhilesh --- include/odp/api/spec/queue.h | 11 +++++------ include/odp/api/spec/queue_types.h | 4 ++-- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/include/odp/api/spec/queue.h b/include/odp/api/spec/queue.h index 32d13b0bcc..95832de071 100644 --- a/include/odp/api/spec/queue.h +++ b/include/odp/api/spec/queue.h @@ -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. diff --git a/include/odp/api/spec/queue_types.h b/include/odp/api/spec/queue_types.h index 6dd31e6813..5f84a5f490 100644 --- a/include/odp/api/spec/queue_types.h +++ b/include/odp/api/spec/queue_types.h @@ -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 @@ -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;