tailq: remove unneeded inclusions
[dpdk.git] / lib / librte_eal / linuxapp / eal / eal.c
index f99e158..bd770cf 100644 (file)
@@ -59,7 +59,6 @@
 #include <rte_memory.h>
 #include <rte_memzone.h>
 #include <rte_launch.h>
-#include <rte_tailq.h>
 #include <rte_eal.h>
 #include <rte_eal_memconfig.h>
 #include <rte_per_lcore.h>
@@ -352,17 +351,14 @@ eal_usage(const char *prgname)
        printf("\nUsage: %s ", prgname);
        eal_common_usage();
        printf("EAL Linux options:\n"
-              "  -d LIB.so    : add driver (can be used multiple times)\n"
-              "  --"OPT_XEN_DOM0" : support application running on Xen Domain0 "
-                          "without hugetlbfs\n"
-              "  --"OPT_SOCKET_MEM" : memory to allocate on specific\n"
-                  "                 sockets (use comma separated values)\n"
-              "  --"OPT_HUGE_DIR"   : directory where hugetlbfs is mounted\n"
-              "  --"OPT_FILE_PREFIX": prefix for hugepage filenames\n"
-              "  --"OPT_BASE_VIRTADDR": specify base virtual address\n"
-              "  --"OPT_VFIO_INTR": specify desired interrupt mode for VFIO "
-                          "(legacy|msi|msix)\n"
-              "  --"OPT_CREATE_UIO_DEV": create /dev/uioX (usually done by hotplug)\n"
+              "  -d LIB.so           Add driver (can be used multiple times)\n"
+              "  --"OPT_SOCKET_MEM"        Memory to allocate on sockets (comma separated values)\n"
+              "  --"OPT_HUGE_DIR"          Directory where hugetlbfs is mounted\n"
+              "  --"OPT_FILE_PREFIX"       Prefix for hugepage filenames\n"
+              "  --"OPT_BASE_VIRTADDR"     Base virtual address\n"
+              "  --"OPT_CREATE_UIO_DEV"    Create /dev/uioX (usually done by hotplug)\n"
+              "  --"OPT_VFIO_INTR"         Interrupt mode for VFIO (legacy|msi|msix)\n"
+              "  --"OPT_XEN_DOM0"          Support running on Xen dom0 without hugetlbfs\n"
               "\n");
        /* Allow the application to print its usage message too if hook is set */
        if ( rte_application_usage_hook ) {
@@ -523,8 +519,10 @@ eal_parse_args(int argc, char **argv)
                int ret;
 
                /* getopt is not happy, stop right now */
-               if (opt == '?')
+               if (opt == '?') {
+                       eal_usage(prgname);
                        return -1;
+               }
 
                ret = eal_parse_common_option(opt, optarg, &internal_config);
                /* common parser is not happy */
@@ -537,6 +535,10 @@ eal_parse_args(int argc, char **argv)
                        continue;
 
                switch (opt) {
+               case 'h':
+                       eal_usage(prgname);
+                       exit(EXIT_SUCCESS);
+
                /* force loading of external driver */
                case 'd':
                        solib = malloc(sizeof(*solib));
@@ -702,6 +704,7 @@ rte_eal_init(int argc, char **argv)
        static rte_atomic32_t run_once = RTE_ATOMIC32_INIT(0);
        struct shared_driver *solib = NULL;
        const char *logid;
+       char cpuset[RTE_CPU_AFFINITY_STR_LEN];
 
        if (!rte_atomic32_test_and_set(&run_once))
                return -1;
@@ -802,8 +805,11 @@ rte_eal_init(int argc, char **argv)
 
        eal_thread_init_master(rte_config.master_lcore);
 
-       RTE_LOG(DEBUG, EAL, "Master core %u is ready (tid=%x)\n",
-               rte_config.master_lcore, (int)thread_id);
+       ret = eal_thread_dump_affinity(cpuset, RTE_CPU_AFFINITY_STR_LEN);
+
+       RTE_LOG(DEBUG, EAL, "Master lcore %u is ready (tid=%x;cpuset=[%s%s])\n",
+               rte_config.master_lcore, (int)thread_id, cpuset,
+               ret == 0 ? "" : "...");
 
        if (rte_eal_dev_init() < 0)
                rte_panic("Cannot init pmd devices\n");