vio_iov

Structure for converting a virtqueue descriptor list into an iov_t array

Synopsis:

#include <qvm/vio.h>
struct vio_iov {
    iov_t *vi_iov;
    struct __iovec64 *vi_paddrs;
    int vi_iov_len;
    int vi_reserved;
    vio_iov_flags_t vi_flags;
    unsigned vi_hdr_len;
    int vi_count;
    int vi_payload;
    iov_postmap_elem_t *vi_is_postmap;
};

Data:

iov_t* vi_iov
The actual I/O vector.
struct __iovec64* vi_paddrs
The physical addresses, if requested.
int vi_iov_len
The size of the array allocated in vi_iov.
int vi_reserved
The number of entries to reserve for the caller's use.
vio_iov_flags_t vi_flags
A VVF_* value that specifies whether a host-physical address is required.
unsigned vi_hdr_len
The size of the expected header.
int vi_count
The number of entries mapped in vi_iov.
int vi_payload
The index at which the payload starts.
iov_postmap_elem_t* vi_is_postmap
An array that stores a mmap() status for each vi_iov entry.

Description:

The vio_iov data type is used for converting a virtqueue descriptor list into an iov_t array. The vdev will likely re-use a vio_iov structure for multiple calls to vio_get_iov().

The vi_hdr_len member is usually expected to be constant through the life of the current structure. It is usually best to set its value immediately after initially zeroing the structure.

Page updated: