API Reference Manual  1.45.0
odp_stash_param_t Struct Reference

Stash parameters. More...

#include <stash_types.h>

Collaboration diagram for odp_stash_param_t:
[legend]

Data Fields

odp_stash_type_t type
 Stash type. More...
 
odp_stash_op_mode_t put_mode
 Put operation mode. More...
 
odp_stash_op_mode_t get_mode
 Get operation mode. More...
 
uint64_t num_obj
 Number of object handles. More...
 
uint32_t obj_size
 Object handle size in bytes. More...
 
uint32_t cache_size
 Maximum number of object handles cached locally per thread. More...
 
odp_stash_stats_opt_t stats
 Configure statistics counters. More...
 
odp_bool_t strict_size
 Strict size. More...
 

Detailed Description

Stash parameters.

Examples
odp_debug.c, odp_dmafwd.c, and odp_stash_perf.c.

Definition at line 218 of file api/spec/stash_types.h.

Field Documentation

◆ type

odp_stash_type_t odp_stash_param_t::type

Stash type.

Select type of the stash to be created. The default value is ODP_STASH_TYPE_DEFAULT. Use stash capability to check if additional types are supported.

Examples
odp_dmafwd.c.

Definition at line 225 of file api/spec/stash_types.h.

◆ put_mode

odp_stash_op_mode_t odp_stash_param_t::put_mode

Put operation mode.

The default value is ODP_STASH_OP_MT. Usage of ODP_STASH_OP_ST or ODP_STASH_OP_LOCAL mode may improve performance when applicable. If ODP_STASH_OP_LOCAL is used, it must be set to both put_mode and get_mode.

Examples
odp_dmafwd.c.

Definition at line 234 of file api/spec/stash_types.h.

◆ get_mode

odp_stash_op_mode_t odp_stash_param_t::get_mode

Get operation mode.

The default value is ODP_STASH_OP_MT. Usage of ODP_STASH_OP_ST or ODP_STASH_OP_LOCAL mode may improve performance when applicable. If ODP_STASH_OP_LOCAL is used, it must be set to both put_mode and get_mode.

Examples
odp_dmafwd.c.

Definition at line 243 of file api/spec/stash_types.h.

◆ num_obj

uint64_t odp_stash_param_t::num_obj

Number of object handles.

Application must be able to store at least this many object handles into the stash. An implementation may round up the value. The given value must not exceed 'max_num' capability.

Examples
odp_debug.c, odp_dmafwd.c, and odp_stash_perf.c.

Definition at line 251 of file api/spec/stash_types.h.

◆ obj_size

uint32_t odp_stash_param_t::obj_size

Object handle size in bytes.

Application uses object handles of this size in put and get operations. Valid values are powers of two (1, 2, 4, 8, ... bytes) and must not exceed 'max_obj_size' capability.

Examples
odp_debug.c, odp_dmafwd.c, and odp_stash_perf.c.

Definition at line 259 of file api/spec/stash_types.h.

◆ cache_size

uint32_t odp_stash_param_t::cache_size

Maximum number of object handles cached locally per thread.

A non-zero value allows implementation to cache object handles locally per each thread. Thread local caching may improve performance, but requires application to take into account that some object handles may be stored locally per thread and thus are not available to odp_stash_get() calls from other threads.

Strict FIFO ordering of object handles cannot be maintained with thread local caching. If application does not require strict ordering, it may allow caching also with ODP_STASH_TYPE_FIFO type stashes.

This is the maximum number of handles to be cached per thread. The actual cache size and how it is divided between put and get operations is implementation specific. The value must not exceed 'max_cache_size' capability. The default value is 0.

Thread local cache may be emptied with odp_stash_flush_cache().

Examples
odp_dmafwd.c.

Definition at line 281 of file api/spec/stash_types.h.

◆ stats

odp_stash_stats_opt_t odp_stash_param_t::stats

Configure statistics counters.

See stash capabilities for supported statistics counters. Use odp_stash_stats() to read the enabled counters. For optimal performance, enable only those counters that are actually used. All counters are disabled by default.

Definition at line 290 of file api/spec/stash_types.h.

◆ strict_size

odp_bool_t odp_stash_param_t::strict_size

Strict size.

If true, application never attempts to store more handles into the stash than specified in the 'num_obj' parameter. Implementation may use this value as a hint for performance optimizations. The default value is false.

Examples
odp_stash_perf.c.

Definition at line 299 of file api/spec/stash_types.h.


The documentation for this struct was generated from the following file: