Function report | 
Source Code:kernel\bpf\cpumap.c | 
Create Date:2022-07-28 13:23:49 | 
| 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_kthread_run
Proto:static int cpu_map_kthread_run(void *data)
Type:int
Parameter:
| Type | Parameter | Name | 
|---|---|---|
| void * | data | 
| 268 | If Test ring empty status without taking any locks Then | 
| 271 | If Test ring empty status without taking any locks Then | 
| 274 | Else | 
| 277 | Else | 
| 278 | sched = cond_resched() | 
| 286 | n = ptr_ring_consume_batched( Queue with potential multi-producers, and single-consumer kthread , frames, CPUMAP_BATCH) | 
| 299 | m = kmem_cache_alloc_bulk(skbuff_head_cache, gfp, n, skbs) | 
| 300 | If Value for the false possibility is greater at compile time(m == 0) Then | 
| 306 | local_bh_disable() | 
| 312 | skb = cpu_map_build_skb(rcpu, xdpf, skb) | 
| 313 | If Not skb Then | 
| 314 | xdp_return_frame(xdpf) | 
| 315 | Continue | 
| 319 | ret = netif_receive_skb_core(skb) | 
| 320 | If ret == packet dropped Then drops++ | 
| 324 | trace_xdp_cpumap_kthread( Back reference to map , n, drops, sched) | 
| 326 | local_bh_enable() | 
| 330 | put_cpu_map_entry(rcpu) | 
| 331 | Return 0 | 
| 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  |