Application cannot dequeue from sink queues, it can only enqueue.
This queue type can be used for packet output, but also for other
ODP features that will consume all enqueued events.

Signed-off-by: Petri Savolainen <[email protected]>
---
 include/odp/api/queue.h                               | 9 +++++++++
 platform/linux-generic/include/odp/plat/queue_types.h | 7 +++++--
 2 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/include/odp/api/queue.h b/include/odp/api/queue.h
index 86fb6e1..3161e69 100644
--- a/include/odp/api/queue.h
+++ b/include/odp/api/queue.h
@@ -62,6 +62,15 @@ extern "C" {
  */
 
 /**
+ * @def ODP_QUEUE_TYPE_SINK
+ * Sink queue
+ *
+ * Application can only enqueue into sink queues. Application cannot dequeue
+ * (directly or through scheduler) from these queues. ODP consumes all events
+ * enqueued to a sink queue.
+ */
+
+/**
  * @def ODP_QUEUE_TYPE_PKTIN
  * Packet input queue
  */
diff --git a/platform/linux-generic/include/odp/plat/queue_types.h 
b/platform/linux-generic/include/odp/plat/queue_types.h
index d1ebc9c..bcc11f7 100644
--- a/platform/linux-generic/include/odp/plat/queue_types.h
+++ b/platform/linux-generic/include/odp/plat/queue_types.h
@@ -38,8 +38,11 @@ typedef int odp_queue_type_t;
 
 #define ODP_QUEUE_TYPE_SCHED  0
 #define ODP_QUEUE_TYPE_DIRECT 1
-#define ODP_QUEUE_TYPE_PKTIN  2
-#define ODP_QUEUE_TYPE_PKTOUT 3
+#define ODP_QUEUE_TYPE_SINK   2
+/* These two (PKTIN, PKTOUT) will be removed. SINK will new used as pktout.
+ * TM implementation definition ODP_QUEUE_TYPE_TM 4 bleeds through */
+#define ODP_QUEUE_TYPE_PKTIN  3
+#define ODP_QUEUE_TYPE_PKTOUT 5
 
 /**
  * @def ODP_QUEUE_TYPE_TM
-- 
2.6.3

_______________________________________________
lng-odp mailing list
[email protected]
https://lists.linaro.org/mailman/listinfo/lng-odp

Reply via email to