All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] vhost: Add a hint on how to add or remove the device to a data core
@ 2015-02-27 10:22 Benoît Canet
       [not found] ` <1425032565-497-1-git-send-email-benoit.canet-Kg/i9Ey4fNdWk0Htik3J/w@public.gmane.org>
  2015-03-17  9:08 ` Xie, Huawei
  0 siblings, 2 replies; 4+ messages in thread
From: Benoît Canet @ 2015-02-27 10:22 UTC (permalink / raw)
  To: dev-VfR2kkLFssw; +Cc: 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-Kg/i9Ey4fNdWk0Htik3J/w@public.gmane.org>
---
 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. */
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] vhost: Add a hint on how to add or remove the device to a data core
       [not found] ` <1425032565-497-1-git-send-email-benoit.canet-Kg/i9Ey4fNdWk0Htik3J/w@public.gmane.org>
@ 2015-03-16 23:40   ` Thomas Monjalon
  0 siblings, 0 replies; 4+ messages in thread
From: Thomas Monjalon @ 2015-03-16 23:40 UTC (permalink / raw)
  To: Huawei Xie; +Cc: dev-VfR2kkLFssw, Benoît Canet

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-Kg/i9Ey4fNdWk0Htik3J/w@public.gmane.org>
> ---
>  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. */
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] vhost: Add a hint on how to add or remove the device to a data core
  2015-02-27 10:22 [PATCH] vhost: Add a hint on how to add or remove the device to a data core Benoît Canet
       [not found] ` <1425032565-497-1-git-send-email-benoit.canet-Kg/i9Ey4fNdWk0Htik3J/w@public.gmane.org>
@ 2015-03-17  9:08 ` Xie, Huawei
       [not found]   ` <C37D651A908B024F974696C65296B57B0F3E4817-0J0gbvR4kThpB2pF5aRoyrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
  1 sibling, 1 reply; 4+ messages in thread
From: Xie, Huawei @ 2015-03-17  9:08 UTC (permalink / raw)
  To: Benoît Canet, dev-VfR2kkLFssw

Acked-by Huawei Xie <huawei.xie-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>


On 2/27/2015 6:22 PM, Benoît Canet wrote:
> Let's make sure people will not forget to set and unset VIRTIO_DEV_RUNNING.
>
> Signed-off-by: Benoît Canet <benoit.canet-Kg/i9Ey4fNdWk0Htik3J/w@public.gmane.org>
> ---
>  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. */


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] vhost: Add a hint on how to add or remove the device to a data core
       [not found]   ` <C37D651A908B024F974696C65296B57B0F3E4817-0J0gbvR4kThpB2pF5aRoyrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
@ 2015-03-17 11:37     ` Thomas Monjalon
  0 siblings, 0 replies; 4+ messages in thread
From: Thomas Monjalon @ 2015-03-17 11:37 UTC (permalink / raw)
  To: Benoît Canet; +Cc: dev-VfR2kkLFssw

> > Let's make sure people will not forget to set and unset VIRTIO_DEV_RUNNING.
> >
> > Signed-off-by: Benoît Canet <benoit.canet-Kg/i9Ey4fNdWk0Htik3J/w@public.gmane.org>
> 
> Acked-by Huawei Xie <huawei.xie-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>

Applied, thanks

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-03-17 11:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-27 10:22 [PATCH] vhost: Add a hint on how to add or remove the device to a data core Benoît Canet
     [not found] ` <1425032565-497-1-git-send-email-benoit.canet-Kg/i9Ey4fNdWk0Htik3J/w@public.gmane.org>
2015-03-16 23:40   ` Thomas Monjalon
2015-03-17  9:08 ` Xie, Huawei
     [not found]   ` <C37D651A908B024F974696C65296B57B0F3E4817-0J0gbvR4kThpB2pF5aRoyrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2015-03-17 11:37     ` Thomas Monjalon

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.