1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2010-2018 Intel Corporation.
3 * Copyright(c) 2014 6WIND S.A.
22 #include <sys/queue.h>
25 #include <rte_compat.h>
26 #include <rte_common.h>
27 #include <rte_debug.h>
28 #include <rte_memory.h>
29 #include <rte_launch.h>
31 #include <rte_eal_memconfig.h>
32 #include <rte_errno.h>
33 #include <rte_per_lcore.h>
34 #include <rte_lcore.h>
35 #include <rte_service_component.h>
37 #include <rte_random.h>
38 #include <rte_cycles.h>
39 #include <rte_string_fns.h>
40 #include <rte_cpuflags.h>
41 #include <rte_interrupts.h>
44 #include <rte_devargs.h>
45 #include <rte_version.h>
47 #include <rte_option.h>
48 #include <rte_atomic.h>
49 #include <malloc_heap.h>
51 #include "eal_private.h"
52 #include "eal_thread.h"
53 #include "eal_internal_cfg.h"
54 #include "eal_filesystem.h"
55 #include "eal_hugepages.h"
56 #include "eal_options.h"
58 #define MEMSIZE_IF_NO_HUGE_PAGE (64ULL * 1024ULL * 1024ULL)
60 /* Allow the application to print its usage message too if set */
61 static rte_usage_hook_t rte_application_usage_hook = NULL;
62 /* early configuration structure, when memory config is not mmapped */
63 static struct rte_mem_config early_mem_config;
65 /* define fd variable here, because file needs to be kept open for the
66 * duration of the program, as we hold a write lock on it in the primary proc */
67 static int mem_cfg_fd = -1;
69 static struct flock wr_lock = {
72 .l_start = offsetof(struct rte_mem_config, memsegs),
73 .l_len = sizeof(early_mem_config.memsegs),
76 /* Address of global and public configuration */
77 static struct rte_config rte_config = {
78 .mem_config = &early_mem_config,
81 /* internal configuration (per-core) */
82 struct lcore_config lcore_config[RTE_MAX_LCORE];
84 /* internal configuration */
85 struct internal_config internal_config;
87 /* used by rte_rdtsc() */
88 int rte_cycles_vmware_tsc_map;
90 /* platform-specific runtime dir */
91 static char runtime_dir[PATH_MAX];
93 static const char *default_runtime_dir = "/var/run";
96 eal_create_runtime_dir(void)
98 const char *directory = default_runtime_dir;
99 const char *xdg_runtime_dir = getenv("XDG_RUNTIME_DIR");
100 const char *fallback = "/tmp";
105 /* try XDG path first, fall back to /tmp */
106 if (xdg_runtime_dir != NULL)
107 directory = xdg_runtime_dir;
109 directory = fallback;
111 /* create DPDK subdirectory under runtime dir */
112 ret = snprintf(tmp, sizeof(tmp), "%s/dpdk", directory);
113 if (ret < 0 || ret == sizeof(tmp)) {
114 RTE_LOG(ERR, EAL, "Error creating DPDK runtime path name\n");
118 /* create prefix-specific subdirectory under DPDK runtime dir */
119 ret = snprintf(runtime_dir, sizeof(runtime_dir), "%s/%s",
120 tmp, eal_get_hugefile_prefix());
121 if (ret < 0 || ret == sizeof(runtime_dir)) {
122 RTE_LOG(ERR, EAL, "Error creating prefix-specific runtime path name\n");
126 /* create the path if it doesn't exist. no "mkdir -p" here, so do it
129 ret = mkdir(tmp, 0700);
130 if (ret < 0 && errno != EEXIST) {
131 RTE_LOG(ERR, EAL, "Error creating '%s': %s\n",
132 tmp, strerror(errno));
136 ret = mkdir(runtime_dir, 0700);
137 if (ret < 0 && errno != EEXIST) {
138 RTE_LOG(ERR, EAL, "Error creating '%s': %s\n",
139 runtime_dir, strerror(errno));
147 eal_clean_runtime_dir(void)
150 struct dirent *dirent;
151 int dir_fd, fd, lck_result;
152 static const char * const filters[] = {
158 dir = opendir(runtime_dir);
160 RTE_LOG(ERR, EAL, "Unable to open runtime directory %s\n",
166 /* lock the directory before doing anything, to avoid races */
167 if (flock(dir_fd, LOCK_EX) < 0) {
168 RTE_LOG(ERR, EAL, "Unable to lock runtime directory %s\n",
173 dirent = readdir(dir);
175 RTE_LOG(ERR, EAL, "Unable to read runtime directory %s\n",
180 while (dirent != NULL) {
184 /* skip files that don't match the patterns */
185 for (f_idx = 0; f_idx < RTE_DIM(filters); f_idx++) {
186 const char *filter = filters[f_idx];
188 if (fnmatch(filter, dirent->d_name, 0) == 0) {
194 dirent = readdir(dir);
198 /* try and lock the file */
199 fd = openat(dir_fd, dirent->d_name, O_RDONLY);
201 /* skip to next file */
203 dirent = readdir(dir);
207 /* non-blocking lock */
208 lck_result = flock(fd, LOCK_EX | LOCK_NB);
210 /* if lock succeeds, remove the file */
211 if (lck_result != -1)
212 unlinkat(dir_fd, dirent->d_name, 0);
214 dirent = readdir(dir);
217 /* closedir closes dir_fd and drops the lock */
225 RTE_LOG(ERR, EAL, "Error while clearing runtime dir: %s\n",
233 rte_eal_get_runtime_dir(void)
238 /* Return user provided mbuf pool ops name */
240 rte_eal_mbuf_user_pool_ops(void)
242 return internal_config.user_mbuf_pool_ops_name;
245 /* Return a pointer to the configuration structure */
247 rte_eal_get_configuration(void)
253 rte_eal_iova_mode(void)
255 return rte_eal_get_configuration()->iova_mode;
258 /* parse a sysfs (or other) file containing one integer value */
260 eal_parse_sysfs_value(const char *filename, unsigned long *val)
266 if ((f = fopen(filename, "r")) == NULL) {
267 RTE_LOG(ERR, EAL, "%s(): cannot open sysfs value %s\n",
272 if (fgets(buf, sizeof(buf), f) == NULL) {
273 RTE_LOG(ERR, EAL, "%s(): cannot read sysfs value %s\n",
278 *val = strtoul(buf, &end, 0);
279 if ((buf[0] == '\0') || (end == NULL) || (*end != '\n')) {
280 RTE_LOG(ERR, EAL, "%s(): cannot parse sysfs value %s\n",
290 /* create memory configuration in shared/mmap memory. Take out
291 * a write lock on the memsegs, so we can auto-detect primary/secondary.
292 * This means we never close the file while running (auto-close on exit).
293 * We also don't lock the whole file, so that in future we can use read-locks
294 * on other parts, e.g. memzones, to detect if there are running secondary
297 rte_eal_config_create(void)
299 void *rte_mem_cfg_addr;
302 const char *pathname = eal_runtime_config_path();
304 if (internal_config.no_shconf)
308 mem_cfg_fd = open(pathname, O_RDWR | O_CREAT, 0660);
310 rte_panic("Cannot open '%s' for rte_mem_config\n", pathname);
313 retval = ftruncate(mem_cfg_fd, sizeof(*rte_config.mem_config));
316 rte_panic("Cannot resize '%s' for rte_mem_config\n", pathname);
319 retval = fcntl(mem_cfg_fd, F_SETLK, &wr_lock);
322 rte_exit(EXIT_FAILURE, "Cannot create lock on '%s'. Is another primary "
323 "process running?\n", pathname);
326 rte_mem_cfg_addr = mmap(NULL, sizeof(*rte_config.mem_config),
327 PROT_READ | PROT_WRITE, MAP_SHARED, mem_cfg_fd, 0);
329 if (rte_mem_cfg_addr == MAP_FAILED){
330 rte_panic("Cannot mmap memory for rte_config\n");
332 memcpy(rte_mem_cfg_addr, &early_mem_config, sizeof(early_mem_config));
333 rte_config.mem_config = rte_mem_cfg_addr;
336 /* attach to an existing shared memory config */
338 rte_eal_config_attach(void)
340 void *rte_mem_cfg_addr;
341 const char *pathname = eal_runtime_config_path();
343 if (internal_config.no_shconf)
347 mem_cfg_fd = open(pathname, O_RDWR);
349 rte_panic("Cannot open '%s' for rte_mem_config\n", pathname);
352 rte_mem_cfg_addr = mmap(NULL, sizeof(*rte_config.mem_config),
353 PROT_READ | PROT_WRITE, MAP_SHARED, mem_cfg_fd, 0);
355 if (rte_mem_cfg_addr == MAP_FAILED)
356 rte_panic("Cannot mmap memory for rte_config\n");
358 rte_config.mem_config = rte_mem_cfg_addr;
361 /* Detect if we are a primary or a secondary process */
363 eal_proc_type_detect(void)
365 enum rte_proc_type_t ptype = RTE_PROC_PRIMARY;
366 const char *pathname = eal_runtime_config_path();
368 /* if there no shared config, there can be no secondary processes */
369 if (!internal_config.no_shconf) {
370 /* if we can open the file but not get a write-lock we are a
371 * secondary process. NOTE: if we get a file handle back, we
372 * keep that open and don't close it to prevent a race condition
373 * between multiple opens.
375 if (((mem_cfg_fd = open(pathname, O_RDWR)) >= 0) &&
376 (fcntl(mem_cfg_fd, F_SETLK, &wr_lock) < 0))
377 ptype = RTE_PROC_SECONDARY;
380 RTE_LOG(INFO, EAL, "Auto-detected process type: %s\n",
381 ptype == RTE_PROC_PRIMARY ? "PRIMARY" : "SECONDARY");
386 /* Sets up rte_config structure with the pointer to shared memory config.*/
388 rte_config_init(void)
390 rte_config.process_type = internal_config.process_type;
392 switch (rte_config.process_type){
393 case RTE_PROC_PRIMARY:
394 rte_eal_config_create();
396 case RTE_PROC_SECONDARY:
397 rte_eal_config_attach();
398 rte_eal_mcfg_wait_complete(rte_config.mem_config);
401 case RTE_PROC_INVALID:
402 rte_panic("Invalid process type\n");
408 eal_usage(const char *prgname)
410 printf("\nUsage: %s ", prgname);
412 /* Allow the application to print its usage message too if hook is set */
413 if ( rte_application_usage_hook ) {
414 printf("===== Application Usage =====\n\n");
415 rte_application_usage_hook(prgname);
419 /* Set a per-application usage message */
421 rte_set_application_usage_hook( rte_usage_hook_t usage_func )
423 rte_usage_hook_t old_func;
425 /* Will be NULL on the first call to denote the last usage routine. */
426 old_func = rte_application_usage_hook;
427 rte_application_usage_hook = usage_func;
433 eal_get_hugepage_mem_size(void)
438 for (i = 0; i < internal_config.num_hugepage_sizes; i++) {
439 struct hugepage_info *hpi = &internal_config.hugepage_info[i];
440 if (strnlen(hpi->hugedir, sizeof(hpi->hugedir)) != 0) {
441 for (j = 0; j < RTE_MAX_NUMA_NODES; j++) {
442 size += hpi->hugepage_sz * hpi->num_pages[j];
447 return (size < SIZE_MAX) ? (size_t)(size) : SIZE_MAX;
450 /* Parse the arguments for --log-level only */
452 eal_log_level_parse(int argc, char **argv)
457 const int old_optind = optind;
458 const int old_optopt = optopt;
459 const int old_optreset = optreset;
460 char * const old_optarg = optarg;
466 while ((opt = getopt_long(argc, argvopt, eal_short_options,
467 eal_long_options, &option_index)) != EOF) {
471 /* getopt is not happy, stop right now */
475 ret = (opt == OPT_LOG_LEVEL_NUM) ?
476 eal_parse_common_option(opt, optarg, &internal_config) : 0;
478 /* common parser is not happy */
483 /* restore getopt lib */
486 optreset = old_optreset;
490 /* Parse the argument given in the command line of the application */
492 eal_parse_args(int argc, char **argv)
497 char *prgname = argv[0];
498 const int old_optind = optind;
499 const int old_optopt = optopt;
500 const int old_optreset = optreset;
501 char * const old_optarg = optarg;
508 while ((opt = getopt_long(argc, argvopt, eal_short_options,
509 eal_long_options, &option_index)) != EOF) {
512 * getopt didn't recognise the option, lets parse the
513 * registered options to see if the flag is valid
516 ret = rte_option_parse(argv[optind-1]);
525 ret = eal_parse_common_option(opt, optarg, &internal_config);
526 /* common parser is not happy */
532 /* common parser handled this option */
537 case OPT_MBUF_POOL_OPS_NAME_NUM:
539 char *ops_name = strdup(optarg);
540 if (ops_name == NULL)
541 RTE_LOG(ERR, EAL, "Could not store mbuf pool ops name\n");
543 /* free old ops name */
544 if (internal_config.user_mbuf_pool_ops_name !=
546 free(internal_config.user_mbuf_pool_ops_name);
548 internal_config.user_mbuf_pool_ops_name =
557 if (opt < OPT_LONG_MIN_NUM && isprint(opt)) {
558 RTE_LOG(ERR, EAL, "Option %c is not supported "
559 "on FreeBSD\n", opt);
560 } else if (opt >= OPT_LONG_MIN_NUM &&
561 opt < OPT_LONG_MAX_NUM) {
562 RTE_LOG(ERR, EAL, "Option %s is not supported "
564 eal_long_options[option_index].name);
566 RTE_LOG(ERR, EAL, "Option %d is not supported "
567 "on FreeBSD\n", opt);
575 /* create runtime data directory */
576 if (internal_config.no_shconf == 0 &&
577 eal_create_runtime_dir() < 0) {
578 RTE_LOG(ERR, EAL, "Cannot create runtime directory\n");
583 if (eal_adjust_config(&internal_config) != 0) {
589 if (eal_check_common_options(&internal_config) != 0) {
596 argv[optind-1] = prgname;
600 /* restore getopt lib */
603 optreset = old_optreset;
610 check_socket(const struct rte_memseg_list *msl, void *arg)
612 int *socket_id = arg;
617 if (msl->socket_id == *socket_id && msl->memseg_arr.count != 0)
624 eal_check_mem_on_local_socket(void)
628 socket_id = rte_lcore_to_socket_id(rte_config.master_lcore);
630 if (rte_memseg_list_walk(check_socket, &socket_id) == 0)
631 RTE_LOG(WARNING, EAL, "WARNING: Master core has no memory on local socket!\n");
636 sync_func(__attribute__((unused)) void *arg)
642 rte_eal_mcfg_complete(void)
644 /* ALL shared mem_config related INIT DONE */
645 if (rte_config.process_type == RTE_PROC_PRIMARY)
646 rte_config.mem_config->magic = RTE_MAGIC;
649 /* return non-zero if hugepages are enabled. */
650 int rte_eal_has_hugepages(void)
652 return !internal_config.no_hugetlbfs;
655 /* Abstraction for port I/0 privilege */
657 rte_eal_iopl_init(void)
662 fd = open("/dev/io", O_RDWR);
666 /* keep fd open for iopl */
670 static void rte_eal_init_alert(const char *msg)
672 fprintf(stderr, "EAL: FATAL: %s\n", msg);
673 RTE_LOG(ERR, EAL, "%s\n", msg);
676 /* Launch threads, called at application init(). */
678 rte_eal_init(int argc, char **argv)
682 static rte_atomic32_t run_once = RTE_ATOMIC32_INIT(0);
683 char cpuset[RTE_CPU_AFFINITY_STR_LEN];
684 char thread_name[RTE_MAX_THREAD_NAME_LEN];
686 /* checks if the machine is adequate */
687 if (!rte_cpu_is_supported()) {
688 rte_eal_init_alert("unsupported cpu type.");
693 if (!rte_atomic32_test_and_set(&run_once)) {
694 rte_eal_init_alert("already called initialization.");
695 rte_errno = EALREADY;
699 thread_id = pthread_self();
701 eal_reset_internal_config(&internal_config);
703 /* set log level as early as possible */
704 eal_log_level_parse(argc, argv);
706 if (rte_eal_cpu_init() < 0) {
707 rte_eal_init_alert("Cannot detect lcores.");
712 fctret = eal_parse_args(argc, argv);
714 rte_eal_init_alert("Invalid 'command line' arguments.");
716 rte_atomic32_clear(&run_once);
720 /* FreeBSD always uses legacy memory model */
721 internal_config.legacy_mem = true;
723 if (eal_plugins_init() < 0) {
724 rte_eal_init_alert("Cannot init plugins");
726 rte_atomic32_clear(&run_once);
730 if (eal_option_device_parse()) {
732 rte_atomic32_clear(&run_once);
738 if (rte_eal_intr_init() < 0) {
739 rte_eal_init_alert("Cannot init interrupt-handling thread");
743 /* Put mp channel init before bus scan so that we can init the vdev
744 * bus through mp channel in the secondary process before the bus scan.
746 if (rte_mp_channel_init() < 0) {
747 rte_eal_init_alert("failed to init mp channel");
748 if (rte_eal_process_type() == RTE_PROC_PRIMARY) {
754 if (rte_bus_scan()) {
755 rte_eal_init_alert("Cannot scan the buses for devices");
757 rte_atomic32_clear(&run_once);
761 /* if no EAL option "--iova-mode=<pa|va>", use bus IOVA scheme */
762 if (internal_config.iova_mode == RTE_IOVA_DC) {
763 /* autodetect the IOVA mapping mode (default is RTE_IOVA_PA) */
764 rte_eal_get_configuration()->iova_mode =
765 rte_bus_get_iommu_class();
767 rte_eal_get_configuration()->iova_mode =
768 internal_config.iova_mode;
771 if (internal_config.no_hugetlbfs == 0) {
772 /* rte_config isn't initialized yet */
773 ret = internal_config.process_type == RTE_PROC_PRIMARY ?
774 eal_hugepage_info_init() :
775 eal_hugepage_info_read();
777 rte_eal_init_alert("Cannot get hugepage information.");
779 rte_atomic32_clear(&run_once);
784 if (internal_config.memory == 0 && internal_config.force_sockets == 0) {
785 if (internal_config.no_hugetlbfs)
786 internal_config.memory = MEMSIZE_IF_NO_HUGE_PAGE;
788 internal_config.memory = eal_get_hugepage_mem_size();
791 if (internal_config.vmware_tsc_map == 1) {
792 #ifdef RTE_LIBRTE_EAL_VMWARE_TSC_MAP_SUPPORT
793 rte_cycles_vmware_tsc_map = 1;
794 RTE_LOG (DEBUG, EAL, "Using VMWARE TSC MAP, "
795 "you must have monitor_control.pseudo_perfctr = TRUE\n");
797 RTE_LOG (WARNING, EAL, "Ignoring --vmware-tsc-map because "
798 "RTE_LIBRTE_EAL_VMWARE_TSC_MAP_SUPPORT is not set\n");
802 rte_srand(rte_rdtsc());
804 /* in secondary processes, memory init may allocate additional fbarrays
805 * not present in primary processes, so to avoid any potential issues,
806 * initialize memzones first.
808 if (rte_eal_memzone_init() < 0) {
809 rte_eal_init_alert("Cannot init memzone");
814 if (rte_eal_memory_init() < 0) {
815 rte_eal_init_alert("Cannot init memory");
820 if (rte_eal_malloc_heap_init() < 0) {
821 rte_eal_init_alert("Cannot init malloc heap");
826 if (rte_eal_tailqs_init() < 0) {
827 rte_eal_init_alert("Cannot init tail queues for objects");
832 if (rte_eal_alarm_init() < 0) {
833 rte_eal_init_alert("Cannot init interrupt-handling thread");
834 /* rte_eal_alarm_init sets rte_errno on failure. */
838 if (rte_eal_timer_init() < 0) {
839 rte_eal_init_alert("Cannot init HPET or TSC timers");
844 eal_check_mem_on_local_socket();
846 eal_thread_init_master(rte_config.master_lcore);
848 ret = eal_thread_dump_affinity(cpuset, sizeof(cpuset));
850 RTE_LOG(DEBUG, EAL, "Master lcore %u is ready (tid=%p;cpuset=[%s%s])\n",
851 rte_config.master_lcore, thread_id, cpuset,
852 ret == 0 ? "" : "...");
854 RTE_LCORE_FOREACH_SLAVE(i) {
857 * create communication pipes between master thread
860 if (pipe(lcore_config[i].pipe_master2slave) < 0)
861 rte_panic("Cannot create pipe\n");
862 if (pipe(lcore_config[i].pipe_slave2master) < 0)
863 rte_panic("Cannot create pipe\n");
865 lcore_config[i].state = WAIT;
867 /* create a thread for each lcore */
868 ret = pthread_create(&lcore_config[i].thread_id, NULL,
869 eal_thread_loop, NULL);
871 rte_panic("Cannot create thread\n");
873 /* Set thread_name for aid in debugging. */
874 snprintf(thread_name, sizeof(thread_name),
875 "lcore-slave-%d", i);
876 rte_thread_setname(lcore_config[i].thread_id, thread_name);
880 * Launch a dummy function on all slave lcores, so that master lcore
881 * knows they are all ready when this function returns.
883 rte_eal_mp_remote_launch(sync_func, NULL, SKIP_MASTER);
884 rte_eal_mp_wait_lcore();
886 /* initialize services so vdevs register service during bus_probe. */
887 ret = rte_service_init();
889 rte_eal_init_alert("rte_service_init() failed");
894 /* Probe all the buses and devices/drivers on them */
895 if (rte_bus_probe()) {
896 rte_eal_init_alert("Cannot probe devices");
901 /* initialize default service/lcore mappings and start running. Ignore
902 * -ENOTSUP, as it indicates no service coremask passed to EAL.
904 ret = rte_service_start_with_defaults();
905 if (ret < 0 && ret != -ENOTSUP) {
911 * Clean up unused files in runtime directory. We do this at the end of
912 * init and not at the beginning because we want to clean stuff up
913 * whether we are primary or secondary process, but we cannot remove
914 * primary process' files because secondary should be able to run even
915 * if primary process is dead.
917 * In no_shconf mode, no runtime directory is created in the first
918 * place, so no cleanup needed.
920 if (!internal_config.no_shconf && eal_clean_runtime_dir() < 0) {
921 rte_eal_init_alert("Cannot clear runtime directory\n");
925 rte_eal_mcfg_complete();
927 /* Call each registered callback, if enabled */
933 int __rte_experimental
934 rte_eal_cleanup(void)
936 rte_service_finalize();
937 rte_mp_channel_cleanup();
938 eal_cleanup_config(&internal_config);
943 enum rte_lcore_role_t
944 rte_eal_lcore_role(unsigned lcore_id)
946 return rte_config.lcore_role[lcore_id];
950 rte_eal_process_type(void)
952 return rte_config.process_type;
955 int rte_eal_has_pci(void)
957 return !internal_config.no_pci;
960 int rte_eal_create_uio_dev(void)
962 return internal_config.create_uio_dev;
966 rte_eal_vfio_intr_mode(void)
968 return RTE_INTR_MODE_NONE;
971 int rte_vfio_setup_device(__rte_unused const char *sysfs_base,
972 __rte_unused const char *dev_addr,
973 __rte_unused int *vfio_dev_fd,
974 __rte_unused struct vfio_device_info *device_info)
979 int rte_vfio_release_device(__rte_unused const char *sysfs_base,
980 __rte_unused const char *dev_addr,
986 int rte_vfio_enable(__rte_unused const char *modname)
991 int rte_vfio_is_enabled(__rte_unused const char *modname)
996 int rte_vfio_noiommu_is_enabled(void)
1001 int rte_vfio_clear_group(__rte_unused int vfio_group_fd)
1007 rte_vfio_dma_map(uint64_t __rte_unused vaddr, __rte_unused uint64_t iova,
1008 __rte_unused uint64_t len)
1014 rte_vfio_dma_unmap(uint64_t __rte_unused vaddr, uint64_t __rte_unused iova,
1015 __rte_unused uint64_t len)
1021 rte_vfio_get_group_num(__rte_unused const char *sysfs_base,
1022 __rte_unused const char *dev_addr,
1023 __rte_unused int *iommu_group_num)
1029 rte_vfio_get_container_fd(void)
1035 rte_vfio_get_group_fd(__rte_unused int iommu_group_num)
1041 rte_vfio_container_create(void)
1047 rte_vfio_container_destroy(__rte_unused int container_fd)
1053 rte_vfio_container_group_bind(__rte_unused int container_fd,
1054 __rte_unused int iommu_group_num)
1060 rte_vfio_container_group_unbind(__rte_unused int container_fd,
1061 __rte_unused int iommu_group_num)
1067 rte_vfio_container_dma_map(__rte_unused int container_fd,
1068 __rte_unused uint64_t vaddr,
1069 __rte_unused uint64_t iova,
1070 __rte_unused uint64_t len)
1076 rte_vfio_container_dma_unmap(__rte_unused int container_fd,
1077 __rte_unused uint64_t vaddr,
1078 __rte_unused uint64_t iova,
1079 __rte_unused uint64_t len)