函数逻辑报告 |
Source Code:kernel\bpf\hashtab.c |
Create Date:2022-07-27 14:25:04 |
Last Modify:2022-05-23 09:15:29 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:Called from syscall
函数原型:static int htab_map_alloc_check(union bpf_attr *attr)
返回类型:int
参数:
类型 | 参数 | 名称 |
---|---|---|
union bpf_attr * | attr |
228 | percpu等于 one of enum bpf_map_type 恒等于BPF_MAP_TYPE_PERCPU_HASH或 one of enum bpf_map_type 恒等于BPF_MAP_TYPE_LRU_PERCPU_HASH |
230 | lru等于 one of enum bpf_map_type 恒等于BPF_MAP_TYPE_LRU_HASH或 one of enum bpf_map_type 恒等于BPF_MAP_TYPE_LRU_PERCPU_HASH |
239 | zero_seed等于 BPF_MAP_CREATE related * flags defined above.按位与Zero-initialize hash function seed. This should only be used for testing. |
242 | BUILD_BUG_ON - break compile if a condition is true(offsetof(structhtab_elem, htab) != offsetof(structhtab_elem, pprev)) |
244 | BUILD_BUG_ON - break compile if a condition is true(offsetof(structhtab_elem, next) != offsetof(structhtab_elem, pprev)) |
257 | 如果 BPF_MAP_CREATE related * flags defined above.按位与HTAB_CREATE_FLAG_MASK的反或非bpf_map_flags_access_ok( BPF_MAP_CREATE related * flags defined above.)则返回:负EINVAL |
261 | 如果非lru且percpu_lru则返回:负EINVAL |
264 | 如果lru且非prealloc则返回:负Operation is not supported |
267 | 如果numa_node不等于NUMA_NO_NODE且percpu或percpu_lru的值则返回:负EINVAL |
273 | 如果 max number of entries in a map 恒等于0或 size of key in bytes 恒等于0或 size of value in bytes 恒等于0则返回:负EINVAL |
283 | 如果 size of value in bytes 大于等于Maximum allocatable size 减BPF program can access up to 512 bytes of stack space. 减sizeof(structhtab_elem)则返回:负E2BIG |
292 | 返回:0 |
名称 | 描述 |
---|---|
fd_htab_map_alloc_check |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |