From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54589) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WxdGL-0001pz-5o for qemu-devel@nongnu.org; Thu, 19 Jun 2014 10:24:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WxdGG-0004hv-86 for qemu-devel@nongnu.org; Thu, 19 Jun 2014 10:24:25 -0400 Received: from mx1.redhat.com ([209.132.183.28]:24090) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WxdGF-0004hi-VC for qemu-devel@nongnu.org; Thu, 19 Jun 2014 10:24:20 -0400 Date: Thu, 19 Jun 2014 17:24:46 +0300 From: "Michael S. Tsirkin" Message-ID: <20140619142446.GD4544@redhat.com> References: <20140618204530.16806.54996.stgit@3820> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH] net: fix vhost-user mingw compilation List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Nikolay Nikolaev Cc: VirtualOpenSystems Technical Team , qemu-devel On Thu, Jun 19, 2014 at 05:16:44PM +0300, Nikolay Nikolaev wrote: > Hello, >=20 >=20 > On Wed, Jun 18, 2014 at 11:45 PM, Nikolay Nikolaev < > n.nikolaev@virtualopensystems.com> wrote: >=20 > Make net.o linkage expect net_init_vhost_user only when > CONFIG_VHOST_NET is defined. >=20 > Signed-off-by: Nikolay Nikolaev > --- > =A0net/net.c | =A0 =A04 ++++ > =A01 file changed, 4 insertions(+) >=20 > 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])( > =A0 =A0 =A0 =A0 =A0[NET_CLIENT_OPTIONS_KIND_BRIDGE] =A0 =A0=3D net_= init_bridge, > =A0#endif > =A0 =A0 =A0 =A0 =A0[NET_CLIENT_OPTIONS_KIND_HUBPORT] =A0 =3D net_in= it_hubport, > +#ifdef CONFIG_VHOST_NET > =A0 =A0 =A0 =A0 =A0[NET_CLIENT_OPTIONS_KIND_VHOST_USER] =3D net_ini= t_vhost_user, > +#endif > =A0}; >=20 >=20 > @@ -837,7 +839,9 @@ static int net_client_init1(const void *object,= int > is_netdev, Error **errp) > =A0 =A0 =A0 =A0 =A0case NET_CLIENT_OPTIONS_KIND_BRIDGE: > =A0#endif > =A0 =A0 =A0 =A0 =A0case NET_CLIENT_OPTIONS_KIND_HUBPORT: > +#ifdef CONFIG_VHOST_NET > =A0 =A0 =A0 =A0 =A0case NET_CLIENT_OPTIONS_KIND_VHOST_USER: > +#endif > =A0 =A0 =A0 =A0 =A0 =A0 =A0break; >=20 > =A0 =A0 =A0 =A0 =A0default: >=20 >=20 >=20 > It turns out that configure puts CONFIG_VHOST_NET in the "wrong" place = - > config-target.h >=20 > echo "CONFIG_VHOST_NET=3Dy" >> $config_target_mak >=20 > while for example: >=20 > echo "CONFIG_VHOST_SCSI=3Dy" >> $config_host_mak >=20 > And net.c includes config-host.h, so we end up with vhost-user never en= abled in > net.c. Not good. > Will it be a problem if CONFIG_VHOST_NET is added to config_host_mak in= stead? >=20 >=20 > regards, > Nikolay Nikolaev Try it :) It likely won't work for linux-user, right? --=20 MST