net/ifc: fix address translation function name
authorXiao Wang <xiao.w.wang@intel.com>
Tue, 25 Sep 2018 03:10:01 +0000 (11:10 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Thu, 11 Oct 2018 16:56:02 +0000 (18:56 +0200)
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 <xiao.w.wang@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
drivers/net/ifc/ifcvf_vdpa.c

index 9d55946..0d237ae 100644 (file)
@@ -206,7 +206,7 @@ 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;
        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;