From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Ahern Subject: Re: [PATCH net-next 01/18] ipv6: Remove redundant route flushing during namespace dismantle Date: Sun, 7 Jan 2018 09:53:00 -0700 Message-ID: <4d96d0d3-283c-ffc7-f248-ce387aa0b586@gmail.com> References: <20180107104518.31693-1-idosch@mellanox.com> <20180107104518.31693-2-idosch@mellanox.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: davem@davemloft.net, roopa@cumulusnetworks.com, nicolas.dichtel@6wind.com, weiwan@google.com, kafai@fb.com, yoshfuji@linux-ipv6.org, mlxsw@mellanox.com To: Ido Schimmel , netdev@vger.kernel.org Return-path: Received: from mail-pf0-f194.google.com ([209.85.192.194]:40888 "EHLO mail-pf0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753897AbeAGQxJ (ORCPT ); Sun, 7 Jan 2018 11:53:09 -0500 Received: by mail-pf0-f194.google.com with SMTP id v26so4293756pfl.7 for ; Sun, 07 Jan 2018 08:53:09 -0800 (PST) In-Reply-To: <20180107104518.31693-2-idosch@mellanox.com> Content-Language: en-US Sender: netdev-owner@vger.kernel.org List-ID: On 1/7/18 3:45 AM, Ido Schimmel wrote: > By the time fib6_net_exit() is executed all the netdevs in the namespace > have been either unregistered or pushed back to the default namespace. > That is because pernet subsys operations are always ordered before > pernet device operations and therefore invoked after them during > namespace dismantle. > > Thus, all the routing tables in the namespace are empty by the time > fib6_net_exit() is invoked and the call to rt6_ifdown() can be removed. > > This allows us to simplify the condition in fib6_ifdown() as it's only > ever called with an actual netdev. > > Signed-off-by: Ido Schimmel > --- > net/ipv6/ip6_fib.c | 1 - > net/ipv6/route.c | 8 +++----- > 2 files changed, 3 insertions(+), 6 deletions(-) > Acked-by: David Ahern