diff mbox

[1/6] configure: add new config define CONFIG_VHOST_NET_USED

Message ID 20140619150708.10499.23280.stgit@3820
State New
Headers show

Commit Message

Nikolay Nikolaev June 19, 2014, 3:07 p.m. UTC
This will be used in net.c (for now) to enable vhos-user netdev backend.

Signed-off-by: Nikolay Nikolaev <n.nikolaev@virtualopensystems.com>
---
 configure |    3 +++
 net/net.c |    4 ++--
 2 files changed, 5 insertions(+), 2 deletions(-)

Comments

Michael S. Tsirkin June 19, 2014, 3:35 p.m. UTC | #1
On Thu, Jun 19, 2014 at 06:07:15PM +0300, Nikolay Nikolaev wrote:
> This will be used in net.c (for now) to enable vhos-user netdev backend.
> 
> Signed-off-by: Nikolay Nikolaev <n.nikolaev@virtualopensystems.com>

Did you test this with mingw?

> ---
>  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;
Nikolay Nikolaev June 19, 2014, 3:38 p.m. UTC | #2
On Thu, Jun 19, 2014 at 6:35 PM, Michael S. Tsirkin <mst@redhat.com> wrote:

> On Thu, Jun 19, 2014 at 06:07:15PM +0300, Nikolay Nikolaev wrote:
> > This will be used in net.c (for now) to enable vhos-user netdev backend.
> >
> > Signed-off-by: Nikolay Nikolaev <n.nikolaev@virtualopensystems.com>
>
> Did you test this with mingw?
>

No, I didn't manage to setup mingw under linux. But this "vhost_net" should
be enabled only for linux in configure. So if I understand it properly,
mingw should be safe.

regards,
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;
>
> --
> You received this message because you are subscribed to the Google Groups
> "Snabb Switch development" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to snabb-devel+unsubscribe@googlegroups.com.
> To post to this group, send an email to snabb-devel@googlegroups.com.
> Visit this group at http://groups.google.com/group/snabb-devel.
>
diff mbox

Patch

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;