17 #include <sys/types.h> 21 #include <sys/ioctl.h> 26 #include <vpp/app/version.h> 65 f64 delay = 1e-6 * us;
77 rte_delay_us_block (us);
117 if ((fd = open (
"/dev/vfio/vfio", O_RDWR)) == -1)
120 if (ioctl (fd, VFIO_GET_API_VERSION) != VFIO_API_VERSION)
124 if (ioctl (fd, VFIO_CHECK_EXTENSION, VFIO_TYPE1_IOMMU) != 1)
130 alloc.
name =
"dpdk_early_init";
154 .version = VPP_BUILD_VER,
155 .description =
"Data Plane Development Kit (DPDK)",
156 .early_init =
"dpdk_early_init",
void clib_mem_vm_ext_free(clib_mem_vm_alloc_t *a)
#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)
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)
#define VLIB_INIT_FUNCTION(x)
char * name
Name for memory allocation, set by caller.
#define clib_error_return(e, args...)
uword size
Allocation size, set by caller.
vlib_node_registration_t admin_up_down_process_node
(constructor) VLIB_REGISTER_NODE (admin_up_down_process_node)
#define VLIB_PROCESS_IS_RUNNING
static void rte_delay_us_override_cb(unsigned us)
#define CLIB_MEM_VM_F_SHARED
u32 node_index
Node index.
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)
static vlib_main_t * vlib_get_main(void)
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)