qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v3 08/16] vhost-user: send log shm fd along with


From: Marc-André Lureau
Subject: Re: [Qemu-devel] [PATCH v3 08/16] vhost-user: send log shm fd along with log_base
Date: Sat, 19 Sep 2015 10:59:13 +0200

On Wed, Sep 16, 2015 at 4:08 PM, Michael S. Tsirkin <address@hidden> wrote:
> supports
>

ok

>> VHOST_USER_PROTOCOL_F_LOG_SHMFD.
>>
>> Signed-off-by: Marc-André Lureau <address@hidden>
>> ---
>>  hw/virtio/vhost-user.c | 16 ++++++++++++++--
>>  hw/virtio/vhost.c      |  5 +++--
>>  2 files changed, 17 insertions(+), 4 deletions(-)
>>
>> diff --git a/hw/virtio/vhost-user.c b/hw/virtio/vhost-user.c
>> index 21ecbcd..b2f46a9 100644
>> --- a/hw/virtio/vhost-user.c
>> +++ b/hw/virtio/vhost-user.c
>> @@ -26,7 +26,9 @@
>>  #define VHOST_MEMORY_MAX_NREGIONS    8
>>
>>  #define VHOST_USER_F_PROTOCOL_FEATURES 30
>> -#define VHOST_USER_PROTOCOL_FEATURE_MASK 0x0ULL
>> +
>> +#define VHOST_USER_PROTOCOL_FEATURE_MASK 0x1ULL
>> +#define VHOST_USER_PROTOCOL_F_LOG_SHMFD 0
>>
>>  typedef enum VhostUserRequest {
>>      VHOST_USER_NONE = 0,
>> @@ -215,8 +217,18 @@ static int vhost_user_call(struct vhost_dev *dev,
>>          need_reply = 1;
>>          break;
>>
>> +    case VHOST_USER_SET_LOG_BASE: {
>> +        struct vhost_log *log = va_arg(ap, struct vhost_log *);
>> +
>> +        if (__virtio_has_feature(dev->protocol_features,
>> +                                 VHOST_USER_PROTOCOL_F_LOG_SHMFD) &&
>> +            log->fd != -1) {
>> +            fds[fd_num++] = log->fd;
>> +        }
>> +    }
>> +        /* fall through */
>> +
>
> Don't add {} like that please. Just move declarations to the top level.

Done with the vhost_call() refactoring


-- 
Marc-André Lureau



reply via email to

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