Re: [Qemu-devel] [PATCH v2 1/3] vhost-user: update the protocol.

2015-02-14 Thread Linhaifeng


On 2015/2/15 5:03, Michael S. Tsirkin wrote:
> On Fri, Feb 13, 2015 at 09:45:37PM +0800, linhaifeng wrote:
>> @@ -35,7 +39,7 @@ consists of 3 header fields and a payload:
>>  
>>   * Request: 32-bit type of the request
>>   * Flags: 32-bit bit field:
>> -   - Lower 2 bits are the version (currently 0x01)
>> +   - Lower 2 bits are the version (currently 0x06)
>> - Bit 2 is the reply flag - needs to be sent on each reply from the slave
>>   * Size - 32-bit size of the payload
>>  
> 
> How do you encode 0x6 in a 2 bit field?
> 

I think the reply flag is unnecessary,so i remove it and let all the field as 
version.
The existing version is 0x5 now.

Sorry, i need to update the vhost-user.txt to describe it.


-- 
Regards,
Haifeng




Re: [Qemu-devel] [PATCH v2 1/3] vhost-user: update the protocol.

2015-02-14 Thread Michael S. Tsirkin
On Fri, Feb 13, 2015 at 09:45:37PM +0800, linhaifeng wrote:
> @@ -35,7 +39,7 @@ consists of 3 header fields and a payload:
>  
>   * Request: 32-bit type of the request
>   * Flags: 32-bit bit field:
> -   - Lower 2 bits are the version (currently 0x01)
> +   - Lower 2 bits are the version (currently 0x06)
> - Bit 2 is the reply flag - needs to be sent on each reply from the slave
>   * Size - 32-bit size of the payload
>  

How do you encode 0x6 in a 2 bit field?

-- 
MST