From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=40742 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OZn6H-00039T-BX for qemu-devel@nongnu.org; Fri, 16 Jul 2010 11:45:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OZn6C-0006cz-6K for qemu-devel@nongnu.org; Fri, 16 Jul 2010 11:45:21 -0400 Received: from fmmailgate02.web.de ([217.72.192.227]:38357) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OZn6B-0006cp-QS for qemu-devel@nongnu.org; Fri, 16 Jul 2010 11:45:16 -0400 Message-ID: <4C407EA8.4030506@web.de> Date: Fri, 16 Jul 2010 17:45:44 +0200 From: Jan Kiszka MIME-Version: 1.0 References: <1279225380-28790-1-git-send-email-miguel.filho@gmail.com> <4C407470.7060403@codemonkey.ws> In-Reply-To: <4C407470.7060403@codemonkey.ws> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig677CCEADA3759C4AB9D8CC51" Sender: jan.kiszka@web.de Subject: [Qemu-devel] Re: [PATCH RFC 0/4] Dumping traffic when using netdev devices List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: avi@redhat.com, Miguel Di Ciurcio Filho , qemu-devel@nongnu.org, armbru@redhat.com This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig677CCEADA3759C4AB9D8CC51 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Anthony Liguori wrote: > On 07/15/2010 03:22 PM, Miguel Di Ciurcio Filho wrote: >> Hello, >> >> This is a prototype suggestion. I mostly copied and pasted the code fr= om >> net/dump.c into net.c and made some adjustments. There is no command l= ine >> parsing involved yet, just the internals and small changes in >> net/tap.c and >> net/slirp.c do make the thing work. >> >> In my tests, using tap as backend, e1000 as a guest device and running= >> iperf from >> guest to host, the overhead of dumping the traffic caused a loss of >> around 30% >> of performance. >> >> I opened the dumped files in wireshark and they looked fine. When >> using slirp >> all requests were dumped fine too. >> =20 >=20 > A less invasive way to do this would be to chain netdev devices. >=20 > Basically: >=20 > -netdev tap,fd=3DX,id=3Dfoo > -netdev dump,file=3Dfoo.pcap,netdev=3Dfoo,id=3Dbar > -net nic,model=3Dvirtio,netdev=3Dbar >=20 > I think this has some clear advantages to this architecturally. From a= > user perspective, the only loss is that you have to add the dump device= > at startup (you can still enable/disable capture dynamically). At least I tend to forget this, and then you already have a VM running without that chain. And it looks like dynamic reconfiguration of the backend (netdev_del/add) implies hot-removing/adding the frontend as well. So this is also no option if the guest does not support that. A bit unhandy. Jan --------------enig677CCEADA3759C4AB9D8CC51 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org iEYEARECAAYFAkxAfqwACgkQitSsb3rl5xTIGQCgvk0fRdAxbvMgrqHM8YqMly0P 7csAoMCM9tCBBN3HyuryS5LfigJQPXFg =g5ZN -----END PGP SIGNATURE----- --------------enig677CCEADA3759C4AB9D8CC51--