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 DEA07275D for ; Tue, 23 Aug 2016 11:17:34 +0200 (CEST) Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 4F57A83F47; Tue, 23 Aug 2016 09:17:34 +0000 (UTC) Received: from [10.36.4.245] (vpn1-4-245.ams2.redhat.com [10.36.4.245]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u7N9HWi5001328 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 23 Aug 2016 05:17:33 -0400 To: Yuanhan Liu , dev@dpdk.org References: <1471939839-29778-1-git-send-email-yuanhan.liu@linux.intel.com> <1471939839-29778-2-git-send-email-yuanhan.liu@linux.intel.com> From: Maxime Coquelin Message-ID: <3162197a-58f0-be5f-f1b4-d603007ff40d@redhat.com> Date: Tue, 23 Aug 2016 11:17:31 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <1471939839-29778-2-git-send-email-yuanhan.liu@linux.intel.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Tue, 23 Aug 2016 09:17:34 +0000 (UTC) Subject: Re: [dpdk-dev] [PATCH 1/6] vhost: simplify memory regions handling X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Aug 2016 09:17:35 -0000 On 08/23/2016 10:10 AM, Yuanhan Liu wrote: > Due to history reason (that vhost-cuse comes before vhost-user), some > fields for maintaining the vhost-user memory mappings (such as mmapped > address and size, with those we then can unmap on destroy) are kept in > "orig_region_map" struct, a structure that is defined only in vhost-user > source file. > > The right way to go is to remove the structure and move all those fields > into virtio_memory_region struct. But we simply can't do that before, > because it breaks the ABI. > > Now, thanks to the ABI refactoring, it's never been a blocking issue > any more. And here it goes: this patch removes orig_region_map and > redefines virtio_memory_region, to include all necessary info. > > With that, we can simplify the guest/host address convert a bit. > > Signed-off-by: Yuanhan Liu > --- > lib/librte_vhost/vhost.h | 49 ++++++------ > lib/librte_vhost/vhost_user.c | 172 +++++++++++++++++------------------------- > 2 files changed, 90 insertions(+), 131 deletions(-) > Thanks for explaining the history behind this. FWIW, the change looks good to me: Reviewed-by: Maxime Coquelin Thanks, Maxime