47 #ifndef DOCA_BUF_POOL_H_
48 #define DOCA_BUF_POOL_H_
85 const struct doca_mmap *
mmap,
86 struct doca_buf_pool **buf_pool);
DOCA_STABLE doca_error_t doca_buf_pool_get_num_elements(const struct doca_buf_pool *buf_pool, uint32_t *num_of_elements)
Get the number of elements that was set in the creation of a DOCA buffer pool.
DOCA_STABLE doca_error_t doca_buf_pool_get_user_data(const struct doca_buf_pool *buf_pool, union doca_data *user_data)
Get the user_data of a DOCA buffer pool.
DOCA_STABLE doca_error_t doca_buf_pool_create(size_t num_elements, size_t element_size, const struct doca_mmap *mmap, struct doca_buf_pool **buf_pool)
Allocates a buffer pool and sets it with doca_buf objects.
DOCA_STABLE doca_error_t doca_buf_pool_buf_alloc(struct doca_buf_pool *buf_pool, struct doca_buf **buf)
This method acquires a doca_buf from a DOCA buffer pool, pointing to an allocated empty buffer.
DOCA_STABLE doca_error_t doca_buf_pool_get_element_alignment(const struct doca_buf_pool *buf_pool, size_t *element_alignment)
Get the element alignment of a DOCA buffer pool.
DOCA_STABLE doca_error_t doca_buf_pool_destroy(struct doca_buf_pool *buf_pool)
Destroy a buffer pool structure.
DOCA_STABLE doca_error_t doca_buf_pool_start(struct doca_buf_pool *buf_pool)
Start a DOCA buffer pool.
DOCA_STABLE doca_error_t doca_buf_pool_get_num_free_elements(const struct doca_buf_pool *buf_pool, uint32_t *num_of_free_elements)
Get the total number of free elements available for allocation in a DOCA buffer pool.
DOCA_STABLE doca_error_t doca_buf_pool_stop(struct doca_buf_pool *buf_pool)
Stop a started DOCA buffer pool.
DOCA_STABLE doca_error_t doca_buf_pool_set_element_alignment(struct doca_buf_pool *buf_pool, size_t element_alignment)
Set an alignment for each element in a DOCA buffer pool.
DOCA_STABLE doca_error_t doca_buf_pool_set_user_data(struct doca_buf_pool *buf_pool, union doca_data user_data)
Set user_data for a DOCA buffer pool.
#define DOCA_STABLE
To set a Symbol (or specifically a function) as stable API, i.e. it won't be changed.
enum doca_error doca_error_t
DOCA API return codes.
Convenience type for representing opaque data.