]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
bhyve: change vq_getchain to return iovecs in both directions
authorKa Ho Ng <khng@FreeBSD.org>
Tue, 30 Mar 2021 08:43:24 +0000 (16:43 +0800)
committerKa Ho Ng <khng@FreeBSD.org>
Tue, 30 Mar 2021 08:44:07 +0000 (16:44 +0800)
commitb013912772ec9e135b52aaec5f70bc92a191ebdb
tree5f2bb06e956d27dcaca50252ae42afe50ce171fc
parent51cc31088bf4d23a6ad0bfe8851adaa049d750fc
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
MFC after: 3 weeks
Reviewed by: afedorov
Approved by: philip (mentor)
Differential Revision: https://reviews.freebsd.org/D29433
usr.sbin/bhyve/pci_virtio_9p.c
usr.sbin/bhyve/pci_virtio_block.c
usr.sbin/bhyve/pci_virtio_console.c
usr.sbin/bhyve/pci_virtio_net.c
usr.sbin/bhyve/pci_virtio_rnd.c
usr.sbin/bhyve/pci_virtio_scsi.c
usr.sbin/bhyve/virtio.c
usr.sbin/bhyve/virtio.h