ipv6: Complete neighbour entry removal from dst_entry.
Subsystems (4)
PATCH 13/13 ipv6: Complete neighbour entry removal from dst_entry.
Signed-off-by YOSHIFUJI Hideaki <[email protected]>
--- include/net/ip6_fib.h | 2 -- net/ipv6/route.c | 68 +++-------------------------------------------- net/ipv6/xfrm6_policy.c | 1 - 3 files changed, 3 insertions(+), 68 deletions(-)
include/net/ip6_fib.h +0 -2
@@ -89,8 +89,6 @@ struct fib6_table;struct rt6_info {struct dst_entry dst; -struct neighbour *n; -/* * Tail elements of dst_entry (__refcnt etc.) * and these elements (rarely used in hot path) are in
net/ipv6/route.c +3 -65
140 lines not on this page · raw message
net/ipv6/xfrm6_policy.c +0 -1
@@ -110,7 +110,6 @@ static int xfrm6_fill_dst(struct xfrm_dst *xdst, struct net_device *dev,/* Sheit... I remember I did this right. Apparently, * it was magically lost, so this code needs audit */ - xdst->u.rt6.n =neigh_clone (rt->n); xdst->u.rt6.rt6i_flags = rt->rt6i_flags & (RTF_ANYCAST |RTF_LOCAL ); xdst->u.rt6.rt6i_metric = rt->rt6i_metric;
Signature · 1 line
1.7.9.5
net/ipv6/route.c static void ip6_dst_ifdown(struct dst_entry *dst, struct net_device *dev, · line 347
Quoted 7 lines · YOSHIFUJI Hideaki
net/ipv6/route.c +2
-0+#if 0 if (rt->n && rt->n->dev == dev) { rt->n->dev = loopback_dev;dev_hold (loopback_dev);dev_put (dev); } +#endif
Why commenting this out instead of removing it? As rt->n is totally removed, how possible could we reuse this code in future?
Thanks.
Quoted 11 lines · Cong Wang
net/ipv6/route.c static void ip6_dst_ifdown(struct dst_entry *dst, struct net_device *dev, · line 347
Quoted 7 lines · YOSHIFUJI Hideaki
net/ipv6/route.c +2
-0+#if 0 if (rt->n && rt->n->dev == dev) { rt->n->dev = loopback_dev;dev_hold (loopback_dev);dev_put (dev); } +#endif Why commenting this out instead of removing it? As
rt->nis totally removed, how possible could we reuse this code in future?
I have confirmed that this dev_put()/dev_hold() operation are really for neigh->dev, which has refcnt for dev, so I agree.
(This is why I need to revisit refcnt
--yoshfuji