HomeFreeBSD

bhyve: change vq_getchain to return iovecs in both directions

Description

bhyve: change vq_getchain to return iovecs in both directions

The old prototype requires callers to inspect flags of each descriptors
to get the starting position of host-writable iovecs.

vq_getchain() is changed to return a virtio request with the number of
host-readable iovecs and host-writable iovecs instead. Callers can avoid
boilerplate code of getting the start offset of host-writable iovecs.

Sponsored by: The FreeBSD Foundation
Reviewed by: afedorov
Approved by: philip (mentor)
Differential Revision: https://reviews.freebsd.org/D29433

(cherry picked from commit b013912772ec9e135b52aaec5f70bc92a191ebdb)

Details

Provenance
khngAuthored on Mar 30 2021, 8:43 AM
Reviewer
afedorov
Differential Revision
D29433: bhyve: change vq_getchain to return iovecs in both directions
Parents
rGddf1b5ac761e: bhyve: virtio shares definitions between sys/dev/virtio
Branches
Unknown
Tags
Unknown