From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f196.google.com (mail-wr0-f196.google.com [209.85.128.196]) by dpdk.org (Postfix) with ESMTP id 906BD1DBA for ; Mon, 30 Apr 2018 16:42:49 +0200 (CEST) Received: by mail-wr0-f196.google.com with SMTP id g21-v6so8284454wrb.8 for ; Mon, 30 Apr 2018 07:42:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=E7jdqXS2HpZoBrgKPPML13IiTaYWwBN4Spd8XkMmxlg=; b=arMg4R4ZMTQkhXWVqNHaB7W5r3Mtn+nQFZM00oOqtnl/yOxO7L1BeL+sEYS/yUF/m+ sgJZE+x/IosrQj8gKKm3VOCFgjsWeWKk8b97Dmnce395RVffCDOx6fi1mclHDEnKRmec zf/uT+noj2rMZnvUsXhlCzU7iVwSODvmUH2q6Iur6gW6QEz0YgbFGuqs7Fcs3z3bFwJy hX8f4cKHYKmKIxcdZbMBV4Yksvvt2ZLu3GBWcxNXArkIwV1wiwsRpEyrtYBrGttbgMnB uL7HaiifSol2Tc1RPzUevGHmqMLRix50gqV3blKOBUZIwHLuHtS78M3oJWray8TcB/qA YvEw== 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:in-reply-to :references; bh=E7jdqXS2HpZoBrgKPPML13IiTaYWwBN4Spd8XkMmxlg=; b=f8q+Y21CO4A7qPnMDEPvZR+2ZhpsZPhOV0H4gWyQmXH5mtVY0nKLvzSAb3DJi9tWDa iKCQSLpO1AwPCpK6eDg9JODhjq3QSO3F3W/cUNbK6kDEfQGz236v3aGkB0w0uV4119pD Fse8VsztaA+3khbt646lrXu0g8WoaHqTNmg8I6R96c2Wtm+SCM+wUZi+BgtxJ3AadBwJ LZ3mTDkeo9L7NZqxdwkYHQqUGaoHZHFTv08OtR38SoTS0rkrm028hmW2P5Y1gxlkFmEw THB6Fprpmeb4fVcMpGAjLtkehIF2CLO/1k+2kAtEpRfpo0w29z5VMQ38OVHXpL2F0R4e 9IOg== X-Gm-Message-State: ALQs6tCkPOvC4Upu6Zzbd3PgwoK2P+CSIARXcanfschAzzGAqF7DLW/l SPUQsOpkG+3iGJCj2xNpWufKZVZJqS4= X-Google-Smtp-Source: AB8JxZr8priC5P17XsMKpBvcaZiH3lEkPhANOuWksVnNEaOWOH+U/zycUah7GCWlPDsFaZDXRdR9zQ== X-Received: by 2002:adf:bc0f:: with SMTP id s15-v6mr4426387wrg.58.1525099369124; Mon, 30 Apr 2018 07:42:49 -0700 (PDT) Received: from localhost ([2a00:23c5:be9a:5200:ce4c:82c0:d567:ecbb]) by smtp.gmail.com with ESMTPSA id n79sm13132115wmi.20.2018.04.30.07.42.48 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 Apr 2018 07:42:48 -0700 (PDT) From: luca.boccassi@gmail.com To: Anatoly Burakov Cc: Santosh Shukla , dpdk stable Date: Mon, 30 Apr 2018 15:40:30 +0100 Message-Id: <20180430144223.18657-15-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.14.2 In-Reply-To: <20180430144223.18657-1-luca.boccassi@gmail.com> References: <20180430140606.4615-80-luca.boccassi@gmail.com> <20180430144223.18657-1-luca.boccassi@gmail.com> Subject: [dpdk-stable] patch 'vfio: do not needlessly check for IOVA mode' has been queued to stable release 18.02.2 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: Mon, 30 Apr 2018 14:42:49 -0000 Hi, FYI, your patch has been queued to stable release 18.02.2 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 05/02/18. So please shout if anyone has objections. Thanks. Luca Boccassi --- >>From 3b25b24326726592a0ac49352c672486213f2dac Mon Sep 17 00:00:00 2001 From: Anatoly Burakov Date: Wed, 4 Apr 2018 15:40:47 +0100 Subject: [PATCH] vfio: do not needlessly check for IOVA mode [ upstream commit bef5a2d629d536a82c81c02b84684da828c0e37f ] We already set IOVA addresses of memsegs and memzones to VA address during initialization, so we don't need to check whether we're in RTE_IOVA_VA mode anywhere else. Signed-off-by: Anatoly Burakov Acked-by: Santosh Shukla --- 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 e44ae4d04..2421d513b 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.14.2