|
Data Accelerator Offload
|
#include <rte_eal.h>#include <rte_dmadev.h>#include <rte_lcore.h>#include <rte_vect.h>#include <dao_config.h>#include "dao_log.h"Go to the source code of this file.
Data Structures | |
| struct | dao_dma_cmpl_mdata |
| struct | dao_dma_vchan_state |
| struct | dao_dma_vchan_info |
| struct | dao_dma_vchan_stats |
| struct | dao_dma_stats |
Macros | |
| #define | DAO_DMA_MAX_POINTER 15u |
| #define | DAO_DMA_MAX_META_POINTER 48 |
| #define | DAO_DMA_MAX_POINTER_THR_DFLT 8u |
| #define | DAO_DMA_MAX_VCHAN_PER_LCORE 64 |
| #define | DAO_DMA_MAX_INFLIGHT_MDATA 4096 |
Functions | |
| RTE_DECLARE_PER_LCORE (struct dao_dma_vchan_info *, dao_dma_vchan_info) | |
| int | dao_dma_flush_submit (void) |
| int | dao_dma_flush_submit_v2 (void) |
| int | dao_dma_stats_get (uint16_t lcore_id, struct dao_dma_stats *stats) |
| int | dao_dma_lcore_dev2mem_set (int16_t dma_devid, uint16_t nb_vchans, uint16_t flush_thr) |
| int | dao_dma_lcore_mem2dev_set (int16_t dma_devid, uint16_t nb_vchans, uint16_t flush_thr) |
| int | dao_dma_lcore_mem2dev_autofree_set (int16_t dma_devid, uint16_t vchan, bool enable) |
| int | dao_dma_ctrl_dev_set (int16_t dev2mem_id, int16_t mem2dev_id) |
| int16_t | dao_dma_ctrl_dev2mem (void) |
| int16_t | dao_dma_ctrl_mem2dev (void) |
| void | dao_dma_compl_wait (uint16_t vchan) |
| static __rte_always_inline int | dao_dma_has_stats_feature (void) |
| static __rte_always_inline bool | dao_dma_op_status (struct dao_dma_vchan_state *vchan, uint16_t op_idx) |
| static __rte_always_inline bool | dao_dma_flush (struct dao_dma_vchan_state *vchan, const uint8_t avail) |
| static __rte_always_inline uint16_t | dao_dma_src_avail (struct dao_dma_vchan_state *vchan) |
| static __rte_always_inline uint16_t | dao_dma_dst_avail (struct dao_dma_vchan_state *vchan) |
| static __rte_always_inline struct rte_dma_sge * | dao_dma_sge_src (struct dao_dma_vchan_state *vchan) |
| static __rte_always_inline struct rte_dma_sge * | dao_dma_sge_dst (struct dao_dma_vchan_state *vchan) |
| static __rte_always_inline void | dao_dma_enq_x1 (struct dao_dma_vchan_state *vchan, rte_iova_t src, uint32_t src_len, rte_iova_t dst, uint32_t dst_len) |
| static __rte_always_inline void | dao_dma_enq_dst_x1 (struct dao_dma_vchan_state *vchan, rte_iova_t dst, uint32_t dst_len) |
| static __rte_always_inline void | dao_dma_enq_src_x1 (struct dao_dma_vchan_state *vchan, rte_iova_t src, uint32_t src_len) |
| static __rte_always_inline uint16_t | dao_dma_enq_x4 (struct dao_dma_vchan_state *vchan, uint64x2_t *vsrc, uint64x2_t *vdst) |
| static __rte_always_inline void | dao_dma_check_compl (struct dao_dma_vchan_state *vchan) |
| static __rte_always_inline void | dao_dma_check_meta_compl (struct dao_dma_vchan_state *vchan, const int mem_order) |
| static __rte_always_inline void | dao_dma_update_cmpl_meta (struct dao_dma_vchan_state *vchan, uint16_t *ptr, uint16_t val, uint16_t *pend_ptr, uint16_t pend_val, uint16_t tail) |
| static __rte_always_inline void | dao_dma_check_meta_compl_v2 (struct dao_dma_vchan_state *vchan, const int mem_order) |
| static __rte_always_inline void | dao_dma_update_cmpl_meta_v2 (struct dao_dma_vchan_state *vchan, uint16_t *ptr, uint16_t val, uint16_t tail) |
DAO DMA helper
Definition in file dao_dma.h.
| #define DAO_DMA_MAX_META_POINTER 48 |
| #define DAO_DMA_MAX_POINTER_THR_DFLT 8u |
| #define DAO_DMA_MAX_VCHAN_PER_LCORE 64 |
| #define DAO_DMA_MAX_INFLIGHT_MDATA 4096 |
| RTE_DECLARE_PER_LCORE | ( | struct dao_dma_vchan_info * | , |
| dao_dma_vchan_info | |||
| ) |
DMA per lcore vchan info
| int dao_dma_flush_submit | ( | void | ) |
Flush DMA requests and submit ops
| int dao_dma_flush_submit_v2 | ( | void | ) |
Flush DMA requests and submit ops version 2
| int dao_dma_stats_get | ( | uint16_t | lcore_id, |
| struct dao_dma_stats * | stats | ||
| ) |
Get DMA stats from DAO library
| lcore_id | Lcore to get stats from. |
| stats | Address to store stats. |
| int dao_dma_lcore_dev2mem_set | ( | int16_t | dma_devid, |
| uint16_t | nb_vchans, | ||
| uint16_t | flush_thr | ||
| ) |
Assign dev2mem dma device to an lcore.
| dma_devid | DMA device id to assign to lcore. |
| nb_vchans | Number of vchans available in DMA device |
| flush_thr | Flush threshold. |
| int dao_dma_lcore_mem2dev_set | ( | int16_t | dma_devid, |
| uint16_t | nb_vchans, | ||
| uint16_t | flush_thr | ||
| ) |
Assign mem2dev dma device to an lcore.
| dma_devid | DMA device id to assign to lcore. |
| nb_vchans | Number of vchans available in DMA device |
| flush_thr | Flush threshold. |
| int dao_dma_lcore_mem2dev_autofree_set | ( | int16_t | dma_devid, |
| uint16_t | vchan, | ||
| bool | enable | ||
| ) |
Enable or Disable auto free on a mem2dev dma device's vchan of a given lcore.
| dma_devid | DMA device id to assigned to the lcore. |
| vchan | mem2dev vchan of the dma device. |
| enable | Flag |
| int dao_dma_ctrl_dev_set | ( | int16_t | dev2mem_id, |
| int16_t | mem2dev_id | ||
| ) |
Assign a global DMA device id for control path.
| dev2mem_id | dev2mem dma device id. |
| mem2dev_id | mem2dev dma device id. |
| int16_t dao_dma_ctrl_dev2mem | ( | void | ) |
Get global DMA dev2mem device id.
| int16_t dao_dma_ctrl_mem2dev | ( | void | ) |
Get global DMA mem2dev device id.
| void dao_dma_compl_wait | ( | uint16_t | vchan | ) |
Check and wait for all DMA requests to complete
| vchan | Vchan ID |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |