[Top][All Lists]

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

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

From: Tetsuya Mukawa
Subject: Re: [Qemu-devel] [RFC PATCH 4/4] vhost-user: Add new option to specify vhost-user backend supports
Date: Fri, 29 May 2015 13:42:00 +0900
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0

On 2015/05/28 10:25, Tetsuya Mukawa wrote:
> On 2015/05/26 21:52, Eric Blake wrote:
>> On 05/25/2015 10:29 PM, Tetsuya Mukawa wrote:
>>>>>>  { 'struct': 'NetdevTapOptions',
>>>>>> @@ -2259,7 +2261,8 @@
>>>>>>      '*vhostfd':    'str',
>>>>>>      '*vhostfds':   'str',
>>>>>>      '*vhostforce': 'bool',
>>>>>> -    '*queues':     'uint32'} }
>>>>>> +    '*queues':     'uint32',
>>>>>> +    '*backend_features':'uint64'} }
>>>>> Ewww. Making users figure out what integers to pass is NOT user
>>>>> friendly.  Better would be an enum type, and make the parameter an
>>>>> optional array of enum values.
>>>> Thanks for your comments. 
>>>> I guess below may be good example. Is this same as your suggestion?
>>>> virtio-net-pci,netdev=hostnet3,id=net3,gso=off,guest_tso4=off,guest_tso6=off
>>>> So I will improve 'backend-features' like below.
>>>>  backend-features=gso=off,guest_tso4=off,guest_tso6=off
>>>> Also I will fix 'qapi-schema.json' to work like above.
>>> I seems it's impossible to implement like above.
>>> I may need to implement like below.
>>> virtio-net-pci,netdev=hostnet3,id=net3,backend_gso=on,backend_guest_tso4=on,backend_guest_tso6=on
>> Or even:
>> virtio-net-pci,netdev=hostnet3,id=net3,backend.gso=on,backend.guest_tso4=on,backend.guest_tso6=on
>> Look at -device for how to set up nested structs using '.' for a nice
>> hierarchy of options all belonging to a common substruct.
> I appreciate for your suggestion.
> I will check '-device' option, and implement like above in v2 patch.

I've checked '-device' option and DeviceClass, and found I may not be
able to use above nice hierarchy with '-net' option.
Probably it is because '-net' option isn't for describing device itself,
so there is no DeviceClass.
And without DeviceClass I guess I cannot use '.' infrastructure.

I may be able to describe vhost-user backend features in '-device
virtio-net-pci,.....', but I guess it's not good.
Probably describing in '-net vhost-user,....' will be good.

As described above, I implemented like below in next patch.

-chardev socket,id=chr0,path=/tmp/sock,reconnect=3 \
-device virtio-net-pci,netdev=net0 \

BTW, '-device' option has already had options like below.
 - guest_csum
 - guest_tso4

So I used '_' like below
 - backend_guest_csum
 - backend_guest_tso4


reply via email to

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