|
L4Re - L4 Runtime Environment
|
Virtqueue implementation for the device. More...
Inheritance diagram for L4virtio::Svr::Virtqueue:
Collaboration diagram for L4virtio::Svr::Virtqueue:Data Structures | |
| class | Head_desc |
| VIRTIO request, essentially a descriptor from the available ring. More... | |
Public Member Functions | |
| Request | next_avail () |
| Get the next available descriptor from the available ring. More... | |
| bool | desc_avail () const |
| Test for available descriptors. More... | |
| void | consumed (Head_desc const &r, l4_uint32_t len=0) |
| Put the given descriptor into the used ring. More... | |
| void | disable_notify () |
| Set the 'no notify' flag for this queue. More... | |
| void | enable_notify () |
| Clear the 'no notify' flag for this queue. More... | |
| Desc const * | desc (unsigned idx) const |
| Get a descriptor from the descriptor list. More... | |
Public Member Functions inherited from L4virtio::Virtqueue | |
| void | disable () |
| Completely disable the queue. More... | |
| unsigned long | total_size () const |
| Calculate the total size of this virtqueue. More... | |
| unsigned long | avail_offset () const |
| Get the offset of the available ring from the descriptor table. | |
| unsigned long | used_offset () const |
| Get the offset of the used ring from the descriptor table. | |
| void | setup (unsigned num, void *desc, void *avail, void *used) |
| Enable this queue. More... | |
| void | setup_simple (unsigned num, void *ring) |
| Enable this queue. More... | |
| void | dump (Desc const *d) const |
| Dump descriptors for this queue. More... | |
| bool | ready () const |
| Test if this queue is in working state. More... | |
| unsigned | num () const |
| bool | no_notify_guest () const |
| Get the no IRQ flag of this queue. More... | |
| bool | no_notify_host () const |
| Get the no notify flag of this queue. More... | |
| void | no_notify_host (bool value) |
| Set the no-notify flag for this queue. More... | |
| l4_uint16_t | get_avail_idx () const |
| Get available index from available ring (for debugging). More... | |
| l4_uint16_t | get_tail_avail_idx () const |
| Get tail-available index stored in local state (for debugging). More... | |
Additional Inherited Members | |
Public Types inherited from L4virtio::Virtqueue | |
| enum | |
| Fixed alignment values for different parts of a virtqueue. | |
Static Public Member Functions inherited from L4virtio::Virtqueue | |
| static unsigned long | total_size (unsigned num) |
| Calculate the total size for a virtqueue of the given dimensions. More... | |
| static unsigned long | desc_size (unsigned num) |
Calculate the size of the descriptor table for num entries. More... | |
| static unsigned long | desc_align () |
| Get the alignment in zero LSBs needed for the descriptor table. More... | |
| static unsigned long | avail_size (unsigned num) |
Calculate the size of the available ring for num entries. More... | |
| static unsigned long | avail_align () |
| Get the alignment in zero LSBs needed for the available ring. More... | |
| static unsigned long | used_size (unsigned num) |
Calculate the size of the used ring for num entries. More... | |
| static unsigned long | used_align () |
| Get the alignment in zero LSBs needed for the used ring. More... | |
Protected Member Functions inherited from L4virtio::Virtqueue | |
| Virtqueue () | |
| Create a disabled virtqueue. | |
Protected Attributes inherited from L4virtio::Virtqueue | |
| Desc * | _desc |
| pointer to descriptor table, NULL if queue is off. | |
| Avail * | _avail |
| pointer to available ring. | |
| Used * | _used |
| pointer to used ring. | |
| l4_uint16_t | _current_avail |
| The life counter for the queue. | |
| l4_uint16_t | _idx_mask |
| mask used for indexing into the descriptor table and the rings. | |
Virtqueue implementation for the device.
This class represents a single virtqueue, with a local running available index.
|
inline |
Put the given descriptor into the used ring.
| r | request that shall be marked as finished. |
| len | the total number of bytes written. |
Definition at line 173 of file virtio.
Referenced by L4virtio::Svr::Block_request< Ds_data >::header().
Here is the caller graph for this function:
|
inline |
Get a descriptor from the descriptor list.
| idx | the index of the descriptor. |
Definition at line 238 of file virtio.
Referenced by L4virtio::Svr::Request_processor::start().
Here is the caller graph for this function:
|
inline |
|
inline |
|
inline |
|
inline |
Get the next available descriptor from the available ring.
Definition at line 144 of file virtio.
References L4_LIKELY.
Referenced by L4virtio::Svr::Block_dev< Ds_data >::register_obj().
Here is the caller graph for this function: