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 <v.maffi...@gmail.com> > --- > +++ 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
signature.asc
Description: OpenPGP digital signature