[PATCH] vdpa/ifc: improve device stop logic for block device
Maxime Coquelin
maxime.coquelin at redhat.com
Thu Jan 19 15:53:19 CET 2023
On 12/13/22 08:37, Andy Pei wrote:
> For block device, we make sure no IO is inflight before we
> stop device. We terminate the notify relay process and wait
> for all inflight IOs to be completed. So in this period, we
> wait for hardware to update used index, there is no need to
> relay new kick.
>
> Signed-off-by: Andy Pei <andy.pei at intel.com>
> ---
> drivers/vdpa/ifc/ifcvf_vdpa.c | 6 +-----
> 1 file changed, 1 insertion(+), 5 deletions(-)
>
> diff --git a/drivers/vdpa/ifc/ifcvf_vdpa.c b/drivers/vdpa/ifc/ifcvf_vdpa.c
> index 49d68ad..0822f47 100644
> --- a/drivers/vdpa/ifc/ifcvf_vdpa.c
> +++ b/drivers/vdpa/ifc/ifcvf_vdpa.c
> @@ -367,11 +367,7 @@ struct rte_vdpa_dev_info {
> (u16)(ring_state & IFCVF_16_BIT_MASK);
> hw->vring[i].last_used_idx =
> (u16)(ring_state >> 16);
> - if (hw->vring[i].last_avail_idx !=
> - hw->vring[i].last_used_idx) {
> - ifcvf_notify_queue(hw, i);
> - usleep(10);
> - }
> + usleep(10);
> } while (hw->vring[i].last_avail_idx !=
> hw->vring[i].last_used_idx);
> }
Reviewed-by: Maxime Coquelin <maxime.coquelin at redhat.com>
Thanks,
Maxime
More information about the dev
mailing list