NVIDIA DOCA SDK Data Center on a Chip Framework Documentation
dma_local_copy_sample.c File Reference
#include <stdint.h>
#include <string.h>
#include <time.h>
#include <doca_buf.h>
#include <doca_buf_inventory.h>
#include <doca_ctx.h>
#include <doca_dma.h>
#include <doca_error.h>
#include <doca_log.h>
#include <doca_mmap.h>
#include <doca_pe.h>
#include "dma_common.h"
Include dependency graph for dma_local_copy_sample.c:

Go to the source code of this file.

Macros

#define SLEEP_IN_NANOS   (10 * 1000) /* Sample the task every 10 microseconds */
 

Functions

 DOCA_LOG_REGISTER (DPU_LOCAL_DMA_COPY)
 
static doca_error_t memory_ranges_overlap (const char *dst_buffer, const char *src_buffer, size_t length)
 
static doca_error_t register_memory_range_and_start_mmap (struct doca_mmap *mmap, char *buffer, size_t length)
 
doca_error_t dma_local_copy (const char *pcie_addr, char *dst_buffer, char *src_buffer, size_t length, int num_src_buf, int num_dst_buf)
 

Macro Definition Documentation

◆ SLEEP_IN_NANOS

#define SLEEP_IN_NANOS   (10 * 1000) /* Sample the task every 10 microseconds */

Definition at line 43 of file dma_local_copy_sample.c.

Function Documentation

◆ dma_local_copy()

doca_error_t dma_local_copy ( const char *  pcie_addr,
char *  dst_buffer,
char *  src_buffer,
size_t  length,
int  num_src_buf,
int  num_dst_buf 
)

Definition at line 96 of file dma_local_copy_sample.c.

◆ DOCA_LOG_REGISTER()

DOCA_LOG_REGISTER ( DPU_LOCAL_DMA_COPY  )

◆ memory_ranges_overlap()

static doca_error_t memory_ranges_overlap ( const char *  dst_buffer,
const char *  src_buffer,
size_t  length 
)
static

Definition at line 53 of file dma_local_copy_sample.c.

◆ register_memory_range_and_start_mmap()

static doca_error_t register_memory_range_and_start_mmap ( struct doca_mmap *  mmap,
char *  buffer,
size_t  length 
)
static

Definition at line 74 of file dma_local_copy_sample.c.