Re: Sharing one ethernet network device between two L4Linux instances

Mahdi Aichouch <[email protected]>
Newsgroups gmane.comp.micro-kernel.l4.devel
Message-ID <CAGBLRX4YCVLCkckZGCo66t+YT21fgiqO=i3OK6gZpvoxKxF9bg@mail.gmail.com>
Hello Martin,

Thank you very much for your help! The "cons multiplixer" and "L4Shmnet"
services are working perfectly.
Below is the trace of a test case:

l4linux | Please press Enter to activate this console.
l4linux2|
l4linux2| Please press Enter to activate this console.

cons> help
            cat - Dump buffer of channel
          clear - Clear screen
        connect - Connect to channel
           drop - Drop kept client
           grep - Search for text
           help - Help screen
           hide - Hide channel output
        hideall - Hide all channels output
           info - Info screen
           keep - Keep client from garbage collection
            key - Set key shortcut for channel
           list - List channels
           show - Show channel output
        showall - Show all channels output
           tail - Show last lines of output
      timestamp - Prefix log with timestamp

Key shortcuts when connected:
   Ctrl-E .     - Disconnect
   Ctrl-E e     - Inject Ctrl-E
   Ctrl-E c     - Inject Ctrl-C
   Ctrl-E q     - Inject ESC
   Ctrl-E l     - Inject Break sequence

Global key shortcuts:
   Ctrl-E h     - Hide all output (except current)
   Ctrl-E s     - Show all output

User defined key shortcuts:
   Ctrl-E 2     - Connect to console 'l4linux2'
   Ctrl-E 1     - Connect to console 'l4linux'
cons>
cons> ------------- Connecting to 'l4linux' -------------
Freeing unused kernel memory: 164K (02362000 - 0238b000)
mount: mounting proc on /proc failed: Device or resource busy
mount: mounting devtmpfs on /dev failed: No such device
Page fault: addr = 00082001 pc = a800632c (ro, T)
Forward PF to our pager
Page fault: addr = 0008203a pc = 021ddcec (rw)
Forward PF to our pager
net eth0: L4ShmNet established, with 52:54:00:b0:cf:01, IRQ 212

Please press Enter to activate this console.
/ # uname -a
Linux l4box 3.16.0-l4 #38 SMP Tue Oct 27 15:21:29 CET 2015 armv7l GNU/Linux
/ # ifconfig
eth0      Link encap:Ethernet  HWaddr 52:54:00:B0:CF:01
          inet addr:192.168.50.1  Bcast:192.168.50.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:7710  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:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Interrupt:212

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:65536  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:0
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

/ # ip addr add 10.10.10.1/24 broadcast 10.10.10.255 dev eth0
/ # ifconfig eth0 up
/ #
------------- Connecting to 'l4linux2' -------------
RAMDISK: Loading 3072KiB [1 disk] into ram disk... done.
EXT4-fs (ram0): couldn't mount as ext3 due to feature incompatibilities
EXT4-fs (ram0): mounting ext2 file system using the ext4 subsystem
EXT4-fs (ram0): mounted filesystem without journal. Opts: (null)
VFS: Mounted root (ext2 filesystem) on device 1:0.
Freeing unused kernel memory: 164K (02362000 - 0238b000)
mount: mounting proc on /proc failed: Device or resource busy
mount: mounting devtmpfs on /dev failed: No such device

Please press Enter to activate this console.
/ # ip addr add 10.10.10.2/24 broadcast 10.10.10.255  dev eth0
/ # ifconfig eth0 up
/ # ping -c3 10.10.10.1
PING 10.10.10.1 (10.10.10.1): 56 data bytes
64 bytes from 10.10.10.1: seq=0 ttl=64 time=23.000 ms
64 bytes from 10.10.10.1: seq=1 ttl=64 time=4.000 ms
64 bytes from 10.10.10.1: seq=2 ttl=64 time=3.000 ms

--- 10.10.10.1 ping statistics ---
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max = 3.000/10.000/23.000 ms
/ #


- Regarding the attribution of a direct network access to one L4Linux:

*"I fear that it is currently not possible to configure this network
interface on l4linux for vexpress-a9. QEMU (v2.4.0.1) supports lan9118 only
but the l4linux smsc911x.c requires CONFIG_OF in smsc911x_probe_config_dt.
But configuring via DT is not yet fully working in
l4re-snapshot-2014092821."*

Given your above advice, and given that at the end of my project the
application have to run on the Freescale i.MX 6 Sabre SD board, and given
that there was a previous work [1] [2] done by Taeung Song to port of the
FEC Ethernet device driver to L4 Fiasco + L4Linux
(l4re-snapshot-2014022818), I think that it would be better to use the
previous work of Taeung on the "l4re-snapshot-2014092821".

My question is: does the work of Taeung have been integrated into the l
4re-snapshot-2014092821?
If not, what would be the difficulties that I have to pay attention to if I
would like to adapt his work to l4re-snapshot-2014092821, is there any
incompatibilities between his work and the l4re-snapshot-2014092821?

Does the "cons multiplexer + L4Shmnet" services still run as it is the case
now, if one L4Linux instance has direct access to a physical network device
and acts as a router for the second L4Linux instance?

Thank you very much in advance for you answer.

Best regards,
Mahdi

[1] http://os.inf.tu-dresden.de/pipermail/l4-hackers/2014/006601.html
[2] http://os.inf.tu-dresden.de/pipermail/l4-hackers/2014/006462.html


On Fri, Oct 23, 2015 at 10:48 AM, Mahdi Aichouch <[email protected]> wrote:

> Hello Matthias,
>
> Thank you very much for your explanation.
>
> Following your advice, I tried to set a direct access to a network device
> for the first L4Linux instance.
> However, when I run "ifconfig" command in L4Linux shell I don't get any
> working eth0 configuration, the result is shown below:
>
> - L4Linux on Qemu
>
> / # ifconfig
> lo        Link encap:Local Loopback
>           inet addr:127.0.0.1  Mask:255.0.0.0
>           UP LOOPBACK RUNNING  MTU:65536  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:0
>           RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
>
> I tested the "ifconfig" command an a Linux running the same Qemu
> vexpress-a9 configuration and I get an eth0 configuration as shown below:
>
> - Linux on Qemu:
>
> / # ifconfig
> eth0      Link encap:Ethernet  HWaddr 52:54:00:12:34:56
>           inet addr:192.168.50.1  Bcast:192.168.50.255  Mask:255.255.255.0
>           UP BROADCAST RUNNING 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:1000
>           RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
>           Interrupt:47
>
> lo        Link encap:Local Loopback
>           inet addr:127.0.0.1  Mask:255.0.0.0
>           UP LOOPBACK RUNNING  MTU:65536  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:0
>           RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
>
>
> For the logs of L4Linux I can see that the IO server prints a warning
> saying that "Service registration failed: 'l4lx' ".
> Do you have an idea of what might be wrong.
> My Lua and IO configuration files are given below after the L4Linux boot
> logs.
>
>
> l4linux | L4re_kernel main Hello world !
> l4linux | ARGC=13
> l4linux | ARGV=b1007e04
> l4linux | ENVP=b1007e3c
> l4linux | AUXP=b1007e40
> l4linux |   arg: 'rom/vmlinuz.arm'
> l4linux |   arg: 'earlyprintk=1'
> l4linux |   arg: 'showpfexc=1'
> l4linux |   arg: 'showghost=1'
> l4linux |   arg: 'mem=64M'
> l4linux |   arg: 'l4shmnet.add=shmns,macpart=1,create'
> l4linux |   arg: 'console=ttyLv0'
> l4linux |   arg: 'l4x_rd=rom/ramdisk-arm.rd'
> l4linux |   arg: 'root=1:0'
> l4linux |   arg: 'ramdisk_size=4000'
> l4linux |   arg: 'init=/linuxrc'
> l4linux |   arg: 'print-fatal-signals=1'
> l4linux |   arg: 'ip=dhcp'
> l4linux | l4re_kernel: Single_page_alloc_base::_alloc heap p= 0 addr =
> b0100000
> l4linux | Region maping: limits [0-bfffffff]
> l4linux |  Area map:
> l4linux |   [         0-       fff] -> flags=0
> l4linux |  Region map:
> l4linux |   [  affff000-  afffffff] -> (offs=0, ds=5000, flags=4)
> l4linux |   [  b0000000-  b0019fff] -> (offs=0, ds=5000, flags=4)
> l4linux |   [  b0020000-  b0026fff] -> (offs=0, ds=5000, flags=4)
> l4linux |   [  b0100000-  b013ffff] -> (offs=0, ds=5000, flags=4)
> l4linux |   [  b1000000-  b1007fff] -> (offs=0, ds=5000, flags=4)
> l4linux |   [  b3000000-  b3000fff] -> (offs=0, ds=5000, flags=4)
> l4linux | l4re_kernel -> Loader::start binary dataspace [phys @addr =
> 612d6000] size = [3c9498]
> l4linux | l4re_kernel: Loader::start start file [C:11000]
> CPU[0]: run(thread=4c, cpu=0 (1,0,24)
> l4linux | l4re_kernel: Loader::start start thread [C:11000]
> CPU[0]: run(thread=49, cpu=0 (1,0,24)
> l4linux | l4re_kernel: Loader::loader_thread execute
> l4linux | l4re_kernel: Loader::__start execute
> l4linux | l4re_kernel::Elf_Loader::launch bin: 1
> l4linux | l4re_kernel -> Elf_loader::launch binary dataspace [phys @addr =
> 612d6000] size = [3c9498]
> l4linux | l4re_kernel: Loader::alloc_app_stack size = 1000 stack virtual
> addr afff4000
> l4linux | l4re_kernel: Loader::alloc_app_stack stack dataspace phys addr =
> 60451000 size = 1000
> l4linux | Elf::load addr= (nil), interpreter= 0
> l4linux | Phdr_load: map from file (attaching ro ELF text segment),
> prog_attach_ds [paddr = 0xa8000000 (0xa8000000), offs 0, size 3960832 ,all
> seg cow? 0]
> l4linux | l4re_kernel: L4Re_app_model::alloc_ds dataspace phys @addr =
> [b0201dfc] size = [b00113f8] flags 0
> l4linux | Phdr_load: copy data section: prog_attach_ds [paddr = 0xa83c8000
> (0xa83c8000), offs 3964928, size 8192, all seg cow? 0]
> l4linux | Phdr_load: created dataspace phys addr = 0xb0201e54, size =
> b00111cc
> l4linux | Elf::load app model...done
> l4linux | libio: Warning: Query of 'vbus' failed!
> l4linux | PH  0 (t:        1) offs=00008000 vaddr=02000000 vend=02476414
> l4linux |                     phys=02000000 ephys=02476414
> l4linux |                     f_sz=003b039c memsz=00476414 flgs=rwx
> l4linux | L4LINUX: Ma DBG: Virtual Address 02000000 End 02476414
> l4linux |  Physical Address 02000000  End 02476414
> IO      | Io service
> copy on write for 6124f000 to 608cb000
> IO      | Verboseness level: 4
> IO      | unused physical memory space:
> IO      |   [00000000000000-0000005fffffff]
> IO      |   [00000070000000-000000ffffffff]
> IO      | Loading: config 'rom/arm-ve-a9.io'
> MOE: R[600ebe60]: refs=1
> IO      | WARNING: Service registration failed: 'l4lx'
> IO      | l4lx: [N12_GLOBAL__N_112Virtual_sbusE]
> IO      |   Resources: ==== start ====
> IO      |   Resources: ===== end =====
> IO      |   L4ICU: [N2Vi6Sw_icuE]
> IO      |     Resources: ==== start ====
> IO      |     Resources: ===== end =====
> IO      |   NIC: [N2Vi9Proxy_devE]
> IO      |     Resources: ==== start ====
> IO      |     IOMEM   [00000002000000-00000002ffffff 1000000] non-pref
> (32bit) (align=ffffff flags=2)
> IO      |     IRQ     [0000000000000f-0000000000000f 1] none (32bit)
> (align=0 flags=1)
> IO      |     Resources: ===== end =====
> IO      | Real Hardware -----------------------------------
> IO      | System Bus: hid=
> IO      |   Resources: ==== start ====
> IO      |   Resources: ===== end =====
> IO      |   NIC: hid=smsc9118
> IO      |     Clients: ===== start ====
> IO      |       NIC: [N2Vi9Proxy_devE]
> IO      |     Clients: ===== end ====
> IO      |     Resources: ==== start ====
> IO      |     IOMEM   [00000002000000-00000002ffffff 1000000] non-pref
> (32bit) (align=ffffff flags=2)
> IO      |     IRQ     [0000000000000f-0000000000000f 1] none (32bit)
> (align=0 flags=1)
> IO      |     Resources: ===== end =====
> IO      | warning: could not register control interface at cap
> 'platform_ctl'
> IO      | Ready. Waiting for request.
> l4linux | PH  1 (t:        4) offs=00360490 vaddr=02358490 vend=023584b4
> l4linux |                     phys=02358490 ephys=023584b4
> l4linux |                     f_sz=00000024 memsz=00000024 flgs=r-x
> l4linux | L4LINUX: Ma DBG: Virtual Address 02358490 End 023584b4
> l4linux |  Physical Address 02358490  End 023584b4
> l4linux | PH  2 (t: 1685382481) offs=00000000 vaddr=00000000 vend=00000000
> l4linux |                     phys=00000000 ephys=00000000
> l4linux |                     f_sz=00000000 memsz=00000000 flgs=rwx
> l4linux | L4LINUX: Ma DBG: Virtual Address 00000000 End 00000000
> l4linux |  Physical Address 00000000  End 00000000
> l4linux | L4LINUX: Ma DBG: Starting binary at 0x2000360, argc=13
> argv=0xafff4f64 *argv=0xb1007ff0 argv0=rom/vmlinuz.arm
> l4linux | External resolver is at 0xa800075c
> l4linux | ======> L4Linux starting... <========
> l4linux | Linux version 3.16.0-l4 (aichouch@aichouch-ThinkCentre-M90)
> (gcc version 4.8.3 20140320 (prerelease) (Sourcery CodeBench Lite
> 2014.05-29) ) #35 SMP Tue Oct 20 17:04:31 CEST 2015
> l4linux | Binary name: rom/vmlinuz.arm
> l4linux |    This is an AEABI build.
> l4linux | Linux kernel command line (12 args): earlyprintk=1 showpfexc=1
> showghost=1 mem=64M l4shmnet.add=shmns,macpart=1,create console=ttyLv0
> l4x_rd=rom/ramdisk-arm.rd root=1:0 ramdisk_size=4000 init=/linuxrc
> print-fatal-signals=1 ip=dhcm
> l4linux | CPU mapping (l:p)[1]: 0:0
> l4linux | Image: 020000a0 - 02600000 [6143 KiB].
> l4linux | Areas: Text:     020000a0 - 02384000 [3599kB] (a bit longer)
> l4linux |        Data:     02384000 - 023abc20 [159kB]
> l4linux |        Initdata: 02359000 - 02382900 [166kB]
> l4linux |        BSS:      023b039c - 02476414 [792kB]
> l4linux | Device scan:
> l4linux | Device scan done.
> l4linux | L4LINUX: Ma DBG: l4lx_thread_create: Created thread 413 (cpu0)
> (u:b3000e00, v:b3000c00, sp:02385fa4)
> l4linux | main thread will be 413
> l4linux | l4x_register_pointer_section: addr = 02000000 size = 4681728
> l4linux | section-with-init: Virt: 0x2000000 to 0x2476413 [4569 KiB]
> l4linux | section-with-init: Phys: 0x60454000 to 0x608ca413, [4569 KiB]
> CPU[0]: run(thread=54, cpu=0 (1,0,0)
> l4linux | Main thread running, waiting...
> l4linux | Main thread running, waiting...
> l4linux | stext virt 020000a0, phys 604540a0
> l4linux | etext virt 02384000, phys 607d8000
> l4linux | L4x: Memory size: 64MB
> l4linux | L4x: Setting superpages for main memory
> l4linux | L4x: Adjusted memory start: 02000000
> l4linux |     Main memory: Virt: 0x2600000 to 0x65fffff [65536 KiB]
> l4linux |     Main memory: Phys: 0x61a00000 to 0x659fffff, [65536 KiB]
> l4linux | l4x: vmalloc area: 06600000 - 0e600000
> l4linux | l4x_register_pointer_section: addr = 02000000 size = 4681728
> l4linux |            text: Virt: 0x2000000 to 0x2476413 [4569 KiB]
> l4linux |            text: Phys: 0x60454000 to 0x608ca413, [4569 KiB]
> l4linux | Booting Linux on physicl CPU 0x0
> Linux version 3.16.0-l (aichouch@aichouch-Thin [Centre-M90) (gcc versionm
> 4.8.3 20140320 (prerelease) (Sourcery CodeBenc Lite 2014.05-29) ) #35 [MP
> Tue Oct 20 17:04:31 CmEST 2015
> CPU: Fiasco [410fc090]revision 0 (ARMv7), cr=0 [000000
> CPU: PIPT / VIPT nonalasing data cache, VIPT n [naliasing instruction
> camche
> Machine: L4
> Ignoring unrecognised ag 0x00000000
> bootconsole [earlykdb0 enabled
> Forcing write-allocatecache policy for SMP
> Forcing shared mapping for SMP
> Memory policy: Data cahe writealloc
> Page fault: addr = bffff003 pc = 0235cb80 (rw, T)
> l4linux | Forward PF to our pager
> l4linux | Loading: rom/ramdisk-arm.rd
> l4linux | INITRD: Size of RAMdisk is 3072KiB
> l4linux | INITRD: 00002000 - 0030000
> l4x_virt_to_phys: Could not translate virt. address 0x2000
> l4linux | v2p: 0: v:00000000-00001000 p:00000000-00001000 sz:00001000
> l4linux | v2p: 1: v:02000000-02476414 p:60454000-608ca414 sz:00476414
> l4linux | v2p: 2: v:02600000-06600000 p:61a00000-65a00000 sz:04000000
> l4linux | v2p: 3: v:02000000-02476414 p:60454000-608ca414 sz:00476414
> l4linux | ------------[ cut here ------------
> WARNING: CPU: 0 PID: 0at /home/aichouch/dev/l4 [e-snapshot-2014092821/srmc/l4linux/arch/l4/kernel/main.c:392
> l4x_virt_tophys+0x7c/0xac()
> Modules linked in:
> CPU: 0 PID: 0 Comm: swpper Not tainted 3.16.0- [4 #35
> [<02010164>] (unwind_bcktrace) from [<02006ee4 [] (show_stack+0x10/0x14)m
> [<02006ee4>] (show_stak) from [<022811d4>] (du [p_stack+0x84/0x94)
> [<022811d4>] (dump_stak) from [<02020c14>] (wa
> [n_slowpath_common+0x6c/0mx88)
> [<02020c14>] (warn_slopath_common) from [<0202 [ccc>]
> (warn_slowpath_nulml+0x1c/0x24)
> [<02020ccc>] (warn_slopath_null) from [<020021 [8>]
> (l4x_virt_to_phys+0xm7c/0xac)
> [<02002168>] (l4x_virtto_phys) from [<0235bf4c []
> (l4x_load_initrd+0x208m/0x240)
> [<0235bf4c>] (l4x_loadinitrd) from [<0235d860> [ (setup_arch+0x89c/0x8d4m)
> [<0235d860>] (setup_arh) from [<023595c8>] (st [rt_kernel+0x8c/0x370)
> [<023595c8>] (start_kenel) from [<00000000>] ( [ (null))
> ---[ end trace 3406ff2bd97382e ]---
> l4x_virt_to_phys: Could not translate virt. address 0x302000
> l4linux | v2p: 0: v:00000000-00001000 p:00000000-00001000 sz:00001000
> l4linux | v2p: 1: v:02000000-02476414 p:60454000-608ca414 sz:00476414
> l4linux | v2p: 2: v:02600000-06600000 p:61a00000-65a00000 sz:04000000
> l4linux | v2p: 3: v:02000000-02476414 p:60454000-608ca414 sz:00476414
> l4linux | ------------[ cut here ------------
> WARNING: CPU: 0 PID: 0at /home/aichouch/dev/l4 [e-snapshot-2014092821/srmc/l4linux/arch/l4/kernel/main.c:392
> l4x_virt_tophys+0x7c/0xac()
> Modules linked in:
> CPU: 0 PID: 0 Comm: swpper Tainted: G        W [    3.16.0-l4 #35
> [<02010164>] (unwind_bcktrace) from [<02006ee4 [] (show_stack+0x10/0x14)m
> [<02006ee4>] (show_stak) from [<022811d4>] (du [p_stack+0x84/0x94)
> [<022811d4>] (dump_stak) from [<02020c14>] (wa
> [n_slowpath_common+0x6c/0mx88)
> [<02020c14>] (warn_slopath_common) from [<0202 [ccc>]
> (warn_slowpath_nulml+0x1c/0x24)
> [<02020ccc>] (warn_slopath_null) from [<020021 [8>]
> (l4x_virt_to_phys+0xm7c/0xac)
> [<02002168>] (l4x_virtto_phys) from [<0235bf58 []
> (l4x_load_initrd+0x214m/0x240)
> [<0235bf58>] (l4x_loadinitrd) from [<0235d860> [ (setup_arch+0x89c/0x8d4m)
> [<0235d860>] (setup_arh) from [<023595c8>] (st [rt_kernel+0x8c/0x370)
> [<023595c8>] (start_kenel) from [<00000000>] ( [ (null))
> ---[ end trace 3406ff2bd97382f ]---
> RAMdisk from 00002000 (00002000) to 00302000 (00302000) [3072KiB]
> l4linux | PERCPU: Embedded 7 page/cpu @06521000 s6400 r81 [2 d14080 u32768
> Built 1 zonelists in Zne order, mobility group [ng on.  Total pages: 177m16
> Kernel command line: erlyprintk=1 showpfexc=1 [howghost=1 mem=64M
> l4shmmnet.add=shmns,macpart=1,create console=ttyLv0
> lx_rd=rom/ramdisk-arm.rd [oot=1:0 ramdisk_size=400m0 init=/linuxrc
> print-fatal-signals=1 ip=dhcp
> l4shmnet: unknown arguent: create
> L4LINUX CEA version PI hash table entries: 512 [(order: -1, 2048 bytes)
> Dentry cache hash tabl entries: 16384 (order: [, 65536 bytes)
> Inode-cache hash tableentries: 8192 (order: 3, [32768 bytes)
> Memory: 64776K/71680K vailable (2681K kernel c [de, 159K rwdata, 744K
> romdata, 166K init, 792K bss, 6904K reserved)
> Virtual kernel memory ayout:
>     vector  : 0xbffff00 - 0xc0000000   (   4 k [)
>     fixmap  : 0xffc0000 - 0xffe00000   (2048 k [)
>     vmalloc : 0x0660000 - 0x0e600000   ( 128 M [)
>     lowmem  : 0x0000000 - 0x06600000   ( 102 M [)
>     modules : 0x0101000 - 0x02000000   (  15 M [)
>       .text : 0x0200000 - 0x023584b4   (3426 k [)
>       .init : 0x0235900 - 0x02382900   ( 167 k [)
>       .data : 0x0238400 - 0x023abc20   ( 160 k [)
>        .bss : 0x023b03c - 0x02476414   ( 793 k [)
> Hierarchical RCU impleentation.
> l4linux RCU restricting CPUs rom NR_CPUS=4 to nr_cpu_ [ds=1.
> RCU: Adjusting geometr for rcu_fanout_leaf=16, [nr_cpu_ids=1
> NR_IRQS:220
> l4timer: Using IRQ210
> KERNEL: Ma DBG: Context constructor
> KERNEL: Ma DBG: Thread ARM constructor VA=0xf1175000 Physical
> Address=0x6fd75000
> KERNEL: Ma DBG:  thread_object: sys_control: result 0
> L4LINUX: Ma DBG: l4lx_thread_create: Created thread 419 (timer0)
> (u:b3000a00, v:00000000, sp:0240dfa0)
> CPU[0]: run(thread=59, cpu=0 (1,0,0)
> KERNEL: Ma DBG: KERNEL-268396848: thread-arm::user_invoke()
> l4linux | sched_clock: 64 bits at1000kHz, resolution 1000 [s, wraps every
> 214748364m8000ns
> Console: colour dummy evice 80x30
> console [ttyLv0] enabled
> console [ttyLv0] enabld
> bootconsole [earlykdb0] disabled
> bootconsole [earlykdb0 disabled
> Calibrating delay loop... 523.46 BogoMIPS (lpj=2617344)
> pid_max: default: 32768 minimum: 301
> Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
> Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
> CPU: Testing write buffer coherency: ok
> CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
> Setting up static identity map for 0x2286740 - 0x2286740
> Brought up 1 CPUs
> SMP: Total of 1 processors activated.
> CPU: All CPU(s) started in SVC mode.
> VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 0
> NET: Registered protocol family 16
> DMA: preallocated 256 KiB pool for atomic coherent allocations
> Switched to clocksource l4kipclk
> NET: Registered protocol family 2
> TCP established hash table entries: 1024 (order: 0, 4096 bytes)
> TCP bind hash table entries: 1024 (order: 1, 8192 bytes)
> TCP: Hash tables configured (established 1024 bind 1024)
> TCP: reno registered
> UDP hash table entries: 256 (order: 1, 8192 bytes)
> UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
> NET: Registered protocol family 1
> Trying to unpack rootfs image as initramfs...
> rootfs image is not initramfs (junk in compressed archive); looks like an
> initrd
> INITRD: Freeing memory.
> l4x: Checks passed.
> NetWinder Floating Point Emulator V0.97 (double precision)
> futex hash table entries: 256 (order: 2, 16384 bytes)
> msgmni has been set to 126
> io scheduler noop registered
> io scheduler deadline registered
> io scheduler cfq registered (default)
> L4 serial driver
> ttyLv0 at MMIO 0x1 (irq = 211, base_baud = 230400) is a L4
> l4ser_shm: L4 shared mem serial driver
> l4cdds: No name given, not starting.
> brd: module loaded
> l4bdds: No name given, not starting.
> shmns: Requesting, Shmsize 1024 Kbytes
> shmns: Failed to establish communication
> mousedev: PS/2 mouse device common for all mice
> TCP: cubic registered
> NET: Registered protocol family 17
> RAMDISK: ext2 filesystem found at block 0
> RAMDISK: Loading 3072KiB [1 disk] into ram disk... done.
> EXT4-fs (ram0): couldn't mount as ext3 due to feature incompatibilities
> EXT4-fs (ram0): mounting ext2 file system using the ext4 subsystem
> EXT4-fs (ram0): mounted filesystem without journal. Opts: (null)
> VFS: Mounted root (ext2 filesystem) readonly on device 1:0.
> Freeing unused kernel memory: 164K (02359000 - 02382000)
> Please press Enter to activate this console.
>
>
> - lua configuration file:
>
> -- vim:set ft=lua:
>
> loader       = L4.default_loader;
> vbus_l4linux = loader:new_channel();
>
> local lxname = "vmlinuz";
> if L4.Info.arch() == "arm" then
>   lxname = "vmlinuz.arm";
> end
>
> local shmns = L4.default_loader:create_namespace({ shm = "placeholder" });
>
> loader:start(
> {
>         caps = {
>                 sigma0 = L4.cast(L4.Proto.Factory,
> L4.Env.sigma0):create(L4.Proto.Sigma0);
>                 icu = L4.Env.icu;
>                 l4linux = vbus_l4linux:svr();
>                 },
>
>         log = { "IO", "y" },
>
>         l4re_dbg = L4.Dbg.Warn,
> },
> "rom/io -vvv rom/arm-ve-a9.io");
>
> L4.default_loader:start(
>   {
>     { ldr_flags = L4.Ldr_flags.pinned_segs, L4.Ldr_flags.eager_map },
>     caps = {
>       log = L4.Env.log:m("rws"),
>     },
>     l4re_dbg = L4.Dbg.Warn,
>     log = { "l4linux", "yellow" },
>
>     shmns = shmns:mode("rw"),
>   },
>   "rom/" .. lxname .. " earlyprintk=1 showpfexc=1 showghost=1 mem=64M
> l4shmnet.add=shmns,macpart=1,create console=ttyLv0 l4x_rd=rom/ramdisk-" ..
> L4.Info.arch() .. ".rd root=1:0 ramdisk_size=4000 init=/lin\
> uxrc print-fatal-signals=1 ip=dhcp");
>
>
> - IO server configuration file:
>
> hw-root
> {
>   NIC => new Device()
>   {
>     .hid = "smsc9118";
>     new-res Mmio(0x02000000 .. 0x02FFFFFF);
>     new-res Irq(15);
>   }
> }
>
> l4lx => new System_bus()
> {
>   NIC => wrap(hw-root.NIC);
> }
>
>
> *One possible solution would be to grant one L4Linux
> instance access to the physical device and setup a virtual network
> connection between the two instances. Then you can e.g. use iptables to
> setup forwarding and NAT to route traffic from the second instance.*
>
> Regarding the setting of a virtual network connection and iptables, could
> you please share a document or some instructions that explain how to setup
> such a working configuration.
>
> Regarding the use of the "cons multiplexer", if I understood correctly I
> should use it instead of "l4shmns" service, right?
> If yes, do I have to disable the support of "l4shmns" option in L4Linux
> and remove all configuration from my Lua configuration file?
>
> Could you please share a document or some instructions that explain how to
> use the "cons multiplexer".
>
> Thank you very much for your help.
>
> Best regards,
>
> Mahdi
>
>
>
>
>
>
> On Thu, Oct 22, 2015 at 10:28 AM, Matthias Lange <
> [email protected]> wrote:
>
>> Hi,
>>
>> On 10/21/2015 02:34 PM, Mahdi Aichouch wrote:
>> > Hello,
>> >
>> > I was able to run two L4linux instances on top of L4 Fiasco OC using a
>> > Qemu emulator of a versatile express-a9 board .
>> >
>> > I would like to make these two instances share one ethernet network
>> device.
>>
>> To share a device you need a multiplexer which has access to the
>> physical device (and drives it) and provide a virtual device for each of
>> the clients. One possible solution would be to grant one L4Linux
>> instance access to the physical device and setup a virtual network
>> connection between the two instances. Then you can e.g. use iptables to
>> setup forwarding and NAT to route traffic from the second instance.
>>
>> > I would like also to switch between the two L4Linux shell, because in
>> > Qemu only one shell is accessible.
>>
>> For that you can use 'cons' our console multiplexer.
>>
>> > I followed this guide[1] to connect two L4Linux instances using
>> > "l4shmnet", and this thread [2]
>> > to get access to the shell when testing on Qemu.
>> >
>> > However, the "l4shmnet" is not working correctly, both L4Linux display
>> > this message:
>>
>> Maybe this is a memory issue? You assign 1GB to the machine but only
>> hand 64M to L4Linux (of which 32M are taken by the ramdisk).
>>
>> Matthias
>>
>> > shmns: Requesting, Shmsize 1024 Kbytes
>> > shmns: Failed to establish communication
>> >
>> > Could someone help me building such a working configuration.
>> >
>> > Is it possible to share a working Qemu command with the right option for
>> > the network?
>> > This is my Qemu command
>> >
>> > $> qemu-system-arm -cpu cortex-a9 -M vexpress-a9 -smp 1 -no-reboot -m
>> > 1024M -kernel bin/arm_armv7a/bootstrap_L4Linux_ARM.elf -nographic -net
>> > nic,model=lan9118 -net user
>> >
>> > Is it also possible to share a working lua configuration file?
>> >
>> > This is my lua l4lx.cfg file:
>> >
>> > -- vim:set ft=lua:
>> >
>> > local lxname = "vmlinuz";
>> > if L4.Info.arch() == "arm" then
>> >   lxname = "vmlinuz.arm";
>> > end
>> >
>> > local shmns = L4.default_loader:create_namespace({ shm = "placeholder"
>> });
>> >
>> > L4.default_loader:start(
>> >   {
>> >     { ldr_flags = L4.Ldr_flags.eager_map },
>> >     caps = {
>> >       log = L4.Env.log:m("rws"),
>> >     },
>> >     l4re_dbg = L4.Dbg.Warn,
>> >     log = { "l4linux", "yellow" },
>> >
>> >     shmns = shmns:mode("rw"),
>> >   },
>> >   "rom/" .. lxname .. " earlyprintk=1 showpfexc=1 showghost=1 mem=64M
>> > l4shmnet.add=shmns,macpart=1,create console=ttyLv0 l4x_rd=rom/ramdisk-"
>> > ..  L4.Info.arch() .. ".rd root=1:0 ramdisk_size=32768 init=/li\
>> > nuxrc print-fatal-signals=1");
>> >
>> > L4.default_loader:start(
>> >   {
>> >     { ldr_flags = L4.Ldr_flags.eager_map },
>> >     caps = {
>> >       log = L4.Env.log:m("rws"),
>> >     },
>> >     l4re_dbg = L4.Dbg.Warn,
>> >     log = { "l4linux2", "green" },
>> >
>> >     shmns = shmns:mode("rw"),
>> >   },
>> >   "rom/" .. lxname .. " earlyprintk=1 showpfexc=1 showghost=1 mem=64M
>> > l4shmnet.add=shmns,macpart=2 console=ttyLv0 l4x_rd=rom/ramdisk-" ..
>> > L4.Info.arch() .. ".rd root=1:0 ramdisk_size=32768 init=/linuxrc p\
>> > rint-fatal-signals=1");
>> >
>> >
>> > Thank you very much in advance.
>> > Best regards,
>> >
>> > Mahdi
>> >
>> >
>> > [1] http://wiki.tudos.org/L4Linux/shmnet
>> > [2] http://os.inf.tu-dresden.de/pipermail/l4-hackers/2013/005775.html
>>
>
>

_______________________________________________
l4-hackers mailing list
[email protected]
http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.