Clean up code for exporting packet pools. Signed-off-by: Maxim Uvarov <maxim.uva...@linaro.org> --- platform/linux-generic/odp_pool.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/platform/linux-generic/odp_pool.c b/platform/linux-generic/odp_pool.c index 4be3827..cae2759 100644 --- a/platform/linux-generic/odp_pool.c +++ b/platform/linux-generic/odp_pool.c @@ -497,14 +497,17 @@ static int check_params(odp_pool_param_t *params) odp_pool_t odp_pool_create(const char *name, odp_pool_param_t *params) { + uint32_t shm_flags = 0; + + if (check_params(params)) + return ODP_POOL_INVALID; + #ifdef _ODP_PKTIO_IPC if (params && (params->type == ODP_POOL_PACKET)) - return pool_create(name, params, ODP_SHM_PROC); + shm_flags = ODP_SHM_PROC; #endif - if (check_params(params)) - return ODP_POOL_INVALID; - return pool_create(name, params, 0); + return pool_create(name, params, shm_flags); } int odp_pool_destroy(odp_pool_t pool_hdl) -- 2.7.1.250.gff4ea60