rt_hash_lock_init(); /* gc_thresh和ip_rt_max_size用于垃圾回收 */ ipv4_dst_ops.gc_thresh = (rt_hash_mask + 1); ip_rt_max_size = (rt_hash_mask + 1) * 16; …… 复制代码 指针rt_hash_table指向缓存hash表,表的每一个桶是结构struct rt_hash_bucket,桶下的链表的结构是struct rtable。
路由表算法LC-Trie 路由表再议: 路由表算法类举
Introduced in version 9.5.0.51Adds or replaces an entry with the given key and integer value to the hash table. Returns True if a new hash entry was added or replaced. Returns False if an out-of-memory condition occurred. Returns True for success, False for failure. top ...