On Tue, Oct 15, 2019 at 7:45 AM David Ahern <dsah...@gmail.com> wrote:
>
> On 10/14/19 1:26 PM, Martin Lau wrote:
> >
> > AFAICT, even for the route that are affected by 
> > fib6_update_sernum_upto_root(),
> > I don't see the RTF_PCPU route is re-created.  v6 sk does
> > dst_check() => re-lookup the fib6 =>
> > found the same RTF_PCPU (but does not re-create it) =>
> > update the sk with new cookie in ip6_dst_store()
> >
Hmm... That is a good point. Why does v4 need to recreate the dst
cache even though the route itself is not changed?
Now that I think about it, I agree with Martin's previous comment: it
probably is because v4 code does not cache rt->rt_genid into the
socket and every user of the rt is sharing the same rt_genid stored in
the route itself.

>
> That's fine. The pcpu cache is per nexthop (fib6_nh) for a specific
> gateway/device.
>
> The invalidate forces another lookup for the intended destination after
> the change to the fib. If the lookup resolves to the same fib entry and
> nexthop, then re-using the same cached dst/rt6_info is ok.

Reply via email to