Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\bpf\cpumap.c Create Date:2022-07-28 13:24:02
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:cpu_map_free

Proto:static void cpu_map_free(struct bpf_map *map)

Type:void

Parameter:

TypeParameterName
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  for_each_online_cpu(cpu)
531  flush_list = per_cpu_ptr(flush_list, cpu)
533  When Not list_empty - tests whether a list is empty*@head: the list to test. cycle
534  cond_resched()
540  When i < max_entries cycle
543  rcpu = READ_ONCE( Below members specific for map type [i])
544  If Not rcpu Then Continue
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  free previously allocated percpu memory
551  bpf_map_area_free( Below members specific for map type )
552  kfree(cmap)