Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:bpf_fill_maxinsns8

Proto:static int bpf_fill_maxinsns8(struct bpf_test *self)

Type:int

Parameter:

TypeParameterName
struct bpf_test *self
245  len = BPF_MAXINSNS
247  jmp_off = len - 3
249  insn = kmalloc_array - allocate memory for an array.*@n: number of elements.*@size: element size.*@flags: the type of memory to allocate (see kmalloc).
250  If Not insn Then Return -ENOMEM
253  insn[0] = Internal classic blocks for direct assignment (BPF_LD | BPF_IMM, 0xffffffff)
255  When i < len - 1 cycle insn[i] = __BPF_JUMP(BPF_JMP | BPF_JGT, 0xffffffff, jmp_off--, 0)
258  insn[len - 1] = Internal classic blocks for direct assignment (BPF_RET | BPF_A, 0)
260  insns = insn
261  len = len
263  Return 0