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 493F3FE5 for ; Fri, 3 Mar 2017 13:55:10 +0100 (CET) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 03 Mar 2017 04:55:09 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.35,237,1484035200"; d="scan'208";a="1118005448" Received: from irsmsx152.ger.corp.intel.com ([163.33.192.66]) by fmsmga001.fm.intel.com with ESMTP; 03 Mar 2017 04:55:07 -0800 Received: from irsmsx109.ger.corp.intel.com ([169.254.13.44]) by IRSMSX152.ger.corp.intel.com ([169.254.6.125]) with mapi id 14.03.0248.002; Fri, 3 Mar 2017 12:55:07 +0000 From: "Burakov, Anatoly" To: gowrishankar muthukrishnan , "dev@dpdk.org" CC: Chao Zhu , Thomas Monjalon , Pradeep Thread-Topic: [PATCH v2] eal: sPAPR IOMMU support in pci probing for vfio-pci in ppc64le Thread-Index: AQHSk9CoFsU4cgVwXUGC61CjFoWER6GC0iHQgAA6eICAAAEPAA== Date: Fri, 3 Mar 2017 12:55:06 +0000 Message-ID: References: <89825b7a9e0758dea19a01eb347c0753bf2c4134.1488480000.git.gowrishankar.m@linux.vnet.ibm.com> <71ab9f24-4e52-dff8-edde-9374eb8c8d81@linux.vnet.ibm.com> In-Reply-To: <71ab9f24-4e52-dff8-edde-9374eb8c8d81@linux.vnet.ibm.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ctpclassification: CTP_PUBLIC x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZWVmNzhmMGEtNjUzYS00NjBkLTljZTItMzFmMTQyYTMwY2Y1IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX1BVQkxJQyJ9XX1dfSwiU3ViamVjdExhYmVscyI6W10sIlRNQ1ZlcnNpb24iOiIxNi41LjkuMyIsIlRydXN0ZWRMYWJlbEhhc2giOiJzRTdqNUsxRVJpVmJWQlBnSFJxZGZQVkFBYzdOZlZOWDBkb09pYWMzME1JPSJ9 x-originating-ip: [163.33.239.182] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v2] eal: sPAPR IOMMU support in pci probing for vfio-pci in ppc64le X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Mar 2017 12:55:10 -0000 Hi Gowrishankar, > Hi Anatoly, >=20 >=20 > On Friday 03 March 2017 02:38 PM, Burakov, Anatoly wrote: > > > > Please correct me if I'm wrong here, but wouldn't all of these > > SPAPR-specific defines and structures not be available for pre-4.2? So > > the kernel check should also contain all the definitions and structs > > as well. Maybe it's better to just not compile SPAPR support on older > kernels, rather than duplicating all the VFIO code. > > > > Any opinions? > > > > > Thanks for this check. >=20 > As far as its trace in linux main stream, I see it was merged in 4.2. > But, it depends on distro when we go back in older kernels. > Some distros may have back-ported it too - eg. linux-3.10.0-514.6.2.el7 i= n > RHEL 7.2 supports it. So, we might realise whether not supported, only in= run > time (atleast without autoconf sort of stuff in dpdk) IMO. > any thoughts ?. >=20 > Regards, > Gowrishankar I guess the best way to go would be something like: #ifndef SPAPR_IOMMU_TYPE #define RTE_SPAPR_IOMMU 6 #define SPAPR_MAP_FOO bar struct spapr_foo {}; struct spapr_bar {}; #else #define RTE_SPAPR_IOMMU SPAPR_IOMMU_TYPE #endif Even though it's a bit messy, this way we won't be dependent on kernel vers= ion or if any distro has backported SPAPR support. Does that sound reasonab= le? Thanks, Anatoly