• David Ahern's avatar
    ipv6: Move exception bucket to fib6_nh · cc5c073a
    David Ahern authored
    Similar to the pcpu routes exceptions are really per nexthop, so move
    rt6i_exception_bucket from fib6_info to fib6_nh.
    
    To avoid additional increases to the size of fib6_nh for a 1-bit flag,
    use the lowest bit in the allocated memory pointer for the flushed flag.
    Add helpers for retrieving the bucket pointer to mask off the flag.
    
    The cleanup of the exception bucket is moved to fib6_nh_release.
    
    fib6_nh_flush_exceptions can now be called from 2 contexts:
    1. deleting a fib entry
    2. deleting a fib6_nh
    
    For 1., fib6_nh_flush_exceptions is called for a specific fib6_info that
    is getting deleted. All exceptions in the cache using the entry are
    deleted. For 2, the fib6_nh itself is getting destroyed so
    fib6_nh_flush_exceptions is called for a NULL fib6_info which means
    flush all entries.
    
    The pmtu.sh selftest exercises the affected code paths - from creating
    exceptions to cleaning them up on device delete. All tests pass without
    any rcu locking or memleak warnings.
    Signed-off-by: default avatarDavid Ahern <dsahern@gmail.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    cc5c073a
route.c 140 KB