@@ -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);
@@ -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);
@@ -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);
@@ -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);
@@ -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);
@@ -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);
@@ -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);
@@ -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);
@@ -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);
@@ -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),
@@ -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);
@@ -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,
@@ -117,7 +117,7 @@ int odp_buffer_pool_init_global(void)
pool_tbl = odp_shm_reserve("odp_buffer_pools",
sizeof(pool_table_t),
- sizeof(pool_entry_t));
+ sizeof(pool_entry_t), 0);
if (pool_tbl == NULL)
return -1;
@@ -409,7 +409,8 @@ odp_crypto_init_global(void)
mem_size += (MAX_SESSIONS * sizeof(odp_crypto_generic_session_t));
/* Allocate our globally shared memory */
- global = odp_shm_reserve("crypto_pool", mem_size, ODP_CACHE_LINE_SIZE);
+ global = odp_shm_reserve("crypto_pool", mem_size,
+ ODP_CACHE_LINE_SIZE, 0);
/* Clear it out */
memset(global, 0, mem_size);
@@ -55,7 +55,7 @@ int odp_pktio_init_global(void)
pktio_tbl = odp_shm_reserve("odp_pktio_entries",
sizeof(pktio_table_t),
- sizeof(pktio_entry_t));
+ sizeof(pktio_entry_t), 0);
if (pktio_tbl == NULL)
return -1;
@@ -99,7 +99,7 @@ int odp_queue_init_global(void)
queue_tbl = odp_shm_reserve("odp_queues",
sizeof(queue_table_t),
- sizeof(queue_entry_t));
+ sizeof(queue_entry_t), 0);
if (queue_tbl == NULL)
return -1;
@@ -171,7 +171,7 @@ odph_ring_create(const char *name, unsigned count, unsigned flags)
odp_rwlock_write_lock(&qlock);
/* reserve a memory zone for this ring.*/
- r = odp_shm_reserve(ring_name, ring_size, ODP_CACHE_LINE_SIZE);
+ r = odp_shm_reserve(ring_name, ring_size, ODP_CACHE_LINE_SIZE, 0);
if (r != NULL) {
/* init the ring structure */
@@ -89,16 +89,20 @@ int odp_schedule_init_global(void)
sched = odp_shm_reserve("odp_scheduler",
sizeof(sched_t),
- ODP_CACHE_LINE_SIZE);
+ ODP_CACHE_LINE_SIZE, 0);
if (sched == NULL) {
ODP_ERR("Schedule init: Shm reserve failed.\n");
return -1;
}
-
pool_base = odp_shm_reserve("odp_sched_pool",
- SCHED_POOL_SIZE, ODP_CACHE_LINE_SIZE);
+ SCHED_POOL_SIZE, ODP_CACHE_LINE_SIZE, 0);
+
+ if (pool_base == NULL) {
+ ODP_ERR("Schedule init: Shm reserve failed.\n");
+ return -1;
+ }
pool = odp_buffer_pool_create("odp_sched_pool", pool_base,
SCHED_POOL_SIZE, sizeof(queue_desc_t),
@@ -47,7 +47,7 @@ int main(int argc ODP_UNUSED, char *argv[] ODP_UNUSED)
odp_print_system_info();
test_shared_data = odp_shm_reserve("test_shared_data",
- sizeof(test_shared_data_t), 128);
+ sizeof(test_shared_data_t), 128, 0);
memset(test_shared_data, 0, sizeof(test_shared_data_t));
printf("test shared data at %p\n\n", test_shared_data);
@@ -328,7 +328,7 @@ int main(int argc ODP_UNUSED, char *argv[] ODP_UNUSED)
* 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,
BUF_SIZE,