API Reference Manual
1.48.0
|
DMA segment. More...
#include <dma_types.h>
Data Fields | |
union { | |
void * addr | |
Segment start address in memory. More... | |
odp_packet_t packet | |
Packet handle. More... | |
struct { | |
uint32_t pkt_index | |
Packet index. More... | |
uint32_t pkt_len | |
Packet length. More... | |
} | |
Packet index configuration. | |
}; | |
Segment start address or packet handle. | |
uint32_t | len |
Segment length in bytes. More... | |
uint32_t | offset |
Segment start offset into the packet. More... | |
struct { | |
union { | |
struct { | |
uint16_t full_lines: 1 | |
Allow full cache line access. More... | |
uint16_t cache_stash_l3: 1 | |
Enable L3 cache stashing. More... | |
} bit | |
Segment hints bit field. More... | |
uint16_t all_bits | |
All bits of the bit field structure. More... | |
} | |
struct { | |
struct { | |
uint32_t offset | |
Byte offset into the segment data to start caching from. More... | |
uint32_t len | |
Length in bytes to cache. More... | |
} l3 | |
L3 cache stashing. | |
} cache_stash | |
Cache stashing hints. More... | |
} | hints |
Segment hints. More... | |
DMA segment.
Definition at line 406 of file api/spec/dma_types.h.
void* odp_dma_seg_t::addr |
Segment start address in memory.
Defines segment start when data format is ODP_DMA_FORMAT_ADDR. Ignored with other data formats.
Definition at line 414 of file api/spec/dma_types.h.
odp_packet_t odp_dma_seg_t::packet |
Packet handle.
Defines the packet when data format is ODP_DMA_FORMAT_PACKET. Ignored with other data formats.
Definition at line 420 of file api/spec/dma_types.h.
uint32_t odp_dma_seg_t::pkt_index |
Packet index.
When odp_dma_transfer_param_t::seg_alloc is used, implementation allocates all required destination packets and this pkt_index field can be used to define which packet of the to-be-allocated array of packets is used as the destination for this particular destination segment descriptor. Same pkt_index can be reused across subsequent segments if application wishes to transfer to different offsets of the same destination packet. This means that if application for example uses packet index 0 in each destination segment descriptor (with different 'offset' values), implementation would allocate only a single packet with data being transferred to different offsets of that single destination packet. pkt_index should appear in ascending order, starting from index 0.
Definition at line 439 of file api/spec/dma_types.h.
uint32_t odp_dma_seg_t::pkt_len |
Packet length.
Length of the indexed to-be-allocated packet. In case of pkt_index reuse across segment descriptors, each new pkt_index should have a valid 'pkt_len' field set, other descriptor 'pkt_len' fields are ignored for the same pkt_index. 'pkt_len' of a pkt_index cannot be shorter than the total length of odp_dma_seg_t::len fields of the segment descriptors using this packet index.
Definition at line 450 of file api/spec/dma_types.h.
uint32_t odp_dma_seg_t::len |
Segment length in bytes.
Length in bytes to cache.
Defines segment length with all data formats. The maximum value is defined by max_seg_len capability. When data format is ODP_DMA_FORMAT_PACKET, the value must not exceed odp_packet_len() - 'offset'.
Depending on the implementation, this might be rounded up to a more suitable boundary.
Definition at line 460 of file api/spec/dma_types.h.
uint32_t odp_dma_seg_t::offset |
Segment start offset into the packet.
Byte offset into the segment data to start caching from.
Defines segment start within the packet data. The offset is calculated from odp_packet_data() position, and the value must not exceed odp_packet_len(). Ignored when data format is other than ODP_DMA_FORMAT_PACKET.
Depending on the implementation, this might be rounded down to a more suitable boundary. In case of ODP_DMA_FORMAT_PACKET, offset is in addition to the packet data starting offset.
Definition at line 468 of file api/spec/dma_types.h.
uint16_t odp_dma_seg_t::full_lines |
Allow full cache line access.
When set to 1, data on the same cache line with the destination segment is allowed to be overwritten. This hint is ignored on source segments.
Definition at line 487 of file api/spec/dma_types.h.
uint16_t odp_dma_seg_t::cache_stash_l3 |
Enable L3 cache stashing.
When set to 1, enables potential cache stashing of destination segment data to L3 according to 'cache_stash'.
Definition at line 494 of file api/spec/dma_types.h.
struct { ... } odp_dma_seg_t::bit |
Segment hints bit field.
Initialize all unused bits to zero.
uint16_t odp_dma_seg_t::all_bits |
All bits of the bit field structure.
This can be used to set/clear all bits, or to perform bitwise operations on those.
Definition at line 502 of file api/spec/dma_types.h.
struct { ... } odp_dma_seg_t::cache_stash |
Cache stashing hints.
Applicable only to destination segments. Ignored for source segments. Hints implementation to bring specififed cache lines into cache as part of successful transfer completion.
struct { ... } odp_dma_seg_t::hints |
Segment hints.
Depending on the implementation, setting these hints may improve performance.