1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2010-2014 Intel Corporation
7 #include <rte_common.h>
8 #include <rte_cpuflags.h>
11 rte_cpu_is_supported(void)
13 /* This is generated at compile-time by the build system */
14 static const enum rte_cpu_flag_t compile_time_flags[] = {
15 RTE_COMPILE_TIME_CPUFLAGS
17 unsigned count = RTE_DIM(compile_time_flags), i;
20 for (i = 0; i < count; i++) {
21 ret = rte_cpu_get_flag_enabled(compile_time_flags[i]);
25 "ERROR: CPU feature flag lookup failed with error %d\n",
31 "ERROR: This system does not support \"%s\".\n"
32 "Please check that RTE_MACHINE is set correctly.\n",
33 rte_cpu_get_flag_name(compile_time_flags[i]));