|
Zephyr Project API 4.4.99
A Scalable Open Source RTOS
|
Buffer pool structure. More...
#include <mpipe_buffer.h>
Data Fields | |
| struct mpipe_buffer_pool_config | req_config |
| What this pool requires of its own accord, before any negotiation: the owner's hardware minimum, the application's request. | |
| struct mpipe_buffer_pool_config | config |
| What the negotiation settled on, and what mpipe_buffer_pool::start allocates against. | |
| struct net_buf_pool * | nb_pool |
| net_buf pool associated with the buffer pool | |
| int(* | configure )(struct mpipe_buffer_pool *pool, const struct mpipe_structure *config) |
| Configure the pool with the given caps structure. | |
| int(* | set_config )(struct mpipe_buffer_pool *pool, const struct mpipe_buffer_pool_config *cfg) |
| Apply a negotiated pool config. | |
| int(* | start )(struct mpipe_buffer_pool *pool) |
| Start the pool and allocate resources. | |
| int(* | stop )(struct mpipe_buffer_pool *pool) |
| Stop the pool and free resources. | |
| int(* | acquire_buffer )(struct mpipe_buffer_pool *pool, struct net_buf **buf) |
| Acquire a buffer from the pool. | |
| int(* | release_buffer )(struct mpipe_buffer_pool *pool, struct net_buf *buf) |
| Release a buffer back to the pool, automatically called when buffer refcount reaches 0. | |
| bool | started |
| Flag indicating if the pool has been started. | |
Buffer pool structure.
| int(* mpipe_buffer_pool::acquire_buffer) (struct mpipe_buffer_pool *pool, struct net_buf **buf) |
Acquire a buffer from the pool.
| struct mpipe_buffer_pool_config mpipe_buffer_pool::config |
What the negotiation settled on, and what mpipe_buffer_pool::start allocates against.
Starts each run as a copy of req_config - mpipe_buffer_pool_stop restores it - so a run never inherits the demands of the one before it.
| int(* mpipe_buffer_pool::configure) (struct mpipe_buffer_pool *pool, const struct mpipe_structure *config) |
Configure the pool with the given caps structure.
| struct net_buf_pool* mpipe_buffer_pool::nb_pool |
net_buf pool associated with the buffer pool
| int(* mpipe_buffer_pool::release_buffer) (struct mpipe_buffer_pool *pool, struct net_buf *buf) |
Release a buffer back to the pool, automatically called when buffer refcount reaches 0.
| struct mpipe_buffer_pool_config mpipe_buffer_pool::req_config |
What this pool requires of its own accord, before any negotiation: the owner's hardware minimum, the application's request.
Written once at setup with mpipe_buffer_pool_set_req_config and never by a negotiation, so it stays the floor every run starts from.
| int(* mpipe_buffer_pool::set_config) (struct mpipe_buffer_pool *pool, const struct mpipe_buffer_pool_config *cfg) |
Apply a negotiated pool config.
The implementation validates cfg against what the pool can provide, writes the accepted values into mpipe_buffer_pool::config itself, and returns a negative errno to refuse (e.g. -ENOTSUP for an alignment the backing allocator cannot honor, -ENOSPC for a buffer count beyond the pool capacity).
| int(* mpipe_buffer_pool::start) (struct mpipe_buffer_pool *pool) |
Start the pool and allocate resources.
| bool mpipe_buffer_pool::started |
Flag indicating if the pool has been started.
| int(* mpipe_buffer_pool::stop) (struct mpipe_buffer_pool *pool) |
Stop the pool and free resources.