From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Ahern Subject: Re: [PATCH net-next 00/18] ipv6: Align nexthop behaviour with IPv4 Date: Sun, 7 Jan 2018 10:20:11 -0700 Message-ID: <5c10b955-161d-9cb1-edd1-7a49d88e46ad@gmail.com> References: <20180107104518.31693-1-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-f196.google.com ([209.85.192.196]:41208 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754183AbeAGRUO (ORCPT ); Sun, 7 Jan 2018 12:20:14 -0500 Received: by mail-pf0-f196.google.com with SMTP id j3so482285pfh.8 for ; Sun, 07 Jan 2018 09:20:14 -0800 (PST) In-Reply-To: <20180107104518.31693-1-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: > This set tries to eliminate some differences between IPv4's and IPv6's > treatment of nexthops. These differences are most likely a side effect > of IPv6's data structures (specifically 'rt6_info') that incorporate > both the route and the nexthop and the late addition of ECMP support in > commit 51ebd3181572 ("ipv6: add support of equal cost multipath > (ECMP)"). > > IPv4 and IPv6 do not react the same to certain netdev events. For > example, upon carrier change affected IPv4 nexthops are marked using the > RTNH_F_LINKDOWN flag and the nexthop group is rebalanced accordingly. > IPv6 on the other hand, does nothing which forces us to perform a > carrier check during route lookup and dump. This makes it difficult to > introduce features such as non-equal-cost multipath that are built on > top of this set [1]. > > In addition, when a netdev is put administratively down IPv4 nexthops > are marked using the RTNH_F_DEAD flag, whereas IPv6 simply flushes all > the routes using these nexthops. To be consistent with IPv4, multipath > routes should only be flushed when all nexthops in the group are > considered dead. > > The first 12 patches introduce non-functional changes that store the > RTNH_F_DEAD and RTNH_F_LINKDOWN flags in IPv6 routes based on netdev > events, in a similar fashion to IPv4. This allows us to remove the > carrier check performed during route lookup and dump. > > The next three patches make sure we only flush a multipath route when > all of its nexthops are dead. > > Last three patches add test cases for IPv4/IPv6 FIB. These verify that > both address families react similarly to netdev events. > > Finally, this series also serves as a good first step towards David > Ahern's goal of treating nexthops as standalone objects [2], as it makes > the code more in line with IPv4 where the nexthop and the nexthop group > are separate objects from the route itself. > > 1. https://github.com/idosch/linux/tree/ipv6-nexthops > 2. http://vger.kernel.org/netconf2017_files/nexthop-objects.pdf > Thanks for working on this - and creating the test cases. One of many follow on changes that would be beneficial is to remove the idev dereference in the hot path to check the ignore_routes_with_linkdown sysctl.