NVIDIA DOCA SDK Data Center on a Chip Framework Documentation
dma_common.h File Reference
#include <unistd.h>
#include <stdbool.h>
#include <doca_dma.h>
#include <doca_error.h>
#include "common.h"
Include dependency graph for dma_common.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  dma_config
 
struct  dma_resources
 

Macros

#define MAX_USER_ARG_SIZE   256 /* Maximum size of user input argument */
 
#define MAX_ARG_SIZE   (MAX_USER_ARG_SIZE + 1) /* Maximum size of input argument */
 
#define MAX_USER_TXT_SIZE   4096 /* Maximum size of user input text */
 
#define MAX_TXT_SIZE   (MAX_USER_TXT_SIZE + 1) /* Maximum size of input text */
 
#define PAGE_SIZE   sysconf(_SC_PAGESIZE) /* Page size */
 
#define NUM_DMA_TASKS   (1) /* DMA tasks number */
 

Functions

doca_error_t register_dma_params (bool is_remote)
 
doca_error_t allocate_dma_resources (const char *pcie_addr, int num_buf, struct dma_resources *resources)
 
doca_error_t destroy_dma_resources (struct dma_resources *resources)
 
doca_error_t allocate_dma_host_resources (const char *pcie_addr, struct program_core_objects *state)
 
doca_error_t destroy_dma_host_resources (struct program_core_objects *state)
 
doca_error_t dma_task_is_supported (struct doca_devinfo *devinfo)
 

Macro Definition Documentation

◆ MAX_ARG_SIZE

#define MAX_ARG_SIZE   (MAX_USER_ARG_SIZE + 1) /* Maximum size of input argument */

Definition at line 38 of file dma_common.h.

◆ MAX_TXT_SIZE

#define MAX_TXT_SIZE   (MAX_USER_TXT_SIZE + 1) /* Maximum size of input text */

Definition at line 40 of file dma_common.h.

◆ MAX_USER_ARG_SIZE

#define MAX_USER_ARG_SIZE   256 /* Maximum size of user input argument */

Definition at line 37 of file dma_common.h.

◆ MAX_USER_TXT_SIZE

#define MAX_USER_TXT_SIZE   4096 /* Maximum size of user input text */

Definition at line 39 of file dma_common.h.

◆ NUM_DMA_TASKS

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

Definition at line 42 of file dma_common.h.

◆ PAGE_SIZE

#define PAGE_SIZE   sysconf(_SC_PAGESIZE) /* Page size */

Definition at line 41 of file dma_common.h.

Function Documentation

◆ allocate_dma_host_resources()

doca_error_t allocate_dma_host_resources ( const char *  pcie_addr,
struct program_core_objects state 
)

Definition at line 536 of file dma_common.c.

◆ allocate_dma_resources()

doca_error_t allocate_dma_resources ( const char *  pcie_addr,
int  num_buf,
struct dma_resources resources 
)

Definition at line 427 of file dma_common.c.

◆ destroy_dma_host_resources()

doca_error_t destroy_dma_host_resources ( struct program_core_objects state)

Definition at line 576 of file dma_common.c.

◆ destroy_dma_resources()

doca_error_t destroy_dma_resources ( struct dma_resources resources)

Definition at line 513 of file dma_common.c.

◆ dma_task_is_supported()

doca_error_t dma_task_is_supported ( struct doca_devinfo *  devinfo)

Definition at line 593 of file dma_common.c.

◆ register_dma_params()

doca_error_t register_dma_params ( bool  is_remote)

Definition at line 204 of file dma_common.c.