Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754784AbbEORmD (ORCPT ); Fri, 15 May 2015 13:42:03 -0400 Received: from cantor2.suse.de ([195.135.220.15]:45037 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753117AbbEORmB (ORCPT ); Fri, 15 May 2015 13:42:01 -0400 Date: Fri, 15 May 2015 19:41:56 +0200 From: Michal Kubecek To: David Miller Cc: nicolas.dichtel@6wind.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, kuznet@ms2.inr.ac.ru, jmorris@namei.org, yoshfuji@linux-ipv6.org, kaber@trash.net, roopa@cumulusnetworks.com Subject: Re: [PATCH net v2 2/2] ipv6: fix ECMP route replacement Message-ID: <20150515174156.GB32190@unicorn.suse.cz> References: <5554F073.4080501@6wind.com> <20150514214907.GA20301@lion> <20150515085151.GA32190@unicorn.suse.cz> <20150515.121212.20831661856896659.davem@davemloft.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150515.121212.20831661856896659.davem@davemloft.net> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1355 Lines: 29 On Fri, May 15, 2015 at 12:12:12PM -0400, David Miller wrote: > From: Michal Kubecek > Date: Fri, 15 May 2015 10:51:52 +0200 > > > But I still rather feel like replacing all existing matching routes > > would better reflect what I expect "replace" to do. > > What does IPV4 do? Apparently there is some problem too as on 4.1-rc3, "ip route replace" seems to always remove first matching IPv4 route (multipath or not) but doesn't add the new one unless there was no matching route before calling the command (then it behaves like "add"). I also tried 3.0 and it replaces first matching route, whether it was multipath or not and whether the new one is multipath or not. This behaviour cannot be directly transfered to IPv6 as there are no real IPv6 multipath routes; instead, the set of all routes under a node with the same metric satisfying rt6_qualify_for_ecmp() is handled as a multipath route (so that there can be only one). The semantics I suggested in my previous mail might be a reasonable approximation. Michal Kubecek -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/