The grouping ``()`` can be omitted for single element group.
The ``@`` can be omitted if cpus and lcores have the same value.
+.. Note::
+ At a given instance only one core option ``--lcores``, ``-l`` or ``-c`` can be used.
+
+
* ``--master-lcore ID``
Core ID that is used as master.
#include "eal_filesystem.h"
#define BITS_PER_HEX 4
+#define LCORE_OPT_LST 1
+#define LCORE_OPT_MSK 2
+#define LCORE_OPT_MAP 3
const char
eal_short_options[] =
RTE_LOG(ERR, EAL, "invalid coremask\n");
return -1;
}
- core_parsed = 1;
+
+ if (core_parsed) {
+ RTE_LOG(ERR, EAL, "Option -c is ignored, because (%s) is set!\n",
+ (core_parsed == LCORE_OPT_LST) ? "-l" :
+ (core_parsed == LCORE_OPT_MAP) ? "--lcore" :
+ "-c");
+ return -1;
+ }
+
+ core_parsed = LCORE_OPT_MSK;
break;
/* corelist */
case 'l':
RTE_LOG(ERR, EAL, "invalid core list\n");
return -1;
}
- core_parsed = 1;
+
+ if (core_parsed) {
+ RTE_LOG(ERR, EAL, "Option -l is ignored, because (%s) is set!\n",
+ (core_parsed == LCORE_OPT_MSK) ? "-c" :
+ (core_parsed == LCORE_OPT_MAP) ? "--lcore" :
+ "-l");
+ return -1;
+ }
+
+ core_parsed = LCORE_OPT_LST;
break;
/* service coremask */
case 's':
OPT_LCORES "\n");
return -1;
}
- core_parsed = 1;
+
+ if (core_parsed) {
+ RTE_LOG(ERR, EAL, "Option --lcore is ignored, because (%s) is set!\n",
+ (core_parsed == LCORE_OPT_LST) ? "-l" :
+ (core_parsed == LCORE_OPT_MSK) ? "-c" :
+ "--lcore");
+ return -1;
+ }
+
+ core_parsed = LCORE_OPT_MAP;
break;
/* don't know what to do, leave this to caller */