[dpdk-dev] [PATCH v1] vhost: fix guest/host physical address conversion

Maxime Coquelin maxime.coquelin at redhat.com
Wed Oct 28 12:16:08 CET 2020



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 <patrick.fu at intel.com>
> ---
>  v2:
>    - minor rewordings on commit message & title
> 
>  lib/librte_vhost/vhost.h | 43 ++++++++++------------------------------
>  1 file changed, 11 insertions(+), 32 deletions(-)
> 

Reviewed-by: Maxime Coquelin <maxime.coquelin at redhat.com>

Thanks,
Maxime



More information about the dev mailing list