API Reference Manual 1.51.0
Loading...
Searching...
No Matches
api/spec/dma_types.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright (c) 2021-2023 Nokia
3 */
4
11#ifndef ODP_API_SPEC_DMA_TYPES_H_
12#define ODP_API_SPEC_DMA_TYPES_H_
13#include <odp/visibility_begin.h>
14
15#include <odp/api/event_types.h>
17#include <odp/api/queue_types.h>
18#include <odp/api/std_types.h>
19
20#ifdef __cplusplus
21extern "C" {
22#endif
23
94
98typedef struct odp_dma_pool_param_t {
102 uint32_t num;
103
109 uint32_t uarea_size;
110
112 struct {
116 void (*init_fn)(void *uarea, uint32_t size, void *args, uint32_t index);
117
120 void *args;
121
123
130 uint32_t cache_size;
131
133
134#ifdef __cplusplus
135}
136#endif
137
138/* Includes pool_types.h, which depends on odp_dma_pool_param_t. */
139#include <odp/api/pool_types.h>
140
141#ifdef __cplusplus
142extern "C" {
143#endif
144
153typedef uint32_t odp_dma_direction_t;
154
156#define ODP_DMA_MAIN_TO_MAIN 0x1u
157
165typedef uint32_t odp_dma_transfer_type_t;
166
176#define ODP_DMA_TYPE_COPY 0x1u
177
189typedef uint32_t odp_dma_compl_mode_t;
190
198#define ODP_DMA_COMPL_NONE 0x1u
199
205#define ODP_DMA_COMPL_SYNC 0x2u
206
212#define ODP_DMA_COMPL_EVENT 0x4u
213
219#define ODP_DMA_COMPL_POLL 0x8u
220
232
268
289
362
402
406typedef struct odp_dma_seg_t {
408 union {
414 void *addr;
415
421
423 struct {
440
451 };
452 };
453
461
469
474 struct {
475 union {
480 struct {
488
496
503 };
504
511 struct {
513 struct {
521
528 } l3;
531
533
554
560
565 uint32_t num_src;
566
571 uint32_t num_dst;
572
578
584
591
597 union {
599 struct {
608 uint16_t seg_free : 1;
609
618 uint16_t unique_src_segs : 1;
619
625 uint16_t single_pool : 1;
626
633 uint16_t seg_alloc : 1;
634
645 uint16_t unique_dst_segs : 1;
647
653 uint16_t all_opts;
654 };
655
657
708
744
749#ifdef __cplusplus
750}
751#endif
752
753#include <odp/visibility_end.h>
754#endif
ODP event API type definitions.
ODP packet.
ODP pool.
ODP queue.
Standard C language types and definitions for ODP.
uint32_t odp_dma_compl_mode_t
DMA transfer completion mode.
uint32_t odp_dma_transfer_type_t
DMA transfer type.
odp_dma_mt_mode_t
DMA transfer multi-thread safeness.
odp_dma_data_format_t
DMA transfer data format.
uint32_t odp_dma_direction_t
DMA transfer direction.
uint64_t odp_dma_transfer_id_t
DMA transfer identifier.
odp_dma_transfer_order_t
DMA transfer ordering.
@ ODP_DMA_MT_SAFE
Multi-thread safe operation.
@ ODP_DMA_MT_SERIAL
Application serializes operations.
@ ODP_DMA_FORMAT_PACKET
Data format is odp_packet_t.
@ ODP_DMA_FORMAT_ADDR
Data format is raw memory address.
@ ODP_DMA_ORDER_ALL
Perform all transfers in order.
@ ODP_DMA_ORDER_COMPL
Report transfer completions in order.
@ ODP_DMA_ORDER_NONE
No specific ordering between transfers.
bool odp_bool_t
Boolean type.
uint32_t max_sessions
Maximum number of DMA sessions.
uint32_t max_transfers
Maximum number of transfers per DMA session.
odp_bool_t dst_seg_alloc
Destination segment allocation support for data format ODP_DMA_FORMAT_PACKET.
odp_dma_pool_capability_t pool
DMA completion event pool capabilities.
uint32_t max_segs
Maximum number of destination and source segments combined in a single transfer.
uint32_t max_dst_segs
Maximum number of destination segments in a single transfer.
uint32_t max_src_segs
Maximum number of source segments in a single transfer.
odp_bool_t queue_type_sched
Scheduled queue support.
odp_dma_compl_mode_t compl_mode_mask
Supported completion modes.
uint32_t max_seg_len
Maximum segment length in bytes.
odp_bool_t queue_type_plain
Plain queue support.
odp_bool_t src_seg_free
Source segment free support for data format ODP_DMA_FORMAT_PACKET.
DMA transfer completion parameters.
odp_dma_transfer_id_t transfer_id
Transfer identifier.
void * user_ptr
User context pointer.
odp_event_t event
Completion event.
odp_dma_compl_mode_t compl_mode
Completion mode.
odp_queue_t queue
Completion queue.
DMA session parameters.
odp_dma_compl_mode_t compl_mode_mask
Transfer completion modes.
odp_dma_direction_t direction
Transfer direction.
odp_dma_transfer_order_t order
Transfer ordering.
odp_dma_mt_mode_t mt_mode
Transfer operation multi-thread safeness.
odp_dma_transfer_type_t type
Transfer type.
DMA completion event pool capabilities.
odp_bool_t uarea_persistence
Pool user area persistence.
uint32_t min_cache_size
Minimum size of thread local cache.
uint32_t max_cache_size
Maximum size of thread local cache.
uint32_t max_uarea_size
Maximum user area size in bytes.
uint32_t max_pools
Maximum number of DMA completion event pools.
uint32_t max_num
Maximum number of DMA completion events in a pool.
DMA completion event pool parameters.
void * args
See uarea_init.args of odp_pool_param_t for details (odp_pool_param_t::args).
uint32_t cache_size
Maximum number of events cached locally per thread.
uint32_t uarea_size
User area size in bytes.
void(* init_fn)(void *uarea, uint32_t size, void *args, uint32_t index)
See uarea_init.init_fn of odp_pool_param_t for details (odp_pool_param_t::init_fn).
uint32_t num
Number of DMA completion events in the pool.
struct odp_dma_pool_param_t::@27 uarea_init
Parameters for user area initialization.
DMA transfer results.
void * user_ptr
User context pointer.
odp_packet_t * dst_pkt
Table of destination packets.
odp_bool_t success
DMA transfer success.
uint32_t num_dst
Number of destination packets.
struct odp_dma_seg_t::@30::@33::@36 bit
Segment hints bit field.
struct odp_dma_seg_t::@30::@35 cache_stash
Cache stashing hints.
odp_packet_t packet
Packet handle.
uint32_t len
Segment length in bytes.
uint32_t offset
Segment start offset into the packet.
void * addr
Segment start address in memory.
uint16_t all_bits
All bits of the bit field structure.
struct odp_dma_seg_t::@30 hints
Segment hints.
uint16_t cache_stash_l3
Enable L3 cache stashing.
struct odp_dma_seg_t::@30::@35::@37 l3
L3 cache stashing.
uint32_t pkt_index
Packet index.
uint32_t pkt_len
Packet length.
uint16_t full_lines
Allow full cache line access.
DMA transfer parameters.
struct odp_dma_transfer_param_t::@38::@40 opts
Option bit fields.
odp_dma_seg_t * dst_seg
Table of destination segments.
odp_dma_data_format_t dst_format
Destination data format.
uint16_t seg_free
Allow freeing all the source segments.
uint32_t num_dst
Number of destination segments.
uint16_t single_pool
Allow freeing all source segments to a single pool.
uint32_t num_src
Number of source segments.
uint16_t all_opts
Entire bit field structure.
odp_pool_t dst_seg_pool
Destination segment pool.
odp_dma_seg_t * src_seg
Table of source segments.
uint16_t unique_dst_segs
Option bit to allocate unique destination segments for data format ODP_DMA_FORMAT_PACKET.
odp_dma_data_format_t src_format
Source data format.
uint16_t seg_alloc
Allow allocating the destination segments for data format ODP_DMA_FORMAT_PACKET.
uint16_t unique_src_segs
Option bit to denote a source segment of data format ODP_DMA_FORMAT_PACKET have unique packets or not...