]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
ipv6: mark DST_NOGC and remove the operation of dst_free()
authorWei Wang <weiwan@google.com>
Sat, 17 Jun 2017 17:42:36 +0000 (10:42 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sun, 18 Jun 2017 02:54:00 +0000 (22:54 -0400)
commit587fea74113463b74e0d2994caf9e5f8045c28af
tree024bb5adfad7a6b1c6478f16af4153a657447903
parentad65a2f05695aced349e308193c6e2a6b1d87112
ipv6: mark DST_NOGC and remove the operation of dst_free()

With the previous preparation patches, we are ready to get rid of the
dst gc operation in ipv6 code and release dst based on refcnt only.
So this patch adds DST_NOGC flag for all IPv6 dst and remove the calls
to dst_free() and its related functions.
At this point, all dst created in ipv6 code do not use the dst gc
anymore and will be destroyed at the point when refcnt drops to 0.

Also, as icmp6 dst route is refcounted during creation and will be freed
by user during its call of dst_release(), there is no need to add this
dst to the icmp6 gc list as well.
Instead, we need to add it into uncached list so that when a
NETDEV_DOWN/NETDEV_UNREGISRER event comes, we can properly go through
these icmp6 dst as well and release the net device properly.

Signed-off-by: Wei Wang <weiwan@google.com>
Acked-by: Martin KaFai Lau <kafai@fb.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/ip6_fib.c
net/ipv6/route.c