/*-
* BSD LICENSE
*
- * Copyright(c) 2010-2013 Intel Corporation. All rights reserved.
+ * Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
#include <errno.h>
#include <sys/mman.h>
#include <sys/queue.h>
+#include <sys/io.h>
#include <sys/user.h>
#include <linux/binfmts.h>
#define SOCKET_MEM_STRLEN (RTE_MAX_NUMA_NODES * 10)
+#define HIGHEST_RPL 3
+
#define BITS_PER_HEX 4
#define GET_BLACKLIST_FIELD(in, fd, lim, dlm) \
" --"OPT_HUGE_DIR" : directory where hugetlbfs is mounted\n"
" --"OPT_PROC_TYPE" : type of this process\n"
" --"OPT_FILE_PREFIX": prefix for hugepage filenames\n"
- " --"OPT_USE_DEVICE": use the specified ethernet device(s) only."
+ " --"OPT_USE_DEVICE": use the specified ethernet device(s) only. "
"Use comma-separate <[domain:]bus:devid.func> values.\n"
" [NOTE: Cannot be used with -b option]\n"
" --"OPT_VMWARE_TSC_MAP": use VMware TSC map instead of "
rte_config.mem_config->magic = RTE_MAGIC;
}
+/*
+ * Request iopl priviledge for all RPL, returns 0 on success
+ */
+static int
+rte_eal_iopl_init(void)
+{
+ return iopl(HIGHEST_RPL);
+}
+
/* Launch threads, called at application init(). */
int
rte_eal_init(int argc, char **argv)
rte_srand(rte_rdtsc());
rte_config_init();
+
+ if (rte_eal_iopl_init() == 0)
+ rte_config.flags |= EAL_FLG_HIGH_IOPL;
if (rte_eal_cpu_init() < 0)
rte_panic("Cannot detect lcores\n");