[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH] native vde support

From: Luca Bigliardi
Subject: [Qemu-devel] [PATCH] native vde support
Date: Tue, 1 Jul 2008 21:11:31 +0100
User-agent: Mutt/1.5.17+20080114 (2008-01-14)


The patch I'm proposing here adds native support to Virtual Distributed
Ethernet using libvdeplug.

A small example:
- patch latest svn with the attached patch
- configure qemu to use vde support (disabled by default) using
  "./configure --enable-vde"
- start a vde switch
    vde_switch -F -sock /tmp/my_qemu_test
- start qemu (full syntax explanation is in the qemu-doc and appears
  into qemu online help if it's compiled with vde support)
    qemu -net nic -net vde,sock=/tmp/my_qemu_test linux-0.2.img

What is VDE?
Virtual Distributed Ethernet is a virtual network that can be spawned over
a set of physical computer over the Internet and that can be shared
between physical hosts and various kinds of virtual machines.
vde_switch, core app of VDE framework, is an evolution of uml_switch.
The project was originally written by Renzo Davoli and now is maintained
and developed by Virtualsquare Team (which I'm part of).
For more information and simple examples of vde usage visit:
http://wiki.virtualsquare.org/index.php/VDE and
Why add native support to VDE?
Nowadays a number of qemu instances already use vde networking, to give
you an idea simply search "qemu vde" on google, or think that vde is the
recommended networking tool for qemu in major distributions as debian or
ubuntu (and maybe others..), so in my opinion native vde networking will
be widely used!

What's wrong with the present solution?
What are you doing with your patch?
Unfortunately at the moment qemu is connected to a vde_switch through
a dirty hack called 'vdeq' which places itself in the middle between the
two applications.
The life of a vdeq is quite simple:
- do some tricky syntax parsing and mangling
- connect to vde_switch using libvdeplug
- open socketpair
- fork qemu giving him one end of socketpair
- enter a loop to forward data between vde_switch and qemu
- when qemu exits close the connection with vde_switch
This is of course far from being optimal for obvious reasons, so with my
patch I simply put into qemu the part of vdeq which connects/disconnects
to vde_switch and send/receive data to it.

Please tell me what do you think about this idea and the attached patch,
thank you!



Beware of programmers who carry screwdrivers.
                        -- Leonard Brandwein

http://shammash.homelinux.org/ - http://www.artha.org/ - http://www.yue.it/

Attachment: qemu_vde_0.1.diff
Description: Text Data

reply via email to

[Prev in Thread] Current Thread [Next in Thread]