函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\bpf\stackmap.c Create Date:2022-07-27 14:45:20
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:stack_map_get_next_key

函数原型:static int stack_map_get_next_key(struct bpf_map *map, void *key, void *next_key)

返回类型:int

参数:

类型参数名称
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  如果非key
553  id等于0
554  否则
555  id等于key
556  如果id大于等于n_buckets或非buckets[id]则id等于0
558  否则id自加
562 id小于n_buckets且非buckets[id]循环
563  id自加
565  如果id大于等于n_buckets则返回:负ENOENT
568  next_key等于id
569  返回:0