diff mbox

[API-NEXT,PATCHv3,5/6] example: use odp_pool_param_init routine

Message ID 1436051526-15926-5-git-send-email-bill.fischofer@linaro.org
State Accepted
Commit 5b77891c9046492336db62f21c348e5166f1fac5
Headers show

Commit Message

Bill Fischofer July 4, 2015, 11:12 p.m. UTC
Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org>
---
 example/classifier/odp_classifier.c | 2 +-
 example/generator/odp_generator.c   | 2 +-
 example/ipsec/odp_ipsec.c           | 4 ++--
 example/packet/odp_pktio.c          | 2 +-
 example/timer/odp_timer_test.c      | 1 +
 5 files changed, 6 insertions(+), 5 deletions(-)
diff mbox

Patch

diff --git a/example/classifier/odp_classifier.c b/example/classifier/odp_classifier.c
index 643e16c..d813197 100644
--- a/example/classifier/odp_classifier.c
+++ b/example/classifier/odp_classifier.c
@@ -429,7 +429,7 @@  int main(int argc, char *argv[])
 	printf("cpu mask:           %s\n", cpumaskstr);
 
 	/* Create packet pool */
-	memset(&params, 0, sizeof(params));
+	odp_pool_param_init(&params);
 	params.pkt.seg_len = SHM_PKT_POOL_BUF_SIZE;
 	params.pkt.len     = SHM_PKT_POOL_BUF_SIZE;
 	params.pkt.num     = SHM_PKT_POOL_SIZE/SHM_PKT_POOL_BUF_SIZE;
diff --git a/example/generator/odp_generator.c b/example/generator/odp_generator.c
index 0ff264c..ff8aca9 100644
--- a/example/generator/odp_generator.c
+++ b/example/generator/odp_generator.c
@@ -648,7 +648,7 @@  int main(int argc, char *argv[])
 	printf("cpu mask:           %s\n", cpumaskstr);
 
 	/* Create packet pool */
-	memset(&params, 0, sizeof(params));
+	odp_pool_param_init(&params);
 	params.pkt.seg_len = SHM_PKT_POOL_BUF_SIZE;
 	params.pkt.len     = SHM_PKT_POOL_BUF_SIZE;
 	params.pkt.num     = SHM_PKT_POOL_SIZE/SHM_PKT_POOL_BUF_SIZE;
diff --git a/example/ipsec/odp_ipsec.c b/example/ipsec/odp_ipsec.c
index 4928985..506e4f2 100644
--- a/example/ipsec/odp_ipsec.c
+++ b/example/ipsec/odp_ipsec.c
@@ -348,7 +348,7 @@  void ipsec_init_pre(void)
 	}
 
 	/* Create output buffer pool */
-	memset(&params, 0, sizeof(params));
+	odp_pool_param_init(&params);
 	params.pkt.seg_len = SHM_OUT_POOL_BUF_SIZE;
 	params.pkt.len     = SHM_OUT_POOL_BUF_SIZE;
 	params.pkt.num     = SHM_PKT_POOL_BUF_COUNT;
@@ -1288,7 +1288,7 @@  main(int argc, char *argv[])
 	odp_barrier_init(&sync_barrier, num_workers);
 
 	/* Create packet buffer pool */
-	memset(&params, 0, sizeof(params));
+	odp_pool_param_init(&params);
 	params.pkt.seg_len = SHM_PKT_POOL_BUF_SIZE;
 	params.pkt.len     = SHM_PKT_POOL_BUF_SIZE;
 	params.pkt.num     = SHM_PKT_POOL_BUF_COUNT;
diff --git a/example/packet/odp_pktio.c b/example/packet/odp_pktio.c
index f08d9f4..888d4c6 100644
--- a/example/packet/odp_pktio.c
+++ b/example/packet/odp_pktio.c
@@ -362,7 +362,7 @@  int main(int argc, char *argv[])
 	printf("cpu mask:           %s\n", cpumaskstr);
 
 	/* Create packet pool */
-	memset(&params, 0, sizeof(params));
+	odp_pool_param_init(&params);
 	params.pkt.seg_len = SHM_PKT_POOL_BUF_SIZE;
 	params.pkt.len     = SHM_PKT_POOL_BUF_SIZE;
 	params.pkt.num     = SHM_PKT_POOL_SIZE/SHM_PKT_POOL_BUF_SIZE;
diff --git a/example/timer/odp_timer_test.c b/example/timer/odp_timer_test.c
index f4af0e2..40df498 100644
--- a/example/timer/odp_timer_test.c
+++ b/example/timer/odp_timer_test.c
@@ -415,6 +415,7 @@  int main(int argc, char *argv[])
 	/*
 	 * Create pool for timeouts
 	 */
+	odp_pool_param_init(&params);
 	params.tmo.num   = NUM_TMOS;
 	params.type      = ODP_POOL_TIMEOUT;