[dpdk-dev] [PATCH] vhost: fix async packed ring batch datapath

Maxime Coquelin maxime.coquelin at redhat.com
Mon Jul 19 11:07:42 CEST 2021


Hi,

On 7/8/21 12:25 PM, Cheng Jiang wrote:
> We assume that in the sync path, if there is no buffer wrap in the
> avail descriptors fetched in a batch, there is no buffer wrap in the
> used descriptors which need to be written back in this batch, but
> this assumption is wrong in the async path since there are inflight
> descriptors which are processed by the DMA device.
> 
> This patch refactors the batch copy code and adds used ring buffer
> wrap check as a batch copy condition to fix this issue.
> 
> Fixes: 873e8dad6f49 ("vhost: support packed ring in async datapath")
> Cc: stable at dpdk.org
> 
> Signed-off-by: Cheng Jiang <cheng1.jiang at intel.com>
> ---
>  lib/vhost/virtio_net.c | 163 ++++++++++++++++++++++++++++++++---------
>  1 file changed, 128 insertions(+), 35 deletions(-)
> 

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

Thanks,
Maxime



More information about the dev mailing list