|
From: | Nikolay Nikolaev |
Subject: | Re: [Qemu-devel] [PATCH] net: fix vhost-user mingw compilation |
Date: | Thu, 19 Jun 2014 17:33:02 +0300 |
Not good.On Thu, Jun 19, 2014 at 05:16:44PM +0300, Nikolay Nikolaev wrote:
> Hello,
>
>
> On Wed, Jun 18, 2014 at 11:45 PM, Nikolay Nikolaev <
> address@hidden> wrote:
>
> Make net.o linkage expect net_init_vhost_user only when
> CONFIG_VHOST_NET is defined.
>
> Signed-off-by: Nikolay Nikolaev <address@hidden>
> ---
> net/net.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/net/net.c b/net/net.c
> index de76e30..0c30414 100644
> --- a/net/net.c
> +++ b/net/net.c
> @@ -803,7 +803,9 @@ static int (* const net_client_init_fun
> [NET_CLIENT_OPTIONS_KIND_MAX])(
> [NET_CLIENT_OPTIONS_KIND_BRIDGE] = net_init_bridge,
> #endif
> [NET_CLIENT_OPTIONS_KIND_HUBPORT] = net_init_hubport,
> +#ifdef CONFIG_VHOST_NET
> [NET_CLIENT_OPTIONS_KIND_VHOST_USER] = net_init_vhost_user,
> +#endif
> };
>
>
> @@ -837,7 +839,9 @@ static int net_client_init1(const void *object, int
> is_netdev, Error **errp)
> case NET_CLIENT_OPTIONS_KIND_BRIDGE:
> #endif
> case NET_CLIENT_OPTIONS_KIND_HUBPORT:
> +#ifdef CONFIG_VHOST_NET
> case NET_CLIENT_OPTIONS_KIND_VHOST_USER:
> +#endif
> break;
>
> default:
>
>
>
> It turns out that configure puts CONFIG_VHOST_NET in the "wrong" place -
> config-target.h
>
> echo "CONFIG_VHOST_NET=y" >> $config_target_mak
>
> while for example:
>
> echo "CONFIG_VHOST_SCSI=y" >> $config_host_mak
>
> And net.c includes config-host.h, so we end up with vhost-user never enabled in
> net.c.
Try it :)
> Will it be a problem if CONFIG_VHOST_NET is added to config_host_mak instead?
>
>
> regards,
> Nikolay Nikolaev
It likely won't work for linux-user, right?
--
MST
[Prev in Thread] | Current Thread | [Next in Thread] |