eal: use SPDX tags in 6WIND copyrighted files
[dpdk.git] / lib / librte_eal / common / eal_common_options.c
index 1da185e..08fb617 100644 (file)
@@ -1,34 +1,6 @@
-/*-
- *   BSD LICENSE
- *
- *   Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
- *   Copyright(c) 2014 6WIND S.A.
- *
- *   Redistribution and use in source and binary forms, with or without
- *   modification, are permitted provided that the following conditions
- *   are met:
- *
- *     * Redistributions of source code must retain the above copyright
- *       notice, this list of conditions and the following disclaimer.
- *     * Redistributions in binary form must reproduce the above copyright
- *       notice, this list of conditions and the following disclaimer in
- *       the documentation and/or other materials provided with the
- *       distribution.
- *     * Neither the name of Intel Corporation nor the names of its
- *       contributors may be used to endorse or promote products derived
- *       from this software without specific prior written permission.
- *
- *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- *   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- *   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- *   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- *   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- *   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- *   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- *   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2010-2014 Intel Corporation.
+ * Copyright(c) 2014 6WIND S.A.
  */
 
 #include <stdlib.h>
@@ -85,6 +57,7 @@ eal_long_options[] = {
        {OPT_LCORES,            1, NULL, OPT_LCORES_NUM           },
        {OPT_LOG_LEVEL,         1, NULL, OPT_LOG_LEVEL_NUM        },
        {OPT_MASTER_LCORE,      1, NULL, OPT_MASTER_LCORE_NUM     },
+       {OPT_MBUF_POOL_OPS_NAME, 1, NULL, OPT_MBUF_POOL_OPS_NAME_NUM},
        {OPT_NO_HPET,           0, NULL, OPT_NO_HPET_NUM          },
        {OPT_NO_HUGE,           0, NULL, OPT_NO_HUGE_NUM          },
        {OPT_NO_PCI,            0, NULL, OPT_NO_PCI_NUM           },
@@ -97,7 +70,6 @@ eal_long_options[] = {
        {OPT_VDEV,              1, NULL, OPT_VDEV_NUM             },
        {OPT_VFIO_INTR,         1, NULL, OPT_VFIO_INTR_NUM        },
        {OPT_VMWARE_TSC_MAP,    0, NULL, OPT_VMWARE_TSC_MAP_NUM   },
-       {OPT_XEN_DOM0,          0, NULL, OPT_XEN_DOM0_NUM         },
        {0,                     0, NULL, 0                        }
 };
 
@@ -208,8 +180,6 @@ eal_reset_internal_config(struct internal_config *internal_cfg)
 
        internal_cfg->syslog_facility = LOG_DAEMON;
 
-       internal_cfg->xen_dom0_support = 0;
-
        /* if set to NONE, interrupt mode is determined automatically */
        internal_cfg->vfio_intr_mode = RTE_INTR_MODE_NONE;
 
@@ -220,6 +190,7 @@ eal_reset_internal_config(struct internal_config *internal_cfg)
 #endif
        internal_cfg->vmware_tsc_map = 0;
        internal_cfg->create_uio_dev = 0;
+       internal_cfg->user_mbuf_pool_ops_name = NULL;
 }
 
 static int
@@ -279,12 +250,13 @@ int
 eal_plugins_init(void)
 {
        struct shared_driver *solib = NULL;
+       struct stat sb;
 
-       if (*default_solib_dir != '\0')
+       if (*default_solib_dir != '\0' && stat(default_solib_dir, &sb) == 0 &&
+                               S_ISDIR(sb.st_mode))
                eal_plugin_add(default_solib_dir);
 
        TAILQ_FOREACH(solib, &solib_list, next) {
-               struct stat sb;
 
                if (stat(solib->name, &sb) == 0 && S_ISDIR(sb.st_mode)) {
                        if (eal_plugindir_init(solib->name) == -1) {
@@ -1279,6 +1251,7 @@ eal_common_usage(void)
               "                      '@' can be omitted if cpus and lcores have the same value\n"
               "  -s SERVICE COREMASK Hexadecimal bitmask of cores to be used as service cores\n"
               "  --"OPT_MASTER_LCORE" ID   Core ID that is used as master\n"
+              "  --"OPT_MBUF_POOL_OPS_NAME" Pool ops name for mbuf to use\n"
               "  -n CHANNELS         Number of memory channels\n"
               "  -m MB               Memory to allocate (see also --"OPT_SOCKET_MEM")\n"
               "  -r RANKS            Force number of memory ranks (don't detect)\n"