Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:stack_map_get_next_key

Proto:static int stack_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
546  smap = 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_stack_map, map)
550  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)
552  If Not key Then
553  id = 0
554  Else
555  id = key
556  If id >= n_buckets || Not buckets[id] Then id = 0
558  Else id++
562  When id < n_buckets && Not buckets[id] cycle
563  id++
565  If id >= n_buckets Then Return -ENOENT
568  next_key = id
569  Return 0