Skip to contentSkip to conversation

Experimental netfront driver for mini-os

PATCH New Jacob Gorm Hansen 1 participant 1 message Nov 28, 2006

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Experimental netfront driver for mini-os

The attached patch which adds a network driver to mini-os. The code is currently experimental, but works for me.

Jacob

extras/mini-os/kernel.c +8 -0
diff -r 52ae8dd4bc75 extras/mini-os/kernel.c
@@ -36,6 +36,7 @@
 #include <sched.h>
 #include <xenbus.h>
 #include <gnttab.h>
+#include <netfront.h>
 #include <xen/features.h>
 #include <xen/version.h>
 
@@ -66,11 +67,18 @@ void xenbus_tester(void *p)
     /* test_xenbus(); */
 }
 
+void netfront_thread(void *p)
+{
+    init_netfront(&start_info);
+}
+
+
 /* This should be overridden by the application we are linked against. */
 __attribute__((weak)) int app_main(start_info_t *si)
 {
     printk("Dummy main: start_info=%p\n", si);
     create_thread("xenbus_tester", xenbus_tester, si);
+    create_thread("netfront", netfront_thread, si);
     return 0;
 }
 
extras/mini-os/include/netfront.h new file +1 -0
diff -r 52ae8dd4bc75 extras/mini-os/include/netfront.h
@@ -0,0 +1,1 @@
+extern void init_netfront(void*);
extras/mini-os/netfront.c new file +419 -0

419 lines not on this page · raw message

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel