函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\bpf\cpumap.c Create Date:2022-07-27 14:42:01
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:cpu_map_free

函数原型:static void cpu_map_free(struct bpf_map *map)

返回类型:void

参数:

类型参数名称
struct bpf_map *map
509  cmap等于container_of - cast a member of a structure out to the containing structure*@ptr: the pointer to the member.*@type: the type of the container struct this is embedded in.*@member: the name of the member within the struct.(map, structbpf_cpu_map, map)
522  bpf_clear_redirect_map(map)
523  Wait for a grace period to elapse. But it is illegal to invoke* synchronize_rcu() from within an RCU read-side critical section.* Therefore, any legal call to synchronize_rcu() is a quiescent
530  遍历在线CPU(cpu)
531  flush_list等于per_cpu_ptr(flush_list, cpu)
533  当非链表为空循环
534  cond_resched()
540 i小于max_entries循环
543  rcpu等于READ_ONCE( Below members specific for map type [i])
544  如果非rcpu则继续下一循环
548  After xchg pointer to bpf_cpu_map_entry, use the call_rcu() to* ensure any driver rcu critical sections have completed, but this* does not guarantee a flush has happened yet. Because driver side* rcu_read_lock/unlock only protects the running XDP program
550  释放内存
551  bpf_map_area_free( Below members specific for map type )
552  kfree(cmap)