X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=lib%2Flibrte_eal%2Flinuxapp%2Feal%2Feal.c;h=b5e755fc8b5fd9f5b76d9b31be81f03d6a9107ef;hb=e9d48c0072d36eb6423b45fba4ec49d0def6c36f;hp=46a013928597112f36a87f10c81cef6c81ba71dd;hpb=2c502225c64c79b070997ff72e7963b1da7b2ec3;p=dpdk.git diff --git a/lib/librte_eal/linuxapp/eal/eal.c b/lib/librte_eal/linuxapp/eal/eal.c index 46a0139285..b5e755fc8b 100644 --- a/lib/librte_eal/linuxapp/eal/eal.c +++ b/lib/librte_eal/linuxapp/eal/eal.c @@ -1,7 +1,7 @@ /*- * 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 @@ -47,6 +47,7 @@ #include #include #include +#include #include #include @@ -71,6 +72,7 @@ #include #include #include +#include #include "eal_private.h" #include "eal_thread.h" @@ -96,6 +98,8 @@ #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) \ @@ -336,7 +340,7 @@ eal_usage(const char *prgname) " --"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 " @@ -832,6 +836,15 @@ rte_eal_mcfg_complete(void) 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) @@ -878,6 +891,9 @@ 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");