ia64/xen-unstable

changeset 11662:8cffe84d8f51

[NET] back: Create 0 loopbacks by default for non-domain-0.
Signed-off-by: Keir Fraser <keir@xensource.com>
author kfraser@localhost.localdomain
date Thu Sep 28 13:20:58 2006 +0100 (2006-09-28)
parents 3dea280880e2
children 34452b288046
files linux-2.6-xen-sparse/drivers/xen/netback/loopback.c
line diff
     1.1 --- a/linux-2.6-xen-sparse/drivers/xen/netback/loopback.c	Thu Sep 28 12:46:09 2006 +0100
     1.2 +++ b/linux-2.6-xen-sparse/drivers/xen/netback/loopback.c	Thu Sep 28 13:20:58 2006 +0100
     1.3 @@ -53,8 +53,9 @@
     1.4  #include <linux/skbuff.h>
     1.5  #include <linux/ethtool.h>
     1.6  #include <net/dst.h>
     1.7 +#include <asm/hypervisor.h> /* is_initial_xendomain() */
     1.8  
     1.9 -static int nloopbacks = 8;
    1.10 +static int nloopbacks = -1;
    1.11  module_param(nloopbacks, int, 0);
    1.12  MODULE_PARM_DESC(nloopbacks, "Number of netback-loopback devices to create");
    1.13  
    1.14 @@ -239,6 +240,9 @@ static int __init loopback_init(void)
    1.15  {
    1.16  	int i, err = 0;
    1.17  
    1.18 +	if (nloopbacks == -1)
    1.19 +		nloopbacks = is_initial_xendomain() ? 8 : 0;
    1.20 +
    1.21  	for (i = 0; i < nloopbacks; i++)
    1.22  		if ((err = make_loopback(i)) != 0)
    1.23  			break;