examples: skip build when missing dependencies
[dpdk.git] / drivers / compress / isal / isal_compress_pmd.c
index 81b937e..b7ba61c 100644 (file)
@@ -5,6 +5,7 @@
 
 #include <rte_bus_vdev.h>
 #include <rte_common.h>
+#include <rte_cpuflags.h>
 #include <rte_malloc.h>
 #include <rte_mbuf.h>
 #include <rte_compressdev_pmd.h>
@@ -146,6 +147,7 @@ isal_comp_set_priv_xform_parameters(struct isal_priv_xform *priv_xform,
                                break;
                        /* Level 3 or higher requested */
                        default:
+#ifdef RTE_ARCH_X86
                                /* Check for AVX512, to use ISA-L level 3 */
                                if (rte_cpu_get_flag_enabled(
                                                RTE_CPUFLAG_AVX512F)) {
@@ -161,7 +163,9 @@ isal_comp_set_priv_xform_parameters(struct isal_priv_xform *priv_xform,
                                                RTE_COMP_ISAL_LEVEL_THREE;
                                        priv_xform->level_buffer_size =
                                                ISAL_DEF_LVL3_DEFAULT;
-                               } else {
+                               } else
+#endif
+                               {
                                        ISAL_PMD_LOG(DEBUG, "Requested ISA-L level"
                                                " 3 or above; Level 3 optimized"
                                                " for AVX512 & AVX2 only."