[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 23/24] vhost-user: wait until link is up
From: |
Michael S. Tsirkin |
Subject: |
Re: [Qemu-devel] [PATCH 23/24] vhost-user: wait until link is up |
Date: |
Thu, 23 Jun 2016 07:25:05 +0300 |
On Tue, Jun 21, 2016 at 12:02:51PM +0200, address@hidden wrote:
> From: Marc-André Lureau <address@hidden>
>
> The chardev waits for an initial connection before starting qemu,
> vhost-user wants the backend negotiation to be completed. vhost-user is
> started in the net_vhost_user_event callback, which is synchronously
> called after the socket is connected.
>
> Signed-off-by: Marc-André Lureau <address@hidden>
> ---
> 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 95ed2d2..bb4a253 100644
> --- a/net/vhost-user.c
> +++ b/net/vhost-user.c
> @@ -248,7 +248,15 @@ static int net_vhost_user_init(NetClientState *peer,
> const char *device,
> s->chr = chr;
> }
>
> - qemu_chr_add_handlers(chr, NULL, NULL, net_vhost_user_event, nc[0].name);
> + do {
> + Error *err = NULL;
> + if (qemu_chr_wait_connected(chr, &err) < 0) {
> + error_report_err(err);
> + return -1;
> + }
> + qemu_chr_add_handlers(chr, NULL, NULL,
> + net_vhost_user_event, nc[0].name);
> + } while (nc->link_down);
>
> assert(s->vhost_net != NULL);
I don't get why this makes sense.
Why should vhost user poke at link down at all?
> --
> 2.7.4
- Re: [Qemu-devel] [PATCH 06/24] vhost-user: check vhost_user_write() return value, (continued)
[Qemu-devel] [PATCH 15/24] vhost: fix calling vhost_dev_cleanup() after vhost_dev_init(), marcandre . lureau, 2016/06/21
[Qemu-devel] [PATCH 16/24] vhost-user: keep vhost_net after a disconnection, marcandre . lureau, 2016/06/21
[Qemu-devel] [PATCH 21/24] char: add chr_wait_connected callback, marcandre . lureau, 2016/06/21
[Qemu-devel] [PATCH 18/24] get_vhost_net() should be != null after vhost_user_init, marcandre . lureau, 2016/06/21
[Qemu-devel] [PATCH 22/24] char: add and use tcp_chr_wait_connected, marcandre . lureau, 2016/06/21
[Qemu-devel] [PATCH 17/24] Revert "vhost-net: do not crash if backend is not present", marcandre . lureau, 2016/06/21
[Qemu-devel] [PATCH 23/24] vhost-user: wait until link is up, marcandre . lureau, 2016/06/21
- Re: [Qemu-devel] [PATCH 23/24] vhost-user: wait until link is up,
Michael S. Tsirkin <=
[Qemu-devel] [PATCH 19/24] vhost-net: success if backend has no ops->vhost_migration_done, marcandre . lureau, 2016/06/21
[Qemu-devel] [PATCH 24/24] tests: add /vhost-user/connect-fail test, marcandre . lureau, 2016/06/21
[Qemu-devel] [PATCH 20/24] vhost: add assert() to check runtime behaviour, marcandre . lureau, 2016/06/21
Re: [Qemu-devel] [PATCH 00/24] vhost-user reconnect fixes, Michael S. Tsirkin, 2016/06/23
Re: [Qemu-devel] [PATCH 00/24] vhost-user reconnect fixes, Michael S. Tsirkin, 2016/06/23