[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAC15z3iWRx3XUhRD_ZNz_KdJx=ezi4C3f29iV9yssxwfLaKTYw@mail.gmail.com>
Date: Thu, 24 Mar 2016 14:38:14 -0700
From: Wei Wang <tracywwnj@...il.com>
To: Cong Wang <xiyou.wangcong@...il.com>
Cc: Linux Kernel Network Developers <netdev@...r.kernel.org>,
Wei Wang <weiwan@...gle.com>,
Steffen Klassert <steffen.klassert@...unet.com>,
Martin KaFai Lau <kafai@...com>,
Hannes Frederic Sowa <hannes@...essinduktion.org>,
Julian Anastasov <ja@....bg>,
Eric Dumazet <eric.dumazet@...il.com>
Subject: Re: [RFT Patch net 1/2] ipv6: invalidate the socket cached route on
pmtu events if possible
> + if (new)
> + ip6_dst_store(sk, dst, NULL, NULL);
> +
I read through the code for ip6_dst_store(), the last 2 params are for
sk->daddr_cache and sk->saddr_cache.
Those are examined and used in ip6_sk_dst_lookup_flow(). If those 2
(mostly only check sk->daddr_cache) are valid, it will try to use
sk->sk_dst_cache and avoid ip6_route_output() call. If we put it as
NULL, it is guaranteed to not pass the validation check and do
ip6_route_output() lookup.
So we probably don't want to use NULL but something similar as used in
udpv6_sendmsg() like the following?
ip6_dst_store(sk, dst,
ipv6_addr_equal(&fl6.daddr, &sk->sk_v6_daddr) ?
&sk->sk_v6_daddr : NULL,
#ifdef CONFIG_IPV6_SUBTREES
ipv6_addr_equal(&fl6.saddr, &np->saddr) ?
&np->saddr :
#endif
NULL);
Thanks.
Wei
Powered by blists - more mailing lists