API Reference Manual  1.45.1
ODP DMA

API Description

DMA offload.

Data Structures

struct  odp_dma_pool_capability_t
 DMA completion event pool capabilities. More...
 
struct  odp_dma_pool_param_t
 DMA completion event pool parameters. More...
 
struct  odp_dma_capability_t
 DMA capabilities. More...
 
struct  odp_dma_param_t
 DMA session parameters. More...
 
struct  odp_dma_seg_t
 DMA segment. More...
 
struct  odp_dma_transfer_param_t
 DMA transfer parameters. More...
 
struct  odp_dma_compl_param_t
 DMA transfer completion parameters. More...
 
struct  odp_dma_result_t
 DMA transfer results. More...
 

Macros

#define ODP_DMA_INVALID   ((odp_dma_t)0)
 Invalid DMA session.
 
#define ODP_DMA_COMPL_INVALID   ((odp_dma_compl_t)0)
 Invalid DMA completion event.
 
#define ODP_DMA_TRANSFER_ID_INVALID   ((odp_dma_transfer_id_t)0)
 Invalid DMA transfer identifier.
 
#define ODP_DMA_NAME_LEN   32
 Maximum DMA name length, including the null character.
 
#define ODP_DMA_MAIN_TO_MAIN   0x1u
 DMA transfer within the main memory.
 
#define ODP_DMA_TYPE_COPY   0x1u
 Copy data. More...
 
#define ODP_DMA_COMPL_NONE   0x1u
 No completion indication. More...
 
#define ODP_DMA_COMPL_SYNC   0x2u
 Synchronous transfer. More...
 
#define ODP_DMA_COMPL_EVENT   0x4u
 Asynchronous transfer with completion event. More...
 
#define ODP_DMA_COMPL_POLL   0x8u
 Asynchronous transfer with completion polling. More...
 

Typedefs

typedef _odp_abi_dma_todp_dma_t
 DMA session.
 
typedef _odp_abi_dma_todp_dma_compl_t
 DMA completion event.
 
typedef uint64_t odp_dma_transfer_id_t
 DMA transfer identifier.
 
typedef struct odp_dma_pool_capability_t odp_dma_pool_capability_t
 DMA completion event pool capabilities. More...
 
typedef struct odp_dma_pool_param_t odp_dma_pool_param_t
 DMA completion event pool parameters.
 
typedef uint32_t odp_dma_direction_t
 DMA transfer direction. More...
 
typedef uint32_t odp_dma_transfer_type_t
 DMA transfer type. More...
 
typedef uint32_t odp_dma_compl_mode_t
 DMA transfer completion mode. More...
 
typedef struct odp_dma_capability_t odp_dma_capability_t
 DMA capabilities.
 
typedef struct odp_dma_param_t odp_dma_param_t
 DMA session parameters.
 
typedef struct odp_dma_seg_t odp_dma_seg_t
 DMA segment.
 
typedef struct odp_dma_transfer_param_t odp_dma_transfer_param_t
 DMA transfer parameters. More...
 
typedef struct odp_dma_compl_param_t odp_dma_compl_param_t
 DMA transfer completion parameters.
 
typedef struct odp_dma_result_t odp_dma_result_t
 DMA transfer results.
 

Enumerations

enum  odp_dma_data_format_t { ODP_DMA_FORMAT_ADDR = 0 , ODP_DMA_FORMAT_PACKET }
 DMA transfer data format. More...
 
enum  odp_dma_transfer_order_t { ODP_DMA_ORDER_NONE = 0 , ODP_DMA_ORDER_COMPL , ODP_DMA_ORDER_ALL }
 DMA transfer ordering. More...
 
enum  odp_dma_mt_mode_t { ODP_DMA_MT_SAFE = 0 , ODP_DMA_MT_SERIAL }
 DMA transfer multi-thread safeness. More...
 

Functions

int odp_dma_capability (odp_dma_capability_t *capa)
 Query DMA capabilities. More...
 
void odp_dma_param_init (odp_dma_param_t *param)
 Initialize DMA session parameters. More...
 
odp_dma_t odp_dma_create (const char *name, const odp_dma_param_t *param)
 Create DMA session. More...
 
int odp_dma_destroy (odp_dma_t dma)
 Destroy DMA session. More...
 
odp_dma_t odp_dma_lookup (const char *name)
 Find DMA session by name. More...
 
void odp_dma_transfer_param_init (odp_dma_transfer_param_t *trs_param)
 Initialize DMA transfer parameters. More...
 
void odp_dma_compl_param_init (odp_dma_compl_param_t *compl_param)
 Initialize DMA transfer completion parameters. More...
 
int odp_dma_transfer (odp_dma_t dma, const odp_dma_transfer_param_t *trs_param, odp_dma_result_t *result)
 Perform DMA transfer. More...
 
int odp_dma_transfer_multi (odp_dma_t dma, const odp_dma_transfer_param_t *trs_param[], odp_dma_result_t *result[], int num)
 Perform multiple DMA transfers. More...
 
int odp_dma_transfer_start (odp_dma_t dma, const odp_dma_transfer_param_t *trs_param, const odp_dma_compl_param_t *compl_param)
 Start DMA transfer. More...
 
int odp_dma_transfer_start_multi (odp_dma_t dma, const odp_dma_transfer_param_t *trs_param[], const odp_dma_compl_param_t *compl_param[], int num)
 Start multiple DMA transfers. More...
 
int odp_dma_transfer_done (odp_dma_t dma, odp_dma_transfer_id_t transfer_id, odp_dma_result_t *result)
 Check if DMA transfer has completed. More...
 
odp_dma_transfer_id_t odp_dma_transfer_id_alloc (odp_dma_t dma)
 Allocate DMA transfer identifier. More...
 
void odp_dma_transfer_id_free (odp_dma_t dma, odp_dma_transfer_id_t transfer_id)
 Free DMA transfer identifier. More...
 
uint64_t odp_dma_transfer_id_to_u64 (odp_dma_transfer_id_t transfer_id)
 Get printable value for DMA transfer identifier handle. More...
 
uint64_t odp_dma_to_u64 (odp_dma_t dma)
 Get printable value for DMA session handle. More...
 
void odp_dma_print (odp_dma_t dma)
 Print debug info about DMA session. More...
 
int odp_dma_compl_result (odp_dma_compl_t dma_compl, odp_dma_result_t *result)
 Check DMA completion event. More...
 
odp_dma_compl_t odp_dma_compl_from_event (odp_event_t ev)
 Convert event to DMA completion event. More...
 
odp_event_t odp_dma_compl_to_event (odp_dma_compl_t dma_compl)
 Convert DMA completion event to event. More...
 
uint64_t odp_dma_compl_to_u64 (odp_dma_compl_t dma_compl)
 Get printable value for DMA completion event handle. More...
 
void * odp_dma_compl_user_area (odp_dma_compl_t dma_compl)
 DMA completion event user area. More...
 
odp_dma_compl_t odp_dma_compl_alloc (odp_pool_t pool)
 Allocate DMA completion event. More...
 
void odp_dma_compl_free (odp_dma_compl_t dma_compl)
 Free DMA completion event. More...
 
void odp_dma_compl_print (odp_dma_compl_t dma_compl)
 Print DMA completion event debug information. More...
 
void odp_dma_pool_param_init (odp_dma_pool_param_t *pool_param)
 Initialize DMA completion event pool parameters. More...
 
odp_pool_t odp_dma_pool_create (const char *name, const odp_dma_pool_param_t *pool_param)
 Create DMA completion event pool. More...
 

Macro Definition Documentation

◆ ODP_DMA_TYPE_COPY

#define ODP_DMA_TYPE_COPY   0x1u

Copy data.

Copy all data from source segment(s) to destination segment(s). There may be different number of source and destination segments in a transfer, but total length of all source segments must be equal to total length of all destination segments. Segments must not point to overlapping memory addresses. There are no alignment requirements for segment addresses or lengths. Data transfer from source to destination may happen in any segment and byte order.

Examples
odp_dma_perf.c, and odp_dmafwd.c.

Definition at line 168 of file api/spec/dma_types.h.

◆ ODP_DMA_COMPL_NONE

#define ODP_DMA_COMPL_NONE   0x1u

No completion indication.

Application uses odp_dma_transfer_start() call to start a DMA transfer, but does not request a completion notification for it. This can be useful for example when application starts a burst of transfers, but requests a completion event only on the last one (none on others).

Definition at line 190 of file api/spec/dma_types.h.

◆ ODP_DMA_COMPL_SYNC

#define ODP_DMA_COMPL_SYNC   0x2u

Synchronous transfer.

Application uses odp_dma_transfer() call for DMA transfers. Each call performs the requested transfer and returns when the transfer is complete.

Examples
odp_dma_perf.c.

Definition at line 197 of file api/spec/dma_types.h.

◆ ODP_DMA_COMPL_EVENT

#define ODP_DMA_COMPL_EVENT   0x4u

Asynchronous transfer with completion event.

Application uses odp_dma_transfer_start() call to start a DMA transfer. The transfer is complete when application receives the completion event.

Examples
odp_dma_perf.c, and odp_dmafwd.c.

Definition at line 204 of file api/spec/dma_types.h.

◆ ODP_DMA_COMPL_POLL

#define ODP_DMA_COMPL_POLL   0x8u

Asynchronous transfer with completion polling.

Application uses odp_dma_transfer_start() call to start a DMA transfer and uses odp_dma_transfer_done() call to check if the transfer has completed.

Examples
odp_dma_perf.c, and odp_dmafwd.c.

Definition at line 211 of file api/spec/dma_types.h.

Typedef Documentation

◆ odp_dma_pool_capability_t

DMA completion event pool capabilities.

Pool statistics are not supported with DMA completion event pools.

◆ odp_dma_direction_t

typedef uint32_t odp_dma_direction_t

DMA transfer direction.

Transfer direction defines source and destination memory type of DMA transfers. API specification defines only one option (ODP_DMA_MAIN_TO_MAIN) for the transfer direction. It is used for transfers within the main memory. Some implementations may extend this enumeration with implementation specific directions and memory types (e.g. from main memory to a device, etc.).

Definition at line 145 of file api/spec/dma_types.h.

◆ odp_dma_transfer_type_t

typedef uint32_t odp_dma_transfer_type_t

DMA transfer type.

Transfer type defines how DMA transfers operate data. Currently, only one transfer type is defined (ODP_DMA_TYPE_COPY).

Definition at line 157 of file api/spec/dma_types.h.

◆ odp_dma_compl_mode_t

typedef uint32_t odp_dma_compl_mode_t

DMA transfer completion mode.

Transfer completion mode defines how transfer completion is reported to the application. Completion modes are: ODP_DMA_COMPL_NONE, ODP_DMA_COMPL_SYNC, ODP_DMA_COMPL_EVENT, and ODP_DMA_COMPL_POLL

If not otherwise specified, a DMA transfer is complete when memory reads and writes are complete for all its segments, and writes are visible to all memory observers (threads and HW accelerators).

Definition at line 181 of file api/spec/dma_types.h.

◆ odp_dma_transfer_param_t

DMA transfer parameters.

These parameters define data sources and destinations for a DMA transfer. Capabilities specify the maximum number of segments and the maximum segment length that are supported.

The selected data format specifies how segment structure fields are used. When data format is ODP_DMA_FORMAT_ADDR, set segment start address (odp_dma_seg_t::addr) and length (odp_dma_seg_t::len). When data format is ODP_DMA_FORMAT_PACKET, set packet handle (odp_dma_seg_t::packet), segment start offset (odp_dma_seg_t::offset) and length. If a DMA segment spans over multiple packet segments, it is considered as equally many DMA segments. So, take packet segmentation into account when making sure that the maximum number of DMA segments capabilities are not exceeded.

Enumeration Type Documentation

◆ odp_dma_data_format_t

DMA transfer data format.

Enumerator
ODP_DMA_FORMAT_ADDR 

Data format is raw memory address.

ODP_DMA_FORMAT_PACKET 

Data format is odp_packet_t.

Definition at line 216 of file api/spec/dma_types.h.

◆ odp_dma_transfer_order_t

DMA transfer ordering.

These options specify ordering of consecutive DMA transfers within a session. Transfer order is defined by the order of consecutive transfer (start) calls and the order of transfers within each multi-transfer call. Note that ordering option matters also when using odp_dma_transfer_multi() call, as ODP_DMA_ORDER_NONE allows implementation to perform transfers in parallel.

These options do not apply to data (segment or byte) processing order within a transfer. If two transfers read/write overlapping memory areas, an appropriate transfer ordering option (e.g. ODP_DMA_ORDER_ALL) needs to be used for correct operation.

Enumerator
ODP_DMA_ORDER_NONE 

No specific ordering between transfers.

This may result the best performance (maximum implementation parallelism) as
transfers may start and complete in any order. 
ODP_DMA_ORDER_COMPL 

Report transfer completions in order.

Transfers may be performed in any order, but transfer completions must be reported
in the same order they were started within a session. This allows application to
start multiple transfers and wait only completion of the last one. 
ODP_DMA_ORDER_ALL 

Perform all transfers in order.

Perform transfers and report their completions in the same order they were started
within a session. This enables for example a subsequent transfer to read data
written by a previous transfer. 

Definition at line 238 of file api/spec/dma_types.h.

◆ odp_dma_mt_mode_t

DMA transfer multi-thread safeness.

Enumerator
ODP_DMA_MT_SAFE 

Multi-thread safe operation.

Multiple threads may perform DMA transfers concurrently on the same DMA session.
ODP_DMA_MT_SERIAL 

Application serializes operations.

Multiple threads may perform DMA transfers on the same DMA session, but application
serializes all transfer related calls (odp_dma_transfer(), odp_dma_transfer_start(),
_start_multi(), _done() and _result()). Threads do not call any of these operations
concurrently.

Definition at line 264 of file api/spec/dma_types.h.

Function Documentation

◆ odp_dma_capability()

int odp_dma_capability ( odp_dma_capability_t capa)

Query DMA capabilities.

Outputs DMA capabilities on success.

Parameters
[out]capaPointer to a capability structure for output
Return values
0on success
<0on failure
Examples
odp_dma_perf.c, odp_dmafwd.c, and odp_sysinfo.c.

◆ odp_dma_param_init()

void odp_dma_param_init ( odp_dma_param_t param)

Initialize DMA session parameters.

Initialize an odp_dma_param_t to its default values.

Parameters
[out]paramParameter structure to be initialized

◆ odp_dma_create()

odp_dma_t odp_dma_create ( const char *  name,
const odp_dma_param_t param 
)

Create DMA session.

Create a DMA session according to the parameters. The use of session name is optional. Unique names are not required. However, odp_dma_lookup() returns only a single matching named session. Use odp_dma_param_init() to initialize parameters into their default values.

Parameters
nameDMA session name or NULL. Maximum string length is ODP_DMA_NAME_LEN, including the null character.
paramDMA session parameters
Returns
DMA session handle on success
Return values
ODP_DMA_INVALIDon failure
Examples
odp_dma_perf.c, and odp_dmafwd.c.

◆ odp_dma_destroy()

int odp_dma_destroy ( odp_dma_t  dma)

Destroy DMA session.

A DMA session may be destroyed only when there are no active transfers in the session (all previously started transfers have completed).

Parameters
dmaDMA session to be destroyed
Return values
0on success
<0on failure
Examples
odp_dma_perf.c, and odp_dmafwd.c.

◆ odp_dma_lookup()

odp_dma_t odp_dma_lookup ( const char *  name)

Find DMA session by name.

Parameters
nameDMA session name
Returns
Handle of the first matching DMA session
Return values
ODP_DMA_INVALIDDMA session could not be found

◆ odp_dma_transfer_param_init()

void odp_dma_transfer_param_init ( odp_dma_transfer_param_t trs_param)

Initialize DMA transfer parameters.

Initialize an odp_dma_transfer_param_t to its default values.

Parameters
[out]trs_paramParameter structure to be initialized
Examples
odp_dma_perf.c, and odp_dmafwd.c.

◆ odp_dma_compl_param_init()

void odp_dma_compl_param_init ( odp_dma_compl_param_t compl_param)

Initialize DMA transfer completion parameters.

Initialize an odp_dma_compl_param_t to its default values.

Parameters
[out]compl_paramParameter structure to be initialized
Examples
odp_dma_perf.c, and odp_dmafwd.c.

◆ odp_dma_transfer()

int odp_dma_transfer ( odp_dma_t  dma,
const odp_dma_transfer_param_t trs_param,
odp_dma_result_t result 
)

Perform DMA transfer.

Performs DMA transfer according to the session and transfer parameters. Returns 1 when the transfer was completed successfully. Returns 0 when the transfer was not performed due to resources being temporarily busy. In this case, the same transfer is likely to succeed after enough resources are available. Returns <0 on failure.

The call outputs optionally transfer results on a non-zero return value. Use NULL as 'result' pointer if results are not required.

Parameters
dmaDMA session
trs_paramTransfer parameters
[out]resultPointer to transfer result structure for output, or NULL when not used
Return values
1when transfer completed successfully
0when resources are busy and transfer was not performed
<0on failure
Examples
odp_dma_perf.c.

◆ odp_dma_transfer_multi()

int odp_dma_transfer_multi ( odp_dma_t  dma,
const odp_dma_transfer_param_t trs_param[],
odp_dma_result_t result[],
int  num 
)

Perform multiple DMA transfers.

Like odp_dma_transfer(), but performs 'num' transfers.

Parameters
dmaDMA session
trs_paramArray of transfer parameter pointers
[out]resultArray of transfer result pointers for output, or NULL when not used
numNumber of transfers to perform. Both arrays have this many elements.
Returns
Number of transfers completed successfully (1 ... num)
Return values
0when resources are busy and no transfers were performed
<0on failure

◆ odp_dma_transfer_start()

int odp_dma_transfer_start ( odp_dma_t  dma,
const odp_dma_transfer_param_t trs_param,
const odp_dma_compl_param_t compl_param 
)

Start DMA transfer.

Starts asynchronous DMA transfer according to the session and transfer parameters. Completion parameters specify how transfer completion is reported. Returns 1 when the transfer was started successfully. Returns 0 when the transfer was not started due to resources being temporarily busy. In this case, the same transfer is likely to start successfully after enough resources are available. Returns <0 on failure.

Parameters
dmaDMA session
trs_paramTransfer parameters
compl_paramTransfer completion parameters
Return values
1when transfer started successfully
0when resources are busy and transfer was not started
<0on failure
See also
odp_dma_transfer_id_alloc(), odp_dma_transfer_done(), odp_dma_compl_result()
Examples
odp_dma_perf.c, and odp_dmafwd.c.

◆ odp_dma_transfer_start_multi()

int odp_dma_transfer_start_multi ( odp_dma_t  dma,
const odp_dma_transfer_param_t trs_param[],
const odp_dma_compl_param_t compl_param[],
int  num 
)

Start multiple DMA transfers.

Like odp_dma_transfer_start(), but starts 'num' transfers.

Parameters
dmaDMA session
trs_paramArray of transfer parameter pointers
compl_paramArray of transfer completion parameter pointers
numNumber of transfers to start. Both parameter arrays have this many elements.
Returns
Number of transfers started successfully (1 ... num)
Return values
0when resources are busy and no transfers were started
<0on failure

◆ odp_dma_transfer_done()

int odp_dma_transfer_done ( odp_dma_t  dma,
odp_dma_transfer_id_t  transfer_id,
odp_dma_result_t result 
)

Check if DMA transfer has completed.

Application must call this function for every transfer that was started in ODP_DMA_COMPL_POLL mode until a non-zero value is returned. The transfer identifier from completion parameters of the transfer start call is used. When a non-zero value is returned, the transfer is complete and the identifier may be freed or reused for another transfer.

The call outputs optionally transfer results on a non-zero return value. Use NULL as 'result' pointer if results are not required.

Parameters
dmaDMA session
transfer_idTransfer identifier
[out]resultPointer to transfer result structure for output, or NULL when not used.
Return values
0transfer has not finished
>0transfer has finished successfully
<0on failure
Examples
odp_dma_perf.c, and odp_dmafwd.c.

◆ odp_dma_transfer_id_alloc()

odp_dma_transfer_id_t odp_dma_transfer_id_alloc ( odp_dma_t  dma)

Allocate DMA transfer identifier.

Transfer identifiers are used in ODP_DMA_COMPL_POLL mode. It identifies a previously started transfer for an odp_dma_transfer_done() call. The maximum number of transfer identifiers is implementation specific, but there are at least odp_dma_capability_t::max_transfers identifiers per session.

Parameters
dmaDMA session
Returns
Transfer identifier
Return values
ODP_DMA_TRANSFER_ID_INVALIDTransfer identifier could not be allocated
Examples
odp_dma_perf.c, and odp_dmafwd.c.

◆ odp_dma_transfer_id_free()

void odp_dma_transfer_id_free ( odp_dma_t  dma,
odp_dma_transfer_id_t  transfer_id 
)

Free DMA transfer identifier.

Parameters
dmaDMA session
transfer_idDMA transfer identifier to be freed
Examples
odp_dma_perf.c, and odp_dmafwd.c.

◆ odp_dma_transfer_id_to_u64()

uint64_t odp_dma_transfer_id_to_u64 ( odp_dma_transfer_id_t  transfer_id)

Get printable value for DMA transfer identifier handle.

Parameters
transfer_idHandle to be converted for debugging
Returns
uint64_t value that can be used to print/display this handle

◆ odp_dma_to_u64()

uint64_t odp_dma_to_u64 ( odp_dma_t  dma)

Get printable value for DMA session handle.

Parameters
dmaHandle to be converted for debugging
Returns
uint64_t value that can be used to print/display this handle

◆ odp_dma_print()

void odp_dma_print ( odp_dma_t  dma)

Print debug info about DMA session.

Print implementation defined information about DMA session to the ODP log. The information is intended to be used for debugging.

Parameters
dmaDMA session handle

◆ odp_dma_compl_result()

int odp_dma_compl_result ( odp_dma_compl_t  dma_compl,
odp_dma_result_t result 
)

Check DMA completion event.

Reads DMA completion event (ODP_EVENT_DMA_COMPL), and returns if the transfer succeeded or failed. The call outputs optionally transfer results. Use NULL as 'result' pointer if results are not required.

Parameters
dma_complDMA completion event
[out]resultPointer to transfer result structure for output, or NULL when not used.
Return values
0Transfer was successful
<0Transfer failed
Examples
odp_dma_perf.c, and odp_dmafwd.c.

◆ odp_dma_compl_from_event()

odp_dma_compl_t odp_dma_compl_from_event ( odp_event_t  ev)

Convert event to DMA completion event.

Converts an ODP_EVENT_DMA_COMPL type event to a DMA completion event.

Parameters
evEvent handle
Returns
DMA completion event handle
Examples
odp_dma_perf.c, and odp_dmafwd.c.

◆ odp_dma_compl_to_event()

odp_event_t odp_dma_compl_to_event ( odp_dma_compl_t  dma_compl)

Convert DMA completion event to event.

Parameters
dma_complDMA completion event handle
Returns
Event handle
Examples
odp_dma_perf.c, and odp_dmafwd.c.

◆ odp_dma_compl_to_u64()

uint64_t odp_dma_compl_to_u64 ( odp_dma_compl_t  dma_compl)

Get printable value for DMA completion event handle.

Parameters
dma_complHandle to be converted for debugging
Returns
uint64_t value that can be used to print/display this handle

◆ odp_dma_compl_user_area()

void* odp_dma_compl_user_area ( odp_dma_compl_t  dma_compl)

DMA completion event user area.

Returns pointer to the user area associated with the completion event. Size of the area is fixed and defined in completion event pool parameters.

Parameters
dma_complDMA completion event handle
Returns
Pointer to the user area of the completion event
Return values
NULLThe completion event does not have user area

◆ odp_dma_compl_alloc()

odp_dma_compl_t odp_dma_compl_alloc ( odp_pool_t  pool)

Allocate DMA completion event.

Allocates a DMA completion event from a pool. The pool must have been created with odp_dma_pool_create() call. All completion event metadata are set to their default values.

Parameters
poolPool handle
Returns
DMA completion event handle
Return values
ODP_DMA_COMPL_INVALIDCompletion event could not be allocated
Examples
odp_dma_perf.c, and odp_dmafwd.c.

◆ odp_dma_compl_free()

void odp_dma_compl_free ( odp_dma_compl_t  dma_compl)

Free DMA completion event.

Frees a DMA completion event into the pool it was allocated from.

Parameters
dma_complDMA completion event handle
Examples
odp_dmafwd.c.

◆ odp_dma_compl_print()

void odp_dma_compl_print ( odp_dma_compl_t  dma_compl)

Print DMA completion event debug information.

Prints implementation specific debug information about the completion event to the ODP log.

Parameters
dma_complDMA completion event handle

◆ odp_dma_pool_param_init()

void odp_dma_pool_param_init ( odp_dma_pool_param_t pool_param)

Initialize DMA completion event pool parameters.

Initialize an odp_dma_pool_param_t to its default values.

Parameters
[out]pool_paramParameter structure to be initialized
Examples
odp_dma_perf.c, and odp_dmafwd.c.

◆ odp_dma_pool_create()

odp_pool_t odp_dma_pool_create ( const char *  name,
const odp_dma_pool_param_t pool_param 
)

Create DMA completion event pool.

Creates a pool of DMA completion events (ODP_EVENT_DMA_COMPL). Pool type is ODP_POOL_DMA_COMPL. The use of pool name is optional. Unique names are not required. However, odp_pool_lookup() returns only a single matching pool. Use odp_dma_pool_param_init() to initialize pool parameters into their default values. Parameters values must not exceed pool capabilities (odp_dma_pool_capability_t).

Parameters
nameName of the pool or NULL. Maximum string length is ODP_POOL_NAME_LEN, including the null character.
pool_paramPool parameters
Returns
Handle of the created pool
Return values
ODP_POOL_INVALIDPool could not be created
Examples
odp_dma_perf.c, and odp_dmafwd.c.