DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] rte_lcore_to_socket_id(lcore_id) mismatches to that of lstopo
@ 2016-02-17  1:15 Moon-Sang Lee
  0 siblings, 0 replies; only message in thread
From: Moon-Sang Lee @ 2016-02-17  1:15 UTC (permalink / raw)
  To: dev

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@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@gmail.com
Wisdom begins in wonder. *Socrates*

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2016-02-17  1:15 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-17  1:15 [dpdk-dev] rte_lcore_to_socket_id(lcore_id) mismatches to that of lstopo Moon-Sang Lee

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).