From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36319) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c9bZL-0004ft-Sg for qemu-devel@nongnu.org; Wed, 23 Nov 2016 12:42:52 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c9bZK-0008Py-SV for qemu-devel@nongnu.org; Wed, 23 Nov 2016 12:42:51 -0500 Received: from mx1.redhat.com ([209.132.183.28]:41626) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1c9bZK-0008OD-JJ for qemu-devel@nongnu.org; Wed, 23 Nov 2016 12:42:50 -0500 Date: Wed, 23 Nov 2016 19:42:47 +0200 From: "Michael S. Tsirkin" Message-ID: <20161123194208-mutt-send-email-mst@kernel.org> References: <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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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: Aaron Conole Cc: Jason Wang , Maxime Coquelin , yuanhan.liu@linux.intel.com, pbonzini@redhat.com, qemu-devel@nongnu.org On Wed, Nov 23, 2016 at 09:02:53AM -0500, Aaron Conole wrote: > "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 qemu is generally not running with enough priveledges to allow access to netlink.