• Home
  • Raw
  • Download

Lines Matching refs:bucket

1440 static void rt6_remove_exception(struct rt6_exception_bucket *bucket,  in rt6_remove_exception()  argument
1446 if (!bucket || !rt6_ex) in rt6_remove_exception()
1462 WARN_ON_ONCE(!bucket->depth); in rt6_remove_exception()
1463 bucket->depth--; in rt6_remove_exception()
1469 static void rt6_exception_remove_oldest(struct rt6_exception_bucket *bucket) in rt6_exception_remove_oldest() argument
1473 if (!bucket) in rt6_exception_remove_oldest()
1476 hlist_for_each_entry(rt6_ex, &bucket->chain, hlist) { in rt6_exception_remove_oldest()
1480 rt6_remove_exception(bucket, oldest); in rt6_exception_remove_oldest()
1512 __rt6_find_exception_spinlock(struct rt6_exception_bucket **bucket, in __rt6_find_exception_spinlock() argument
1519 if (!(*bucket) || !daddr) in __rt6_find_exception_spinlock()
1523 *bucket += hval; in __rt6_find_exception_spinlock()
1525 hlist_for_each_entry(rt6_ex, &(*bucket)->chain, hlist) { in __rt6_find_exception_spinlock()
1545 __rt6_find_exception_rcu(struct rt6_exception_bucket **bucket, in __rt6_find_exception_rcu() argument
1554 if (!(*bucket) || !daddr) in __rt6_find_exception_rcu()
1558 *bucket += hval; in __rt6_find_exception_rcu()
1560 hlist_for_each_entry_rcu(rt6_ex, &(*bucket)->chain, hlist) { in __rt6_find_exception_rcu()
1607 struct rt6_exception_bucket *bucket; in fib6_nh_get_excptn_bucket() local
1610 bucket = rcu_dereference_protected(nh->rt6i_exception_bucket, in fib6_nh_get_excptn_bucket()
1613 bucket = rcu_dereference(nh->rt6i_exception_bucket); in fib6_nh_get_excptn_bucket()
1616 if (bucket) { in fib6_nh_get_excptn_bucket()
1617 unsigned long p = (unsigned long)bucket; in fib6_nh_get_excptn_bucket()
1620 bucket = (struct rt6_exception_bucket *)p; in fib6_nh_get_excptn_bucket()
1623 return bucket; in fib6_nh_get_excptn_bucket()
1626 static bool fib6_nh_excptn_bucket_flushed(struct rt6_exception_bucket *bucket) in fib6_nh_excptn_bucket_flushed() argument
1628 unsigned long p = (unsigned long)bucket; in fib6_nh_excptn_bucket_flushed()
1637 struct rt6_exception_bucket *bucket; in fib6_nh_excptn_bucket_set_flushed() local
1640 bucket = rcu_dereference_protected(nh->rt6i_exception_bucket, in fib6_nh_excptn_bucket_set_flushed()
1643 p = (unsigned long)bucket; in fib6_nh_excptn_bucket_set_flushed()
1645 bucket = (struct rt6_exception_bucket *)p; in fib6_nh_excptn_bucket_set_flushed()
1646 rcu_assign_pointer(nh->rt6i_exception_bucket, bucket); in fib6_nh_excptn_bucket_set_flushed()
1653 struct rt6_exception_bucket *bucket; in rt6_insert_exception() local
1663 bucket = rcu_dereference_protected(nh->rt6i_exception_bucket, in rt6_insert_exception()
1665 if (!bucket) { in rt6_insert_exception()
1666 bucket = kcalloc(FIB6_EXCEPTION_BUCKET_SIZE, sizeof(*bucket), in rt6_insert_exception()
1668 if (!bucket) { in rt6_insert_exception()
1672 rcu_assign_pointer(nh->rt6i_exception_bucket, bucket); in rt6_insert_exception()
1673 } else if (fib6_nh_excptn_bucket_flushed(bucket)) { in rt6_insert_exception()
1697 rt6_ex = __rt6_find_exception_spinlock(&bucket, &nrt->rt6i_dst.addr, in rt6_insert_exception()
1700 rt6_remove_exception(bucket, rt6_ex); in rt6_insert_exception()
1709 hlist_add_head_rcu(&rt6_ex->hlist, &bucket->chain); in rt6_insert_exception()
1710 bucket->depth++; in rt6_insert_exception()
1715 while (bucket->depth > max_depth) in rt6_insert_exception()
1716 rt6_exception_remove_oldest(bucket); in rt6_insert_exception()
1734 struct rt6_exception_bucket *bucket; in fib6_nh_flush_exceptions() local
1741 bucket = fib6_nh_get_excptn_bucket(nh, &rt6_exception_lock); in fib6_nh_flush_exceptions()
1742 if (!bucket) in fib6_nh_flush_exceptions()
1750 hlist_for_each_entry_safe(rt6_ex, tmp, &bucket->chain, hlist) { in fib6_nh_flush_exceptions()
1753 rt6_remove_exception(bucket, rt6_ex); in fib6_nh_flush_exceptions()
1755 WARN_ON_ONCE(!from && bucket->depth); in fib6_nh_flush_exceptions()
1756 bucket++; in fib6_nh_flush_exceptions()
1788 struct rt6_exception_bucket *bucket; in rt6_find_cached_rt() local
1808 bucket = fib6_nh_get_excptn_bucket(res->nh, NULL); in rt6_find_cached_rt()
1809 rt6_ex = __rt6_find_exception_rcu(&bucket, daddr, src_key); in rt6_find_cached_rt()
1830 struct rt6_exception_bucket *bucket; in fib6_nh_remove_exception() local
1838 bucket = fib6_nh_get_excptn_bucket(nh, &rt6_exception_lock); in fib6_nh_remove_exception()
1850 rt6_ex = __rt6_find_exception_spinlock(&bucket, in fib6_nh_remove_exception()
1854 rt6_remove_exception(bucket, rt6_ex); in fib6_nh_remove_exception()
1914 struct rt6_exception_bucket *bucket; in fib6_nh_update_exception() local
1917 bucket = fib6_nh_get_excptn_bucket(nh, NULL); in fib6_nh_update_exception()
1928 rt6_ex = __rt6_find_exception_rcu(&bucket, &rt->rt6i_dst.addr, src_key); in fib6_nh_update_exception()
2011 struct rt6_exception_bucket *bucket; in rt6_exceptions_update_pmtu() local
2015 bucket = fib6_nh_get_excptn_bucket(nh, &rt6_exception_lock); in rt6_exceptions_update_pmtu()
2016 if (!bucket) in rt6_exceptions_update_pmtu()
2020 hlist_for_each_entry(rt6_ex, &bucket->chain, hlist) { in rt6_exceptions_update_pmtu()
2031 bucket++; in rt6_exceptions_update_pmtu()
2040 struct rt6_exception_bucket *bucket; in fib6_nh_exceptions_clean_tohost() local
2049 bucket = fib6_nh_get_excptn_bucket(nh, &rt6_exception_lock); in fib6_nh_exceptions_clean_tohost()
2050 if (bucket) { in fib6_nh_exceptions_clean_tohost()
2053 &bucket->chain, hlist) { in fib6_nh_exceptions_clean_tohost()
2060 rt6_remove_exception(bucket, rt6_ex); in fib6_nh_exceptions_clean_tohost()
2063 bucket++; in fib6_nh_exceptions_clean_tohost()
2070 static void rt6_age_examine_exception(struct rt6_exception_bucket *bucket, in rt6_age_examine_exception() argument
2086 rt6_remove_exception(bucket, rt6_ex); in rt6_age_examine_exception()
2091 rt6_remove_exception(bucket, rt6_ex); in rt6_age_examine_exception()
2106 rt6_remove_exception(bucket, rt6_ex); in rt6_age_examine_exception()
2118 struct rt6_exception_bucket *bucket; in fib6_nh_age_exceptions() local
2128 bucket = fib6_nh_get_excptn_bucket(nh, &rt6_exception_lock); in fib6_nh_age_exceptions()
2129 if (bucket) { in fib6_nh_age_exceptions()
2132 &bucket->chain, hlist) { in fib6_nh_age_exceptions()
2133 rt6_age_examine_exception(bucket, rt6_ex, in fib6_nh_age_exceptions()
2136 bucket++; in fib6_nh_age_exceptions()
3538 struct rt6_exception_bucket *bucket; in fib6_nh_release() local
3543 bucket = fib6_nh_get_excptn_bucket(fib6_nh, NULL); in fib6_nh_release()
3544 if (bucket) { in fib6_nh_release()
3546 kfree(bucket); in fib6_nh_release()
5684 struct rt6_exception_bucket *bucket; in rt6_nh_dump_exceptions() local
5688 bucket = fib6_nh_get_excptn_bucket(nh, NULL); in rt6_nh_dump_exceptions()
5689 if (!bucket) in rt6_nh_dump_exceptions()
5693 hlist_for_each_entry(rt6_ex, &bucket->chain, hlist) { in rt6_nh_dump_exceptions()
5725 bucket++; in rt6_nh_dump_exceptions()