All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ye Xiaolong <xiaolong.ye@intel.com>
To: Xiao Wang <xiao.w.wang@intel.com>
Cc: qi.z.zhang@intel.com, dev@dpdk.org
Subject: Re: [PATCH] net/ifc: fix function name
Date: Wed, 10 Oct 2018 17:41:37 +0800	[thread overview]
Message-ID: <20181010094137.GA65300@intel.com> (raw)
In-Reply-To: <20180925031001.164277-1-xiao.w.wang@intel.com>

Acked-by: Ye Xiaolong <xiaolong.ye@intel.com>

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 <xiao.w.wang@intel.com>
>---
> 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
>

  reply	other threads:[~2018-10-10  2:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-25  3:10 [PATCH] net/ifc: fix function name Xiao Wang
2018-10-10  9:41 ` Ye Xiaolong [this message]
2018-10-11  3:09   ` Zhang, Qi Z

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181010094137.GA65300@intel.com \
    --to=xiaolong.ye@intel.com \
    --cc=dev@dpdk.org \
    --cc=qi.z.zhang@intel.com \
    --cc=xiao.w.wang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.