git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
examples/ip_pipeline: move config files to separate directory
[dpdk.git]
/
lib
/
librte_malloc
/
malloc_heap.h
diff --git
a/lib/librte_malloc/malloc_heap.h
b/lib/librte_malloc/malloc_heap.h
index
b4aec45
..
a47136d
100644
(file)
--- a/
lib/librte_malloc/malloc_heap.h
+++ b/
lib/librte_malloc/malloc_heap.h
@@
-44,7
+44,12
@@
extern "C" {
static inline unsigned
malloc_get_numa_socket(void)
{
- return rte_socket_id();
+ unsigned socket_id = rte_socket_id();
+
+ if (socket_id == (unsigned)SOCKET_ID_ANY)
+ return 0;
+
+ return socket_id;
}
void *