From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Ahern Subject: Re: [PATCH net v2 1/2] net: ipv4: update fnhe_pmtu when first hop's MTU changes Date: Wed, 10 Oct 2018 09:27:55 -0600 Message-ID: <6c6bbe16-36de-1a67-600d-1239c4598826@gmail.com> References: <9db7a0c06a26f2c152efd08e22b1d2ef80e977c1.1539073548.git.sd@queasysnail.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: Stefano Brivio To: Sabrina Dubroca , netdev@vger.kernel.org Return-path: Received: from mail-pg1-f193.google.com ([209.85.215.193]:35385 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726479AbeJJWuj (ORCPT ); Wed, 10 Oct 2018 18:50:39 -0400 Received: by mail-pg1-f193.google.com with SMTP id v133-v6so2691416pgb.2 for ; Wed, 10 Oct 2018 08:27:59 -0700 (PDT) In-Reply-To: <9db7a0c06a26f2c152efd08e22b1d2ef80e977c1.1539073548.git.sd@queasysnail.net> Content-Language: en-US Sender: netdev-owner@vger.kernel.org List-ID: On 10/9/18 9:48 AM, Sabrina Dubroca wrote: > Since commit 5aad1de5ea2c ("ipv4: use separate genid for next hop > exceptions"), exceptions get deprecated separately from cached > routes. In particular, administrative changes don't clear PMTU anymore. > > As Stefano described in commit e9fa1495d738 ("ipv6: Reflect MTU changes > on PMTU of exceptions for MTU-less routes"), the PMTU discovered before > the local MTU change can become stale: > - if the local MTU is now lower than the PMTU, that PMTU is now > incorrect > - if the local MTU was the lowest value in the path, and is increased, > we might discover a higher PMTU > > Similarly to what commit e9fa1495d738 did for IPv6, update PMTU in those > cases. > > If the exception was locked, the discovered PMTU was smaller than the > minimal accepted PMTU. In that case, if the new local MTU is smaller > than the current PMTU, let PMTU discovery figure out if locking of the > exception is still needed. > > To do this, we need to know the old link MTU in the NETDEV_CHANGEMTU > notifier. By the time the notifier is called, dev->mtu has been > changed. This patch adds the old MTU as additional information in the > notifier structure, and a new call_netdevice_notifiers_u32() function. > > Fixes: 5aad1de5ea2c ("ipv4: use separate genid for next hop exceptions") > Signed-off-by: Sabrina Dubroca > Reviewed-by: Stefano Brivio > --- > v2: > - s/u32/mtu/ in netdev_notifier_info_ext and call_netdevice_notifiers_ > helper, suggested by David Ahern > - don't EXPORT_SYMBOL the helper, it's only used in net/core/dev.c > - fix typo in commit message > - fix kerneldoc comment, spotted by kbuild bot > > include/linux/netdevice.h | 7 ++++++ > include/net/ip_fib.h | 1 + > net/core/dev.c | 28 ++++++++++++++++++++-- > net/ipv4/fib_frontend.c | 12 ++++++---- > net/ipv4/fib_semantics.c | 50 +++++++++++++++++++++++++++++++++++++++ > 5 files changed, 92 insertions(+), 6 deletions(-) Reviewed-by: David Ahern