Skip to contentSkip to conversation

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

PATCH Superseded Adrian Moreno 3 participants 3 messages Sep 18, 2019 – Sep 24, 2019 Networking

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 vhost-user: save features if the char dev is closed

That way the state can be correctly restored when the device is opened again. This might happen if the backend is restarted.

Fixes 6ab79a20af3a (do not call vhost_net_cleanup() on running net from char user event)
Cc Michael S. Tsirkin <[email protected]>
---
 net/vhost-user.c | 4 ++++
 1 file changed, 4 insertions(+)
net/vhost-user.c +4 -0
index 51921de443..014199d600 100644
@@ -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,
Signature · 1 line
2.21.0
#1 lore raw
Patchew URL: https://patchew.org/QEMU/[email protected]/

Patchew URL: https://patchew.org/QEMU/[email protected]/

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/[email protected]/testing.asan/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to [email protected]

#2 lore raw

asan: false positive? (Was Re: [Qemu-devel] [PATCH v2] vhost-user: save features if the char dev is closed)

Quoted 20 lines · On Wed, Sep 18, 2019 at 10:10:05AM -0700, [email protected] wrote:

Patchew URL: https://patchew.org/QEMU/[email protected]/

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

Quoted 8 lines

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/[email protected]/testing.asan/?type=message.

What happened here?
Does anyone know?

Quoted 3 lines

---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to [email protected]