On 12/13/16 15:27, Mike Holmes wrote: > > > On 9 December 2016 at 14:50, Maxim Uvarov <maxim.uva...@linaro.org > <mailto:maxim.uva...@linaro.org>> wrote: > > Clean up code for exporting packet pools. > > > Clean up is not very descriptive of the change, can the message be more > precise ? >
It's more code restructure for more nice view :) Will update that in v2. Maxim. > > > > Signed-off-by: Maxim Uvarov <maxim.uva...@linaro.org > <mailto: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 > > > > > -- > Mike Holmes > Program Manager - Linaro Networking Group > Linaro.org <http://www.linaro.org/>* **│ *Open source software for ARM SoCs > "Work should be fun and collaborative, the rest follows" > > __ > >