-/*-
- * SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2010-2014 Intel Corporation
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2017 Intel Corporation
*/
#ifndef _OPDL_H_
* packets.
*
* A opdl_ring can be used as the basis for pipeline based applications. Instead
- * of each stage in a pipeline dequeueing from a ring, processing and enqueueing
+ * of each stage in a pipeline dequeuing from a ring, processing and enqueuing
* to another ring, it can process entries in-place on the ring. If stages do
* not depend on each other, they can run in parallel.
*
* Enabling this may have a negative impact on performance if only one thread
* will be processing this stage.
* @param is_input
- * Indication to nitialise the stage with all slots available or none
+ * Indication to initialise the stage with all slots available or none
*
* @return
* A pointer to the new stage, or NULL on error.
struct opdl_stage *
opdl_stage_create(struct opdl_ring *t, bool threadsafe);
+
+/**
+ * Set the internal queue id for each stage instance.
+ *
+ * @param s
+ * The pointer of stage instance.
+ *
+ * @param queue_id
+ * The value of internal queue id.
+ */
+void
+opdl_stage_set_queue_id(struct opdl_stage *s,
+ uint32_t queue_id);
+
/**
* Prints information on opdl_ring instance and all its stages
*
* Compare the event descriptor with original version in the ring.
* if key field event descriptor is changed by application, then
* update the slot in the ring otherwise do nothing with it.
- * the key field is flow_id, prioirty, mbuf, impl_opaque
+ * the key field is flow_id, priority, mbuf, impl_opaque
*
* @param s
* The opdl_stage.
* @param atomic
* queue type associate with the stage.
* @return
- * if the evevnt key field is changed compare with previous record.
+ * if the event key field is changed compare with previous record.
*/
bool
-opdl_ring_cas_slot(const struct opdl_stage *s, const struct rte_event *ev,
+opdl_ring_cas_slot(struct opdl_stage *s, const struct rte_event *ev,
uint32_t index, bool atomic);
#ifdef __cplusplus