[dpdk-dev] doc: note a pitfall on reconnect feature
Commit Message
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.
Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
---
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(-)
Comments
> - 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:
Acked-by: John McNamara <john.mcnamara@intel.com>
On Tue, Jul 19, 2016 at 01:57:11PM +0000, Mcnamara, John wrote:
> > - 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?
> Apart from that:
>
> Acked-by: John McNamara <john.mcnamara@intel.com>
Thanks!
--yliu
2016-07-20 09:08, Yuanhan Liu:
> On Tue, Jul 19, 2016 at 01:57:11PM +0000, Mcnamara, John wrote:
> > > - 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?
Yes
> > Apart from that:
> >
> > Acked-by: John McNamara <john.mcnamara@intel.com>
>
> Thanks!
Applied, thanks
@@ -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.