doc: introduce networking driver matrix
[dpdk.git] / app / test / test_lpm.c
index 05f0a93..8b4ded9 100644 (file)
@@ -47,8 +47,6 @@
 
 #include "test.h"
 
-#ifdef RTE_LIBRTE_LPM
-
 #include "rte_lpm.h"
 #include "test_lpm_routes.h"
 
@@ -167,7 +165,7 @@ test2(void)
 {
        struct rte_lpm *lpm = NULL;
 
-       lpm = rte_lpm_create(__func__, SOCKET_ID_ANY, MAX_RULES, RTE_LPM_HEAP);
+       lpm = rte_lpm_create(__func__, SOCKET_ID_ANY, MAX_RULES, 0);
        TEST_LPM_ASSERT(lpm != NULL);
 
        rte_lpm_free(lpm);
@@ -609,7 +607,7 @@ test10(void)
 
        /* Add rule that covers a TBL24 range previously invalid & lookup
         * (& delete & lookup) */
-       lpm = rte_lpm_create(__func__, SOCKET_ID_ANY, MAX_RULES, RTE_LPM_HEAP);
+       lpm = rte_lpm_create(__func__, SOCKET_ID_ANY, MAX_RULES, 0);
        TEST_LPM_ASSERT(lpm != NULL);
 
        ip = IPv4(128, 0, 0, 0);
@@ -1332,7 +1330,7 @@ perf_test(void)
  * Do all unit and performance tests.
  */
 
-int
+static int
 test_lpm(void)
 {
        unsigned i;
@@ -1349,13 +1347,8 @@ test_lpm(void)
        return global_status;
 }
 
-#else /* RTE_LIBRTE_LPM */
-
-int
-test_lpm(void)
-{
-       printf("The LPM library is not included in this build\n");
-       return 0;
-}
-
-#endif /* RTE_LIBRTE_LPM */
+static struct test_command lpm_cmd = {
+       .command = "lpm_autotest",
+       .callback = test_lpm,
+};
+REGISTER_TEST_COMMAND(lpm_cmd);