From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: Re: [PATCH net] vxlan: Restore initial MTU setting based on lower device Date: Wed, 13 Dec 2017 15:19:48 -0800 Message-ID: <20171213151948.4e0b7b1b@xeon-e3> References: <0c6caef03156aa51673c50ebb59889fc001b74be.1513198761.git.sbrivio@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: "David S . Miller" , netdev@vger.kernel.org, Matthias Schiffer , Junhan Yan , Jiri Benc , Hangbin Liu To: Stefano Brivio Return-path: Received: from mail-pg0-f47.google.com ([74.125.83.47]:35149 "EHLO mail-pg0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751974AbdLMXTv (ORCPT ); Wed, 13 Dec 2017 18:19:51 -0500 Received: by mail-pg0-f47.google.com with SMTP id q20so2129510pgv.2 for ; Wed, 13 Dec 2017 15:19:51 -0800 (PST) In-Reply-To: <0c6caef03156aa51673c50ebb59889fc001b74be.1513198761.git.sbrivio@redhat.com> Sender: netdev-owner@vger.kernel.org List-ID: On Wed, 13 Dec 2017 23:37:00 +0100 Stefano Brivio wrote: > Commit a985343ba906 ("vxlan: refactor verification and > application of configuration") introduced a change in the > behaviour of initial MTU setting: earlier, the MTU for a link > created on top of a given lower device, without an initial MTU > specification, was set to the MTU of the lower device minus > headroom as a result of this path in vxlan_dev_configure(): > > if (!conf->mtu) > dev->mtu = lowerdev->mtu - > (use_ipv6 ? VXLAN6_HEADROOM : VXLAN_HEADROOM); > > which is now gone. Now, the initial MTU, in absence of a > configured value, is simply set by ether_setup() to ETH_DATA_LEN > (1500 bytes). > > This breaks userspace expectations in case the MTU of > the lower device is higher than 1500 bytes minus headroom. > > Restore the previous behaviour by calculating, for a new link, > the MTU from the lower device, if present, and if no value is > explicitly configured. > > Reported-by: Junhan Yan > Fixes: a985343ba906 ("vxlan: refactor verification and application of configuration") > Signed-off-by: Stefano Brivio > --- Good catch. Acked-by: Stephen Hemminger