API Reference Manual  1.45.0
odp_dma_seg_t Struct Reference

DMA segment. More...

#include <dma_types.h>

Collaboration diagram for odp_dma_seg_t:
[legend]

Data Fields

union {
   void *   addr
 Segment start address in memory. More...
 
   odp_packet_t   packet
 Packet handle. More...
 
}; 
 Segment start address or packet handle.
 
uint32_t len
 Segment length in bytes. More...
 
uint32_t offset
 Segment start offset into the packet. More...
 
union {
   struct {
      uint16_t   full_lines: 1
 Allow full cache line access. More...
 
   } 
 Segment hints bit field.
 
   uint16_t   all_hints
 All bits of the bit field structure. More...
 
}; 
 Segment hints. More...
 

Detailed Description

DMA segment.

Examples
odp_dma_perf.c, and odp_dmafwd.c.

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

Field Documentation

◆ addr

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.

Examples
odp_dma_perf.c.

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

◆ packet

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.

Examples
odp_dma_perf.c, and odp_dmafwd.c.

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

◆ len

uint32_t odp_dma_seg_t::len

Segment length in bytes.

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'.

Examples
odp_dma_perf.c, and odp_dmafwd.c.

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

◆ offset

uint32_t odp_dma_seg_t::offset

Segment start offset into the packet.

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.

Examples
odp_dma_perf.c.

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

◆ full_lines

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 431 of file api/spec/dma_types.h.

◆ all_hints

uint16_t odp_dma_seg_t::all_hints

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 439 of file api/spec/dma_types.h.

◆ 

union { ... }

Segment hints.

Depending on the implementation, setting these hints may improve performance. Initialize all unused bits to zero.


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