DPDK patches and discussions
 help / color / mirror / Atom feed
From: Yuanhan Liu <yuanhan.liu@linux.intel.com>
To: dev@dpdk.org
Cc: Thomas Monjalon <thomas.monjalon@6wind.com>,
	Yuanhan Liu <yuanhan.liu@linux.intel.com>
Subject: [dpdk-dev] [PATCH] doc: note a pitfall on reconnect feature
Date: Tue, 19 Jul 2016 12:17:48 +0800	[thread overview]
Message-ID: <1468901869-29609-1-git-send-email-yuanhan.liu@linux.intel.com> (raw)

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(-)

diff --git a/doc/guides/prog_guide/vhost_lib.rst b/doc/guides/prog_guide/vhost_lib.rst
index 14d5e67..6b0c6b2 100644
--- a/doc/guides/prog_guide/vhost_lib.rst
+++ b/doc/guides/prog_guide/vhost_lib.rst
@@ -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.
-- 
1.9.0

             reply	other threads:[~2016-07-19  4:14 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-19  4:17 Yuanhan Liu [this message]
2016-07-19  4:17 ` [dpdk-dev] [PATCH RFC] maintainers: add git tree for virtio/vhost Yuanhan Liu
2016-07-22 20:39   ` Thomas Monjalon
2016-07-19 13:57 ` [dpdk-dev] [PATCH] doc: note a pitfall on reconnect feature Mcnamara, John
2016-07-20  1:08   ` Yuanhan Liu
2016-07-22 16:06     ` Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1468901869-29609-1-git-send-email-yuanhan.liu@linux.intel.com \
    --to=yuanhan.liu@linux.intel.com \
    --cc=dev@dpdk.org \
    --cc=thomas.monjalon@6wind.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).