eal/linux: fix numa node detection
authorBruce Richardson <bruce.richardson@intel.com>
Wed, 22 Apr 2015 13:31:55 +0000 (14:31 +0100)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Wed, 3 Jun 2015 16:01:53 +0000 (18:01 +0200)
commit94ef2964148a4540db21034f5c3669ab81fbdc76
treef4b0f53a9d7cf6580d9d140b45a744852861a7d5
parentbd785f6f67917709a6b644d3d8fa8b51216100ac
eal/linux: fix numa node detection

Using the "physical_package_id" as a fallback for determining the
numa node of a core tends to be unreliable. Fix this by using a
detection routine which reads the numa information from
/sys/devices/system/node and just returns a numa node of 0 on
failure.

Reported-by: Wang Sheng-Hui <shhuiw@gmail.com>
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
lib/librte_eal/linuxapp/eal/eal_lcore.c