> -----Original Message-----
> From: Hu, Jiayu <jiayu...@intel.com>
> Sent: Wednesday, November 10, 2021 8:40 PM
> To: dev@dpdk.org
> Cc: maxime.coque...@redhat.com; Xia, Chenbo <chenbo....@intel.com>; He,
> Xingguang <xingguang...@intel.com>; Hu, Jiayu <jiayu...@intel.com>
> Subject: [PATCH v2] vhost: fix packed ring descriptor update in async enqueue
> 
> If the packet uses multiple descrptors and its descriptor indices are

descrptors -> descriptors

With this fixed:

Reviewed-by: Chenbo Xia <chenbo....@intel.com>

> wrapped, the first descriptor flag is not updated last, which may cause
> virtio read the incomplete packet. For example, given a packet uses 64
> descriptors, and virtio ring size is 256, and its descriptor indices is
> 224~255 and 0~31, current implementation will update 224~255 descriptor
> flags earlier than 0~31 descriptor flags.
> 
> This patch fixes this issue by updating descriptor flags in one loop,
> so that the first descriptor flag is always updated last.
> 
> Fixes: 873e8dad6f49 ("vhost: support packed ring in async datapath")
> 
> Signed-off-by: Jiayu Hu <jiayu...@intel.com>
> ---
> v2:
> * update commit log
> ---
>  lib/vhost/virtio_net.c | 122 ++++++++++++++++++-----------------------
>  1 file changed, 54 insertions(+), 68 deletions(-)

Reply via email to