Local virtio queue to manage a virtio ring for sending or receiving. More...
#include <virtqueue.h>
Data Fields | |
| struct virtio_device * | vq_dev |
| Associated virtio device. More... | |
| const char * | vq_name |
| Name of the virtio queue. More... | |
| uint16_t | vq_queue_index |
| Index of the virtio queue. More... | |
| uint16_t | vq_nentries |
| Max number of buffers in the virtio queue. More... | |
| void(* | callback )(struct virtqueue *vq) |
| Function to invoke, when message is available on the virtio queue. More... | |
| void * | priv |
| Private data associated to the virtio queue. More... | |
| void(* | notify )(struct virtqueue *vq) |
| Function to invoke, to inform the other side about an update in the virtio queue. More... | |
| struct vring | vq_ring |
| Associated virtio ring. More... | |
| uint16_t | vq_free_cnt |
| Number of free descriptor in the virtio ring. More... | |
| uint16_t | vq_queued_cnt |
| Number of queued buffer in the virtio ring. More... | |
| struct metal_io_region * | shm_io |
| Metal I/O region of the buffers. More... | |
| uint16_t | vq_desc_head_idx |
| Head of the free chain in the descriptor table. More... | |
| uint16_t | vq_used_cons_idx |
| Last consumed descriptor in the used table, trails vq_ring.used->idx. More... | |
| uint16_t | vq_available_idx |
| Last consumed descriptor in the available table, used by the consumer side. More... | |
| struct vq_desc_extra | vq_descx [0] |
| Used by the host side during callback. More... | |
Local virtio queue to manage a virtio ring for sending or receiving.
| void(* virtqueue::callback) (struct virtqueue *vq) |
Function to invoke, when message is available on the virtio queue.
| void(* virtqueue::notify) (struct virtqueue *vq) |
Function to invoke, to inform the other side about an update in the virtio queue.
| void* virtqueue::priv |
Private data associated to the virtio queue.
| struct metal_io_region* virtqueue::shm_io |
Metal I/O region of the buffers.
This structure is used for conversion between virtual and physical addresses.
| uint16_t virtqueue::vq_available_idx |
Last consumed descriptor in the available table, used by the consumer side.
| uint16_t virtqueue::vq_desc_head_idx |
Head of the free chain in the descriptor table.
If there are no free descriptors, this will be set to VQ_RING_DESC_CHAIN_END.
| struct vq_desc_extra virtqueue::vq_descx[0] |
Used by the host side during callback.
Cookie holds the address of buffer received from other side. Other fields in this structure are not used currently.
| struct virtio_device* virtqueue::vq_dev |
Associated virtio device.
| uint16_t virtqueue::vq_free_cnt |
Number of free descriptor in the virtio ring.
| const char* virtqueue::vq_name |
Name of the virtio queue.
| uint16_t virtqueue::vq_nentries |
Max number of buffers in the virtio queue.
| uint16_t virtqueue::vq_queue_index |
Index of the virtio queue.
| uint16_t virtqueue::vq_queued_cnt |
Number of queued buffer in the virtio ring.
| struct vring virtqueue::vq_ring |
Associated virtio ring.
| uint16_t virtqueue::vq_used_cons_idx |
Last consumed descriptor in the used table, trails vq_ring.used->idx.