From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53560) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZWsxp-0007F2-J9 for qemu-devel@nongnu.org; Tue, 01 Sep 2015 17:19:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZWsxm-0001Re-Ff for qemu-devel@nongnu.org; Tue, 01 Sep 2015 17:19:33 -0400 Received: from mx1.redhat.com ([209.132.183.28]:37331) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZWsxm-0001Qg-98 for qemu-devel@nongnu.org; Tue, 01 Sep 2015 17:19:30 -0400 References: <1440642804-29001-1-git-send-email-thuth@redhat.com> <1440642804-29001-5-git-send-email-thuth@redhat.com> <55E601F4.3020102@redhat.com> From: Thomas Huth Message-ID: <55E6165A.7080706@redhat.com> Date: Tue, 1 Sep 2015 23:19:22 +0200 MIME-Version: 1.0 In-Reply-To: <55E601F4.3020102@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="sfCNh47iS70M4AUsJiMNjlw0nCatnjFA1" Subject: Re: [Qemu-devel] [PATCH RFC 4/5] net/dump: Provide the dumping facility as a net filter List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake , Stefan Hajnoczi , Jason Wang , qemu-devel@nongnu.org, yanghy@cn.fujitsu.com Cc: Markus Armbruster , "Michael S. Tsirkin" This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --sfCNh47iS70M4AUsJiMNjlw0nCatnjFA1 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 01/09/15 21:52, Eric Blake wrote: > On 08/26/2015 08:33 PM, Thomas Huth wrote: >> Add glue code to use the dumping functions as a netdev >> filter, too. >> >> Signed-off-by: Thomas Huth >> --- >> net/dump.c | 54 +++++++++++++++++++++++++++++++++++++++++++++++= +++++++ >> net/filter.c | 1 + >> net/filters.h | 2 ++ >> qapi-schema.json | 20 +++++++++++++++++++- >> 4 files changed, 76 insertions(+), 1 deletion(-) >> >=20 >> +++ b/net/filters.h >> @@ -13,5 +13,7 @@ >> =20 >> int net_init_filter_buffer(const NetFilterOptions *opts, const char *= name, >> int chain, NetClientState *netdev, Error *= *errp); >> +int net_init_filter_dump(const NetFilterOptions *opts, const char *na= me, >> + int chain, NetClientState *netdev, Error *= *errp); >=20 > Indentation is off. >=20 >> =20 >> #endif /* QEMU_NET_FILTERS_H */ >> diff --git a/qapi-schema.json b/qapi-schema.json >> index 7882641..71caca9 100644 >> --- a/qapi-schema.json >> +++ b/qapi-schema.json >> @@ -2599,6 +2599,23 @@ >> '*interval': 'uint32' } } >> =20 >> ## >> +# @NetFilterDumpOptions >> +# >=20 > Otherwise, the interface looks clean. I can't tell from this patch > whether the file is opened by qemu_open() (probably in > net_dump_state_init() in an earlier patch of the series); but if not, > you should fix that. That way, I can pass '/dev/fdset/XXX' as the name= > for an fd passed in by an earlier 'add-fd' even if qemu is restricted > from open()ing files directly. The current (old) code opens the dump file with open() ... but I can certainly add an additional patch that uses qemu_open() instead. Thomas --sfCNh47iS70M4AUsJiMNjlw0nCatnjFA1 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.22 (GNU/Linux) iQIcBAEBAgAGBQJV5hZaAAoJEC7Z13T+cC21POQQAICc7VCvOI4/78Rw7nuxgq5/ nlPo0UTU4eT6XsP36X2B6+Iruy3+INs3/5nZXKfpXdapHC2WEvZwnint52dWHfJS lHyFOvFInDJUvaTN+BWMpY6xH1Bj2idNzLs/XA3W8a4pz27RpqaeYFIyTfuMv7oo 4wUPFJZp5R9GyRKRXgqE2bktxOqsBFMhc4MQEFRW1tduUAtY7CibDM9/p4sE+QJf V10kDsAP4zZM4SpS5m96RamthiYLwjpG2ndAg38fIXWjgHIUAPLKLGCcei4cC5Jy 3yuUBQpmihKcmyqAGdKmDrtUXZuVeFGvaGgwOOYNG2czi/H29oh2FMaNcdt7VsmY mrgRfKxFja7osAZZLwOdjz80E7gD2SLKJJ6YwwXYMVy/8dBt5AiJTO6Jd3FaC4JS vbcAZd1RXvzKg52MFlw9oxCTC+Z12hewB/z4F8z/s1gxU5+EtETZyJicRGxyQwI7 T8DABuhtVJp7DZ5s5e4Lrd+NS3yKWOJuIPOaJRJ+4dMUk1Wr+IbEamE5H8p5Ivej Z9Eap7PdH5FPR6XacK45scMCkdhMEc55S6oRZVpsJvkZHdZyhHuHgwdrWdK4o32m rG5JZu4D0ZesvURX7kEmR35TUQ6+JGdR56qSUhOffOQ7ZvwN4aUCXN/ovFfwcdqQ vOaJ34KILQnvk+pjvsRy =TBV5 -----END PGP SIGNATURE----- --sfCNh47iS70M4AUsJiMNjlw0nCatnjFA1--