* Copyright(c) 2018 Intel Corporation
*/
+#include "test.h"
+
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <fcntl.h>
+
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+test_external_mem(void)
+{
+ printf("external_mem not supported on Windows, skipping test\n");
+ return TEST_SKIPPED;
+}
+
+#else
+
#include <sys/mman.h>
#include <sys/wait.h>
#include <rte_common.h>
#include <rte_debug.h>
#include <rte_eal.h>
-#include <rte_eal_memconfig.h>
+#include <rte_eal_paging.h>
#include <rte_errno.h>
#include <rte_malloc.h>
#include <rte_ring.h>
#include <rte_string_fns.h>
-#include "test.h"
-
#define EXTERNAL_MEM_SZ (RTE_PGSIZE_4K << 10) /* 4M of data */
static int
static int
test_external_mem(void)
{
+ size_t pgsz = rte_mem_page_size();
size_t len = EXTERNAL_MEM_SZ;
- size_t pgsz = RTE_PGSIZE_4K;
rte_iova_t iova[len / pgsz];
void *addr;
int ret, n_pages;
return ret;
}
+#endif /* !RTE_EXEC_ENV_WINDOWS */
+
REGISTER_TEST_COMMAND(external_mem_autotest, test_external_mem);