From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55317) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c9Y8Z-0007fX-6N for qemu-devel@nongnu.org; Wed, 23 Nov 2016 09:03:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c9Y8Y-0003QZ-83 for qemu-devel@nongnu.org; Wed, 23 Nov 2016 09:02:59 -0500 Received: from mx1.redhat.com ([209.132.183.28]:36030) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1c9Y8X-0003Pb-W7 for qemu-devel@nongnu.org; Wed, 23 Nov 2016 09:02:58 -0500 From: Aaron Conole References: <0105e7e3-6003-04c8-483d-30ed1208e5fc@redhat.com> <20161121182040-mutt-send-email-mst@kernel.org> <38ee6d4c-ff87-d8cc-1a1d-f45b948dcdb3@redhat.com> <796ff318-c3e9-e885-f345-7f6e48d3bb8b@redhat.com> <20161122163413-mutt-send-email-mst@kernel.org> <2d971a18-4253-1bac-4098-6879c9ccc01f@redhat.com> <20161122223744-mutt-send-email-mst@kernel.org> <5cbd7441-a1d1-7e34-56ff-33c2305736d4@redhat.com> <20161123062418-mutt-send-email-mst@kernel.org> Date: Wed, 23 Nov 2016 09:02:53 -0500 In-Reply-To: <20161123062418-mutt-send-email-mst@kernel.org> (Michael S. Tsirkin's message of "Wed, 23 Nov 2016 06:26:41 +0200") Message-ID: MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [RFC v2 0/3] virtio-net: Add support to MTU feature List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: Jason Wang , Maxime Coquelin , yuanhan.liu@linux.intel.com, pbonzini@redhat.com, qemu-devel@nongnu.org "Michael S. Tsirkin" writes: > On Wed, Nov 23, 2016 at 11:42:52AM +0800, Jason Wang wrote: >> > > > > > > > Seems to me like an easy way to get out of sync. >> > > > > > >> > > > > >If we send it to the backend, that has a chance to check >> > > > > >mtu and disconnect on error. >> > > > >> > > >For vhost-user backend, we can send it the MTU value with a >> > > >vhost-user protocol feature. >> > > > >> > > >For tun/macvtap, how do you do without adding a new ioctl ? >> > Have management configure same mtu on the backend and in qemu. >> > >> > >> >> Then why not do same for vhost-user (instead of using two different >> methods)? > > That's what I'm saying. If backend supports that, we can also > check the mtu in some way to make sure it matches. I'm not sure why we need a new ioctl (or an ioctl at all - netlink supports all of this)? ex: 08:58:34 aconole {fast-datapath-beta-rhel-7} ~/rhpkg/openvswitch$ sudo ip tuntap add dev tap0 mode tap [sudo] password for aconole: 08:58:40 aconole {fast-datapath-beta-rhel-7} ~/rhpkg/openvswitch$ ip l 1: lo: mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 ... 7: tap0: mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000 link/ether 46:e0:fc:83:54:1c brd ff:ff:ff:ff:ff:ff 08:58:51 aconole {fast-datapath-beta-rhel-7} ~/rhpkg/openvswitch$ sudo ip l set tap0 mtu 8000 08:58:54 aconole {fast-datapath-beta-rhel-7} ~/rhpkg/openvswitch$ ip l 1: lo: mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 ... 7: tap0: mtu 8000 qdisc noop state DOWN mode DEFAULT group default qlen 1000 link/ether 46:e0:fc:83:54:1c brd ff:ff:ff:ff:ff:ff So, at least with iproute2, we can already read and write using the netlink interface for tuntap devices. I haven't played with macvtap, but I think it's similar support - just do a netlink query, get the configured MTU, and advertise it. I might be missing something though - I'm a simple guy with simple ideas. Maybe there's a cross-platform issue or something? -Aaron