/** Primary or secondary configuration */
enum rte_proc_type_t process_type;
+ /** A set of general status flags */
+ unsigned flags;
+
/**
* Pointer to memory configuration, which may be shared across multiple
* Intel DPDK instances
struct rte_mem_config *mem_config;
} __attribute__((__packed__));
+/* Flag definitions for rte_config flags */
+#define EAL_FLG_HIGH_IOPL 1 /**< indicates high IO privilage in a linux env */
+
/**
* Get the global configuration structure.
*
#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) \
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");