qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v4 09/11] virtio-net: update the head descriptor


From: Jason Wang
Subject: Re: [Qemu-devel] [PATCH v4 09/11] virtio-net: update the head descriptor in a chain lastly
Date: Wed, 20 Feb 2019 15:53:56 +0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0


On 2019/2/20 下午12:01, Wei Xu wrote:

AFAICT, virtqueue_fill() is a generic API for all relevant userspace virtio
devices that do not support batching , without touching virtqueue_fill(),
supporting batching changes the meaning of the parameter 'idx' which should
be kept overall.

To fix it, I got two proposals so far:
1). batching support(two APIs needed to keep compatibility)
2). save a head elem for a vq instead of caching an array of elems like vhost,
     and introduce a new API(virtqueue_chain_fill()) functioning with an
     additional parameter 'more' to the current virtqueue_fill() to indicate if
     there are more descriptor(s) coming in a chain.

Either way it changes the API somehow and it does not seem to be clean and clear
as wanted.
It's as simple as accepting an array of elems in e.g
virtqueue_fill_batched()?
It is trivial for both, my concern is an array elements need to be allocated 
dynamically
due to vq size which no any other devices are using, a head would be enough for 
2.


Do you see any issue for this?

Thanks




reply via email to

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