函数逻辑报告 | 
Source Code:kernel\bpf\local_storage.c | 
Create Date:2022-07-27 14:31:41 | 
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick | 
| 首页 | 函数Tree | 
| 注解内核,赢得工具 | 下载SCCT | English | 
函数名称:bpf_cgroup_storage_alloc
函数原型:struct bpf_cgroup_storage *bpf_cgroup_storage_alloc(struct bpf_prog *prog, enum bpf_cgroup_storage_type stype)
返回类型:struct bpf_cgroup_storage
参数:
| 类型 | 参数 | 名称 | 
|---|---|---|
| struct bpf_prog * | prog | |
| enum bpf_cgroup_storage_type | stype | 
| 486 | map等于cgroup_storage[stype] | 
| 487 | 如果非map则返回:NULL | 
| 490 | size等于bpf_cgroup_storage_calculate_size(map, & pages) | 
| 492 | 如果bpf_map_charge_memlock(map, pages)则返回:错误号 | 
| 495 | storage等于kmalloc_node(bpf_cgroup_storage的长度, __GFP_ZERO | GFP_USER, numa_node) | 
| 500 | flags等于__GFP_ZERO按位或GFP_USER | 
| 502 | 如果stype恒等于BPF_CGROUP_STORAGE_SHARED则 | 
| 503 | buf等于kmalloc_node(size, flags, numa_node) | 
| 506 | check_and_init_map_lock(map, data) | 
| 507 | 否则 | 
| 508 | percpu_buf等于__alloc_percpu_gfp(size, 8, flags) | 
| 509 | 如果非percpu_buf则转到:enomem | 
| 515 | 返回:storage | 
| 517 | enomem : | 
| 518 | bpf_map_uncharge_memlock(map, pages) | 
| 520 | 返回:错误号 | 
| 名称 | 描述 | 
|---|---|
| __cgroup_bpf_attach | __cgroup_bpf_attach() - Attach the program to a cgroup, and* propagate the change to descendants*@cgrp: The cgroup which descendants to traverse*@prog: A program to attach*@type: Type of attach operation*@flags: Option flags | 
| 源代码转换工具 开放的插件接口  | X | 
|---|---|
| 支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码  |