函数逻辑报告 | 
Source Code:kernel\bpf\cgroup.c | 
Create Date:2022-07-27 14:45:49 | 
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick | 
| 首页 | 函数Tree | 
| 注解内核,赢得工具 | 下载SCCT | English | 
函数名称:mpute a chain of effective programs for a given cgroup:* start from the list of programs in this cgroup and add* all parent programs.* Note that parent's F_ALLOW_OVERRIDE-type program is yielding* to programs in this cgroup
函数原型:static int compute_effective_progs(struct cgroup *cgrp, enum bpf_attach_type type, struct bpf_prog_array **array)
返回类型:int
参数:
| 类型 | 参数 | 名称 | 
|---|---|---|
| struct cgroup * | cgrp | |
| enum bpf_attach_type | type | |
| struct bpf_prog_array ** | array | 
| 146 | cnt等于0 | 
| 149 | 循环 | 
| 150 | 如果cnt恒等于0或flags[type]按位与BPF_F_ALLOW_MULTI则cnt加等于 number of elements in the list.* it's slow but the list cannot be long | 
| 152 | p等于cgroup_parent(p) | 
| 155 | progs等于bpf_prog_array_alloc(cnt, GFP_KERNEL) | 
| 160 | cnt等于0 | 
| 162 | 循环 | 
| 163 | 如果cnt大于0且非flags[type]按位与BPF_F_ALLOW_MULTI的值则继续下一循环 | 
| 167 | 如果非prog则继续下一循环 | 
| 172 | cgroup_storage[stype]等于storage[stype] | 
| 174 | cnt自加 | 
| 176 | 当p等于cgroup_parent(p)循环 | 
| 179 | 返回:0 | 
| 名称 | 描述 | 
|---|---|
| cgroup_bpf_inherit | group_bpf_inherit() - inherit effective programs from parent*@cgrp: the cgroup to modify | 
| update_effective_progs | 
| 源代码转换工具 开放的插件接口  | X | 
|---|---|
| 支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码  |