From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by dpdk.org (Postfix) with ESMTP id C02A34F9A; Sun, 1 Apr 2018 14:26:36 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 01 Apr 2018 05:26:35 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,391,1517904000"; d="scan'208";a="30627074" Received: from irvmail001.ir.intel.com ([163.33.26.43]) by orsmga006.jf.intel.com with ESMTP; 01 Apr 2018 05:26:33 -0700 Received: from sivswdev01.ir.intel.com (sivswdev01.ir.intel.com [10.237.217.45]) by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id w31CQXUY029401; Sun, 1 Apr 2018 13:26:33 +0100 Received: from sivswdev01.ir.intel.com (localhost [127.0.0.1]) by sivswdev01.ir.intel.com with ESMTP id w31CQXq9002037; Sun, 1 Apr 2018 13:26:33 +0100 Received: (from aburakov@localhost) by sivswdev01.ir.intel.com with LOCAL id w31CQXvO002033; Sun, 1 Apr 2018 13:26:33 +0100 From: Anatoly Burakov To: dev@dpdk.org Cc: thomas@monjalon.net, santosh.shukla@caviumnetworks.com, stable@dpdk.org Date: Sun, 1 Apr 2018 13:26:32 +0100 Message-Id: X-Mailer: git-send-email 1.7.0.7 In-Reply-To: <37c2e329be49799fae8328e4dd93e5c95da3d326.1522585461.git.anatoly.burakov@intel.com> References: <37c2e329be49799fae8328e4dd93e5c95da3d326.1522585461.git.anatoly.burakov@intel.com> In-Reply-To: <37c2e329be49799fae8328e4dd93e5c95da3d326.1522585461.git.anatoly.burakov@intel.com> References: <37c2e329be49799fae8328e4dd93e5c95da3d326.1522585461.git.anatoly.burakov@intel.com> Subject: [dpdk-stable] [PATCH 4/4] vfio: do not needlessly check for IOVA mode X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Apr 2018 12:26:37 -0000 Cc: stable@dpdk.org Signed-off-by: Anatoly Burakov --- lib/librte_eal/linuxapp/eal/eal_vfio.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/lib/librte_eal/linuxapp/eal/eal_vfio.c b/lib/librte_eal/linuxapp/eal/eal_vfio.c index e44ae4d..2421d51 100644 --- a/lib/librte_eal/linuxapp/eal/eal_vfio.c +++ b/lib/librte_eal/linuxapp/eal/eal_vfio.c @@ -681,10 +681,7 @@ vfio_type1_dma_map(int vfio_container_fd) dma_map.argsz = sizeof(struct vfio_iommu_type1_dma_map); dma_map.vaddr = ms[i].addr_64; dma_map.size = ms[i].len; - if (rte_eal_iova_mode() == RTE_IOVA_VA) - dma_map.iova = dma_map.vaddr; - else - dma_map.iova = ms[i].iova; + dma_map.iova = ms[i].iova; dma_map.flags = VFIO_DMA_MAP_FLAG_READ | VFIO_DMA_MAP_FLAG_WRITE; ret = ioctl(vfio_container_fd, VFIO_IOMMU_MAP_DMA, &dma_map); @@ -784,10 +781,7 @@ vfio_spapr_dma_map(int vfio_container_fd) dma_map.argsz = sizeof(struct vfio_iommu_type1_dma_map); dma_map.vaddr = ms[i].addr_64; dma_map.size = ms[i].len; - if (rte_eal_iova_mode() == RTE_IOVA_VA) - dma_map.iova = dma_map.vaddr; - else - dma_map.iova = ms[i].iova; + dma_map.iova = ms[i].iova; dma_map.flags = VFIO_DMA_MAP_FLAG_READ | VFIO_DMA_MAP_FLAG_WRITE; -- 2.7.4