summaryrefslogtreecommitdiffstats
path: root/usr.sbin/bhyve/virtio.c
diff options
context:
space:
mode:
authorgrehan <grehan@FreeBSD.org>2014-09-16 19:08:54 +0000
committergrehan <grehan@FreeBSD.org>2014-09-16 19:08:54 +0000
commit71412b55f11f0c170fc2e444bcb57ed51cda7378 (patch)
treeec0fc4ebfa43233e3bb88a5fa8d872e7ddc1ea51 /usr.sbin/bhyve/virtio.c
parenta60923d3099b894f21a7bdd59eeebcce279b9493 (diff)
downloadFreeBSD-src-71412b55f11f0c170fc2e444bcb57ed51cda7378.zip
FreeBSD-src-71412b55f11f0c170fc2e444bcb57ed51cda7378.tar.gz
MFC virtio-net changes.
Re-tested with NetBSD/amd64 5.2.2, 6.1.4 and 7-beta. r271299: Add a callback to be notified about negotiated features. r271338: Allow vtnet operation without merged rx buffers. NetBSD's virtio-net implementation doesn't negotiate the merged rx-buffers feature. To support this, check to see if the feature was negotiated, and then adjust the operation of the receive path accordingly by using a larger iovec, and a smaller rx header. In addition, ignore writes to the (read-only) status byte. Approved by: re (glebius) Obtained from: Vincenzo Maffione, Universita` di Pisa (r271299)
Diffstat (limited to 'usr.sbin/bhyve/virtio.c')
-rw-r--r--usr.sbin/bhyve/virtio.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/usr.sbin/bhyve/virtio.c b/usr.sbin/bhyve/virtio.c
index 1f27300..9581fb0 100644
--- a/usr.sbin/bhyve/virtio.c
+++ b/usr.sbin/bhyve/virtio.c
@@ -694,6 +694,9 @@ bad:
switch (offset) {
case VTCFG_R_GUESTCAP:
vs->vs_negotiated_caps = value & vc->vc_hv_caps;
+ if (vc->vc_apply_features)
+ (*vc->vc_apply_features)(DEV_SOFTC(vs),
+ vs->vs_negotiated_caps);
break;
case VTCFG_R_PFN:
if (vs->vs_curq >= vc->vc_nvq)
OpenPOWER on IntegriCloud