Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\bpf\hashtab.c Create Date:2022-07-28 13:10:15
Last Modify:2022-05-23 09:15:29 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:Called from syscall or from eBPF program

Proto:static int htab_map_delete_elem(struct bpf_map *map, void *key)

Type:int

Parameter:

TypeParameterName
struct bpf_map *map
void *key
1109  htab = 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_htab, map)
1115  ret = -ENOENT
1117  WARN_ON_ONCE(!_read_lock_held() - might we be in RCU read-side critical section?* If CONFIG_DEBUG_LOCK_ALLOC is selected, returns nonzero iff in an RCU* read-side critical section)
1119  key_size = key_size
1121  hash = htab_map_hash(key, key_size, hashrnd)
1122  b = __select_bucket(htab, hash)
1123  head = head
1125  raw_spin_lock_irqsave( & lock, flags)
1127  l = his lookup function can only be called with bucket lock taken
1129  If l Then
1130  hlist_nulls_del_rcu - deletes entry from hash list without re-initialization*@n: the element to delete from the hash list.* Note: hlist_nulls_unhashed() on entry does not return true after this,* the entry is in an undefined state
1131  free_htab_elem(htab, l)
1132  ret = 0
1135  raw_spin_unlock_irqrestore( & lock, flags)
1136  Return ret