NVIDIA DOCA SDK Data Center on a Chip Framework Documentation
gpunetio_common.h File Reference
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
#include <cuda.h>
#include <cuda_runtime.h>
#include <doca_error.h>
#include <doca_dev.h>
#include <doca_mmap.h>
#include <doca_gpunetio.h>
#include <doca_eth_txq.h>
#include <doca_buf_array.h>
#include "common.h"
Include dependency graph for gpunetio_common.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  sample_send_wait_cfg
 
struct  tx_buf
 
struct  txq_queue
 
struct  ether_hdr
 

Macros

#define GPU_PAGE_SIZE   (1UL << 16)
 
#define WARP_SIZE   32
 
#define NUM_BURST_SEND   8
 
#define NUM_PACKETS_X_BURST   WARP_SIZE
 
#define PACKET_SIZE   1024
 
#define DELTA_NS   50000000 /* 50ms of delta before sending the first burst */
 
#define ETHER_ADDR_LEN   6
 
#define MAX_SQ_DESCR_NUM   8192
 

Functions

struct ether_hdr __attribute__ ((__packed__))
 
doca_error_t gpunetio_send_wait_time (struct sample_send_wait_cfg *sample_cfg)
 
doca_error_t kernel_send_wait_on_time (cudaStream_t stream, struct txq_queue *txq, uint64_t *intervals_gpu)
 

Variables

uint8_t d_addr_bytes [ETHER_ADDR_LEN]
 
uint8_t s_addr_bytes [ETHER_ADDR_LEN]
 
uint16_t ether_type
 

Macro Definition Documentation

◆ DELTA_NS

#define DELTA_NS   50000000 /* 50ms of delta before sending the first burst */

Definition at line 52 of file gpunetio_common.h.

◆ ETHER_ADDR_LEN

#define ETHER_ADDR_LEN   6

Definition at line 53 of file gpunetio_common.h.

◆ GPU_PAGE_SIZE

#define GPU_PAGE_SIZE   (1UL << 16)

Definition at line 47 of file gpunetio_common.h.

◆ MAX_SQ_DESCR_NUM

#define MAX_SQ_DESCR_NUM   8192

Definition at line 54 of file gpunetio_common.h.

◆ NUM_BURST_SEND

#define NUM_BURST_SEND   8

Definition at line 49 of file gpunetio_common.h.

◆ NUM_PACKETS_X_BURST

#define NUM_PACKETS_X_BURST   WARP_SIZE

Definition at line 50 of file gpunetio_common.h.

◆ PACKET_SIZE

#define PACKET_SIZE   1024

Definition at line 51 of file gpunetio_common.h.

◆ WARP_SIZE

#define WARP_SIZE   32

Definition at line 48 of file gpunetio_common.h.

Function Documentation

◆ gpunetio_send_wait_time()

doca_error_t gpunetio_send_wait_time ( struct sample_send_wait_cfg sample_cfg)

Definition at line 531 of file gpunetio_send_wait_time_sample.c.

◆ kernel_send_wait_on_time()

doca_error_t kernel_send_wait_on_time ( cudaStream_t  stream,
struct txq_queue txq,
uint64_t *  intervals_gpu 
)

Variable Documentation

◆ d_addr_bytes

uint8_t d_addr_bytes[ETHER_ADDR_LEN]

Definition at line 0 of file gpunetio_common.h.

◆ ether_type

uint16_t ether_type

Definition at line 2 of file gpunetio_common.h.

◆ s_addr_bytes

uint8_t s_addr_bytes[ETHER_ADDR_LEN]

Definition at line 1 of file gpunetio_common.h.