[libvirt] [PATCH libvirt master] interface type: add udp socket support

Ján Tomko jtomko at redhat.com
Mon Aug 10 15:06:41 UTC 2015


On Fri, Aug 07, 2015 at 03:14:36PM -0700, Jonathan Toppins wrote:
> Adds a new interface type using UDP sockets, this seems only applicable
> to QEMU but have edited tree-wide to support the new interface type.
> 
> The interface type required the addition of a "destaddr" (destination
> address), this then maps into the following xml and qemu call.
> 
> <interface type='udp'>
> 	<mac address='52:54:00:5c:67:56'/>
> 	<source address='127.0.0.1' port='11112'/>
> 	<model type='virtio'/>
> 	<dest address="127.0.0.1' port='22222'/>
> 	<address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
> 	...
> 
> QEMU call:
> 	-netdev socket,udp=127.0.0.1:22222,localaddr=127.0.0.1:11112
> 
> Notice the xml "source" entry becomes the "localaddr" for the qemu call.
> 
> reference:
> http://lists.gnu.org/archive/html/qemu-devel/2011-11/msg00629.html
> 
> Signed-off-by: Jonathan Toppins <jtoppins at cumulusnetworks.com>
> ---
>  docs/formatdomain.html.in        | 17 ++++++++++++
>  src/conf/domain_conf.c           | 56 +++++++++++++++++++++++++++++++++++++---
>  src/conf/domain_conf.h           |  3 +++
>  src/conf/netdev_bandwidth_conf.h |  1 +
>  src/libxl/libxl_conf.c           |  1 +
>  src/lxc/lxc_controller.c         |  1 +
>  src/lxc/lxc_process.c            |  1 +
>  src/qemu/qemu_command.c          | 12 +++++++++
>  src/qemu/qemu_hotplug.c          |  1 +
>  src/qemu/qemu_interface.c        |  2 ++
>  src/uml/uml_conf.c               |  5 ++++
>  src/xenconfig/xen_sxpr.c         |  1 +
>  tools/virsh-domain.c             |  1 +
>  13 files changed, 99 insertions(+), 3 deletions(-)

Missing test cases for tests/qemuxml2argvtest.c and
tests/qemuxml2xmltest.c. 

> diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in
> index c0a265a..95f7f5d 100644
> --- a/docs/formatdomain.html.in
> +++ b/docs/formatdomain.html.in
> @@ -4165,6 +4165,23 @@
>    </devices>
>    ...</pre>
>  
> +    <h5><a name="elementsNICSUDP">UDP unicast tunnel</a></h5>
> +
> +    <p>
> +    A UDP unicast architecture provides a virtual network which enables
> +    connections between Qemu instances using Qemu's UDP infrastructure.</p>
> +

It would be nice to document what the addresses mean, and mention that
this is supported <span class="since">Since 1.2.19</span>.

Jan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20150810/09ba3024/attachment-0001.sig>


More information about the libvir-list mailing list