On 11/22/2016 03:18 PM, Michael S. Tsirkin wrote:
On Tue, Nov 22, 2016 at 01:11:50PM +0100, Maxime Coquelin wrote:


On 11/21/2016 05:48 PM, Michael S. Tsirkin wrote:
@@ -1695,6 +1706,7 @@ static void virtio_net_set_config_size(VirtIONet *n, 
uint64_t host_features)
 {
     int i, config_size = 0;
     virtio_add_feature(&host_features, VIRTIO_NET_F_MAC);
+    virtio_add_feature(&host_features, VIRTIO_NET_F_MTU);
     for (i = 0; feature_sizes[i].flags != 0; i++) {
         if (host_features & feature_sizes[i].flags) {
             config_size = MAX(feature_sizes[i].end, config_size);
@@ -1922,6 +1934,8 @@ static Property virtio_net_properties[] = {
     DEFINE_PROP_STRING("tx", VirtIONet, net_conf.tx),
     DEFINE_PROP_UINT16("rx_queue_size", VirtIONet, net_conf.rx_queue_size,
                        VIRTIO_NET_RX_QUEUE_DEFAULT_SIZE),
+    DEFINE_PROP_BIT("host_mtu", VirtIONet, host_features,
+                    VIRTIO_NET_F_MTU, true),
     DEFINE_PROP_END_OF_LIST(),
 };


Cross version migration support is missing here.
Sorry, I'm not sure to understand what you expect here.
Could you please provide more details?
feature bits must be consistent for a given machine type.
So you can't add them unconditionally for old machine
types, they must look the same as they looked when
we put that machine type out.

Ok, thanks for clarifying.
IIUC, idea is to let it enabled by default, and add entries in
HW_COMPAT_2_x macros to disable it in all previous versions?

Thanks,
Maxime

I suspect you should keep it disabled by default,
set it when user specifies the mtu.

Yes, that make sense.

Thanks,
Maxime

Reply via email to