提交 dc14a397 编写于 作者: D David L Stevens 提交者: Aurelien Jarno

vhost: fix features ack

vhost driver in qemu didn't ack features, and this happens
to work because we don't really require any features. However,
it's better not to rely on this. This patch passes features to
vhost as guest acks them.
Signed-off-by: NDavid L Stevens <dlstevens@us.ibm.com>
Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
Signed-off-by: NAurelien Jarno <aurelien@aurel32.net>
上级 5ba9e952
...@@ -219,6 +219,14 @@ static void virtio_net_set_features(VirtIODevice *vdev, uint32_t features) ...@@ -219,6 +219,14 @@ static void virtio_net_set_features(VirtIODevice *vdev, uint32_t features)
(features >> VIRTIO_NET_F_GUEST_ECN) & 1, (features >> VIRTIO_NET_F_GUEST_ECN) & 1,
(features >> VIRTIO_NET_F_GUEST_UFO) & 1); (features >> VIRTIO_NET_F_GUEST_UFO) & 1);
} }
if (!n->nic->nc.peer ||
n->nic->nc.peer->info->type != NET_CLIENT_TYPE_TAP) {
return;
}
if (!tap_get_vhost_net(n->nic->nc.peer)) {
return;
}
return vhost_net_ack_features(tap_get_vhost_net(n->nic->nc.peer), features);
} }
static int virtio_net_handle_rx_mode(VirtIONet *n, uint8_t cmd, static int virtio_net_handle_rx_mode(VirtIONet *n, uint8_t cmd,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册