2014-09-22 08:37:59 +00:00
|
|
|
/*-
|
|
|
|
* BSD LICENSE
|
|
|
|
*
|
|
|
|
* 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.
|
|
|
|
*/
|
|
|
|
|
2014-11-21 14:26:17 +00:00
|
|
|
#ifndef EAL_OPTIONS_H
|
|
|
|
#define EAL_OPTIONS_H
|
2014-09-22 08:38:00 +00:00
|
|
|
|
|
|
|
enum {
|
|
|
|
/* long options mapped to a short option */
|
2014-09-22 08:37:59 +00:00
|
|
|
#define OPT_PCI_WHITELIST "pci-whitelist"
|
2014-09-22 08:38:00 +00:00
|
|
|
OPT_PCI_WHITELIST_NUM = 'w',
|
2014-09-22 08:37:59 +00:00
|
|
|
#define OPT_PCI_BLACKLIST "pci-blacklist"
|
2014-09-22 08:38:00 +00:00
|
|
|
OPT_PCI_BLACKLIST_NUM = 'b',
|
2014-09-22 08:37:59 +00:00
|
|
|
|
2014-09-22 08:38:00 +00:00
|
|
|
/* first long only option value must be >= 256, so that we won't
|
|
|
|
* conflict with short options */
|
|
|
|
OPT_LONG_MIN_NUM = 256,
|
2014-09-22 08:37:59 +00:00
|
|
|
#define OPT_HUGE_DIR "huge-dir"
|
2014-09-22 08:38:00 +00:00
|
|
|
OPT_HUGE_DIR_NUM = OPT_LONG_MIN_NUM,
|
2014-09-22 08:37:59 +00:00
|
|
|
#define OPT_PROC_TYPE "proc-type"
|
2014-09-22 08:38:00 +00:00
|
|
|
OPT_PROC_TYPE_NUM,
|
2014-09-22 08:37:59 +00:00
|
|
|
#define OPT_NO_SHCONF "no-shconf"
|
2014-09-22 08:38:00 +00:00
|
|
|
OPT_NO_SHCONF_NUM,
|
2014-09-22 08:37:59 +00:00
|
|
|
#define OPT_NO_HPET "no-hpet"
|
2014-09-22 08:38:00 +00:00
|
|
|
OPT_NO_HPET_NUM,
|
2014-09-22 08:37:59 +00:00
|
|
|
#define OPT_VMWARE_TSC_MAP "vmware-tsc-map"
|
2014-09-22 08:38:00 +00:00
|
|
|
OPT_VMWARE_TSC_MAP_NUM,
|
2014-09-22 08:37:59 +00:00
|
|
|
#define OPT_NO_PCI "no-pci"
|
2014-09-22 08:38:00 +00:00
|
|
|
OPT_NO_PCI_NUM,
|
2014-09-22 08:37:59 +00:00
|
|
|
#define OPT_NO_HUGE "no-huge"
|
2014-09-22 08:38:00 +00:00
|
|
|
OPT_NO_HUGE_NUM,
|
2014-09-22 08:37:59 +00:00
|
|
|
#define OPT_FILE_PREFIX "file-prefix"
|
2014-09-22 08:38:00 +00:00
|
|
|
OPT_FILE_PREFIX_NUM,
|
2014-09-22 08:37:59 +00:00
|
|
|
#define OPT_SOCKET_MEM "socket-mem"
|
2014-09-22 08:38:00 +00:00
|
|
|
OPT_SOCKET_MEM_NUM,
|
2014-09-22 08:37:59 +00:00
|
|
|
#define OPT_VDEV "vdev"
|
2014-09-22 08:38:00 +00:00
|
|
|
OPT_VDEV_NUM,
|
2014-09-22 08:37:59 +00:00
|
|
|
#define OPT_SYSLOG "syslog"
|
2014-09-22 08:38:00 +00:00
|
|
|
OPT_SYSLOG_NUM,
|
2014-09-22 08:37:59 +00:00
|
|
|
#define OPT_LOG_LEVEL "log-level"
|
2014-09-22 08:38:00 +00:00
|
|
|
OPT_LOG_LEVEL_NUM,
|
2014-09-22 08:37:59 +00:00
|
|
|
#define OPT_BASE_VIRTADDR "base-virtaddr"
|
2014-09-22 08:38:00 +00:00
|
|
|
OPT_BASE_VIRTADDR_NUM,
|
2014-09-22 08:37:59 +00:00
|
|
|
#define OPT_XEN_DOM0 "xen-dom0"
|
2014-09-22 08:38:00 +00:00
|
|
|
OPT_XEN_DOM0_NUM,
|
2014-09-22 08:37:59 +00:00
|
|
|
#define OPT_CREATE_UIO_DEV "create-uio-dev"
|
2014-09-22 08:38:00 +00:00
|
|
|
OPT_CREATE_UIO_DEV_NUM,
|
2014-09-22 08:37:59 +00:00
|
|
|
#define OPT_VFIO_INTR "vfio-intr"
|
2014-09-22 08:38:00 +00:00
|
|
|
OPT_VFIO_INTR_NUM,
|
|
|
|
OPT_LONG_MAX_NUM
|
|
|
|
};
|
2014-09-22 08:37:59 +00:00
|
|
|
|
|
|
|
extern const char eal_short_options[];
|
|
|
|
extern const struct option eal_long_options[];
|
|
|
|
|
2014-09-22 08:38:00 +00:00
|
|
|
int eal_parse_common_option(int opt, const char *argv,
|
2014-09-22 08:37:59 +00:00
|
|
|
struct internal_config *conf);
|
|
|
|
void eal_common_usage(void);
|
2014-11-21 14:26:17 +00:00
|
|
|
|
|
|
|
#endif /* EAL_OPTIONS_H */
|