From mboxrd@z Thu Jan 1 00:00:00 1970 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=/U7mVtcU8ijjYBGcG49uvtacFBhh8Mp374EXxFER0qg=; b=OSaSgvUr8gyVTMrkdDPidEjvNPdGZ6VSfXx9ACQjRVKQEae+/4tz/jVYV5APz/uTfO 6OnZaSNgQGPO/shfQwltJuFhzetvThbgM5Zw2CdfQd7G92RY5+F/LeIZexcONfn+m2h+ HraFfv7e5jWiO3bAWhCeT0IQbvTaRN16S8PUgoDi5Z8FXqy9Oljey7QluIskfdAJz4Ka YwQxTcCTJH/rkkKJs1SbxBOqsOzT2VboiLFg3nVN4BWYASjmwFLsf3JIx6+o8cY78zTa sWJsgtNg+B7VJKFwGxrLeRjcACpZnCpQqn7BqFOn7+yjQwjINBok4sfipDdLAGTMHFDA zevA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=/U7mVtcU8ijjYBGcG49uvtacFBhh8Mp374EXxFER0qg=; b=qcKmBN5ViZvvNxm/enkIVVB1mcASQHN5ugiMkotgxbzN3Ei7axCmjlfayxOWkEE3rB ey5OBngQ1Pb6Z3OlwQXOT8f/3g4nmrSyndJ9d5wKQGjw7HYYlsrjsuEx7LYheT657dQS 2jzcLQPEztKYLGDobdoKyg/OzNL8gDb931wTNjdUwkNM/AiRODf825BZiOmfCKzkpy9S ae5wmY9K7oDO7QV2m66o4AIuH1NNRKDXHOtJSToIOkasyEdOGWhTtzzsg9Sbsch7EojR v4LM/Rzgp4usUBw+u383zUcczLaGZead3/FAbLFisbOvgCsVUvz+qILK+0xh/3cEyaXt s1cw== X-Gm-Message-State: AIVw111zAYIJf5DY9PA4KoufQdnsJWlHw09xK+MTaznjjRBNrA/CEaw9 s1omJrP4xpUXLMuX+iqC6g== X-Received: by 10.84.241.198 with SMTP id t6mr21519964plm.48.1499735570891; Mon, 10 Jul 2017 18:12:50 -0700 (PDT) Received: from xeon-e3.wavecable.com (76-14-207-240.or.wavecable.com. [76.14.207.240]) by smtp.gmail.com with ESMTPSA id q67sm28569161pfi.81.2017.07.10.18.12.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 10 Jul 2017 18:12:49 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Date: Mon, 10 Jul 2017 18:12:42 -0700 Message-Id: <20170711011242.4606-1-stephen@networkplumber.org> X-Mailer: git-send-email 2.11.0 Subject: [dpdk-dev] [RFC] pci: force address of mappings in secondary process 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: Tue, 11 Jul 2017 01:12:52 -0000 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