"n:" /* memory channels */
"r:" /* memory ranks */
"v" /* version */
- "w:" /* pci-whitelist (deprecated) */
;
const struct option
{OPT_TRACE_DIR, 1, NULL, OPT_TRACE_DIR_NUM },
{OPT_TRACE_BUF_SIZE, 1, NULL, OPT_TRACE_BUF_SIZE_NUM },
{OPT_TRACE_MODE, 1, NULL, OPT_TRACE_MODE_NUM },
- {OPT_MASTER_LCORE, 1, NULL, OPT_MASTER_LCORE_NUM },
{OPT_MAIN_LCORE, 1, NULL, OPT_MAIN_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_TELEMETRY, 0, NULL, OPT_NO_TELEMETRY_NUM },
{OPT_FORCE_MAX_SIMD_BITWIDTH, 1, NULL, OPT_FORCE_MAX_SIMD_BITWIDTH_NUM},
- /* legacy options that will be removed in future */
- {OPT_PCI_BLACKLIST, 1, NULL, OPT_PCI_BLACKLIST_NUM },
- {OPT_PCI_WHITELIST, 1, NULL, OPT_PCI_WHITELIST_NUM },
-
{0, 0, NULL, 0 }
};
return -1;
for (i = 0; i < argc; i++) {
- eal_args[i] = strdup(argv[i]);
if (strcmp(argv[i], "--") == 0)
break;
+ eal_args[i] = strdup(argv[i]);
}
eal_args[i++] = NULL; /* always finish with NULL */
void *tmp;
int ret = 0;
- TAILQ_FOREACH_SAFE(devopt, &devopt_list, next, tmp) {
+ RTE_TAILQ_FOREACH_SAFE(devopt, &devopt_list, next, tmp) {
if (ret == 0) {
ret = rte_devargs_add(devopt->type, devopt->arg);
if (ret)
}
while (len >= minlen) {
+ void *handle;
+
/* check if we have this .so loaded, if so - shared build */
RTE_LOG(DEBUG, EAL, "Checking presence of .so '%s'\n", soname);
- if (dlopen(soname, RTLD_LAZY | RTLD_NOLOAD) != NULL) {
+ handle = dlopen(soname, RTLD_LAZY | RTLD_NOLOAD);
+ if (handle != NULL) {
RTE_LOG(INFO, EAL, "Detected shared linkage of DPDK\n");
+ dlclose(handle);
return 1;
}
eal_parse_service_corelist(const char *corelist)
{
struct rte_config *cfg = rte_eal_get_configuration();
- int i, idx = 0;
+ int i;
unsigned count = 0;
char *end = NULL;
- int min, max;
+ uint32_t min, max, idx;
uint32_t taken_lcore_count = 0;
if (corelist == NULL)
idx = strtoul(corelist, &end, 10);
if (errno || end == NULL)
return -1;
+ if (idx >= RTE_MAX_LCORE)
+ return -1;
while (isblank(*end))
end++;
if (*end == '-') {
static int a_used;
switch (opt) {
- case OPT_PCI_BLACKLIST_NUM:
- fprintf(stderr,
- "Option --pci-blacklist is deprecated, use -b, --block instead\n");
- /* fallthrough */
case 'b':
if (a_used)
goto ba_conflict;
b_used = 1;
break;
- case 'w':
- fprintf(stderr,
- "Option -w, --pci-whitelist is deprecated, use -a, --allow option instead\n");
- /* fallthrough */
case 'a':
if (b_used)
goto ba_conflict;
conf->process_type = eal_parse_proc_type(optarg);
break;
- case OPT_MASTER_LCORE_NUM:
- fprintf(stderr,
- "Option --" OPT_MASTER_LCORE
- " is deprecated use " OPT_MAIN_LCORE "\n");
- /* fallthrough */
case OPT_MAIN_LCORE_NUM:
if (eal_parse_main_lcore(optarg) < 0) {
RTE_LOG(ERR, EAL, "invalid parameter for --"