From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id C4737C48C for ; Thu, 28 Jan 2016 16:00:27 +0100 (CET) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga103.fm.intel.com with ESMTP; 28 Jan 2016 07:00:23 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,358,1449561600"; d="scan'208";a="870799791" Received: from irsmsx103.ger.corp.intel.com ([163.33.3.157]) by orsmga001.jf.intel.com with ESMTP; 28 Jan 2016 07:00:21 -0800 Received: from irsmsx109.ger.corp.intel.com ([169.254.13.100]) by IRSMSX103.ger.corp.intel.com ([169.254.3.30]) with mapi id 14.03.0248.002; Thu, 28 Jan 2016 15:00:19 +0000 From: "Burakov, Anatoly" To: Thomas Monjalon Thread-Topic: [dpdk-dev] [PATCH v6] vfio: Support for no-IOMMU mode Thread-Index: AQHRWcM07051w28Q5UmitVgfAa52G58Q9IoAgAAEOfCAAAc/gIAAAOFA Date: Thu, 28 Jan 2016 15:00:19 +0000 Message-ID: References: <1453913438-22991-1-git-send-email-anatoly.burakov@intel.com> <26948068.xeVA9KiJZ0@xps13> <2132629.COtjSkm5oU@xps13> In-Reply-To: <2132629.COtjSkm5oU@xps13> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [163.33.239.180] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] [PATCH v6] vfio: Support for no-IOMMU mode X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jan 2016 15:00:28 -0000 > > 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. >=20 > Are we sure it will ever be backported as 8? > Anyway I think it's better to avoid version number checks. Is there a precedent of kernel API definitions ever changing in backports? = Presumably whoever backports the changes is interested in making them as co= mpatible as possible, so I believe it's a safe bet to make. I have no stron= g opinion for or against this way of doing things, but if we're taking issu= e with kernel version checks, we probably should also adapt all the other s= tuff in the eal_vfio.h that does things in the exact same manner. > What happens if the feature is reverted from 4.5 as it was from 4.4? Well then we have to wait until NOIOMMU makes it into official kernel befor= e applying this patch. There's nothing we can do about that. If the patch g= ets reverted, then defining NOIOMMU as 8 will be wrong regardless of whethe= r there's a kernel version check. Thanks, Anatoly