]> git.droids-corp.org - dpdk.git/blobdiff - lib/librte_eal/linux/eal/eal.c
kni: fix build with Linux 4.9.x
[dpdk.git] / lib / librte_eal / linux / eal / eal.c
index 5879e33e565e22e746e5bc4da9efee658c5f6b1e..c4233ec3c8aced23413c35f3effa332a9b77b0d1 100644 (file)
@@ -1073,7 +1073,7 @@ rte_eal_init(int argc, char **argv)
                                 */
                                iova_mode = RTE_IOVA_VA;
                                RTE_LOG(DEBUG, EAL, "Physical addresses are unavailable, selecting IOVA as VA mode.\n");
                                 */
                                iova_mode = RTE_IOVA_VA;
                                RTE_LOG(DEBUG, EAL, "Physical addresses are unavailable, selecting IOVA as VA mode.\n");
-#if defined(RTE_LIBRTE_KNI) && LINUX_VERSION_CODE > KERNEL_VERSION(4, 9, 0)
+#if defined(RTE_LIBRTE_KNI) && LINUX_VERSION_CODE >= KERNEL_VERSION(4, 10, 0)
                        } else if (rte_eal_check_module("rte_kni") == 1) {
                                iova_mode = RTE_IOVA_PA;
                                RTE_LOG(DEBUG, EAL, "KNI is loaded, selecting IOVA as PA mode for better KNI perfomance.\n");
                        } else if (rte_eal_check_module("rte_kni") == 1) {
                                iova_mode = RTE_IOVA_PA;
                                RTE_LOG(DEBUG, EAL, "KNI is loaded, selecting IOVA as PA mode for better KNI perfomance.\n");
@@ -1090,9 +1090,9 @@ rte_eal_init(int argc, char **argv)
                                RTE_LOG(DEBUG, EAL, "IOMMU is not available, selecting IOVA as PA mode.\n");
                        }
                }
                                RTE_LOG(DEBUG, EAL, "IOMMU is not available, selecting IOVA as PA mode.\n");
                        }
                }
-#if defined(RTE_LIBRTE_KNI) && LINUX_VERSION_CODE <= KERNEL_VERSION(4, 9, 0)
+#if defined(RTE_LIBRTE_KNI) && LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
                /* Workaround for KNI which requires physical address to work
                /* Workaround for KNI which requires physical address to work
-                * in kernels <= 4.9
+                * in kernels < 4.10
                 */
                if (iova_mode == RTE_IOVA_VA &&
                                rte_eal_check_module("rte_kni") == 1) {
                 */
                if (iova_mode == RTE_IOVA_VA &&
                                rte_eal_check_module("rte_kni") == 1) {