"-n", "3", "--lcores",
"0-1,2@(5-7),(3-5)@(0,2),(0,6),7"};
+ if (launch_proc(argv2) != 0) {
+ printf("Error - "
+ "process did not run ok when missing -c flag\n");
+ return -1;
+ }
+
if (launch_proc(argv1) == 0
- || launch_proc(argv2) == 0
|| launch_proc(argv3) == 0) {
printf("Error - "
- "process ran without error when missing -c flag\n");
+ "process ran without error with invalid -c flag\n");
return -1;
}
if (launch_proc(argv4) != 0) {
.. code-block:: console
- ./rte-app -c COREMASK -n NUM [-b <domain:bus:devid.func>] [-r NUM] [-v] [--proc-type <primary|secondary|auto>]
+ ./rte-app -n NUM [-c COREMASK] [-b <domain:bus:devid.func>] [-r NUM] [-v] [--proc-type <primary|secondary|auto>]
.. note::
.. code-block:: console
- ./rte-app -c COREMASK -n NUM [-b <domain:bus:devid.func>] [--socket-mem=MB,...] [-m MB] [-r NUM] [-v] [--file-prefix] [--proc-type <primary|secondary|auto>] [-- xen-dom0]
+ ./rte-app -n NUM [-c COREMASK] [-b <domain:bus:devid.func>] [--socket-mem=MB,...] [-m MB] [-r NUM] [-v] [--file-prefix] [--proc-type <primary|secondary|auto>] [-- xen-dom0]
The EAL options are as follows:
* ones and enable them by default.
*/
for (lcore_id = 0; lcore_id < RTE_MAX_LCORE; lcore_id++) {
+ lcore_config[lcore_id].core_index = count;
+
/* init cpuset for per lcore config */
CPU_ZERO(&lcore_config[lcore_id].cpuset);
lcore_config[lcore_id].detected = eal_cpu_detected(lcore_id);
if (lcore_config[lcore_id].detected == 0) {
config->lcore_role[lcore_id] = ROLE_OFF;
+ lcore_config[lcore_id].core_index = -1;
continue;
}
{0, 0, NULL, 0 }
};
-static int lcores_parsed;
static int master_lcore_parsed;
static int mem_parsed;
return -1;
/* Update the count of enabled logical cores of the EAL configuration */
cfg->lcore_count = count;
- lcores_parsed = 1;
return 0;
}
/* Update the count of enabled logical cores of the EAL configuration */
cfg->lcore_count = count;
- lcores_parsed = 1;
return 0;
}
goto err;
cfg->lcore_count = count;
- lcores_parsed = 1;
ret = 0;
err:
{
struct rte_config *cfg = rte_eal_get_configuration();
- if (!lcores_parsed) {
- RTE_LOG(ERR, EAL, "CPU cores must be enabled with options "
- "-c, -l or --lcores\n");
- return -1;
- }
if (cfg->lcore_role[cfg->master_lcore] != ROLE_RTE) {
RTE_LOG(ERR, EAL, "Master lcore is not enabled for DPDK\n");
return -1;
void
eal_common_usage(void)
{
- printf("-c COREMASK|-l CORELIST [options]\n\n"
+ printf("[options]\n\n"
"EAL common options:\n"
" -c COREMASK Hexadecimal bitmask of cores to run on\n"
" -l CORELIST List of cores to run on\n"