diff mbox series

[v2] vhost-user: save features if the char dev is closed

Message ID 20190918084834.9729-1-amorenoz@redhat.com
State New
Headers show
Series [v2] vhost-user: save features if the char dev is closed | expand

Commit Message

Adrian Moreno Sept. 18, 2019, 8:48 a.m. UTC
That way the state can be correctly restored when the device is opened
again. This might happen if the backend is restarted.

Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=1738768
Reported-by: Pei Zhang <pezhang@redhat.com>
Fixes: 6ab79a20af3a (do not call vhost_net_cleanup() on running net from char user event)
Cc: ddstreet@canonical.com
Cc: Michael S. Tsirkin <mst@redhat.com>

Signed-off-by: Adrian Moreno <amorenoz@redhat.com>
---
 net/vhost-user.c | 4 ++++
 1 file changed, 4 insertions(+)

Comments

no-reply@patchew.org Sept. 18, 2019, 5:10 p.m. UTC | #1
Patchew URL: https://patchew.org/QEMU/20190918084834.9729-1-amorenoz@redhat.com/



Hi,

This series failed the asan build test. Please find the testing commands and
their output below. If you have Docker installed, you can probably reproduce it
locally.

=== TEST SCRIPT BEGIN ===
#!/bin/bash
export ARCH=x86_64
make docker-image-fedora V=1 NETWORK=1
time make docker-test-debug@fedora TARGET_LIST=x86_64-softmmu J=14 NETWORK=1
=== TEST SCRIPT END ===

  CC      qobject/qlit.o
  CC      qobject/qjson.o

Encoding error:
'utf-8' codec can't decode byte 0x95 in position 799: invalid start byte
The full traceback has been saved in /tmp/sphinx-err-mhg776xj.log, if you want to report the issue to the developers.
  CC      qobject/qobject.o


The full log is available at
http://patchew.org/logs/20190918084834.9729-1-amorenoz@redhat.com/testing.asan/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to patchew-devel@redhat.com
Michael S. Tsirkin Sept. 24, 2019, 3:56 p.m. UTC | #2
On Wed, Sep 18, 2019 at 10:10:05AM -0700, no-reply@patchew.org wrote:
> Patchew URL: https://patchew.org/QEMU/20190918084834.9729-1-amorenoz@redhat.com/
> 
> 
> 
> Hi,
> 
> This series failed the asan build test. Please find the testing commands and
> their output below. If you have Docker installed, you can probably reproduce it
> locally.
> 
> === TEST SCRIPT BEGIN ===
> #!/bin/bash
> export ARCH=x86_64
> make docker-image-fedora V=1 NETWORK=1
> time make docker-test-debug@fedora TARGET_LIST=x86_64-softmmu J=14 NETWORK=1
> === TEST SCRIPT END ===
> 
>   CC      qobject/qlit.o
>   CC      qobject/qjson.o
> 
> Encoding error:
> 'utf-8' codec can't decode byte 0x95 in position 799: invalid start byte
> The full traceback has been saved in /tmp/sphinx-err-mhg776xj.log, if you want to report the issue to the developers.
>   CC      qobject/qobject.o
> 
> 
> The full log is available at
> http://patchew.org/logs/20190918084834.9729-1-amorenoz@redhat.com/testing.asan/?type=message.

What happened here?
Does anyone know?

> ---
> Email generated automatically by Patchew [https://patchew.org/].
> Please send your feedback to patchew-devel@redhat.com
diff mbox series

Patch

diff --git a/net/vhost-user.c b/net/vhost-user.c
index 51921de443..014199d600 100644
--- a/net/vhost-user.c
+++ b/net/vhost-user.c
@@ -235,6 +235,10 @@  static void chr_closed_bh(void *opaque)
 
     s = DO_UPCAST(NetVhostUserState, nc, ncs[0]);
 
+    if (s->vhost_net) {
+        s->acked_features = vhost_net_get_acked_features(s->vhost_net);
+    }
+
     qmp_set_link(name, false, &err);
 
     qemu_chr_fe_set_handlers(&s->chr, NULL, NULL, net_vhost_user_event,