qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v2 2/9] qapi: add socket address types


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH v2 2/9] qapi: add socket address types
Date: Tue, 02 Oct 2012 05:39:52 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120911 Thunderbird/15.0.1

On 10/02/2012 03:00 AM, Paolo Bonzini wrote:
> Il 02/10/2012 01:56, Eric Blake ha scritto:
>> On 10/01/2012 08:52 AM, Paolo Bonzini wrote:
>>> Signed-off-by: Paolo Bonzini <address@hidden>
>>> ---

>>> +#
>>> +# @port: port part of the address, or lowest port if @to is present
>>> +#
>>> +# @to: highest port to try
>>> +#

>>> +{ 'type': 'IPSocketAddress',
>>> +  'data': {
>>> +    'host': 'str',
>>> +    'port': 'str',
>>> +    '*to': 'uint16',
>>
>> I still think it's a bit weird to have:
>>
>> 'host':'localhost', 'port':'1000', 'to':1001
>>
>> for a port range, all because of the possibility of named ports; should
>> '*to' be a 'str' if only for symmetry in the output?  But it's
>> bike-shedding, so I'll live with whatever works (that is, I'm not
>> requesting a v3 on this patch).
> 
> Would it be better if I changed 'to' to 'count'?

That does look a little better:

'host':'localhost', 'port':'1000', 'count':2

for the 2-port range 1000-1001.  But it's all the same information, so
I'm not strongly tied to any particular representation, as long as
libvirt can parse it when querying and produce it when starting NBD.

-- 
Eric Blake   address@hidden    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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