函数逻辑报告 |
Source Code:kernel\bpf\lpm_trie.c |
Create Date:2022-07-27 14:30:25 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:trie_get_next_key
函数原型:static int trie_get_next_key(struct bpf_map *map, void *_key, void *_next_key)
返回类型:int
参数:
类型 | 参数 | 名称 |
---|---|---|
struct bpf_map * | map | |
void * | _key | |
void * | _next_key |
635 | struct lpm_trie_node * * node_stack = NULL |
652 | search_root等于cu_dereference() - fetch RCU-protected pointer for dereferencing*@p: The pointer to read, prior to dereferencing* This is a simple wrapper around rcu_dereference_check().(root) |
653 | 如果非search_root则返回:负ENOENT |
660 | node_stack等于分配数组内存 |
663 | 如果非node_stack则返回:负ENOMEM |
668 | node_stack[++stack_ptr]等于node |
677 | 如果非node或prefixlen不等于up to 32 for AF_INET, 128 for AF_INET6 或flags按位与Intermediate node 则转到:find_leftmost |
684 | node等于node_stack[stack_ptr] |
686 | parent等于node_stack[stack_ptr - 1] |
688 | search_root等于cu_dereference() - fetch RCU-protected pointer for dereferencing*@p: The pointer to read, prior to dereferencing* This is a simple wrapper around rcu_dereference_check().(child[1]) |
689 | 如果search_root则转到:find_leftmost |
692 | 如果非flags按位与Intermediate node 的值则 |
698 | stack_ptr自减 |
703 | 转到:free_stack |
705 | find_leftmost : |
710 | 如果flags按位与Intermediate node 则 |
712 | 否则 |
719 | do_copy : |
723 | free_stack : |
724 | kfree(node_stack) |
725 | 返回:err |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |