Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:queue_stack_map_alloc

Proto:static struct bpf_map *queue_stack_map_alloc(union bpf_attr *attr)

Type:struct bpf_map

Parameter:

TypeParameterName
union bpf_attr *attr
69  numa_node = bpf_map_attr_numa_node(attr)
70  struct bpf_map_memory mem = {0}
74  size = max number of entries in a map + 1
75  cost = queue_size = size of qs + size * size of value in bytes
77  ret = bpf_map_charge_init( & mem, cost)
78  If ret < 0 Then Return ERR_PTR(ret)
81  qs = bpf_map_area_alloc(queue_size, numa_node)
82  If Not qs Then
83  bpf_map_charge_finish( & mem)
84  Return ERR_PTR( - ENOMEM)
87  memset(qs, 0, size of qs )
89  bpf_map_init_from_attr( & map, attr)
91  bpf_map_charge_move( & memory, & mem)
92  max_entries + 1 = size
94  raw_spin_lock_init( & lock)
96  Return map