Hi,
Sure. Both, L4Linux and your app need to be compiled without native hardware support. Instead, use a software network switch like the one provided by l4/pkg/ore. L4Linux needs to compiled with the ORe driver and your app needs to send/receive packets through ORe.
Well, sounds good. So I'm currently trying to integrate the latest e1000 driver (v7.0.33) into ORe as my e1000 adapter is not supported by the current one but encountered the following problem:
The updated driver wants to alloc some pages using alloc_page(). This results in a undefined reference to "_alloc_pages" when linking ore:
==> Linking ore LD_PRELOAD=/home/sts/L4_full/l4/tool/gendep/libgendep.so GENDEP_TARGET=ore GENDEP_BINARY=ld gcc -o ore ../../../../../lib/x86_586/crt0.o main.o openclose.o clients.o recv.o send.o netdevice.o irq_handling.o rxtx_string.o debug.o util.o events.o checksum.o xmit_lock.o worker.o local_deliver.o dummy_dsi.o -Wl,--whole-archive ../../../server/lib/net/OBJ-x86_586-l4v2/liblinuxnetdrv.a -Wl,--no-whole-archive -Ttext=0x01800000 -L../../../server/lib/linuxemul/OBJ-x86_586-l4v2 -L../../../../../lib/x86_586/l4v2 -L/home/drops/lib/x86_586/l4v2 -L../../../../../lib/x86_586 -L/home/drops/lib/x86_586 -L../../../../../lib -L/home/drops/lib -T../../../../../lib/x86_586/main_stat.ld -llinuxemul -levents -llinuxnetdrv -ldde_linux -lomega0 -lio -ll4rm -lore_server-worker -lore_server -lore_notify -llist_alloc -lparsecmdline /usr/lib/gcc/i686-pc-linux-gnu/3.4.6/libgcc.a -static -lgeneric_ts -ll4env -ll4rm -ldm_generic -ldm_mem -lthread -lsemaphore -llogserver_capsule -lnames -ll4util_root -ll4util -lsigma0 -lroot.o -ll4env -ll4env_err -ll4rm -ldm_generic -ldm_mem -lthread -lslab -ll4sys -nostdlib -Wl,--nostdlib -luc_c -luclibc_support -u mmap_anon -lc_be_simple_mem -lc_be_mmap -lc_be_mmap_util -lc_be_l4env_start_stop -lc_be_minimal_log_io -luc_be_simple_sleep -ll4env -llogserver_capsule -ll4rm -ldm_generic -ldm_mem -lthread -lgeneric_ts -luc_c /usr/lib/gcc/i686-pc-linux-gnu/3.4.6/libgcc.a -luc_c -ll4sys -Ttext=0x01800000 -Wl,-gc-sections -Wl,--warn-common ../../../server/lib/net/OBJ-x86_586-l4v2/liblinuxnetdrv.a(e1000_main.o): In function `e1000_alloc_rx_buffers_ps': /home/sts/L4_full/l4/pkg/ore/server/lib/net/OBJ-x86_586-l4v2/../../../../server/include/linux_headers/linux/mm.h:454: undefined reference to `_alloc_pages' collect2: ld returned 1 exit status
I suppose I have to link something else? Any hints appreciated.
BTW is ORe an acronym for something? What does it stand for?
Stefan
Hey,
Well, sounds good. So I'm currently trying to integrate the latest e1000 driver (v7.0.33) into ORe as my e1000 adapter is not supported by the current one but encountered the following problem:
The updated driver wants to alloc some pages using alloc_page(). This results in a undefined reference to "_alloc_pages" when linking ore:
Hmmm. Seems that _alloc_pages() is not implemented in the Device Driver Environment for some reasons. Christian?
Anyway, are you using a 2.6 driver for the e1000? ORe can only handle 2.4 at the moment.
I suppose I have to link something else? Any hints appreciated.
The fastest solution will probably be to adapt the driver to not use _alloc_pages(), but get its memory from somewhere else instead. (kmalloc()?, L4 dataspace with PINNED flag set?).
BTW is ORe an acronym for something? What does it stand for?
ORe = Oshkosh REsurrection
Oshkosh is another software network switch, but it is not available to the public.
BjörnD
Anyway, are you using a 2.6 driver for the e1000? ORe can only handle 2.4 at the moment.
The driver claims to support both 2.4.x and 2.6.x. And it even compiles just fine. _alloc_pages() being not implemented seems to be the only problem here.
I suppose I have to link something else? Any hints appreciated.
The fastest solution will probably be to adapt the driver to not use _alloc_pages(), but get its memory from somewhere else instead. (kmalloc()?, L4 dataspace with PINNED flag set?).
Hmm, will look into that...
Hello again,
On Thu, May 11, 2006 at 10:55:49AM +0200, Bjoern Doebel wrote:
The updated driver wants to alloc some pages using alloc_page(). This results in a undefined reference to "_alloc_pages" when linking ore:
Hmmm. Seems that _alloc_pages() is not implemented in the Device Driver Environment for some reasons. Christian?
Sorry, but currently I cannot work on this. Björns descriptions of a workaround sounds reasonable.
Cheers
Lo,
Sorry, but currently I cannot work on this. Björns descriptions of a workaround sounds reasonable.
No, problem. kmalloc() works like a charm.
Next problem: ORe seems to work fine (I can reach mini_http from another host), though I cannot setup the interface in L4Linux. I encountered the same error messages as described here [1].
eth0: Overwriting IRQ type for IRQ 0 with l4ore type! eth0: request_irq(0, ...) failed
Unfortunately this thread didn't come to a solution. Any further ideas?
Stefan
[1] http://thread.gmane.org/gmane.comp.micro-kernel.l4.devel/1039/focus=1143
l4-hackers@os.inf.tu-dresden.de