diff mbox series

[API-NEXT,v2,04/16] helper: cuckootable: Specify queue ring_size

Message ID 20170404184808.59470-5-brian.brooks@arm.com
State New
Headers show
Series None | expand

Commit Message

Brian Brooks April 4, 2017, 6:47 p.m. UTC
From: Ola Liljedahl <ola.liljedahl@arm.com>


The cuckoo code may enqueue a million events onto a queue.

When queues are implemented as bounded buffers, a default
queue size can be used during queue create, otherwise this
information needs to be passed down from the application.

The reverse information flow, default queue size passed up
to the application via capabilities, currently has no known
use case.

Signed-off-by: Ola Liljedahl <ola.liljedahl@arm.com>

Reviewed-by: Brian Brooks <brian.brooks@arm.com>

Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>

---
 helper/cuckootable.c | 1 +
 1 file changed, 1 insertion(+)

-- 
2.12.2
diff mbox series

Patch

diff --git a/helper/cuckootable.c b/helper/cuckootable.c
index 80ff4989..d3d1563c 100644
--- a/helper/cuckootable.c
+++ b/helper/cuckootable.c
@@ -256,6 +256,7 @@  odph_cuckoo_table_create(
 	/* initialize free_slots queue */
 	odp_queue_param_init(&qparam);
 	qparam.type = ODP_QUEUE_TYPE_PLAIN;
+	qparam.ring_size = capacity;
 
 	snprintf(queue_name, sizeof(queue_name), "fs_%s", name);
 	queue = odp_queue_create(queue_name, &qparam);