From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH] eal: fix compilation without VFIO Date: Fri, 13 Apr 2018 01:39:57 +0200 Message-ID: <7325634.395TUUszRC@xps> References: <20180412133422.104155-1-shahafs@mellanox.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org, Shahaf Shuler To: "Burakov, Anatoly" Return-path: Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by dpdk.org (Postfix) with ESMTP id 137751C111 for ; Fri, 13 Apr 2018 01:40:01 +0200 (CEST) In-Reply-To: List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 12/04/2018 16:13, Burakov, Anatoly: > On 12-Apr-18 2:34 PM, Shahaf Shuler wrote: > > a compilation error occurred when compiling with CONFIG_RTE_EAL_VFIO=n > > > > == Build lib/librte_eal/linuxapp/eal > > CC eal_vfio.o > > /download/dpdk/lib/librte_eal/linuxapp/eal/eal_vfio.c:1535:1: error: no > > previous prototype for 'rte_vfio_dma_map' [-Werror=missing-prototypes] > > rte_vfio_dma_map(uint64_t __rte_unused vaddr, __rte_unused uint64_t > > iova, > > ^ > > /download/dpdk/lib/librte_eal/linuxapp/eal/eal_vfio.c:1542:1: error: no > > previous prototype for 'rte_vfio_dma_unmap' [-Werror=missing-prototypes] > > rte_vfio_dma_unmap(uint64_t __rte_unused vaddr, uint64_t __rte_unused > > iova, > > ^ > > > > As there is no use for those dummy functions without VFIO removing them > > completely. > > These functions are part of public API, like rest of functions in this > header. They're in the map file. Should we perhaps go the BSD way and > provide EAL with dummy prototypes as well? See bsdapp/eal/eal.c:763 onwards. Why using dummy prototypes? Because the prototypes in rte_vfio.h are under #ifdef VFIO_PRESENT ? Is it possible to always define the prototypes in rte_vfio.h ?