DPDK args threads issue when compiling with RTE_MAX_LCORE > 256

14 views
Skip to first unread message

Haklat haklat

unread,
Oct 7, 2025, 8:32:17 AM (11 days ago) Oct 7
to TRex Traffic Generator
Hi,
when using TRex as docker container in kubernetes cluster with servers having > 128 logical CPUs we need to set RTE_MAX_LCORE higher than the default 128. This has worked fine up to 256. Now we have servers with even more vCPUS why I have been forced to complied with RTE_MAX_LCORE=1024. The problem now is that the threads  array in trex_cfg.yaml seams like it cannot have logical CPUs higher than 255. At 256 TRex will wrap the numbers and startup will end up with:

EAL: PANIC in rte_eal_init():
Cannot set affinity

Example config below with resulting DPDK args at TRex startup:

From:
/etc/trex_cfg.yaml
...
  platform:
      master_thread_id: 113
      latency_thread_id: 273
      dual_if:
        - socket: 0
          threads: [114,274]
 
DPDK args
 xx  -d  libmlx5-64.so  -l  113,273,18,114  -n  4  --log-level  7  --main-lcore  113  -a  0001:81:00.2  -a  0001:81:01.3  --file-prefix  trex1  --socket-mem  1


Any idea where in the code I can change the startup parsing of trex_cfg.yaml, so that it won't wrap at 256?

BR//Håkan

Haklat haklat

unread,
Oct 8, 2025, 7:25:31 AM (10 days ago) Oct 8
to TRex Traffic Generator
Hi,
found some few uint8_t variables that sounded related in following files that I changed to  uint16_t 
src/
  platform_cfg.cpp
  platform_cfg.h
  trex_global.h

With those changes I can now use TRex on the newer CPUs with threads in configuration numbered higher than 255.

Thanks//Håkan

Reply all
Reply to author
Forward
0 new messages