qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v4] net: Adding netmap network backend


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH v4] net: Adding netmap network backend
Date: Tue, 05 Nov 2013 08:54:48 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0

On 11/05/2013 08:17 AM, Vincenzo Maffione wrote:
> This patch adds support for a network backend based on netmap.
> netmap is a framework for high speed packet I/O. You can use it
> to build extremely fast traffic generators, monitors, software
> switches or network middleboxes. Its companion software switch
> VALE lets you interconnect virtual machines.
> netmap and VALE are implemented as a non intrusive kernel module,

s/non intrusive/non-intrusive/

> support NICs from multiple vendors, are part of standard FreeBSD
> distributions and available in source format for Linux too.
> 
> To compile QEMU with netmap support, use the following configure
> options:
>     ./configure [...] --enable-netmap --extra-cflags=-I/path/to/netmap/sys
> where "/path/to/netmap" contains the netmap source code, available at
>     http://info.iet.unipi.it/~luigi/netmap/
> 
> The same webpage contains more information about the netmap project
> (together with papers and presentations).
> 
> Signed-off-by: Vincenzo Maffione <address@hidden>
> ---

> +++ b/qapi-schema.json
> @@ -3008,6 +3008,26 @@
>      'hubid':     'int32' } }
>  
>  ##
> +# @NetdevNetmapOptions
> +#
> +# Connect two or more net clients through a VALE switch.
> +#
> +# @ifname: name of the VALE port: it must be in the form 'valeXXX:YYY',
> +#          where XXX and YYY are non-negative integers. XXX identifies
> +#          a switch and YYY identifies a port of the switch. VALE
> +#          ports having the same XXX are therefore connected to the same
> +#          switch.

Will qemu ever parse out the XXX and YYY?  Your current patch appears to
just treat ifname as a pass-through opaque string, in which case the set
of valid formats is determined not by qemu but by the VALE system
interface.  So I think I'm okay with your approach.

If qemu were to need to parse out the XXX and YYY, I'd argue that your
parameter is typed incorrectly (it's better to be explicit and have
"ifname": { "switch":XXX, "port": YYY } than it is to be vague with
"ifname": "valeXXX:YYY").  One of the goals of qapi is to represent
everything sufficiently that you don't have to reparse opaque strings.

> +#
> +# @devname: optional path of the netmap device (default: '/dev/netmap').

For consistency, s/optional/#optional/

> +#
> +# Since 1.8
> +##
> +{ 'type': 'NetdevNetmapOptions',
> +  'data': {
> +    'ifname':     'str',
> +    '*devname':    'str' } }
> +
> +##

>  #endif
> +#ifdef CONFIG_NETMAP
> +    "-net netmap,ifname=name[,vlan=n][,devname=name]\n"

So where does the optional vlan command-line option appear in the QMP
interface?

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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