Received: from eggs.gnu.org ([2001:4830:134:3::10]:60608) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YyC8H-00057f-Te for qemu-devel@nongnu.org; Fri, 29 May 2015 00:42:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YyC8H-0002mV-4X for qemu-devel@nongnu.org; Fri, 29 May 2015 00:42:57 -0400 Received: from mail-pa0-f42.google.com ([209.85.220.42]:34143) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YyC8G-0002mJ-WC for qemu-devel@nongnu.org; Fri, 29 May 2015 00:42:57 -0400 Received: by pabru16 with SMTP id ru16so41692081pab.1 for ; Thu, 28 May 2015 21:42:56 -0700 (PDT) From: Tetsuya Mukawa Date: Fri, 29 May 2015 13:42:29 +0900 Message-Id: <1432874550-10921-4-git-send-email-mukawa@igel.co.jp> In-Reply-To: <1432874550-10921-1-git-send-email-mukawa@igel.co.jp> References: <1432538908-26298-5-git-send-email-mukawa@igel.co.jp> <1432874550-10921-1-git-send-email-mukawa@igel.co.jp> Subject: [Qemu-devel] [PATCH v1 3/4] vhost-user: Enable 'nowait' and 'reconnect' option List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org, eblake@redhat.com Cc: Tetsuya Mukawa , jasowang@redhat.com, n.nikolaev@virtualopensystems.com, stefanha@redhat.com 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 1967ff4..f823d78 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) @@ -178,6 +180,10 @@ static int net_vhost_chardev_opts(const char *name, const char *value, 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_report("vhost-user does not support a chardev" " with the following option:\n %s = %s", -- 2.1.4