Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Called from syscall

Proto:int bpf_stackmap_copy(struct bpf_map *map, void *key, void *value)

Type:int

Parameter:

TypeParameterName
struct bpf_map *map
void *key
void *value
522  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)
524  id = key
526  If Value for the false possibility is greater at compile time(id >= n_buckets) Then Return -ENOENT
529  bucket = xchg( & buckets[id], NULL)
530  If Not bucket Then Return -ENOENT
533  trace_len = nr * stack_map_data_size(map)
534  No 3D Now!(value, data, trace_len)
535  memset(value + trace_len, 0, value_size - trace_len)
537  old_bucket = xchg( & buckets[id], bucket)
538  If old_bucket Then pcpu_freelist_push( & freelist, & fnode)
540  Return 0