Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:bpf_fill_maxinsns5

Proto:static int bpf_fill_maxinsns5(struct bpf_test *self)

Type:int

Parameter:

TypeParameterName
struct bpf_test *self
174  len = BPF_MAXINSNS
178  insn = kmalloc_array - allocate memory for an array.*@n: number of elements.*@size: element size.*@flags: the type of memory to allocate (see kmalloc).
179  If Not insn Then Return -ENOMEM
182  insn[0] = __BPF_JUMP(BPF_JMP | BPF_JA, len - 2, 0, 0)
184  When i < len - 1 cycle insn[i] = Internal classic blocks for direct assignment (BPF_RET | BPF_K, 0xfefefefe)
187  insn[len - 1] = Internal classic blocks for direct assignment (BPF_RET | BPF_K, 0xabababab)
189  insns = insn
190  len = len
192  Return 0