Function report | 
Source Code:kernel\bpf\local_storage.c | 
Create Date:2022-07-28 13:14:18 | 
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick | 
| home page | Tree | 
| Annotation kernel can get tool activity | Download SCCT | Chinese | 
Name:cgroup_storage_map_alloc
Proto:static struct bpf_map *cgroup_storage_map_alloc(union bpf_attr *attr)
Type:struct bpf_map
Parameter:
| Type | Parameter | Name | 
|---|---|---|
| union bpf_attr * | attr | 
| 273 | numa_node = bpf_map_attr_numa_node(attr) | 
| 278 | If size of key in bytes != sizeof(structbpf_cgroup_storage_key) Then Return ERR_PTR( - EINVAL) | 
| 281 | If size of value in bytes == 0 Then Return ERR_PTR( - EINVAL) | 
| 284 | If size of value in bytes > PAGE_SIZE Then Return ERR_PTR( - E2BIG) | 
| 287 | If BPF_MAP_CREATE related * flags defined above. & ~LOCAL_STORAGE_CREATE_FLAG_MASK || Not bpf_map_flags_access_ok( BPF_MAP_CREATE related * flags defined above.) Then Return ERR_PTR( - EINVAL) | 
| 291 | If max number of entries in a map Then Return ERR_PTR( - EINVAL) | 
| 295 | ret = bpf_map_charge_init( & mem, sizeof(structbpf_cgroup_storage_map)) | 
| 299 | map = kmalloc_node(sizeof(structbpf_cgroup_storage_map), __GFP_ZERO | GFP_USER, numa_node) | 
| 301 | If Not map Then | 
| 302 | bpf_map_charge_finish( & mem) | 
| 306 | bpf_map_charge_move( & memory, & mem) | 
| 309 | bpf_map_init_from_attr( & map, attr) | 
| 311 | Process spin lock initialization( & lock) | 
| 312 | root = | 
| 315 | Return map | 
| 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  |