On Thu, 1 May 2025 23:04:54 +0200 Philippe Mathieu-Daudé <phi...@linaro.org> wrote:
> 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é <phi...@linaro.org> Reviewed-by: Igor Mammedov <imamm...@redhat.com> > 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 b9ea9e824e3..353e872f677 100644 > --- a/include/hw/virtio/virtio-net.h > +++ b/include/hw/virtio/virtio-net.h > @@ -214,7 +214,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 2de037c2736..a8a43ffa242 100644 > --- a/hw/net/virtio-net.c > +++ b/hw/net/virtio-net.c > @@ -801,8 +801,7 @@ static uint64_t virtio_net_get_features(VirtIODevice > *vdev, uint64_t features, > features = vhost_net_get_features(get_vhost_net(nc->peer), features); > vdev->backend_features = features; > > - if (n->mtu_bypass_backend && > - (n->host_features & 1ULL << VIRTIO_NET_F_MTU)) { > + if (n->host_features & (1ULL << VIRTIO_NET_F_MTU)) { > features |= (1ULL << VIRTIO_NET_F_MTU); > } > > @@ -953,8 +952,7 @@ static void virtio_net_set_features(VirtIODevice *vdev, > uint64_t features) > Error *err = NULL; > int i; > > - 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)) { > features &= ~(1ULL << VIRTIO_NET_F_MTU); > } > > @@ -4121,8 +4119,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),