patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Maxime Coquelin <maxime.coquelin@redhat.com>
To: Haoqian He <haoqian.he@smartx.com>
Cc: chenbox@nvidia.com, dev@dpdk.org, fengli@smartx.com, stable@dpdk.org
Subject: Re: [PATCH v2] vhost: cleanup resubmit info before inflight setup
Date: Fri, 7 Jun 2024 15:50:28 +0200	[thread overview]
Message-ID: <e9d982e0-98f2-45d3-92d5-b9a8be684d97@redhat.com> (raw)
In-Reply-To: <20240426110947.881407-1-haoqian.he@smartx.com>



On 4/26/24 13:09, Haoqian He wrote:
> This patch fixes a potential VM hang bug when the VM reboots after
> vhost live recovery due to missing cleanup virtqueue resubmit info.
> 
> Specifically, if inflight IO that should be resubmitted during
> the latest vhost reconnection has not been submitted yet while
> VM rebooting, so GET_VRING_BASE would not wait for the inflight
> IO, at this time the resubmit info has been.  When the VM restarts,
> SET_VRING_KICK will resubmit the inflight IO (If resubmit info
> is not null, function set_vring_kick will return without updating
> resubmit info).
> 
> It’s an error, any stale inflight IO should not be resubmitted
> after the VM restart.
> 
> The solution is to clean up virtqueue resubmit info when function
> set_inflight_fd before function set_vring_kick.
> 
> Fixes: ad0a4ae491fe ("vhost: checkout resubmit inflight information")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Haoqian He <haoqian.he@smartx.com>
> ---
> v2: rewrite the commit message.
> 
>   lib/vhost/vhost_user.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/lib/vhost/vhost_user.c b/lib/vhost/vhost_user.c
> index 414192500e..7c54afc5fb 100644
> --- a/lib/vhost/vhost_user.c
> +++ b/lib/vhost/vhost_user.c
> @@ -1871,6 +1871,7 @@ vhost_user_set_inflight_fd(struct virtio_net **pdev,
>   		if (!vq)
>   			continue;
>   
> +		cleanup_vq_inflight(dev, vq);
>   		if (vq_is_packed(dev)) {
>   			vq->inflight_packed = addr;
>   			vq->inflight_packed->desc_num = queue_size;

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

Thanks,
Maxime


      parent reply	other threads:[~2024-06-07 13:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <8a04f203-4ef0-4840-b480-b21e08561c7d@redhat.com>
2024-04-26 11:09 ` Haoqian He
2024-04-26 21:28   ` Patrick Robb
2024-06-07 13:50   ` Maxime Coquelin [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e9d982e0-98f2-45d3-92d5-b9a8be684d97@redhat.com \
    --to=maxime.coquelin@redhat.com \
    --cc=chenbox@nvidia.com \
    --cc=dev@dpdk.org \
    --cc=fengli@smartx.com \
    --cc=haoqian.he@smartx.com \
    --cc=stable@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).