aboutsummaryrefslogtreecommitdiff
path: root/example
diff options
context:
space:
mode:
authorPetri Savolainen <petri.savolainen@linaro.org>2014-09-05 14:29:11 +0300
committerMaxim Uvarov <maxim.uvarov@linaro.org>2014-09-16 02:10:24 +0400
commita9c78c67e9554d15bfe52763cdf60f655fe2fc54 (patch)
treea47ba39a9fb63ba911fb8ffb7145d7036986ceb5 /example
parent0c2eba19fe43bec0ab19c8d0abf43eca892e0220 (diff)
Shared memory flag default value
Flags default value is zero (share memory within ODP, include HW accelerators). Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Diffstat (limited to 'example')
-rw-r--r--example/generator/odp_generator.c5
-rw-r--r--example/ipsec/odp_ipsec.c12
-rw-r--r--example/ipsec/odp_ipsec_cache.c3
-rw-r--r--example/ipsec/odp_ipsec_fwd_db.c3
-rw-r--r--example/ipsec/odp_ipsec_loop_db.c3
-rw-r--r--example/ipsec/odp_ipsec_sa_db.c3
-rw-r--r--example/ipsec/odp_ipsec_sp_db.c3
-rw-r--r--example/ipsec/odp_ipsec_stream.c3
-rw-r--r--example/l2fwd/odp_l2fwd.c5
-rw-r--r--example/odp_example/odp_example.c2
-rw-r--r--example/packet/odp_pktio.c5
-rw-r--r--example/timer/odp_timer_test.c2
12 files changed, 31 insertions, 18 deletions
diff --git a/example/generator/odp_generator.c b/example/generator/odp_generator.c
index 65c203492..10c7b317c 100644
--- a/example/generator/odp_generator.c
+++ b/example/generator/odp_generator.c
@@ -537,7 +537,8 @@ int main(int argc, char *argv[])
odp_atomic_init_u64(&counters.icmp);
/* Reserve memory for args from shared mem */
- args = odp_shm_reserve("shm_args", sizeof(args_t), ODP_CACHE_LINE_SIZE);
+ args = odp_shm_reserve("shm_args", sizeof(args_t),
+ ODP_CACHE_LINE_SIZE, 0);
if (args == NULL) {
ODP_ERR("Error: shared mem alloc failed.\n");
exit(EXIT_FAILURE);
@@ -582,7 +583,7 @@ int main(int argc, char *argv[])
/* Create packet pool */
pool_base = odp_shm_reserve("shm_packet_pool",
- SHM_PKT_POOL_SIZE, ODP_CACHE_LINE_SIZE);
+ SHM_PKT_POOL_SIZE, ODP_CACHE_LINE_SIZE, 0);
if (pool_base == NULL) {
ODP_ERR("Error: packet pool mem alloc failed.\n");
exit(EXIT_FAILURE);
diff --git a/example/ipsec/odp_ipsec.c b/example/ipsec/odp_ipsec.c
index 1f42fe68d..5b7abf696 100644
--- a/example/ipsec/odp_ipsec.c
+++ b/example/ipsec/odp_ipsec.c
@@ -401,7 +401,8 @@ void ipsec_init_pre(void)
/* Create output buffer pool */
pool_base = odp_shm_reserve("shm_out_pool",
- SHM_OUT_POOL_SIZE, ODP_CACHE_LINE_SIZE);
+ SHM_OUT_POOL_SIZE, ODP_CACHE_LINE_SIZE,
+ 0);
out_pool = odp_buffer_pool_create("out_pool", pool_base,
SHM_OUT_POOL_SIZE,
@@ -1190,7 +1191,8 @@ main(int argc, char *argv[])
odp_init_local(thr_id);
/* Reserve memory for args from shared mem */
- args = odp_shm_reserve("shm_args", sizeof(args_t), ODP_CACHE_LINE_SIZE);
+ args = odp_shm_reserve("shm_args", sizeof(args_t), ODP_CACHE_LINE_SIZE,
+ 0);
if (NULL == args) {
ODP_ERR("Error: shared mem alloc failed.\n");
exit(EXIT_FAILURE);
@@ -1232,7 +1234,8 @@ main(int argc, char *argv[])
/* Create packet buffer pool */
pool_base = odp_shm_reserve("shm_packet_pool",
- SHM_PKT_POOL_SIZE, ODP_CACHE_LINE_SIZE);
+ SHM_PKT_POOL_SIZE, ODP_CACHE_LINE_SIZE,
+ 0);
if (NULL == pool_base) {
ODP_ERR("Error: packet pool mem alloc failed.\n");
exit(EXIT_FAILURE);
@@ -1250,7 +1253,8 @@ main(int argc, char *argv[])
/* Create context buffer pool */
pool_base = odp_shm_reserve("shm_ctx_pool",
- SHM_CTX_POOL_SIZE, ODP_CACHE_LINE_SIZE);
+ SHM_CTX_POOL_SIZE, ODP_CACHE_LINE_SIZE,
+ 0);
if (NULL == pool_base) {
ODP_ERR("Error: context pool mem alloc failed.\n");
exit(EXIT_FAILURE);
diff --git a/example/ipsec/odp_ipsec_cache.c b/example/ipsec/odp_ipsec_cache.c
index fe0618c07..1b9921891 100644
--- a/example/ipsec/odp_ipsec_cache.c
+++ b/example/ipsec/odp_ipsec_cache.c
@@ -21,7 +21,8 @@ void init_ipsec_cache(void)
{
ipsec_cache = odp_shm_reserve("shm_ipsec_cache",
sizeof(ipsec_cache_t),
- ODP_CACHE_LINE_SIZE);
+ ODP_CACHE_LINE_SIZE,
+ 0);
if (ipsec_cache == NULL) {
ODP_ERR("Error: shared mem alloc failed.\n");
exit(EXIT_FAILURE);
diff --git a/example/ipsec/odp_ipsec_fwd_db.c b/example/ipsec/odp_ipsec_fwd_db.c
index beb2d9ec9..de2e43e44 100644
--- a/example/ipsec/odp_ipsec_fwd_db.c
+++ b/example/ipsec/odp_ipsec_fwd_db.c
@@ -20,7 +20,8 @@ void init_fwd_db(void)
{
fwd_db = odp_shm_reserve("shm_fwd_db",
sizeof(fwd_db_t),
- ODP_CACHE_LINE_SIZE);
+ ODP_CACHE_LINE_SIZE,
+ 0);
if (fwd_db == NULL) {
ODP_ERR("Error: shared mem alloc failed.\n");
exit(EXIT_FAILURE);
diff --git a/example/ipsec/odp_ipsec_loop_db.c b/example/ipsec/odp_ipsec_loop_db.c
index 889b24f84..222ccb9cf 100644
--- a/example/ipsec/odp_ipsec_loop_db.c
+++ b/example/ipsec/odp_ipsec_loop_db.c
@@ -21,7 +21,8 @@ void init_loopback_db(void)
loopback_db = odp_shm_reserve("loopback_db",
sizeof(loopback_db_t),
- ODP_CACHE_LINE_SIZE);
+ ODP_CACHE_LINE_SIZE,
+ 0);
if (loopback_db == NULL) {
ODP_ERR("Error: shared mem alloc failed.\n");
exit(EXIT_FAILURE);
diff --git a/example/ipsec/odp_ipsec_sa_db.c b/example/ipsec/odp_ipsec_sa_db.c
index c2e9e198c..612da8604 100644
--- a/example/ipsec/odp_ipsec_sa_db.c
+++ b/example/ipsec/odp_ipsec_sa_db.c
@@ -20,7 +20,8 @@ void init_sa_db(void)
{
sa_db = odp_shm_reserve("shm_sa_db",
sizeof(sa_db_t),
- ODP_CACHE_LINE_SIZE);
+ ODP_CACHE_LINE_SIZE,
+ 0);
if (sa_db == NULL) {
ODP_ERR("Error: shared mem alloc failed.\n");
exit(EXIT_FAILURE);
diff --git a/example/ipsec/odp_ipsec_sp_db.c b/example/ipsec/odp_ipsec_sp_db.c
index d498be510..7d9bba15f 100644
--- a/example/ipsec/odp_ipsec_sp_db.c
+++ b/example/ipsec/odp_ipsec_sp_db.c
@@ -20,7 +20,8 @@ void init_sp_db(void)
{
sp_db = odp_shm_reserve("shm_sp_db",
sizeof(sp_db_t),
- ODP_CACHE_LINE_SIZE);
+ ODP_CACHE_LINE_SIZE,
+ 0);
if (sp_db == NULL) {
ODP_ERR("Error: shared mem alloc failed.\n");
exit(EXIT_FAILURE);
diff --git a/example/ipsec/odp_ipsec_stream.c b/example/ipsec/odp_ipsec_stream.c
index e1fb27ea0..ced055aa6 100644
--- a/example/ipsec/odp_ipsec_stream.c
+++ b/example/ipsec/odp_ipsec_stream.c
@@ -50,7 +50,8 @@ void init_stream_db(void)
{
stream_db = odp_shm_reserve("stream_db",
sizeof(stream_db_t),
- ODP_CACHE_LINE_SIZE);
+ ODP_CACHE_LINE_SIZE,
+ 0);
if (stream_db == NULL) {
ODP_ERR("Error: shared mem alloc failed.\n");
exit(EXIT_FAILURE);
diff --git a/example/l2fwd/odp_l2fwd.c b/example/l2fwd/odp_l2fwd.c
index 6a38c1b6f..e19aa94b3 100644
--- a/example/l2fwd/odp_l2fwd.c
+++ b/example/l2fwd/odp_l2fwd.c
@@ -329,7 +329,8 @@ int main(int argc, char *argv[])
}
/* Reserve memory for args from shared mem */
- gbl_args = odp_shm_reserve("shm_args", sizeof(args_t), ODP_CACHE_LINE_SIZE);
+ gbl_args = odp_shm_reserve("shm_args", sizeof(args_t),
+ ODP_CACHE_LINE_SIZE, 0);
if (gbl_args == NULL) {
ODP_ERR("Error: shared mem alloc failed.\n");
exit(EXIT_FAILURE);
@@ -380,7 +381,7 @@ int main(int argc, char *argv[])
/* Create packet pool */
pool_base = odp_shm_reserve("shm_packet_pool",
- SHM_PKT_POOL_SIZE, ODP_CACHE_LINE_SIZE);
+ SHM_PKT_POOL_SIZE, ODP_CACHE_LINE_SIZE, 0);
if (pool_base == NULL) {
ODP_ERR("Error: packet pool mem alloc failed.\n");
exit(EXIT_FAILURE);
diff --git a/example/odp_example/odp_example.c b/example/odp_example/odp_example.c
index 40d237bb7..e99df854f 100644
--- a/example/odp_example/odp_example.c
+++ b/example/odp_example/odp_example.c
@@ -1004,7 +1004,7 @@ int main(int argc, char *argv[])
* Create message pool
*/
pool_base = odp_shm_reserve("msg_pool",
- MSG_POOL_SIZE, ODP_CACHE_LINE_SIZE);
+ MSG_POOL_SIZE, ODP_CACHE_LINE_SIZE, 0);
pool = odp_buffer_pool_create("msg_pool", pool_base, MSG_POOL_SIZE,
sizeof(test_message_t),
diff --git a/example/packet/odp_pktio.c b/example/packet/odp_pktio.c
index 88ce575fc..7f2d43f08 100644
--- a/example/packet/odp_pktio.c
+++ b/example/packet/odp_pktio.c
@@ -317,7 +317,8 @@ int main(int argc, char *argv[])
}
/* Reserve memory for args from shared mem */
- args = odp_shm_reserve("shm_args", sizeof(args_t), ODP_CACHE_LINE_SIZE);
+ args = odp_shm_reserve("shm_args", sizeof(args_t),
+ ODP_CACHE_LINE_SIZE, 0);
if (args == NULL) {
ODP_ERR("Error: shared mem alloc failed.\n");
exit(EXIT_FAILURE);
@@ -358,7 +359,7 @@ int main(int argc, char *argv[])
/* Create packet pool */
pool_base = odp_shm_reserve("shm_packet_pool",
- SHM_PKT_POOL_SIZE, ODP_CACHE_LINE_SIZE);
+ SHM_PKT_POOL_SIZE, ODP_CACHE_LINE_SIZE, 0);
if (pool_base == NULL) {
ODP_ERR("Error: packet pool mem alloc failed.\n");
exit(EXIT_FAILURE);
diff --git a/example/timer/odp_timer_test.c b/example/timer/odp_timer_test.c
index 106119030..fd46f1606 100644
--- a/example/timer/odp_timer_test.c
+++ b/example/timer/odp_timer_test.c
@@ -311,7 +311,7 @@ int main(int argc, char *argv[])
* Create message pool
*/
pool_base = odp_shm_reserve("msg_pool",
- MSG_POOL_SIZE, ODP_CACHE_LINE_SIZE);
+ MSG_POOL_SIZE, ODP_CACHE_LINE_SIZE, 0);
pool = odp_buffer_pool_create("msg_pool", pool_base, MSG_POOL_SIZE,
0,