From patchwork Thu Jun 25 14:42:14 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alejandro Lucero X-Patchwork-Id: 5794 Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id CFE33C6AC; Thu, 25 Jun 2015 16:42:16 +0200 (CEST) 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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;