From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: [RFC] pci: force address of mappings in secondary process Date: Mon, 10 Jul 2017 18:12:42 -0700 Message-ID: <20170711011242.4606-1-stephen@networkplumber.org> Cc: Stephen Hemminger To: dev@dpdk.org Return-path: Received: from mail-pg0-f41.google.com (mail-pg0-f41.google.com [74.125.83.41]) by dpdk.org (Postfix) with ESMTP id 081CC532D for ; Tue, 11 Jul 2017 03:12:51 +0200 (CEST) Received: by mail-pg0-f41.google.com with SMTP id j186so57795036pge.2 for ; Mon, 10 Jul 2017 18:12:51 -0700 (PDT) List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" The PCI memory resources in the secondary process should be in the exact same location as the primary process. Otherwise there is a risk of a stray pointer. Not sure if this is right, but it looks like a potential problem. --- lib/librte_eal/common/eal_common_pci_uio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librte_eal/common/eal_common_pci_uio.c b/lib/librte_eal/common/eal_common_pci_uio.c index 367a6816dcb8..2156b1a436c4 100644 --- a/lib/librte_eal/common/eal_common_pci_uio.c +++ b/lib/librte_eal/common/eal_common_pci_uio.c @@ -77,7 +77,7 @@ pci_uio_map_secondary(struct rte_pci_device *dev) void *mapaddr = pci_map_resource(uio_res->maps[i].addr, fd, (off_t)uio_res->maps[i].offset, - (size_t)uio_res->maps[i].size, 0); + (size_t)uio_res->maps[i].size, MAP_FIXED); /* fd is not needed in slave process, close it */ close(fd); if (mapaddr != uio_res->maps[i].addr) { -- 2.11.0