Branch: refs/heads/main Home: https://github.com/OpenAMP/open-amp Commit: 9c4ad74ab4e31f4b74be78a69900d683cbd43680 https://github.com/OpenAMP/open-amp/commit/9c4ad74ab4e31f4b74be78a69900d683c... Author: Bowen Wang wangbowen6@xiaomi.com Date: 2025-10-16 (Thu, 16 Oct 2025)
Changed paths: M lib/include/openamp/virtqueue.h M lib/rpmsg/rpmsg_virtio.c M lib/virtio/virtqueue.c
Log Message: ----------- virtqueue: add more virtqueue apis for the virtio device side
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
To unsubscribe from these emails, change your notification settings at https://github.com/OpenAMP/open-amp/settings/notifications
openamp-rp@lists.openampproject.org