From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f53.google.com (mail-wm0-f53.google.com [74.125.82.53]) by dpdk.org (Postfix) with ESMTP id 1B8EDC45A for ; Thu, 28 Jan 2016 14:28:40 +0100 (CET) Received: by mail-wm0-f53.google.com with SMTP id p63so24740291wmp.1 for ; Thu, 28 Jan 2016 05:28:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:organization:user-agent :in-reply-to:references:mime-version:content-transfer-encoding :content-type; bh=TpH1A2gh6h2hjWmglcF4687/Vs+EZsaHK5LWvSIK2Kw=; b=c9Ux8WyXCYmnYI/H3qLbqDBXRPqY9UK7VQdgnV4LHFTU45nPYd+mSNRby++lHUFEM3 IcheWcpr0DwZJVuzjAH4jZZbzR+UEBY+kA5CqQcjx09SFsgCKFOvg6CMOD9GCfVGnLGo dAGkk0o29eU6cy5yfuDa/Dsrf4Pe/s6M6oe1md6xedt+RHFfUirwUNt0BvFJzxq48FO3 aQ26U/TISThg3uZzNTXXr2rRLNkLulwxuBnxjiOKL1hhdWEI08cYpvLdqJUhZ9PsJ0dk Guq4ZYdHQ7FLaI+cuIU/ns0OpQBOXyYnO8ZbezxtBLBOkjQymoA2I5p7/0/xNLLODfe8 pasQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:organization :user-agent:in-reply-to:references:mime-version :content-transfer-encoding:content-type; bh=TpH1A2gh6h2hjWmglcF4687/Vs+EZsaHK5LWvSIK2Kw=; b=IE/lmJtWr+iBcI6HOqLaJwfYFEzg/ZyC/GVOUU4o3SxQrN9pLxgv5hdXIyPLgKx4od cPnPVZdIjFCk/GaWPq4ZYqSmUMofjsvXU5lWlD57juNw1WjBd+/tF+an+lwTNq/RjGsT y8g5Sg7XX9UNXUn0fymKoqG/UkF/lveUjMYbOVuEs60NgdupHO4roMNrHynRplbi2seO Ov/A1XcbPMOiCLGViMQ5KvNnfEHdM8RwCo3eYxmOaQfHqPYRpuPRGQ4KwDXR8UCMfw9K oj1vfapcm41tdbfJdhimb0flpLtfpM+I29WUq9PWZrdZlpQUh3rJ9yysRGtZaWVg+0KR lQjw== X-Gm-Message-State: AG10YORfjHBZqGRpw9ydKDcdaK9/kmCExukk/e4568moEEu4JL2wEVIKBNM69NI+gj3XDGam X-Received: by 10.28.107.81 with SMTP id g78mr3059572wmc.16.1453987719910; Thu, 28 Jan 2016 05:28:39 -0800 (PST) Received: from xps13.localnet (136-92-190-109.dsl.ovh.fr. [109.190.92.136]) by smtp.gmail.com with ESMTPSA id e77sm2873006wma.18.2016.01.28.05.28.38 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 28 Jan 2016 05:28:39 -0800 (PST) From: Thomas Monjalon To: "Burakov, Anatoly" Date: Thu, 28 Jan 2016 14:27:28 +0100 Message-ID: <11561920.qTvBVVv5us@xps13> Organization: 6WIND User-Agent: KMail/4.14.10 (Linux/4.1.6-1-ARCH; KDE/4.14.11; x86_64; ; ) In-Reply-To: References: <1453905124-28544-1-git-send-email-anatoly.burakov@intel.com> <7496408.z4nt1qSYiL@xps13> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH v5] 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 13:28:40 -0000 2016-01-28 10:03, Burakov, Anatoly: > > 2016-01-27 16:50, Anatoly Burakov: > > > --- a/lib/librte_eal/linuxapp/eal/eal_vfio.h > > > +++ b/lib/librte_eal/linuxapp/eal/eal_vfio.h > > > +/* older kernels may not have no-IOMMU mode */ #ifndef > > > +VFIO_NOIOMMU_IOMMU #define VFIO_NOIOMMU_IOMMU 8 #endif > > > > Shouldn't it be defined privately in .c file? > > We already have other VFIO-related definitions in that file, specifically the PCI defines that aren't present in earlier kernels. This definition is similar in nature - it will be present in kernels starting from 4.5 (when NOIOMMU was introduced), but earlier kernels will need this defined. I didn't want to go similar route with redefining everything VFIO-related, but maybe it makes sense in this case for consistency's sake? E.g. > > #define RTE_VFIO_TYPE1 VFIO_TYPE1_IOMMU [we're already in an ifdef linux >= 3.6, so define type1 unconditionally] > #if linux < 4.5 > #define RTE_VFIO_NOIOMMU 8 > #else > #define RTE_VFIO_NOIOMMU VFIO_NOIOMMU_IOMMU > #endif > > Or something like that? OK you can keep it as is or define a RTE constant. Up to you.