25 #ifndef DOCA_BUF_INVENTORY_H_
26 #define DOCA_BUF_INVENTORY_H_
49 struct doca_buf_inventory;
168 struct doca_mmap *
mmap,
173 struct doca_buf **buf);
198 struct doca_mmap *
mmap,
201 struct doca_buf **buf)
229 struct doca_mmap *
mmap,
232 struct doca_buf **buf)
259 const struct doca_buf *src_buf,
260 struct doca_buf **dst_buf);
318 uint32_t *num_of_free_elements);
DOCA_STABLE doca_error_t doca_buf_inventory_get_user_data(const struct doca_buf_inventory *inventory, union doca_data *user_data)
Get the user_data of a DOCA Buffer Inventory.
DOCA_STABLE doca_error_t doca_buf_inventory_set_user_data(struct doca_buf_inventory *inventory, union doca_data user_data)
Set user_data for a DOCA Buffer Inventory.
DOCA_EXPERIMENTAL doca_error_t doca_buf_inventory_expand(struct doca_buf_inventory *inventory, uint32_t num_elements)
Expand the inventory.
DOCA_STABLE doca_error_t doca_buf_inventory_get_num_free_elements(const struct doca_buf_inventory *inventory, uint32_t *num_of_free_elements)
Get the total number of free elements in a DOCA Buffer Inventory.
DOCA_STABLE doca_error_t doca_buf_inventory_destroy(struct doca_buf_inventory *inventory)
Destroy buffer inventory structure.
DOCA_STABLE doca_error_t doca_buf_inventory_get_num_elements(const struct doca_buf_inventory *inventory, uint32_t *num_of_elements)
Read the total number of elements in a DOCA Buffer Inventory.
DOCA_STABLE doca_error_t doca_buf_inventory_buf_get_by_args(struct doca_buf_inventory *inventory, struct doca_mmap *mmap, void *addr, size_t len, void *data, size_t data_len, struct doca_buf **buf)
Allocate single element from buffer inventory and point it to the buffer defined by addr,...
DOCA_STABLE doca_error_t doca_buf_inventory_buf_dup(struct doca_buf_inventory *inventory, const struct doca_buf *src_buf, struct doca_buf **dst_buf)
Duplicates content of the buf argument into element allocated from buffer inventory....
static doca_error_t doca_buf_inventory_buf_get_by_addr(struct doca_buf_inventory *inventory, struct doca_mmap *mmap, void *addr, size_t len, struct doca_buf **buf)
Allocate single element from buffer inventory and point it to the buffer defined by addr & len argume...
static doca_error_t doca_buf_inventory_buf_get_by_data(struct doca_buf_inventory *inventory, struct doca_mmap *mmap, void *data, size_t data_len, struct doca_buf **buf)
Allocate single element from buffer inventory and point it to the buffer defined by data & data_len a...
DOCA_STABLE doca_error_t doca_buf_inventory_start(struct doca_buf_inventory *inventory)
Start element retrieval from inventory.
DOCA_STABLE doca_error_t doca_buf_inventory_create(size_t num_elements, struct doca_buf_inventory **inventory)
Allocates buffer inventory with default/unset attributes.
DOCA_STABLE doca_error_t doca_buf_inventory_stop(struct doca_buf_inventory *inventory)
Stop element retrieval from inventory.
#define DOCA_EXPERIMENTAL
To set a Symbol (or specifically a function) as experimental.
#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.