From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 9C995A04DD; Wed, 28 Oct 2020 12:16:18 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 7FF56CB41; Wed, 28 Oct 2020 12:16:17 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by dpdk.org (Postfix) with ESMTP id E77ABCB38 for ; Wed, 28 Oct 2020 12:16:15 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1603883774; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=9Pm+23fD+ywK9BEbqxk8jS/bPOqNI7jFceS6LWKZ4pI=; b=DfKuvb0pUHqo1YUPGWO6KLYnEb3/TaLM28onP6GTL1Qel9rtSZQ6fSfdmBPKCXM6C+KcFF vXY8o50ljuW48hHp/hQ8WifZcNZVfEkX/qpi7vsIBxXFljksgnDY4IpveGVr5VN8OAgbzx /3lE8XulOkZt0ibObRgeLgu+BEz8mIs= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-434-Ixrt7iiaP22IPYasdFHd0g-1; Wed, 28 Oct 2020 07:16:12 -0400 X-MC-Unique: Ixrt7iiaP22IPYasdFHd0g-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 8CCD3804B86; Wed, 28 Oct 2020 11:16:11 +0000 (UTC) Received: from [10.36.110.54] (unknown [10.36.110.54]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 75C915B4BC; Wed, 28 Oct 2020 11:16:10 +0000 (UTC) To: Patrick Fu , dev@dpdk.org, chenbo.xia@intel.com References: <20201026101042.4102442-1-patrick.fu@intel.com> <20201027020608.4103145-1-patrick.fu@intel.com> From: Maxime Coquelin Message-ID: <5fad8f96-7101-82e1-fd66-fc567689b37d@redhat.com> Date: Wed, 28 Oct 2020 12:16:08 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.3.1 MIME-Version: 1.0 In-Reply-To: <20201027020608.4103145-1-patrick.fu@intel.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=maxime.coquelin@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v1] vhost: fix guest/host physical address conversion 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 10/27/20 3:06 AM, Patrick Fu wrote: > gpa_to_hpa() function almost always fails due to the wrong setup of > the binary tree search key. Since there has already been a similar > function gpa_to_first_hpa() available in the vhost, instead of fixing > the issue in its original logic, gpa_to_hpa() function is rewritten to > be a wrapper of the gpa_to_first_hpa() to avoid code redundancy. > > Fixes: e246896178e6 ("vhost: get guest/host physical address mappings") > Fixes: faa9867c4da2 ("vhost: use binary search in address conversion") > > Signed-off-by: Patrick Fu > --- > v2: > - minor rewordings on commit message & title > > lib/librte_vhost/vhost.h | 43 ++++++++++------------------------------ > 1 file changed, 11 insertions(+), 32 deletions(-) > Reviewed-by: Maxime Coquelin Thanks, Maxime