GithubHelp home page GithubHelp logo

sysml / clickos Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kohler/click

135.0 135.0 35.0 22.4 MB

The Click modular router: fast modular packet processing and analysis

Home Page: http://www.read.cs.ucla.edu/click/

License: Other

Java 0.45% C 28.67% C++ 61.42% Perl 1.86% Shell 2.11% Makefile 1.32% Hack 2.34% TeX 0.02% XSLT 0.04% Click 1.09% Roff 0.34% Vim Script 0.18% Ruby 0.10% M4 0.05%
click mini-os networking unikernel xen

clickos's People

Contributors

amckinley03 avatar bartbraem avatar bcronje avatar ckreibich avatar feng23 avatar fmanco avatar gdistasi avatar hacklschorsch avatar harald-schioeberg avatar hsmtkk avatar hwl-robat avatar jensdewit avatar joonwpark avatar jpemartins avatar kohler avatar kwi-dk avatar lalithsuresh avatar mvenk avatar pnr avatar puneetsood avatar rchertov avatar sandeep048 avatar shoban avatar skuenzer avatar springbo avatar srcman avatar teknoraver avatar tumatik avatar vlolteanu avatar yvolchkov avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

clickos's Issues

Ring Size & Test Examples

Hi, Fillipe:

Sorry for bothering again, yet I was wondering if there is some way to change the ring size without making the ClickOS image again, is it possible to change in the example.cfg scripts or through command line? Could the ring size diff from clickos-0(dom1) to clickos-1(dom2)?

Also, I was wondering if you still have the mirror.click files tested before, Wire (WR), EtherMirror (EM), IP Router (IR), Load Balancer (LB) and Flow Monitor (FM)?

ClickOS - no response after some time and hangs

I am trying the simple ping response example with latest ClickOS from master. I have tried this on both Ubuntu 14.04 LTS Update 5 as well as Ubuntu 16.04 Update 3 LTS with stock Xen.

After initial success, the Click OS setup stops responding to ping request after some time. To rule out any issues with network setup, I have used both linux bridge as well as Open vSwitch .. both end up with similar issues. What could be the reason? Is there something I have missed out and what should I be looking at?

Please note that I have tried this on multiple Ubuntu + Xen systems. The clickos vm reponds to 'xl shutdown' ... so it doesn't seem to have crashed.

Minimal debug attempt - I recompiled minios with debug dprintk enabled and with that I don't see any "rx: --- " output in console once it hangs.

+++
/** commented out
#define dprintk(format, ...)	do {} while(0)
*/

#ifndef dprintk
#define dprintk(format, ...)	printk(format,##__VA_ARGS__)
#endif
+++

Last few lines of xl console output before hang - 

rx: ring: len 98
rx: --- 98 bytes
Ping Response:   98 | 00161715 5d190050 56b52ef4 08004500 00540c29 0000ff01
tx: raw 98
rx: ring: len 98
rx: --- 98 bytes
Ping Response:   98 | 00161715 5d190050 56b52ef4 08004500 00540cb5 0000ff01
tx: raw 98

Here is my simple test config -

// define the IP address of this network function.
// This IP must NOT be the same with your VM's IP.
define($IP 192.168.44.29);
// This MAC must be identical with the one you defined in config.xen
define($MAC 00:16:17:15:5d:19);

source :: FromDevice;
sink   :: ToDevice;
c :: Classifier(
    12/0806 20/0001,
    12/0806 20/0002,
    12/0800,
    -);

arpq :: ARPQuerier($IP, $MAC);
arpr :: ARPResponder($IP $MAC);  // No comma here.

source -> c;
c[0] -> ARPPrint -> arpr -> sink;
c[1] -> [1]arpq;
Idle -> [0]arpq;
arpq -> ARPPrint -> sink;
c[2] -> CheckIPHeader(14) -> ICMPPingResponder() -> Print('Ping Response') -> EtherMirror() -> sink;
c[3] -> Discard;

xen config

name   = 'firsttest'
kernel = '/home/tester/workspace/clickos/minios/build/clickos_x86_64'
vcpus  = '1'
# pinning your VCPU helps performance
cpus   = '3'
memory = '128'

# uncoment this line if you wish to use our backend
#vif    = ['bridge=vale0,script=vif-vale']
vif    = ['script=vif-openvswitch,mac=00:16:17:15:5d:19,bridge=ovsbr1,model=e1000']

on_poweroff = 'destroy'
on_reboot   = 'restart'
on_crash    = 'preserve'
click       = 'mirror.click'

# uncomment this line to enable PVH mode for ClickOS
#pvh=1

Container-based ClickOS virtualization

I want to virtualize ClickOS VMs using container-based virtualization, but I think ClickOS is restricted to be used with Xen-based management.
More specifically, I'm interested in use ClickOS together with CoreOS (https://github.com/coreos), which uses Docker for container management.
Maybe Xen optimizations made to improve ClickOS's packet processing turn it not possible, but I'm not sure.
Do you have any ideia if this compatibility is possible?

Thank you,

Error while trying to compile Minios

I have been trying to compile clickos with minios on a virtualized Xen machine but I've run into a weird issue and I've been wondering if you could aid me. I am attaching a screenshot of the error. While I am following the guide on the website when it comes to building clickos I get an error message.

VirtualBox_UbuntuServer_15_09_2020_17_39_06

Does ClickOS-ctl work with lixs?

Recently, on my laptop with an eight core CPU and 16GB RAM, I created 200 ClickOS VMs and used ClickOS-ctl to install the router instances into it. For my needs then I tried to update the routers installed into each ClickOS instance by first removing the old router and then install a new router. It takes quite a lot of time (i.e. several tens of seconds) to finish updating the routers installed into the 200 ClickOS VMs.

Then I wrote a python script which uses the multiprocessing module to create multiple processes and each process is responsible for updating routers installed in a fraction of the 200 ClickOS VMs. Of course, each process still utilizes the ClickOS-ctl tool. This time the overall time taken is ridiculously high (in the orders of tens of minutes).

I am wondering what might cause such slowdown. Does the XenStore have good support for concurrently read/write using ClickOS-ctl? Moreover, I am using the regular XenStore library instead of the LIghtweight XenStore (lixs). Will it help if I use the lixs? I am just wondering whether the ClickOS-ctl tool will work with the lightweight xenstore.

Adding new click elements to clickos

Hi,
I was able to launch clickos vms through your tutorial here http://cnp.neclab.eu/getting-started#clickos

I tested click on baremetel server where I was adding my own implemented and modified elements. I am not sure how I can do the same process with clickos.
For example,

  • would modifying an element means that I have to build minos image all over again?
  • how can I debug my code withing clickos? in baremetal I could see my dmesg for example. But with clickos I'm limited by 1 console that doesn't let me interact with the vm.

Please advise
Thanks,

ClickOS failed to run on Xen+Ubuntu 14.04.2

Hi,

Recently, I am trying to make ClickOS run on Xen hypervisor with Ubuntu-14.04-64bits LTS desktop as Dom0. But I cannot work it out.

I have made it work on Debian-7.8-64bits. Seems it runs perfectly on Debian.
Just wondering whether the toolchain and clickos is compatible with Ubuntu? Did you ever make it work on Ubuntu?

A very similar problem is here: cnplab/cosmos#3
I encoutered the same thing on Debian, but I made it work by following the instructions discussed in that issue. It is the "cosmos make DOMLIB=xl" that matters.
For Ubuntu, it did not work.

In Ubuntu, I do exactly the way I did on Debian:

  1. Install Ubuntu 14.04 desktop as host.
  2. Download Xen-4.4.1 source code, compile and install.
  3. Reboot from Ubuntu-Xen-hypervisor with Ubuntu 14.04 as Dom0.
  4. Git clickos, toolchain, cosmos, minios.
  5. Make toolchain.
  6. Make clickos
  7. Make cosmos
  8. Setup bridges for Xen.
  9. xl create /home/work/clickos/minios/config.xen (This point, xl list shows clickos -b----. )
  10. /home/work/cosmos/dist/bin/cosmos start $DOMID /home/work/clickos/minios/rule.click (This point, xl list show clickos -b---- .)
  11. xl console $DOMID ($DOMID set correctly.)

After that the output is as following:

Xen Minimal OS!
start_info: 0x2ef000(VA)
nr_pages: 0xc00
shared_inf: 0x380fa000(MA)
pt_base: 0x2f2000(VA)
nr_pt_frames: 0x5
mfn_list: 0x2e9000(VA)
mod_start: 0x0(VA)
mod_len: 0
flags: 0x0
cmd_line:
stack: 0x241f40-0x261f40
MM: Init
_text: 0x0(VA)
_etext: 0xecd06(VA)
_erodata: 0x16a000(VA)
_edata: 0x16bb98(VA)
stack start: 0x241f40(VA)
_end: 0x2e8010(VA)
start_pfn: 2fa
max_pfn: c00
Mapping memory range 0x400000 - 0xc00000
setting 0x0-0x16a000 readonly
skipped 0x1000
MM: Initialise page allocator for 2fe000(2fe000)-c00000(c00000)
MM: done
Demand map pfns at c01000-2000c01000.
Heap resides at 2000c02000-4000c02000.
Initialising timer interface
Initialising console ... done.
gnttab_table mapped at 0xc01000.
Initialising scheduler
Thread "Idle": pointer: 0x2000c02050, stack: 0x310000
Thread "xenstore": pointer: 0x2000c02800, stack: 0x320000
xenbus initialised on irq 1 mfn 0x294b8
Thread "shutdown": pointer: 0x2000c02fb0, stack: 0x330000
Dummy main: start_info=0x261f40
Thread "main": pointer: 0x2000c03760, stack: 0x340000
sparsing 0MB at 17e000
"main"

It is blocked here.
xl list still shows clickos with status -b----.

config.xen

kernel = './minios/build/clickos_x86_64'
vcpus = '1'

cpus = '2'

memory = '40'
vif = ['mac=00:15:17:15:5d:74,bridge=xenbr0']
name = 'click0'
on_crash = 'preserve'

rule.click

define ($MACARP 00:15:17:15:5d:74)
define ($IP 172.16.97.81)
in :: FromDevice();
out :: ToDevice();
c :: Classifier(
12/0806 20/0001, // ARP request
12/0800,
-);
arpr :: ARPResponder($IP $MACARP)
in -> c;
c[0] -> arpr -> out;
c[1] -> CheckIPHeader(14) -> Print("start") -> Discard();
c[2] -> Discard();

Many thanks!

--Hongda.

How to run a service chain? It can not launch the click example

Could anyone give some guidance how to do the VM service chain? The same experiment is clickos figure10. How should I write the click example, then make them chain together and the packets can go to the VM service chain?

Another problem is that when I compile clickos, it shows xenstore.h something header files which can not be found. After hardcoded it, it can get compiled successfully. The VM can start successfully.

Thread "shutdown": pointer: 0x2000802fb0, stack: 0x200000
Dummy main: start_info=0x198040
Thread "main": pointer: 0x2000803760, stack: 0x210000
sparsing 0MB at 177000
"main" 

But if it uses cosmos launch the click example, It does not show errors. But I can not see any happening on vm console side. It should print something. I am wondering whether other than hardcoded, should I do some extra configurations?

A question on performance of ClickOS

Dear all,

I used ClickOS to be an l2fwd between vale0 and vale1.

The performance is more than 20Gbps / 2Mpps in 1500B packet.

Is it possible? I think xen NIC is 10Gbps NIC, cannot reach 20Gbps speed.

The packet gen is netmap pkt-gen in xennet

Is it possible to change clickos configuration at runtime?

Hi all,
Currently the click configuration is hard-coded and wrote into ClickOS using xenstore from Dom0.
I am wondering whether the click configuration can be changed at runtime. For example, if I want to
change the IP address of eth0 in a running click configuration, do I need to kill that thread and re-instantiate a new configuration with the new IP?

Also, I am not clear of the multithreading support provided by ClickOS. In the NSDI paper it is mentioned that multiple threads can be launched to enable service function chaining. However, I haven't seen any working example.

Clickos can't run on ubuntu14.04 and xen 4.4.4

HELLO!
To start clickos on my NFV platform, I followed the steps showed on the wbepage ( http://cnp.neclab.eu/getting-started#clickos) and all chose the master branch from github, but something wrong happened.
I can't run clickos on ubuntu 14.04 and xen 4.4.4. I used "make DOMLIB=xcl" to build the cosmos. Then I input "cosmos create example.cfg" and "cosmos start clickos1 mirror.click" to create the clickos, but When I "xl console clickos", the information was showed as follows:

Xen Minimal OS!
start_info: 0x1d8000(VA)
nr_pages: 0x800
shared_inf: 0x103fe000(MA)
pt_base: 0x1db000(VA)
nr_pt_frames: 0x5
mfn_list: 0x1d4000(VA)
mod_start: 0x0(VA)
mod_len: 0
flags: 0x0
cmd_line:
stack: 0x1910c0-0x1b10c0
MM: Init
_text: 0x0(VA)
_etext: 0x100c46(VA)
_erodata: 0x17c000(VA)
_edata: 0x17db98(VA)
stack start: 0x1910c0(VA)
_end: 0x1d3010(VA)
start_pfn: 1e3
max_pfn: 800
Mapping memory range 0x1e3000 - 0x800000
setting 0x0-0x17c000 readonly
skipped 0x1000
MM: Initialise page allocator for 1e5000(1e5000)-800000(800000)
MM: done
Demand map pfns at 801000-2000801000.
Heap resides at 2000802000-4000802000.
Initialising timer interface
Initialising console ... done.
gnttab_table mapped at 0x801000.
Initialising scheduler
Thread "Idle": pointer: 0x2000802050, stack: 0x1f0000
Thread "xenstore": pointer: 0x2000802800, stack: 0x200000
xenbus initialised on irq 1 mfn 0xe0ab
Thread "shutdown": pointer: 0x2000802fb0, stack: 0x210000
Dummy main: start_info=0x1b10c0
Thread "main": pointer: 0x2000803760, stack: 0x220000
sparsing 0MB at 190000
"main"
[on_status:217] router id 0
[on_status:218] status change to Running
Thread "click": pointer: 0x2000810a00, stack: 0x240000
Failed to read /local/domain/0/backend/vif/2/0/feature-netmap.
************************ NETFRONT for device/vif/0 **********

net TX ring size 256, 1024 KB
net RX ring size 256, 1024 KB buffer space
split event channels enabled
backend at /local/domain/0/backend/vif/2/0
mac is 00:15:17:15:5d:74
[on_status:217] router id 1
[on_status:218] status change to Running
Thread "click": pointer: 0x200081c840, stack: 0x460000
Failed to read /local/domain/0/backend/vif/2/0/feature-netmap.
************************ NETFRONT for device/vif/0 **********

net TX ring size 256, 1024 KB
net RX ring size 256, 1024 KB buffer space
split event channels enabled
backend at /local/domain/0/backend/vif/2/0
mac is 00:15:17:15:5d:74

Different with the output on the webpage(http://cnp.neclab.eu/getting-started#clickos) when input "xl console clickos", there is no driver which is running on my computer.

My example.cfg:
name = 'clickos1'
kernel = '/home/wr/clickos_x86_64'
vcpus = '1'

pinning your VCPU helps performance

#cpus = '3'
memory = '8'

uncoment this line if you wish to use our backend

#vif = ['bridge=vale0,script=vif-vale']
vif = ['mac=00:15:17:15:5d:74,bridge=xenbr0']

on_poweroff = 'destroy'
on_reboot = 'restart'
on_crash = 'preserve'
click = 'mirror.click'

uncomment this line to enable PVH mode for ClickOS

#pvh=1
~

My mirroe.click
FromDevice -> EtherMirror -> ToDevice

Please help! THANKS!

Router init failed

Hi, I was wondering if there are some specific requirements for bridge and other network MAC/IP configuration requirements ?

xl console clickos

Xen Minimal OS!
start_info: 0x1bf000(VA)
nr_pages: 0x800
shared_inf: 0xbf4b6000(MA)
pt_base: 0x1c2000(VA)
nr_pt_frames: 0x5
mfn_list: 0x1bb000(VA)
mod_start: 0x0(VA)
mod_len: 0
flags: 0x0
cmd_line:
stack: 0x178040-0x198040
MM: Init
_text: 0x0(VA)
_etext: 0xe163d(VA)
_erodata: 0x15e000(VA)
_edata: 0x15fbb8(VA)
stack start: 0x178040(VA)
_end: 0x1ba010(VA)
start_pfn: 1ca
max_pfn: 800
Mapping memory range 0x400000 - 0x800000
setting 0x0-0x15e000 readonly
skipped 0x1000
MM: Initialise page allocator for 1cc000(1cc000)-800000(800000)
MM: done
Demand map pfns at 801000-2000801000.
Heap resides at 2000802000-4000802000.
Initialising timer interface
Initialising console ... done.
gnttab_table mapped at 0x801000.
Initialising scheduler
Thread "Idle": pointer: 0x2000802050, stack: 0x1e0000
Thread "xenstore": pointer: 0x2000802800, stack: 0x1f0000
xenbus initialised on irq 1 mfn 0x4ac5c0
Thread "shutdown": pointer: 0x2000802fb0, stack: 0x200000
Dummy main: start_info=0x198040
Thread "main": pointer: 0x2000803760, stack: 0x210000
sparsing 0MB at 177000
"main"
[on_status:205] router id 0
[on_status:206] status change to Running
Thread "click": pointer: 0x20008110b0, stack: 0x230000
config:21: undeclared element 'd'
Failed to read /local/domain/0/backend/vif/10/0/feature-netmap.
************************ NETFRONT for device/vif/0 **********

net TX ring size 256
net RX ring size 256
backend at /local/domain/0/backend/vif/10/0
mac is aa:00:00:00:00:00


Router could not be initialized!
close network: backend at /local/domain/0/backend/vif/10/0
[router_thread:149] Router init failed!
Thread "click" exited.

How to send the traffic to vale bridge based vm

Hi all,

After we start the vm with vale bridge, we want to send the traffic to this vm. Any idea?
The vm screen
image

vm list

root@nimbnode21:~# xl list
Name                                        ID   Mem VCPUs  State   Time(s)
Domain-0                                     0 32271    24     r-----     378.1
clickos                                     10     7     1     r-----     405.1
vif10.0   Link encap:Ethernet  HWaddr fe:ff:ff:ff:ff:ff  
          inet addr:10.0.0.11  Bcast:10.255.255.255  Mask:255.0.0.0
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:32 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

The click example

FromDevice->Print("Hi")->ToDevice

We want to send the traffic to vm. But when I run the pktgen from domain 0
It shows this:

root@nimbnode21:~# vale-ctl 
bdg_ctl [98] bridge:0 port:1 vale0:vif10.0
root@nimbnode21:~# pkt-gen -f tx -i vale0:vif10.0
052.426593 main [1624] interface is vale0:vif10.0
052.427249 extract_ip_range [275] range is 10.0.0.1:0 to 10.0.0.1:0
052.427267 extract_ip_range [275] range is 10.1.0.1:0 to 10.1.0.1:0
052.427323 nm_open [542] NIOCREGIF failed vale0:vif10.0
052.427335 main [1803] Unable to open vale0:vif10.0: Invalid argument
052.427369 main [1851] aborting
Usage:

clickos router start error

I am following the tutorial here. I have successfully installed clickos but when I attempt to start the sample router I get the following errors in the console and the VM stays in -b instead of turning to -r. If I try starting a "router" with an empty configuration it does seem to start, however. Other sample files from the /conf directory seem to also return errors much like this.

120093615_3329968330414862_5069237877036748833_n

How to log NAT state on ClickOS

Hi ClickOS team,

Currently, I am focusing on NAT state migration between two virtual machines. I work with MazuNAT on ClickOS. I have some questions and really hope your help. The problem is How I can see what is really happening when a thread accesses on translation table. I mean if I can capture or get some information related packet processing such as which shared variables (in multicore processor) are processing a packet and how I can know where translation table is stored.
Actually, I tried to capture actions from IPRewriter function but may be it is not solution.

Could anyone have any suggestion in this case?
Thank in advance!

Get system time in ClickOS

Hi,

Now I am using ClickOS to build a firewall and want to test the performance of the firewall.
So I would like to obtain the system time in ClickOS to measure the elapsed time.
Is there any way to obtain the system time?

Best Wishes,

Hongda.

Section per each C++ symbol in the final binary

Besides the .text section, the final clickos binary contains over a thousand sections in the form .text.[some mangled name] corresponding to C++ symbols.
This increases boot time (sequentially searching for the __xen_guest section which is located at the end) and is unnecessary, therefore should be eliminated in the final linking (i.e. all .text.* sections merged into the .text section).

Forwarding traffic with clickos

Hi, im trying to use clickos to forward traffic betwenn 2 VM, but am having issues.

Each vm is connected with one bridge(br0 and br1) and click interconnects them(clickos is connected both with br0 and br1), like this:

VM1 <-br0-> clickos <-br1-> VM2

My clickos config is:

kernel = './clickos_x86_64'
vcpus = '1'

cpus = '2'

memory = '256'
vif = ['bridge=br0', 'bridge=br1']
name = 'click0'
on_crash = 'preserve'

And the click config running is:

FromDevice(0) -> Print("De 0 para 1") -> ToDevice(1);
FromDevice(1) -> Print("De 1 para 0") -> ToDevice(0);

I can ping between the vms, but when i try using iperf, or telnet, i cant get a connection between then.
When i ping between then, this is shown on console:

From port to port
De 1 para 0: 98 | 00163e64 e4ff0016 3eea4c24 08004500 0054b221 40004001
De 0 para 1: 98 | 00163eea 4c240016 3e64e4ff 08004500 00540efb 00004001
De 1 para 0: 98 | 00163e64 e4ff0016 3eea4c24 08004500 0054b29b 40004001
De 0 para 1: 98 | 00163eea 4c240016 3e64e4ff 08004500 00540f6c 00004001

And when i try other program(using both TCP and UDP), it shows:

De 1 para 0: 66 | 00163e64 e4ff0016 3eea4c24 08004500 0034e9fe 40004006
De 1 para 0: 66 | 00163e64 e4ff0016 3eea4c24 08004500 0034e9ff 40004006
De 1 para 0: 66 | 00163e64 e4ff0016 3eea4c24 08004500 0034ea00 40004006
De 1 para 0: 42 | 00163e64 e4ff0016 3eea4c24 08060001 08000604 00010016
De 0 para 1: 42 | 00163eea 4c240016 3e64e4ff 08060001 08000604 00020016

Running the same click config on a linux VM using click linux module instead of clickos i have no issues.

No related output about package with xl console

This is configuration of domain-u:
name = 'vm4'
kernel = '/root/xen/clickos/minios/build/clickos_x86_64'
vcpus = '1'

cpus = '3'

memory = '16'

uncoment this line if you wish to use our backend

vif = ['ip=192.168.1.201,mac=08:00:27:1c:aa:10,bridge=vale0,script=/etc/xen/scripts/vif-vale']
#vif = ['ip=192.168.1.200,mac=08:00:27:1c:aa:09,bridge=vale0']

on_poweroff = 'destroy'
on_reboot = 'restart'
on_crash = 'preserve'
click = 'vm4.click'

then I use vale-ctl to show connection:

bdg_ctl [98] bridge:0 port:0 vale0:eth0
bdg_ctl [98] bridge:0 port:1 vale0:vif1.0

after the above operation,I open another terminal,input command ping 192.168.1.201:

PING 192.168.1.201 (192.168.1.201) 56(84) bytes of data.
From 192.168.1.162 icmp_seq=1 Destination Host Unreachable
From 192.168.1.162 icmp_seq=2 Destination Host Unreachable
From 192.168.1.162 icmp_seq=3 Destination Host Unreachable
From 192.168.1.162 icmp_seq=4 Destination Host Unreachable
From 192.168.1.162 icmp_seq=5 Destination Host Unreachable
From 192.168.1.162 icmp_seq=6 Destination Host Unreachable
From 192.168.1.162 icmp_seq=7 Destination Host Unreachable
From 192.168.1.162 icmp_seq=8 Destination Host Unreachable
From 192.168.1.162 icmp_seq=9 Destination Host Unreachable

then I use xl console vm4:

Xen Minimal OS!
start_info: 0x2ea000(VA)
nr_pages: 0x1000
shared_inf: 0xac783000(MA)
pt_base: 0x2ed000(VA)
nr_pt_frames: 0x5
mfn_list: 0x2e2000(VA)
mod_start: 0x0(VA)
mod_len: 0
flags: 0x0
cmd_line:
stack: 0x23af40-0x25af40
MM: Init
_text: 0x0(VA)
_etext: 0xe8826(VA)
_erodata: 0x163000(VA)
_edata: 0x164bb8(VA)
stack start: 0x23af40(VA)
_end: 0x2e1010(VA)
start_pfn: 2f5
max_pfn: 1000
Mapping memory range 0x400000 - 0x1000000
setting 0x0-0x163000 readonly
skipped 0x1000
MM: Initialise page allocator for 2fb000(2fb000)-1000000(1000000)
MM: done
Demand map pfns at 1001000-2001001000.
Heap resides at 2001002000-4001002000.
Initialising timer interface
Initialising console ... done.
gnttab_table mapped at 0x1001000.
Initialising scheduler
Thread "Idle": pointer: 0x2001002050, stack: 0x310000
Thread "xenstore": pointer: 0x2001002800, stack: 0x320000
xenbus initialised on irq 1 mfn 0xac493
Thread "shutdown": pointer: 0x2001002fb0, stack: 0x330000
Dummy main: start_info=0x25af40
Thread "main": pointer: 0x2001003760, stack: 0x340000
sparsing 0MB at 177000
"main"
[on_status:205] router id 0
[on_status:206] status change to Running
Thread "click": pointer: 0x2001010a00, stack: 0x360000
backend dom 0
Mapping TX rings
0 map errors
Mapping RX rings
0 map errors
Mapping TX buffers
0 map errors
Mapping RX buffers
0 map errors
init_netfront_netmap device/vif/0
Waiting for /local/domain/0/backend/vif/3/0/state change to connected
unmasking event-channel-tx 4
unmasking event-channel-rx 5
[router_thread:157] Starting driver...

[on_status:205] router id 1
[on_status:206] status change to Running
Thread "click": pointer: 0x20010262c0, stack: 0x390000
Replacing netif_rx handler for dev device/vif/0
[router_thread:157] Starting driver...

I wonder why there is no information about package?Is anything wrong with my configuration?what should I do?

Unable to use simple mirror.click

Dear all,

The screen shows: [on_status:206] status change to Stopped when use
"sudo clickos-ctl/clickos install clickos mirror.click"
Could you help me please?

Xen Minimal OS!
start_info: 0x2ed000(VA)
nr_pages: 0x800
shared_inf: 0xaa9e3000(MA)
pt_base: 0x2f0000(VA)
nr_pt_frames: 0x5
mfn_list: 0x2e9000(VA)
mod_start: 0x0(VA)
mod_len: 0
flags: 0x0
cmd_line:
stack: 0x241f40-0x261f40
MM: Init
_text: 0x0(VA)
_etext: 0xecd96(VA)
_erodata: 0x16a000(VA)
_edata: 0x16bb98(VA)
stack start: 0x241f40(VA)
_end: 0x2e8010(VA)
start_pfn: 2f8
max_pfn: 800
Mapping memory range 0x400000 - 0x800000
setting 0x0-0x16a000 readonly
skipped 0x1000
MM: Initialise page allocator for 2fa000(2fa000)-800000(800000)
MM: done
Demand map pfns at 801000-2000801000.
Heap resides at 2000802000-4000802000.
Initialising timer interface
Initialising console ... done.
gnttab_table mapped at 0x801000.
Initialising scheduler
Thread "Idle": pointer: 0x2000802050, stack: 0x310000
Thread "xenstore": pointer: 0x2000802800, stack: 0x320000
xenbus initialised on irq 1 mfn 0x1039459
Thread "shutdown": pointer: 0x2000802fb0, stack: 0x330000
Dummy main: start_info=0x261f40
Thread "main": pointer: 0x2000803760, stack: 0x340000
sparsing 0MB at 17e000
"main"
[on_status:205] router id 0
[on_status:206] status change to Stopped


mirror.click

FromDevice -> EtherMirror -> ToDevice


sudo vale-ctl
bdg_ctl [98] bridge:0 port:0 vale0:eth1
bdg_ctl [98] bridge:0 port:1 vale0:vif2.0
bdg_ctl [98] bridge:1 port:0 vale1:eth2


Error when compiling clickOS

Hello,

I pulled the clickOS git and I tried to compile it following the INSTALL instructions. I used the toolchain newlib en lwip and I used Xen 4.8.1 (I also tried with 4.7.0 and it was the same result)

During the command make minios, at the point LD clickos/minios/build/clickos_x86_64, I have many undefined reference to "operator delete" which break the compilation.

I cannot find the solution so I am asking for your help.

Thanks,
Ilubi.

Unable to boot 100 clickos instances

Recently I have been trying to sequentially boot ClickOS. I can not even create 100 clickos instances.
Starting the 82nd instance, when I try to used clickos-ctl to install a click configuration I got the error "Domain clickos82 does not seem to be a ClickOS domain".

My host has 16GB RAM and 8-core cpu. So in my experiment I fixed 4GB RAM for Xen Dom0 and pin cpus cores 0-2 to Dom0. For each ClickOS vm, I use "xl" to create the vm and then use clickos-ctl to install the configuration.

Does anyone experience the same problem or have any idea what may have caused it?

Click instance on reboot

I ran the ponger.click example configuration using click-ctl and I didn't stop or remove the router before rebooting. When I went back into the console with 'xl console click0' It was just a stream of "+++++++++++++++++++++ we have extras!"

Using Xen version 4.2.1

    name   = 'clickos'
    kernel = 'path-to-clickos/minios/build/clickos_x86_64'
    vcpus  = '1'
    #cpus   = '3'
    memory = '8'

    vif    = ['mac=00:15:17:15:5d:74,bridge=xenbr0']

    on_poweroff = 'destroy'
    on_reboot   = 'restart'
    on_crash    = 'preserve'                        
    click       = 'mirror.click'

    define($IP 10.10.0.3);
    define($MAC 00:15:17:15:5d:75);

    source :: FromDevice;
    sink   :: ToDevice;
    // classifies packets 
    c :: Classifier(
        12/0806 20/0001, // ARP Requests goes to output 0
        12/0806 20/0002, // ARP Replies to output 1
        12/0800, // ICMP Requests to output 2
        -); // without a match to output 3

    arpq :: ARPQuerier($IP, $MAC);
    arpr :: ARPResponder($IP $MAC);

    source -> c;
    c[0] -> ARPPrint -> arpr -> sink;
    c[1] -> [1]arpq;
    Idle -> [0]arpq;
    arpq -> ARPPrint -> sink;
    c[2] -> CheckIPHeader(14) -> ICMPPingResponder() -> EtherMirror() -> sink;
    c[3] -> Discard;

Is it possible to have multiple NICs on ClickOS?

Hi,

I am now trying to configure ClickOS as a firewall, in which case I would like to set two NICs on one ClickOS vm.

More specifically, I would like to bind two NICs to two different bridges in Xen Dom0, say, xenbr0 and xenbr1. Then I expect that packets sent from xenbr0 could be received by xenbr1.

In order to implement this, I modified the xen configuration file for ClickOS. The modified xen configuration file is listed as below:

click.xen

kernel = './minios/build/clickos_x86_64'
vcpus = '1'

cpus = '2'

memory = '120'
vif = ['mac=00:15:17:15:5d:74,bridge=xenbr0', 'mac=00:15:17:15:5d:80,bridge=xenbr1']
name = 'click0'
on_crash = 'preserve'

Output of cosmos console

Xen Minimal OS!
start_info: 0x1f9000(VA)
nr_pages: 0x7800
shared_inf: 0xbfc72000(MA)
pt_base: 0x1fc000(VA)
nr_pt_frames: 0x5
mfn_list: 0x1bd000(VA)
mod_start: 0x0(VA)
mod_len: 0
flags: 0x0
cmd_line:
stack: 0x17a040-0x19a040
MM: Init
_text: 0x0(VA)
_etext: 0xe2e86(VA)
_erodata: 0x160000(VA)
_edata: 0x161bb8(VA)
stack start: 0x17a040(VA)
_end: 0x1bc010(VA)
start_pfn: 204
max_pfn: 7800
Mapping memory range 0x400000 - 0x7800000
setting 0x0-0x160000 readonly
skipped 0x1000
MM: Initialise page allocator for 23e000(23e000)-7800000(7800000)
MM: done
Demand map pfns at 7801000-2007801000.
Heap resides at 2007802000-4007802000.
Initialising timer interface
Initialising console ... done.
gnttab_table mapped at 0x7801000.
Initialising scheduler
Thread "Idle": pointer: 0x2007802050, stack: 0x250000
Thread "xenstore": pointer: 0x2007802800, stack: 0x260000
xenbus initialised on irq 1 mfn 0x45b71
Thread "shutdown": pointer: 0x2007802fb0, stack: 0x270000
Dummy main: start_info=0x19a040
Thread "main": pointer: 0x2007803760, stack: 0x280000
sparsing 0MB at 179000
"main"
[on_status:205] router id 0
[on_status:206] status change to Running
Thread "click": pointer: 0x2007810c60, stack: 0x2a0000
Failed to read /local/domain/0/backend/vif/1/0/feature-netmap.
************************ NETFRONT for device/vif/0 **********

net TX ring size 256
net RX ring size 256
backend at /local/domain/0/backend/vif/1/0
mac is 00:15:17:15:5d:74


[router_thread:157] Starting driver...

[app_shutdown:365] Requested shutdown reason=poweroff
[router_stop:172] Stopping all routers...

[router_stop:179] Stopping instance = 0...

[router_thread:160] Stopping driver...

close network: backend at /local/domain/0/backend/vif/1/0
[router_thread:164] Master/driver stopped, closing router_thread
Thread "click" exited.
[router_stop:186] Stopped all routers...

[main:350] Shutting down...
close(0)
close(1)
close(2)
main returned 0
MiniOS will shutdown (reason = poweroff) ...

After ClickOS is running, I send packets from xenbr0. ClickOS receives. I send packets from xenbr1, and ClickOS does not receive.

To make sure xenbr1 is correctly configured, I modified the vif in this way:

 vif   =   ['mac=00:15:17:15:5d:74,bridge=xenbr1', 'mac=00:15:17:15:5d:80,bridge=xenbr0']

Then I run ClickOS again. It receives packets sent from xenbr1, and it is not able to receive packets sent from xenbr0.

It seems that ClickOS could not use the second networking interface.

Should I need to configure the Xen or to configure the ClickOS to make the second mac address available?

Many thanks.

--Hongda.

Freezing on Mapping TX rings.

Dear @fmanco and all,

I met a problem that is the ClickOS always freezing on following information. At following status, no packet is processed by ClickOS.

[on_status:205] router id 1
[on_status:206] status change to Running
Thread "click": pointer: 0x2008010a00, stack: 0x3d0000
backend dom 0
Mapping TX rings
0 map errors

My click config: (Others configs have same problem exactly)

FromDevice(0) -> ToDevice(1);

My Cickos-ctl cmd:

sudo clickos-ctl/clickos install -s fwd mirror.click

My Xen config:

name = 'fwd'
kernel = '/home/users/n/mnfv/clickos/minios/build/clickos_x86_64'

kernel = '/home/users/n/mnfv/clickos_x86_64'

vcpus = '1'

pinning your VCPU helps performance

cpus = '3'

memory = '128'

uncoment this line if you wish to use our backend

vif = ['mac=00:15:17:15:5d:74,bridge=vale0,script=vif-vale', 'mac=00:15:17:15:5d:75,bridge=vale1,script=vif-vale']

vif = ['mac=00:15:17:15:5d:74,bridge=xenbr0']

vif = ['mac=00:15:17:15:5d:74,bridge=xenbr0']

on_poweroff = 'destroy'
on_reboot = 'restart'
on_crash = 'preserve'
click = 'mirror.click'

uncomment this line to enable PVH mode for ClickOS

*I changed memory from 128 to 2048, and no one is working.
*

My xen cmd:
sudo xl create example.cfg

Unable to start the Mazu-NAT configuration in ClickOS

Hi,
I am testing the Mazu-NAT configuration in ClickOS. My Domain-0 is Ubuntu 14.04. The ClickOS VM is configured with two VIFs: eth0 and eth1. I have created two bridges xenbr0 and xenbr1 by editing the /etc/network/interfaces file in Domain-0. Basically, eth0 in ClickOS is connected to xenbr0, which further connects to the outside; eth1 is connected to xenbr1 which connects to a back-end VM on the same host.

After creating ClickOS VM, I use cosmos to pass Mazu-NAT.click to it and got it running. However, it seems that the VM is still in blocked state. In the console output, there is no click router related output, which I guess the click router is not started at all.

Does anyone have any experience making Mazu-NAT working in ClickOS? Thanks.

xen:balloon: cannot add additional memory(-17) and no more netmap buffer objects

After installed clickos and xennet. I recreated part of the results of "ClickOS and the Art of Network Function Virtualization".(throughput part of some middleboxes). I can create 100 VMs(clickos) without using VALE(xennet) but only created 38 clickos vms with VALE(xennet).
Error message after exceed 38 VMs : not enough netmap buffer objects
xen:balloon: cannot add additional memory(-17)
ibxl: error: libxl_exec.c:118:libxl_report_child_exitstatus: /etc/xen/scripts/vif-vale online [-1] exited with error status 1
libxl: error: libxl_device.c:1085:device_hotplug_child_death_cb: script: /etc/xen/scripts/vif-vale failed; error detected.
libxl: error: libxl_create.c:1226:domcreate_attach_vtpms: unable to add nic devices

Can you tell me how to enlarge netmap buffer or other solutions ?

Does current repo have the changes to support noxs?

Hi,
In the SOSP LightVM paper, you use clickos to do some tests. I'm wondering whether current clickos repo has the changes to support noxs as I didn't find any documentation about this. I would appreciate if someone can add more about this in README.

ClickOS installation OpenvSwitch error

Hello, followed this tutorial. I managed to install ClickOS in a Ubuntu 16.04 server Virtual Machine, hosted in VMWare.

The last step of the tutorial is the OvS bridge configuration. In my setup a have an eth0 interface with a static IP.. When I bind the bridge with the eth0. I lost the connectivity to the VM.

The questions are two:

  1. How can i solve this?
  2. How can i "access" the vm if i don't install OVS

Thank you

Error happens when compiling clickOS

After I downloaded clickos from github and try to make minios, error happens, the steps are as follows:
image
the error in Ubuntus says "Undefined reference to 'operator delete(void *, unsigned long)'", the picture is as follows
image
What should I do and thanks so much for checking.

Obtaining the value of 'count'

Hi,

This might be a very naive question.

It seems that ClickOS excludes the click element 'Script' (and in turn the 'DriverManager' element). How would you then be able to print say the value of 'count' for the AverageCounter element? Is there is a way to print this value through another element or obtain it through some log files?

I am using the set-up mentioned in your "Getting Started" page for building ClickOS.

Best wishes,
Hassan

How to create leases in the DHCP ?

Hi, sorry for bothering.

I can not find any example on how to create leases in the ClickOS's configuration.
I am trying to lease a MAC with an IP .

Do you have an example ?

Thank you for looking at my issue.

Failed to run a clickos on Xen.

Hi,

I am trying to build and run ClickOS from the source code.
I have successfully compiled and built the image of ClickOS, clickos_x86_64/clickos_x86_64.gz.
However, when I was trying to run the ClickOS as a DomU VM, I got errors.

System environment:

  1. Use OS X as a host.
  2. Install VMware Fusion
  3. Install Debian 7.8.0-64bits as a guest OS inside VMware.
  4. Compile and build Xen-4.4.1 from source code inside Debian.
  5. Use Debian as Dom0.

I use the following command to run ClickOS from Dom0:

  1. cd /path/to/clickos/
  2. xl create minios/config.xen

The error messages:

libxl: error: libxl.c:4594:libxl_set_vcpuaffinity: setting vcpu affinity: Invalid argument
libxl: warning: libxl.c:4608:libxl_set_vcpuaffinity_all: failed to set affinity for 0
libxl: error: libxl_exec.c:118:libxl_report_child_exitstatus: /etc/xen/scripts/vif-bridge online [-1] exited with error status 1
libxl: error: libxl_device.c:1085:device_hotplug_child_death_cb: script: Could not find bridge device xenbr0
libxl: error: libxl_create.c:1226:domcreate_attach_vtpms: unable to add nic devices
libxl: error: libxl_exec.c:118:libxl_report_child_exitstatus: /etc/xen/scripts/vif-bridge offline [-1] exited with error status 1
libxl: error: libxl_device.c:1085:device_hotplug_child_death_cb: script: Could not find bridge device xenbr0
Parsing config from minios/config.xen

Content of config.xen

kernel = './minios/build/clickos_x86_64'
vcpus = '1'
cpus = '2'
memory = '12'
vif = ['mac=00:15:17:15:5d:74,bridge=xenbr0']
name = 'click0'
on_crash = 'preserve'

Information that might be helpful:

The output of 'xl vcpu-list':

Name ID VCPU CPU State Time(s) CPU Affinity
Domain-0 0 0 0 r-- 25.4 all
Domain-0 0 1 1 -b- 14.4 all

The output of 'xl info':

host : debian-xen
release : 3.2.0-4-amd64
version : #1 SMP Debian 3.2.65-1+deb7u2
machine : x86_64
nr_cpus : 2
max_cpu_id : 127
nr_nodes : 1
cores_per_socket : 1
threads_per_core : 1
cpu_mhz : 2194
hw_caps : 0fabfbff:2c100800:00000000:00007f00:f7fa3223:00000000:00000021:000027ab
virt_caps : hvm
total_memory : 2047
free_memory : 167
sharing_freed_memory : 0
sharing_used_memory : 0
outstanding_claims : 0
free_cpus : 0
xen_major : 4
xen_minor : 4
xen_extra : .1
xen_version : 4.4.1
xen_caps : xen-3.0-x86_64 xen-3.0-x86_32p hvm-3.0-x86_32 hvm-3.0-x86_32p hvm-3.0-x86_64
xen_scheduler : credit
xen_pagesize : 4096
platform_params : virt_start=0xffff800000000000
xen_changeset :
xen_commandline : placeholder
cc_compiler : gcc (Debian 4.7.2-5) 4.7.2
cc_compile_by : root
cc_compile_domain :
cc_compile_date : Fri Feb 27 14:32:20 EST 2015
xend_config_format : 4

The output of 'xl dmesg':

Xen 4.4.1
(XEN) Xen version 4.4.1 (root@) (gcc (Debian 4.7.2-5) 4.7.2) debug=n Fri Feb 27 14:32:20 EST 2015
(XEN) Latest ChangeSet:
(XEN) Bootloader: GRUB 1.99-27+deb7u2
(XEN) Command line: placeholder
(XEN) Video information:
(XEN) VGA is text mode 80x25, font 8x16
(XEN) Disc information:
(XEN) Found 1 MBR signatures
(XEN) Found 1 EDD information structures
(XEN) Xen-e820 RAM map:
(XEN) 0000000000000000 - 000000000009e800 (usable)
(XEN) 000000000009e800 - 00000000000a0000 (reserved)
(XEN) 00000000000dc000 - 0000000000100000 (reserved)
(XEN) 0000000000100000 - 000000007fee0000 (usable)
(XEN) 000000007fee0000 - 000000007feff000 (ACPI data)
(XEN) 000000007feff000 - 000000007ff00000 (ACPI NVS)
(XEN) 000000007ff00000 - 0000000080000000 (usable)
(XEN) 00000000f0000000 - 00000000f8000000 (reserved)
(XEN) 00000000fec00000 - 00000000fec10000 (reserved)
(XEN) 00000000fee00000 - 00000000fee01000 (reserved)
(XEN) 00000000fffe0000 - 0000000100000000 (reserved)
(XEN) System RAM: 2047MB (2096632kB)
(XEN) ACPI: RSDP 000F6AC0, 0024 (r2 PTLTD )
(XEN) ACPI: XSDT 7FEEC65B, 005C (r1 INTEL 440BX 6040000 VMW 1324272)
(XEN) ACPI: FACP 7FEFEE73, 00F4 (r4 INTEL 440BX 6040000 PTL F4240)
(XEN) ACPI: DSDT 7FEEDE9D, 10FD6 (r1 PTLTD Custom 6040000 MSFT 3000001)
(XEN) ACPI: FACS 7FEFFFC0, 0040
(XEN) ACPI: BOOT 7FEEDE75, 0028 (r1 PTLTD $SBFTBL$ 6040000 LTP 1)
(XEN) ACPI: APIC 7FEED733, 0742 (r1 PTLTD APIC 6040000 LTP 0)
(XEN) ACPI: MCFG 7FEED6F7, 003C (r1 PTLTD $PCITBL$ 6040000 LTP 1)
(XEN) ACPI: SRAT 7FEEC757, 08A8 (r2 VMWARE MEMPLUG 6040000 VMW 1)
(XEN) ACPI: HPET 7FEEC71F, 0038 (r1 VMWARE VMW HPET 6040000 VMW 1)
(XEN) ACPI: WAET 7FEEC6F7, 0028 (r1 VMWARE VMW WAET 6040000 VMW 1)
(XEN) Domain heap initialised
(XEN) Processor #0 6:6 APIC version 21
(XEN) Processor #2 6:6 APIC version 21
(XEN) IOAPIC[0]: apic_id 1, version 17, address 0xfec00000, GSI 0-23
(XEN) Enabling APIC mode: Phys. Using 1 I/O APICs
(XEN) Not enabling x2APIC: depends on iommu_supports_eim.
(XEN) Using scheduler: SMP Credit Scheduler (credit)
(XEN) Detected 2194.056 MHz processor.
(XEN) Initing memory sharing.
(XEN) xstate_init: using cntxt_size: 0x340 and states: 0x7
(XEN) I/O virtualisation disabled
(XEN) ENABLING IO-APIC IRQs
(XEN) -> Using new ACK method
(XEN) Platform timer is 14.318MHz HPET
(XEN) Allocated console ring of 16 KiB.
(XEN) VMX: Supported advanced features:
(XEN) - APIC TPR shadow
(XEN) - Extended Page Tables (EPT)
(XEN) - Virtual-Processor Identifiers (VPID)
(XEN) - Virtual NMI
(XEN) - MSR direct-access bitmap
(XEN) - Unrestricted Guest
(XEN) HVM: ASIDs enabled.
(XEN) HVM: VMX enabled
(XEN) HVM: Hardware Assisted Paging (HAP) detected
(XEN) HVM: HAP page sizes: 4kB, 2MB
(XEN) Brought up 2 CPUs
(XEN) *** LOADING DOMAIN 0 ***
(XEN) Xen kernel: 64-bit, lsb, compat32
(XEN) Dom0 kernel: 64-bit, PAE, lsb, paddr 0x1000000 -> 0x193e000
(XEN) PHYSICAL MEMORY ARRANGEMENT:
(XEN) Dom0 alloc.: 0000000074000000->0000000078000000 (460919 pages to be allocated)
(XEN) Init. ramdisk: 000000007da7f000->000000007f9ffe00
(XEN) VIRTUAL MEMORY ARRANGEMENT:
(XEN) Loaded kernel: ffffffff81000000->ffffffff8193e000
(XEN) Init. ramdisk: ffffffff8193e000->ffffffff838bee00
(XEN) Phys-Mach map: ffffffff838bf000->ffffffff83c72fc0
(XEN) Start info: ffffffff83c73000->ffffffff83c734b4
(XEN) Page tables: ffffffff83c74000->ffffffff83c97000
(XEN) Boot stack: ffffffff83c97000->ffffffff83c98000
(XEN) TOTAL: ffffffff80000000->ffffffff84000000
(XEN) ENTRY ADDRESS: ffffffff816aa200
(XEN) Dom0 has maximum 2 VCPUs
(XEN) Scrubbing Free RAM: .done.
(XEN) Initial low memory virq threshold set at 0x4000 pages.
(XEN) Std. Loglevel: Errors and warnings
(XEN) Guest Loglevel: Nothing (Rate-limited: Errors and warnings)
(XEN) Xen is relinquishing VGA console.
(XEN) *** Serial input -> DOM0 (type 'CTRL-a' three times to switch input to Xen)
(XEN) Freed 284kB init memory.

Best wishes,
Hongda

Unsupported function kill called in Mini-OS kernel

People,

I'm experiencing a problem that kills/stops Mini-OS execution. It just manifests when clickOS instance is in "standby". It happens when the system execute the following line.

assert(p >= buffer() && p + len <= end_buffer());

The console's output is:

assertion "p >= buffer() && p + len <= end_buffer()" failed: file "/path/to/clickos/include/click/packet.hh", line 1844, function: void Packet::set_network_header(const unsigned char*, uint32_t)
Unsupported function kill called in Mini-OS kernel
Do_exit called!
base is 0x36fe38 caller is 0xb01e9
base is 0x36fe58 caller is 0xb95a5
base is 0x36fe68 caller is 0xa0851
base is 0x36fe88 caller is 0x9e6fe
base is 0x36fe98 caller is 0x9e76f
base is 0x36fee8 caller is 0x78e1d
base is 0x36fef8 caller is 0x192e0
base is 0x36ff18 caller is 0x7dc43
base is 0x36ff48 caller is 0x48435
base is 0x36ff98 caller is 0x391d
base is 0x36ffe8 caller is 0x35a6`

xl list output shows something this:

Name ID Mem VCPUs State Time(s)
Domain-0 0 750 4 r----- 11794.3
router 1 18 1 ---sc- 0.3
linux 2 1024 2 r----- 5624.2

'sc' means shutdown and crashed.

I used these packets to compile clickOS/miniOS kernel from this tutorial:

http://people.cs.clemson.edu/~hongdal/clickos.tar
http://people.cs.clemson.edu/~hongdal/mini-os.tar
http://people.cs.clemson.edu/~hongdal/cosmos.tar
http://people.cs.clemson.edu/~hongdal/toolchain.tar

Would it be outdated and so already fixed?
Have you ever seen this before? Maybe it would be a kind of "hibernation" not handled in development?

Thanks!

Failed to use clickos-ctl to install a router

I have been using cosmos to start and stop a router instance. Yesterday I tried to use clickos-ctl to install a click configuration. The clickos-ctl an be compiled without any problem. However, when I tried to install a click configuration as follows:

clickos install -s click0 ponger.click

I got the message "Domain click0, doesn't seem to be a ClickOS domain". The click0 domain image was compiled before I use clickos-ctl. Do I need to pull the latest clickos source code and recompile a new image so as to use clickos-ctl?

when starting vm with vale bridge, after starting click app, crash

Hi,

After launching the click app, the vm will get crash. The state become to "sc". Any idea?

FromDevice(0)->Print("vm1")->ToDevice(0)
Thread "main": pointer: 0x2000803760, stack: 0x210000
sparsing 0MB at 177000
"main" 
[on_status:205] router id 0
[on_status:206] status change to Running
Thread "click": pointer: 0x2000810a00, stack: 0x230000
Failed to read /local/domain/0/backend/vif/3/0/feature-netmap-tx-desc.
Failed to read /local/domain/0/backend/vif/3/0/feature-netmap-rx-desc.
backend dom 0
Failed to read device/vif/0/tx-ring-refs.
Failed to read device/vif/0/tx-ring-ref0.
Page fault at linear address 0x0, rip 0xc4f64, regs 0x23f738, sp 0x23f7e8, our_sp 0x23f6d0, code 2
Thread: click
RIP: e030:[<00000000000c4f64>] 
RSP: e02b:000000000023f7e8  EFLAGS: 00010202
RAX: 00000000ffffffff RBX: 0000002000816ac0 RCX: 000000000015e8b0
RDX: 0000002000810a00 RSI: 000000000015e8e0 RDI: 000000000015f0c0
RBP: 000000000023fb68 R08: 00000020008119e0 R09: 000000000015e8e0
R10: 00000000000005e5 R11: 00000000000005e5 R12: 0000000000000001
R13: 0000000000000000 R14: 00000020008117e0 R15: 0000000000000004
base is 0x23fb68 caller is 0xc5b58
base is 0x23fcb8 caller is 0x81101
base is 0x23fdd8 caller is 0x47fb2
base is 0x23ff98 caller is 0x38f8
base is 0x23ffe8 caller is 0x35a6

23f7d0: e8 f7 23 00 00 00 00 00 2b e0 00 00 00 00 00 00
23f7e0: 5d 4f 0c 00 00 00 00 00 00 00 00 00 00 00 00 00
23f7f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
23f800: 30 1d 81 00 20 00 00 00 00 00 00 00 00 00 00 00

23fb50: 00 00 00 00 00 00 00 00 b0 4d 0b 00 00 00 00 00
23fb60: c0 6a 81 00 20 00 00 00 b8 fc 23 00 00 00 00 00
23fb70: 58 5b 0c 00 00 00 00 00 40 0a 81 00 20 00 00 00
23fb80: 00 00 00 00 00 00 00 00 64 65 76 69 63 65 2f 76

c4f50: 2e 48 8d bd d0 fe ff ff e8 83 9b ff ff 4d 01 fd
c4f60: 49 83 c7 04 41 89 45 00 45 3b 66 30 72 ba e9 55
c4f70: ff ff ff 31 c0 bf e8 ff 13 00 e8 d1 bb fe ff 4c
c4f80: 89 f7 e8 49 d0 ff ff 49 8b 46 18 41 8b 96 c8 00
Pagetable walk from virt 0, base 1c2000:
 L4 = 00000001763c3067 (0x1c3000)  [offset = 0]
  L3 = 00000001763c4067 (0x1c4000)  [offset = 0]
   L2 = 00000001763c5067 (0x1c5000)  [offset = 0]
    L1 = 0000000000000000 [offset = 0]

clickvm can not start with vale bridge

Hi,

After inserting the xen backend, if I want to use vale bridge create the vm, I met this error:

zhangwei1984@nimbnode21:~/clickos/clickvms$ sudo xl create vm1.cfg
Parsing config from vm1.cfg
libxl: error: libxl_exec.c:118:libxl_report_child_exitstatus: /etc/xen/scripts/vif-vale online [24793] exited with error status 1
libxl: error: libxl_device.c:1084:device_hotplug_child_death_cb: script: /etc/xen/scripts/vif-vale failed; error detected.
libxl: error: libxl_create.c:1381:domcreate_attach_vtpms: unable to add nic devices
libxl: error: libxl_exec.c:118:libxl_report_child_exitstatus: /etc/xen/scripts/vif-vale offline [24844] exited with error status 1
libxl: error: libxl_device.c:1084:device_hotplug_child_death_cb: script: /etc/xen/scripts/vif-vale failed; error detected.
libxl: error: libxl.c:1591:libxl__destroy_domid: non-existant domain 15
libxl: error: libxl.c:1549:domain_destroy_callback: unable to destroy guest with domid 15
libxl: error: libxl.c:1476:domain_destroy_cb: destruction of domain 15 failed

dmesg

[18584.480314] xen_netback/xen_netback:xenvif_netmap_detach: netmap_detach vif14.0
[18776.725908] 478.320403 [2259] netmap_attach             success for vif15.0
[18776.806011] IPv6: ADDRCONF(NETDEV_UP): vif15.0: link is not ready

vm configuration file

zhangwei1984@nimbnode21:~/clickos/clickvms$ cat vm1.cfg 
name   = 'vm1'
kernel = '/home/zhangwei1984/clickos/clickvms/vm1'
vcpus  = '1'
# pinning your VCPU helps performance
#cpus   = '3'
memory = '8'
vif    = ['bridge=vale0,script=vif-vale']
on_poweroff = 'destroy'
on_reboot   = 'restart'
on_crash    = 'preserve'                        
click       = 'mirror.click'

I can create vale bridge and attach a port. The following info shows that

zhangwei1984@nimbnode21:~/clickos/clickvms$ sudo /home/zhangwei1984/clickos/xennet/netmap/examples/vale-ctl -l zhangwei1984@nimbnode21:~/clickos/clickvms$ sudo /home/zhangwei1984/clickos/xennet/netmap/examples/vale-ctl -a vale0:p2p2
zhangwei1984@nimbnode21:~/clickos/clickvms$ sudo /home/zhangwei1984/clickos/xennet/netmap/examples/vale-ctl -l bdg_ctl [98] bridge:0 port:0 vale0:p2p2

config:4: While configuring 'source :: FromDevice': DEVID: invalid number

Hi there.
How I know what's the interface name in ClickOS instance? For example, I create a router.cfg xen file that has two vifs:

vif = ['bridge=br-1','bridge=br-2']

and now I'm trying to create a router.click to route between these two vifs. So I created to elements like these:

fd0 :: FromDevice(eth0);
fd1 :: FromDevice(eth1);

but, when I try to instantiate router.click I receive this message:

config:4: While configuring 'fd0 :: FromDevice':
DEVID: invalid number
config:5: While configuring 'fd1 :: FromDevice':
DEVID: invalid number

So, how can I know what are the names of my clickos vifs?
Thank you

Implementing a new element, which is using an external library, into ClickOS

Hi everyone!

I'm trying to implement a new element, which is using an external library, that requires c++11 compiler. With Click, I could just simply build the library, then run make / make install commands to get my element working, but with ClickOS, I encountered with the following problem:

After I have built the library, I modified the "clickos/minios/config.mk.in" file as: CLICK_EXTRA_ELEMENT_GROUPS = etc/"My_element"/ , where "My_element" is the folder, where I have the .cc and .hh files and also the external library itself.

Then I run ./configure, make / make install commands but when I try to build the ClickOS image with make minios, I get the following error:

error This file requires compiler and library support for the ISO C++ 2011 standard. This support is currently experimental, and must be enabled with the -std=c++11 or -std=gnu++11 compiler options.

But if I configure ClickOS like this:
./configure CXXFLAGS="-std=c++11" --enable-minios --enable-local --with-xen=$XEN_ROOT --with-linux=/home/$USER/linux-3.16.7 --with-linux-map=/home/$USER/linux-3.16.7
I still get the same error.

So my question would be, how could I implement a new element that is using an external library into ClickOS?

Thanks in advance for help,
Szilárd

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.