From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58355) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VdiyC-0005MR-3v for qemu-devel@nongnu.org; Tue, 05 Nov 2013 10:55:12 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vdiy7-0007mS-Mn for qemu-devel@nongnu.org; Tue, 05 Nov 2013 10:55:08 -0500 Received: from mx1.redhat.com ([209.132.183.28]:25882) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vdiy7-0007jZ-EH for qemu-devel@nongnu.org; Tue, 05 Nov 2013 10:55:03 -0500 Message-ID: <527914C8.8050700@redhat.com> Date: Tue, 05 Nov 2013 08:54:48 -0700 From: Eric Blake MIME-Version: 1.0 References: <1383664643-31552-1-git-send-email-v.maffione@gmail.com> In-Reply-To: <1383664643-31552-1-git-send-email-v.maffione@gmail.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="1hjO0N886Mwk5mRcV4tG2QlrBsvCrm4tc" Subject: Re: [Qemu-devel] [PATCH v4] net: Adding netmap network backend List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Vincenzo Maffione , qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, aliguori@amazon.com, mjt@tls.msk.ru, armbru@redhat.com, lcapitulino@redhat.com, stefanha@redhat.com, pbonzini@redhat.com, g.lettieri@iet.unipi.it, rizzo@iet.unipi.it, rth@twiddle.net This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --1hjO0N886Mwk5mRcV4tG2QlrBsvCrm4tc Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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. >=20 > To compile QEMU with netmap support, use the following configure > options: > ./configure [...] --enable-netmap --extra-cflags=3D-I/path/to/netma= p/sys > where "/path/to/netmap" contains the netmap source code, available at > http://info.iet.unipi.it/~luigi/netmap/ >=20 > The same webpage contains more information about the netmap project > (together with papers and presentations). >=20 > Signed-off-by: Vincenzo Maffione > --- > +++ b/qapi-schema.json > @@ -3008,6 +3008,26 @@ > 'hubid': 'int32' } } > =20 > ## > +# @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 sa= me > +# 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=3Dname[,vlan=3Dn][,devname=3Dname]\n" So where does the optional vlan command-line option appear in the QMP interface? --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --1hjO0N886Mwk5mRcV4tG2QlrBsvCrm4tc Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.15 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJSeRTIAAoJEKeha0olJ0Nq8B8H/j7RdUVPZi+f8507PZJHQF4K a/RU02Sxyk+AeKFWaq4jv5d9vULZXB4/4m3umyPneiAD+o1fcNZP5d2ndd3ieMfb vXhcM0yOeyNiGBxUiznfIdc0g9boG4vtxjms/sa00UXSseFmsCLgih6aayb814aY zpirG/lDLtb6W+CPi2xqt+zMJPLsPNkET8Iwnt9vXN+to23wmzL2j6QC9376YQhK FYxyZNmOp9w1OvA1lgSqXe4XiMyB6D98LGpQ/kivYMSSrclq28Ppk1m5aW8cNVOm SIkoj4VBTICBR5ApULHltP2gFIwrjJZocYzisU2yzqiLEuaz8XRKg8HNCKbHgao= =AlIR -----END PGP SIGNATURE----- --1hjO0N886Mwk5mRcV4tG2QlrBsvCrm4tc--