17 #include <sys/types.h> 21 #include <sys/ioctl.h> 26 #include <vpp/app/version.h> 64 f64 delay = 1e-6 * us;
76 rte_delay_us_block (us);
114 if ((fd = open (
"/dev/vfio/vfio", O_RDWR)) == -1)
117 if (ioctl (fd, VFIO_GET_API_VERSION) != VFIO_API_VERSION)
121 if (ioctl (fd, VFIO_CHECK_EXTENSION, VFIO_TYPE1_IOMMU) != 1)
150 .version = VPP_BUILD_VER,
151 .description =
"Data Plane Development Kit (DPDK)",
152 .early_init =
"dpdk_early_init",
#define CLIB_MEM_VM_F_HUGETLB
vlib_node_runtime_t node_runtime
vnet_main_t * vnet_get_main(void)
clib_error_t * dpdk_early_init(vlib_main_t *vm)
static clib_error_t * dpdk_main_init(vlib_main_t *vm)
void * addr
Pointer to allocated memory, set on successful allocation.
static uword min_log2(uword x)
static uword vlib_process_suspend(vlib_main_t *vm, f64 dt)
Suspend a vlib cooperative multi-tasking thread for a period of time.
clib_error_t * clib_mem_vm_ext_alloc(clib_mem_vm_alloc_t *a)
vlib_node_function_t * function
Node function to call.
#define VLIB_INIT_FUNCTION(x)
#define clib_error_return(e, args...)
uword size
Allocation size, set by caller.
#define vlib_call_init_function(vm, x)
#define VLIB_PROCESS_IS_RUNNING
static clib_error_t * dpdk_init(vlib_main_t *vm)
static void rte_delay_us_override_cb(unsigned us)
#define CLIB_MEM_VM_F_SHARED
static_always_inline uword vlib_get_thread_index(void)
static vlib_process_t * vlib_get_current_process(vlib_main_t *vm)
#define vec_free(V)
Free vector's memory (no header).
u32 flags
vm allocation flags: CLIB_MEM_VM_F_SHARED: request shared memory, file descriptor will be provided ...
#define CLIB_MEM_VM_F_HUGETLB_PREALLOC
static int rte_delay_us_override(unsigned us)
uword admin_up_down_process(vlib_main_t *vm, vlib_node_runtime_t *rt, vlib_frame_t *f)
static vlib_main_t * vlib_get_main(void)
static void clib_mem_vm_free(void *addr, uword size)
u64 * clib_mem_vm_get_paddr(void *mem, int log2_page_size, int n_pages)
#define clib_error_free(e)
static uword vlib_in_process_context(vlib_main_t *vm)