From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH v6] vfio: Support for no-IOMMU mode Date: Thu, 28 Jan 2016 15:40:01 +0100 Message-ID: <2132629.COtjSkm5oU@xps13> References: <1453913438-22991-1-git-send-email-anatoly.burakov@intel.com> <26948068.xeVA9KiJZ0@xps13> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org To: "Burakov, Anatoly" Return-path: Received: from mail-wm0-f54.google.com (mail-wm0-f54.google.com [74.125.82.54]) by dpdk.org (Postfix) with ESMTP id 5412DC48C for ; Thu, 28 Jan 2016 15:41:13 +0100 (CET) Received: by mail-wm0-f54.google.com with SMTP id 128so13494263wmz.1 for ; Thu, 28 Jan 2016 06:41:13 -0800 (PST) In-Reply-To: List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 2016-01-28 14:16, Burakov, Anatoly: > Hi Thomas, > > > 2016-01-28 11:57, Anatoly Burakov: > > > +#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 5, 0) > > > > Why not #ifndef VFIO_NOIOMMU_IOMMU? > > It would avoid some backport issue. > > I don't see how it could. Versions post-4.5 will have VFIO_NOIOMMU_IOMMU, so no issue there. Pre-4.5 versions, whether they do or do not have VFIO_NOIOMMU_IOMMU defined, will have RTE_VFIO_NOIOMMU defined as 8 regardless. Are we sure it will ever be backported as 8? Anyway I think it's better to avoid version number checks. What happens if the feature is reverted from 4.5 as it was from 4.4?