From: Philippe Mathieu-Daudé <[email protected]> The VirtIONet::mtu_bypass_backend boolean was only set in the hw_compat_2_9[] array, via the 'x-mtu-bypass-backend=off' property. We removed all machines using that array, lets remove that property and all the code around it.
Signed-off-by: Philippe Mathieu-Daudé <[email protected]> Message-ID: <[email protected]> Reviewed-by: Igor Mammedov <[email protected]> [thuth: Adjusted patch for latest changes in the master branch] Signed-off-by: Thomas Huth <[email protected]> --- include/hw/virtio/virtio-net.h | 1 - hw/net/virtio-net.c | 8 ++------ 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/include/hw/virtio/virtio-net.h b/include/hw/virtio/virtio-net.h index 5b8ab7bda79..371e3764282 100644 --- a/include/hw/virtio/virtio-net.h +++ b/include/hw/virtio/virtio-net.h @@ -218,7 +218,6 @@ struct VirtIONet { uint64_t saved_guest_offloads; AnnounceTimer announce_timer; bool needs_vnet_hdr_swap; - bool mtu_bypass_backend; /* primary failover device is hidden*/ bool failover_primary_hidden; bool failover; diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c index eccb48ad426..2a5d642a647 100644 --- a/hw/net/virtio-net.c +++ b/hw/net/virtio-net.c @@ -935,8 +935,7 @@ static void virtio_net_set_features(VirtIODevice *vdev, int i; virtio_features_copy(features, in_features); - if (n->mtu_bypass_backend && - !virtio_has_feature(vdev->backend_features, VIRTIO_NET_F_MTU)) { + if (!virtio_has_feature(vdev->backend_features, VIRTIO_NET_F_MTU)) { virtio_clear_feature_ex(features, VIRTIO_NET_F_MTU); } @@ -3160,8 +3159,7 @@ static void virtio_net_get_features(VirtIODevice *vdev, uint64_t *features, vhost_net_get_features_ex(get_vhost_net(nc->peer), features); virtio_features_copy(vdev->backend_features_ex, features); - if (n->mtu_bypass_backend && - (n->host_features & 1ULL << VIRTIO_NET_F_MTU)) { + if ((n->host_features & 1ULL << VIRTIO_NET_F_MTU) != 0) { virtio_add_feature_ex(features, VIRTIO_NET_F_MTU); } @@ -4251,8 +4249,6 @@ static const Property virtio_net_properties[] = { DEFINE_PROP_UINT16("tx_queue_size", VirtIONet, net_conf.tx_queue_size, VIRTIO_NET_TX_QUEUE_DEFAULT_SIZE), DEFINE_PROP_UINT16("host_mtu", VirtIONet, net_conf.mtu, 0), - DEFINE_PROP_BOOL("x-mtu-bypass-backend", VirtIONet, mtu_bypass_backend, - true), DEFINE_PROP_INT32("speed", VirtIONet, net_conf.speed, SPEED_UNKNOWN), DEFINE_PROP_STRING("duplex", VirtIONet, net_conf.duplex_str), DEFINE_PROP_BOOL("failover", VirtIONet, failover, false), -- 2.53.0
