I printed cpu layout with cpu_layout.py tool in dpdk tools directory and lstopo linux command. They shows the same result that my lcore 0, 2, 4, and 6 are in socket #1. However, rte_lcore_to_socket_id() returns 0 for lcore 0, 2, 4, and 6. Why does this difference occur and which value should I use to match lcore to socket? (i.e. I'm using dpdk 2.2.0 on Xeon E5520 that is based on nehalem microarchitecture.)
[mslee at centos7 tools]$ ./cpu_layout.py ============================================================ Core and Socket Information (as reported by '/proc/cpuinfo') ============================================================ cores = [0, 1, 2, 3] sockets = [1, 0] Socket 1 Socket 0 -------- -------- Core 0 [0, 8] [1, 9] Core 1 [2, 10] [3, 11] Core 2 [4, 12] [5, 13] Core 3 [6, 14] [7, 15] code fragment: socketid = rte_lcore_to_socket_id(lcore_id); RTE_LOG(INFO, APP, "init_mem: lcore_id = %d, socketid = %d\n", lcore_id, socketid); log fragment: APP: init_mem: lcore_id = 0, socketid = 0 APP: init_mem: lcore_id = 2, socketid = 0 APP: init_mem: lcore_id = 4, socketid = 0 APP: init_mem: lcore_id = 6, socketid = 0 -- Moon-Sang Lee, SW Engineer Email: sang0627 at gmail.com Wisdom begins in wonder. *Socrates*