From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ubuntu (host217-39-174-19.in-addr.btopenworld.com [217.39.174.19]) by dpdk.org (Postfix) with SMTP id 34FFEC682 for ; Thu, 25 Jun 2015 16:42:15 +0200 (CEST) Received: by ubuntu (Postfix, from userid 5466) id 1CF72EF18E; Thu, 25 Jun 2015 15:42:14 +0100 (BST) From: "Alejandro.Lucero" To: dev@dpdk.org Date: Thu, 25 Jun 2015 15:42:14 +0100 Message-Id: <1435243334-4566-1-git-send-email-alejandro.lucero@netronome.com> X-Mailer: git-send-email 1.7.9.5 Subject: [dpdk-dev] [PATCH] vfio-pci: Fixing type used to unsigned long 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: Thu, 25 Jun 2015 14:42:15 -0000 From: "Alejandro.Lucero" VFIO kernel driver and mmap system call expect offset and size being 64 bits. Due to this bug BAR index info given to the VFIO driver is always 0 when checking validity of resources mapping. --- lib/librte_eal/linuxapp/eal/eal_pci_vfio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librte_eal/linuxapp/eal/eal_pci_vfio.c b/lib/librte_eal/linuxapp/eal/eal_pci_vfio.c index aea1fb1..29d8806 100644 --- a/lib/librte_eal/linuxapp/eal/eal_pci_vfio.c +++ b/lib/librte_eal/linuxapp/eal/eal_pci_vfio.c @@ -728,7 +728,7 @@ pci_vfio_map_resource(struct rte_pci_device *dev) struct vfio_region_info reg = { .argsz = sizeof(reg) }; void *bar_addr; struct memreg { - uint32_t offset, size; + unsigned long offset, size; } memreg[2] = {}; reg.index = i; -- 1.7.9.5