#include <rte_lcore.h>
#include <rte_debug.h>
#include <rte_memzone.h>
-#include <rte_atomic.h>
#include <rte_timer.h>
#include <rte_cycles.h>
#include <rte_mempool.h>
#include <rte_random.h>
#include "test.h"
+
+#ifdef RTE_EXEC_ENV_WINDOWS
+int
+test_timer_secondary(void)
+{
+ printf("timer_secondary not supported on Windows, skipping test\n");
+ return TEST_SKIPPED;
+}
+#else
+
#include "process.h"
#define NUM_TIMERS (1 << 20) /* ~1M timers */
mz = rte_memzone_reserve(TEST_INFO_MZ_NAME, sizeof(*test_info),
SOCKET_ID_ANY, 0);
- test_info = mz->addr;
- TEST_ASSERT_NOT_NULL(test_info, "Couldn't allocate memory for "
+ TEST_ASSERT_NOT_NULL(mz, "Couldn't allocate memory for "
"test data");
+ test_info = mz->addr;
test_info->tim_mempool = rte_mempool_create("test_timer_mp",
NUM_TIMERS, sizeof(struct rte_timer), 0, 0,
int i;
mz = rte_memzone_lookup(TEST_INFO_MZ_NAME);
- test_info = mz->addr;
- TEST_ASSERT_NOT_NULL(test_info, "Couldn't lookup memzone for "
+ TEST_ASSERT_NOT_NULL(mz, "Couldn't lookup memzone for "
"test info");
+ test_info = mz->addr;
for (i = 0; i < NUM_TIMERS; i++) {
rte_mempool_get(test_info->tim_mempool, (void **)&tim);
return TEST_FAILED;
}
+#endif /* !RTE_EXEC_ENV_WINDOWS */
+
REGISTER_TEST_COMMAND(timer_secondary_autotest, test_timer_secondary);