aboutsummaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
authorPetri Savolainen <petri.savolainen@linaro.org>2018-10-17 13:13:20 +0300
committerMaxim Uvarov <maxim.uvarov@linaro.org>2018-10-18 17:26:39 +0300
commit7e188187a77fa9bab56f1407eb660c324736cd34 (patch)
tree8ca2ac61bb2d3ea5b0ac47f5957a735ac3ad46b3 /platform
parent031802ec0c5e3e44d70aee7b19e0cd1055c9fe0b (diff)
linux-gen: config: move queue size config to scalable
Only scalable queues use build time the queue size config. Move it to scalable config file. Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Diffstat (limited to 'platform')
-rw-r--r--platform/linux-generic/include/odp_config_internal.h7
-rw-r--r--platform/linux-generic/include/odp_schedule_scalable_config.h3
-rw-r--r--platform/linux-generic/odp_queue_scalable.c9
3 files changed, 8 insertions, 11 deletions
diff --git a/platform/linux-generic/include/odp_config_internal.h b/platform/linux-generic/include/odp_config_internal.h
index 8ceb325b2..7a573bd76 100644
--- a/platform/linux-generic/include/odp_config_internal.h
+++ b/platform/linux-generic/include/odp_config_internal.h
@@ -27,13 +27,6 @@ extern "C" {
#define ODP_CONFIG_QUEUES 1024
/*
- * Maximum queue depth. Maximum number of elements that can be stored in a
- * queue. This value is used only when the size is not explicitly provided
- * during queue creation.
- */
-#define CONFIG_QUEUE_SIZE 4096
-
-/*
* Maximum number of ordered locks per queue
*/
#define CONFIG_QUEUE_MAX_ORD_LOCKS 2
diff --git a/platform/linux-generic/include/odp_schedule_scalable_config.h b/platform/linux-generic/include/odp_schedule_scalable_config.h
index a84dc0724..3462d047b 100644
--- a/platform/linux-generic/include/odp_schedule_scalable_config.h
+++ b/platform/linux-generic/include/odp_schedule_scalable_config.h
@@ -9,6 +9,9 @@
#ifndef ODP_SCHEDULE_SCALABLE_CONFIG_H_
#define ODP_SCHEDULE_SCALABLE_CONFIG_H_
+/* Maximum number of events that can be stored in a queue */
+#define CONFIG_SCAL_QUEUE_SIZE 4096
+
/*
* Default scaling factor for the scheduler group
*
diff --git a/platform/linux-generic/odp_queue_scalable.c b/platform/linux-generic/odp_queue_scalable.c
index bbc57e44d..b7ff2195f 100644
--- a/platform/linux-generic/odp_queue_scalable.c
+++ b/platform/linux-generic/odp_queue_scalable.c
@@ -110,7 +110,7 @@ static int queue_init(queue_entry_t *queue, const char *name,
sched_elem = &queue->s.sched_elem;
ring_size = param->size > 0 ?
- ROUNDUP_POWER2_U32(param->size) : CONFIG_QUEUE_SIZE;
+ ROUNDUP_POWER2_U32(param->size) : CONFIG_SCAL_QUEUE_SIZE;
strncpy(queue->s.name, name ? name : "", ODP_QUEUE_NAME_LEN - 1);
queue->s.name[ODP_QUEUE_NAME_LEN - 1] = 0;
memcpy(&queue->s.param, param, sizeof(odp_queue_param_t));
@@ -212,15 +212,16 @@ static int queue_init_global(void)
/* Add size of the array holding the queues */
pool_size = sizeof(queue_table_t);
/* Add storage required for queues */
- pool_size += (CONFIG_QUEUE_SIZE * sizeof(odp_buffer_hdr_t *)) *
- ODP_CONFIG_QUEUES;
+ pool_size += (CONFIG_SCAL_QUEUE_SIZE *
+ sizeof(odp_buffer_hdr_t *)) * ODP_CONFIG_QUEUES;
+
/* Add the reorder window size */
pool_size += sizeof(reorder_window_t) * ODP_CONFIG_QUEUES;
/* Choose min_alloc and max_alloc such that buddy allocator is
* is selected.
*/
min_alloc = 0;
- max_alloc = CONFIG_QUEUE_SIZE * sizeof(odp_buffer_hdr_t *);
+ max_alloc = CONFIG_SCAL_QUEUE_SIZE * sizeof(odp_buffer_hdr_t *);
queue_shm_pool = _odp_ishm_pool_create("queue_shm_pool",
pool_size,
min_alloc, max_alloc,