Received: from eggs.gnu.org ([2001:4830:134:3::10]:55526) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ywmoe-0004Ey-11 for qemu-devel@nongnu.org; Mon, 25 May 2015 03:28:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YwmoZ-0003vR-OZ for qemu-devel@nongnu.org; Mon, 25 May 2015 03:28:51 -0400 Received: from mail-pa0-f50.google.com ([209.85.220.50]:35312) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YwmoZ-0003vN-JS for qemu-devel@nongnu.org; Mon, 25 May 2015 03:28:47 -0400 Received: by pacwv17 with SMTP id wv17so65729030pac.2 for ; Mon, 25 May 2015 00:28:47 -0700 (PDT) From: Tetsuya Mukawa Date: Mon, 25 May 2015 16:28:27 +0900 Message-Id: <1432538908-26298-4-git-send-email-mukawa@igel.co.jp> In-Reply-To: <1432538908-26298-1-git-send-email-mukawa@igel.co.jp> References: <1432538908-26298-1-git-send-email-mukawa@igel.co.jp> Subject: [Qemu-devel] [RFC PATCH 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 Cc: Tetsuya Mukawa , jasowang@redhat.com, stefanha@redhat.com, n.nikolaev@virtualopensystems.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 55c05a5..d31fc41 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