On 7/29/20 4:04 AM, Patrick Fu wrote:
> Async copy fails when single ring buffer vector is splited on multiple
> physical pages. This happens because current hpa address translation
> function doesn't handle multi-page buffers. A new gpa to hpa address
> conversion function, which returns the hpa on the first hitting host
> pages, is implemented in this patch. Async data path recursively calls
> this new function to construct a multi-segments async copy descriptor
> for ring buffers crossing physical page boundaries.
>
> Fixes: cd6760da1076 ("vhost: introduce async enqueue for split ring")
>
> Signed-off-by: Patrick Fu <patrick...@intel.com>
> ---
> v2:
> - change commit message and title
> - v1 patch used CPU to copy multi-page buffers; v2 patch split the
> copy into multiple async copy segments whenever possible
>
> v3:
> - added fixline
>
> v4:
> - fix miss translation of the gpa which is the same length with host
> page size
> v5:
> - combine redundant "if" statement in async_mbuf_to_desc()
>
> lib/librte_vhost/vhost.h | 50 +++++++++++++++++++++++++++++++++++
> lib/librte_vhost/virtio_net.c | 39 ++++++++++++++++-----------
> 2 files changed, 74 insertions(+), 15 deletions(-)
Thanks Patrick, it looks better to me now:
Reviewed-by: Maxime Coquelin <maxime.coque...@redhat.com>
Maxime