| Function report | 
| Source Code: kernel\bpf\cpumap.c | Create Date:2022-07-28 13:23:53 | 
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick | 
| home page | Tree | 
| Annotation kernel can get tool activity | Download SCCT | Chinese | 
Name:__cpu_map_entry_alloc
Proto:static struct bpf_cpu_map_entry *__cpu_map_entry_alloc(u32 qsize, u32 cpu, int map_id)
Type:struct bpf_cpu_map_entry
Parameter:
| Type | Parameter | Name | 
|---|---|---|
| u32 | qsize | |
| u32 | cpu | |
| int | map_id | 
| 343 | numa = cpu_to_node(cpu) | 
| 346 | If Not rcpu Then Return NULL | 
| 350 | XDP can run multiple RX-ring queues, need __percpu enqueue store = __alloc_percpu_gfp( size of XDP can run multiple RX-ring queues, need __percpu enqueue store , size of * , gfp) | 
| 352 | If Not XDP can run multiple RX-ring queues, need __percpu enqueue store Then Go to free_rcu | 
| 355 | for_each_possible_cpu(i) | 
| 362 | If Not Queue with potential multi-producers, and single-consumer kthread Then Go to free_bulkq | 
| 365 | err = ptr_ring_init( Queue with potential multi-producers, and single-consumer kthread , qsize, gfp) | 
| 366 | If err Then Go to free_queue | 
| 369 | kthread CPU and map index = cpu | 
| 370 | Back reference to map = map_id | 
| 376 | If IS_ERR(kthread) Then Go to free_ptr_ring | 
| 379 | get_cpu_map_entry(rcpu) | 
| 380 | get_cpu_map_entry(rcpu) | 
| 386 | Return rcpu | 
| 388 | free_ptr_ring : | 
| 390 | free_queue : | 
| 392 | free_bulkq : | 
| 394 | free_rcu : | 
| 396 | Return NULL | 
| Name | Describe | 
|---|---|
| cpu_map_update_elem | 
| 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 |