[dpdk-dev] [PATCH v2 3/5] test: add lpm routes as a linked resource

Bruce Richardson bruce.richardson at intel.com
Thu Jul 14 18:06:20 CEST 2016


Since we now have the ability to store resource data directly inside
the test binary, take the test_lpm_routes.h header file and make it a
test resource. Later commits will then switch the test C file over to use
this rather than including it directly.

Signed-off-by: Bruce Richardson <bruce.richardson at intel.com>
---
 app/test/Makefile        | 1 +
 app/test/test_lpm_perf.c | 3 +++
 2 files changed, 4 insertions(+)

diff --git a/app/test/Makefile b/app/test/Makefile
index 2de8c7a..a147db4 100644
--- a/app/test/Makefile
+++ b/app/test/Makefile
@@ -127,6 +127,7 @@ SRCS-$(CONFIG_RTE_LIBRTE_HASH) += test_hash_functions.c
 SRCS-$(CONFIG_RTE_LIBRTE_HASH) += test_hash_scaling.c
 SRCS-$(CONFIG_RTE_LIBRTE_HASH) += test_hash_multiwriter.c
 
+$(eval $(call linked_resource,test_lpm_data,test_lpm_routes.h))
 SRCS-$(CONFIG_RTE_LIBRTE_LPM) += test_lpm.c
 SRCS-$(CONFIG_RTE_LIBRTE_LPM) += test_lpm_perf.c
 SRCS-$(CONFIG_RTE_LIBRTE_LPM) += test_lpm6.c
diff --git a/app/test/test_lpm_perf.c b/app/test/test_lpm_perf.c
index 41da811..0e64919 100644
--- a/app/test/test_lpm_perf.c
+++ b/app/test/test_lpm_perf.c
@@ -41,9 +41,12 @@
 #include <rte_lpm.h>
 
 #include "test.h"
+#include "resource.h"
 #include "test_lpm_routes.h"
 #include "test_xmmt_ops.h"
 
+REGISTER_LINKED_RESOURCE(test_lpm_data)
+
 #define TEST_LPM_ASSERT(cond) do {                                            \
 	if (!(cond)) {                                                        \
 		printf("Error at line %d: \n", __LINE__);                     \
-- 
2.5.5



More information about the dev mailing list