Function report |
Source Code:kernel\bpf\local_storage.c |
Create Date:2022-07-28 13:14:34 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:bpf_cgroup_storage_alloc
Proto:struct bpf_cgroup_storage *bpf_cgroup_storage_alloc(struct bpf_prog *prog, enum bpf_cgroup_storage_type stype)
Type:struct bpf_cgroup_storage
Parameter:
Type | Parameter | Name |
---|---|---|
struct bpf_prog * | prog | |
enum bpf_cgroup_storage_type | stype |
486 | map = cgroup_storage[stype] |
487 | If Not map Then Return NULL |
490 | size = bpf_cgroup_storage_calculate_size(map, & pages) |
492 | If bpf_map_charge_memlock(map, pages) Then Return ERR_PTR( - EPERM) |
495 | storage = kmalloc_node( size of bpf_cgroup_storage , __GFP_ZERO | GFP_USER, numa_node) |
500 | flags = __GFP_ZERO | GFP_USER |
502 | If stype == BPF_CGROUP_STORAGE_SHARED Then |
503 | buf = kmalloc_node(size, flags, numa_node) |
506 | check_and_init_map_lock(map, data) |
507 | Else |
508 | percpu_buf = __alloc_percpu_gfp(size, 8, flags) |
509 | If Not percpu_buf Then Go to enomem |
515 | Return storage |
517 | enomem : |
518 | bpf_map_uncharge_memlock(map, pages) |
Name | Describe |
---|---|
__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 |
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 |