diff mbox

vhost: fix TUN=m VHOST_NET=y

Message ID 20100120113037.GA9182@redhat.com
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

Michael S. Tsirkin Jan. 20, 2010, 11:30 a.m. UTC
drivers/built-in.o: In function `get_tun_socket':
    net.c:(.text+0x15436e): undefined reference to `tun_get_socket'

If tun is a module, vhost must be a module, too.
If tun is built-in or disabled, vhost can be built-in.

Note: TUN || !TUN might look a bit strange until you realize
that boolean logic rules do not apply for tristate variables.

Reported-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---

The above was already applied by Rusty, but got lost.
The patch is on top of net-next.

 drivers/vhost/Kconfig |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Comments

Randy Dunlap Jan. 20, 2010, 4:49 p.m. UTC | #1
On Wed, 20 Jan 2010 13:30:38 +0200 Michael S. Tsirkin wrote:

> drivers/built-in.o: In function `get_tun_socket':
>     net.c:(.text+0x15436e): undefined reference to `tun_get_socket'
> 
> If tun is a module, vhost must be a module, too.
> If tun is built-in or disabled, vhost can be built-in.
> 
> Note: TUN || !TUN might look a bit strange until you realize
> that boolean logic rules do not apply for tristate variables.
> 
> Reported-by: Randy Dunlap <randy.dunlap@oracle.com>
> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>

Acked-by: Randy Dunlap <randy.dunlap@oracle.com>

Thanks.

> ---
> 
> The above was already applied by Rusty, but got lost.
> The patch is on top of net-next.
> 
>  drivers/vhost/Kconfig |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/vhost/Kconfig b/drivers/vhost/Kconfig
> index 9f409f4..9e93553 100644
> --- a/drivers/vhost/Kconfig
> +++ b/drivers/vhost/Kconfig
> @@ -1,6 +1,6 @@
>  config VHOST_NET
>  	tristate "Host kernel accelerator for virtio net (EXPERIMENTAL)"
> -	depends on NET && EVENTFD && EXPERIMENTAL
> +	depends on NET && EVENTFD && (TUN || !TUN) && EXPERIMENTAL
>  	---help---
>  	  This kernel module can be loaded in host kernel to accelerate
>  	  guest networking with virtio_net. Not to be confused with virtio_net
> -- 
> 1.6.6.144.g5c3af


---
~Randy
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David Miller Jan. 21, 2010, 9:28 a.m. UTC | #2
From: Randy Dunlap <randy.dunlap@oracle.com>
Date: Wed, 20 Jan 2010 08:49:10 -0800

> On Wed, 20 Jan 2010 13:30:38 +0200 Michael S. Tsirkin wrote:
> 
>> drivers/built-in.o: In function `get_tun_socket':
>>     net.c:(.text+0x15436e): undefined reference to `tun_get_socket'
>> 
>> If tun is a module, vhost must be a module, too.
>> If tun is built-in or disabled, vhost can be built-in.
>> 
>> Note: TUN || !TUN might look a bit strange until you realize
>> that boolean logic rules do not apply for tristate variables.
>> 
>> Reported-by: Randy Dunlap <randy.dunlap@oracle.com>
>> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> 
> Acked-by: Randy Dunlap <randy.dunlap@oracle.com>

Applied to net-next-2.6, thanks!
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/vhost/Kconfig b/drivers/vhost/Kconfig
index 9f409f4..9e93553 100644
--- a/drivers/vhost/Kconfig
+++ b/drivers/vhost/Kconfig
@@ -1,6 +1,6 @@ 
 config VHOST_NET
 	tristate "Host kernel accelerator for virtio net (EXPERIMENTAL)"
-	depends on NET && EVENTFD && EXPERIMENTAL
+	depends on NET && EVENTFD && (TUN || !TUN) && EXPERIMENTAL
 	---help---
 	  This kernel module can be loaded in host kernel to accelerate
 	  guest networking with virtio_net. Not to be confused with virtio_net