IPv4 route fib insert node 0.1. stepsstep 1. 循环fib_trie, 直到当前节点为空或者是叶子节点时,停止。 1.a 比较当前节点的key跟待插入的key的前pos位, 如果不相等,循环结束。如果相等执行1.b (作为改进,加上父节点已经比较了前posx位, 那么只需比较 (posx,pos)这区间的位即可。 注意posx有可能与pos相等。 1.b 记录已经比较的位数(tn->pos 2013-09-12 FIB #IPv4
IPv4-route-fib-create-info 0.0.1. summary根据用户参数,创建并返回fib_create_info节点。 如果用户参数有问题,则返回空。参数检查过程中,会创建一个新的struct fib_info 节点,如果参数检查失败,该节点会被free_fib_info释放(通过rcu模式) 如果存在一个相同配置参数的节点,则返回已有的struct fib_info 节点。其实已经创建了一个新的struct fib_inf 2013-09-11 FIB #IPv4
IPv4 route fib find node 0.0.1. summary遍历路由树,查找是否存在key这条路由。如果有则返回对应的节点 struct leaf *,否则返回NULL。 0.0.1.1. 中间节点 和 叶子节点路由树(fib lc tree)是个多叉树,树的每个节点是struct rt_trie_node。每个节点的分叉个数(X)是可变的, 由 struct rt_trie_node里的bits决定。 X = 2 2013-09-11 FIB #IPv4
pfn_to_page and page_to_pfn 0.0.1. summarypage_to_pfn and pfn_to_page are often used in kernel. for PP81, kernel uses CONFIG_DISCONTIGMEM + NUMA.Every node has node_mem_map and node_start_pfnto help the page/pfn covertion.n 2013-09-06 Memory #memory
How does xfrm km work 0.0.1. summaryThere is a list xfrm_km_list in kernel.Each node of the list is struct xfrm_mgr,which has several methods to notify usersapce by netlink message.Different methods has corresponding metho 2013-08-26 XFRM #XFRM
IPv4 route study part 1: basic fun In order to understand kernel route LC-Trie,summary the basic functions here. 2013-08-26 Route #IPv4
debug kernel with jprobe 0.1. kprobe is a useful tool when debug kernel.It can directly hook the related function of kernel,before or after it run. It also can be used to patch kernel in some special case. 2013-08-23 Tools #debug
how to use git bisect 0.1. usage:In version management, we often meet this case: 123When a line/file is deleted for git repo?or who did it ? In this case, we need git bisect. git bisect start git bisect good commit_id1 gi 2013-08-23 Tools #git
Where is IPv6 route cache 0.1. Q: Does kernel IPv6 route support route cache ? yes. but it is very different with IPv4. It should be ‘clone’ strictly speaking. For simple let us only focus on ip6_pol_route, and variable st 2013-08-22 Route #IPv6