From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48464) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c9D4h-0003Mx-Ts for qemu-devel@nongnu.org; Tue, 22 Nov 2016 10:33:36 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c9D4d-0007dj-Uj for qemu-devel@nongnu.org; Tue, 22 Nov 2016 10:33:35 -0500 Received: from mx1.redhat.com ([209.132.183.28]:50286) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1c9D4d-0007cV-Od for qemu-devel@nongnu.org; Tue, 22 Nov 2016 10:33:31 -0500 References: <1479419887-10515-1-git-send-email-maxime.coquelin@redhat.com> <1479419887-10515-4-git-send-email-maxime.coquelin@redhat.com> <20161118003558-mutt-send-email-mst@kernel.org> <3120fbd4-99eb-a9f2-a2b3-a5f686dbc7ee@redhat.com> <20161121184537-mutt-send-email-mst@kernel.org> <9e43d106-b2b8-2e89-2f2e-600e0ca48900@redhat.com> <20161122161805-mutt-send-email-mst@kernel.org> From: Maxime Coquelin Message-ID: Date: Tue, 22 Nov 2016 16:33:26 +0100 MIME-Version: 1.0 In-Reply-To: <20161122161805-mutt-send-email-mst@kernel.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC v2 3/3] virtio-net: Add MTU feature support List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: aconole@redhat.com, pbonzini@redhat.com, qemu-devel@nongnu.org, jasowang@redhat.com, yuanhan.liu@linux.intel.com 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