EM-ODP
3.7.0
Event Machine on ODP
|
Data Fields | |
em_event_type_t | event_type |
struct { | |
bool in_use | |
uint32_t value | |
} | align_offset |
struct { | |
bool in_use | |
size_t size | |
} | user_area |
struct { | |
struct { | |
bool in_use | |
uint32_t value | |
} headroom | |
} | pkt |
int | num_subpools |
struct { | |
uint32_t size | |
uint32_t num | |
uint32_t cache_size | |
} | subpool [EM_MAX_SUBPOOLS] |
struct { | |
bool in_use | |
em_pool_stats_opt_t opt | |
} | stats_opt |
uint32_t | __internal_check |
Definition at line 141 of file event_machine_pool.h.
uint32_t em_pool_cfg_t::__internal_check |
Internal check - don't touch!
EM will verify that em_pool_cfg_init(pool_cfg) has been called before creating a pool with em_pool_create(..., pool_cfg)
Definition at line 319 of file event_machine_pool.h.
struct { ... } em_pool_cfg_t::align_offset |
Alignment offset in bytes for the event payload start address (for all events allocated from this EM pool).
Only valid for pools with event_type EM_EVENT_TYPE_SW or EM_EVENT_TYPE_PACKET (i.e. ignored for EM_EVENT_TYPE_VECTOR pools).
The default EM event payload start address alignment is a power-of-two that is at minimum 32 bytes (i.e. 32 B, 64 B, 128 B etc. depending on e.g. target cache-line size). The 'align_offset.value' option can be used to fine-tune the start-address by a small offset to e.g. make room for a small SW header before the rest of the payload that might need a specific alignment for direct HW-access. Example: setting 'align_offset.value = 8' makes sure that the payload after 8 bytes will be aligned at minimum (2^x) 32 bytes.
This option conserns all events allocated from the pool and overrides the global config file option 'pool.align_offset' for this pool.
uint32_t em_pool_cfg_t::cache_size |
Maximum number of locally cached subpool events per EM-core.
Allocating or freeing events from a core-local event-cache can be faster than using the global event subpool. Cached events are only available on the local core and can reduce the number of globally free events in the subpool, thus consider setting 'num > EM-core-count * cache_size'. The actual used cache_size will be smaller than or equal to the requested value, depending on the implementation.
Definition at line 294 of file event_machine_pool.h.
em_event_type_t em_pool_cfg_t::event_type |
The event type determines the pool type used:
Definition at line 156 of file event_machine_pool.h.
struct { ... } em_pool_cfg_t::headroom |
Pool-specific packet minimum headroom
This option conserns all events allocated from the pool and overrides the global config file option 'pool.pkt_headroom' for this pool.
bool em_pool_cfg_t::in_use |
Select: Use pool-specific align-offset 'value' from below or use the global default value 'pool.align_offset' from the config file. false: Use 'pool.align_offset' from the config file (default) true: Use pool-specific value set below.
Select: Use pool-specific event user area 'size' from below or use the global default value 'pool.user_area_size' from the config file. false: Use 'pool.user_area_size' from config file (default). true: Use pool-specific size set below.
Select: Use pool-specific packet headroom value from below or use the global default value 'pool.pkt_headroom' from the config file. false: Use 'pool.pkt_headroom' from the config file (default). true: Use pool-specific value set below.
Select: Use pool-specific statistic options from below or use the global default value 'pool.statistics' from the config file. false: Use 'pool.statistics' from config file (default). true: Use pool-specific statistic options set below.
Definition at line 185 of file event_machine_pool.h.
uint32_t em_pool_cfg_t::num |
Number of events in the subpool (num > 0)
Definition at line 281 of file event_machine_pool.h.
int em_pool_cfg_t::num_subpools |
Number of subpools within one EM pool, min=1, max=EM_MAX_SUBPOOLS
Definition at line 264 of file event_machine_pool.h.
struct { ... } em_pool_cfg_t::pkt |
Parameters for an EM-pool with '.event_type = EM_EVENT_TYPE_PACKET' Ignored for other pool types.
size_t em_pool_cfg_t::size |
Pool-specific event user area size in bytes (only evaluated if 'in_use=true'). Overrides the config file 'pool.user_area_size' for this pool 0: Explicitly set 'No user area' for the pool.
Definition at line 224 of file event_machine_pool.h.
uint32_t em_pool_cfg_t::size |
.event_type = EM_EVENT_TYPE_SW or EM_EVENT_TYPE_PACKET: Event payload size of the subpool (size > 0), bytes(B). EM does not initialize the payload data. .event_type = EM_EVENT_TYPE_VECTOR: Max number of events in a vector from the subpool, i.e. 'number of em_event_t:s in the vector's event-table[]'. EM does not initialize the vector.
Definition at line 278 of file event_machine_pool.h.
struct { ... } em_pool_cfg_t::stats_opt |
Pool statistic options for all subpools
struct { ... } em_pool_cfg_t::subpool[EM_MAX_SUBPOOLS] |
Subpool params array: .subpool[num_subpools]
struct { ... } em_pool_cfg_t::user_area |
Event user area size in bytes. (for all events allocated from this EM pool).
The user area is located within the event metadata (hdr) and is not part of the event payload. The event user area can e.g. be used to store additional state data related to the payload contents. EM does not initialize the contents of the user area.
This option concerns all events allocated from the pool and overrides the global config file option 'pool.user_area_size' for this pool.
uint32_t em_pool_cfg_t::value |
Pool-specific event payload alignment offset value in bytes (only evaluated if 'in_use=true'). Overrides the config file value 'pool.align_offset' for this pool. The given 'value' must be a small power-of-two: 2, 4, or 8 0: Explicitly set 'No align offset' for the pool.
Pool-specific packet minimum headroom in bytes, each packet must have at least this much headroom. (only evaluated if 'in_use=true'). Overrides the config file value 'pool.pkt_headroom' for this pool. 0: Explicitly set 'No headroom' for the pool.
Definition at line 194 of file event_machine_pool.h.