|
API Reference Manual 1.52.0
|
Pool parameters. More...
#include <pool_types.h>
Data Fields | ||
| odp_pool_type_t | type | |
| Pool type. | ||
| struct { | ||
| uint32_t num | ||
| Number of buffers in the pool. More... | ||
| uint32_t size | ||
| Minimum buffer size in bytes. More... | ||
| uint32_t align | ||
| Minimum buffer alignment in bytes. More... | ||
| uint32_t uarea_size | ||
| Minimum user area size in bytes. More... | ||
| uint32_t cache_size | ||
| Maximum number of buffers cached locally per thread. More... | ||
| } | buf | |
| Parameters for buffer pools. | ||
| struct { | ||
| uint32_t num | ||
| Minimum number of 'len' byte packets. More... | ||
| uint32_t max_num | ||
| Maximum number of packets. More... | ||
| uint32_t len | ||
| Minimum length of 'num' packets. More... | ||
| uint32_t max_len | ||
| Maximum packet length that will be allocated from the pool. More... | ||
| uint32_t align | ||
| Minimum packet data alignment in bytes. More... | ||
| uint32_t seg_len | ||
| Minimum number of packet data bytes that can be stored in the first segment of a newly allocated packet (starting from odp_packet_data()). More... | ||
| uint32_t uarea_size | ||
| Minimum user area size in bytes. More... | ||
| uint32_t headroom | ||
| Minimum headroom size in bytes. More... | ||
| uint8_t num_subparam | ||
| Number of subparameters. More... | ||
| odp_pool_pkt_subparam_t sub [ODP_POOL_MAX_SUBPARAMS] | ||
| Subparameter table. More... | ||
| uint32_t cache_size | ||
| Maximum number of packets cached locally per thread. More... | ||
| } | pkt | |
| Parameters for packet pools. | ||
| struct { | ||
| uint32_t num | ||
| Number of timeouts in the pool. More... | ||
| uint32_t uarea_size | ||
| Minimum user area size in bytes. More... | ||
| uint32_t cache_size | ||
| Maximum number of timeouts cached locally per thread. More... | ||
| } | tmo | |
| Parameters for timeout pools. | ||
| struct { | ||
| uint32_t num | ||
| Number of vectors in the pool. More... | ||
| uint32_t max_size | ||
| Maximum number of handles (such as odp_packet_t) in a vector. More... | ||
| uint32_t uarea_size | ||
| Minimum user area size in bytes. More... | ||
| uint32_t cache_size | ||
| Maximum number of vectors cached locally per thread. More... | ||
| } | vector | |
| Parameters for packet vector pools. | ||
| struct { | ||
| uint32_t num | ||
| Number of vectors in the pool. More... | ||
| uint32_t max_size | ||
| Maximum number of handles (such as odp_packet_t) in a vector. More... | ||
| uint32_t uarea_size | ||
| Minimum user area size in bytes. More... | ||
| uint32_t cache_size | ||
| Maximum number of vectors cached locally per thread. More... | ||
| } | event_vector | |
| Parameters for event vector pools. | ||
| struct { | ||
| void(* init_fn )(void *uarea, uint32_t size, void *args, uint32_t index) | ||
| User area initialization function. More... | ||
| void * args | ||
| Pointer to application defined arguments to be passed to every call of init_fn. More... | ||
| } | uarea_init | |
| Parameters for user area initialization. | ||
| odp_pool_stats_opt_t | stats | |
| Configure statistics counters. | ||
Pool parameters.
Definition at line 471 of file api/spec/pool_types.h.
| odp_pool_type_t odp_pool_param_t::type |
Pool type.
Definition at line 473 of file api/spec/pool_types.h.
| uint32_t odp_pool_param_t::num |
Number of buffers in the pool.
Number of vectors in the pool.
Number of timeouts in the pool.
Minimum number of 'len' byte packets.
The pool must contain at least this many packets that are 'len' bytes or smaller. An implementation may round up the value, as long as the 'max_num' parameter below is not violated. The maximum value for this field is defined by pool capability pkt.max_num.
Definition at line 478 of file api/spec/pool_types.h.
| uint32_t odp_pool_param_t::size |
Minimum buffer size in bytes.
An implementation may round up the given value. The maximum value is defined by buf.max_size pool capability.
Definition at line 485 of file api/spec/pool_types.h.
| uint32_t odp_pool_param_t::align |
Minimum buffer alignment in bytes.
Minimum packet data alignment in bytes.
Valid values are powers of two. Use 0 for default alignment. Default will always be a multiple of 8.
Valid values are powers of two. User allocated packets have start of data (see odp_packet_data()) aligned to this or a higher alignment (power of two value). This parameter does not apply to packets that ODP allocates internally (e.g. packets from packet input).
The maximum value is defined by pool capability pkt.max_align. Use 0 for default alignment.
Definition at line 491 of file api/spec/pool_types.h.
| uint32_t odp_pool_param_t::uarea_size |
Minimum user area size in bytes.
The maximum value is defined by pool capability buf.max_uarea_size. Specify as 0 if no user area is needed. The default value is 0.
The maximum value is defined by pool capability pkt.max_uarea_size. Specify as 0 if no user area is needed. The default value is 0.
The maximum value is defined by pool capability tmo.max_uarea_size. Specify as 0 if no user area is needed. The default value is 0.
The maximum value is defined by pool capability vector.max_uarea_size. Specify as 0 if no user area is needed. The default value is 0.
The maximum value is defined by pool capability event_vector.max_uarea_size. Specify as 0 if no user area is needed. The default value is 0.
Definition at line 497 of file api/spec/pool_types.h.
| uint32_t odp_pool_param_t::cache_size |
Maximum number of buffers cached locally per thread.
Maximum number of vectors cached locally per thread.
Maximum number of timeouts cached locally per thread.
Maximum number of packets cached locally per thread.
A non-zero value allows implementation to cache buffers locally per each thread. Thread local caching may improve performance, but requires application to take account that some buffers may be stored locally per thread and thus are not available for allocation from other threads.
This is the maximum number of buffers to be cached per thread. The actual cache size is implementation specific. The value must not be less than 'min_cache_size' or exceed 'max_cache_size' capability. The default value is implementation specific and set by odp_pool_param_init().
See buf.cache_size documentation for details.
Definition at line 513 of file api/spec/pool_types.h.
| uint32_t odp_pool_param_t::max_num |
Maximum number of packets.
This is the maximum number of packets of any length that can be allocated from the pool. The maximum value is defined by pool capability pkt.max_num. Use 0 when there's no requirement for the maximum number of packets. The default value is 0.
Definition at line 536 of file api/spec/pool_types.h.
| uint32_t odp_pool_param_t::len |
Minimum length of 'num' packets.
The pool must contain at least 'num' packets up to this packet length (1 ... 'len' bytes). The maximum value for this field is defined by pool capability pkt.max_len. Use 0 for default.
Definition at line 545 of file api/spec/pool_types.h.
| uint32_t odp_pool_param_t::max_len |
Maximum packet length that will be allocated from the pool.
The maximum value is defined by pool capability pkt.max_len. Use 0 for default.
Definition at line 551 of file api/spec/pool_types.h.
| uint32_t odp_pool_param_t::seg_len |
Minimum number of packet data bytes that can be stored in the first segment of a newly allocated packet (starting from odp_packet_data()).
The maximum value is defined by pool capability pkt.max_seg_len. Use 0 for default.
Definition at line 571 of file api/spec/pool_types.h.
| uint32_t odp_pool_param_t::headroom |
Minimum headroom size in bytes.
Each newly allocated packet from the pool must have at least this much headroom. The maximum value is defined by pool capability pkt.max_headroom. Use zero if headroom is not needed.
Definition at line 584 of file api/spec/pool_types.h.
| uint8_t odp_pool_param_t::num_subparam |
Number of subparameters.
The number of subparameter table entries used. The maximum value is defined by pool capability pkt.max_num_subparam. The default value is 0.
Definition at line 592 of file api/spec/pool_types.h.
| odp_pool_pkt_subparam_t odp_pool_param_t::sub[ODP_POOL_MAX_SUBPARAMS] |
Subparameter table.
Subparameters continue pool configuration with additional packet length requirements. The first table entry follows the num/len specification above. So that, sub[0].len > 'len' and sub[0].num refers to packet lengths between 'len' + 1 and sub[0].len. Similarly, sub[1] follows sub[0] specification, and so on.
Each requirement is supported separately and may be rounded up, as long as the 'max_num' parameter is not violated. It's implementation specific if some requirements are supported simultaneously (e.g. due to subpool design).
Definition at line 608 of file api/spec/pool_types.h.
| uint32_t odp_pool_param_t::max_size |
Maximum number of handles (such as odp_packet_t) in a vector.
Definition at line 643 of file api/spec/pool_types.h.
| struct { ... } odp_pool_param_t::vector |
Parameters for packet vector pools.
User area initialization function.
Application defined user area initialization function to be called for each event of the pool during odp_pool_create(). Ignored if user area persistence is not supported (odp_pool_capability_t::uarea_persistence) or pool will not have any user area. The default value is NULL.
| uarea | Pointer to the user area of an event |
| size | User area size |
| args | Pointer to application defined arguments |
| index | Index of the event (0..num events in pool - 1), not necessarily in order |
Definition at line 695 of file api/spec/pool_types.h.
| void* odp_pool_param_t::args |
Pointer to application defined arguments to be passed to every call of init_fn.
The default value is NULL.
Definition at line 700 of file api/spec/pool_types.h.
| odp_pool_stats_opt_t odp_pool_param_t::stats |
Configure statistics counters.
An application can read the enabled statistics counters using odp_pool_stats(). For optimal performance an application should enable only the required counters.
Definition at line 710 of file api/spec/pool_types.h.