| Function report | 
| Source Code: kernel\bpf\core.c | Create Date:2022-07-28 12:50:05 | 
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick | 
| home page | Tree | 
| Annotation kernel can get tool activity | Download SCCT | Chinese | 
Name:bpf_prog_array_copy
Proto:int bpf_prog_array_copy(struct bpf_prog_array *old_array, struct bpf_prog *exclude_prog, struct bpf_prog *include_prog, struct bpf_prog_array **new_array)
Type:int
Parameter:
| Type | Parameter | Name | 
|---|---|---|
| struct bpf_prog_array * | old_array | |
| struct bpf_prog * | exclude_prog | |
| struct bpf_prog * | include_prog | |
| struct bpf_prog_array ** | new_array | 
| 1960 | carry_prog_cnt = 0 | 
| 1963 | bool found_exclude = false | 
| 1964 | new_prog_idx = 0 | 
| 1969 | If old_array Then | 
| 1972 | If prog == exclude_prog Then | 
| 1973 | found_exclude = true | 
| 1974 | Continue | 
| 1976 | If prog != prog Then carry_prog_cnt++ | 
| 1978 | If prog == include_prog Then Return -EEXIST | 
| 1983 | If exclude_prog && Not found_exclude Then Return -ENOENT | 
| 1987 | new_prog_cnt = carry_prog_cnt | 
| 1988 | If include_prog Then new_prog_cnt += 1 | 
| 1992 | If Not new_prog_cnt Then | 
| 1993 | * new_array = NULL | 
| 1994 | Return 0 | 
| 1998 | array = bpf_prog_array_alloc(new_prog_cnt + 1, GFP_KERNEL) | 
| 2003 | If carry_prog_cnt Then | 
| 2012 | If include_prog Then prog = include_prog | 
| 2014 | prog = NULL | 
| 2016 | Return 0 | 
| Name | Describe | 
|---|---|
| perf_event_detach_bpf_prog | 
| Source code conversion tool public plug-in interface | X | 
|---|---|
| Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |