diff mbox series

[API-NEXT,1/2] api: queue: added queue size param

Message ID 1490959999-22930-1-git-send-email-petri.savolainen@linaro.org
State Superseded
Headers show
Series [API-NEXT,1/2] api: queue: added queue size param | expand

Commit Message

Petri Savolainen March 31, 2017, 11:33 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 | 31 ++++++++++++++++++++++++++++++-
 1 file changed, 30 insertions(+), 1 deletion(-)

-- 
2.8.1

Comments

Savolainen, Petri (Nokia - FI/Espoo) March 31, 2017, 11:47 a.m. UTC | #1
This has a small doxygen issue. Fixed that on v2.
diff mbox series

Patch

diff --git a/include/odp/api/spec/queue.h b/include/odp/api/spec/queue.h
index 7972fea..fea72ca 100644
--- a/include/odp/api/spec/queue.h
+++ b/include/odp/api/spec/queue.h
@@ -100,7 +100,7 @@  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 */
 	uint32_t max_queues;
 
 	/** Maximum number of ordered locks per queue */
@@ -112,6 +112,26 @@  typedef struct odp_queue_capability_t {
 	/** Number of scheduling priorities */
 	unsigned sched_prios;
 
+	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;
+
+	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 +185,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 in 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;
 
 /**