qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v1 4/4] vhost-user: Add new option to specify vh


From: Tetsuya Mukawa
Subject: Re: [Qemu-devel] [PATCH v1 4/4] vhost-user: Add new option to specify vhost-user backend features
Date: Tue, 16 Jun 2015 14:08:27 +0900
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0

On 2015/06/15 22:58, Stefan Hajnoczi wrote:
> On Fri, May 29, 2015 at 01:42:30PM +0900, Tetsuya Mukawa wrote:
>> diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c
>> index 3af6faf..7fbb306 100644
>> --- a/hw/net/virtio-net.c
>> +++ b/hw/net/virtio-net.c
>> @@ -366,6 +366,17 @@ static int peer_has_ufo(VirtIONet *n)
>>      return n->has_ufo;
>>  }
>>  
>> +static uint64_t peer_backend_features(VirtIONet *n)
>> +{
>> +    if (!peer_has_vnet_hdr(n))
>> +        return 0;
> QEMU coding style always uses {} even for single statement if bodies:
>
> if (!peer_has_vnet_hdr(n)) {
>     return 0;
> }
>
>> diff --git a/hw/virtio/vhost-user.c b/hw/virtio/vhost-user.c
>> index 4d7e3ba..d847ea5 100644
>> --- a/hw/virtio/vhost-user.c
>> +++ b/hw/virtio/vhost-user.c
>> @@ -307,6 +307,13 @@ static int vhost_user_call(struct vhost_dev *dev, 
>> unsigned long int request,
>>                  error_report("Received bad msg size.");
>>                  goto close;
>>              }
>> +            if (dev->backend_features != (dev->backend_features & msg.u64)) 
>> {
>> +                    error_report("Lack of backend features. "
>> +                                 "Expected 0x%llx, but receives 0x%lx",
> Please use PRIx64 for msg.u64 to avoid compiler errors on 32-bit hosts.
>> +                                 dev->backend_features, msg.u64);
>> +                    goto close;
> QEMU uses 4-space indentation.

I will fix above 3 issues in next patches.

Regards,
Tetsuya



reply via email to

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