mirror of
https://github.com/OpenAMP/open-amp.git
synced 2025-12-06 11:31:08 +08:00
In virtio device side, we always need to get the next avaiable buffer based on current buffer index. So add these two APIs for convinience use. For example, virtio blk driver origanize the buffer: +----------+ | Reqeust | (Flags: Read | Next) +----------+ | Buffer | (Flags: Read/Write | Next) +----------+ | Response | (Flags: Write) +----------+ For the virtio blk device size, we need get the Buffer and Response buffer based on the Request buffer index. So add api virtqueue_get_next_avail_buffer() to get the next available buffer based on the first buffer index. And rename the virtqueue_get_available_buffer() to virtqueue_get_first_avail_buffer() Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com> Signed-off-by: Yongrong Wang <wangyongrong@xiaomi.com>