L4Re - L4 Runtime Environment
l4virtio_config_queue_t Struct Reference

Queue configuration entry. More...

#include <virtio.h>

+ Collaboration diagram for l4virtio_config_queue_t:

Data Fields

l4_uint16_t num_max
 R: maximum number of descriptors supported by this queue.
l4_uint16_t num
 RW: number of descriptors configured for this queue.
l4_uint16_t ready
 RW: queue ready flag (read-write)
l4_uint16_t driver_notify_index
 W: Event index to be used for device notifications (device to driver)
l4_uint64_t desc_addr
 W: address of descriptor table.
l4_uint64_t avail_addr
 W: address of available ring.
l4_uint64_t used_addr
 W: address of used ring.
l4_uint16_t device_notify_index
 R: Event index to be used by the driver (driver to device)

Detailed Description

Queue configuration entry.

An array of such entries is available at the l4virtio_config_hdr_t::queues_offset in the config data space.

Consistency rules for the queue config are:

  • A driver might read num_max at any time.
  • A driver must write to num, desc_addr, avail_addr, and used_addr only when ready is zero (0). Values in these fields are validated and used by the device only after successfully setting ready to one (1), either by the IPC or by L4VIRTIO_CMD_CFG_QUEUE.
  • The value of device_notify_index is valid only when ready is one.
  • The driver might write to device_notify_index at any time, however the change is guaranteed to take effect after a successful L4VIRTIO_CMD_CFG_QUEUE or after a config_queue IPC. Note, the change might also have immediate effect, depending on the device implementation.

Definition at line 208 of file virtio.h.

The documentation for this struct was generated from the following file: