Skip to contentSkip to conversation

doc: note a pitfall on reconnect feature

PATCH Applied Yuanhan Liu 3 participants 6 messages Jul 19, 2016 – Jul 22, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 doc: note a pitfall on reconnect feature

The vhost feature negotiation only happens at virtio reset stage, say when a virtio-net device is firstly initiated, or when DPDK virtio PMD initiates. That means, if vhost APP restarts after the negotiation and reconnects, the feature negotiation process will not be triggered again, meaning the info is lost. To make reconnect work, QEMU simply saves the negotiated features before the restart and restores it afterwards.

Therefore, the vhost supported features must be exactly the same before and after the restart. For example, if TSO is disabled and then enabled, nothing will work and issues undefined might happen.

---

I just put the part "people should not do this" into the doc, and I'm not quite sure I need put the "why" part there or not.

---
 doc/guides/prog_guide/vhost_lib.rst | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
doc/guides/prog_guide/vhost_lib.rst +6 -1
index 14d5e67..6b0c6b2 100644
@@ -189,7 +189,12 @@ vhost-user implementation has two options:
   When the DPDK vhost-user application restarts, DPDK vhost-user will try to
   connect to the server again. This is how the "reconnect" feature works.
 
-  Note: the "reconnect" feature requires **QEMU v2.7** (or above).
+  .. Note::
+     * The "reconnect" feature requires **QEMU v2.7** (or above).
+
+     * The vhost supported features must be exactly the same before and
+       after the restart. For example, if TSO is disabled and then enabled,
+       nothing will work and issues undefined might happen.
 
 No matter which mode is used, once a connection is established, DPDK
 vhost-user will start receiving and processing vhost messages from QEMU.
Signature · 1 line
1.9.0
#1 lore raw

RFC PATCH 1/1 maintainers: add git tree for virtio/vhost

Add a git tree line for the virtio/vhost section, to make an explicit statement that the developers are suggested to make patches based on that tree.

---
 MAINTAINERS | 2 ++
 1 file changed, 2 insertions(+)
MAINTAINERS +2 -0
index 9c76352..433ddd8 100644
@@ -356,6 +356,7 @@ F: doc/guides/nics/qede.rst
 RedHat virtio
 M: Huawei Xie <[email protected]>
 M: Yuanhan Liu <[email protected]>
+T: git://dpdk.org/next/dpdk-next-virtio
 F: drivers/net/virtio/
 F: doc/guides/nics/virtio.rst
 F: lib/librte_vhost/
@@ -371,6 +372,7 @@ F: doc/guides/nics/vmxnet3.rst
 Vhost PMD
 M: Tetsuya Mukawa <[email protected]>
 M: Yuanhan Liu <[email protected]>
+T: git://dpdk.org/next/dpdk-next-virtio
 F: drivers/net/vhost/
 
 PCAP PMD
Signature · 1 line
1.9.0
Acked-by on v1 1/1
#3 lore raw
In reply to Yuanhan Liu
Quoted 8 lines
doc/guides/prog_guide/vhost_lib.rst +5 -1
-  Note: the "reconnect" feature requires **QEMU v2.7** (or above).
+  .. Note::
+     * The "reconnect" feature requires **QEMU v2.7** (or above).
+
+     * The vhost supported features must be exactly the same before and
+       after the restart. For example, if TSO is disabled and then

enabled,
+ nothing will work and issues undefined might happen.

s/ issues undefined / undefined issues /

Apart from that:

#4 lore raw
Quoted 10 lines · John
Quoted 8 lines
doc/guides/prog_guide/vhost_lib.rst +5 -1
-  Note: the "reconnect" feature requires **QEMU v2.7** (or above).
+  .. Note::
+     * The "reconnect" feature requires **QEMU v2.7** (or above).
+
+     * The vhost supported features must be exactly the same before and
+       after the restart. For example, if TSO is disabled and then

enabled,
+ nothing will work and issues undefined might happen.

s/ issues undefined / undefined issues /

Thomas, mind to fix it while apply?

Quoted 3 lines

Apart from that:

Thanks!

	--yliu
#5 lore raw

2016-07-20 09:08, Yuanhan Liu:

Quoted 10 lines · John
Quoted 9 lines
Quoted 8 lines
doc/guides/prog_guide/vhost_lib.rst +5 -1
-  Note: the "reconnect" feature requires **QEMU v2.7** (or above).
+  .. Note::
+     * The "reconnect" feature requires **QEMU v2.7** (or above).
+
+     * The vhost supported features must be exactly the same before and
+       after the restart. For example, if TSO is disabled and then

enabled,
+ nothing will work and issues undefined might happen.

Quoted 3 lines
Quoted 1 line

s/ issues undefined / undefined issues /

Thomas, mind to fix it while apply?

Yes

Quoted 5 lines
Quoted 3 lines

Apart from that:

Thanks!

Applied, thanks