• Wei Wang's avatar
    ipv6: mark DST_NOGC and remove the operation of dst_free() · 587fea74
    Wei Wang authored
    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: default avatarWei Wang <weiwan@google.com>
    Acked-by: default avatarMartin KaFai Lau <kafai@fb.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    587fea74
route.c 102 KB