Skip to content

Virtualization support in raspberry pi kernel #377

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
hashken opened this issue Sep 16, 2013 · 11 comments
Closed

Virtualization support in raspberry pi kernel #377

hashken opened this issue Sep 16, 2013 · 11 comments

Comments

@hashken
Copy link

hashken commented Sep 16, 2013

How much virtualization support is enabled in the kernel by default.

Specifically, I want to run mininet on raspberry pi and mininet.

Mininet's Github page lists this

Mininet creates virtual networks using process-based virtualization and network namespaces - features that are available in recent Linux kernels.

I want to know if the raspberry pi kernel can support this by default.

@popcornmix
Copy link
Collaborator

$ zcat /proc/config.gz |grep -i VIRTUALIZATION
# CONFIG_VIRTUALIZATION is not set

So, I'm guessing no. My suspicion is that virtualizion support would add some overhead to the kernel (when not being used), so I'd need some evidence that this option doesn't cause an overhead (in CPU/memory) and is wanted by a number of people.

If you want to play with config options, here would be a good start:
http://elinux.org/RPi_Kernel_Compilation

@Ferroin
Copy link
Contributor

Ferroin commented Sep 16, 2013

CONFIG_VIRTUALIZATION is a dummy config that activates a submenu for KVM and virtio-net drivers, neither of which should be needed for this.

If unspecified Namespace support is enabled by deefault, including network namespaces. Additionally, 'process based virtualization' is marketing gibberish for process sandboxing, which is done using standard syscalls that are always in the kernel (ie chroot).

@vk5tu
Copy link
Contributor

vk5tu commented Sep 16, 2013

The usual reason for running Mininet is to build a virtual network of OpenVSwitches, often controlled by an OpenFlow controller.

$ gzip -d -c /proc/config.gz | grep CONFIG_OPENVSWITCH

CONFIG_OPENVSWITCH is not set

@hashken
Copy link
Author

hashken commented Sep 16, 2013

Isn't openvswitch inserted as a module when you compile its source. Are you sure that there is a separate config option for that in the Linux kernel?

@vk5tu
Copy link
Contributor

vk5tu commented Sep 16, 2013

Isn't openvswitch inserted as a module when you compile its source.

http://git.openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=blob_plain;f=FAQ;hb=HEAD
"Q: What virtualization platforms can use Open vSwitch?
A: ... As of Linux 3.3 it is part of the mainline kernel...."

Are you sure that there is a separate config option for that in the Linux kernel?

$ grep Hardware /proc/cpuinfo
Hardware : BCM2708
$ uname -r -v
3.6.11+ #538 PREEMPT Fri Aug 30 20:42:08 BST 2013
$ gzip -d -c /proc/config.gz | grep CONFIG_OPENVSWITCH

CONFIG_OPENVSWITCH is not set

@popcornmix
Copy link
Collaborator

Are we happy CONFIG_OPENVSWITCH is all that is needed for mininet?
As it's a module, then no problem in enabling it.

@vk5tu
Copy link
Contributor

vk5tu commented Sep 16, 2013

Checking the documentation for OpenVSwitch, it looks like it also needs VLANs, and that's configured anyway.

Checking the documentation for Mininet itself:

https://github.com/mininet/mininet/blob/master/INSTALL
"5. Installation on other Linux distributions
In general, you must have:

  • A Linux kernel compiled with network namespace support enabled
  • ..."

$ gzip -d -c /proc/config.gz | grep CONFIG_NET_NS
CONFIG_NET_NS=y

So that looks good too.

In short, I'm confident but at the same time wouldn't be shocked if some minor option was missing. Is that a high enough bar? And if not then what do you need?

@popcornmix
Copy link
Collaborator

Sounds good enough for me. I'll add it with next update.

@vk5tu
Copy link
Contributor

vk5tu commented Sep 16, 2013

Thanks heaps. Give me a ping when the next update happens and I'll install mininet on the RPi and put the directions on my blog for others. The RPi should be a good platform for messing about with OpenFlow, as controller scaling problems can be made to happen using a average PC rather than needing professional test gear.

@popcornmix
Copy link
Collaborator

Please update and test:

pi@raspberrypi:~ $ uname -a
Linux raspberrypi 3.10.12+ #549 Tue Sep 24 00:41:33 BST 2013 armv6l GNU/Linux
pi@raspberrypi:~ $ zcat /proc/config.gz | grep CONFIG_OPENVSWITCH
CONFIG_OPENVSWITCH=m

fastcat pushed a commit to fastcat/linux-pps that referenced this issue Sep 25, 2013
Since mesh powersaving was added, pending bcast/mcast frames may go out the
CAB queue now.  Unfortunately, the queue was only set up for AP mode, so we
would try to tx on the IEEE80211_INVAL_HW_QUEUE.  Allow cab_queue for mesh
interfaces as well.

Fixes the following warning (or crash without MAC80211_VERBOSE_DEBUG):

WARNING: at net/mac80211/tx.c:1223 __ieee80211_tx+0x162/0x35f [mac80211]()
Modules linked in: mac80211_hwsim mac80211 cfg80211 [...]
Pid: 3085, comm: avahi-daemon Tainted: G        W    3.8.0-rc1+ raspberrypi#377
Call Trace:
 [<ffffffff81045c20>] warn_slowpath_common+0x83/0x9c
 [<ffffffff81045c53>] warn_slowpath_null+0x1a/0x1c
 [<ffffffffa083aef0>] __ieee80211_tx+0x162/0x35f [mac80211]
 [<ffffffffa083cb1d>] ieee80211_tx+0xd3/0xf9 [mac80211]
 [<ffffffffa083cc0f>] ieee80211_xmit+0xcc/0xd5 [mac80211]
 [<ffffffffa083db59>] ieee80211_subif_start_xmit+0xc53/0xcd8 [mac80211]
 [<ffffffff81319acd>] dev_hard_start_xmit+0x259/0x3ce
 [<ffffffff81333d6b>] sch_direct_xmit+0x74/0x17d
 [<ffffffff8131a0b1>] dev_queue_xmit+0x230/0x414
 [<ffffffff8134877a>] ip_finish_output2+0x348/0x3aa
 [<ffffffff81349029>] ip_finish_output+0x6c/0x71
 [<ffffffff81349046>] NF_HOOK_COND.constprop.44+0x18/0x58
 [<ffffffff8134a03a>] ip_mc_output+0x134/0x13c
 [<ffffffff8134835a>] dst_output+0x18/0x1c
 [<ffffffff81349a24>] ip_local_out+0x20/0x24
 [<ffffffff8134a8cf>] ip_send_skb+0x16/0x3c
 [<ffffffff8136bfba>] udp_send_skb+0x254/0x2b9
 [<ffffffff8136c85e>] udp_sendmsg+0x5a8/0x7d4

Signed-off-by: Bob Copeland <[email protected]>
Signed-off-by: Johannes Berg <[email protected]>
popcornmix pushed a commit that referenced this issue Aug 4, 2014
WARNING: line over 80 characters
#205: FILE: kernel/locking/rwsem-xadd.c:275:
+		old = cmpxchg(&sem->count, count, count + RWSEM_ACTIVE_WRITE_BIAS);

WARNING: line over 80 characters
#376: FILE: kernel/locking/rwsem-xadd.c:434:
+		 * If there were already threads queued before us and there are no

WARNING: line over 80 characters
#377: FILE: kernel/locking/rwsem-xadd.c:435:
+		 * active writers, the lock must be read owned; so we try to wake

total: 0 errors, 3 warnings, 417 lines checked

Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Peter Zijlstra <[email protected]>
Cc: "H. Peter Anvin" <[email protected]>
Cc: Davidlohr Bueso <[email protected]>
Cc: Tim Chen <[email protected]>
Cc: Linus Torvalds <[email protected]>
Link: http://lkml.kernel.org/n/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
@vk5tu
Copy link
Contributor

vk5tu commented Sep 23, 2014

Tested and works. Documented at Installing OpenVSwitch and Mininet on Raspberry Pi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants