Re: [Qemu-devel] [RFC 4/4] virtio-net: Add MTU feature support

2016-09-15 Thread Maxime Coquelin
On 09/16/2016 12:16 AM, Paolo Bonzini wrote: On 06/09/2016 18:11, Maxime Coquelin wrote: VirtIONet *n = VIRTIO_NET(vdev); struct virtio_net_config netcfg; +if (virtio_vdev_has_feature(vdev, VIRTIO_NET_F_MTU)) { +virtio_stw_p(vdev, &netcfg.mtu, n->mtu); +} This wr

Re: [Qemu-devel] [RFC 4/4] virtio-net: Add MTU feature support

2016-09-15 Thread Paolo Bonzini
On 06/09/2016 18:11, Maxime Coquelin wrote: > VirtIONet *n = VIRTIO_NET(vdev); > struct virtio_net_config netcfg; > > +if (virtio_vdev_has_feature(vdev, VIRTIO_NET_F_MTU)) { > +virtio_stw_p(vdev, &netcfg.mtu, n->mtu); > +} This write needs to be unconditional, otherwi

[Qemu-devel] [RFC 4/4] virtio-net: Add MTU feature support

2016-09-06 Thread Maxime Coquelin
If negociated, virtio-net gets the advised MTU from vhost-net, and provides it to the guest through a new virtio_net_config entry. Cc: Michael S. Tsirkin Cc: Aaron Conole --- hw/net/virtio-net.c| 16 include/hw/virtio/virtio-net.h | 1 + 2 files changed, 17 inserti