* Copyright(c) 2010-2014 Intel Corporation
*/
+#include "test.h"
+
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <rte_memory.h>
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_lpm6(void)
+{
+ printf("lpm6 not supported on Windows, skipping test\n");
+ return TEST_SKIPPED;
+}
+
+#else
+
#include <rte_lpm6.h>
-#include "test.h"
#include "test_lpm6_data.h"
#define TEST_LPM_ASSERT(cond) do { \
status = rte_lpm6_add(NULL, ip, depth, next_hop);
TEST_LPM_ASSERT(status < 0);
- /*Create vaild lpm to use in rest of test. */
+ /*Create valid lpm to use in rest of test. */
lpm = rte_lpm6_create(__func__, SOCKET_ID_ANY, &config);
TEST_LPM_ASSERT(lpm != NULL);
status = rte_lpm6_delete(NULL, ip, depth);
TEST_LPM_ASSERT(status < 0);
- /*Create vaild lpm to use in rest of test. */
+ /*Create valid lpm to use in rest of test. */
lpm = rte_lpm6_create(__func__, SOCKET_ID_ANY, &config);
TEST_LPM_ASSERT(lpm != NULL);
status = rte_lpm6_lookup(NULL, ip, &next_hop_return);
TEST_LPM_ASSERT(status < 0);
- /*Create vaild lpm to use in rest of test. */
+ /*Create valid lpm to use in rest of test. */
lpm = rte_lpm6_create(__func__, SOCKET_ID_ANY, &config);
TEST_LPM_ASSERT(lpm != NULL);
status = rte_lpm6_lookup_bulk_func(NULL, ip, next_hop_return, 10);
TEST_LPM_ASSERT(status < 0);
- /*Create vaild lpm to use in rest of test. */
+ /*Create valid lpm to use in rest of test. */
lpm = rte_lpm6_create(__func__, SOCKET_ID_ANY, &config);
TEST_LPM_ASSERT(lpm != NULL);
status = rte_lpm6_delete_bulk_func(NULL, ip, depth, 10);
TEST_LPM_ASSERT(status < 0);
- /*Create vaild lpm to use in rest of test. */
+ /*Create valid lpm to use in rest of test. */
lpm = rte_lpm6_create(__func__, SOCKET_ID_ANY, &config);
TEST_LPM_ASSERT(lpm != NULL);
/*
* Call add, lookup and delete for a single rule with depth < 24.
* Check all the combinations for the first three bytes that result in a hit.
- * Delete the rule and check that the same test returs a miss.
+ * Delete the rule and check that the same test returns a miss.
*/
int32_t
test9(void)
* Call add, lookup and delete for a single rule with maximum 21bit next_hop
* size.
* Check that next_hop returned from lookup is equal to provisioned value.
- * Delete the rule and check that the same test returs a miss.
+ * Delete the rule and check that the same test returns a miss.
*/
int32_t
test28(void)
return global_status;
}
+#endif /* !RTE_EXEC_ENV_WINDOWS */
+
REGISTER_TEST_COMMAND(lpm6_autotest, test_lpm6);