@@ -318,9 +318,8 @@ int main(int argc ODP_UNUSED, char *argv[] ODP_UNUSED)
ping_arg_t pingarg;
odp_queue_t queue;
odp_buffer_pool_t pool;
- void *pool_base;
int i;
- odp_shm_t shm;
+ odp_buffer_pool_param_t params;
if (odp_test_global_init() != 0)
return -1;
@@ -333,14 +332,14 @@ int main(int argc ODP_UNUSED, char *argv[] ODP_UNUSED)
/*
* Create message pool
*/
- shm = odp_shm_reserve("msg_pool",
- MSG_POOL_SIZE, ODP_CACHE_LINE_SIZE, 0);
- pool_base = odp_shm_addr(shm);
-
- pool = odp_buffer_pool_create("msg_pool", pool_base, MSG_POOL_SIZE,
- BUF_SIZE,
- ODP_CACHE_LINE_SIZE,
- ODP_BUFFER_TYPE_RAW);
+
+ params.buf_num = MSG_POOL_SIZE/BUF_SIZE;
+ params.buf_size = BUF_SIZE;
+ params.buf_type = ODP_BUFFER_TYPE_RAW;
+ params.buf_opts = ODP_BUFFER_OPTS_NONE;
+
+ pool = odp_buffer_pool_create("msg_pool", ¶ms, NULL);
+
if (pool == ODP_BUFFER_POOL_INVALID) {
ODP_ERR("Pool create failed.\n");
return -1;
Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org> --- test/api_test/odp_timer_ping.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-)