From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 324BB1B107 for ; Wed, 21 Nov 2018 17:51:04 +0100 (CET) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 8807B3168596; Wed, 21 Nov 2018 16:51:03 +0000 (UTC) Received: from ktraynor.remote.csb (unknown [10.36.118.7]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7F96F5C21E; Wed, 21 Nov 2018 16:51:02 +0000 (UTC) From: Kevin Traynor To: Xiao Wang Cc: Xiaolong Ye , dpdk stable Date: Wed, 21 Nov 2018 16:48:18 +0000 Message-Id: <20181121164828.32249-64-ktraynor@redhat.com> In-Reply-To: <20181121164828.32249-1-ktraynor@redhat.com> References: <20181121164828.32249-1-ktraynor@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.41]); Wed, 21 Nov 2018 16:51:03 +0000 (UTC) Subject: [dpdk-stable] patch 'net/ifc: fix address translation function name' has been queued to stable release 18.08.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, 21 Nov 2018 16:51:04 -0000 Hi, FYI, your patch has been queued to stable release 18.08.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 11/27/18. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. If the code is different (ie: not only metadata diffs), due for example to a change in context or macro names, please double check it. Thanks. Kevin Traynor --- >>From 85caea0e16c6e040584cbdaf5799049f635d3c1c Mon Sep 17 00:00:00 2001 From: Xiao Wang Date: Tue, 25 Sep 2018 11:10:01 +0800 Subject: [PATCH] net/ifc: fix address translation function name [ upstream commit 3e2923cffac1459a65f5584cc851d27b0ed0865c ] The address translation from user virtual address to guest physical address should not be named as qva_to_gpa. Fixes: a3f8150eac6d ("net/ifcvf: add ifcvf vDPA driver") Signed-off-by: Xiao Wang Acked-by: Xiaolong Ye --- drivers/net/ifc/ifcvf_vdpa.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/net/ifc/ifcvf_vdpa.c b/drivers/net/ifc/ifcvf_vdpa.c index b9d006814..a11a2ec0d 100644 --- a/drivers/net/ifc/ifcvf_vdpa.c +++ b/drivers/net/ifc/ifcvf_vdpa.c @@ -206,5 +206,5 @@ exit: static uint64_t -qva_to_gpa(int vid, uint64_t qva) +hva_to_gpa(int vid, uint64_t hva) { struct rte_vhost_memory *mem = NULL; @@ -219,7 +219,7 @@ qva_to_gpa(int vid, uint64_t qva) reg = &mem->regions[i]; - if (qva >= reg->host_user_addr && - qva < reg->host_user_addr + reg->size) { - gpa = qva - reg->host_user_addr + reg->guest_phys_addr; + if (hva >= reg->host_user_addr && + hva < reg->host_user_addr + reg->size) { + gpa = hva - reg->host_user_addr + reg->guest_phys_addr; break; } @@ -247,5 +247,5 @@ vdpa_ifcvf_start(struct ifcvf_internal *internal) for (i = 0; i < nr_vring; i++) { rte_vhost_get_vhost_vring(vid, i, &vq); - gpa = qva_to_gpa(vid, (uint64_t)(uintptr_t)vq.desc); + gpa = hva_to_gpa(vid, (uint64_t)(uintptr_t)vq.desc); if (gpa == 0) { DRV_LOG(ERR, "Fail to get GPA for descriptor ring."); @@ -254,5 +254,5 @@ vdpa_ifcvf_start(struct ifcvf_internal *internal) hw->vring[i].desc = gpa; - gpa = qva_to_gpa(vid, (uint64_t)(uintptr_t)vq.avail); + gpa = hva_to_gpa(vid, (uint64_t)(uintptr_t)vq.avail); if (gpa == 0) { DRV_LOG(ERR, "Fail to get GPA for available ring."); @@ -261,5 +261,5 @@ vdpa_ifcvf_start(struct ifcvf_internal *internal) hw->vring[i].avail = gpa; - gpa = qva_to_gpa(vid, (uint64_t)(uintptr_t)vq.used); + gpa = hva_to_gpa(vid, (uint64_t)(uintptr_t)vq.used); if (gpa == 0) { DRV_LOG(ERR, "Fail to get GPA for used ring."); -- 2.19.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2018-11-21 16:44:32.695325295 +0000 +++ 0064-net-ifc-fix-address-translation-function-name.patch 2018-11-21 16:44:30.000000000 +0000 @@ -1,13 +1,14 @@ -From 3e2923cffac1459a65f5584cc851d27b0ed0865c Mon Sep 17 00:00:00 2001 +From 85caea0e16c6e040584cbdaf5799049f635d3c1c Mon Sep 17 00:00:00 2001 From: Xiao Wang Date: Tue, 25 Sep 2018 11:10:01 +0800 Subject: [PATCH] net/ifc: fix address translation function name +[ upstream commit 3e2923cffac1459a65f5584cc851d27b0ed0865c ] + The address translation from user virtual address to guest physical address should not be named as qva_to_gpa. Fixes: a3f8150eac6d ("net/ifcvf: add ifcvf vDPA driver") -Cc: stable@dpdk.org Signed-off-by: Xiao Wang Acked-by: Xiaolong Ye @@ -16,17 +17,17 @@ 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/net/ifc/ifcvf_vdpa.c b/drivers/net/ifc/ifcvf_vdpa.c -index 9d5594678..0d237ae40 100644 +index b9d006814..a11a2ec0d 100644 --- a/drivers/net/ifc/ifcvf_vdpa.c +++ b/drivers/net/ifc/ifcvf_vdpa.c -@@ -207,5 +207,5 @@ exit: +@@ -206,5 +206,5 @@ exit: static uint64_t -qva_to_gpa(int vid, uint64_t qva) +hva_to_gpa(int vid, uint64_t hva) { struct rte_vhost_memory *mem = NULL; -@@ -220,7 +220,7 @@ qva_to_gpa(int vid, uint64_t qva) +@@ -219,7 +219,7 @@ qva_to_gpa(int vid, uint64_t qva) reg = &mem->regions[i]; - if (qva >= reg->host_user_addr && @@ -37,21 +38,21 @@ + gpa = hva - reg->host_user_addr + reg->guest_phys_addr; break; } -@@ -248,5 +248,5 @@ vdpa_ifcvf_start(struct ifcvf_internal *internal) +@@ -247,5 +247,5 @@ vdpa_ifcvf_start(struct ifcvf_internal *internal) for (i = 0; i < nr_vring; i++) { rte_vhost_get_vhost_vring(vid, i, &vq); - gpa = qva_to_gpa(vid, (uint64_t)(uintptr_t)vq.desc); + gpa = hva_to_gpa(vid, (uint64_t)(uintptr_t)vq.desc); if (gpa == 0) { DRV_LOG(ERR, "Fail to get GPA for descriptor ring."); -@@ -255,5 +255,5 @@ vdpa_ifcvf_start(struct ifcvf_internal *internal) +@@ -254,5 +254,5 @@ vdpa_ifcvf_start(struct ifcvf_internal *internal) hw->vring[i].desc = gpa; - gpa = qva_to_gpa(vid, (uint64_t)(uintptr_t)vq.avail); + gpa = hva_to_gpa(vid, (uint64_t)(uintptr_t)vq.avail); if (gpa == 0) { DRV_LOG(ERR, "Fail to get GPA for available ring."); -@@ -262,5 +262,5 @@ vdpa_ifcvf_start(struct ifcvf_internal *internal) +@@ -261,5 +261,5 @@ vdpa_ifcvf_start(struct ifcvf_internal *internal) hw->vring[i].avail = gpa; - gpa = qva_to_gpa(vid, (uint64_t)(uintptr_t)vq.used);