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;
    unsigned vi_flags;
    unsigned vi_hdr_len;
    int vi_count;
    int vi_payload;
} ;

Data:

iov_t* vi_iov
Actual I/O vector.
struct __iovec64* vi_paddrs
Physical addresses, if requested.
int vi_iov_len
Size of allocated array in vi_iov.
int vi_reserved
Number of entries to reserve for the caller's use.
unsigned vi_flags
vio_iov_flags values.
unsigned vi_hdr_len
Size of the expected header.
int vi_count
Number of entries mapped in vi_iov.
int vi_payload
Index at which payload starts.

Library:

Provided by qvm; no external library is required.

Description:

The vdev will likely re-use the vio_iov structure for multiple calls to vio_get_iov().

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