Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:bpf_fill_maxinsns7

Proto:static int bpf_fill_maxinsns7(struct bpf_test *self)

Type:int

Parameter:

TypeParameterName
struct bpf_test *self
219  len = BPF_MAXINSNS
223  insn = kmalloc_array - allocate memory for an array.*@n: number of elements.*@size: element size.*@flags: the type of memory to allocate (see kmalloc).
224  If Not insn Then Return -ENOMEM
227  When i < len - 4 cycle insn[i] = Internal classic blocks for direct assignment (BPF_LD | 32-bit | BPF_ABS, RATIONALE. Negative offsets are invalid in BPF.We use them to reference ancillary data.Unlike introduction new instructions, it does not breakexisting compilers/optimizers. + SKF_AD_CPU)
231  insn[len - 4] = Internal classic blocks for direct assignment (BPF_MISC | BPF_TAX, 0)
232  insn[len - 3] = Internal classic blocks for direct assignment (BPF_LD | 32-bit | BPF_ABS, RATIONALE. Negative offsets are invalid in BPF.We use them to reference ancillary data.Unlike introduction new instructions, it does not breakexisting compilers/optimizers. + SKF_AD_CPU)
234  insn[len - 2] = Internal classic blocks for direct assignment (BPF_ALU | BPF_SUB | BPF_X, 0)
235  insn[len - 1] = Internal classic blocks for direct assignment (BPF_RET | BPF_A, 0)
237  insns = insn
238  len = len
240  Return 0