From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefano Brivio Subject: Re: [PATCH v2] vxlan: restore dev->mtu setting based on lower device Date: Thu, 14 Dec 2017 19:27:13 +0100 Message-ID: <20171214192713.2916ff94@elisabeth> References: <1513272000-30848-1-git-send-email-alexey.kodanev@oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, Matthias Schiffer , David Miller , Junhan Yan , Jiri Benc , Hangbin Liu To: Alexey Kodanev Return-path: Received: from mx1.redhat.com ([209.132.183.28]:49020 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753722AbdLNS1X (ORCPT ); Thu, 14 Dec 2017 13:27:23 -0500 In-Reply-To: <1513272000-30848-1-git-send-email-alexey.kodanev@oracle.com> Sender: netdev-owner@vger.kernel.org List-ID: On Thu, 14 Dec 2017 20:20:00 +0300 Alexey Kodanev wrote: > Stefano Brivio says: > 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. > > This patch restores the previous behaviour on newlink operation. Since > max_mtu can be negative and we update dev->mtu directly, also check it > for valid minimum. > > Reported-by: Junhan Yan > Fixes: a985343ba906 ("vxlan: refactor verification and application of configuration") > Signed-off-by: Alexey Kodanev Thanks for re-posting this. Acked-by: Stefano Brivio Or even (but I don't know what's the current netdev practice for these particular cases): Signed-off-by: Stefano Brivio -- Stefano