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 * Checks if the machine is adequate for running the binary. If it is not, the
12 * program exits with status 1.
15 rte_cpu_check_supported(void)
17 if (!rte_cpu_is_supported())
22 rte_cpu_is_supported(void)
24 /* This is generated at compile-time by the build system */
25 static const enum rte_cpu_flag_t compile_time_flags[] = {
26 RTE_COMPILE_TIME_CPUFLAGS
28 unsigned count = RTE_DIM(compile_time_flags), i;
31 for (i = 0; i < count; i++) {
32 ret = rte_cpu_get_flag_enabled(compile_time_flags[i]);
36 "ERROR: CPU feature flag lookup failed with error %d\n",
42 "ERROR: This system does not support \"%s\".\n"
43 "Please check that RTE_MACHINE is set correctly.\n",
44 rte_cpu_get_flag_name(compile_time_flags[i]));