From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) by dpdk.org (Postfix) with ESMTP id A84031B1B6 for ; Wed, 24 Jan 2018 16:37:33 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 5C0A1223B5; Wed, 24 Jan 2018 10:37:33 -0500 (EST) Received: from frontend1 ([10.202.2.160]) by compute1.internal (MEProxy); Wed, 24 Jan 2018 10:37:33 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fridaylinux.org; h=cc:date:from:in-reply-to:message-id:references:subject:to :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=viJn45BWjk4r191JI JZS/013QmFjPV/9uyIlVoNUmL4=; b=nk7s6SoiHXswm3rvVIZbzY1i0GTQH+WpC vRz0x9QRfy22MjxKY52V0w7bUcFk+3UEIThkoKJAr0sJ4jQKnbxrecQLDOPktnUf KReYS3Xb0NWVU38GCW8OUy/M/iuS3i1ZL1UFjgAjATrQzW/fp5+UUKBB7+zAIyWV QKcyysRe3kVgrRCLXRJ3odUCpxvAk8f1MINO7LAzrj/P/2bDDghBq6ucp2TdzAqn us0NB82gO4szXJHIXCHnlmtz+HgknZgVrSXF0z1rrJzQ7MgUZWjOTFFnc1HSKRn1 dYFOeV7M27OuKcgHsMgcqAG4r86ZwsLhuynAPo/2BCMih7A3qnfQQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:date:from:in-reply-to:message-id :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=viJn45BWjk4r191JIJZS/013QmFjPV/9uyIlVoNUmL4=; b=fZLfbvib +o6JwLgvugdrNPuTdC41oRrZLv38bVq3XaLztIinm5CLR1k3nrIU9PlJ7AoyUUF3 3nh0cBMY8DIv74Tnj9idGTdQKo0IiduwmvQNzmexxgb9syvkrwGl9+mJHFizUBnc 1Zsv3yfGjRplLzDdToPSBSSj52W6I7QNkDimGO/mQ0ITiyRbDhtCdhqbOkkIoHMl BgTGZzPacLQeQtvYmVvPgPE9f92zYOFFhjl1L2mmxNHf8MTSFpqsGwJifJz7M1u6 XxccsmqSLysRakVAyrD2taR9RbbxhN2aau7JYcaLjAZVOo4uGfF69EFXwfvuKLf9 RchisRivCBQJhg== X-ME-Sender: Received: from localhost.localdomain (unknown [115.150.27.206]) by mail.messagingengine.com (Postfix) with ESMTPA id 39A1E7E1A2; Wed, 24 Jan 2018 10:37:30 -0500 (EST) From: Yuanhan Liu To: Hemant Agrawal Cc: Santosh Shukla , dpdk stable Date: Wed, 24 Jan 2018 23:31:47 +0800 Message-Id: <1516808026-25523-39-git-send-email-yliu@fridaylinux.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1516808026-25523-1-git-send-email-yliu@fridaylinux.org> References: <1516808026-25523-1-git-send-email-yliu@fridaylinux.org> Subject: [dpdk-stable] patch 'drivers: change the deprecated memseg physaddr to IOVA' has been queued to LTS release 17.11.1 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: Wed, 24 Jan 2018 15:37:33 -0000 Hi, FYI, your patch has been queued to LTS release 17.11.1 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 01/26/18. So please shout if anyone has objections. Thanks. --yliu --- >>From 32509649039d1c1334644891ba5ab7aa8e1df59b Mon Sep 17 00:00:00 2001 From: Hemant Agrawal Date: Fri, 8 Dec 2017 10:51:15 +0530 Subject: [PATCH] drivers: change the deprecated memseg physaddr to IOVA [ upstream commit 2aab833725cced38cd2596940f58c89857f7ec03 ] DPAA and DPAA2 drivers were using memseg physaddr, which has been deprecated. Fixes: 7ba49d39f14c ("mem: rename segment address from physical to IOVA") Signed-off-by: Hemant Agrawal Acked-by: Santosh Shukla --- drivers/bus/dpaa/rte_dpaa_bus.h | 6 +++--- drivers/bus/fslmc/fslmc_vfio.c | 2 +- drivers/bus/fslmc/portal/dpaa2_hw_pvt.h | 8 ++++---- drivers/crypto/dpaa_sec/dpaa_sec.c | 8 ++++---- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/drivers/bus/dpaa/rte_dpaa_bus.h b/drivers/bus/dpaa/rte_dpaa_bus.h index eafc944..bc933af 100644 --- a/drivers/bus/dpaa/rte_dpaa_bus.h +++ b/drivers/bus/dpaa/rte_dpaa_bus.h @@ -113,10 +113,10 @@ static inline void *rte_dpaa_mem_ptov(phys_addr_t paddr) int i; for (i = 0; i < RTE_MAX_MEMSEG && memseg[i].addr != NULL; i++) { - if (paddr >= memseg[i].phys_addr && paddr < - memseg[i].phys_addr + memseg[i].len) + if (paddr >= memseg[i].iova && paddr < + memseg[i].iova + memseg[i].len) return (uint8_t *)(memseg[i].addr) + - (paddr - memseg[i].phys_addr); + (paddr - memseg[i].iova); } return NULL; diff --git a/drivers/bus/fslmc/fslmc_vfio.c b/drivers/bus/fslmc/fslmc_vfio.c index 7831201..a936321 100644 --- a/drivers/bus/fslmc/fslmc_vfio.c +++ b/drivers/bus/fslmc/fslmc_vfio.c @@ -249,7 +249,7 @@ int rte_fslmc_vfio_dmamap(void) dma_map.size = memseg[i].len; dma_map.vaddr = memseg[i].addr_64; #ifdef RTE_LIBRTE_DPAA2_USE_PHYS_IOVA - dma_map.iova = memseg[i].phys_addr; + dma_map.iova = memseg[i].iova; #else dma_map.iova = dma_map.vaddr; #endif diff --git a/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h b/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h index c1b842f..ece1a7d 100644 --- a/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h +++ b/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h @@ -284,10 +284,10 @@ static void *dpaa2_mem_ptov(phys_addr_t paddr) int i; for (i = 0; i < RTE_MAX_MEMSEG && memseg[i].addr_64 != 0; i++) { - if (paddr >= memseg[i].phys_addr && - (char *)paddr < (char *)memseg[i].phys_addr + memseg[i].len) + if (paddr >= memseg[i].iova && + (char *)paddr < (char *)memseg[i].iova + memseg[i].len) return (void *)(memseg[i].addr_64 - + (paddr - memseg[i].phys_addr)); + + (paddr - memseg[i].iova)); } return NULL; } @@ -301,7 +301,7 @@ static phys_addr_t dpaa2_mem_vtop(uint64_t vaddr) for (i = 0; i < RTE_MAX_MEMSEG && memseg[i].addr_64 != 0; i++) { if (vaddr >= memseg[i].addr_64 && vaddr < memseg[i].addr_64 + memseg[i].len) - return memseg[i].phys_addr + return memseg[i].iova + (vaddr - memseg[i].addr_64); } return (phys_addr_t)(NULL); diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c index 16155b1..438dd3b 100644 --- a/drivers/crypto/dpaa_sec/dpaa_sec.c +++ b/drivers/crypto/dpaa_sec/dpaa_sec.c @@ -121,7 +121,7 @@ dpaa_mem_vtop(void *vaddr) for (i = 0; i < RTE_MAX_MEMSEG && memseg[i].addr_64 != 0; i++) { if (vaddr_64 >= memseg[i].addr_64 && vaddr_64 < memseg[i].addr_64 + memseg[i].len) { - paddr = memseg[i].phys_addr + + paddr = memseg[i].iova + (vaddr_64 - memseg[i].addr_64); return (rte_iova_t)paddr; @@ -137,10 +137,10 @@ dpaa_mem_ptov(rte_iova_t paddr) int i; for (i = 0; i < RTE_MAX_MEMSEG && memseg[i].addr_64 != 0; i++) { - if (paddr >= memseg[i].phys_addr && - (char *)paddr < (char *)memseg[i].phys_addr + memseg[i].len) + if (paddr >= memseg[i].iova && + (char *)paddr < (char *)memseg[i].iova + memseg[i].len) return (void *)(memseg[i].addr_64 + - (paddr - memseg[i].phys_addr)); + (paddr - memseg[i].iova)); } return NULL; } -- 2.7.4