From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id A7E641C090 for ; Thu, 12 Apr 2018 16:13:27 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Apr 2018 07:13:24 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,441,1517904000"; d="scan'208";a="216078311" Received: from aburakov-mobl.ger.corp.intel.com (HELO [10.237.220.128]) ([10.237.220.128]) by orsmga005.jf.intel.com with ESMTP; 12 Apr 2018 07:13:23 -0700 To: Shahaf Shuler , thomas@monjalon.net Cc: dev@dpdk.org References: <20180412133422.104155-1-shahafs@mellanox.com> From: "Burakov, Anatoly" Message-ID: Date: Thu, 12 Apr 2018 15:13:22 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <20180412133422.104155-1-shahafs@mellanox.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH] eal: fix compilation without 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: Thu, 12 Apr 2018 14:13:28 -0000 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. > > Fixes: 73a639085938 ("vfio: allow to map other memory regions") > Cc: anatoly.burakov@intel.com > > Signed-off-by: Shahaf Shuler > --- > lib/librte_eal/linuxapp/eal/eal_vfio.c | 16 ---------------- > 1 file changed, 16 deletions(-) > > diff --git a/lib/librte_eal/linuxapp/eal/eal_vfio.c b/lib/librte_eal/linuxapp/eal/eal_vfio.c > index 589d7d4787..4163bd4e08 100644 > --- a/lib/librte_eal/linuxapp/eal/eal_vfio.c > +++ b/lib/librte_eal/linuxapp/eal/eal_vfio.c > @@ -1529,20 +1529,4 @@ rte_vfio_noiommu_is_enabled(void) > return c == 'Y'; > } > > -#else > - > -int __rte_experimental > -rte_vfio_dma_map(uint64_t __rte_unused vaddr, __rte_unused uint64_t iova, > - __rte_unused uint64_t len) > -{ > - return -1; > -} > - > -int __rte_experimental > -rte_vfio_dma_unmap(uint64_t __rte_unused vaddr, uint64_t __rte_unused iova, > - __rte_unused uint64_t len) > -{ > - return -1; > -} > - > #endif > 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. -- Thanks, Anatoly