From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from stargate3.asicdesigners.com (stargate.chelsio.com [67.207.112.58]) by dpdk.org (Postfix) with ESMTP id 840E2FFA for ; Tue, 7 Jul 2015 12:40:49 +0200 (CEST) Received: from localhost (scalar.blr.asicdesigners.com [10.193.185.94]) by stargate3.asicdesigners.com (8.13.8/8.13.8) with ESMTP id t67Aeif3010687; Tue, 7 Jul 2015 03:40:45 -0700 Date: Tue, 7 Jul 2015 16:10:38 +0530 From: Rahul Lakkireddy To: "Burakov, Anatoly" Message-ID: <20150707104036.GA20819@scalar.blr.asicdesigners.com> References: <61d1c9174f7f9159d4005dd2cea16c7719cec964.1434462470.git.rahul.lakkireddy@chelsio.com> <2eeeff646a329cca169033f541de3e96cec3a27a.1435067129.git.rahul.lakkireddy@chelsio.com> <4201419.gIoUKGuTjB@xps13> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Cc: dev , Felix Marti , Nirranjan Kirubaharan , Kumar Sanghvi Subject: Re: [dpdk-dev] [PATCH v2] vfio: Fix overflow while assigning vfio BAR region offset and size 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: Tue, 07 Jul 2015 10:40:50 -0000 Hi Anatoly, On Tue, Jul 07, 2015 at 09:08:08 +0000, Burakov, Anatoly wrote: > Hi all, > > > So, as VFIO support for 32bit systems is broken, DPDK should not configure VFIO in that case. > > ...Or no one should try and run VFIO on a 32-bit system, which should be noted in documentation. I'm a bit wary of adding special handling in this case. > > Does making the offset off_t fix the compile issues for 32 bit kernel? > Making offset off_t seems to fail for x86_x32-native-linuxapp-gcc target with the following error in 64-bit gcc, but is working fine with i686 and x86_64 targets: /home/ubuntu/dpdk/lib/librte_eal/linuxapp/eal/eal_pci_vfio.c: In function ‘pci_vfio_map_resource’: /home/ubuntu/dpdk/x86_x32-native-linuxapp-gcc/include/rte_common.h:90:30: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast] #define RTE_PTR_ADD(ptr, x) ((void*)((uintptr_t)(ptr) + (x))) ^ /home/ubuntu/dpdk/lib/librte_eal/linuxapp/eal/eal_pci_vfio.c:816:25: note: in expansion of macro ‘RTE_PTR_ADD’ void *second_addr = RTE_PTR_ADD(bar_addr, memreg[1].offset); ^ cc1: all warnings being treated as errors make[7]: *** [eal_pci_vfio.o] Error 1 make[6]: *** [eal] Error 2 make[5]: *** [linuxapp] Error 2 make[4]: *** [librte_eal] Error 2 make[3]: *** [lib] Error 2 make[2]: *** [all] Error 2 make[1]: *** [x86_x32-native-linuxapp-gcc_install] Error 2 make: *** [install] Error 2 However, unsigned long seems to be working fine for all builds. Thanks, Rahul