b6be16acfe
The ctrl thread cpu affinity setting has been broken when using --lcores.
Using -l/-c options makes each lcore associated to a physical cpu in a 1:1
fashion.
On the contrary, when using --lcores, each lcore cpu affinity can be set
to a list of any online cpu on the system.
To handle both cases, each lcore cpu affinity is considered and removed
from the process startup cpu affinity.
Introduced macros to manipulate dpdk cpu sets in both Linux and FreeBSD.
Examples on a 8 cores Linux system:
$ cd /sys/fs/cgroup/cpuset/
$ mkdir dpdk
$ cd dpdk
$ echo 4-7 > cpuset.cpus
$ echo 0 > cpuset.mems
$ echo $$ > tasks
Before the fix:
$ ./master/app/testpmd --master-lcore 0 --lcores '(0,7)@(7,4,5)' \
--no-huge --no-pci -m 512 -- -i --total-num-mbufs=2048
8427 cpu_list=4-5,7 testpmd
8428 cpu_list=4-6 eal-intr-thread
8429 cpu_list=4-6 rte_mp_handle
8430 cpu_list=4-5,7 lcore-slave-7
$ taskset -c 7 \
./master/app/testpmd --master-lcore 0 --lcores '(0,7)@(7,4,5)' \
--no-huge --no-pci -m 512 -- -i --total-num-mbufs=2048
EAL: Detected 8 lcore(s)
EAL: Detected 1 NUMA nodes
EAL: Failed to create thread for interrupt handling
EAL: FATAL: Cannot init interrupt-handling thread
EAL: Cannot init interrupt-handling thread
PANIC in main():
Cannot init EAL
After the fix:
$ ./master/app/testpmd --master-lcore 0 --lcores '(0,7)@(7,4,5)' \
--no-huge --no-pci -m 512 -- -i --total-num-mbufs=2048
15214 cpu_list=4-5,7 testpmd
15215 cpu_list=6 eal-intr-thread
15216 cpu_list=6 rte_mp_handle
15217 cpu_list=4-5,7 lcore-slave-7
$ taskset -c 7 \
./master/app/testpmd --master-lcore 0 --lcores '(0,7)@(7,4,5)' \
--no-huge --no-pci -m 512 -- -i --total-num-mbufs=2048
15297 cpu_list=4-5,7 testpmd
15298 cpu_list=4-5,7 eal-intr-thread
15299 cpu_list=4-5,7 rte_mp_handle
15300 cpu_list=4-5,7 lcore-slave-7
Bugzilla ID: 322
Fixes:
|
||
---|---|---|
.. | ||
librte_acl | ||
librte_bbdev | ||
librte_bitratestats | ||
librte_bpf | ||
librte_cfgfile | ||
librte_cmdline | ||
librte_compressdev | ||
librte_cryptodev | ||
librte_distributor | ||
librte_eal | ||
librte_efd | ||
librte_ethdev | ||
librte_eventdev | ||
librte_flow_classify | ||
librte_gro | ||
librte_gso | ||
librte_hash | ||
librte_ip_frag | ||
librte_ipsec | ||
librte_jobstats | ||
librte_kni | ||
librte_kvargs | ||
librte_latencystats | ||
librte_lpm | ||
librte_mbuf | ||
librte_member | ||
librte_mempool | ||
librte_meter | ||
librte_metrics | ||
librte_net | ||
librte_pci | ||
librte_pdump | ||
librte_pipeline | ||
librte_port | ||
librte_power | ||
librte_rawdev | ||
librte_rcu | ||
librte_reorder | ||
librte_ring | ||
librte_sched | ||
librte_security | ||
librte_stack | ||
librte_table | ||
librte_telemetry | ||
librte_timer | ||
librte_vhost | ||
Makefile | ||
meson.build |