From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37693) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wxdw2-00025Y-3H for qemu-devel@nongnu.org; Thu, 19 Jun 2014 11:07:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wxdvv-0003op-Cd for qemu-devel@nongnu.org; Thu, 19 Jun 2014 11:07:30 -0400 Received: from mail-wg0-f49.google.com ([74.125.82.49]:49468) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wxdvv-0003ol-7D for qemu-devel@nongnu.org; Thu, 19 Jun 2014 11:07:23 -0400 Received: by mail-wg0-f49.google.com with SMTP id y10so2480988wgg.32 for ; Thu, 19 Jun 2014 08:07:22 -0700 (PDT) From: Nikolay Nikolaev Date: Thu, 19 Jun 2014 18:07:15 +0300 Message-ID: <20140619150708.10499.23280.stgit@3820> In-Reply-To: <20140619150355.10499.53297.stgit@3820> References: <20140619150355.10499.53297.stgit@3820> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] [PATCH 1/6] configure: add new config define CONFIG_VHOST_NET_USED List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: snabb-devel@googlegroups.com, qemu-devel@nongnu.org, mst@redhat.com Cc: tech@virtualopensystems.com, n.nikolaev@virtualopensystems.com This will be used in net.c (for now) to enable vhos-user netdev backend. Signed-off-by: Nikolay Nikolaev --- configure | 3 +++ net/net.c | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/configure b/configure index 9f4ba45..fb3c856 100755 --- a/configure +++ b/configure @@ -4543,6 +4543,9 @@ fi if test "$vhost_scsi" = "yes" ; then echo "CONFIG_VHOST_SCSI=y" >> $config_host_mak fi +if test "$vhost_net" = "yes" ; then + echo "CONFIG_VHOST_NET_USED=y" >> $config_host_mak +fi if test "$blobs" = "yes" ; then echo "INSTALL_BLOBS=yes" >> $config_host_mak fi diff --git a/net/net.c b/net/net.c index 0c30414..3dac29b 100644 --- a/net/net.c +++ b/net/net.c @@ -803,7 +803,7 @@ 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 +#ifdef CONFIG_VHOST_NET_USED [NET_CLIENT_OPTIONS_KIND_VHOST_USER] = net_init_vhost_user, #endif }; @@ -839,7 +839,7 @@ 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 +#ifdef CONFIG_VHOST_NET_USED case NET_CLIENT_OPTIONS_KIND_VHOST_USER: #endif break;