From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by dpdk.org (Postfix) with ESMTP id C18A97D30 for ; Mon, 16 Apr 2018 13:55:37 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 3450021C6E; Mon, 16 Apr 2018 07:55:37 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Mon, 16 Apr 2018 07:55:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=mesmtp; bh=+OPdh5JSXXkdWCa/WdcZTpu/53 JU/+73ZPU4anD80vA=; b=Pdq9HRkDiB5a4CFkB9NH+oLhsx/3YA+qtxEbkNqewC 1gT4BXYTY0GX/F5NJpxRj9CT5EAYkmyHoa8JRd31z7s/Y3lT6JTgIVb+YyYskIDM OkzhXRjQGvdMD9nvPHwUOmwUQqdwJyx7SaC3fMtvPY7u+wFY1/EHQ81gB45e1MEe U= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=+OPdh5 JSXXkdWCa/WdcZTpu/53JU/+73ZPU4anD80vA=; b=VHqRiDbqU+44nxTE+ppF66 hnLRtgWNb21pu18Zzd/o6yO+TL9dtjV0JTApcETWV8SJBIwwBdGT4dPbmVwwUDJU Mytn0Jko0OFaf3Meum8URSZWQ1ODrefXLFQUWndPfM2KRlp5RHb3m2LUgf8+RCQz WD5Qa3a2jQZ53IfhMSJQqOKpqFJTG7r5PS/7ITq3CCqowDQle3lsnPnDiE8E4KPB Y7aAMFOL/LFYiuI0M2B4gJL9AgTqfWFqt4oJYXCiTitVJaUHzula9xmtaTdWyOcm mRIECLFfOmT5t0ho2xAnt37T187jm3fMdMeqHmjj81UqMPPMfQpc001NtEVmrbAA == X-ME-Sender: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 3A94BE43E8; Mon, 16 Apr 2018 07:55:36 -0400 (EDT) From: Thomas Monjalon To: Anatoly Burakov Cc: dev@dpdk.org, Bruce Richardson , shahafs@mellanox.com, hemant.agrawal@nxp.com, gaetan.rivet@6wind.com Date: Mon, 16 Apr 2018 13:55:35 +0200 Message-ID: <2776485.EdHvyZj5u1@xps> In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH] eal/vfio: export all VFIO functions when not compiling VFIO 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: Mon, 16 Apr 2018 11:55:38 -0000 16/04/2018 12:59, Anatoly Burakov: > --- a/lib/librte_eal/common/include/rte_vfio.h > +++ b/lib/librte_eal/common/include/rte_vfio.h > @@ -33,10 +33,6 @@ > #define VFIO_NOIOMMU_MODE \ > "/sys/module/vfio/parameters/enable_unsafe_noiommu_mode" > > -#ifdef __cplusplus > -extern "C" { > -#endif > - > /* NOIOMMU is defined from kernel version 4.5 onwards */ > #ifdef VFIO_NOIOMMU_IOMMU > #define RTE_VFIO_NOIOMMU VFIO_NOIOMMU_IOMMU > @@ -44,6 +40,17 @@ extern "C" { > #define RTE_VFIO_NOIOMMU 8 > #endif > > +#else /* not VFIO_PRESENT */ > + > +/* we don't need an actual definition, only pointer is used */ > +struct vfio_device_info; > + > +#endif /* VFIO_PRESENT */ > + > +#ifdef __cplusplus > +extern "C" { > +#endif Why moving this extern "C"? Could it be at the top of the file? [...] > +int __rte_experimental > +rte_vfio_get_group_fd(__rte_unused int iommu_group_num) > +{ > + return -1; > +} > + > #endif This #endif needs a comment.