DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Loftus, Ciara" <ciara.loftus@intel.com>
To: Yuanhan Liu <yuanhan.liu@linux.intel.com>, "dev@dpdk.org" <dev@dpdk.org>
Cc: "Xie, Huawei" <huawei.xie@intel.com>
Subject: Re: [dpdk-dev] [PATCH] vhost: fix missing flag reset on stop
Date: Wed, 29 Jun 2016 14:55:40 +0000	[thread overview]
Message-ID: <74F120C019F4A64C9B78E802F6AD4CC24F8E2D1D@IRSMSX106.ger.corp.intel.com> (raw)
In-Reply-To: <1467005329-4216-1-git-send-email-yuanhan.liu@linux.intel.com>

> 
> Commit 550c9d27d143 ("vhost: set/reset device flags internally") moves
> the VIRTIO_DEV_RUNNING set/reset to vhost lib. But I missed one reset
> on stop; here fixes it.
> 
> Fixes: 550c9d27d143 ("vhost: set/reset device flags internally")
> 
> Reported-by: Loftus Ciara <ciara.loftus@intel.com>
> Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
> ---
>  lib/librte_vhost/vhost_user/virtio-net-user.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/lib/librte_vhost/vhost_user/virtio-net-user.c
> b/lib/librte_vhost/vhost_user/virtio-net-user.c
> index a6a48dc..e7c4347 100644
> --- a/lib/librte_vhost/vhost_user/virtio-net-user.c
> +++ b/lib/librte_vhost/vhost_user/virtio-net-user.c
> @@ -317,8 +317,10 @@ user_get_vring_base(int vid, struct
> vhost_vring_state *state)
>  	if (dev == NULL)
>  		return -1;
>  	/* We have to stop the queue (virtio) if it is running. */
> -	if (dev->flags & VIRTIO_DEV_RUNNING)
> +	if (dev->flags & VIRTIO_DEV_RUNNING) {
> +		dev->flags &= ~VIRTIO_DEV_RUNNING;
>  		notify_ops->destroy_device(vid);
> +	}
> 
>  	/* Here we are safe to get the last used index */
>  	vhost_get_vring_base(vid, state->index, state);
> --
> 1.9.0

Thanks for the patch. I've tested it and it solves the issue I was seeing where destroy_device was being called too many times.

Tested-by: Ciara Loftus <ciara.loftus@intel.com>

  reply	other threads:[~2016-06-29 14:55 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-27  5:28 Yuanhan Liu
2016-06-29 14:55 ` Loftus, Ciara [this message]
2016-06-30  5:31   ` Yuanhan Liu

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=74F120C019F4A64C9B78E802F6AD4CC24F8E2D1D@IRSMSX106.ger.corp.intel.com \
    --to=ciara.loftus@intel.com \
    --cc=dev@dpdk.org \
    --cc=huawei.xie@intel.com \
    --cc=yuanhan.liu@linux.intel.com \
    /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).