From mboxrd@z Thu Jan 1 00:00:00 1970 From: Hannes Frederic Sowa Subject: Re: [PATCH] ipv6: remove the unnecessary statement in find_match() Date: Thu, 31 Oct 2013 12:57:18 +0100 Message-ID: <20131031115718.GC17210@order.stressinduktion.org> References: <5270B7AE.9020801@cn.fujitsu.com> <20131030.170837.1882918923249091614.davem@davemloft.net> <20131030211157.GA13902@order.stressinduktion.org> <20131031.002234.45924350853188128.davem@davemloft.net> <5271F263.4020800@cn.fujitsu.com> <20131031084537.GA17210@order.stressinduktion.org> <52723A84.9080308@cn.fujitsu.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: David Miller , netdev@vger.kernel.org To: Duan Jiong Return-path: Received: from order.stressinduktion.org ([87.106.68.36]:40844 "EHLO order.stressinduktion.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751817Ab3JaL5T (ORCPT ); Thu, 31 Oct 2013 07:57:19 -0400 Content-Disposition: inline In-Reply-To: <52723A84.9080308@cn.fujitsu.com> Sender: netdev-owner@vger.kernel.org List-ID: On Thu, Oct 31, 2013 at 07:09:56PM +0800, Duan Jiong wrote: > =E4=BA=8E 2013=E5=B9=B410=E6=9C=8831=E6=97=A5 16:45, Hannes Frederic = Sowa =E5=86=99=E9=81=93: > > On Thu, Oct 31, 2013 at 02:02:11PM +0800, Duan Jiong wrote: > >> =E4=BA=8E 2013=E5=B9=B410=E6=9C=8831=E6=97=A5 12:22, David Miller = =E5=86=99=E9=81=93: > >>> From: Hannes Frederic Sowa > >>> Date: Wed, 30 Oct 2013 22:11:57 +0100 > >>> > >>>> On Wed, Oct 30, 2013 at 05:08:37PM -0400, David Miller wrote: > >>>>> From: Duan Jiong > >>>>> Date: Wed, 30 Oct 2013 15:39:26 +0800 > >>>>> > >>>>>> > >>>>>> After reading the function rt6_check_neigh(), we can > >>>>>> know that the RT6_NUD_FAIL_SOFT can be returned only > >>>>>> when the IS_ENABLE(CONFIG_IPV6_ROUTER_PREF) is false. > >>>>>> so in function find_match(), there is no need to execute > >>>>>> the statement !IS_ENABLED(CONFIG_IPV6_ROUTER_PREF). > >>>>>> > >>>>>> Signed-off-by: Duan Jiong > >>>>> > >>>>> Applied to net-next, thanks. > >>>>> > >>>>> CONFIG_IPV6_ROUTER_PREF is another good candidate for Kconfig > >>>>> removal. I know we've had several bugs that only apply when > >>>>> this option is on vs. off. We're maintaining two different > >>>>> code paths, for really no good reason. > >>>> > >>>> I agree and actually thought about that yesterday. Do you think = a sysctl > >>>> is a good option? > >>> > >>> Every distribution ships with the Kconfig option on, and no sysct= l > >>> exists currently to control it. > >>> > >>> So I'd say it's not necessary at all, or at the very least let's = have > >>> someone come forward with a real rather than theoretical use case= for > >>> such a feature before adding it. > >>> > >>> Actually, if RFC 4191 has the usual language like "there SHOULD b= e > >>> an administrative mechanism to disable blah blah blah" I could > >>> be convinced to add it now. Can someone take a look? > >> > >> It seems that there is no such an administrative mechanism in RFC = 4191. > >> > >> By the way, if the sysctl is used, we are still maintaining two di= fferent > >> code paths, isn't it? so i think David's idea is good. > >=20 > > Makes life easier, no objections from me. > >=20 >=20 > Removing CONFIG_IPV6_ROUTER_PREF means that the Router Preference is = always > on, is this understanding right? If we drop support for one of the routing scoring algorithms it will be= the other one. So yes, it will always be on. > If that's is correct, i think compatibility issues will arise. For e= xample, when the > CONFIG_IPV6_ROUTER_PREF option is on, the kernel should not do round-= robin during > default router selection, but when the CONFIG_IPV6_ROUTER_PREF option= is off, the > kernel should do it. Exactly, but all people use ROUTER_PREF activated given it is enabled by default by most distributions. I also know about no best practices or IX-policies where they want a router to deliberately turned router preference support off. We can talk about doing RR in the same preference level, I'll have to d= o more research on this. But given that someone wants RR, it is better done by using ECMP routes= =2E