DPDK patches and discussions
 help / color / mirror / Atom feed
From: Yuanhan Liu <yuanhan.liu@linux.intel.com>
To: Rich Lane <rich.lane@bigswitch.com>
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH] vhost: make destroy callback on VHOST_USER_RESET_OWNER
Date: Tue, 10 Nov 2015 10:25:23 +0800	[thread overview]
Message-ID: <20151110022523.GR2326@yliu-dev.sh.intel.com> (raw)
In-Reply-To: <1447121713-12095-1-git-send-email-rlane@bigswitch.com>

On Mon, Nov 09, 2015 at 06:15:13PM -0800, Rich Lane wrote:
> QEMU sends this message first when shutting down. There was previously no way
> for the dataplane to know that the virtio_net instance had become unusable and
> it would segfault when trying to do RX/TX.
> 
> Signed-off-by: Rich Lane <rlane@bigswitch.com>

Thanks. Even I have same patch in my patch queue (I have some other
issues to fix), you got my ack.

Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>

	--yliu


> ---
>  lib/librte_vhost/virtio-net.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/lib/librte_vhost/virtio-net.c b/lib/librte_vhost/virtio-net.c
> index 14278de..39a6a5e 100644
> --- a/lib/librte_vhost/virtio-net.c
> +++ b/lib/librte_vhost/virtio-net.c
> @@ -436,6 +436,9 @@ reset_owner(struct vhost_device_ctx ctx)
>  	if (dev == NULL)
>  		return -1;
>  
> +	if (dev->flags & VIRTIO_DEV_RUNNING)
> +		notify_ops->destroy_device(dev);
> +
>  	device_fh = dev->device_fh;
>  	cleanup_device(dev);
>  	init_device(dev);
> -- 
> 1.9.1

  reply	other threads:[~2015-11-10  2:21 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-10  2:15 Rich Lane
2015-11-10  2:25 ` Yuanhan Liu [this message]
2015-11-10  3:51   ` Tetsuya Mukawa
2015-11-10  4:05     ` Yuanhan Liu
2015-11-12 11:27   ` Thomas Monjalon

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=20151110022523.GR2326@yliu-dev.sh.intel.com \
    --to=yuanhan.liu@linux.intel.com \
    --cc=dev@dpdk.org \
    --cc=rich.lane@bigswitch.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).