diff mbox

[ODP,v1.0,Buffer/Packet,APIs,4/9] Modifications to test programs to work with v1.0 buffer/packet APIs

Message ID 1415678595-31405-6-git-send-email-bill.fischofer@linaro.org
State New
Headers show

Commit Message

Bill Fischofer Nov. 11, 2014, 4:03 a.m. UTC
Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org>
---
 test/api_test/odp_timer_ping.c | 19 +++++++++----------
 1 file changed, 9 insertions(+), 10 deletions(-)
diff mbox

Patch

diff --git a/test/api_test/odp_timer_ping.c b/test/api_test/odp_timer_ping.c
index 65e3834..90c1ae6 100644
--- a/test/api_test/odp_timer_ping.c
+++ b/test/api_test/odp_timer_ping.c
@@ -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", &params, NULL);
+
 	if (pool == ODP_BUFFER_POOL_INVALID) {
 		ODP_ERR("Pool create failed.\n");
 		return -1;