函数逻辑报告 |
Source Code:kernel\bpf\hashtab.c |
Create Date:2022-07-27 14:26:13 |
Last Modify:2022-05-23 09:15:29 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:__htab_lru_percpu_map_update_elem
函数原型:static int __htab_lru_percpu_map_update_elem(struct bpf_map *map, void *key, void *value, u64 map_flags, bool onallcpus)
返回类型:int
参数:
类型 | 参数 | 名称 |
---|---|---|
struct bpf_map * | map | |
void * | key | |
void * | value | |
u64 | map_flags | |
bool | onallcpus |
1040 | 如果此条件成立可能性小(为编译器优化)(map_flags > update existing element )则返回:负EINVAL |
1044 | WARN_ON_ONCE(!_read_lock_held() - might we be in RCU read-side critical section?* If CONFIG_DEBUG_LOCK_ALLOC is selected, returns nonzero iff in an RCU* read-side critical section) |
1048 | hash等于htab_map_hash(key, key_size, hashrnd) |
1050 | b等于__select_bucket(htab, hash) |
1058 | 如果map_flags不等于update existing element 则 |
1065 | raw_spin_lock_irqsave( & lock, flags) |
1069 | ret等于check_flags(htab, l_old, map_flags) |
1073 | 如果l_old则 |
1074 | bpf_lru_node_set_ref( & lru_node) |
1077 | pcpu_copy_value(htab, htab_elem_get_ptr(l_old, key_size), value, onallcpus) |
1079 | 否则 |
1080 | pcpu_copy_value(htab, htab_elem_get_ptr(l_new, key_size), value, onallcpus) |
1083 | l_new = NULL |
1085 | ret等于0 |
1086 | err : |
1087 | raw_spin_unlock_irqrestore( & lock, flags) |
1088 | 如果l_new则bpf_lru_push_free( & lru, & lru_node) |
1090 | 返回:ret |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |