Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:dev_map_free

Proto:static void dev_map_free(struct bpf_map *map)

Type:void

Parameter:

TypeParameterName
struct bpf_map *map
203  dtab = 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_dtab, map)
214  spin_lock( & dev_map_lock)
215  list_del_rcu - deletes entry from list without re-initialization*@entry: the element to delete from the list
216  spin_unlock( & dev_map_lock)
218  bpf_clear_redirect_map(map)
219  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
222  rcu_barrier()
229  for_each_online_cpu(cpu)
230  flush_list = per_cpu_ptr(flush_list, cpu)
232  When Not list_empty - tests whether a list is empty*@head: the list to test. cycle
233  cond_resched()
236  If map_type == BPF_MAP_TYPE_DEVMAP_HASH Then
237  When i < n_buckets cycle
248  kfree(dev)
252  kfree( these are only used for DEVMAP_HASH type maps )
253  Else
254  When i < max_entries cycle
258  If Not dev Then Continue
263  kfree(dev)
266  bpf_map_area_free( DEVMAP type only )
269  free previously allocated percpu memory
270  kfree(dtab)