mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
net/ipv6: separate handling of FIB entries from dst based routes
Last step before flipping the data type for FIB entries: - use fib6_info_alloc to create FIB entries in ip6_route_info_create and addrconf_dst_alloc - use fib6_info_release in place of dst_release, ip6_rt_put and rt6_release - remove the dst_hold before calling __ip6_ins_rt or ip6_del_rt - when purging routes, drop per-cpu routes - replace inc and dec of rt6i_ref with fib6_info_hold and fib6_info_release - use rt->from since it points to the FIB entry - drop references to exception bucket, fib6_metrics and per-cpu from dst entries (those are relevant for fib entries only) Signed-off-by: David Ahern <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
a64efe142f
commit
93531c6743
8 changed files with 115 additions and 152 deletions
|
|
@ -314,9 +314,7 @@ static inline u32 rt6_get_cookie(const struct rt6_info *rt)
|
|||
|
||||
if (rt->rt6i_flags & RTF_PCPU ||
|
||||
(unlikely(!list_empty(&rt->rt6i_uncached)) && rt->from))
|
||||
rt = rt->from;
|
||||
|
||||
rt6_get_cookie_safe(rt, &cookie);
|
||||
rt6_get_cookie_safe(rt->from, &cookie);
|
||||
|
||||
return cookie;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -114,8 +114,7 @@ static inline int ip6_route_get_saddr(struct net *net, struct rt6_info *rt,
|
|||
unsigned int prefs,
|
||||
struct in6_addr *saddr)
|
||||
{
|
||||
struct inet6_dev *idev =
|
||||
rt ? ip6_dst_idev((struct dst_entry *)rt) : NULL;
|
||||
struct inet6_dev *idev = rt ? rt->rt6i_idev : NULL;
|
||||
int err = 0;
|
||||
|
||||
if (rt && rt->rt6i_prefsrc.plen)
|
||||
|
|
|
|||
Loading…
Reference in a new issue