dpdk: set lcores parameter for high lcore id 77/42977/2
authorJeff Shaw <[email protected]>
Fri, 16 May 2025 18:28:09 +0000 (11:28 -0700)
committerDave Wallace <[email protected]>
Tue, 20 May 2025 15:15:41 +0000 (15:15 +0000)
commitceef3987aa2febaae9204ce3ef0718a78f95e849
tree8aa578e5b6653f73f1d037bce99ef90323fe5654
parentcb7a491b54c8bd9d7e791a268375e87cba4d9f26
dpdk: set lcores parameter for high lcore id

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]>
src/plugins/dpdk/device/init.c