From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from shards.monkeyblade.net ([184.105.139.130]:45912 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750941AbeBZTRP (ORCPT ); Mon, 26 Feb 2018 14:17:15 -0500 Date: Mon, 26 Feb 2018 14:17:13 -0500 (EST) Message-Id: <20180226.141713.1695207134632325977.davem@davemloft.net> To: dsahern@gmail.com Cc: netdev@vger.kernel.org, idosch@idosch.org, roopa@cumulusnetworks.com, eric.dumazet@gmail.com, weiwan@google.com, kafai@fb.com, yoshfuji@linux-ipv6.org Subject: Re: [PATCH RFC net-next 08/20] net/ipv6: Defer initialization of dst to data path From: David Miller In-Reply-To: <20180225194730.30063-9-dsahern@gmail.com> References: <20180225194730.30063-1-dsahern@gmail.com> <20180225194730.30063-9-dsahern@gmail.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: netdev-owner@vger.kernel.org List-ID: From: David Ahern Date: Sun, 25 Feb 2018 11:47:18 -0800 > +static void ip6_rt_init_dst(struct rt6_info *rt, struct rt6_info *ort) > +{ ... > + rt->dst.error = 0; > + rt->dst.output = ip6_output; ... > @@ -930,14 +999,12 @@ static void rt6_set_from(struct rt6_info *rt, struct rt6_info *from) > > static void ip6_rt_copy_init(struct rt6_info *rt, struct rt6_info *ort) > { > - rt->dst.input = ort->dst.input; > - rt->dst.output = ort->dst.output; > + ip6_rt_init_dst(rt, ort); > + > rt->rt6i_dst = ort->rt6i_dst; > - rt->dst.error = ort->dst.error; > rt->rt6i_idev = ort->rt6i_idev; > if (rt->rt6i_idev) > in6_dev_hold(rt->rt6i_idev); > - rt->dst.lastuse = jiffies; > rt->rt6i_gateway = ort->fib6_nh.nh_gw; > rt->rt6i_flags = ort->rt6i_flags; > rt6_set_from(rt, ort); This seems to change behavior. In the old code, the dst error value is propagated from 'ort' into 'rt'. Here you set it to zero and that's it. Is it set somewhere else? I don't think you can assume that all routes that go via this copy path are not reject routes or other kinds that need the error code set, if that is what you were thinking. Thanks.