Files
Bowen Wang 9c4ad74ab4 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>
2025-10-16 11:20:05 +02:00
..
2018-07-30 17:24:27 -07:00
2024-10-25 10:16:15 +02:00