All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 1/2] vhost-vdpa: Add qemu_close in vhost_vdpa_cleanup
@ 2020-10-16  3:09 Cindy Lu
  2020-10-16  3:09 ` [PATCH v2 2/2] net: Add vhost-vdpa in show_netdevs() Cindy Lu
  2020-10-19  7:52 ` [PATCH v2 1/2] vhost-vdpa: Add qemu_close in vhost_vdpa_cleanup Jason Wang
  0 siblings, 2 replies; 4+ messages in thread
From: Cindy Lu @ 2020-10-16  3:09 UTC (permalink / raw)
  To: mst, jasowang, qemu-devel; +Cc: qemu-stable, Cindy Lu

fix the bug that fd will still open after the cleanup

Signed-off-by: Cindy Lu <lulu@redhat.com>
---
 net/vhost-vdpa.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/net/vhost-vdpa.c b/net/vhost-vdpa.c
index bc0e0d2d35..0480b92102 100644
--- a/net/vhost-vdpa.c
+++ b/net/vhost-vdpa.c
@@ -144,6 +144,10 @@ static void vhost_vdpa_cleanup(NetClientState *nc)
         g_free(s->vhost_net);
         s->vhost_net = NULL;
     }
+     if (s->vhost_vdpa.device_fd >= 0) {
+        qemu_close(s->vhost_vdpa.device_fd);
+        s->vhost_vdpa.device_fd = -1;
+    }
 }
 
 static bool vhost_vdpa_has_vnet_hdr(NetClientState *nc)
-- 
2.21.3



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

* [PATCH v2 2/2] net: Add vhost-vdpa in show_netdevs()
  2020-10-16  3:09 [PATCH v2 1/2] vhost-vdpa: Add qemu_close in vhost_vdpa_cleanup Cindy Lu
@ 2020-10-16  3:09 ` Cindy Lu
  2020-10-19  7:52   ` Jason Wang
  2020-10-19  7:52 ` [PATCH v2 1/2] vhost-vdpa: Add qemu_close in vhost_vdpa_cleanup Jason Wang
  1 sibling, 1 reply; 4+ messages in thread
From: Cindy Lu @ 2020-10-16  3:09 UTC (permalink / raw)
  To: mst, jasowang, qemu-devel; +Cc: qemu-stable, Cindy Lu

Fix the bug that while Check qemu supported netdev,
there is no vhost-vdpa

Signed-off-by: Cindy Lu <lulu@redhat.com>
---
 net/net.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/net/net.c b/net/net.c
index 7a2a0fb5ac..794c652282 100644
--- a/net/net.c
+++ b/net/net.c
@@ -1049,6 +1049,9 @@ static void show_netdevs(void)
 #endif
 #ifdef CONFIG_POSIX
         "vhost-user",
+#endif
+#ifdef CONFIG_VHOST_VDPA
+        "vhost-vdpa",
 #endif
     };
 
-- 
2.21.3



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

* Re: [PATCH v2 1/2] vhost-vdpa: Add qemu_close in vhost_vdpa_cleanup
  2020-10-16  3:09 [PATCH v2 1/2] vhost-vdpa: Add qemu_close in vhost_vdpa_cleanup Cindy Lu
  2020-10-16  3:09 ` [PATCH v2 2/2] net: Add vhost-vdpa in show_netdevs() Cindy Lu
@ 2020-10-19  7:52 ` Jason Wang
  1 sibling, 0 replies; 4+ messages in thread
From: Jason Wang @ 2020-10-19  7:52 UTC (permalink / raw)
  To: Cindy Lu, mst, qemu-devel; +Cc: qemu-stable


On 2020/10/16 上午11:09, Cindy Lu wrote:
> fix the bug that fd will still open after the cleanup
>
> Signed-off-by: Cindy Lu <lulu@redhat.com>
> ---
>   net/vhost-vdpa.c | 4 ++++
>   1 file changed, 4 insertions(+)
>
> diff --git a/net/vhost-vdpa.c b/net/vhost-vdpa.c
> index bc0e0d2d35..0480b92102 100644
> --- a/net/vhost-vdpa.c
> +++ b/net/vhost-vdpa.c
> @@ -144,6 +144,10 @@ static void vhost_vdpa_cleanup(NetClientState *nc)
>           g_free(s->vhost_net);
>           s->vhost_net = NULL;
>       }
> +     if (s->vhost_vdpa.device_fd >= 0) {
> +        qemu_close(s->vhost_vdpa.device_fd);
> +        s->vhost_vdpa.device_fd = -1;
> +    }
>   }
>   
>   static bool vhost_vdpa_has_vnet_hdr(NetClientState *nc)


Acked-by: Jason Wang <jasowang@redhat.com>




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

* Re: [PATCH v2 2/2] net: Add vhost-vdpa in show_netdevs()
  2020-10-16  3:09 ` [PATCH v2 2/2] net: Add vhost-vdpa in show_netdevs() Cindy Lu
@ 2020-10-19  7:52   ` Jason Wang
  0 siblings, 0 replies; 4+ messages in thread
From: Jason Wang @ 2020-10-19  7:52 UTC (permalink / raw)
  To: Cindy Lu, mst, qemu-devel; +Cc: qemu-stable


On 2020/10/16 上午11:09, Cindy Lu wrote:
> Fix the bug that while Check qemu supported netdev,
> there is no vhost-vdpa
>
> Signed-off-by: Cindy Lu <lulu@redhat.com>
> ---
>   net/net.c | 3 +++
>   1 file changed, 3 insertions(+)
>
> diff --git a/net/net.c b/net/net.c
> index 7a2a0fb5ac..794c652282 100644
> --- a/net/net.c
> +++ b/net/net.c
> @@ -1049,6 +1049,9 @@ static void show_netdevs(void)
>   #endif
>   #ifdef CONFIG_POSIX
>           "vhost-user",
> +#endif
> +#ifdef CONFIG_VHOST_VDPA
> +        "vhost-vdpa",
>   #endif
>       };


Acked-by: Jason Wang <jasowang@redhat.com>


>   



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

end of thread, other threads:[~2020-10-19  8:02 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-16  3:09 [PATCH v2 1/2] vhost-vdpa: Add qemu_close in vhost_vdpa_cleanup Cindy Lu
2020-10-16  3:09 ` [PATCH v2 2/2] net: Add vhost-vdpa in show_netdevs() Cindy Lu
2020-10-19  7:52   ` Jason Wang
2020-10-19  7:52 ` [PATCH v2 1/2] vhost-vdpa: Add qemu_close in vhost_vdpa_cleanup Jason Wang

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.