Latest shm API updates. Not tested.

Signed-off-by: Petri Savolainen <[email protected]>
---
 platform/linux-keystone2/odp_crypto.c    |  4 +++-
 platform/linux-keystone2/odp_packet_io.c | 10 +++++++---
 platform/linux-keystone2/odp_queue.c     |  9 ++++++---
 3 files changed, 16 insertions(+), 7 deletions(-)

diff --git a/platform/linux-keystone2/odp_crypto.c 
b/platform/linux-keystone2/odp_crypto.c
index 8691fd6..7525bab 100644
--- a/platform/linux-keystone2/odp_crypto.c
+++ b/platform/linux-keystone2/odp_crypto.c
@@ -402,13 +402,15 @@ int odp_crypto_operation(odp_crypto_op_params_t *params,
 int odp_crypto_init_global(void)
 {
        size_t mem_size;
+       odp_shm_t shm;
 
        /* Calculate the memory size we need */
        mem_size  = sizeof(*global);
        mem_size += (MAX_SESSIONS * sizeof(struct odp_crypto_session_s));
 
        /* Allocate our globally shared memory */
-       global = odp_shm_reserve("crypto_pool", mem_size, ODP_CACHE_LINE_SIZE);
+       shm = odp_shm_reserve("crypto_pool", mem_size, ODP_CACHE_LINE_SIZE, 0);
+       global = odp_shm_addr(shm);
 
        /* Clear it out */
        memset(global, 0, mem_size);
diff --git a/platform/linux-keystone2/odp_packet_io.c 
b/platform/linux-keystone2/odp_packet_io.c
index 9ba7d57..63a09ce 100644
--- a/platform/linux-keystone2/odp_packet_io.c
+++ b/platform/linux-keystone2/odp_packet_io.c
@@ -68,10 +68,14 @@ int odp_pktio_init_global(void)
 {
        pktio_entry_t *pktio_entry;
        int id;
+       odp_shm_t shm;
+
+       shm = odp_shm_reserve("odp_pktio_entries",
+                             sizeof(pktio_table_t),
+                             sizeof(pktio_entry_t), 0);
+
+       pktio_tbl = odp_shm_addr(shm);
 
-       pktio_tbl = odp_shm_reserve("odp_pktio_entries",
-                                   sizeof(pktio_table_t),
-                                   sizeof(pktio_entry_t));
        if (pktio_tbl == NULL)
                return -1;
 
diff --git a/platform/linux-keystone2/odp_queue.c 
b/platform/linux-keystone2/odp_queue.c
index b0dd4be..59e1e0b 100644
--- a/platform/linux-keystone2/odp_queue.c
+++ b/platform/linux-keystone2/odp_queue.c
@@ -109,12 +109,15 @@ static int queue_init(queue_entry_t *queue, const char 
*name,
 int odp_queue_init_global(void)
 {
        uint32_t i;
+       odp_shm_t shm;
 
        odp_pr_dbg("Queue init ... ");
 
-       queue_tbl = odp_shm_reserve("odp_queues",
-                                   sizeof(queue_table_t),
-                                   sizeof(queue_entry_t));
+       shm = odp_shm_reserve("odp_queues",
+                             sizeof(queue_table_t),
+                             sizeof(queue_entry_t), 0);
+
+       queue_tbl = odp_shm_addr(shm);
 
        if (queue_tbl == NULL)
                return -1;
-- 
2.1.0


_______________________________________________
lng-odp mailing list
[email protected]
http://lists.linaro.org/mailman/listinfo/lng-odp

Reply via email to