UML - Add VDE networking support
PATCH 1/1 UML - Add VDE networking support
[ This is 2.6.24 material ]
Added vde network backend in uml to introduce native Virtual Distributed Ethernet support (using libvdeplug).
[ jdike - minor cleanups ]
--
arch/um/Kconfig.net | 22 +++++++ arch/um/drivers/Makefile | 10 ++- arch/um/drivers/vde.h | 32 ++++++++++ arch/um/drivers/vde_kern.c | 136 +++++++++++++++++++++++++++++++++++++++++++++ arch/um/drivers/vde_user.c | 136 +++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 334 insertions(+), 2 deletions(-)
arch/um/Kconfig.net +22 -0
@@ -108,6 +108,28 @@ config UML_NET_DAEMON more than one without conflict. If you don't need UML networking, say N. +config UML_NET_VDE + bool "VDE transport" + depends on UML_NET + help + This User-Mode Linux network transport allows one or more running + UMLs on a single host to communicate with each other and also + with the rest of the world using Virtual Distributed Ethernet, + an improved fork of uml_switch. + + You must have libvdeplug installed in order to build the vde + transport into UML. + + To use this form of networking, you will need to run vde_switch + on the host. + + For more information, see <http://wiki.virtualsquare.org/> + That site has a good overview of what VDE is and also examples + of the UML command line to use to enable VDE networking. + + If you need UML networking with VDE, + say Y. + config UML_NET_MCAST bool "Multicast transport" depends on UML_NET
arch/um/drivers/Makefile +8 -2
@@ -18,11 +18,16 @@ port-objs := port_kern.o port_user.o harddog-objs := harddog_kern.o harddog_user.o LDFLAGS_pcap.o := -r $(shell $(CC) $(CFLAGS) -print-file-name=libpcap.a) +LDFLAGS_vde.o := -r $(shell $(CC) $(CFLAGS) -print-file-name=libvdeplug.a) -targets := pcap_kern.o pcap_user.o +targets := pcap_kern.o pcap_user.o vde_kern.o vde_user.o $(obj)/pcap.o: $(obj)/pcap_kern.o $(obj)/pcap_user.o $(LD) -r -dp -o $@ $^ $(LDFLAGS) $(LDFLAGS_pcap.o) + +$(obj)/vde.o: $(obj)/vde_kern.o $(obj)/vde_user.o + $(LD) -r -dp -o $@ $^ $(LDFLAGS) $(LDFLAGS_vde.o) + #XXX: The call below does not work because the flags are added before the # object name, so nothing from the library gets linked. #$(call if_changed,ld)
@@ -37,6 +42,7 @@ obj-$(CONFIG_STDERR_CONSOLE) += stderr_c obj-$(CONFIG_UML_NET_SLIP) += slip.o slip_common.o obj-$(CONFIG_UML_NET_SLIRP) += slirp.o slip_common.o obj-$(CONFIG_UML_NET_DAEMON) += daemon.o +obj-$(CONFIG_UML_NET_VDE) += vde.o obj-$(CONFIG_UML_NET_MCAST) += mcast.o obj-$(CONFIG_UML_NET_PCAP) += pcap.o obj-$(CONFIG_UML_NET) += net.o
@@ -54,6 +60,6 @@ obj-$(CONFIG_BLK_DEV_COW_COMMON) += cow_ obj-$(CONFIG_UML_RANDOM) += random.o # pcap_user.o must be added explicitly. -USER_OBJS := fd.o null.o pty.o tty.o xterm.o slip_common.o pcap_user.o +USER_OBJS := fd.o null.o pty.o tty.o xterm.o slip_common.o pcap_user.o vde_user.o include arch/um/scripts/Makefile.rules
arch/um/drivers/vde_user.c new file +136 -0
136 lines not on this page · raw message
arch/um/drivers/vde.h new file +32 -0
@@ -0,0 +1,32 @@ +/* +* Copyright (C) 2007 Luca Bigliardi ([email protected]). +* Licensed under the GPL. +*/ + +#ifndef __UM_VDE_H__ +#define __UM_VDE_H__ + +struct vde_data { +char *vde_switch; +char *descr; +void *args; +void *conn; +void *dev; +}; + +struct vde_init { +char *vde_switch; +char *descr; +int port; +char *group; +int mode; +}; + +extern const struct net_user_info vde_user_info; + +extern void vde_init_libstuff (struct vde_data *vpri,struct vde_init *init); + +extern int vde_user_read (void *conn,void *buf,int len); +extern int vde_user_write (void *conn,void *buf,int len); + +#endif
arch/um/drivers/vde_kern.c new file +136 -0
136 lines not on this page · raw message
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel