API Reference Manual  1.47.0
odp_dma_transfer_param_t Struct Reference

DMA transfer parameters. More...

#include <dma_types.h>

Collaboration diagram for odp_dma_transfer_param_t:
[legend]

Data Fields

odp_dma_data_format_t src_format
 Source data format. More...
 
odp_dma_data_format_t dst_format
 Destination data format. More...
 
uint32_t num_src
 Number of source segments. More...
 
uint32_t num_dst
 Number of destination segments. More...
 
odp_dma_seg_tsrc_seg
 Table of source segments. More...
 
odp_dma_seg_tdst_seg
 Table of destination segments. More...
 
odp_pool_t dst_seg_pool
 Destination segment pool. More...
 
union {
   struct {
      uint16_t   seg_free: 1
 Allow freeing all the source segments. More...
 
      uint16_t   unique_src_segs: 1
 Option bit to denote a source segment of data format ODP_DMA_FORMAT_PACKET have unique packets or not. More...
 
      uint16_t   single_pool: 1
 Allow freeing all source segments to a single pool. More...
 
      uint16_t   seg_alloc: 1
 Allow allocating the destination segments for data format ODP_DMA_FORMAT_PACKET. More...
 
      uint16_t   unique_dst_segs: 1
 Option bit to allocate unique destination segments for data format ODP_DMA_FORMAT_PACKET. More...
 
   }   opts
 Option bit fields.
 
   uint16_t   all_opts
 Entire bit field structure. More...
 
}; 
 Transfer options. More...
 

Detailed Description

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.

Examples
odp_dma_perf.c, and odp_dmafwd.c.

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

Field Documentation

◆ src_format

odp_dma_data_format_t odp_dma_transfer_param_t::src_format

Source data format.

The default value is ODP_DMA_FORMAT_ADDR.

Examples
odp_dma_perf.c, and odp_dmafwd.c.

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

◆ dst_format

odp_dma_data_format_t odp_dma_transfer_param_t::dst_format

Destination data format.

The default value is ODP_DMA_FORMAT_ADDR.

Examples
odp_dma_perf.c, and odp_dmafwd.c.

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

◆ num_src

uint32_t odp_dma_transfer_param_t::num_src

Number of source segments.

The default value is 1.

Examples
odp_dma_perf.c, and odp_dmafwd.c.

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

◆ num_dst

uint32_t odp_dma_transfer_param_t::num_dst

Number of destination segments.

The default value is 1.

Examples
odp_dma_perf.c, and odp_dmafwd.c.

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

◆ src_seg

odp_dma_seg_t* odp_dma_transfer_param_t::src_seg

Table of source segments.

The table has 'num_src' entries. Data format is defined by 'src_format'.

Examples
odp_dma_perf.c, and odp_dmafwd.c.

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

◆ dst_seg

odp_dma_seg_t* odp_dma_transfer_param_t::dst_seg

Table of destination segments.

The table has 'num_dst' entries. Data format is defined by 'dst_format'.

Examples
odp_dma_perf.c, and odp_dmafwd.c.

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

◆ dst_seg_pool

odp_pool_t odp_dma_transfer_param_t::dst_seg_pool

Destination segment pool.

When odp_dma_transfer_param_t::dst_alloc is set, provide the pool details from which the buffers need to be allocated.

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

◆ seg_free

uint16_t odp_dma_transfer_param_t::seg_free

Allow freeing all the source segments.

When set to 1, the implementation frees all source segments with data format ODP_DMA_FORMAT_PACKET after successful transfers.

Segments are freed regardless of packet free options (odp_packet_free_ctrl_t).

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

◆ unique_src_segs

uint16_t odp_dma_transfer_param_t::unique_src_segs

Option bit to denote a source segment of data format ODP_DMA_FORMAT_PACKET have unique packets or not.

Set to 1, when every source segment is a unique packet.

Set to 0, when the same packet is reused across the source segment descriptors.

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

◆ single_pool

uint16_t odp_dma_transfer_param_t::single_pool

Allow freeing all source segments to a single pool.

When set to 1, all source segments with data format ODP_DMA_FORMAT_PACKET are freed to a single pool.

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

◆ seg_alloc

uint16_t odp_dma_transfer_param_t::seg_alloc

Allow allocating the destination segments for data format ODP_DMA_FORMAT_PACKET.

When set to 1, destination segments will be allocated from 'dst_seg_pool'

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

◆ unique_dst_segs

uint16_t odp_dma_transfer_param_t::unique_dst_segs

Option bit to allocate unique destination segments for data format ODP_DMA_FORMAT_PACKET.

Set to 1 to allocate unique destination segment for every packet in to-be-allocated packet array (odp_dma_result_t::dst_pkt).

Set to 0 to allocate and use single destination packet for multiple segment descriptors. pkt_index (odp_dma_seg_t::pkt_index) field can be used to index in odp_dma_result_t::dst_pkt packet array.

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

◆ all_opts

uint16_t odp_dma_transfer_param_t::all_opts

Entire bit field structure.

This can be used to set or clear all bits, or to carry out bitwise operations on those.

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

◆ 

union { ... }

Transfer options.

Options to further configure the transfer. The default value for all option bits is zero.


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