qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH RFC 4/5] net/dump: Provide the dumping facility


From: Thomas Huth
Subject: Re: [Qemu-devel] [PATCH RFC 4/5] net/dump: Provide the dumping facility as a net filter
Date: Tue, 1 Sep 2015 23:19:22 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0

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 <address@hidden>
>> ---
>>  net/dump.c       | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
>>  net/filter.c     |  1 +
>>  net/filters.h    |  2 ++
>>  qapi-schema.json | 20 +++++++++++++++++++-
>>  4 files changed, 76 insertions(+), 1 deletion(-)
>>
> 
>> +++ b/net/filters.h
>> @@ -13,5 +13,7 @@
>>  
>>  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 *name,
>> +                           int chain, NetClientState *netdev, Error **errp);
> 
> Indentation is off.
> 
>>  
>>  #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' } }
>>  
>>  ##
>> +# @NetFilterDumpOptions
>> +#
> 
> 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



Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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