summaryrefslogtreecommitdiffstats
path: root/src/spdk/dpdk/app/test/test_prefetch.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/spdk/dpdk/app/test/test_prefetch.c')
-rw-r--r--src/spdk/dpdk/app/test/test_prefetch.c32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/spdk/dpdk/app/test/test_prefetch.c b/src/spdk/dpdk/app/test/test_prefetch.c
new file mode 100644
index 000000000..41f219af7
--- /dev/null
+++ b/src/spdk/dpdk/app/test/test_prefetch.c
@@ -0,0 +1,32 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2010-2014 Intel Corporation
+ */
+
+#include <stdio.h>
+#include <stdint.h>
+
+#include <rte_prefetch.h>
+
+#include "test.h"
+
+/*
+ * Prefetch test
+ * =============
+ *
+ * - Just test that the macro can be called and validate the compilation.
+ * The test always return success.
+ */
+
+static int
+test_prefetch(void)
+{
+ int a;
+
+ rte_prefetch0(&a);
+ rte_prefetch1(&a);
+ rte_prefetch2(&a);
+
+ return 0;
+}
+
+REGISTER_TEST_COMMAND(prefetch_autotest, test_prefetch);