aboutsummaryrefslogtreecommitdiff
path: root/platform/linux-generic
diff options
context:
space:
mode:
Diffstat (limited to 'platform/linux-generic')
-rw-r--r--platform/linux-generic/include/odp_packet_internal.h2
-rw-r--r--platform/linux-generic/include/odp_packet_io_internal.h2
-rw-r--r--platform/linux-generic/include/odp_queue_if.h28
-rw-r--r--platform/linux-generic/include/odp_queue_internal.h19
-rw-r--r--platform/linux-generic/include/odp_queue_scalable_internal.h8
-rw-r--r--platform/linux-generic/include/odp_schedule_if.h2
-rw-r--r--platform/linux-generic/include/odp_traffic_mngr_internal.h2
-rw-r--r--platform/linux-generic/odp_packet_io.c34
-rw-r--r--platform/linux-generic/odp_queue_basic.c24
-rw-r--r--platform/linux-generic/odp_queue_lf.c8
-rw-r--r--platform/linux-generic/odp_queue_scalable.c32
-rw-r--r--platform/linux-generic/odp_schedule_basic.c8
-rw-r--r--platform/linux-generic/odp_schedule_iquery.c2
-rw-r--r--platform/linux-generic/odp_schedule_scalable.c2
-rw-r--r--platform/linux-generic/odp_schedule_sp.c2
-rw-r--r--platform/linux-generic/odp_traffic_mngr.c4
-rw-r--r--platform/linux-generic/pktio/loop.c4
17 files changed, 85 insertions, 98 deletions
diff --git a/platform/linux-generic/include/odp_packet_internal.h b/platform/linux-generic/include/odp_packet_internal.h
index 951903dd6..cd2db2ecd 100644
--- a/platform/linux-generic/include/odp_packet_internal.h
+++ b/platform/linux-generic/include/odp_packet_internal.h
@@ -105,7 +105,7 @@ typedef struct {
odp_time_t timestamp;
/* Classifier destination queue */
- queue_t dst_queue;
+ void *dst_queue;
/* Result for crypto packet op */
odp_crypto_packet_result_t crypto_op_result;
diff --git a/platform/linux-generic/include/odp_packet_io_internal.h b/platform/linux-generic/include/odp_packet_io_internal.h
index 8019dfe9a..880237a5c 100644
--- a/platform/linux-generic/include/odp_packet_io_internal.h
+++ b/platform/linux-generic/include/odp_packet_io_internal.h
@@ -175,7 +175,7 @@ struct pktio_entry {
struct {
odp_queue_t queue;
- queue_t queue_int;
+ void *queue_int;
odp_pktin_queue_t pktin;
} in_queue[PKTIO_MAX_QUEUES];
diff --git a/platform/linux-generic/include/odp_queue_if.h b/platform/linux-generic/include/odp_queue_if.h
index ed8d6ca99..b9f4f03d2 100644
--- a/platform/linux-generic/include/odp_queue_if.h
+++ b/platform/linux-generic/include/odp_queue_if.h
@@ -44,29 +44,23 @@ typedef struct {
int (*queue_info)(odp_queue_t queue, odp_queue_info_t *info);
} queue_api_t;
-/* Internal abstract queue handle */
-typedef struct { char dummy; } _queue_t;
-typedef _queue_t *queue_t;
-
-#define QUEUE_NULL ((queue_t)NULL)
-
typedef int (*queue_init_global_fn_t)(void);
typedef int (*queue_term_global_fn_t)(void);
typedef int (*queue_init_local_fn_t)(void);
typedef int (*queue_term_local_fn_t)(void);
-typedef queue_t (*queue_from_ext_fn_t)(odp_queue_t handle);
-typedef odp_queue_t (*queue_to_ext_fn_t)(queue_t q_int);
-typedef int (*queue_enq_fn_t)(queue_t q_int, odp_buffer_hdr_t *);
-typedef int (*queue_enq_multi_fn_t)(queue_t q_int, odp_buffer_hdr_t **, int);
-typedef odp_buffer_hdr_t *(*queue_deq_fn_t)(queue_t q_int);
-typedef int (*queue_deq_multi_fn_t)(queue_t q_int, odp_buffer_hdr_t **, int);
-typedef odp_pktout_queue_t (*queue_get_pktout_fn_t)(queue_t q_int);
-typedef void (*queue_set_pktout_fn_t)(queue_t q_int, odp_pktio_t pktio,
+typedef void *(*queue_from_ext_fn_t)(odp_queue_t handle);
+typedef odp_queue_t (*queue_to_ext_fn_t)(void *q_int);
+typedef int (*queue_enq_fn_t)(void *q_int, odp_buffer_hdr_t *);
+typedef int (*queue_enq_multi_fn_t)(void *q_int, odp_buffer_hdr_t **, int);
+typedef odp_buffer_hdr_t *(*queue_deq_fn_t)(void *q_int);
+typedef int (*queue_deq_multi_fn_t)(void *q_int, odp_buffer_hdr_t **, int);
+typedef odp_pktout_queue_t (*queue_get_pktout_fn_t)(void *q_int);
+typedef void (*queue_set_pktout_fn_t)(void *q_int, odp_pktio_t pktio,
int index);
-typedef odp_pktin_queue_t (*queue_get_pktin_fn_t)(queue_t q_int);
-typedef void (*queue_set_pktin_fn_t)(queue_t q_int, odp_pktio_t pktio,
+typedef odp_pktin_queue_t (*queue_get_pktin_fn_t)(void *q_int);
+typedef void (*queue_set_pktin_fn_t)(void *q_int, odp_pktio_t pktio,
int index);
-typedef void (*queue_set_enq_deq_fn_t)(queue_t q_int,
+typedef void (*queue_set_enq_deq_fn_t)(void *q_int,
queue_enq_fn_t enq,
queue_enq_multi_fn_t enq_multi,
queue_deq_fn_t deq,
diff --git a/platform/linux-generic/include/odp_queue_internal.h b/platform/linux-generic/include/odp_queue_internal.h
index 98e86fa0e..e227f26c0 100644
--- a/platform/linux-generic/include/odp_queue_internal.h
+++ b/platform/linux-generic/include/odp_queue_internal.h
@@ -4,13 +4,6 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
-
-/**
- * @file
- *
- * ODP queue - implementation internal
- */
-
#ifndef ODP_QUEUE_INTERNAL_H_
#define ODP_QUEUE_INTERNAL_H_
@@ -81,9 +74,9 @@ typedef struct queue_global_t {
extern queue_global_t *queue_glb;
-static inline queue_t queue_index_to_qint(uint32_t queue_id)
+static inline void *queue_index_to_qint(uint32_t queue_id)
{
- return (queue_t)&queue_glb->queue[queue_id];
+ return &queue_glb->queue[queue_id];
}
static inline uint32_t queue_to_index(odp_queue_t handle)
@@ -96,14 +89,14 @@ static inline odp_queue_t queue_from_index(uint32_t queue_id)
return _odp_cast_scalar(odp_queue_t, queue_id + 1);
}
-static inline queue_entry_t *qentry_from_int(queue_t q_int)
+static inline queue_entry_t *qentry_from_int(void *q_int)
{
- return (queue_entry_t *)(void *)(q_int);
+ return (queue_entry_t *)q_int;
}
-static inline queue_t qentry_to_int(queue_entry_t *qentry)
+static inline void *qentry_to_int(queue_entry_t *qentry)
{
- return (queue_t)(qentry);
+ return qentry;
}
#ifdef __cplusplus
diff --git a/platform/linux-generic/include/odp_queue_scalable_internal.h b/platform/linux-generic/include/odp_queue_scalable_internal.h
index b108346df..37147aa9d 100644
--- a/platform/linux-generic/include/odp_queue_scalable_internal.h
+++ b/platform/linux-generic/include/odp_queue_scalable_internal.h
@@ -80,14 +80,14 @@ static inline uint32_t queue_to_id(odp_queue_t handle)
return _odp_typeval(handle) - 1;
}
-static inline queue_entry_t *qentry_from_int(queue_t handle)
+static inline queue_entry_t *qentry_from_int(void *handle)
{
- return (queue_entry_t *)(void *)(handle);
+ return (queue_entry_t *)handle;
}
-static inline queue_t qentry_to_int(queue_entry_t *qentry)
+static inline void *qentry_to_int(queue_entry_t *qentry)
{
- return (queue_t)(qentry);
+ return qentry;
}
static inline odp_queue_t queue_get_handle(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 4bd127a42..0d0952621 100644
--- a/platform/linux-generic/include/odp_schedule_if.h
+++ b/platform/linux-generic/include/odp_schedule_if.h
@@ -32,7 +32,7 @@ typedef int (*schedule_init_queue_fn_t)(uint32_t queue_index,
typedef void (*schedule_destroy_queue_fn_t)(uint32_t queue_index);
typedef int (*schedule_sched_queue_fn_t)(uint32_t queue_index);
typedef int (*schedule_unsched_queue_fn_t)(uint32_t queue_index);
-typedef int (*schedule_ord_enq_multi_fn_t)(queue_t q_int,
+typedef int (*schedule_ord_enq_multi_fn_t)(void *q_int,
void *buf_hdr[], int num, int *ret);
typedef int (*schedule_init_global_fn_t)(void);
typedef int (*schedule_term_global_fn_t)(void);
diff --git a/platform/linux-generic/include/odp_traffic_mngr_internal.h b/platform/linux-generic/include/odp_traffic_mngr_internal.h
index aab6b9115..919831a3d 100644
--- a/platform/linux-generic/include/odp_traffic_mngr_internal.h
+++ b/platform/linux-generic/include/odp_traffic_mngr_internal.h
@@ -282,7 +282,7 @@ struct tm_queue_obj_s {
uint8_t tm_idx;
uint8_t delayed_cnt;
uint8_t blocked_cnt;
- queue_t tm_qentry;
+ void *tm_qentry;
};
struct tm_node_obj_s {
diff --git a/platform/linux-generic/odp_packet_io.c b/platform/linux-generic/odp_packet_io.c
index 81262a17e..5113eba2f 100644
--- a/platform/linux-generic/odp_packet_io.c
+++ b/platform/linux-generic/odp_packet_io.c
@@ -137,7 +137,7 @@ static void init_in_queues(pktio_entry_t *entry)
for (i = 0; i < PKTIO_MAX_QUEUES; i++) {
entry->s.in_queue[i].queue = ODP_QUEUE_INVALID;
- entry->s.in_queue[i].queue_int = QUEUE_NULL;
+ entry->s.in_queue[i].queue_int = NULL;
entry->s.in_queue[i].pktin = PKTIN_INVALID;
}
}
@@ -327,7 +327,7 @@ static void destroy_in_queues(pktio_entry_t *entry, int num)
if (entry->s.in_queue[i].queue != ODP_QUEUE_INVALID) {
odp_queue_destroy(entry->s.in_queue[i].queue);
entry->s.in_queue[i].queue = ODP_QUEUE_INVALID;
- entry->s.in_queue[i].queue_int = QUEUE_NULL;
+ entry->s.in_queue[i].queue_int = NULL;
}
}
}
@@ -637,7 +637,7 @@ static inline int pktin_recv_buf(pktio_entry_t *entry, int pktin_index,
return num_rx;
}
-static int pktout_enqueue(queue_t q_int, odp_buffer_hdr_t *buf_hdr)
+static int pktout_enqueue(void *q_int, odp_buffer_hdr_t *buf_hdr)
{
odp_packet_t pkt = packet_from_buf_hdr(buf_hdr);
int len = 1;
@@ -650,7 +650,7 @@ static int pktout_enqueue(queue_t q_int, odp_buffer_hdr_t *buf_hdr)
return (nbr == len ? 0 : -1);
}
-static int pktout_enq_multi(queue_t q_int, odp_buffer_hdr_t *buf_hdr[], int num)
+static int pktout_enq_multi(void *q_int, odp_buffer_hdr_t *buf_hdr[], int num)
{
odp_packet_t pkt_tbl[QUEUE_MULTI_MAX];
int nbr;
@@ -666,7 +666,7 @@ static int pktout_enq_multi(queue_t q_int, odp_buffer_hdr_t *buf_hdr[], int num)
return nbr;
}
-static odp_buffer_hdr_t *pktin_dequeue(queue_t q_int)
+static odp_buffer_hdr_t *pktin_dequeue(void *q_int)
{
odp_buffer_hdr_t *buf_hdr;
odp_buffer_hdr_t *hdr_tbl[QUEUE_MULTI_MAX];
@@ -705,7 +705,7 @@ static odp_buffer_hdr_t *pktin_dequeue(queue_t q_int)
return buf_hdr;
}
-static int pktin_deq_multi(queue_t q_int, odp_buffer_hdr_t *buf_hdr[], int num)
+static int pktin_deq_multi(void *q_int, odp_buffer_hdr_t *buf_hdr[], int num)
{
int nbr;
odp_buffer_hdr_t *hdr_tbl[QUEUE_MULTI_MAX];
@@ -765,7 +765,7 @@ int sched_cb_pktin_poll_one(int pktio_index,
odp_packet_hdr_t *pkt_hdr;
odp_buffer_hdr_t *buf_hdr;
odp_packet_t packets[QUEUE_MULTI_MAX];
- queue_t queue;
+ void *q_int;
if (odp_unlikely(entry->s.state != PKTIO_STATE_STARTED)) {
if (entry->s.state < PKTIO_STATE_ACTIVE ||
@@ -785,9 +785,9 @@ int sched_cb_pktin_poll_one(int pktio_index,
pkt = packets[i];
pkt_hdr = packet_hdr(pkt);
if (odp_unlikely(pkt_hdr->p.input_flags.dst_queue)) {
- queue = pkt_hdr->dst_queue;
+ q_int = pkt_hdr->dst_queue;
buf_hdr = packet_to_buf_hdr(pkt);
- if (queue_fn->enq_multi(queue, &buf_hdr, 1) < 0) {
+ if (queue_fn->enq_multi(q_int, &buf_hdr, 1) < 0) {
/* Queue full? */
odp_packet_free(pkt);
__atomic_fetch_add(&entry->s.stats.in_discards,
@@ -836,7 +836,7 @@ int sched_cb_pktin_poll_old(int pktio_index, int num_queue, int index[])
}
for (idx = 0; idx < num_queue; idx++) {
- queue_t q_int;
+ void *q_int;
int num_enq;
num = pktin_recv_buf(entry, index[idx], hdr_tbl,
@@ -1371,14 +1371,14 @@ int odp_pktio_stats_reset(odp_pktio_t pktio)
return ret;
}
-static int abort_pktin_enqueue(queue_t q_int ODP_UNUSED,
+static int abort_pktin_enqueue(void *q_int ODP_UNUSED,
odp_buffer_hdr_t *buf_hdr ODP_UNUSED)
{
ODP_ABORT("attempted enqueue to a pktin queue");
return -1;
}
-static int abort_pktin_enq_multi(queue_t q_int ODP_UNUSED,
+static int abort_pktin_enq_multi(void *q_int ODP_UNUSED,
odp_buffer_hdr_t *buf_hdr[] ODP_UNUSED,
int num ODP_UNUSED)
{
@@ -1386,13 +1386,13 @@ static int abort_pktin_enq_multi(queue_t q_int ODP_UNUSED,
return 0;
}
-static odp_buffer_hdr_t *abort_pktout_dequeue(queue_t q_int ODP_UNUSED)
+static odp_buffer_hdr_t *abort_pktout_dequeue(void *q_int ODP_UNUSED)
{
ODP_ABORT("attempted dequeue from a pktout queue");
return NULL;
}
-static int abort_pktout_deq_multi(queue_t q_int ODP_UNUSED,
+static int abort_pktout_deq_multi(void *q_int ODP_UNUSED,
odp_buffer_hdr_t *buf_hdr[] ODP_UNUSED,
int num ODP_UNUSED)
{
@@ -1410,7 +1410,7 @@ int odp_pktin_queue_config(odp_pktio_t pktio,
unsigned i;
int rc;
odp_queue_t queue;
- queue_t q_int;
+ void *q_int;
odp_pktin_queue_param_t default_param;
if (param == NULL) {
@@ -1506,7 +1506,7 @@ int odp_pktin_queue_config(odp_pktio_t pktio,
} else {
entry->s.in_queue[i].queue = ODP_QUEUE_INVALID;
- entry->s.in_queue[i].queue_int = QUEUE_NULL;
+ entry->s.in_queue[i].queue_int = NULL;
}
entry->s.in_queue[i].pktin.index = i;
@@ -1598,7 +1598,7 @@ int odp_pktout_queue_config(odp_pktio_t pktio,
for (i = 0; i < num_queues; i++) {
odp_queue_t queue;
odp_queue_param_t queue_param;
- queue_t q_int;
+ void *q_int;
char name[ODP_QUEUE_NAME_LEN];
int pktio_id = odp_pktio_index(pktio);
diff --git a/platform/linux-generic/odp_queue_basic.c b/platform/linux-generic/odp_queue_basic.c
index 572441d07..7c1e1c84f 100644
--- a/platform/linux-generic/odp_queue_basic.c
+++ b/platform/linux-generic/odp_queue_basic.c
@@ -485,7 +485,7 @@ static inline void buffer_index_to_buf(odp_buffer_hdr_t *buf_hdr[],
}
}
-static inline int enq_multi(queue_t q_int, odp_buffer_hdr_t *buf_hdr[],
+static inline int enq_multi(void *q_int, odp_buffer_hdr_t *buf_hdr[],
int num)
{
int sched = 0;
@@ -532,13 +532,13 @@ static inline int enq_multi(queue_t q_int, odp_buffer_hdr_t *buf_hdr[],
return num_enq;
}
-static int queue_int_enq_multi(queue_t q_int, odp_buffer_hdr_t *buf_hdr[],
+static int queue_int_enq_multi(void *q_int, odp_buffer_hdr_t *buf_hdr[],
int num)
{
return enq_multi(q_int, buf_hdr, num);
}
-static int queue_int_enq(queue_t q_int, odp_buffer_hdr_t *buf_hdr)
+static int queue_int_enq(void *q_int, odp_buffer_hdr_t *buf_hdr)
{
int ret;
@@ -617,7 +617,7 @@ static inline int deq_multi(queue_entry_t *queue, odp_buffer_hdr_t *buf_hdr[],
return num_deq;
}
-static int queue_int_deq_multi(queue_t q_int, odp_buffer_hdr_t *buf_hdr[],
+static int queue_int_deq_multi(void *q_int, odp_buffer_hdr_t *buf_hdr[],
int num)
{
queue_entry_t *queue = qentry_from_int(q_int);
@@ -625,7 +625,7 @@ static int queue_int_deq_multi(queue_t q_int, odp_buffer_hdr_t *buf_hdr[],
return deq_multi(queue, buf_hdr, num, 0);
}
-static odp_buffer_hdr_t *queue_int_deq(queue_t q_int)
+static odp_buffer_hdr_t *queue_int_deq(void *q_int)
{
queue_entry_t *queue = qentry_from_int(q_int);
odp_buffer_hdr_t *buf_hdr = NULL;
@@ -798,12 +798,12 @@ static uint64_t queue_to_u64(odp_queue_t hdl)
return _odp_pri(hdl);
}
-static odp_pktout_queue_t queue_get_pktout(queue_t q_int)
+static odp_pktout_queue_t queue_get_pktout(void *q_int)
{
return qentry_from_int(q_int)->s.pktout;
}
-static void queue_set_pktout(queue_t q_int, odp_pktio_t pktio, int index)
+static void queue_set_pktout(void *q_int, odp_pktio_t pktio, int index)
{
queue_entry_t *qentry = qentry_from_int(q_int);
@@ -811,12 +811,12 @@ static void queue_set_pktout(queue_t q_int, odp_pktio_t pktio, int index)
qentry->s.pktout.index = index;
}
-static odp_pktin_queue_t queue_get_pktin(queue_t q_int)
+static odp_pktin_queue_t queue_get_pktin(void *q_int)
{
return qentry_from_int(q_int)->s.pktin;
}
-static void queue_set_pktin(queue_t q_int, odp_pktio_t pktio, int index)
+static void queue_set_pktin(void *q_int, odp_pktio_t pktio, int index)
{
queue_entry_t *qentry = qentry_from_int(q_int);
@@ -824,7 +824,7 @@ static void queue_set_pktin(queue_t q_int, odp_pktio_t pktio, int index)
qentry->s.pktin.index = index;
}
-static void queue_set_enq_deq_func(queue_t q_int,
+static void queue_set_enq_deq_func(void *q_int,
queue_enq_fn_t enq,
queue_enq_multi_fn_t enq_multi,
queue_deq_fn_t deq,
@@ -845,12 +845,12 @@ static void queue_set_enq_deq_func(queue_t q_int,
qentry->s.dequeue_multi = deq_multi;
}
-static queue_t queue_from_ext(odp_queue_t handle)
+static void *queue_from_ext(odp_queue_t handle)
{
return qentry_to_int(handle_to_qentry(handle));
}
-static odp_queue_t queue_to_ext(queue_t q_int)
+static odp_queue_t queue_to_ext(void *q_int)
{
return qentry_from_int(q_int)->s.handle;
}
diff --git a/platform/linux-generic/odp_queue_lf.c b/platform/linux-generic/odp_queue_lf.c
index afe629d1b..4a8a54924 100644
--- a/platform/linux-generic/odp_queue_lf.c
+++ b/platform/linux-generic/odp_queue_lf.c
@@ -133,7 +133,7 @@ static inline int next_idx(int idx)
return next;
}
-static int queue_lf_enq(queue_t q_int, odp_buffer_hdr_t *buf_hdr)
+static int queue_lf_enq(void *q_int, odp_buffer_hdr_t *buf_hdr)
{
queue_entry_t *queue;
queue_lf_t *queue_lf;
@@ -183,7 +183,7 @@ static int queue_lf_enq(queue_t q_int, odp_buffer_hdr_t *buf_hdr)
return -1;
}
-static int queue_lf_enq_multi(queue_t q_int, odp_buffer_hdr_t **buf_hdr,
+static int queue_lf_enq_multi(void *q_int, odp_buffer_hdr_t **buf_hdr,
int num)
{
(void)num;
@@ -194,7 +194,7 @@ static int queue_lf_enq_multi(queue_t q_int, odp_buffer_hdr_t **buf_hdr,
return 0;
}
-static odp_buffer_hdr_t *queue_lf_deq(queue_t q_int)
+static odp_buffer_hdr_t *queue_lf_deq(void *q_int)
{
queue_entry_t *queue;
queue_lf_t *queue_lf;
@@ -243,7 +243,7 @@ static odp_buffer_hdr_t *queue_lf_deq(queue_t q_int)
return NULL;
}
-static int queue_lf_deq_multi(queue_t q_int, odp_buffer_hdr_t **buf_hdr,
+static int queue_lf_deq_multi(void *q_int, odp_buffer_hdr_t **buf_hdr,
int num)
{
odp_buffer_hdr_t *buf;
diff --git a/platform/linux-generic/odp_queue_scalable.c b/platform/linux-generic/odp_queue_scalable.c
index 578e6d225..1cc318e31 100644
--- a/platform/linux-generic/odp_queue_scalable.c
+++ b/platform/linux-generic/odp_queue_scalable.c
@@ -57,12 +57,12 @@ static inline odp_queue_t queue_from_id(uint32_t queue_id)
return _odp_cast_scalar(odp_queue_t, queue_id + 1);
}
-static queue_t queue_from_ext(odp_queue_t handle);
-static int _queue_enq(queue_t handle, odp_buffer_hdr_t *buf_hdr);
-static odp_buffer_hdr_t *_queue_deq(queue_t handle);
-static int _queue_enq_multi(queue_t handle, odp_buffer_hdr_t *buf_hdr[],
+static void *queue_from_ext(odp_queue_t handle);
+static int _queue_enq(void *handle, odp_buffer_hdr_t *buf_hdr);
+static odp_buffer_hdr_t *_queue_deq(void *handle);
+static int _queue_enq_multi(void *handle, odp_buffer_hdr_t *buf_hdr[],
int num);
-static int _queue_deq_multi(queue_t handle, odp_buffer_hdr_t *buf_hdr[],
+static int _queue_deq_multi(void *handle, odp_buffer_hdr_t *buf_hdr[],
int num);
static queue_entry_t *get_qentry(uint32_t queue_id)
@@ -612,7 +612,7 @@ int _odp_queue_enq_sp(sched_elem_t *q,
return actual;
}
-static int _queue_enq_multi(queue_t handle, odp_buffer_hdr_t *buf_hdr[],
+static int _queue_enq_multi(void *handle, odp_buffer_hdr_t *buf_hdr[],
int num)
{
int actual;
@@ -648,7 +648,7 @@ static int _queue_enq_multi(queue_t handle, odp_buffer_hdr_t *buf_hdr[],
return actual;
}
-static int _queue_enq(queue_t handle, odp_buffer_hdr_t *buf_hdr)
+static int _queue_enq(void *handle, odp_buffer_hdr_t *buf_hdr)
{
return odp_likely(
_queue_enq_multi(handle, &buf_hdr, 1) == 1) ? 0 : -1;
@@ -811,7 +811,7 @@ inline int _odp_queue_deq_mc(sched_elem_t *q, odp_event_t *evp, int num)
return ret;
}
-static int _queue_deq_multi(queue_t handle, odp_buffer_hdr_t *buf_hdr[],
+static int _queue_deq_multi(void *handle, odp_buffer_hdr_t *buf_hdr[],
int num)
{
sched_elem_t *q;
@@ -822,7 +822,7 @@ static int _queue_deq_multi(queue_t handle, odp_buffer_hdr_t *buf_hdr[],
return _odp_queue_deq(q, buf_hdr, num);
}
-static odp_buffer_hdr_t *_queue_deq(queue_t handle)
+static odp_buffer_hdr_t *_queue_deq(void *handle)
{
sched_elem_t *q;
odp_buffer_hdr_t *buf_hdr;
@@ -911,29 +911,29 @@ static uint64_t queue_to_u64(odp_queue_t hdl)
return _odp_pri(hdl);
}
-static odp_pktout_queue_t queue_get_pktout(queue_t handle)
+static odp_pktout_queue_t queue_get_pktout(void *handle)
{
return qentry_from_int(handle)->s.pktout;
}
-static void queue_set_pktout(queue_t handle, odp_pktio_t pktio, int index)
+static void queue_set_pktout(void *handle, odp_pktio_t pktio, int index)
{
qentry_from_int(handle)->s.pktout.pktio = pktio;
qentry_from_int(handle)->s.pktout.index = index;
}
-static odp_pktin_queue_t queue_get_pktin(queue_t handle)
+static odp_pktin_queue_t queue_get_pktin(void *handle)
{
return qentry_from_int(handle)->s.pktin;
}
-static void queue_set_pktin(queue_t handle, odp_pktio_t pktio, int index)
+static void queue_set_pktin(void *handle, odp_pktio_t pktio, int index)
{
qentry_from_int(handle)->s.pktin.pktio = pktio;
qentry_from_int(handle)->s.pktin.index = index;
}
-static void queue_set_enq_deq_func(queue_t handle,
+static void queue_set_enq_deq_func(void *handle,
queue_enq_fn_t enq,
queue_enq_multi_fn_t enq_multi,
queue_deq_fn_t deq,
@@ -952,7 +952,7 @@ static void queue_set_enq_deq_func(queue_t handle,
qentry_from_int(handle)->s.dequeue_multi = deq_multi;
}
-static queue_t queue_from_ext(odp_queue_t handle)
+static void *queue_from_ext(odp_queue_t handle)
{
uint32_t queue_id;
@@ -960,7 +960,7 @@ static queue_t queue_from_ext(odp_queue_t handle)
return qentry_to_int(get_qentry(queue_id));
}
-static odp_queue_t queue_to_ext(queue_t handle)
+static odp_queue_t queue_to_ext(void *handle)
{
return qentry_from_int(handle)->s.handle;
}
diff --git a/platform/linux-generic/odp_schedule_basic.c b/platform/linux-generic/odp_schedule_basic.c
index ca291d150..57e958bbc 100644
--- a/platform/linux-generic/odp_schedule_basic.c
+++ b/platform/linux-generic/odp_schedule_basic.c
@@ -714,7 +714,7 @@ static inline int copy_from_stash(odp_event_t out_ev[], unsigned int max)
return i;
}
-static int schedule_ord_enq_multi(queue_t q_int, void *buf_hdr[],
+static int schedule_ord_enq_multi(void *q_int, void *buf_hdr[],
int num, int *ret)
{
int i;
@@ -766,7 +766,7 @@ static inline int poll_pktin(uint32_t qi, int stash)
odp_buffer_hdr_t *b_hdr[MAX_DEQ];
int pktio_index, pktin_index, num, num_pktin, i;
int ret;
- queue_t qint;
+ void *q_int;
pktio_index = sched->queue[qi].pktio_index;
pktin_index = sched->queue[qi].pktin_index;
@@ -799,9 +799,9 @@ static inline int poll_pktin(uint32_t qi, int stash)
return num;
}
- qint = queue_index_to_qint(qi);
+ q_int = queue_index_to_qint(qi);
- ret = queue_fn->enq_multi(qint, b_hdr, num);
+ ret = queue_fn->enq_multi(q_int, b_hdr, num);
/* Drop packets that were not enqueued */
if (odp_unlikely(ret < num)) {
diff --git a/platform/linux-generic/odp_schedule_iquery.c b/platform/linux-generic/odp_schedule_iquery.c
index b8d7e3b5c..f0062b594 100644
--- a/platform/linux-generic/odp_schedule_iquery.c
+++ b/platform/linux-generic/odp_schedule_iquery.c
@@ -1203,7 +1203,7 @@ static inline void schedule_release_context(void)
schedule_release_atomic();
}
-static int schedule_ord_enq_multi(queue_t q_int, void *buf_hdr[],
+static int schedule_ord_enq_multi(void *q_int, void *buf_hdr[],
int num, int *ret)
{
int i;
diff --git a/platform/linux-generic/odp_schedule_scalable.c b/platform/linux-generic/odp_schedule_scalable.c
index ff24815c0..155be5a22 100644
--- a/platform/linux-generic/odp_schedule_scalable.c
+++ b/platform/linux-generic/odp_schedule_scalable.c
@@ -2006,7 +2006,7 @@ static int sched_queue(uint32_t queue_index)
return 0;
}
-static int ord_enq_multi(queue_t handle, void *buf_hdr[], int num,
+static int ord_enq_multi(void *handle, void *buf_hdr[], int num,
int *ret)
{
diff --git a/platform/linux-generic/odp_schedule_sp.c b/platform/linux-generic/odp_schedule_sp.c
index 2cef0e822..0f80452dd 100644
--- a/platform/linux-generic/odp_schedule_sp.c
+++ b/platform/linux-generic/odp_schedule_sp.c
@@ -414,7 +414,7 @@ static int sched_queue(uint32_t qi)
return 0;
}
-static int ord_enq_multi(queue_t q_int, void *buf_hdr[], int num,
+static int ord_enq_multi(void *q_int, void *buf_hdr[], int num,
int *ret)
{
(void)q_int;
diff --git a/platform/linux-generic/odp_traffic_mngr.c b/platform/linux-generic/odp_traffic_mngr.c
index eeb1ea966..79ba35b79 100644
--- a/platform/linux-generic/odp_traffic_mngr.c
+++ b/platform/linux-generic/odp_traffic_mngr.c
@@ -108,7 +108,7 @@ static odp_bool_t tm_demote_pkt_desc(tm_system_t *tm_system,
tm_shaper_obj_t *timer_shaper,
pkt_desc_t *demoted_pkt_desc);
-static int queue_tm_reenq(queue_t queue, odp_buffer_hdr_t *buf_hdr)
+static int queue_tm_reenq(void *queue, odp_buffer_hdr_t *buf_hdr)
{
odp_tm_queue_t tm_queue = MAKE_ODP_TM_QUEUE((uint8_t *)queue -
offsetof(tm_queue_obj_t,
@@ -118,7 +118,7 @@ static int queue_tm_reenq(queue_t queue, odp_buffer_hdr_t *buf_hdr)
return odp_tm_enq(tm_queue, pkt);
}
-static int queue_tm_reenq_multi(queue_t queue ODP_UNUSED,
+static int queue_tm_reenq_multi(void *queue ODP_UNUSED,
odp_buffer_hdr_t *buf[] ODP_UNUSED,
int num ODP_UNUSED)
{
diff --git a/platform/linux-generic/pktio/loop.c b/platform/linux-generic/pktio/loop.c
index 18fecf881..0bd1835cd 100644
--- a/platform/linux-generic/pktio/loop.c
+++ b/platform/linux-generic/pktio/loop.c
@@ -79,7 +79,7 @@ static int loopback_recv(pktio_entry_t *pktio_entry, int index ODP_UNUSED,
{
int nbr, i;
odp_buffer_hdr_t *hdr_tbl[QUEUE_MULTI_MAX];
- queue_t queue;
+ void *queue;
odp_packet_hdr_t *pkt_hdr;
odp_packet_t pkt;
odp_time_t ts_val;
@@ -260,7 +260,7 @@ static int loopback_send(pktio_entry_t *pktio_entry, int index ODP_UNUSED,
const odp_packet_t pkt_tbl[], int num)
{
odp_buffer_hdr_t *hdr_tbl[QUEUE_MULTI_MAX];
- queue_t queue;
+ void *queue;
int i;
int ret;
int nb_tx = 0;