Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Called from syscall

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

Type:int

Parameter:

TypeParameterName
struct bpf_map *map
void *key
void *next_key
599  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)
603  i = 0
605  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)
607  key_size = key_size
609  If Not key Then Go to find_first_elem
612  hash = htab_map_hash(key, key_size, hashrnd)
614  head = select_bucket(htab, hash)
617  l = an be called without bucket lock. it will repeat the loop in* the unlikely event when elements moved from one bucket into another* while link list is being walked
619  If Not l Then Go to find_first_elem
623  next_l = hlist_nulls_entry_safe(Dependency order vs. p above. (hlist_nulls_next_rcu( & hash_node)), structhtab_elem, hash_node)
626  If next_l Then
628  No 3D Now!(next_key, key, key_size)
629  Return 0
633  i = hash & number of hash buckets - 1
634  i++
636  find_first_elem :
638  When i < number of hash buckets cycle
639  head = select_bucket(htab, i)
642  next_l = hlist_nulls_entry_safe(Dependency order vs. p above. (hlist_nulls_first_rcu(head)), structhtab_elem, hash_node)
644  If next_l Then
647  Return 0
652  Return -ENOENT