diff options
author | Bill Fischofer <bill.fischofer@linaro.org> | 2015-07-09 16:46:24 +0300 |
---|---|---|
committer | Maxim Uvarov <maxim.uvarov@linaro.org> | 2015-07-21 18:02:36 +0300 |
commit | 5be42d9a8508a4e45786c59bd6bd0e058059540f (patch) | |
tree | ce3c7d2a39a6887cb2355dced95e650896b3dc14 /include | |
parent | 207142018cfd228f95bb5b124f9562ed3fa82312 (diff) |
api: pool: remove shm paramter from odp_pool_create()
This patch removes the 2nd parameter to odp_pool_create() because it has two
major issues:
1. Applications have no way to know how big a shm area is required for a given
pool since that information is implementation specific. So there's no portable
means of using this parameter.
2. Some implementations (e.g., odp-dpdk) cannot accept an external memory area
for pool creation since they need to control the memory themselves.
Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Conflicts:
test/validation/pktio/pktio.c
test/validation/pool/pool.c
helper/test/odp_chksum.c
Diffstat (limited to 'include')
-rw-r--r-- | include/odp/api/pool.h | 35 |
1 files changed, 10 insertions, 25 deletions
diff --git a/include/odp/api/pool.h b/include/odp/api/pool.h index e5061ab4..c679781a 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() @@ -130,14 +124,10 @@ odp_pool_t odp_pool_create(const char *name, * @retval 0 Success * @retval -1 Failure * - * @note This routine destroys a previously created pool. This call - * does not destroy any shared memory object passed to - * odp_pool_create() used to store the pool contents. The caller - * takes responsibility for that. If no shared memory object was passed as - * part of the create call, then this routine will destroy any internal shared - * memory objects associated with the pool. Results are undefined if - * an attempt is made to destroy a pool that contains allocated or - * otherwise active buffers. + * @note This routine destroys a previously created pool, and will destroy any + * internal shared memory objects associated with the pool. Results are + * undefined if an attempt is made to destroy a pool that contains allocated + * or otherwise active buffers. */ int odp_pool_destroy(odp_pool_t pool); @@ -160,11 +150,6 @@ odp_pool_t odp_pool_lookup(const char *name); */ typedef struct odp_pool_info_t { const char *name; /**< pool name */ - odp_shm_t shm; /**< handle of shared memory area - supplied by application to - contain pool, or - ODP_SHM_INVALID if this pool is - managed by ODP */ odp_pool_param_t params; /**< pool parameters */ } odp_pool_info_t; |