From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 0F532A00E6 for ; Fri, 14 Jun 2019 11:39:46 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 692B31D4F6; Fri, 14 Jun 2019 11:39:45 +0200 (CEST) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 3D5B31D4B6 for ; Fri, 14 Jun 2019 11:39:44 +0200 (CEST) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 77E62307D90D; Fri, 14 Jun 2019 09:39:43 +0000 (UTC) Received: from dmarchan.remote.csb (unknown [10.40.205.71]) by smtp.corp.redhat.com (Postfix) with ESMTP id 74CFF6C357; Fri, 14 Jun 2019 09:39:36 +0000 (UTC) From: David Marchand To: dev@dpdk.org Cc: benjamin.walker@intel.com, jerinj@marvell.com, anatoly.burakov@intel.com, maxime.coquelin@redhat.com, thomas@monjalon.net Date: Fri, 14 Jun 2019 11:39:14 +0200 Message-Id: <1560505157-9769-1-git-send-email-david.marchand@redhat.com> In-Reply-To: <20190530174819.1160221-1-benjamin.walker@intel.com> References: <20190530174819.1160221-1-benjamin.walker@intel.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.48]); Fri, 14 Jun 2019 09:39:43 +0000 (UTC) Subject: [dpdk-dev] [PATCH v2 0/3] Improve automatic selection of IOVA mode 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" In SPDK, not all drivers are registered with DPDK at start up time. Previously, that meant DPDK always chose to set itself up in IOVA_PA mode. Instead, when the correct iova choice is unclear based on the devices and drivers known to DPDK at start up time, use other heuristics (such as whether /proc/self/pagemap is accessible) to make a better choice. This enables SPDK to run as an unprivileged user again without requiring users to explicitly set the iova mode on the command line. Changelog since v1: - I took over the series following experiments and discussions with Ben and others, squashed Ben patches as two patches focusing on the main issues, - introduced a fix on KNI, - on the EAL bits, - added log on which IOVA mode has been selected, - updated BSD EAL, - in Linux EAL, moved KNI special case after IOVA selection, - in Linux EAL, added check on forced mode wrt physical addresses availability, - on the PCI bus driver bits, - enforced the checks in the common code of the PCI bus, - added debug logs to track why a iova mode has been chosen per device, - added BSD part, - in Linux part, checked that VFIO is enabled, - in Linux part, defaulted to DC if a driver supports both PA and VA, -- David Marchand Ben Walker (2): eal: compute IOVA mode based on PA availability bus/pci: only consider usable devices to select IOVA mode David Marchand (1): kni: refuse to initialise when IOVA is not PA drivers/bus/pci/bsd/pci.c | 9 +- drivers/bus/pci/linux/pci.c | 191 +++++++++----------------------- drivers/bus/pci/pci_common.c | 65 +++++++++++ drivers/bus/pci/private.h | 8 ++ lib/librte_eal/common/eal_common_bus.c | 4 - lib/librte_eal/common/include/rte_bus.h | 2 +- lib/librte_eal/freebsd/eal/eal.c | 10 +- lib/librte_eal/linux/eal/eal.c | 38 +++++-- lib/librte_eal/linux/eal/eal_memory.c | 46 ++------ lib/librte_kni/rte_kni.c | 5 + 10 files changed, 187 insertions(+), 191 deletions(-) -- 1.8.3.1