> -----Original Message-----
> From: Cheng Jiang <[email protected]>
> Sent: Tuesday, October 11, 2022 11:08 AM
> To: [email protected]; Xia, Chenbo <[email protected]>
> Cc: [email protected]; Hu, Jiayu <[email protected]>; Ding, Xuan
> <[email protected]>; Ma, WenwuX <[email protected]>; Wang,
> YuanX <[email protected]>; Yang, YvonneX
> <[email protected]>; He, Xingguang <[email protected]>;
> Jiang, Cheng1 <[email protected]>; [email protected]
> Subject: [PATCH v2 2/2] vhost: fix slot index calculation in async vhost
>
> When the packet receiving failure and the DMA ring full occur simultaneously
> in the asynchronous vhost, the slot_idx needs to be decreased by 1. For
> packed virtqueue, the slot index should be ring_size - 1, if the slot_idx is
> currently 0, since the ring size is not necessarily the power of 2.
>
> Fixes: 84d5204310d7 ("vhost: support async dequeue for split ring")
> Fixes: fe8477ebbd94 ("vhost: support async packed ring dequeue")
> Cc: [email protected]
>
> Signed-off-by: Cheng Jiang <[email protected]>
> ---
Tested-by: Wei Ling <[email protected]>