On Sun, May 31, 2015 at 03:38:55PM -0500, Bill Fischofer wrote:
> Implement card https://cards.linaro.org/browse/LNG-925
> 
> Signed-off-by: Bill Fischofer <[email protected]>
> ---
>  example/classifier/odp_classifier.c                |  2 +-
>  example/generator/odp_generator.c                  |  4 +-
>  example/ipsec/odp_ipsec.c                          |  8 ++--
>  example/packet/odp_pktio.c                         |  2 +-
>  example/timer/odp_timer_test.c                     |  2 +-
>  include/odp/api/pool.h                             | 23 +++------
>  platform/linux-generic/odp_pool.c                  | 54 
> +++++-----------------
>  platform/linux-generic/odp_schedule.c              |  2 +-
>  test/performance/odp_l2fwd.c                       |  2 +-
>  test/performance/odp_pktio_perf.c                  |  5 +-
>  test/performance/odp_scheduling.c                  |  2 +-
>  .../classification/odp_classification_tests.c      |  3 +-
>  test/validation/odp_buffer.c                       |  6 +--
>  test/validation/odp_crypto.c                       |  2 +-
>  test/validation/odp_packet.c                       |  4 +-
>  test/validation/odp_pktio.c                        |  5 +-
>  test/validation/odp_pool.c                         | 32 +------------
>  test/validation/odp_queue.c                        |  2 +-
>  test/validation/odp_scheduler.c                    |  4 +-
>  test/validation/odp_timer.c                        |  8 ++--
>  20 files changed, 49 insertions(+), 123 deletions(-)
> 
> diff --git a/example/classifier/odp_classifier.c 
> b/example/classifier/odp_classifier.c
> index 48fc1ab..22f9413 100644
> --- a/example/classifier/odp_classifier.c
> +++ b/example/classifier/odp_classifier.c
> @@ -433,7 +433,7 @@ int main(int argc, char *argv[])
>       params.pkt.num     = SHM_PKT_POOL_SIZE/SHM_PKT_POOL_BUF_SIZE;
>       params.type        = ODP_POOL_PACKET;
>  
> -     pool = odp_pool_create("packet_pool", ODP_SHM_NULL, &params);
> +     pool = odp_pool_create("packet_pool", &params);
>  
>       if (pool == ODP_POOL_INVALID) {
>               EXAMPLE_ERR("Error: packet pool create failed.\n");
> diff --git a/example/generator/odp_generator.c 
> b/example/generator/odp_generator.c
> index 8ae5b29..ed8fd50 100644
> --- a/example/generator/odp_generator.c
> +++ b/example/generator/odp_generator.c
> @@ -654,7 +654,7 @@ int main(int argc, char *argv[])
>       params.pkt.num     = SHM_PKT_POOL_SIZE/SHM_PKT_POOL_BUF_SIZE;
>       params.type        = ODP_POOL_PACKET;
>  
> -     pool = odp_pool_create("packet_pool", ODP_SHM_NULL, &params);
> +     pool = odp_pool_create("packet_pool", &params);
>  
>       if (pool == ODP_POOL_INVALID) {
>               EXAMPLE_ERR("Error: packet pool create failed.\n");
> @@ -681,7 +681,7 @@ int main(int argc, char *argv[])
>       params.tmo.num     = tparams.num_timers; /* One timeout per timer */
>       params.type        = ODP_POOL_TIMEOUT;
>  
> -     tmop = odp_pool_create("timeout_pool", ODP_SHM_NULL, &params);
> +     tmop = odp_pool_create("timeout_pool", &params);
>  
>       if (pool == ODP_POOL_INVALID) {
>               EXAMPLE_ERR("Error: packet pool create failed.\n");
> diff --git a/example/ipsec/odp_ipsec.c b/example/ipsec/odp_ipsec.c
> index cb8f535..58a9800 100644
> --- a/example/ipsec/odp_ipsec.c
> +++ b/example/ipsec/odp_ipsec.c
> @@ -347,7 +347,7 @@ void ipsec_init_pre(void)
>       params.pkt.num     = SHM_PKT_POOL_BUF_COUNT;
>       params.type        = ODP_POOL_PACKET;
>  
> -     out_pool = odp_pool_create("out_pool", ODP_SHM_NULL, &params);
> +     out_pool = odp_pool_create("out_pool", &params);
>  
>       if (ODP_POOL_INVALID == out_pool) {
>               EXAMPLE_ERR("Error: message pool create failed.\n");
> @@ -1215,8 +1215,7 @@ main(int argc, char *argv[])
>       params.pkt.num     = SHM_PKT_POOL_BUF_COUNT;
>       params.type        = ODP_POOL_PACKET;
>  
> -     pkt_pool = odp_pool_create("packet_pool", ODP_SHM_NULL,
> -                                       &params);
> +     pkt_pool = odp_pool_create("packet_pool", &params);
>  
>       if (ODP_POOL_INVALID == pkt_pool) {
>               EXAMPLE_ERR("Error: packet pool create failed.\n");
> @@ -1229,8 +1228,7 @@ main(int argc, char *argv[])
>       params.buf.num   = SHM_CTX_POOL_BUF_COUNT;
>       params.type      = ODP_POOL_BUFFER;
>  
> -     ctx_pool = odp_pool_create("ctx_pool", ODP_SHM_NULL,
> -                                       &params);
> +     ctx_pool = odp_pool_create("ctx_pool", &params);
>  
>       if (ODP_POOL_INVALID == ctx_pool) {
>               EXAMPLE_ERR("Error: context pool create failed.\n");
> diff --git a/example/packet/odp_pktio.c b/example/packet/odp_pktio.c
> index f08d9f4..937146e 100644
> --- a/example/packet/odp_pktio.c
> +++ b/example/packet/odp_pktio.c
> @@ -368,7 +368,7 @@ int main(int argc, char *argv[])
>       params.pkt.num     = SHM_PKT_POOL_SIZE/SHM_PKT_POOL_BUF_SIZE;
>       params.type        = ODP_POOL_PACKET;
>  
> -     pool = odp_pool_create("packet_pool", ODP_SHM_NULL, &params);
> +     pool = odp_pool_create("packet_pool", &params);
>  
>       if (pool == ODP_POOL_INVALID) {
>               EXAMPLE_ERR("Error: packet pool create failed.\n");
> diff --git a/example/timer/odp_timer_test.c b/example/timer/odp_timer_test.c
> index 5e4306e..196cdf8 100644
> --- a/example/timer/odp_timer_test.c
> +++ b/example/timer/odp_timer_test.c
> @@ -418,7 +418,7 @@ int main(int argc, char *argv[])
>       params.tmo.num   = NUM_TMOS;
>       params.type      = ODP_POOL_TIMEOUT;
>  
> -     gbls->pool = odp_pool_create("msg_pool", ODP_SHM_NULL, &params);
> +     gbls->pool = odp_pool_create("msg_pool", &params);
>  
>       if (gbls->pool == ODP_POOL_INVALID) {
>               EXAMPLE_ERR("Pool create failed.\n");
> diff --git a/include/odp/api/pool.h b/include/odp/api/pool.h
> index e5061ab..a76563a 100644
> --- a/include/odp/api/pool.h
> +++ b/include/odp/api/pool.h
> @@ -99,28 +99,22 @@ typedef struct odp_pool_param_t {
>  
>  /**
>   * Create a pool
> - * This routine is used to create a pool. It take three
> - * arguments: the optional name of the pool to be created, an optional shared
> - * memory handle, and a parameter struct that describes the pool to be
> - * created. If a name is not specified the result is an anonymous pool that
> - * cannot be referenced by odp_pool_lookup().
> + *
> + * This routine is used to create a pool. It take two arguments: the optional
> + * name of the pool to be created and a parameter struct that describes the
> + * pool to be created. If a name is not specified the result is an anonymous
> + * pool that cannot be referenced by odp_pool_lookup().
>   *
>   * @param name     Name of the pool, max ODP_POOL_NAME_LEN-1 chars.
>   *                 May be specified as NULL for anonymous pools.
>   *
> - * @param shm      The shared memory object in which to create the pool.
> - *                 Use ODP_SHM_NULL to reserve default memory type
> - *                 for the pool type.
> - *
>   * @param params   Pool parameters.
>   *
>   * @return Handle of the created pool
>   * @retval ODP_POOL_INVALID  Pool could not be created
>   */
>  
> -odp_pool_t odp_pool_create(const char *name,
> -                        odp_shm_t shm,
> -                        odp_pool_param_t *params);
> +odp_pool_t odp_pool_create(const char *name, odp_pool_param_t *params);
>  
>  /**
>   * Destroy a pool previously created by odp_pool_create()

Not shown in this diff, but there's a @note against odp_pool_destroy()
that refers to the shared memory handle and therefore needs an update.

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

Reply via email to