DPDK patches and discussions
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas.monjalon@6wind.com>
To: Huawei Xie <huawei.xie@intel.com>
Cc: dev@dpdk.org, "Benoît Canet" <benoit.canet@nodalink.com>
Subject: Re: [dpdk-dev] [PATCH] vhost: Add a hint on how to add or remove the device to a data core
Date: Tue, 17 Mar 2015 00:40:45 +0100	[thread overview]
Message-ID: <4112124.luVfq3zIfF@xps13> (raw)
In-Reply-To: <1425032565-497-1-git-send-email-benoit.canet@nodalink.com>

Huawei, any opinion about this patch?

2015-02-27 11:22, Benoît Canet:
> Let's make sure people will not forget to set and unset VIRTIO_DEV_RUNNING.
> 
> Signed-off-by: Benoît Canet <benoit.canet@nodalink.com>
> ---
>  doc/guides/prog_guide/vhost_lib.rst | 3 ++-
>  lib/librte_vhost/rte_virtio_net.h   | 4 ++++
>  2 files changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/doc/guides/prog_guide/vhost_lib.rst b/doc/guides/prog_guide/vhost_lib.rst
> index 0b6eda7..ba6065d 100644
> --- a/doc/guides/prog_guide/vhost_lib.rst
> +++ b/doc/guides/prog_guide/vhost_lib.rst
> @@ -58,7 +58,8 @@ Vhost API Overview
>        register two callbacks, new_destory and destroy_device.
>        When virtio device is activated or deactivated by guest virtual machine,
>        the callback will be called, then vSwitch could put the device onto data
> -      core or remove the device from data core.
> +      core or remove the device from data core by setting or unsetting
> +      VIRTIO_DEV_RUNNING on the device flags.
>  
>  *   Read/write packets from/to guest virtual machine
>  
> diff --git a/lib/librte_vhost/rte_virtio_net.h b/lib/librte_vhost/rte_virtio_net.h
> index 611a3d4..b9d34c7 100644
> --- a/lib/librte_vhost/rte_virtio_net.h
> +++ b/lib/librte_vhost/rte_virtio_net.h
> @@ -130,6 +130,10 @@ struct virtio_memory {
>  
>  /**
>   * Device operations to add/remove device.
> + *
> + * Make sure to set VIRTIO_DEV_RUNNING to the device flags in new_device and
> + * remove it in destroy_device.
> + *
>   */
>  struct virtio_net_device_ops {
>  	int (*new_device)(struct virtio_net *);	/**< Add device. */
> 

  reply	other threads:[~2015-03-16 23:41 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-27 10:22 Benoît Canet
2015-03-16 23:40 ` Thomas Monjalon [this message]
2015-03-17  9:08 ` Xie, Huawei
2015-03-17 11:37   ` 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=4112124.luVfq3zIfF@xps13 \
    --to=thomas.monjalon@6wind.com \
    --cc=benoit.canet@nodalink.com \
    --cc=dev@dpdk.org \
    --cc=huawei.xie@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).