aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPetri Savolainen <petri.savolainen@linaro.org>2015-01-26 15:05:48 +0200
committerMaxim Uvarov <maxim.uvarov@linaro.org>2015-01-27 15:34:30 +0300
commit939a02337eb0ad5bbd4a06d6090a95b2263f81ce (patch)
treef2072a8e104825083577aeec23496d230dc287c6
parent8d0f8982236b400b11b2e712e3bbd289694e6f2b (diff)
api: pool: Rename odp_buffer_pool_ to odp_pool_
Replaced odp_buffer_pool_ prefix in the pool API with odp_pool_. Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org> Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
-rw-r--r--example/generator/odp_generator.c18
-rw-r--r--example/ipsec/odp_ipsec.c20
-rw-r--r--example/ipsec/odp_ipsec_cache.c4
-rw-r--r--example/ipsec/odp_ipsec_cache.h2
-rw-r--r--example/ipsec/odp_ipsec_loop_db.c2
-rw-r--r--example/ipsec/odp_ipsec_loop_db.h12
-rw-r--r--example/ipsec/odp_ipsec_stream.c8
-rw-r--r--example/ipsec/odp_ipsec_stream.h2
-rw-r--r--example/l2fwd/odp_l2fwd.c10
-rw-r--r--example/packet/odp_pktio.c11
-rw-r--r--example/timer/odp_timer_test.c12
-rw-r--r--platform/linux-generic/include/api/odp_buffer.h2
-rw-r--r--platform/linux-generic/include/api/odp_crypto.h2
-rw-r--r--platform/linux-generic/include/api/odp_packet.h10
-rw-r--r--platform/linux-generic/include/api/odp_packet_io.h2
-rw-r--r--platform/linux-generic/include/api/odp_platform_types.h4
-rw-r--r--platform/linux-generic/include/api/odp_pool.h71
-rw-r--r--platform/linux-generic/include/odp_buffer_internal.h4
-rw-r--r--platform/linux-generic/include/odp_buffer_pool_internal.h14
-rw-r--r--platform/linux-generic/include/odp_crypto_internal.h2
-rw-r--r--platform/linux-generic/include/odp_packet_internal.h2
-rw-r--r--platform/linux-generic/include/odp_packet_socket.h8
-rw-r--r--platform/linux-generic/odp_buffer_pool.c37
-rw-r--r--platform/linux-generic/odp_crypto.c2
-rw-r--r--platform/linux-generic/odp_packet.c8
-rw-r--r--platform/linux-generic/odp_packet_io.c6
-rw-r--r--platform/linux-generic/odp_packet_socket.c10
-rw-r--r--platform/linux-generic/odp_schedule.c14
-rw-r--r--test/performance/odp_scheduling.c30
-rw-r--r--test/validation/buffer/odp_buffer_pool_test.c48
-rw-r--r--test/validation/buffer/odp_buffer_test.c10
-rw-r--r--test/validation/buffer/odp_buffer_tests.h2
-rw-r--r--test/validation/buffer/odp_packet_test.c19
-rw-r--r--test/validation/classification/odp_classification_tests.c16
-rw-r--r--test/validation/crypto/odp_crypto_test_async_inp.c8
-rw-r--r--test/validation/crypto/odp_crypto_test_sync_inp.c4
-rw-r--r--test/validation/odp_crypto.c10
-rw-r--r--test/validation/odp_pktio.c20
-rw-r--r--test/validation/odp_queue.c10
-rw-r--r--test/validation/odp_schedule.c18
-rw-r--r--test/validation/odp_timer.c6
41 files changed, 248 insertions, 252 deletions
diff --git a/example/generator/odp_generator.c b/example/generator/odp_generator.c
index de639a4..492664e 100644
--- a/example/generator/odp_generator.c
+++ b/example/generator/odp_generator.c
@@ -47,7 +47,7 @@ typedef struct {
int cpu_count; /**< system CPU count */
int if_count; /**< Number of interfaces to be used */
char **if_names; /**< Array of pointers to interface names */
- odp_buffer_pool_t pool; /**< Buffer pool for packet IO */
+ odp_pool_t pool; /**< Pool for packet IO */
odph_ethaddr_t srcmac; /**< src mac addr */
odph_ethaddr_t dstmac; /**< dest mac addr */
unsigned int srcip; /**< src ip addr */
@@ -74,7 +74,7 @@ static struct {
*/
typedef struct {
char *pktio_dev; /**< Interface name to use */
- odp_buffer_pool_t pool; /**< Buffer pool for packet IO */
+ odp_pool_t pool; /**< Pool for packet IO */
int mode; /**< Thread mode */
} thread_args_t;
@@ -173,7 +173,7 @@ static int scan_mac(char *in, odph_ethaddr_t *des)
* @return Handle of created packet
* @retval ODP_PACKET_INVALID Packet could not be created
*/
-static odp_packet_t pack_udp_pkt(odp_buffer_pool_t pool)
+static odp_packet_t pack_udp_pkt(odp_pool_t pool)
{
odp_packet_t pkt;
char *buf;
@@ -229,7 +229,7 @@ static odp_packet_t pack_udp_pkt(odp_buffer_pool_t pool)
* @return Handle of created packet
* @retval ODP_PACKET_INVALID Packet could not be created
*/
-static odp_packet_t pack_icmp_pkt(odp_buffer_pool_t pool)
+static odp_packet_t pack_icmp_pkt(odp_pool_t pool)
{
odp_packet_t pkt;
char *buf;
@@ -287,7 +287,7 @@ static odp_packet_t pack_icmp_pkt(odp_buffer_pool_t pool)
return pkt;
}
-static odp_pktio_t create_pktio(const char *dev, odp_buffer_pool_t pool)
+static odp_pktio_t create_pktio(const char *dev, odp_pool_t pool)
{
odp_queue_param_t qparam;
char inq_name[ODP_QUEUE_NAME_LEN];
@@ -540,7 +540,7 @@ static void *gen_recv_thread(void *arg)
int main(int argc, char *argv[])
{
odph_linux_pthread_t thread_tbl[MAX_WORKERS];
- odp_buffer_pool_t pool;
+ odp_pool_t pool;
int num_workers;
int i;
odp_shm_t shm;
@@ -608,13 +608,13 @@ int main(int argc, char *argv[])
params.buf.num = SHM_PKT_POOL_SIZE/SHM_PKT_POOL_BUF_SIZE;
params.type = ODP_POOL_PACKET;
- pool = odp_buffer_pool_create("packet_pool", ODP_SHM_NULL, &params);
+ pool = odp_pool_create("packet_pool", ODP_SHM_NULL, &params);
- if (pool == ODP_BUFFER_POOL_INVALID) {
+ if (pool == ODP_POOL_INVALID) {
EXAMPLE_ERR("Error: packet pool create failed.\n");
exit(EXIT_FAILURE);
}
- odp_buffer_pool_print(pool);
+ odp_pool_print(pool);
for (i = 0; i < args->appl.if_count; ++i)
create_pktio(args->appl.if_names[i], pool);
diff --git a/example/ipsec/odp_ipsec.c b/example/ipsec/odp_ipsec.c
index 389c106..f2d2fc7 100644
--- a/example/ipsec/odp_ipsec.c
+++ b/example/ipsec/odp_ipsec.c
@@ -53,7 +53,7 @@ typedef struct {
int if_count; /**< Number of interfaces to be used */
char **if_names; /**< Array of pointers to interface names */
crypto_api_mode_e mode; /**< Crypto API preferred mode */
- odp_buffer_pool_t pool; /**< Buffer pool for packet IO */
+ odp_pool_t pool; /**< Buffer pool for packet IO */
} appl_args_t;
/**
@@ -79,7 +79,7 @@ static args_t *args;
#define SHM_PKT_POOL_BUF_SIZE 4096
#define SHM_PKT_POOL_SIZE (SHM_PKT_POOL_BUF_COUNT * SHM_PKT_POOL_BUF_SIZE)
-static odp_buffer_pool_t pkt_pool = ODP_BUFFER_POOL_INVALID;
+static odp_pool_t pkt_pool = ODP_POOL_INVALID;
/**
* Buffer pool for crypto session output packets
@@ -88,7 +88,7 @@ static odp_buffer_pool_t pkt_pool = ODP_BUFFER_POOL_INVALID;
#define SHM_OUT_POOL_BUF_SIZE 4096
#define SHM_OUT_POOL_SIZE (SHM_OUT_POOL_BUF_COUNT * SHM_OUT_POOL_BUF_SIZE)
-static odp_buffer_pool_t out_pool = ODP_BUFFER_POOL_INVALID;
+static odp_pool_t out_pool = ODP_POOL_INVALID;
/** ATOMIC queue for IPsec sequence number assignment */
static odp_queue_t seqnumq;
@@ -155,7 +155,7 @@ typedef struct {
#define SHM_CTX_POOL_BUF_COUNT (SHM_PKT_POOL_BUF_COUNT + SHM_OUT_POOL_BUF_COUNT)
#define SHM_CTX_POOL_SIZE (SHM_CTX_POOL_BUF_COUNT * SHM_CTX_POOL_BUF_SIZE)
-static odp_buffer_pool_t ctx_pool = ODP_BUFFER_POOL_INVALID;
+static odp_pool_t ctx_pool = ODP_POOL_INVALID;
/**
* Get per packet processing context from packet buffer
@@ -404,9 +404,9 @@ void ipsec_init_pre(void)
params.buf.num = SHM_PKT_POOL_BUF_COUNT;
params.type = ODP_POOL_PACKET;
- out_pool = odp_buffer_pool_create("out_pool", ODP_SHM_NULL, &params);
+ out_pool = odp_pool_create("out_pool", ODP_SHM_NULL, &params);
- if (ODP_BUFFER_POOL_INVALID == out_pool) {
+ if (ODP_POOL_INVALID == out_pool) {
EXAMPLE_ERR("Error: message pool create failed.\n");
exit(EXIT_FAILURE);
}
@@ -1239,10 +1239,10 @@ main(int argc, char *argv[])
params.buf.num = SHM_PKT_POOL_BUF_COUNT;
params.type = ODP_POOL_PACKET;
- pkt_pool = odp_buffer_pool_create("packet_pool", ODP_SHM_NULL,
+ pkt_pool = odp_pool_create("packet_pool", ODP_SHM_NULL,
&params);
- if (ODP_BUFFER_POOL_INVALID == pkt_pool) {
+ if (ODP_POOL_INVALID == pkt_pool) {
EXAMPLE_ERR("Error: packet pool create failed.\n");
exit(EXIT_FAILURE);
}
@@ -1253,10 +1253,10 @@ main(int argc, char *argv[])
params.buf.num = SHM_CTX_POOL_BUF_COUNT;
params.type = ODP_POOL_BUFFER;
- ctx_pool = odp_buffer_pool_create("ctx_pool", ODP_SHM_NULL,
+ ctx_pool = odp_pool_create("ctx_pool", ODP_SHM_NULL,
&params);
- if (ODP_BUFFER_POOL_INVALID == ctx_pool) {
+ if (ODP_POOL_INVALID == ctx_pool) {
EXAMPLE_ERR("Error: context pool create failed.\n");
exit(EXIT_FAILURE);
}
diff --git a/example/ipsec/odp_ipsec_cache.c b/example/ipsec/odp_ipsec_cache.c
index 4447163..15180f2 100644
--- a/example/ipsec/odp_ipsec_cache.c
+++ b/example/ipsec/odp_ipsec_cache.c
@@ -41,7 +41,7 @@ int create_ipsec_cache_entry(sa_db_entry_t *cipher_sa,
crypto_api_mode_e api_mode,
bool in,
odp_queue_t completionq,
- odp_buffer_pool_t out_pool)
+ odp_pool_t out_pool)
{
odp_crypto_session_params_t params;
ipsec_cache_entry_t *entry;
@@ -59,7 +59,7 @@ int create_ipsec_cache_entry(sa_db_entry_t *cipher_sa,
if (CRYPTO_API_SYNC == api_mode) {
params.pref_mode = ODP_CRYPTO_SYNC;
params.compl_queue = ODP_QUEUE_INVALID;
- params.output_pool = ODP_BUFFER_POOL_INVALID;
+ params.output_pool = ODP_POOL_INVALID;
} else {
params.pref_mode = ODP_CRYPTO_ASYNC;
params.compl_queue = completionq;
diff --git a/example/ipsec/odp_ipsec_cache.h b/example/ipsec/odp_ipsec_cache.h
index 8d9d393..b436bd6 100644
--- a/example/ipsec/odp_ipsec_cache.h
+++ b/example/ipsec/odp_ipsec_cache.h
@@ -90,7 +90,7 @@ int create_ipsec_cache_entry(sa_db_entry_t *cipher_sa,
crypto_api_mode_e api_mode,
bool in,
odp_queue_t completionq,
- odp_buffer_pool_t out_pool);
+ odp_pool_t out_pool);
/**
* Find a matching IPsec cache entry for input packet
diff --git a/example/ipsec/odp_ipsec_loop_db.c b/example/ipsec/odp_ipsec_loop_db.c
index d213bb3..ab0129b 100644
--- a/example/ipsec/odp_ipsec_loop_db.c
+++ b/example/ipsec/odp_ipsec_loop_db.c
@@ -42,7 +42,7 @@ void init_loopback_db(void)
void create_loopback_db_entry(int idx,
odp_queue_t inq_def,
odp_queue_t outq_def,
- odp_buffer_pool_t pkt_pool)
+ odp_pool_t pkt_pool)
{
loopback_db_entry_t *entry = &loopback_db->intf[idx];
diff --git a/example/ipsec/odp_ipsec_loop_db.h b/example/ipsec/odp_ipsec_loop_db.h
index c11ff7f..690f6c3 100644
--- a/example/ipsec/odp_ipsec_loop_db.h
+++ b/example/ipsec/odp_ipsec_loop_db.h
@@ -19,10 +19,10 @@ extern "C" {
* Loopback database entry structure
*/
typedef struct loopback_db_entry_s {
- odp_queue_t inq_def;
- odp_queue_t outq_def;
- odp_buffer_pool_t pkt_pool;
- uint8_t mac[ODPH_ETHADDR_LEN];
+ odp_queue_t inq_def;
+ odp_queue_t outq_def;
+ odp_pool_t pkt_pool;
+ uint8_t mac[ODPH_ETHADDR_LEN];
} loopback_db_entry_t;
typedef struct loopback_db_s {
@@ -48,7 +48,7 @@ void init_loopback_db(void);
void create_loopback_db_entry(int idx,
odp_queue_t inq_def,
odp_queue_t outq_def,
- odp_buffer_pool_t pkt_pool);
+ odp_pool_t pkt_pool);
/**
* Parse loop interface index
@@ -117,7 +117,7 @@ odp_queue_t query_loopback_db_outq(int idx)
* @return ODP buffer pool
*/
static inline
-odp_buffer_pool_t query_loopback_db_pkt_pool(int idx)
+odp_pool_t query_loopback_db_pkt_pool(int idx)
{
return loopback_db->intf[idx].pkt_pool;
}
diff --git a/example/ipsec/odp_ipsec_stream.c b/example/ipsec/odp_ipsec_stream.c
index 7e3ad4a..916acdb 100644
--- a/example/ipsec/odp_ipsec_stream.c
+++ b/example/ipsec/odp_ipsec_stream.c
@@ -172,7 +172,7 @@ void resolve_stream_db(void)
odp_packet_t create_ipv4_packet(stream_db_entry_t *stream,
uint8_t *dmac,
- odp_buffer_pool_t pkt_pool)
+ odp_pool_t pkt_pool)
{
ipsec_cache_entry_t *entry = stream->input.entry;
odp_packet_t pkt;
@@ -472,12 +472,12 @@ bool verify_ipv4_packet(stream_db_entry_t *stream,
int create_stream_db_inputs(void)
{
int created = 0;
- odp_buffer_pool_t pkt_pool;
+ odp_pool_t pkt_pool;
stream_db_entry_t *stream = NULL;
/* Lookup the packet pool */
- pkt_pool = odp_buffer_pool_lookup("packet_pool");
- if (pkt_pool == ODP_BUFFER_POOL_INVALID) {
+ pkt_pool = odp_pool_lookup("packet_pool");
+ if (pkt_pool == ODP_POOL_INVALID) {
EXAMPLE_ERR("Error: pkt_pool not found\n");
exit(EXIT_FAILURE);
}
diff --git a/example/ipsec/odp_ipsec_stream.h b/example/ipsec/odp_ipsec_stream.h
index 173eb41..6ae7895 100644
--- a/example/ipsec/odp_ipsec_stream.h
+++ b/example/ipsec/odp_ipsec_stream.h
@@ -88,7 +88,7 @@ void resolve_stream_db(void);
*/
odp_packet_t create_ipv4_packet(stream_db_entry_t *stream,
uint8_t *dmac,
- odp_buffer_pool_t pkt_pool);
+ odp_pool_t pkt_pool);
/**
* Verify an IPv4 packet received on a loop output queue
diff --git a/example/l2fwd/odp_l2fwd.c b/example/l2fwd/odp_l2fwd.c
index f1c53f3..18403da 100644
--- a/example/l2fwd/odp_l2fwd.c
+++ b/example/l2fwd/odp_l2fwd.c
@@ -238,7 +238,7 @@ static void *pktio_ifburst_thread(void *arg)
/**
* Create a pktio handle, optionally associating a default input queue.
*/
-static odp_pktio_t create_pktio(const char *dev, odp_buffer_pool_t pool,
+static odp_pktio_t create_pktio(const char *dev, odp_pool_t pool,
int mode)
{
char inq_name[ODP_QUEUE_NAME_LEN];
@@ -286,7 +286,7 @@ static odp_pktio_t create_pktio(const char *dev, odp_buffer_pool_t pool,
int main(int argc, char *argv[])
{
odph_linux_pthread_t thread_tbl[MAX_WORKERS];
- odp_buffer_pool_t pool;
+ odp_pool_t pool;
int i;
int cpu;
int num_workers;
@@ -357,13 +357,13 @@ int main(int argc, char *argv[])
params.buf.num = SHM_PKT_POOL_SIZE/SHM_PKT_POOL_BUF_SIZE;
params.type = ODP_POOL_PACKET;
- pool = odp_buffer_pool_create("packet pool", ODP_SHM_NULL, &params);
+ pool = odp_pool_create("packet pool", ODP_SHM_NULL, &params);
- if (pool == ODP_BUFFER_POOL_INVALID) {
+ if (pool == ODP_POOL_INVALID) {
EXAMPLE_ERR("Error: packet pool create failed.\n");
exit(EXIT_FAILURE);
}
- odp_buffer_pool_print(pool);
+ odp_pool_print(pool);
for (i = 0; i < gbl_args->appl.if_count; ++i) {
gbl_args->pktios[i] = create_pktio(gbl_args->appl.if_names[i],
diff --git a/example/packet/odp_pktio.c b/example/packet/odp_pktio.c
index 10b6274..c4c720b 100644
--- a/example/packet/odp_pktio.c
+++ b/example/packet/odp_pktio.c
@@ -100,8 +100,7 @@ static void parse_args(int argc, char *argv[], appl_args_t *appl_args);
static void print_info(char *progname, appl_args_t *appl_args);
static void usage(char *progname);
-static odp_pktio_t create_pktio(const char *dev, odp_buffer_pool_t pool,
- int mode)
+static odp_pktio_t create_pktio(const char *dev, odp_pool_t pool, int mode)
{
odp_pktio_t pktio;
odp_queue_t inq_def;
@@ -281,7 +280,7 @@ static void *pktio_ifburst_thread(void *arg)
int main(int argc, char *argv[])
{
odph_linux_pthread_t thread_tbl[MAX_WORKERS];
- odp_buffer_pool_t pool;
+ odp_pool_t pool;
int num_workers;
int i;
int cpu;
@@ -335,13 +334,13 @@ int main(int argc, char *argv[])
params.buf.num = SHM_PKT_POOL_SIZE/SHM_PKT_POOL_BUF_SIZE;
params.type = ODP_POOL_PACKET;
- pool = odp_buffer_pool_create("packet_pool", ODP_SHM_NULL, &params);
+ pool = odp_pool_create("packet_pool", ODP_SHM_NULL, &params);
- if (pool == ODP_BUFFER_POOL_INVALID) {
+ if (pool == ODP_POOL_INVALID) {
EXAMPLE_ERR("Error: packet pool create failed.\n");
exit(EXIT_FAILURE);
}
- odp_buffer_pool_print(pool);
+ odp_pool_print(pool);
/* Create a pktio instance for each interface */
for (i = 0; i < args->appl.if_count; ++i)
diff --git a/example/timer/odp_timer_test.c b/example/timer/odp_timer_test.c
index 3521414..808b582 100644
--- a/example/timer/odp_timer_test.c
+++ b/example/timer/odp_timer_test.c
@@ -44,7 +44,7 @@ typedef struct {
static odp_barrier_t test_barrier;
/** @private Buffer pool handle */
-static odp_buffer_pool_t pool;
+static odp_pool_t pool;
/** @private Timer pool handle */
static odp_timer_pool_t tp;
@@ -186,7 +186,7 @@ static void test_abs_timeouts(int thr, test_args_t *args)
static void *run_thread(void *ptr)
{
int thr;
- odp_buffer_pool_t msg_pool;
+ odp_pool_t msg_pool;
test_args_t *args;
args = ptr;
@@ -197,9 +197,9 @@ static void *run_thread(void *ptr)
/*
* Find the buffer pool
*/
- msg_pool = odp_buffer_pool_lookup("msg_pool");
+ msg_pool = odp_pool_lookup("msg_pool");
- if (msg_pool == ODP_BUFFER_POOL_INVALID) {
+ if (msg_pool == ODP_POOL_INVALID) {
EXAMPLE_ERR(" [%i] msg_pool not found\n", thr);
return NULL;
}
@@ -378,9 +378,9 @@ int main(int argc, char *argv[])
params.buf.num = MSG_NUM_BUFS;
params.type = ODP_POOL_TIMEOUT;
- pool = odp_buffer_pool_create("msg_pool", ODP_SHM_NULL, &params);
+ pool = odp_pool_create("msg_pool", ODP_SHM_NULL, &params);
- if (pool == ODP_BUFFER_POOL_INVALID) {
+ if (pool == ODP_POOL_INVALID) {
EXAMPLE_ERR("Buffer pool create failed.\n");
return -1;
}
diff --git a/platform/linux-generic/include/api/odp_buffer.h b/platform/linux-generic/include/api/odp_buffer.h
index 2f18aa9..8e144b8 100644
--- a/platform/linux-generic/include/api/odp_buffer.h
+++ b/platform/linux-generic/include/api/odp_buffer.h
@@ -86,7 +86,7 @@ int odp_buffer_is_valid(odp_buffer_t buf);
*
* @return Handle of buffer pool buffer belongs to
*/
-odp_buffer_pool_t odp_buffer_pool(odp_buffer_t buf);
+odp_pool_t odp_buffer_pool(odp_buffer_t buf);
/**
* Print buffer metadata to STDOUT
diff --git a/platform/linux-generic/include/api/odp_crypto.h b/platform/linux-generic/include/api/odp_crypto.h
index 4183442..da6041c 100644
--- a/platform/linux-generic/include/api/odp_crypto.h
+++ b/platform/linux-generic/include/api/odp_crypto.h
@@ -109,7 +109,7 @@ typedef struct odp_crypto_session_params {
enum odp_auth_alg auth_alg; /**< Authentication algorithm */
odp_crypto_key_t auth_key; /**< Authentication key */
odp_queue_t compl_queue; /**< Async mode completion event queue */
- odp_buffer_pool_t output_pool; /**< Output buffer pool */
+ odp_pool_t output_pool; /**< Output buffer pool */
} odp_crypto_session_params_t;
/**
diff --git a/platform/linux-generic/include/api/odp_packet.h b/platform/linux-generic/include/api/odp_packet.h
index e71aa09..eca5b73 100644
--- a/platform/linux-generic/include/api/odp_packet.h
+++ b/platform/linux-generic/include/api/odp_packet.h
@@ -51,7 +51,7 @@ extern "C" {
* Allocate a packet from a buffer pool
*
* Allocates a packet of the requested length from the specified buffer pool.
- * Pool must have been created with buffer type ODP_BUFFER_TYPE_PACKET. The
+ * Pool must have been created with ODP_POOL_PACKET type. The
* packet is initialized with data pointers and lengths set according to the
* specified len, and the default headroom and tailroom length settings. All
* other packet metadata are set to their default values.
@@ -66,7 +66,7 @@ extern "C" {
* the ODP_CONFIG_PACKET_HEADROOM and ODP_CONFIG_PACKET_TAILROOM defines in
* odp_config.h.
*/
-odp_packet_t odp_packet_alloc(odp_buffer_pool_t pool, uint32_t len);
+odp_packet_t odp_packet_alloc(odp_pool_t pool, uint32_t len);
/**
* Free packet
@@ -383,7 +383,7 @@ void *odp_packet_offset(odp_packet_t pkt, uint32_t offset, uint32_t *len,
*
* @return Buffer pool handle
*/
-odp_buffer_pool_t odp_packet_pool(odp_packet_t pkt);
+odp_pool_t odp_packet_pool(odp_packet_t pkt);
/**
* Packet input interface
@@ -774,14 +774,14 @@ odp_packet_t odp_packet_rem_data(odp_packet_t pkt, uint32_t offset,
*
* Create a new copy of the packet. The new packet is exact copy of the source
* packet (incl. data and metadata). The pool must have been created with
- * buffer type ODP_BUFFER_TYPE_PACKET.
+ * ODP_POOL_PACKET type.
*
* @param pkt Packet handle
* @param pool Buffer pool for allocation of the new packet.
*
* @return Handle to the copy of the packet, or ODP_PACKET_INVALID
*/
-odp_packet_t odp_packet_copy(odp_packet_t pkt, odp_buffer_pool_t pool);
+odp_packet_t odp_packet_copy(odp_packet_t pkt, odp_pool_t pool);
/**
* Copy data from packet
diff --git a/platform/linux-generic/include/api/odp_packet_io.h b/platform/linux-generic/include/api/odp_packet_io.h
index 7dfcc4f..6e479aa 100644
--- a/platform/linux-generic/include/api/odp_packet_io.h
+++ b/platform/linux-generic/include/api/odp_packet_io.h
@@ -46,7 +46,7 @@ extern "C" {
* device used for testing. Usually it's loop back
* interface.
*/
-odp_pktio_t odp_pktio_open(const char *dev, odp_buffer_pool_t pool);
+odp_pktio_t odp_pktio_open(const char *dev, odp_pool_t pool);
/**
* Close an ODP packet IO instance
diff --git a/platform/linux-generic/include/api/odp_platform_types.h b/platform/linux-generic/include/api/odp_platform_types.h
index 1d32e23..962ed4c 100644
--- a/platform/linux-generic/include/api/odp_platform_types.h
+++ b/platform/linux-generic/include/api/odp_platform_types.h
@@ -24,10 +24,10 @@
*/
/** ODP Buffer pool */
-typedef uint32_t odp_buffer_pool_t;
+typedef uint32_t odp_pool_t;
/** Invalid buffer pool */
-#define ODP_BUFFER_POOL_INVALID (0xffffffff)
+#define ODP_POOL_INVALID (0xffffffff)
/** ODP buffer */
typedef uint32_t odp_buffer_t;
diff --git a/platform/linux-generic/include/api/odp_pool.h b/platform/linux-generic/include/api/odp_pool.h
index eba7b83..8a39fb3 100644
--- a/platform/linux-generic/include/api/odp_pool.h
+++ b/platform/linux-generic/include/api/odp_pool.h
@@ -76,100 +76,99 @@ typedef struct odp_pool_param_t {
#define ODP_POOL_TIMEOUT ODP_EVENT_TIMEOUT
/**
- * Create a buffer pool
- * This routine is used to create a buffer pool. It take three
+ * Create a pool
+ * This routine is used to create a pool. It take three
* arguments: the optional name of the pool to be created, an optional shared
* memory handle, and a parameter struct that describes the pool to be
* created. If a name is not specified the result is an anonymous pool that
- * cannot be referenced by odp_buffer_pool_lookup().
+ * cannot be referenced by odp_pool_lookup().
*
- * @param name Name of the pool, max ODP_BUFFER_POOL_NAME_LEN-1 chars.
+ * @param name Name of the pool, max ODP_POOL_NAME_LEN-1 chars.
* May be specified as NULL for anonymous pools.
*
* @param shm The shared memory object in which to create the pool.
* Use ODP_SHM_NULL to reserve default memory type
- * for the buffer type.
+ * for the pool type.
*
- * @param params Buffer pool parameters.
+ * @param params Pool parameters.
*
- * @return Handle of the created buffer pool
- * @retval ODP_BUFFER_POOL_INVALID Buffer pool could not be created
+ * @return Handle of the created pool
+ * @retval ODP_POOL_INVALID Pool could not be created
*/
-odp_buffer_pool_t odp_buffer_pool_create(const char *name,
- odp_shm_t shm,
- odp_pool_param_t *params);
+odp_pool_t odp_pool_create(const char *name,
+ odp_shm_t shm,
+ odp_pool_param_t *params);
/**
- * Destroy a buffer pool previously created by odp_buffer_pool_create()
+ * Destroy a pool previously created by odp_pool_create()
*
- * @param pool Handle of the buffer pool to be destroyed
+ * @param pool Handle of the pool to be destroyed
*
* @retval 0 Success
* @retval -1 Failure
*
- * @note This routine destroys a previously created buffer pool. This call
+ * @note This routine destroys a previously created pool. This call
* does not destroy any shared memory object passed to
- * odp_buffer_pool_create() used to store the buffer pool contents. The caller
+ * odp_pool_create() used to store the pool contents. The caller
* takes responsibility for that. If no shared memory object was passed as
* part of the create call, then this routine will destroy any internal shared
- * memory objects associated with the buffer pool. Results are undefined if
- * an attempt is made to destroy a buffer pool that contains allocated or
+ * memory objects associated with the pool. Results are undefined if
+ * an attempt is made to destroy a pool that contains allocated or
* otherwise active buffers.
*/
-int odp_buffer_pool_destroy(odp_buffer_pool_t pool);
+int odp_pool_destroy(odp_pool_t pool);
/**
- * Find a buffer pool by name
+ * Find a pool by name
*
* @param name Name of the pool
*
- * @return Handle of found buffer pool
- * @retval ODP_BUFFER_POOL_INVALID Buffer pool could not be found
+ * @return Handle of found pool
+ * @retval ODP_POOL_INVALID Pool could not be found
*
* @note This routine cannot be used to look up an anonymous pool (one created
* with no name).
*/
-odp_buffer_pool_t odp_buffer_pool_lookup(const char *name);
+odp_pool_t odp_pool_lookup(const char *name);
/**
- * Buffer pool information struct
- * Used to get information about a buffer pool.
+ * Pool information struct
+ * Used to get information about a pool.
*/
-typedef struct odp_buffer_pool_info_t {
+typedef struct odp_pool_info_t {
const char *name; /**< pool name */
odp_shm_t shm; /**< handle of shared memory area
supplied by application to
- contain buffer pool, or
+ contain pool, or
ODP_SHM_INVALID if this pool is
managed by ODP */
odp_pool_param_t params; /**< pool parameters */
-} odp_buffer_pool_info_t;
+} odp_pool_info_t;
/**
- * Retrieve information about a buffer pool
+ * Retrieve information about a pool
*
- * @param pool Buffer pool handle
+ * @param pool Pool handle
*
- * @param[out] info Receives an odp_buffer_pool_info_t object
+ * @param[out] info Receives an odp_pool_info_t object
* that describes the pool.
*
* @retval 0 Success
* @retval -1 Failure. Info could not be retrieved.
*/
-int odp_buffer_pool_info(odp_buffer_pool_t pool,
- odp_buffer_pool_info_t *info);
+int odp_pool_info(odp_pool_t pool, odp_pool_info_t *info);
/**
- * Print buffer pool info
+ * Print pool info
*
* @param pool Pool handle
*
* @note This routine writes implementation-defined information about the
- * specified buffer pool to the ODP log. The intended use is for debugging.
+ * specified pool to the ODP log. The intended use is for debugging.
*/
-void odp_buffer_pool_print(odp_buffer_pool_t pool);
+void odp_pool_print(odp_pool_t pool);
/**
* Buffer alloc
@@ -180,7 +179,7 @@ void odp_buffer_pool_print(odp_buffer_pool_t pool);
* @return Handle of allocated buffer
* @retval ODP_BUFFER_INVALID Buffer could not be allocated
*/
-odp_buffer_t odp_buffer_alloc(odp_buffer_pool_t pool);
+odp_buffer_t odp_buffer_alloc(odp_pool_t pool);
/**
* Buffer free
diff --git a/platform/linux-generic/include/odp_buffer_internal.h b/platform/linux-generic/include/odp_buffer_internal.h
index 14c32c1..e32bce0 100644
--- a/platform/linux-generic/include/odp_buffer_internal.h
+++ b/platform/linux-generic/include/odp_buffer_internal.h
@@ -121,7 +121,7 @@ typedef struct odp_buffer_hdr_t {
int type; /* buffer type */
uint32_t size; /* max data size */
odp_atomic_u32_t ref_count; /* reference count */
- odp_buffer_pool_t pool_hdl; /* buffer pool handle */
+ odp_pool_t pool_hdl; /* buffer pool handle */
union {
uint64_t buf_u64; /* user u64 */
void *buf_ctx; /* user context */
@@ -152,7 +152,7 @@ typedef struct {
#define ODP_FREEBUF -1
/* Forward declarations */
-odp_buffer_t buffer_alloc(odp_buffer_pool_t pool, size_t size);
+odp_buffer_t buffer_alloc(odp_pool_t pool, size_t size);
/*
diff --git a/platform/linux-generic/include/odp_buffer_pool_internal.h b/platform/linux-generic/include/odp_buffer_pool_internal.h
index 4ace3c3..d6f44d9 100644
--- a/platform/linux-generic/include/odp_buffer_pool_internal.h
+++ b/platform/linux-generic/include/odp_buffer_pool_internal.h
@@ -87,7 +87,7 @@ struct pool_entry_s {
char name[ODP_POOL_NAME_LEN];
odp_pool_param_t params;
_odp_buffer_pool_init_t init_params;
- odp_buffer_pool_t pool_hdl;
+ odp_pool_t pool_hdl;
uint32_t pool_id;
odp_shm_t pool_shm;
union {
@@ -333,12 +333,12 @@ static inline void flush_cache(local_cache_t *buf_cache,
buf_cache->buffrees = 0;
}
-static inline odp_buffer_pool_t pool_index_to_handle(uint32_t pool_id)
+static inline odp_pool_t pool_index_to_handle(uint32_t pool_id)
{
return pool_id;
}
-static inline uint32_t pool_handle_to_index(odp_buffer_pool_t pool_hdl)
+static inline uint32_t pool_handle_to_index(odp_pool_t pool_hdl)
{
return pool_hdl;
}
@@ -348,7 +348,7 @@ static inline void *get_pool_entry(uint32_t pool_id)
return pool_entry_ptr[pool_id];
}
-static inline pool_entry_t *odp_pool_to_entry(odp_buffer_pool_t pool)
+static inline pool_entry_t *odp_pool_to_entry(odp_pool_t pool)
{
return (pool_entry_t *)get_pool_entry(pool_handle_to_index(pool));
}
@@ -358,17 +358,17 @@ static inline pool_entry_t *odp_buf_to_pool(odp_buffer_hdr_t *buf)
return odp_pool_to_entry(buf->pool_hdl);
}
-static inline uint32_t odp_buffer_pool_segment_size(odp_buffer_pool_t pool)
+static inline uint32_t odp_buffer_pool_segment_size(odp_pool_t pool)
{
return odp_pool_to_entry(pool)->s.seg_size;
}
-static inline uint32_t odp_buffer_pool_headroom(odp_buffer_pool_t pool)
+static inline uint32_t odp_buffer_pool_headroom(odp_pool_t pool)
{
return odp_pool_to_entry(pool)->s.headroom;
}
-static inline uint32_t odp_buffer_pool_tailroom(odp_buffer_pool_t pool)
+static inline uint32_t odp_buffer_pool_tailroom(odp_pool_t pool)
{
return odp_pool_to_entry(pool)->s.tailroom;
}
diff --git a/platform/linux-generic/include/odp_crypto_internal.h b/platform/linux-generic/include/odp_crypto_internal.h
index 2e5a71c..429c6c2 100644
--- a/platform/linux-generic/include/odp_crypto_internal.h
+++ b/platform/linux-generic/include/odp_crypto_internal.h
@@ -33,7 +33,7 @@ struct odp_crypto_generic_session {
enum odp_crypto_op op;
bool do_cipher_first;
odp_queue_t compl_queue;
- odp_buffer_pool_t output_pool;
+ odp_pool_t output_pool;
struct {
enum odp_cipher_alg alg;
struct {
diff --git a/platform/linux-generic/include/odp_packet_internal.h b/platform/linux-generic/include/odp_packet_internal.h
index 33c9d92..0ebc14b 100644
--- a/platform/linux-generic/include/odp_packet_internal.h
+++ b/platform/linux-generic/include/odp_packet_internal.h
@@ -253,7 +253,7 @@ int _odp_packet_copy_to_packet(odp_packet_t srcpkt, uint32_t srcoffset,
odp_packet_t dstpkt, uint32_t dstoffset,
uint32_t len);
-odp_packet_t _odp_packet_alloc(odp_buffer_pool_t pool_hdl);
+odp_packet_t _odp_packet_alloc(odp_pool_t pool_hdl);
int _odp_packet_parse(odp_packet_t pkt);
diff --git a/platform/linux-generic/include/odp_packet_socket.h b/platform/linux-generic/include/odp_packet_socket.h
index 0c4ad0b..08c7cb6 100644
--- a/platform/linux-generic/include/odp_packet_socket.h
+++ b/platform/linux-generic/include/odp_packet_socket.h
@@ -41,7 +41,7 @@
typedef struct {
int sockfd; /**< socket descriptor */
- odp_buffer_pool_t pool; /**< buffer pool to alloc packets from */
+ odp_pool_t pool; /**< pool to alloc packets from */
size_t buf_size; /**< size of buffer payload in 'pool' */
size_t max_frame_len; /**< max frame len = buf_size - sizeof(pkt_hdr) */
size_t frame_offset; /**< frame start offset from start of pkt buf */
@@ -75,7 +75,7 @@ typedef struct {
struct ring tx_ring ODP_ALIGNED_CACHE;
int sockfd ODP_ALIGNED_CACHE;
- odp_buffer_pool_t pool;
+ odp_pool_t pool;
size_t frame_offset; /**< frame start offset from start of pkt buf */
uint8_t *mmap_base;
unsigned mmap_len;
@@ -88,10 +88,10 @@ typedef struct {
* Open & configure a raw packet socket
*/
int setup_pkt_sock(pkt_sock_t * const pkt_sock, const char *netdev,
- odp_buffer_pool_t pool);
+ odp_pool_t pool);
int setup_pkt_sock_mmap(pkt_sock_mmap_t * const pkt_sock, const char *netdev,
- odp_buffer_pool_t pool, int fanout);
+ odp_pool_t pool, int fanout);
/**
* Close a packet socket
diff --git a/platform/linux-generic/odp_buffer_pool.c b/platform/linux-generic/odp_buffer_pool.c
index fb65c2d..35101c7 100644
--- a/platform/linux-generic/odp_buffer_pool.c
+++ b/platform/linux-generic/odp_buffer_pool.c
@@ -96,14 +96,14 @@ int odp_buffer_pool_init_global(void)
}
/**
- * Buffer pool creation
+ * Pool creation
*/
-odp_buffer_pool_t odp_buffer_pool_create(const char *name,
+odp_pool_t odp_pool_create(const char *name,
odp_shm_t shm,
odp_pool_param_t *params)
{
- odp_buffer_pool_t pool_hdl = ODP_BUFFER_POOL_INVALID;
+ odp_pool_t pool_hdl = ODP_POOL_INVALID;
pool_entry_t *pool;
uint32_t i, headroom = 0, tailroom = 0;
@@ -117,7 +117,7 @@ odp_buffer_pool_t odp_buffer_pool_create(const char *name,
_odp_buffer_pool_init_t *init_params = &default_init_params;
if (params == NULL)
- return ODP_BUFFER_POOL_INVALID;
+ return ODP_POOL_INVALID;
/* Restriction for v1.0: All non-packet buffers are unsegmented */
int unsegmented = 1;
@@ -136,7 +136,7 @@ odp_buffer_pool_t odp_buffer_pool_create(const char *name,
/* Validate requested buffer alignment */
if (buf_align > ODP_CONFIG_BUFFER_ALIGN_MAX ||
buf_align != ODP_ALIGN_ROUNDDOWN_POWER_2(buf_align, buf_align))
- return ODP_BUFFER_POOL_INVALID;
+ return ODP_POOL_INVALID;
/* Set correct alignment based on input request */
if (buf_align == 0)
@@ -179,13 +179,13 @@ odp_buffer_pool_t odp_buffer_pool_create(const char *name,
break;
default:
- return ODP_BUFFER_POOL_INVALID;
+ return ODP_POOL_INVALID;
}
/* Validate requested number of buffers against addressable limits */
if (params->buf.num >
(ODP_BUFFER_MAX_BUFFERS / (buf_stride / ODP_CACHE_LINE_SIZE)))
- return ODP_BUFFER_POOL_INVALID;
+ return ODP_POOL_INVALID;
/* Find an unused buffer pool slot and iniitalize it as requested */
for (i = 0; i < ODP_CONFIG_BUFFER_POOLS; i++) {
@@ -239,7 +239,7 @@ odp_buffer_pool_t odp_buffer_pool_create(const char *name,
ODP_PAGE_SIZE, 0);
if (shm == ODP_SHM_INVALID) {
POOL_UNLOCK(&pool->s.lock);
- return ODP_BUFFER_POOL_INVALID;
+ return ODP_POOL_INVALID;
}
pool->s.pool_base_addr = odp_shm_addr(shm);
} else {
@@ -247,7 +247,7 @@ odp_buffer_pool_t odp_buffer_pool_create(const char *name,
if (odp_shm_info(shm, &info) != 0 ||
info.size < pool->s.pool_size) {
POOL_UNLOCK(&pool->s.lock);
- return ODP_BUFFER_POOL_INVALID;
+ return ODP_POOL_INVALID;
}
pool->s.pool_base_addr = odp_shm_addr(shm);
void *page_addr =
@@ -258,7 +258,7 @@ odp_buffer_pool_t odp_buffer_pool_create(const char *name,
((size_t)page_addr -
(size_t)pool->s.pool_base_addr)) {
POOL_UNLOCK(&pool->s.lock);
- return ODP_BUFFER_POOL_INVALID;
+ return ODP_POOL_INVALID;
}
pool->s.pool_base_addr = page_addr;
}
@@ -375,7 +375,7 @@ odp_buffer_pool_t odp_buffer_pool_create(const char *name,
}
-odp_buffer_pool_t odp_buffer_pool_lookup(const char *name)
+odp_pool_t odp_pool_lookup(const char *name)
{
uint32_t i;
pool_entry_t *pool;
@@ -392,11 +392,10 @@ odp_buffer_pool_t odp_buffer_pool_lookup(const char *name)
POOL_UNLOCK(&pool->s.lock);
}
- return ODP_BUFFER_POOL_INVALID;
+ return ODP_POOL_INVALID;
}
-int odp_buffer_pool_info(odp_buffer_pool_t pool_hdl,
- odp_buffer_pool_info_t *info)
+int odp_pool_info(odp_pool_t pool_hdl, odp_pool_info_t *info)
{
uint32_t pool_id = pool_handle_to_index(pool_hdl);
pool_entry_t *pool = get_pool_entry(pool_id);
@@ -415,7 +414,7 @@ int odp_buffer_pool_info(odp_buffer_pool_t pool_hdl,
return 0;
}
-int odp_buffer_pool_destroy(odp_buffer_pool_t pool_hdl)
+int odp_pool_destroy(odp_pool_t pool_hdl)
{
uint32_t pool_id = pool_handle_to_index(pool_hdl);
pool_entry_t *pool = get_pool_entry(pool_id);
@@ -450,7 +449,7 @@ int odp_buffer_pool_destroy(odp_buffer_pool_t pool_hdl)
return 0;
}
-odp_buffer_t buffer_alloc(odp_buffer_pool_t pool_hdl, size_t size)
+odp_buffer_t buffer_alloc(odp_pool_t pool_hdl, size_t size)
{
uint32_t pool_id = pool_handle_to_index(pool_hdl);
pool_entry_t *pool = get_pool_entry(pool_id);
@@ -505,7 +504,7 @@ odp_buffer_t buffer_alloc(odp_buffer_pool_t pool_hdl, size_t size)
return odp_hdr_to_buf(&buf->buf);
}
-odp_buffer_t odp_buffer_alloc(odp_buffer_pool_t pool_hdl)
+odp_buffer_t odp_buffer_alloc(odp_pool_t pool_hdl)
{
return buffer_alloc(pool_hdl,
odp_pool_to_entry(pool_hdl)->s.params.buf.size);
@@ -532,7 +531,7 @@ void _odp_flush_caches(void)
}
}
-void odp_buffer_pool_print(odp_buffer_pool_t pool_hdl)
+void odp_pool_print(odp_pool_t pool_hdl)
{
pool_entry_t *pool;
uint32_t pool_id;
@@ -600,7 +599,7 @@ void odp_buffer_pool_print(odp_buffer_pool_t pool_hdl)
}
-odp_buffer_pool_t odp_buffer_pool(odp_buffer_t buf)
+odp_pool_t odp_buffer_pool(odp_buffer_t buf)
{
return odp_buf_to_hdr(buf)->pool_hdl;
}
diff --git a/platform/linux-generic/odp_crypto.c b/platform/linux-generic/odp_crypto.c
index d604dea..4436a0c 100644
--- a/platform/linux-generic/odp_crypto.c
+++ b/platform/linux-generic/odp_crypto.c
@@ -361,7 +361,7 @@ odp_crypto_operation(odp_crypto_op_params_t *params,
/* Resolve output buffer */
if (ODP_PACKET_INVALID == params->out_pkt)
- if (ODP_BUFFER_POOL_INVALID != session->output_pool)
+ if (ODP_POOL_INVALID != session->output_pool)
params->out_pkt =
odp_packet_alloc(session->output_pool,
odp_packet_len(params->pkt));
diff --git a/platform/linux-generic/odp_packet.c b/platform/linux-generic/odp_packet.c
index 6b38b80..bb049d1 100644
--- a/platform/linux-generic/odp_packet.c
+++ b/platform/linux-generic/odp_packet.c
@@ -25,7 +25,7 @@
*
*/
-odp_packet_t odp_packet_alloc(odp_buffer_pool_t pool_hdl, uint32_t len)
+odp_packet_t odp_packet_alloc(odp_pool_t pool_hdl, uint32_t len)
{
pool_entry_t *pool = odp_pool_to_entry(pool_hdl);
@@ -209,7 +209,7 @@ void *odp_packet_offset(odp_packet_t pkt, uint32_t offset, uint32_t *len,
*
*/
-odp_buffer_pool_t odp_packet_pool(odp_packet_t pkt)
+odp_pool_t odp_packet_pool(odp_packet_t pkt)
{
return odp_packet_hdr(pkt)->buf_hdr.pool_hdl;
}
@@ -463,7 +463,7 @@ odp_packet_t odp_packet_rem_data(odp_packet_t pkt, uint32_t offset,
*
*/
-odp_packet_t odp_packet_copy(odp_packet_t pkt, odp_buffer_pool_t pool)
+odp_packet_t odp_packet_copy(odp_packet_t pkt, odp_pool_t pool)
{
odp_packet_hdr_t *srchdr = odp_packet_hdr(pkt);
uint32_t pktlen = srchdr->frame_len;
@@ -623,7 +623,7 @@ int _odp_packet_copy_to_packet(odp_packet_t srcpkt, uint32_t srcoffset,
return 0;
}
-odp_packet_t _odp_packet_alloc(odp_buffer_pool_t pool_hdl)
+odp_packet_t _odp_packet_alloc(odp_pool_t pool_hdl)
{
pool_entry_t *pool = odp_pool_to_entry(pool_hdl);
diff --git a/platform/linux-generic/odp_packet_io.c b/platform/linux-generic/odp_packet_io.c
index be8349b..f69d6b1 100644
--- a/platform/linux-generic/odp_packet_io.c
+++ b/platform/linux-generic/odp_packet_io.c
@@ -169,7 +169,7 @@ static int free_pktio_entry(odp_pktio_t id)
}
static int init_socket(pktio_entry_t *entry, const char *dev,
- odp_buffer_pool_t pool)
+ odp_pool_t pool)
{
int fd = -1;
@@ -215,7 +215,7 @@ static int init_loop(pktio_entry_t *entry, odp_pktio_t id)
return 0;
}
-static odp_pktio_t setup_pktio_entry(const char *dev, odp_buffer_pool_t pool)
+static odp_pktio_t setup_pktio_entry(const char *dev, odp_pool_t pool)
{
odp_pktio_t id;
pktio_entry_t *pktio_entry;
@@ -257,7 +257,7 @@ static odp_pktio_t setup_pktio_entry(const char *dev, odp_buffer_pool_t pool)
return id;
}
-odp_pktio_t odp_pktio_open(const char *dev, odp_buffer_pool_t pool)
+odp_pktio_t odp_pktio_open(const char *dev, odp_pool_t pool)
{
odp_pktio_t id;
diff --git a/platform/linux-generic/odp_packet_socket.c b/platform/linux-generic/odp_packet_socket.c
index da7fb2c..bf69511 100644
--- a/platform/linux-generic/odp_packet_socket.c
+++ b/platform/linux-generic/odp_packet_socket.c
@@ -123,7 +123,7 @@ static int set_pkt_sock_fanout_mmap(pkt_sock_mmap_t *const pkt_sock,
* ODP_PACKET_SOCKET_MMSG:
*/
int setup_pkt_sock(pkt_sock_t *const pkt_sock, const char *netdev,
- odp_buffer_pool_t pool)
+ odp_pool_t pool)
{
int sockfd;
int err;
@@ -131,7 +131,7 @@ int setup_pkt_sock(pkt_sock_t *const pkt_sock, const char *netdev,
struct ifreq ethreq;
struct sockaddr_ll sa_ll;
- if (pool == ODP_BUFFER_POOL_INVALID)
+ if (pool == ODP_POOL_INVALID)
return -1;
pkt_sock->pool = pool;
@@ -468,7 +468,7 @@ static inline void mmap_tx_user_ready(struct tpacket2_hdr *hdr)
static inline unsigned pkt_mmap_v2_rx(int sock, struct ring *ring,
odp_packet_t pkt_table[], unsigned len,
- odp_buffer_pool_t pool,
+ odp_pool_t pool,
unsigned char if_mac[])
{
union frame_map ppd;
@@ -733,14 +733,14 @@ static int mmap_store_hw_addr(pkt_sock_mmap_t *const pkt_sock,
* ODP_PACKET_SOCKET_MMAP:
*/
int setup_pkt_sock_mmap(pkt_sock_mmap_t *const pkt_sock, const char *netdev,
- odp_buffer_pool_t pool, int fanout)
+ odp_pool_t pool, int fanout)
{
int if_idx;
int ret = 0;
memset(pkt_sock, 0, sizeof(*pkt_sock));
- if (pool == ODP_BUFFER_POOL_INVALID)
+ if (pool == ODP_POOL_INVALID)
return -1;
/* Store eth buffer offset for pkt buffers from this pool */
diff --git a/platform/linux-generic/odp_schedule.c b/platform/linux-generic/odp_schedule.c
index 79ae1b3..4cb82b3 100644
--- a/platform/linux-generic/odp_schedule.c
+++ b/platform/linux-generic/odp_schedule.c
@@ -43,10 +43,10 @@ _ODP_STATIC_ASSERT((8*sizeof(pri_mask_t)) >= QUEUES_PER_PRIO,
typedef struct {
- odp_queue_t pri_queue[ODP_CONFIG_SCHED_PRIOS][QUEUES_PER_PRIO];
- pri_mask_t pri_mask[ODP_CONFIG_SCHED_PRIOS];
- odp_spinlock_t mask_lock;
- odp_buffer_pool_t pool;
+ odp_queue_t pri_queue[ODP_CONFIG_SCHED_PRIOS][QUEUES_PER_PRIO];
+ pri_mask_t pri_mask[ODP_CONFIG_SCHED_PRIOS];
+ odp_spinlock_t mask_lock;
+ odp_pool_t pool;
} sched_t;
typedef struct {
@@ -83,7 +83,7 @@ static inline odp_queue_t select_pri_queue(odp_queue_t queue, int prio)
int odp_schedule_init_global(void)
{
odp_shm_t shm;
- odp_buffer_pool_t pool;
+ odp_pool_t pool;
int i, j;
odp_pool_param_t params;
@@ -105,9 +105,9 @@ int odp_schedule_init_global(void)
params.buf.num = SCHED_POOL_SIZE/sizeof(queue_desc_t);
params.type = ODP_POOL_BUFFER;
- pool = odp_buffer_pool_create("odp_sched_pool", ODP_SHM_NULL, &params);
+ pool = odp_pool_create("odp_sched_pool", ODP_SHM_NULL, &params);
- if (pool == ODP_BUFFER_POOL_INVALID) {
+ if (pool == ODP_POOL_INVALID) {
ODP_ERR("Schedule init: Pool create failed.\n");
return -1;
}
diff --git a/test/performance/odp_scheduling.c b/test/performance/odp_scheduling.c
index bf6cf10..32155bd 100644
--- a/test/performance/odp_scheduling.c
+++ b/test/performance/odp_scheduling.c
@@ -88,7 +88,7 @@ static void clear_sched_queues(void)
*
* @return 0 if successful
*/
-static int create_queue(int thr, odp_buffer_pool_t msg_pool, int prio)
+static int create_queue(int thr, odp_pool_t msg_pool, int prio)
{
char name[] = "sched_XX_00";
odp_buffer_t buf;
@@ -128,7 +128,7 @@ static int create_queue(int thr, odp_buffer_pool_t msg_pool, int prio)
*
* @return 0 if successful
*/
-static int create_queues(int thr, odp_buffer_pool_t msg_pool, int prio)
+static int create_queues(int thr, odp_pool_t msg_pool, int prio)
{
char name[] = "sched_XX_YY";
odp_buffer_t buf;
@@ -176,7 +176,7 @@ static int create_queues(int thr, odp_buffer_pool_t msg_pool, int prio)
*
* @return 0 if successful
*/
-static int test_alloc_single(int thr, odp_buffer_pool_t pool)
+static int test_alloc_single(int thr, odp_pool_t pool)
{
int i;
odp_buffer_t temp_buf;
@@ -213,7 +213,7 @@ static int test_alloc_single(int thr, odp_buffer_pool_t pool)
*
* @return 0 if successful
*/
-static int test_alloc_multi(int thr, odp_buffer_pool_t pool)
+static int test_alloc_multi(int thr, odp_pool_t pool)
{
int i, j;
odp_buffer_t temp_buf[MAX_ALLOCS];
@@ -256,7 +256,7 @@ static int test_alloc_multi(int thr, odp_buffer_pool_t pool)
*
* @return 0 if successful
*/
-static int test_poll_queue(int thr, odp_buffer_pool_t msg_pool)
+static int test_poll_queue(int thr, odp_pool_t msg_pool)
{
odp_event_t ev;
odp_buffer_t buf;
@@ -332,7 +332,7 @@ static int test_poll_queue(int thr, odp_buffer_pool_t msg_pool)
* @return 0 if successful
*/
static int test_schedule_single(const char *str, int thr,
- odp_buffer_pool_t msg_pool,
+ odp_pool_t msg_pool,
int prio, odp_barrier_t *barrier)
{
odp_event_t ev;
@@ -408,7 +408,7 @@ static int test_schedule_single(const char *str, int thr,
* @return 0 if successful
*/
static int test_schedule_many(const char *str, int thr,
- odp_buffer_pool_t msg_pool,
+ odp_pool_t msg_pool,
int prio, odp_barrier_t *barrier)
{
odp_event_t ev;
@@ -483,7 +483,7 @@ static int test_schedule_many(const char *str, int thr,
* @return 0 if successful
*/
static int test_schedule_multi(const char *str, int thr,
- odp_buffer_pool_t msg_pool,
+ odp_pool_t msg_pool,
int prio, odp_barrier_t *barrier)
{
odp_event_t ev[MULTI_BUFS_MAX];
@@ -599,7 +599,7 @@ static int test_schedule_multi(const char *str, int thr,
static void *run_thread(void *arg)
{
int thr;
- odp_buffer_pool_t msg_pool;
+ odp_pool_t msg_pool;
odp_shm_t shm;
test_globals_t *globals;
odp_barrier_t *barrier;
@@ -629,9 +629,9 @@ static void *run_thread(void *arg)
/*
* Find the buffer pool
*/
- msg_pool = odp_buffer_pool_lookup("msg_pool");
+ msg_pool = odp_pool_lookup("msg_pool");
- if (msg_pool == ODP_BUFFER_POOL_INVALID) {
+ if (msg_pool == ODP_POOL_INVALID) {
LOG_ERR(" [%i] msg_pool not found\n", thr);
return NULL;
}
@@ -822,7 +822,7 @@ int main(int argc, char *argv[])
test_args_t args;
int num_workers;
odp_cpumask_t cpumask;
- odp_buffer_pool_t pool;
+ odp_pool_t pool;
odp_queue_t queue;
int i, j;
int prios;
@@ -909,14 +909,14 @@ int main(int argc, char *argv[])
params.buf.num = MSG_POOL_SIZE/sizeof(test_message_t);
params.type = ODP_POOL_BUFFER;
- pool = odp_buffer_pool_create("msg_pool", ODP_SHM_NULL, &params);
+ pool = odp_pool_create("msg_pool", ODP_SHM_NULL, &params);
- if (pool == ODP_BUFFER_POOL_INVALID) {
+ if (pool == ODP_POOL_INVALID) {
LOG_ERR("Pool create failed.\n");
return -1;
}
- /* odp_buffer_pool_print(pool); */
+ /* odp_pool_print(pool); */
/*
* Create a queue for direct poll test
diff --git a/test/validation/buffer/odp_buffer_pool_test.c b/test/validation/buffer/odp_buffer_pool_test.c
index 063a667..6ef2238 100644
--- a/test/validation/buffer/odp_buffer_pool_test.c
+++ b/test/validation/buffer/odp_buffer_pool_test.c
@@ -10,9 +10,9 @@ static int pool_name_number = 1;
static const int default_buffer_size = 1500;
static const int default_buffer_num = 1000;
-odp_buffer_pool_t pool_create(int buf_num, int buf_size, int buf_type)
+odp_pool_t pool_create(int buf_num, int buf_size, int buf_type)
{
- odp_buffer_pool_t pool;
+ odp_pool_t pool;
char pool_name[ODP_POOL_NAME_LEN];
odp_pool_param_t params = {
.buf = {
@@ -26,18 +26,18 @@ odp_buffer_pool_t pool_create(int buf_num, int buf_size, int buf_type)
snprintf(pool_name, sizeof(pool_name),
"test_buffer_pool-%d", pool_name_number++);
- pool = odp_buffer_pool_create(pool_name, ODP_SHM_INVALID, &params);
- CU_ASSERT_FATAL(pool != ODP_BUFFER_POOL_INVALID);
+ pool = odp_pool_create(pool_name, ODP_SHM_INVALID, &params);
+ CU_ASSERT_FATAL(pool != ODP_POOL_INVALID);
return pool;
}
static void pool_create_destroy_type(int type)
{
- odp_buffer_pool_t pool;
+ odp_pool_t pool;
pool = pool_create(default_buffer_num, default_buffer_size, type);
- CU_ASSERT(odp_buffer_pool_destroy(pool) == 0);
+ CU_ASSERT(odp_pool_destroy(pool) == 0);
}
static void pool_create_destroy_raw(void)
@@ -57,7 +57,7 @@ static void pool_create_destroy_timeout(void)
static void pool_create_destroy_raw_shm(void)
{
- odp_buffer_pool_t pool;
+ odp_pool_t pool;
odp_shm_t test_shm;
odp_pool_param_t params = {
.buf = {
@@ -74,18 +74,18 @@ static void pool_create_destroy_raw_shm(void)
0);
CU_ASSERT_FATAL(test_shm != ODP_SHM_INVALID);
- pool = odp_buffer_pool_create("test_shm_pool", test_shm, &params);
- CU_ASSERT_FATAL(pool != ODP_BUFFER_POOL_INVALID);
+ pool = odp_pool_create("test_shm_pool", test_shm, &params);
+ CU_ASSERT_FATAL(pool != ODP_POOL_INVALID);
- CU_ASSERT(odp_buffer_pool_destroy(pool) == 0);
+ CU_ASSERT(odp_pool_destroy(pool) == 0);
CU_ASSERT(odp_shm_free(test_shm) == 0);
}
static void pool_lookup_info_print(void)
{
- odp_buffer_pool_t pool;
+ odp_pool_t pool;
const char pool_name[] = "pool_for_lookup_test";
- odp_buffer_pool_info_t info;
+ odp_pool_info_t info;
odp_pool_param_t params = {
.buf = {
.size = default_buffer_size,
@@ -95,13 +95,13 @@ static void pool_lookup_info_print(void)
.type = ODP_POOL_BUFFER,
};
- pool = odp_buffer_pool_create(pool_name, ODP_SHM_INVALID, &params);
- CU_ASSERT_FATAL(pool != ODP_BUFFER_POOL_INVALID);
+ pool = odp_pool_create(pool_name, ODP_SHM_INVALID, &params);
+ CU_ASSERT_FATAL(pool != ODP_POOL_INVALID);
- pool = odp_buffer_pool_lookup(pool_name);
- CU_ASSERT_FATAL(pool != ODP_BUFFER_POOL_INVALID);
+ pool = odp_pool_lookup(pool_name);
+ CU_ASSERT_FATAL(pool != ODP_POOL_INVALID);
- CU_ASSERT_FATAL(odp_buffer_pool_info(pool, &info) == 0);
+ CU_ASSERT_FATAL(odp_pool_info(pool, &info) == 0);
CU_ASSERT(strncmp(pool_name, info.name, sizeof(pool_name)) == 0);
CU_ASSERT(info.shm == ODP_SHM_INVALID);
CU_ASSERT(params.buf.size <= info.params.buf.size);
@@ -109,14 +109,14 @@ static void pool_lookup_info_print(void)
CU_ASSERT(params.buf.num <= info.params.buf.num);
CU_ASSERT(params.type == info.params.type);
- odp_buffer_pool_print(pool);
+ odp_pool_print(pool);
- CU_ASSERT(odp_buffer_pool_destroy(pool) == 0);
+ CU_ASSERT(odp_pool_destroy(pool) == 0);
}
static void pool_alloc_type(int type)
{
- odp_buffer_pool_t pool;
+ odp_pool_t pool;
const int num = 3;
const size_t size = 1500;
odp_buffer_t buffer[num];
@@ -126,7 +126,7 @@ static void pool_alloc_type(int type)
char wrong_type = 0, wrong_size = 0;
pool = pool_create(num, size, type);
- odp_buffer_pool_print(pool);
+ odp_pool_print(pool);
/* Try to allocate num items from the pool */
for (index = 0; index < num; index++) {
@@ -189,7 +189,7 @@ static void pool_alloc_type(int type)
break;
}
- CU_ASSERT(odp_buffer_pool_destroy(pool) == 0);
+ CU_ASSERT(odp_pool_destroy(pool) == 0);
}
static void pool_alloc_buffer_raw(void)
@@ -209,7 +209,7 @@ static void pool_alloc_buffer_timeout(void)
static void pool_free_buffer(void)
{
- odp_buffer_pool_t pool;
+ odp_pool_t pool;
odp_buffer_t buffer;
pool = pool_create(1, 64, ODP_POOL_BUFFER);
@@ -227,7 +227,7 @@ static void pool_free_buffer(void)
CU_ASSERT_FATAL(buffer != ODP_BUFFER_INVALID);
odp_buffer_free(buffer);
- CU_ASSERT(odp_buffer_pool_destroy(pool) == 0);
+ CU_ASSERT(odp_pool_destroy(pool) == 0);
}
CU_TestInfo buffer_pool_tests[] = {
diff --git a/test/validation/buffer/odp_buffer_test.c b/test/validation/buffer/odp_buffer_test.c
index b004a94..4c12681 100644
--- a/test/validation/buffer/odp_buffer_test.c
+++ b/test/validation/buffer/odp_buffer_test.c
@@ -6,7 +6,7 @@
#include "odp_buffer_tests.h"
-static odp_buffer_pool_t raw_pool;
+static odp_pool_t raw_pool;
static odp_buffer_t raw_buffer = ODP_BUFFER_INVALID;
static const size_t raw_buffer_size = 1500;
@@ -21,8 +21,8 @@ int buffer_testsuite_init(void)
.type = ODP_POOL_BUFFER,
};
- raw_pool = odp_buffer_pool_create("raw_pool", ODP_SHM_INVALID, &params);
- if (raw_pool == ODP_BUFFER_POOL_INVALID)
+ raw_pool = odp_pool_create("raw_pool", ODP_SHM_INVALID, &params);
+ if (raw_pool == ODP_POOL_INVALID)
return -1;
raw_buffer = odp_buffer_alloc(raw_pool);
if (raw_buffer == ODP_BUFFER_INVALID)
@@ -33,7 +33,7 @@ int buffer_testsuite_init(void)
int buffer_testsuite_finalize(void)
{
odp_buffer_free(raw_buffer);
- if (odp_buffer_pool_destroy(raw_pool) != 0)
+ if (odp_pool_destroy(raw_pool) != 0)
return -1;
return 0;
}
@@ -43,7 +43,7 @@ static void buffer_management_basic(void)
odp_event_t ev = odp_buffer_to_event(raw_buffer);
CU_ASSERT(odp_buffer_is_valid(raw_buffer) == 1);
- CU_ASSERT(odp_buffer_pool(raw_buffer) != ODP_BUFFER_POOL_INVALID);
+ CU_ASSERT(odp_buffer_pool(raw_buffer) != ODP_POOL_INVALID);
CU_ASSERT(odp_event_type(ev) == ODP_EVENT_BUFFER);
CU_ASSERT(odp_buffer_size(raw_buffer) >= raw_buffer_size);
CU_ASSERT(odp_buffer_addr(raw_buffer) != NULL);
diff --git a/test/validation/buffer/odp_buffer_tests.h b/test/validation/buffer/odp_buffer_tests.h
index ead7cf7..fbdcbf7 100644
--- a/test/validation/buffer/odp_buffer_tests.h
+++ b/test/validation/buffer/odp_buffer_tests.h
@@ -23,6 +23,6 @@ extern int buffer_testsuite_finalize(void);
extern int packet_testsuite_init(void);
extern int packet_testsuite_finalize(void);
-odp_buffer_pool_t pool_create(int buf_num, int buf_size, int buf_type);
+odp_pool_t pool_create(int buf_num, int buf_size, int buf_type);
#endif /* ODP_BUFFER_TESTS_H_ */
diff --git a/test/validation/buffer/odp_packet_test.c b/test/validation/buffer/odp_packet_test.c
index 19e05c3..c1b28ab 100644
--- a/test/validation/buffer/odp_packet_test.c
+++ b/test/validation/buffer/odp_packet_test.c
@@ -11,7 +11,7 @@
/* Reserve some tailroom for tests */
#define PACKET_TAILROOM_RESERVE 4
-static odp_buffer_pool_t packet_pool;
+static odp_pool_t packet_pool;
static const uint32_t packet_len = PACKET_BUF_LEN -
ODP_CONFIG_PACKET_HEADROOM -
ODP_CONFIG_PACKET_TAILROOM -
@@ -30,9 +30,8 @@ int packet_testsuite_init(void)
.type = ODP_POOL_PACKET,
};
- packet_pool = odp_buffer_pool_create("packet_pool", ODP_SHM_INVALID,
- &params);
- if (packet_pool == ODP_BUFFER_POOL_INVALID)
+ packet_pool = odp_pool_create("packet_pool", ODP_SHM_INVALID, &params);
+ if (packet_pool == ODP_POOL_INVALID)
return -1;
test_packet = odp_packet_alloc(packet_pool, packet_len);
@@ -45,14 +44,14 @@ int packet_testsuite_init(void)
int packet_testsuite_finalize(void)
{
odp_packet_free(test_packet);
- if (odp_buffer_pool_destroy(packet_pool) != 0)
+ if (odp_pool_destroy(packet_pool) != 0)
return -1;
return 0;
}
static void packet_alloc_free(void)
{
- odp_buffer_pool_t pool;
+ odp_pool_t pool;
odp_packet_t packet;
pool = pool_create(1, PACKET_BUF_LEN, ODP_POOL_PACKET);
@@ -71,7 +70,7 @@ static void packet_alloc_free(void)
CU_ASSERT(odp_packet_len(packet) == packet_len);
odp_packet_free(packet);
- CU_ASSERT(odp_buffer_pool_destroy(pool) == 0);
+ CU_ASSERT(odp_pool_destroy(pool) == 0);
}
static void packet_alloc_segmented(void)
@@ -108,7 +107,7 @@ static void packet_basic_metadata(void)
CU_ASSERT(odp_packet_head(pkt) != NULL);
CU_ASSERT(odp_packet_data(pkt) != NULL);
- CU_ASSERT(odp_packet_pool(pkt) != ODP_BUFFER_POOL_INVALID);
+ CU_ASSERT(odp_packet_pool(pkt) != ODP_POOL_INVALID);
/* Packet was allocated by application so shouldn't have valid pktio. */
CU_ASSERT(odp_packet_input(pkt) == ODP_PKTIO_INVALID);
}
@@ -553,11 +552,11 @@ static void packet_copy(void)
{
odp_packet_t pkt = test_packet;
odp_packet_t pkt_copy;
- odp_buffer_pool_t pool;
+ odp_pool_t pool;
/** @todo: fill original packet with some data */
pool = odp_packet_pool(pkt);
- CU_ASSERT_FATAL(pool != ODP_BUFFER_POOL_INVALID);
+ CU_ASSERT_FATAL(pool != ODP_POOL_INVALID);
pkt_copy = odp_packet_copy(pkt, odp_packet_pool(pkt));
CU_ASSERT_FATAL(pkt_copy != ODP_PACKET_INVALID);
diff --git a/test/validation/classification/odp_classification_tests.c b/test/validation/classification/odp_classification_tests.c
index 833c52b..403939b 100644
--- a/test/validation/classification/odp_classification_tests.c
+++ b/test/validation/classification/odp_classification_tests.c
@@ -58,7 +58,7 @@ static odp_pmr_t pmr_list[CLS_ENTRIES];
static odp_queue_t queue_list[CLS_ENTRIES];
static odp_pmr_set_t pmr_set;
-static odp_buffer_pool_t pool_default;
+static odp_pool_t pool_default;
static odp_pktio_t pktio_loop;
/** sequence number of IP packets */
@@ -240,7 +240,7 @@ odp_packet_t create_packet(bool vlan)
int classification_tests_init(void)
{
- odp_buffer_pool_t pool;
+ odp_pool_t pool;
odp_pool_param_t param;
odp_queue_t inq_def;
odp_queue_param_t qparam;
@@ -252,15 +252,15 @@ int classification_tests_init(void)
param.buf.align = 0;
param.type = ODP_POOL_PACKET;
- pool = odp_buffer_pool_create("classification_pool",
+ pool = odp_pool_create("classification_pool",
ODP_SHM_NULL, &param);
- if (ODP_BUFFER_POOL_INVALID == pool) {
+ if (ODP_POOL_INVALID == pool) {
fprintf(stderr, "Packet pool creation failed.\n");
return -1;
}
- pool_default = odp_buffer_pool_lookup("classification_pool");
- if (pool_default == ODP_BUFFER_POOL_INVALID)
+ pool_default = odp_pool_lookup("classification_pool");
+ if (pool_default == ODP_POOL_INVALID)
goto error_pool_default;
pktio_loop = odp_pktio_open("loop", pool_default);
@@ -287,7 +287,7 @@ int classification_tests_init(void)
return 0;
error_pktio_loop:
- odp_buffer_pool_destroy(pool_default);
+ odp_pool_destroy(pool_default);
error_pool_default:
return -1;
@@ -299,7 +299,7 @@ int classification_tests_finalize(void)
if (0 > odp_pktio_close(pktio_loop))
return -1;
- if (0 != odp_buffer_pool_destroy(pool_default))
+ if (0 != odp_pool_destroy(pool_default))
return -1;
for (i = 0; i < CLS_ENTRIES; i++)
diff --git a/test/validation/crypto/odp_crypto_test_async_inp.c b/test/validation/crypto/odp_crypto_test_async_inp.c
index 5cc1131..424c589 100644
--- a/test/validation/crypto/odp_crypto_test_async_inp.c
+++ b/test/validation/crypto/odp_crypto_test_async_inp.c
@@ -39,8 +39,8 @@ static void alg_test(enum odp_crypto_op op,
odp_queue_t compl_queue = odp_queue_lookup("crypto-out");
CU_ASSERT(compl_queue != ODP_QUEUE_INVALID);
- odp_buffer_pool_t pool = odp_buffer_pool_lookup("packet_pool");
- CU_ASSERT(pool != ODP_BUFFER_POOL_INVALID);
+ odp_pool_t pool = odp_pool_lookup("packet_pool");
+ CU_ASSERT(pool != ODP_POOL_INVALID);
/* Create a crypto session */
odp_crypto_session_params_t ses_params;
@@ -318,8 +318,8 @@ static void enc_alg_3des_cbc_compl_new(void)
unsigned int test_vec_num = (sizeof(tdes_cbc_reference_length)/
sizeof(tdes_cbc_reference_length[0]));
- odp_buffer_pool_t pool = odp_buffer_pool_lookup("compl_pool");
- CU_ASSERT(pool != ODP_BUFFER_POOL_INVALID);
+ odp_pool_t pool = odp_pool_lookup("compl_pool");
+ CU_ASSERT(pool != ODP_POOL_INVALID);
unsigned int i;
odp_buffer_t compl_new;
diff --git a/test/validation/crypto/odp_crypto_test_sync_inp.c b/test/validation/crypto/odp_crypto_test_sync_inp.c
index 08f501b..2300c8d 100644
--- a/test/validation/crypto/odp_crypto_test_sync_inp.c
+++ b/test/validation/crypto/odp_crypto_test_sync_inp.c
@@ -27,8 +27,8 @@ static void alg_test(enum odp_crypto_op op,
odp_queue_t compl_queue = odp_queue_lookup("crypto-out");
CU_ASSERT(compl_queue != ODP_QUEUE_INVALID);
- odp_buffer_pool_t pool = odp_buffer_pool_lookup("packet_pool");
- CU_ASSERT(pool != ODP_BUFFER_POOL_INVALID);
+ odp_pool_t pool = odp_pool_lookup("packet_pool");
+ CU_ASSERT(pool != ODP_POOL_INVALID);
/* Create a crypto session */
odp_crypto_session_params_t ses_params;
diff --git a/test/validation/odp_crypto.c b/test/validation/odp_crypto.c
index c195df6..d8db114 100644
--- a/test/validation/odp_crypto.c
+++ b/test/validation/odp_crypto.c
@@ -26,7 +26,7 @@ CU_SuiteInfo odp_testsuites[] = {
int tests_global_init(void)
{
odp_pool_param_t params;
- odp_buffer_pool_t pool;
+ odp_pool_t pool;
odp_queue_t out_queue;
params.buf.size = SHM_PKT_POOL_BUF_SIZE;
@@ -34,9 +34,9 @@ int tests_global_init(void)
params.buf.num = SHM_PKT_POOL_SIZE/SHM_PKT_POOL_BUF_SIZE;
params.type = ODP_POOL_PACKET;
- pool = odp_buffer_pool_create("packet_pool", ODP_SHM_NULL, &params);
+ pool = odp_pool_create("packet_pool", ODP_SHM_NULL, &params);
- if (ODP_BUFFER_POOL_INVALID == pool) {
+ if (ODP_POOL_INVALID == pool) {
fprintf(stderr, "Packet pool creation failed.\n");
return -1;
}
@@ -52,9 +52,9 @@ int tests_global_init(void)
params.buf.num = SHM_COMPL_POOL_SIZE/SHM_COMPL_POOL_BUF_SIZE;
params.type = ODP_POOL_BUFFER;
- pool = odp_buffer_pool_create("compl_pool", ODP_SHM_NULL, &params);
+ pool = odp_pool_create("compl_pool", ODP_SHM_NULL, &params);
- if (ODP_BUFFER_POOL_INVALID == pool) {
+ if (ODP_POOL_INVALID == pool) {
fprintf(stderr, "Completion pool creation failed.\n");
return -1;
}
diff --git a/test/validation/odp_pktio.c b/test/validation/odp_pktio.c
index bc357f5..0985771 100644
--- a/test/validation/odp_pktio.c
+++ b/test/validation/odp_pktio.c
@@ -39,7 +39,7 @@ typedef struct {
} pkt_test_data_t;
/** default packet pool */
-odp_buffer_pool_t default_pkt_pool = ODP_BUFFER_POOL_INVALID;
+odp_pool_t default_pkt_pool = ODP_POOL_INVALID;
/** sequence number of IP packets */
odp_atomic_u32_t ip_seq;
@@ -182,7 +182,7 @@ static int default_pool_create(void)
{
odp_pool_param_t params;
- if (default_pkt_pool != ODP_BUFFER_POOL_INVALID)
+ if (default_pkt_pool != ODP_POOL_INVALID)
return -1;
params.buf.size = PKT_BUF_SIZE;
@@ -190,9 +190,9 @@ static int default_pool_create(void)
params.buf.num = PKT_BUF_NUM;
params.type = ODP_POOL_PACKET;
- default_pkt_pool = odp_buffer_pool_create("pkt_pool_default",
+ default_pkt_pool = odp_pool_create("pkt_pool_default",
ODP_SHM_NULL, &params);
- if (default_pkt_pool == ODP_BUFFER_POOL_INVALID)
+ if (default_pkt_pool == ODP_POOL_INVALID)
return -1;
return 0;
@@ -200,7 +200,7 @@ static int default_pool_create(void)
static odp_pktio_t create_pktio(const char *iface)
{
- odp_buffer_pool_t pool;
+ odp_pool_t pool;
odp_pktio_t pktio;
char pool_name[ODP_POOL_NAME_LEN];
odp_pool_param_t params;
@@ -211,10 +211,10 @@ static odp_pktio_t create_pktio(const char *iface)
params.type = ODP_POOL_PACKET;
snprintf(pool_name, sizeof(pool_name), "pkt_pool_%s", iface);
- pool = odp_buffer_pool_lookup(pool_name);
- if (pool == ODP_BUFFER_POOL_INVALID)
- pool = odp_buffer_pool_create(pool_name, ODP_SHM_NULL, &params);
- CU_ASSERT(pool != ODP_BUFFER_POOL_INVALID);
+ pool = odp_pool_lookup(pool_name);
+ if (pool == ODP_POOL_INVALID)
+ pool = odp_pool_create(pool_name, ODP_SHM_NULL, &params);
+ CU_ASSERT(pool != ODP_POOL_INVALID);
pktio = odp_pktio_open(iface, pool);
if (pktio == ODP_PKTIO_INVALID)
@@ -577,7 +577,7 @@ static int init_pktio_suite(void)
static int term_pktio_suite(void)
{
- if (odp_buffer_pool_destroy(default_pkt_pool) != 0) {
+ if (odp_pool_destroy(default_pkt_pool) != 0) {
fprintf(stderr, "error: failed to destroy default pool\n");
return -1;
}
diff --git a/test/validation/odp_queue.c b/test/validation/odp_queue.c
index 2863bef..198b4e2 100644
--- a/test/validation/odp_queue.c
+++ b/test/validation/odp_queue.c
@@ -15,7 +15,7 @@ static int queue_contest = 0xff;
static int init_queue_suite(void)
{
- odp_buffer_pool_t pool;
+ odp_pool_t pool;
odp_pool_param_t params;
params.buf.size = 0;
@@ -23,9 +23,9 @@ static int init_queue_suite(void)
params.buf.num = 1024 * 10;
params.type = ODP_POOL_BUFFER;
- pool = odp_buffer_pool_create("msg_pool", ODP_SHM_NULL, &params);
+ pool = odp_pool_create("msg_pool", ODP_SHM_NULL, &params);
- if (ODP_BUFFER_POOL_INVALID == pool) {
+ if (ODP_POOL_INVALID == pool) {
printf("Pool create failed.\n");
return -1;
}
@@ -39,7 +39,7 @@ static void test_odp_queue_sunnyday(void)
odp_event_t deev[MAX_BUFFER_QUEUE];
odp_buffer_t buf;
odp_event_t ev;
- odp_buffer_pool_t msg_pool;
+ odp_pool_t msg_pool;
odp_queue_param_t param;
odp_event_t *pev_tmp;
int i, deq_ret, ret;
@@ -67,7 +67,7 @@ static void test_odp_queue_sunnyday(void)
prtn = odp_queue_get_context(queue_id);
CU_ASSERT(&queue_contest == (int *)prtn);
- msg_pool = odp_buffer_pool_lookup("msg_pool");
+ msg_pool = odp_pool_lookup("msg_pool");
buf = odp_buffer_alloc(msg_pool);
ev = odp_buffer_to_event(buf);
diff --git a/test/validation/odp_schedule.c b/test/validation/odp_schedule.c
index 0bc3b16..ba7ba4b 100644
--- a/test/validation/odp_schedule.c
+++ b/test/validation/odp_schedule.c
@@ -55,7 +55,7 @@ typedef struct ODP_PACKED {
int enable_excl_atomic;
} thread_args_t;
-odp_buffer_pool_t pool;
+odp_pool_t pool;
static void test_schedule_wait_time(void)
{
@@ -171,7 +171,7 @@ static void fill_queues(thread_args_t *args)
{
odp_schedule_sync_t sync;
int num_queues, num_prio;
- odp_buffer_pool_t pool;
+ odp_pool_t pool;
int i, j, k;
char name[32];
@@ -179,8 +179,8 @@ static void fill_queues(thread_args_t *args)
num_queues = args->num_queues;
num_prio = args->num_prio;
- pool = odp_buffer_pool_lookup(MSG_POOL_NAME);
- CU_ASSERT_FATAL(pool != ODP_BUFFER_POOL_INVALID);
+ pool = odp_pool_lookup(MSG_POOL_NAME);
+ CU_ASSERT_FATAL(pool != ODP_POOL_INVALID);
for (i = 0; i < num_prio; i++) {
for (j = 0; j < num_queues; j++) {
@@ -479,8 +479,8 @@ static void test_schedule_pause_resume(void)
queue = odp_queue_lookup("sched_0_0_n");
CU_ASSERT(queue != ODP_QUEUE_INVALID);
- pool = odp_buffer_pool_lookup(MSG_POOL_NAME);
- CU_ASSERT_FATAL(pool != ODP_BUFFER_POOL_INVALID);
+ pool = odp_pool_lookup(MSG_POOL_NAME);
+ CU_ASSERT_FATAL(pool != ODP_POOL_INVALID);
for (i = 0; i < NUM_BUFS_PAUSE; i++) {
@@ -573,7 +573,7 @@ static int create_queues(void)
static int schd_suite_init(void)
{
odp_shm_t shm;
- odp_buffer_pool_t pool;
+ odp_pool_t pool;
test_globals_t *globals;
thread_args_t *thr_args;
odp_pool_param_t params;
@@ -583,9 +583,9 @@ static int schd_suite_init(void)
params.buf.num = MSG_POOL_SIZE/BUF_SIZE;
params.type = ODP_POOL_BUFFER;
- pool = odp_buffer_pool_create(MSG_POOL_NAME, ODP_SHM_NULL, &params);
+ pool = odp_pool_create(MSG_POOL_NAME, ODP_SHM_NULL, &params);
- if (pool == ODP_BUFFER_POOL_INVALID) {
+ if (pool == ODP_POOL_INVALID) {
printf("Pool creation failed (msg).\n");
return -1;
}
diff --git a/test/validation/odp_timer.c b/test/validation/odp_timer.c
index 25c85c2..3783531 100644
--- a/test/validation/odp_timer.c
+++ b/test/validation/odp_timer.c
@@ -23,7 +23,7 @@
static odp_barrier_t test_barrier;
/** @private Timeout buffer pool handle used by all threads */
-static odp_buffer_pool_t tbp;
+static odp_pool_t tbp;
/** @private Timer pool handle used by all threads */
static odp_timer_pool_t tp;
@@ -267,8 +267,8 @@ static void test_odp_timer_all(void)
params.buf.align = ODP_CACHE_LINE_SIZE;
params.buf.num = (NTIMERS + 1) * num_workers;
params.type = ODP_POOL_TIMEOUT;
- tbp = odp_buffer_pool_create("tmo_pool", ODP_SHM_INVALID, &params);
- if (tbp == ODP_BUFFER_POOL_INVALID)
+ tbp = odp_pool_create("tmo_pool", ODP_SHM_INVALID, &params);
+ if (tbp == ODP_POOL_INVALID)
CU_FAIL_FATAL("Timeout buffer pool create failed");
#define NAME "timer_pool"