argvopt = argv;
- internal_config.memory = 0;
- internal_config.force_nrank = 0;
- internal_config.force_nchannel = 0;
- internal_config.hugefile_prefix = HUGEFILE_PREFIX_DEFAULT;
- internal_config.hugepage_dir = NULL;
- internal_config.force_sockets = 0;
- internal_config.syslog_facility = LOG_DAEMON;
- /* default value from build option */
- internal_config.log_level = RTE_LOG_LEVEL;
-#ifdef RTE_LIBEAL_USE_HPET
- internal_config.no_hpet = 0;
-#else
- internal_config.no_hpet = 1;
-#endif
- /* zero out the NUMA config */
- for (i = 0; i < RTE_MAX_NUMA_NODES; i++)
- internal_config.socket_mem[i] = 0;
-
- /* zero out hugedir descriptors */
- for (i = 0; i < MAX_HUGEPAGE_SIZES; i++)
- internal_config.hugepage_info[i].lock_descriptor = 0;
-
- internal_config.vmware_tsc_map = 0;
+ eal_reset_internal_config(&internal_config);
while ((opt = getopt_long(argc, argvopt, eal_short_options,
eal_long_options, &option_index)) != EOF) {
#include "eal_internal_cfg.h"
#include "eal_options.h"
+#include "eal_filesystem.h"
#define BITS_PER_HEX 4
{0, 0, 0, 0}
};
+void
+eal_reset_internal_config(struct internal_config *internal_cfg)
+{
+ int i;
+
+ internal_cfg->memory = 0;
+ internal_cfg->force_nrank = 0;
+ internal_cfg->force_nchannel = 0;
+ internal_cfg->hugefile_prefix = HUGEFILE_PREFIX_DEFAULT;
+ internal_cfg->hugepage_dir = NULL;
+ internal_cfg->force_sockets = 0;
+ /* zero out the NUMA config */
+ for (i = 0; i < RTE_MAX_NUMA_NODES; i++)
+ internal_cfg->socket_mem[i] = 0;
+ /* zero out hugedir descriptors */
+ for (i = 0; i < MAX_HUGEPAGE_SIZES; i++)
+ internal_cfg->hugepage_info[i].lock_descriptor = -1;
+ internal_cfg->base_virtaddr = 0;
+
+ internal_cfg->syslog_facility = LOG_DAEMON;
+ /* default value from build option */
+ internal_cfg->log_level = RTE_LOG_LEVEL;
+
+ internal_cfg->xen_dom0_support = 0;
+
+ /* if set to NONE, interrupt mode is determined automatically */
+ internal_cfg->vfio_intr_mode = RTE_INTR_MODE_NONE;
+
+#ifdef RTE_LIBEAL_USE_HPET
+ internal_cfg->no_hpet = 0;
+#else
+ internal_cfg->no_hpet = 1;
+#endif
+ internal_cfg->vmware_tsc_map = 0;
+}
+
/*
* Parse the coremask given as argument (hexadecimal string) and fill
* the global configuration (core role and core count) with the parsed
};
extern struct internal_config internal_config; /**< Global EAL configuration. */
+void eal_reset_internal_config(struct internal_config *internal_cfg);
+
#endif /* EAL_INTERNAL_CFG_H */
argvopt = argv;
- internal_config.memory = 0;
- internal_config.force_nrank = 0;
- internal_config.force_nchannel = 0;
- internal_config.hugefile_prefix = HUGEFILE_PREFIX_DEFAULT;
- internal_config.hugepage_dir = NULL;
- internal_config.force_sockets = 0;
- internal_config.syslog_facility = LOG_DAEMON;
- /* default value from build option */
- internal_config.log_level = RTE_LOG_LEVEL;
- internal_config.xen_dom0_support = 0;
- /* if set to NONE, interrupt mode is determined automatically */
- internal_config.vfio_intr_mode = RTE_INTR_MODE_NONE;
-#ifdef RTE_LIBEAL_USE_HPET
- internal_config.no_hpet = 0;
-#else
- internal_config.no_hpet = 1;
-#endif
- /* zero out the NUMA config */
- for (i = 0; i < RTE_MAX_NUMA_NODES; i++)
- internal_config.socket_mem[i] = 0;
-
- /* zero out hugedir descriptors */
- for (i = 0; i < MAX_HUGEPAGE_SIZES; i++)
- internal_config.hugepage_info[i].lock_descriptor = -1;
-
- internal_config.vmware_tsc_map = 0;
- internal_config.base_virtaddr = 0;
+ eal_reset_internal_config(&internal_config);
while ((opt = getopt_long(argc, argvopt, eal_short_options,
eal_long_options, &option_index)) != EOF) {