[API-NEXT,v1,API-NEXT,v1,1/3] convert queue APIs and internal fns to pointer tbl

Message ID 1496084407-9792-2-git-send-email-odpbot@yandex.ru
State New
Headers show
Series
  • Modular queue interface
Related show

Commit Message

Github ODP bot May 29, 2017, 7 p.m.
From: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>


Queue APIs and functions towards the internal components are converted into function pointers and function pointer tables

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

---
/** Email created from pull request 43 (nagarahalli:api-next-mod-queue1)
 ** https://github.com/Linaro/odp/pull/43
 ** Patch: https://github.com/Linaro/odp/pull/43.patch
 ** Base sha: 552817483e9d4b6a84d49960920f1de50029f111
 ** Merge commit sha: 45b775366fd2c3c85b8e1a4c3e661cc26deb5a71
 **/
 .../linux-generic/include/odp_queue_internal.h     |  8 +-
 platform/linux-generic/include/odp_schedule_if.h   | 43 ++++++++++
 platform/linux-generic/odp_init.c                  |  4 +-
 platform/linux-generic/odp_packet_io.c             | 12 +--
 platform/linux-generic/odp_queue.c                 | 88 +++++++++++++-------
 platform/linux-generic/odp_schedule.c              |  2 +-
 platform/linux-generic/odp_schedule_if.c           | 96 ++++++++++++++++++++++
 platform/linux-generic/odp_schedule_iquery.c       |  2 +-
 platform/linux-generic/pktio/loop.c                |  4 +-
 9 files changed, 215 insertions(+), 44 deletions(-)

Patch hide | download patch | download mbox

diff --git a/platform/linux-generic/include/odp_queue_internal.h b/platform/linux-generic/include/odp_queue_internal.h
index 560f826e..759d36e0 100644
--- a/platform/linux-generic/include/odp_queue_internal.h
+++ b/platform/linux-generic/include/odp_queue_internal.h
@@ -85,11 +85,11 @@  union queue_entry_u {
 
 queue_entry_t *get_qentry(uint32_t queue_id);
 
-int queue_enq(queue_entry_t *queue, odp_buffer_hdr_t *buf_hdr);
-odp_buffer_hdr_t *queue_deq(queue_entry_t *queue);
+int _queue_enq(queue_entry_t *queue, odp_buffer_hdr_t *buf_hdr);
+odp_buffer_hdr_t *_queue_deq(queue_entry_t *queue);
 
-int queue_enq_multi(queue_entry_t *queue, odp_buffer_hdr_t *buf_hdr[], int num);
-int queue_deq_multi(queue_entry_t *queue, odp_buffer_hdr_t *buf_hdr[], int num);
+int _queue_enq_multi(queue_entry_t *queue, odp_buffer_hdr_t *buf_hdr[], int num);
+int _queue_deq_multi(queue_entry_t *queue, odp_buffer_hdr_t *buf_hdr[], int num);
 
 void queue_lock(queue_entry_t *queue);
 void queue_unlock(queue_entry_t *queue);
diff --git a/platform/linux-generic/include/odp_schedule_if.h b/platform/linux-generic/include/odp_schedule_if.h
index 530d157f..e5d76103 100644
--- a/platform/linux-generic/include/odp_schedule_if.h
+++ b/platform/linux-generic/include/odp_schedule_if.h
@@ -15,6 +15,49 @@  extern "C" {
 #include <odp_queue_internal.h>
 #include <odp/api/schedule.h>
 
+/* Internal abstract queue type */
+typedef void* queue_t;
+
+/* Queue API functions */
+typedef struct {
+	odp_queue_t (*queue_create)(const char *name,
+				    const odp_queue_param_t *param);
+	int (*queue_destroy)(odp_queue_t queue);
+	odp_queue_t (*queue_lookup)(const char *name);
+	int (*queue_capability)(odp_queue_capability_t *capa);
+	int (*queue_context_set)(odp_queue_t queue, void *context,
+				     uint32_t len);
+	void *(*queue_context)(odp_queue_t queue);
+	int (*queue_enq)(odp_queue_t queue, odp_event_t ev);
+	int (*queue_enq_multi)(odp_queue_t queue, const odp_event_t events[],
+			       int num);
+	odp_event_t (*queue_deq)(odp_queue_t queue);
+	int (*queue_deq_multi)(odp_queue_t queue, odp_event_t events[],
+				   int num);
+	odp_queue_type_t (*queue_type)(odp_queue_t queue);
+	odp_schedule_sync_t (*queue_sched_type)(odp_queue_t queue);
+	odp_schedule_prio_t (*queue_sched_prio)(odp_queue_t queue);
+	odp_schedule_group_t (*queue_sched_group)(odp_queue_t queue);
+	int (*queue_lock_count)(odp_queue_t queue);
+	uint64_t (*queue_to_u64)(odp_queue_t hdl);
+	void (*queue_param_init)(odp_queue_param_t *param);
+	int (*queue_info)(odp_queue_t queue, odp_queue_info_t *info);
+} queue_api_t;
+
+/* Queue functions towards other internal components */
+typedef struct {
+	int (*queue_init_global)(void);
+	int (*queue_term_global)(void);
+	int (*queue_enq)(queue_entry_t *queue, odp_buffer_hdr_t *buf_hdr);
+	int (*queue_enq_multi)(queue_entry_t *queue,
+			       odp_buffer_hdr_t *buf_hdr[], int num);
+	odp_buffer_hdr_t *(*queue_deq)(queue_entry_t *queue);
+	int (*queue_deq_multi)(queue_entry_t *queue,
+			       odp_buffer_hdr_t *buf_hdr[], int num);
+} queue_fn_t;
+
+const queue_fn_t *queue_fn;
+
 typedef void (*schedule_pktio_start_fn_t)(int pktio_index, int num_in_queue,
 					  int in_queue_idx[]);
 typedef int (*schedule_thr_add_fn_t)(odp_schedule_group_t group, int thr);
diff --git a/platform/linux-generic/odp_init.c b/platform/linux-generic/odp_init.c
index 685e02fa..73ba65e6 100644
--- a/platform/linux-generic/odp_init.c
+++ b/platform/linux-generic/odp_init.c
@@ -218,7 +218,7 @@  int odp_init_global(odp_instance_t *instance,
 	}
 	stage = POOL_INIT;
 
-	if (odp_queue_init_global()) {
+	if (queue_fn->queue_init_global()) {
 		ODP_ERR("ODP queue init failed.\n");
 		goto init_failed;
 	}
@@ -346,7 +346,7 @@  int _odp_term_global(enum init_stage stage)
 		/* Fall through */
 
 	case QUEUE_INIT:
-		if (odp_queue_term_global()) {
+		if (queue_fn->queue_term_global()) {
 			ODP_ERR("ODP queue term failed.\n");
 			rc = -1;
 		}
diff --git a/platform/linux-generic/odp_packet_io.c b/platform/linux-generic/odp_packet_io.c
index 877978ba..4d1ab519 100644
--- a/platform/linux-generic/odp_packet_io.c
+++ b/platform/linux-generic/odp_packet_io.c
@@ -572,7 +572,7 @@  static inline int pktin_recv_buf(odp_pktin_queue_t queue,
 			int ret;
 
 			dst_queue = queue_to_qentry(pkt_hdr->dst_queue);
-			ret = queue_enq(dst_queue, buf_hdr);
+			ret = queue_fn->queue_enq(dst_queue, buf_hdr);
 			if (ret < 0)
 				odp_packet_free(pkt);
 			continue;
@@ -641,7 +641,7 @@  odp_buffer_hdr_t *pktin_dequeue(queue_entry_t *qentry)
 	odp_buffer_hdr_t *hdr_tbl[QUEUE_MULTI_MAX];
 	int pkts;
 
-	buf_hdr = queue_deq(qentry);
+	buf_hdr = queue_fn->queue_deq(qentry);
 	if (buf_hdr != NULL)
 		return buf_hdr;
 
@@ -651,7 +651,7 @@  odp_buffer_hdr_t *pktin_dequeue(queue_entry_t *qentry)
 		return NULL;
 
 	if (pkts > 1)
-		queue_enq_multi(qentry, &hdr_tbl[1], pkts - 1);
+		queue_fn->queue_enq_multi(qentry, &hdr_tbl[1], pkts - 1);
 	buf_hdr = hdr_tbl[0];
 	return buf_hdr;
 }
@@ -669,7 +669,7 @@  int pktin_deq_multi(queue_entry_t *qentry, odp_buffer_hdr_t *buf_hdr[], int num)
 	odp_buffer_hdr_t *hdr_tbl[QUEUE_MULTI_MAX];
 	int pkts, i, j;
 
-	nbr = queue_deq_multi(qentry, buf_hdr, num);
+	nbr = queue_fn->queue_deq_multi(qentry, buf_hdr, num);
 	if (odp_unlikely(nbr > num))
 		ODP_ABORT("queue_deq_multi req: %d, returned %d\n", num, nbr);
 
@@ -691,7 +691,7 @@  int pktin_deq_multi(queue_entry_t *qentry, odp_buffer_hdr_t *buf_hdr[], int num)
 		hdr_tbl[j] = hdr_tbl[i];
 
 	if (j)
-		queue_enq_multi(qentry, hdr_tbl, j);
+		queue_fn->queue_enq_multi(qentry, hdr_tbl, j);
 	return nbr;
 }
 
@@ -729,7 +729,7 @@  int sched_cb_pktin_poll(int pktio_index, int num_queue, int index[])
 
 		queue = entry->s.in_queue[index[idx]].queue;
 		qentry = queue_to_qentry(queue);
-		queue_enq_multi(qentry, hdr_tbl, num);
+		queue_fn->queue_enq_multi(qentry, hdr_tbl, num);
 	}
 
 	return 0;
diff --git a/platform/linux-generic/odp_queue.c b/platform/linux-generic/odp_queue.c
index dd430cd1..928d767a 100644
--- a/platform/linux-generic/odp_queue.c
+++ b/platform/linux-generic/odp_queue.c
@@ -89,10 +89,10 @@  static int queue_init(queue_entry_t *queue, const char *name,
 	}
 	queue->s.type = queue->s.param.type;
 
-	queue->s.enqueue = queue_enq;
-	queue->s.dequeue = queue_deq;
-	queue->s.enqueue_multi = queue_enq_multi;
-	queue->s.dequeue_multi = queue_deq_multi;
+	queue->s.enqueue = _queue_enq;
+	queue->s.dequeue = _queue_deq;
+	queue->s.enqueue_multi = _queue_enq_multi;
+	queue->s.dequeue_multi = _queue_deq_multi;
 
 	queue->s.pktin = PKTIN_INVALID;
 	queue->s.pktout = PKTOUT_INVALID;
@@ -104,7 +104,7 @@  static int queue_init(queue_entry_t *queue, const char *name,
 }
 
 
-int odp_queue_init_global(void)
+static int queue_init_global(void)
 {
 	uint32_t i;
 	odp_shm_t shm;
@@ -141,7 +141,7 @@  int odp_queue_init_global(void)
 	return 0;
 }
 
-int odp_queue_term_global(void)
+static int queue_term_global(void)
 {
 	int ret = 0;
 	int rc = 0;
@@ -167,7 +167,7 @@  int odp_queue_term_global(void)
 	return rc;
 }
 
-int odp_queue_capability(odp_queue_capability_t *capa)
+static int queue_capability(odp_queue_capability_t *capa)
 {
 	memset(capa, 0, sizeof(odp_queue_capability_t));
 
@@ -182,7 +182,7 @@  int odp_queue_capability(odp_queue_capability_t *capa)
 	return 0;
 }
 
-odp_queue_type_t odp_queue_type(odp_queue_t handle)
+static odp_queue_type_t queue_type(odp_queue_t handle)
 {
 	queue_entry_t *queue;
 
@@ -191,7 +191,7 @@  odp_queue_type_t odp_queue_type(odp_queue_t handle)
 	return queue->s.type;
 }
 
-odp_schedule_sync_t odp_queue_sched_type(odp_queue_t handle)
+static odp_schedule_sync_t queue_sched_type(odp_queue_t handle)
 {
 	queue_entry_t *queue;
 
@@ -200,7 +200,7 @@  odp_schedule_sync_t odp_queue_sched_type(odp_queue_t handle)
 	return queue->s.param.sched.sync;
 }
 
-odp_schedule_prio_t odp_queue_sched_prio(odp_queue_t handle)
+static odp_schedule_prio_t queue_sched_prio(odp_queue_t handle)
 {
 	queue_entry_t *queue;
 
@@ -209,7 +209,7 @@  odp_schedule_prio_t odp_queue_sched_prio(odp_queue_t handle)
 	return queue->s.param.sched.prio;
 }
 
-odp_schedule_group_t odp_queue_sched_group(odp_queue_t handle)
+static odp_schedule_group_t queue_sched_group(odp_queue_t handle)
 {
 	queue_entry_t *queue;
 
@@ -218,7 +218,7 @@  odp_schedule_group_t odp_queue_sched_group(odp_queue_t handle)
 	return queue->s.param.sched.group;
 }
 
-int odp_queue_lock_count(odp_queue_t handle)
+static int queue_lock_count(odp_queue_t handle)
 {
 	queue_entry_t *queue = queue_to_qentry(handle);
 
@@ -226,7 +226,7 @@  int odp_queue_lock_count(odp_queue_t handle)
 		(int)queue->s.param.sched.lock_count : -1;
 }
 
-odp_queue_t odp_queue_create(const char *name, const odp_queue_param_t *param)
+static odp_queue_t queue_create(const char *name, const odp_queue_param_t *param)
 {
 	uint32_t i;
 	queue_entry_t *queue;
@@ -291,7 +291,7 @@  void sched_cb_queue_destroy_finalize(uint32_t queue_index)
 	UNLOCK(&queue->s.lock);
 }
 
-int odp_queue_destroy(odp_queue_t handle)
+static int queue_destroy(odp_queue_t handle)
 {
 	queue_entry_t *queue;
 	queue = queue_to_qentry(handle);
@@ -343,7 +343,7 @@  int odp_queue_destroy(odp_queue_t handle)
 	return 0;
 }
 
-int odp_queue_context_set(odp_queue_t handle, void *context,
+static int queue_context_set(odp_queue_t handle, void *context,
 			  uint32_t len ODP_UNUSED)
 {
 	queue_entry_t *queue;
@@ -354,14 +354,14 @@  int odp_queue_context_set(odp_queue_t handle, void *context,
 	return 0;
 }
 
-void *odp_queue_context(odp_queue_t handle)
+static void *queue_context(odp_queue_t handle)
 {
 	queue_entry_t *queue;
 	queue = queue_to_qentry(handle);
 	return queue->s.param.context;
 }
 
-odp_queue_t odp_queue_lookup(const char *name)
+static odp_queue_t queue_lookup(const char *name)
 {
 	uint32_t i;
 
@@ -460,12 +460,12 @@  static inline int enq_multi(queue_entry_t *queue, odp_buffer_hdr_t *buf_hdr[],
 	return num; /* All events enqueued */
 }
 
-int queue_enq_multi(queue_entry_t *queue, odp_buffer_hdr_t *buf_hdr[], int num)
+int _queue_enq_multi(queue_entry_t *queue, odp_buffer_hdr_t *buf_hdr[], int num)
 {
 	return enq_multi(queue, buf_hdr, num);
 }
 
-int queue_enq(queue_entry_t *queue, odp_buffer_hdr_t *buf_hdr)
+int _queue_enq(queue_entry_t *queue, odp_buffer_hdr_t *buf_hdr)
 {
 	int ret;
 
@@ -477,7 +477,7 @@  int queue_enq(queue_entry_t *queue, odp_buffer_hdr_t *buf_hdr)
 		return -1;
 }
 
-int odp_queue_enq_multi(odp_queue_t handle, const odp_event_t ev[], int num)
+static int queue_enq_multi(odp_queue_t handle, const odp_event_t ev[], int num)
 {
 	odp_buffer_hdr_t *buf_hdr[QUEUE_MULTI_MAX];
 	queue_entry_t *queue;
@@ -495,7 +495,7 @@  int odp_queue_enq_multi(odp_queue_t handle, const odp_event_t ev[], int num)
 						     num);
 }
 
-int odp_queue_enq(odp_queue_t handle, odp_event_t ev)
+static int queue_enq(odp_queue_t handle, odp_event_t ev)
 {
 	odp_buffer_hdr_t *buf_hdr;
 	queue_entry_t *queue;
@@ -578,12 +578,12 @@  static inline int deq_multi(queue_entry_t *queue, odp_buffer_hdr_t *buf_hdr[],
 	return i;
 }
 
-int queue_deq_multi(queue_entry_t *queue, odp_buffer_hdr_t *buf_hdr[], int num)
+int _queue_deq_multi(queue_entry_t *queue, odp_buffer_hdr_t *buf_hdr[], int num)
 {
 	return deq_multi(queue, buf_hdr, num);
 }
 
-odp_buffer_hdr_t *queue_deq(queue_entry_t *queue)
+odp_buffer_hdr_t *_queue_deq(queue_entry_t *queue)
 {
 	odp_buffer_hdr_t *buf_hdr = NULL;
 	int ret;
@@ -596,7 +596,7 @@  odp_buffer_hdr_t *queue_deq(queue_entry_t *queue)
 		return NULL;
 }
 
-int odp_queue_deq_multi(odp_queue_t handle, odp_event_t events[], int num)
+static int queue_deq_multi(odp_queue_t handle, odp_event_t events[], int num)
 {
 	queue_entry_t *queue;
 	odp_buffer_hdr_t *buf_hdr[QUEUE_MULTI_MAX];
@@ -616,7 +616,7 @@  int odp_queue_deq_multi(odp_queue_t handle, odp_event_t events[], int num)
 }
 
 
-odp_event_t odp_queue_deq(odp_queue_t handle)
+static odp_event_t queue_deq(odp_queue_t handle)
 {
 	queue_entry_t *queue;
 	odp_buffer_hdr_t *buf_hdr;
@@ -640,7 +640,7 @@  void queue_unlock(queue_entry_t *queue)
 	UNLOCK(&queue->s.lock);
 }
 
-void odp_queue_param_init(odp_queue_param_t *params)
+static void queue_param_init(odp_queue_param_t *params)
 {
 	memset(params, 0, sizeof(odp_queue_param_t));
 	params->type = ODP_QUEUE_TYPE_PLAIN;
@@ -651,7 +651,7 @@  void odp_queue_param_init(odp_queue_param_t *params)
 	params->sched.group = ODP_SCHED_GROUP_ALL;
 }
 
-int odp_queue_info(odp_queue_t handle, odp_queue_info_t *info)
+static int queue_info(odp_queue_t handle, odp_queue_info_t *info)
 {
 	uint32_t queue_id;
 	queue_entry_t *queue;
@@ -765,7 +765,39 @@  int sched_cb_queue_empty(uint32_t queue_index)
 	return ret;
 }
 
-uint64_t odp_queue_to_u64(odp_queue_t hdl)
+static uint64_t queue_to_u64(odp_queue_t hdl)
 {
 	return _odp_pri(hdl);
 }
+
+/* API functions */
+queue_api_t queue_default_api = {
+	.queue_create = queue_create,
+	.queue_destroy = queue_destroy,
+	.queue_lookup = queue_lookup,
+	.queue_capability = queue_capability,
+	.queue_context_set = queue_context_set,
+	.queue_context = queue_context,
+	.queue_enq = queue_enq,
+	.queue_enq_multi = queue_enq_multi,
+	.queue_deq = queue_deq,
+	.queue_deq_multi = queue_deq_multi,
+	.queue_type = queue_type,
+	.queue_sched_type = queue_sched_type,
+	.queue_sched_prio = queue_sched_prio,
+	.queue_sched_group = queue_sched_group,
+	.queue_lock_count = queue_lock_count,
+	.queue_to_u64 = queue_to_u64,
+	.queue_param_init = queue_param_init,
+	.queue_info = queue_info
+};
+
+/* Functions towards internal components */
+queue_fn_t queue_default_fn = {
+	.queue_init_global = queue_init_global,
+	.queue_term_global = queue_term_global,
+	.queue_enq = _queue_enq,
+	.queue_enq_multi = _queue_enq_multi,
+	.queue_deq = _queue_deq,
+	.queue_deq_multi = _queue_deq_multi
+};
diff --git a/platform/linux-generic/odp_schedule.c b/platform/linux-generic/odp_schedule.c
index c4567d81..0f5bd52b 100644
--- a/platform/linux-generic/odp_schedule.c
+++ b/platform/linux-generic/odp_schedule.c
@@ -646,7 +646,7 @@  static inline void ordered_stash_release(void)
 		buf_hdr = sched_local.ordered.stash[i].buf_hdr;
 		num = sched_local.ordered.stash[i].num;
 
-		queue_enq_multi(queue, buf_hdr, num);
+		queue_fn->queue_enq_multi(queue, buf_hdr, num);
 	}
 	sched_local.ordered.stash_num = 0;
 }
diff --git a/platform/linux-generic/odp_schedule_if.c b/platform/linux-generic/odp_schedule_if.c
index a9ede98d..8eef5235 100644
--- a/platform/linux-generic/odp_schedule_if.c
+++ b/platform/linux-generic/odp_schedule_if.c
@@ -6,6 +6,12 @@ 
 
 #include <odp_schedule_if.h>
 
+extern const queue_api_t queue_default_api;
+extern const queue_fn_t queue_default_fn;
+
+const queue_api_t *queue_api = &queue_default_api;
+const queue_fn_t *queue_fn = &queue_default_fn;
+
 extern const schedule_fn_t schedule_sp_fn;
 extern const schedule_api_t schedule_sp_api;
 
@@ -26,6 +32,96 @@  const schedule_fn_t  *sched_fn  = &schedule_default_fn;
 const schedule_api_t *sched_api = &schedule_default_api;
 #endif
 
+odp_queue_t odp_queue_create(const char *name, const odp_queue_param_t *param)
+{
+	return queue_api->queue_create(name, param);
+}
+
+int odp_queue_destroy(odp_queue_t queue)
+{
+	return queue_api->queue_destroy(queue);
+}
+
+odp_queue_t odp_queue_lookup(const char *name)
+{
+	return queue_api->queue_lookup(name);
+}
+
+int odp_queue_capability(odp_queue_capability_t *capa)
+{
+	return queue_api->queue_capability(capa);
+}
+
+int odp_queue_context_set(odp_queue_t queue, void *context, uint32_t len)
+{
+	return queue_api->queue_context_set(queue, context, len);
+}
+
+void *odp_queue_context(odp_queue_t queue)
+{
+	return queue_api->queue_context(queue);
+}
+
+int odp_queue_enq(odp_queue_t queue, odp_event_t ev)
+{
+	return queue_api->queue_enq(queue, ev);
+}
+
+int odp_queue_enq_multi(odp_queue_t queue, const odp_event_t events[], int num)
+{
+	return queue_api->queue_enq_multi(queue, events, num);
+}
+
+odp_event_t odp_queue_deq(odp_queue_t queue)
+{
+	return queue_api->queue_deq(queue);
+}
+
+int odp_queue_deq_multi(odp_queue_t queue, odp_event_t events[], int num)
+{
+	return queue_api->queue_deq_multi(queue, events, num);
+}
+
+odp_queue_type_t odp_queue_type(odp_queue_t queue)
+{
+	return queue_api->queue_type(queue);
+}
+
+odp_schedule_sync_t odp_queue_sched_type(odp_queue_t queue)
+{
+	return queue_api->queue_sched_type(queue);
+}
+
+odp_schedule_prio_t odp_queue_sched_prio(odp_queue_t queue)
+{
+	return queue_api->queue_sched_prio(queue);
+}
+
+odp_schedule_group_t odp_queue_sched_group(odp_queue_t queue)
+{
+	return queue_api->queue_sched_group(queue);
+}
+
+int odp_queue_lock_count(odp_queue_t queue)
+{
+	return queue_api->queue_lock_count(queue);
+}
+
+uint64_t odp_queue_to_u64(odp_queue_t hdl)
+{
+	return queue_api->queue_to_u64(hdl);
+}
+
+void odp_queue_param_init(odp_queue_param_t *param)
+{
+	return queue_api->queue_param_init(param);
+}
+
+int odp_queue_info(odp_queue_t queue, odp_queue_info_t *info)
+{
+	return queue_api->queue_info(queue, info);
+}
+
 uint64_t odp_schedule_wait_time(uint64_t ns)
 {
 	return sched_api->schedule_wait_time(ns);
diff --git a/platform/linux-generic/odp_schedule_iquery.c b/platform/linux-generic/odp_schedule_iquery.c
index 75470aff..ac5cdacd 100644
--- a/platform/linux-generic/odp_schedule_iquery.c
+++ b/platform/linux-generic/odp_schedule_iquery.c
@@ -1108,7 +1108,7 @@  static inline void ordered_stash_release(void)
 		buf_hdr = thread_local.ordered.stash[i].buf_hdr;
 		num = thread_local.ordered.stash[i].num;
 
-		queue_enq_multi(queue, buf_hdr, num);
+		queue_fn->queue_enq_multi(queue, buf_hdr, num);
 	}
 	thread_local.ordered.stash_num = 0;
 }
diff --git a/platform/linux-generic/pktio/loop.c b/platform/linux-generic/pktio/loop.c
index e9ad22ba..1f48a000 100644
--- a/platform/linux-generic/pktio/loop.c
+++ b/platform/linux-generic/pktio/loop.c
@@ -70,7 +70,7 @@  static int loopback_recv(pktio_entry_t *pktio_entry, int index ODP_UNUSED,
 	odp_ticketlock_lock(&pktio_entry->s.rxl);
 
 	qentry = queue_to_qentry(pktio_entry->s.pkt_loop.loopq);
-	nbr = queue_deq_multi(qentry, hdr_tbl, len);
+	nbr = queue_fn->queue_deq_multi(qentry, hdr_tbl, len);
 
 	if (pktio_entry->s.config.pktin.bit.ts_all ||
 	    pktio_entry->s.config.pktin.bit.ts_ptp) {
@@ -170,7 +170,7 @@  static int loopback_send(pktio_entry_t *pktio_entry, int index ODP_UNUSED,
 	odp_ticketlock_lock(&pktio_entry->s.txl);
 
 	qentry = queue_to_qentry(pktio_entry->s.pkt_loop.loopq);
-	ret = queue_enq_multi(qentry, hdr_tbl, len);
+	ret = queue_fn->queue_enq_multi(qentry, hdr_tbl, len);
 
 	if (ret > 0) {
 		pktio_entry->s.stats.out_ucast_pkts += ret;