aboutsummaryrefslogtreecommitdiff
path: root/example
diff options
context:
space:
mode:
authorBill Fischofer <bill.fischofer@linaro.org>2015-07-04 18:12:05 -0500
committerMaxim Uvarov <maxim.uvarov@linaro.org>2015-07-07 18:39:11 +0300
commit5b77891c9046492336db62f21c348e5166f1fac5 (patch)
tree42227063de98b4f2ab2a53192848db6ef5ea2d04 /example
parent839354652a8497cec2b87b6ca74bac9b3e251ec7 (diff)
example: use odp_pool_param_init routine
Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Diffstat (limited to 'example')
-rw-r--r--example/classifier/odp_classifier.c2
-rw-r--r--example/generator/odp_generator.c2
-rw-r--r--example/ipsec/odp_ipsec.c4
-rw-r--r--example/packet/odp_pktio.c2
-rw-r--r--example/timer/odp_timer_test.c1
5 files changed, 6 insertions, 5 deletions
diff --git a/example/classifier/odp_classifier.c b/example/classifier/odp_classifier.c
index 99c61cb..bf7a8c6 100644
--- a/example/classifier/odp_classifier.c
+++ b/example/classifier/odp_classifier.c
@@ -435,7 +435,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 f92c565..3a8105e 100644
--- a/example/generator/odp_generator.c
+++ b/example/generator/odp_generator.c
@@ -650,7 +650,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 b12ae56..1763f5c 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;
@@ -1299,7 +1299,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 83ea046..d2e4d9c 100644
--- a/example/packet/odp_pktio.c
+++ b/example/packet/odp_pktio.c
@@ -388,7 +388,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 bcab360..4e090fd 100644
--- a/example/timer/odp_timer_test.c
+++ b/example/timer/odp_timer_test.c
@@ -388,6 +388,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;