Received: from eggs.gnu.org ([2001:4830:134:3::10]:33423) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z6spV-0002pE-NI for qemu-devel@nongnu.org; Sun, 21 Jun 2015 23:55:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z6spR-0002Ux-Ll for qemu-devel@nongnu.org; Sun, 21 Jun 2015 23:55:29 -0400 Received: from mail-pd0-f180.google.com ([209.85.192.180]:34781) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z6spR-0002Us-H4 for qemu-devel@nongnu.org; Sun, 21 Jun 2015 23:55:25 -0400 Received: by pdbki1 with SMTP id ki1so129768069pdb.1 for ; Sun, 21 Jun 2015 20:55:25 -0700 (PDT) From: Tetsuya Mukawa Date: Mon, 22 Jun 2015 12:50:47 +0900 Message-Id: <1434945048-27958-5-git-send-email-mukawa@igel.co.jp> In-Reply-To: <1434945048-27958-1-git-send-email-mukawa@igel.co.jp> References: <1434945048-27958-1-git-send-email-mukawa@igel.co.jp> Subject: [Qemu-devel] [PATCH v2 4/5] vhost-user: Enable 'nowait' and 'reconnect' option List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: mst@redhat.com, jasowang@redhat.com, n.nikolaev@virtualopensystems.com, stefanha@redhat.com, Tetsuya Mukawa The patch enables 'nowait' option for server mode, and 'reconnect' option for client mode. Signed-off-by: Tetsuya Mukawa --- net/vhost-user.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/net/vhost-user.c b/net/vhost-user.c index 8b7749a..58cd5dc 100644 --- a/net/vhost-user.c +++ b/net/vhost-user.c @@ -26,6 +26,8 @@ typedef struct VhostUserChardevProps { bool is_socket; bool is_unix; bool is_server; + bool is_nowait; + bool is_reconnect; } VhostUserChardevProps; VHostNetState *vhost_user_get_vhost_net(NetClientState *nc) @@ -186,6 +188,10 @@ static int net_vhost_chardev_opts(void *opaque, props->is_unix = true; } else if (strcmp(name, "server") == 0) { props->is_server = true; + } else if ((strcmp(name, "wait") == 0) && (strcmp(value, "off")) == 0) { + props->is_nowait = true; + } else if (strcmp(name, "reconnect") == 0) { + props->is_reconnect = true; } else { error_setg(errp, "vhost-user does not support a chardev with option %s=%s", -- 2.1.4