aboutsummaryrefslogtreecommitdiff
path: root/platform/linux-generic/include/api
diff options
context:
space:
mode:
authorPetri Savolainen <petri.savolainen@linaro.org>2015-01-26 15:05:48 +0200
committerMaxim Uvarov <maxim.uvarov@linaro.org>2015-01-27 15:34:30 +0300
commit939a02337eb0ad5bbd4a06d6090a95b2263f81ce (patch)
treef2072a8e104825083577aeec23496d230dc287c6 /platform/linux-generic/include/api
parent8d0f8982236b400b11b2e712e3bbd289694e6f2b (diff)
api: pool: Rename odp_buffer_pool_ to odp_pool_
Replaced odp_buffer_pool_ prefix in the pool API with odp_pool_. Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org> Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Diffstat (limited to 'platform/linux-generic/include/api')
-rw-r--r--platform/linux-generic/include/api/odp_buffer.h2
-rw-r--r--platform/linux-generic/include/api/odp_crypto.h2
-rw-r--r--platform/linux-generic/include/api/odp_packet.h10
-rw-r--r--platform/linux-generic/include/api/odp_packet_io.h2
-rw-r--r--platform/linux-generic/include/api/odp_platform_types.h4
-rw-r--r--platform/linux-generic/include/api/odp_pool.h71
6 files changed, 45 insertions, 46 deletions
diff --git a/platform/linux-generic/include/api/odp_buffer.h b/platform/linux-generic/include/api/odp_buffer.h
index 2f18aa972..8e144b8d9 100644
--- a/platform/linux-generic/include/api/odp_buffer.h
+++ b/platform/linux-generic/include/api/odp_buffer.h
@@ -86,7 +86,7 @@ int odp_buffer_is_valid(odp_buffer_t buf);
*
* @return Handle of buffer pool buffer belongs to
*/
-odp_buffer_pool_t odp_buffer_pool(odp_buffer_t buf);
+odp_pool_t odp_buffer_pool(odp_buffer_t buf);
/**
* Print buffer metadata to STDOUT
diff --git a/platform/linux-generic/include/api/odp_crypto.h b/platform/linux-generic/include/api/odp_crypto.h
index 4183442fe..da6041c94 100644
--- a/platform/linux-generic/include/api/odp_crypto.h
+++ b/platform/linux-generic/include/api/odp_crypto.h
@@ -109,7 +109,7 @@ typedef struct odp_crypto_session_params {
enum odp_auth_alg auth_alg; /**< Authentication algorithm */
odp_crypto_key_t auth_key; /**< Authentication key */
odp_queue_t compl_queue; /**< Async mode completion event queue */
- odp_buffer_pool_t output_pool; /**< Output buffer pool */
+ odp_pool_t output_pool; /**< Output buffer pool */
} odp_crypto_session_params_t;
/**
diff --git a/platform/linux-generic/include/api/odp_packet.h b/platform/linux-generic/include/api/odp_packet.h
index e71aa0918..eca5b73f7 100644
--- a/platform/linux-generic/include/api/odp_packet.h
+++ b/platform/linux-generic/include/api/odp_packet.h
@@ -51,7 +51,7 @@ extern "C" {
* Allocate a packet from a buffer pool
*
* Allocates a packet of the requested length from the specified buffer pool.
- * Pool must have been created with buffer type ODP_BUFFER_TYPE_PACKET. The
+ * Pool must have been created with ODP_POOL_PACKET type. The
* packet is initialized with data pointers and lengths set according to the
* specified len, and the default headroom and tailroom length settings. All
* other packet metadata are set to their default values.
@@ -66,7 +66,7 @@ extern "C" {
* the ODP_CONFIG_PACKET_HEADROOM and ODP_CONFIG_PACKET_TAILROOM defines in
* odp_config.h.
*/
-odp_packet_t odp_packet_alloc(odp_buffer_pool_t pool, uint32_t len);
+odp_packet_t odp_packet_alloc(odp_pool_t pool, uint32_t len);
/**
* Free packet
@@ -383,7 +383,7 @@ void *odp_packet_offset(odp_packet_t pkt, uint32_t offset, uint32_t *len,
*
* @return Buffer pool handle
*/
-odp_buffer_pool_t odp_packet_pool(odp_packet_t pkt);
+odp_pool_t odp_packet_pool(odp_packet_t pkt);
/**
* Packet input interface
@@ -774,14 +774,14 @@ odp_packet_t odp_packet_rem_data(odp_packet_t pkt, uint32_t offset,
*
* Create a new copy of the packet. The new packet is exact copy of the source
* packet (incl. data and metadata). The pool must have been created with
- * buffer type ODP_BUFFER_TYPE_PACKET.
+ * ODP_POOL_PACKET type.
*
* @param pkt Packet handle
* @param pool Buffer pool for allocation of the new packet.
*
* @return Handle to the copy of the packet, or ODP_PACKET_INVALID
*/
-odp_packet_t odp_packet_copy(odp_packet_t pkt, odp_buffer_pool_t pool);
+odp_packet_t odp_packet_copy(odp_packet_t pkt, odp_pool_t pool);
/**
* Copy data from packet
diff --git a/platform/linux-generic/include/api/odp_packet_io.h b/platform/linux-generic/include/api/odp_packet_io.h
index 7dfcc4ffd..6e479aad4 100644
--- a/platform/linux-generic/include/api/odp_packet_io.h
+++ b/platform/linux-generic/include/api/odp_packet_io.h
@@ -46,7 +46,7 @@ extern "C" {
* device used for testing. Usually it's loop back
* interface.
*/
-odp_pktio_t odp_pktio_open(const char *dev, odp_buffer_pool_t pool);
+odp_pktio_t odp_pktio_open(const char *dev, odp_pool_t pool);
/**
* Close an ODP packet IO instance
diff --git a/platform/linux-generic/include/api/odp_platform_types.h b/platform/linux-generic/include/api/odp_platform_types.h
index 1d32e23a0..962ed4c5c 100644
--- a/platform/linux-generic/include/api/odp_platform_types.h
+++ b/platform/linux-generic/include/api/odp_platform_types.h
@@ -24,10 +24,10 @@
*/
/** ODP Buffer pool */
-typedef uint32_t odp_buffer_pool_t;
+typedef uint32_t odp_pool_t;
/** Invalid buffer pool */
-#define ODP_BUFFER_POOL_INVALID (0xffffffff)
+#define ODP_POOL_INVALID (0xffffffff)
/** ODP buffer */
typedef uint32_t odp_buffer_t;
diff --git a/platform/linux-generic/include/api/odp_pool.h b/platform/linux-generic/include/api/odp_pool.h
index eba7b833d..8a39fb3ee 100644
--- a/platform/linux-generic/include/api/odp_pool.h
+++ b/platform/linux-generic/include/api/odp_pool.h
@@ -76,100 +76,99 @@ typedef struct odp_pool_param_t {
#define ODP_POOL_TIMEOUT ODP_EVENT_TIMEOUT
/**
- * Create a buffer pool
- * This routine is used to create a buffer pool. It take three
+ * 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_buffer_pool_lookup().
+ * cannot be referenced by odp_pool_lookup().
*
- * @param name Name of the pool, max ODP_BUFFER_POOL_NAME_LEN-1 chars.
+ * @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 buffer type.
+ * for the pool type.
*
- * @param params Buffer pool parameters.
+ * @param params Pool parameters.
*
- * @return Handle of the created buffer pool
- * @retval ODP_BUFFER_POOL_INVALID Buffer pool could not be created
+ * @return Handle of the created pool
+ * @retval ODP_POOL_INVALID Pool could not be created
*/
-odp_buffer_pool_t odp_buffer_pool_create(const char *name,
- odp_shm_t shm,
- odp_pool_param_t *params);
+odp_pool_t odp_pool_create(const char *name,
+ odp_shm_t shm,
+ odp_pool_param_t *params);
/**
- * Destroy a buffer pool previously created by odp_buffer_pool_create()
+ * Destroy a pool previously created by odp_pool_create()
*
- * @param pool Handle of the buffer pool to be destroyed
+ * @param pool Handle of the pool to be destroyed
*
* @retval 0 Success
* @retval -1 Failure
*
- * @note This routine destroys a previously created buffer pool. This call
+ * @note This routine destroys a previously created pool. This call
* does not destroy any shared memory object passed to
- * odp_buffer_pool_create() used to store the buffer pool contents. The caller
+ * 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 buffer pool. Results are undefined if
- * an attempt is made to destroy a buffer pool that contains allocated or
+ * 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_buffer_pool_destroy(odp_buffer_pool_t pool);
+int odp_pool_destroy(odp_pool_t pool);
/**
- * Find a buffer pool by name
+ * Find a pool by name
*
* @param name Name of the pool
*
- * @return Handle of found buffer pool
- * @retval ODP_BUFFER_POOL_INVALID Buffer pool could not be found
+ * @return Handle of found pool
+ * @retval ODP_POOL_INVALID Pool could not be found
*
* @note This routine cannot be used to look up an anonymous pool (one created
* with no name).
*/
-odp_buffer_pool_t odp_buffer_pool_lookup(const char *name);
+odp_pool_t odp_pool_lookup(const char *name);
/**
- * Buffer pool information struct
- * Used to get information about a buffer pool.
+ * Pool information struct
+ * Used to get information about a pool.
*/
-typedef struct odp_buffer_pool_info_t {
+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 buffer pool, or
+ contain pool, or
ODP_SHM_INVALID if this pool is
managed by ODP */
odp_pool_param_t params; /**< pool parameters */
-} odp_buffer_pool_info_t;
+} odp_pool_info_t;
/**
- * Retrieve information about a buffer pool
+ * Retrieve information about a pool
*
- * @param pool Buffer pool handle
+ * @param pool Pool handle
*
- * @param[out] info Receives an odp_buffer_pool_info_t object
+ * @param[out] info Receives an odp_pool_info_t object
* that describes the pool.
*
* @retval 0 Success
* @retval -1 Failure. Info could not be retrieved.
*/
-int odp_buffer_pool_info(odp_buffer_pool_t pool,
- odp_buffer_pool_info_t *info);
+int odp_pool_info(odp_pool_t pool, odp_pool_info_t *info);
/**
- * Print buffer pool info
+ * Print pool info
*
* @param pool Pool handle
*
* @note This routine writes implementation-defined information about the
- * specified buffer pool to the ODP log. The intended use is for debugging.
+ * specified pool to the ODP log. The intended use is for debugging.
*/
-void odp_buffer_pool_print(odp_buffer_pool_t pool);
+void odp_pool_print(odp_pool_t pool);
/**
* Buffer alloc
@@ -180,7 +179,7 @@ void odp_buffer_pool_print(odp_buffer_pool_t pool);
* @return Handle of allocated buffer
* @retval ODP_BUFFER_INVALID Buffer could not be allocated
*/
-odp_buffer_t odp_buffer_alloc(odp_buffer_pool_t pool);
+odp_buffer_t odp_buffer_alloc(odp_pool_t pool);
/**
* Buffer free