From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Ahern Subject: Re: [RFC PATCH net-next 04/19] ipv6: Prepare to handle multiple netdev events Date: Tue, 2 Jan 2018 09:29:42 -0700 Message-ID: <4e8d1692-7722-cd04-11fa-55be08368de7@gmail.com> References: <20171231161513.25785-1-idosch@mellanox.com> <20171231161513.25785-5-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, mlxsw@mellanox.com To: Ido Schimmel , netdev@vger.kernel.org Return-path: Received: from mail-pf0-f193.google.com ([209.85.192.193]:40795 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751095AbeABQ3o (ORCPT ); Tue, 2 Jan 2018 11:29:44 -0500 Received: by mail-pf0-f193.google.com with SMTP id v26so25825165pfl.7 for ; Tue, 02 Jan 2018 08:29:44 -0800 (PST) In-Reply-To: <20171231161513.25785-5-idosch@mellanox.com> Content-Language: en-US Sender: netdev-owner@vger.kernel.org List-ID: On 12/31/17 9:14 AM, Ido Schimmel wrote: > To make IPv6 more in line with IPv4 we need to be able to respond > differently to different netdev events. For example, when a netdev is > unregistered all the routes using it as their nexthop device should be > flushed, whereas when the netdev's carrier changes only the 'linkdown' > flag should be toggled. > > Currently, this is not possible, as the function that traverses the > routing tables is not aware of the triggering event. > > Propagate the triggering event down, so that it could be used in later > patches. > > Signed-off-by: Ido Schimmel > --- > include/net/ip6_route.h | 1 + > net/ipv6/addrconf.c | 4 ++-- > net/ipv6/route.c | 35 ++++++++++++++++++++--------------- > 3 files changed, 23 insertions(+), 17 deletions(-) > > diff --git a/include/net/ip6_route.h b/include/net/ip6_route.h > index caad39198c2a..8205402ff3dc 100644 > --- a/include/net/ip6_route.h > +++ b/include/net/ip6_route.h rt6_ifdown is done with this change, so the declaration of rt6_ifdown can be removed from this file as well. > @@ -170,6 +170,7 @@ void rt6_mtu_change(struct net_device *dev, unsigned int mtu); > void rt6_remove_prefsrc(struct inet6_ifaddr *ifp); > void rt6_clean_tohost(struct net *net, struct in6_addr *gateway); > void rt6_sync_up(struct net_device *dev, unsigned int nh_flags); > +void rt6_disable_ip(struct net_device *dev, unsigned long event); > > static inline const struct rt6_info *skb_rt6_info(const struct sk_buff *skb) > {