aboutsummaryrefslogtreecommitdiff
path: root/platform/linux-generic/odp_shared_memory.c
diff options
context:
space:
mode:
authorMatias Elo <matias.elo@nokia.com>2021-09-20 13:05:28 +0300
committerMatias Elo <matias.elo@nokia.com>2021-09-22 16:01:54 +0300
commitc6339d406ebb4fb525b47e1456c49e1773c65bad (patch)
treec066ca472c55e6159c3530c7b57d7e598733793c /platform/linux-generic/odp_shared_memory.c
parentf36c9ec6070071104cdc3d5b87568b28e9551040 (diff)
linux-gen: shm: allocate enough resources for internal allocations
Reserve enough SHM blocks for implementation internal usage and return correct value in odp_shm_capability(). Removed ODP_ prefix from CONFIG_SHM_BLOCKS config header option. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
Diffstat (limited to 'platform/linux-generic/odp_shared_memory.c')
-rw-r--r--platform/linux-generic/odp_shared_memory.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/platform/linux-generic/odp_shared_memory.c b/platform/linux-generic/odp_shared_memory.c
index ee47b7e96..966850a07 100644
--- a/platform/linux-generic/odp_shared_memory.c
+++ b/platform/linux-generic/odp_shared_memory.c
@@ -15,9 +15,6 @@
#include <odp_global_data.h>
#include <string.h>
-ODP_STATIC_ASSERT(ODP_CONFIG_SHM_BLOCKS >= ODP_CONFIG_POOLS,
- "ODP_CONFIG_SHM_BLOCKS < ODP_CONFIG_POOLS");
-
static inline uint32_t from_handle(odp_shm_t shm)
{
return _odp_typeval(shm) - 1;
@@ -47,7 +44,7 @@ int odp_shm_capability(odp_shm_capability_t *capa)
{
memset(capa, 0, sizeof(odp_shm_capability_t));
- capa->max_blocks = ODP_CONFIG_SHM_BLOCKS;
+ capa->max_blocks = CONFIG_SHM_BLOCKS;
capa->max_size = odp_global_ro.shm_max_size;
capa->max_align = 0;