Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:d 'struct bpf_spin_lock' in map value.* return >= 0 offset if found* and < 0 in case of error

Proto:int btf_find_spin_lock(const struct btf *btf, const struct btf_type *t)

Type:int

Parameter:

TypeParameterName
const struct btf *btf
const struct btf_type *t
2295  off = -ENOENT
2297  If Not __btf_type_is_struct(t) Then Return -EINVAL
2301  member_type = btf_type_by_id(btf, type)
2303  If Not __btf_type_is_struct(member_type) Then Continue
2305  If size != size of bpf_spin_lock Then Continue
2307  If strcmp(__btf_name_by_offset(btf, name_off), "bpf_spin_lock") Then Continue
2310  If off != -ENOENT Then Return -E2BIG
2313  off = btf_member_bit_offset(t, member)
2314  If off % 8 Then Return -EINVAL
2317  off /= 8
2318  If off % __alignof__(structbpf_spin_lock) Then Return -EINVAL
2322  Return off