qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] Contribution - L2TPv3 transport


From: Eric Blake
Subject: Re: [Qemu-devel] Contribution - L2TPv3 transport
Date: Fri, 28 Feb 2014 06:57:27 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0

On 02/28/2014 06:52 AM, Anton Ivanov (antivano) wrote:
> On 28/02/14 13:40, Eric Blake wrote:
>> On 02/28/2014 01:28 AM, Anton Ivanov (antivano) wrote:
>>> Hi all,
>>>
>>> On behalf of Cisco Systems I am authorized to contribute a new transport
>>> to the network subsystem in qemu.
>>>

>>> +#
>>> +#
>>> +# Since 1.0
>> s/1.0/2.0/
> 
> OK - just to clarify, which version is this referring to - qemu, api, etc?

This field is the version of qemu that first contains the release.  If
your patch is on time to make the qemu 2.0 release, then 2.0 is
appropriate; but we're close to feature freeze so it may end up being 2.1.

> 
>>
>>> +##
>>> +##
>>> +{ 'type': 'NetdevL2TPv3Options',
>>> +  'data': {
>>> +    '*fd':        'str',
>>> +    '*src':          'str', 
>> You didn't list 'src' as optional above.
> 
> That is intended. It is not optional for the ip command in Linux either.
> For L2TPv3 tunnels you have to specify the source address.

But listing it as '*src' means it is optional.  If it is mandatory, list
it as 'src'.

> 
>>
>> Trailing whitespace - run your submission through checkpatch.pl.
>>
>>> +    '*dst':          'str', 
>>> +    '*mode':         'str', 
>> As mentioned above, 'mode' should not be a string.
>>
>>> +    '*txcookie':  'str',
>>> +    '*rxcookie':  'str',
>>> +    '*txsession': 'str',
>>> +    '*rxsession': 'str'
>> These should probably be 'int', not 'str'.  If you have to hand-parse a
>> string into a numeric value, you encoded the QMP wrong.
> 
> These by spec are either 32 bit or 64 bit integers. I will fix them
> accordingly.

The qapi type 'int' is 64-bit.  You can further range check the values
in your C code and fail the command if the user passed values that don't
fit in 32 bits when they requested a 32-bit mode.

-- 
Eric Blake   eblake redhat com    +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]