DPDK is most often compiled with RTE_MAX_LCORE=128. On systems which
have more than 128 cores, its necessary to remap the active cores onto
the available 128 cores, using the --lcores parameter. Since VPP does
not use RTE threads, there's no reason DPDK needs to know anything
about VPPs threads. However, DPDK does attempt to pin the thread calling
rte_eal_init() to the current cpu, which can fail if the lcore ID
exceeds RTE_MAX_LCORE.
This commit implements a simple workaround, which is to map VPP's main
lcore to DPDK lcore 0 whenever VPP's main_lcore exceeds RTE_MAX_LCORE.
Type: fix
Change-Id: I3cba5f5f26aed7ec62c70a50bac4c80d78d9d944
Signed-off-by: Jeff Shaw <[email protected]>
tmp = format (0, "vpp%c", 0);
vec_add1 (conf->eal_init_args, tmp);
}
+
+ /* Remap main lcore onto DPDK lcore 0 if it exceeds the max lcore index */
+ if (tm->main_lcore >= RTE_MAX_LCORE)
+ {
+ tmp = format (0, "--lcores%c", 0);
+ vec_add1 (conf->eal_init_args, tmp);
+ tmp = format (0, "0@%u%c", tm->main_lcore, 0);
+ vec_add1 (conf->eal_init_args, tmp);
+ }
#endif
if (no_pci == 0 && geteuid () == 0)