From: Zhang Haoyu <zhhy.zhanghaoyu@gmail.com>
To: zhangkun <zhang.zhangkun@huawei.com>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] support vhost-user socket to reconnect
Date: Mon, 22 Dec 2014 15:20:12 +0800 [thread overview]
Message-ID: <5497C62C.4060902@gmail.com> (raw)
In-Reply-To: <1419231973-11648-1-git-send-email-zhang.zhangkun@huawei.com>
Hi, Kun
Is this patch one of patch series?
I don't see any place to reference "is_reconnect" field.
On 2014/12/22 15:06, zhangkun wrote:
> From: zhangkun <zhang.zhangkun@huawei.com>
>
> Signed-off-by: zhangkun <zhang.zhangkun@huawei.com>
> ---
> net/vhost-user.c | 10 +++++++++-
> 1 file changed, 9 insertions(+), 1 deletion(-)
>
> diff --git a/net/vhost-user.c b/net/vhost-user.c
> index 24e050c..957e78c 100644
> --- a/net/vhost-user.c
> +++ b/net/vhost-user.c
> @@ -26,6 +26,7 @@ typedef struct VhostUserChardevProps {
> bool is_socket;
> bool is_unix;
> bool is_server;
> + bool is_reconnect;
> } VhostUserChardevProps;
>
> VHostNetState *vhost_user_get_vhost_net(NetClientState *nc)
> @@ -132,6 +133,11 @@ static void net_vhost_user_event(void *opaque, int event)
> }
> }
>
> +static bool net_vhost_user_can_read(void *opaque)
> +{
> + return true;
> +}
> +
> static int net_vhost_user_init(NetClientState *peer, const char *device,
> const char *name, CharDriverState *chr,
> bool vhostforce)
> @@ -151,7 +157,7 @@ static int net_vhost_user_init(NetClientState *peer, const char *device,
> s->chr = chr;
> s->vhostforce = vhostforce;
>
> - qemu_chr_add_handlers(s->chr, NULL, NULL, net_vhost_user_event, s);
> + qemu_chr_add_handlers(s->chr, net_vhost_user_can_read, NULL, net_vhost_user_event, s);
>
Why no read handler?
> return 0;
> }
> @@ -167,6 +173,8 @@ 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, "reconnect") == 0) {
> + props->is_reconnect = true;
> } else {
> error_report("vhost-user does not support a chardev"
> " with the following option:\n %s = %s",
>
next prev parent reply other threads:[~2014-12-22 7:20 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-22 7:06 [Qemu-devel] [PATCH] support vhost-user socket to reconnect zhangkun
2014-12-22 7:20 ` Zhang Haoyu [this message]
2014-12-22 7:28 ` Zhangkun (K)
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=5497C62C.4060902@gmail.com \
--to=zhhy.zhanghaoyu@gmail.com \
--cc=qemu-devel@nongnu.org \
--cc=zhang.zhangkun@huawei.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.