From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 713571B4D5 for ; Wed, 10 Oct 2018 04:56:15 +0200 (CEST) X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 Oct 2018 19:56:14 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,362,1534834800"; d="scan'208";a="90679903" Received: from yexl-server.sh.intel.com (HELO localhost) ([10.67.110.207]) by orsmga003.jf.intel.com with ESMTP; 09 Oct 2018 19:54:22 -0700 Date: Wed, 10 Oct 2018 17:41:37 +0800 From: Ye Xiaolong To: Xiao Wang Cc: qi.z.zhang@intel.com, dev@dpdk.org Message-ID: <20181010094137.GA65300@intel.com> References: <20180925031001.164277-1-xiao.w.wang@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180925031001.164277-1-xiao.w.wang@intel.com> User-Agent: Mutt/1.9.4 (2018-02-28) Subject: Re: [dpdk-dev] [PATCH] net/ifc: fix function name 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: , X-List-Received-Date: Wed, 10 Oct 2018 02:56:16 -0000 Acked-by: Ye Xiaolong Thanks, Xiaolong On 09/25, Xiao Wang wrote: >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 >--- > 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 7d3085d8d..a26da8086 100644 >--- a/drivers/net/ifc/ifcvf_vdpa.c >+++ b/drivers/net/ifc/ifcvf_vdpa.c >@@ -206,7 +206,7 @@ ifcvf_dma_map(struct ifcvf_internal *internal, int do_map) > } > > 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; > struct rte_vhost_mem_region *reg; >@@ -219,9 +219,9 @@ qva_to_gpa(int vid, uint64_t qva) > for (i = 0; i < mem->nregions; i++) { > 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,21 +247,21 @@ 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."); > return -1; > } > 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."); > return -1; > } > 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."); > return -1; >-- >2.15.1 >