Revision f2eaeac7

View differences:

INSTALL
16 16
  so that 'import mininet' will work, and installs the primary mn
17 17
  script (mn) as well as its helper utility (mnexec.)
18 18

  
19
- Mininet requires a kernel built with support for the CLONE_NETNS unshare 
20
  flag by default (i.e. with CONFIG_NET_NS turned on.)
19
- Mininet requires a kernel built with network namespace support enabled,
20
  i.e. with CONFIG_NET_NS=Y
21 21
  
22 22
  If your kernel doesn't support it, you will need to build and install a 
23
  kernel that does! >= 2.6.33 works best, although the reference kernel
24
  switch requires a small patch to compile with it (see below.)
25

  
23
  kernel that does! >= 2.6.33 works best, but requires a patch to
24
  ofdatapath and to tun.c (see patches [1] and [2], below.)
25
  
26
  2.6.26 works with CONFIG_NET_NS enabled and no additional patches, but
27
  it is much slower at removing veth interfaces, resulting in much slower
28
  switch shutdown.
29
    
26 30
- Mininet should probably be run either on a machine with
27 31
  no other important processes, or on a virtual machine.
28 32
  Multiple concurrent Mininet instances are not supported.
......
71 75

  
72 76
---
73 77

  
74
patch to OpenFlow reference implementation datapath/datapath.c to compile 
75
under linux 2.6.33:
78
[1] OpenFlow Reference Implementation patch for Linux 2.6.33/2.6.33.1
79

  
80
The OpenFlow kernel reference implementation does not compile out of the box
81
on Linux 2.6.33/2.6.33.1 with network namespaces enabled.
82

  
83
The following workaround modifies it to always use the root namespace, and should
84
enable it to work with Mininet under 2.6.33.x:
76 85

  
77 86
diff --git a/datapath/datapath.c b/datapath/datapath.c
78 87
index 4a4d3a2..365aa25 100644
......
100 109
+#endif
101 110
               : genlmsg_multicast(skb, 0, dp_mc_group(dp), GFP_ATOMIC));
102 111
}
112

  
113
[2] Linux kernel 2.6.33/2.6.33.1 tun driver patch
114

  
115
The tun driver in Linux 2.6.33/2.6.33.1 doesn't work correctly in a network
116
namespace. As a result, running the user datapath in a network namespace
117
(e.g. as is done in examples/scratchnetuser.py) will cause a kernel panic
118
when sysfs cannot create an entry for a tap interface, since the tun network
119
device has a missing parent kobj. As a workaround, the following patch
120
skips creating the sysfs entries when this is the case. This is an acceptable
121
workaround as long as sysfs entries for tap interfaces are not being actively
122
used (and they are not currently in Mininet.)
123

  
124
diff linux-2.6.33.1/drivers/net/tun-orig.c linux-2.6.33.1/drivers/net/tun.c 
125
1009c1009,1011
126
< 		if (device_create_file(&tun->dev->dev, &dev_attr_tun_flags) ||
127
---
128
> 		/* BL workaround: check for null parent kobj */
129
> 		if (!tun->dev->dev.kobj.sd ||
130
> 		    device_create_file(&tun->dev->dev, &dev_attr_tun_flags) ||
131

  
132

  
133

  
134

  

Also available in: Unified diff