[dpdk-dev] [PATCH] mem: fix include in rte_malloc

Thomas Monjalon thomas.monjalon at 6wind.com
Wed Jul 31 11:18:45 CEST 2013


The function rte_malloc_virt2phy has a dependency on rte_memory.h:
phys_addr_t must be defined.

The dependency handling for apps was wrong in the commit 8c86825cbf.
Let's revert this part.

Reported-by: Jia Sui <jia.sui at advantech.com.cn>
Signed-off-by: Thomas Monjalon <thomas.monjalon at 6wind.com>
---
 app/test/test_hash.c           |    2 +-
 app/test/test_hash_perf.c      |    2 +-
 app/test/test_memcpy.c         |    1 -
 app/test/test_memcpy_perf.c    |    1 -
 lib/librte_malloc/rte_malloc.h |    1 +
 5 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/app/test/test_hash.c b/app/test/test_hash.c
index 4de8cb1..5437e05 100644
--- a/app/test/test_hash.c
+++ b/app/test/test_hash.c
@@ -41,10 +41,10 @@
 #include <sys/queue.h>
 
 #include <rte_common.h>
+#include <rte_malloc.h>
 #include <rte_cycles.h>
 #include <rte_random.h>
 #include <rte_memory.h>
-#include <rte_malloc.h>
 #include <rte_memzone.h>
 #include <rte_tailq.h>
 #include <rte_eal.h>
diff --git a/app/test/test_hash_perf.c b/app/test/test_hash_perf.c
index 311c2bd..8a0feb3 100644
--- a/app/test/test_hash_perf.c
+++ b/app/test/test_hash_perf.c
@@ -42,10 +42,10 @@
 
 #include <rte_common.h>
 #include <rte_lcore.h>
+#include <rte_malloc.h>
 #include <rte_cycles.h>
 #include <rte_random.h>
 #include <rte_memory.h>
-#include <rte_malloc.h>
 #include <rte_memzone.h>
 #include <rte_tailq.h>
 #include <rte_eal.h>
diff --git a/app/test/test_memcpy.c b/app/test/test_memcpy.c
index 729a2ff..d7777a8 100644
--- a/app/test/test_memcpy.c
+++ b/app/test/test_memcpy.c
@@ -41,7 +41,6 @@
 #include <cmdline_parse.h>
 #include <rte_cycles.h>
 #include <rte_random.h>
-#include <rte_memory.h>
 #include <rte_malloc.h>
 
 #include <rte_memcpy.h>
diff --git a/app/test/test_memcpy_perf.c b/app/test/test_memcpy_perf.c
index 1e75f53..236b295 100644
--- a/app/test/test_memcpy_perf.c
+++ b/app/test/test_memcpy_perf.c
@@ -41,7 +41,6 @@
 #include <cmdline_parse.h>
 #include <rte_cycles.h>
 #include <rte_random.h>
-#include <rte_memory.h>
 #include <rte_malloc.h>
 
 #include <rte_memcpy.h>
diff --git a/lib/librte_malloc/rte_malloc.h b/lib/librte_malloc/rte_malloc.h
index e68187a..fe85689 100644
--- a/lib/librte_malloc/rte_malloc.h
+++ b/lib/librte_malloc/rte_malloc.h
@@ -42,6 +42,7 @@
  */
 
 #include <stddef.h>
+#include <rte_memory.h>
 
 #ifdef __cplusplus
 extern "C" {
-- 
1.7.10.4



More information about the dev mailing list