NVIDIA DOCA SDK Data Center on a Chip Framework Documentation
dma_copy_core.h File Reference
#include <stdbool.h>
#include <doca_argp.h>
#include <doca_dev.h>
#include <doca_error.h>
#include <doca_log.h>
#include <doca_pe.h>
#include "comch_utils.h"
Include dependency graph for dma_copy_core.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  comch_msg_dma_direction
 
struct  comch_msg_dma_export_discriptor
 
struct  comch_msg_dma_status
 
struct  comch_msg
 
struct  dma_copy_cfg
 
struct  dma_copy_resources
 

Macros

#define MAX_ARG_SIZE   128 /* PCI address and file path maximum length */
 
#define SERVER_NAME   "dma copy server" /* Comm Channel service name */
 
#define NUM_DMA_TASKS   (1) /* DMA tasks number */
 

Enumerations

enum  dma_copy_mode { DMA_COPY_MODE_HOST , DMA_COPY_MODE_DPU }
 
enum  comch_msg_type {
  COMCH_MSG_DIRECTION = 1 , COMCH_MSG_EXPORT_DESCRIPTOR = 2 , COMCH_MSG_STATUS = 3 , COMCH_MSG_TYPE_BIND_SQ_DB ,
  COMCH_MSG_TYPE_BIND_SQ_DB_DONE , COMCH_MSG_TYPE_UNBIND_SQ_DB , COMCH_MSG_TYPE_UNBIND_SQ_DB_DONE , COMCH_MSG_TYPE_RAISE_MSIX ,
  COMCH_MSG_TYPE_HOST_DB
}
 
enum  dma_comch_state { COMCH_NEGOTIATING , COMCH_COMPLETE , COMCH_ERROR }
 

Functions

doca_error_t register_dma_copy_params (void)
 
doca_error_t open_dma_device (struct doca_dev **dev)
 
doca_error_t host_start_dma_copy (struct dma_copy_cfg *dma_cfg, struct comch_cfg *comch_cfg)
 
doca_error_t dpu_start_dma_copy (struct dma_copy_cfg *dma_cfg, struct comch_cfg *comch_cfg)
 
void host_recv_event_cb (struct doca_comch_event_msg_recv *event, uint8_t *recv_buffer, uint32_t msg_len, struct doca_comch_connection *comch_connection)
 
void dpu_recv_event_cb (struct doca_comch_event_msg_recv *event, uint8_t *recv_buffer, uint32_t msg_len, struct doca_comch_connection *comch_connection)
 

Macro Definition Documentation

◆ MAX_ARG_SIZE

#define MAX_ARG_SIZE   128 /* PCI address and file path maximum length */

Definition at line 39 of file dma_copy_core.h.

◆ NUM_DMA_TASKS

#define NUM_DMA_TASKS   (1) /* DMA tasks number */

Definition at line 41 of file dma_copy_core.h.

◆ SERVER_NAME

#define SERVER_NAME   "dma copy server" /* Comm Channel service name */

Definition at line 40 of file dma_copy_core.h.

Enumeration Type Documentation

◆ comch_msg_type

Enumerator
COMCH_MSG_DIRECTION 
COMCH_MSG_EXPORT_DESCRIPTOR 
COMCH_MSG_STATUS 
COMCH_MSG_TYPE_BIND_SQ_DB 
COMCH_MSG_TYPE_BIND_SQ_DB_DONE 
COMCH_MSG_TYPE_UNBIND_SQ_DB 
COMCH_MSG_TYPE_UNBIND_SQ_DB_DONE 
COMCH_MSG_TYPE_RAISE_MSIX 
COMCH_MSG_TYPE_HOST_DB 

Definition at line 48 of file dma_copy_core.h.

◆ dma_comch_state

Enumerator
COMCH_NEGOTIATING 
COMCH_COMPLETE 
COMCH_ERROR 

Definition at line 81 of file dma_copy_core.h.

◆ dma_copy_mode

Enumerator
DMA_COPY_MODE_HOST 
DMA_COPY_MODE_DPU 

Definition at line 43 of file dma_copy_core.h.

Function Documentation

◆ dpu_recv_event_cb()

void dpu_recv_event_cb ( struct doca_comch_event_msg_recv *  event,
uint8_t *  recv_buffer,
uint32_t  msg_len,
struct doca_comch_connection *  comch_connection 
)

Definition at line 1018 of file dma_copy_core.c.

◆ dpu_start_dma_copy()

doca_error_t dpu_start_dma_copy ( struct dma_copy_cfg dma_cfg,
struct comch_cfg comch_cfg 
)

Definition at line 1116 of file dma_copy_core.c.

◆ host_recv_event_cb()

void host_recv_event_cb ( struct doca_comch_event_msg_recv *  event,
uint8_t *  recv_buffer,
uint32_t  msg_len,
struct doca_comch_connection *  comch_connection 
)

Definition at line 735 of file dma_copy_core.c.

◆ host_start_dma_copy()

doca_error_t host_start_dma_copy ( struct dma_copy_cfg dma_cfg,
struct comch_cfg comch_cfg 
)

Definition at line 840 of file dma_copy_core.c.

◆ open_dma_device()

doca_error_t open_dma_device ( struct doca_dev **  dev)

Definition at line 497 of file dma_copy_core.c.

◆ register_dma_copy_params()

doca_error_t register_dma_copy_params ( void  )

Definition at line 420 of file dma_copy_core.c.