Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:bpf_fill_maxinsns13

Proto:static int bpf_fill_maxinsns13(struct bpf_test *self)

Type:int

Parameter:

TypeParameterName
struct bpf_test *self
377  len = BPF_MAXINSNS
379  i = 0
381  insn = kmalloc_array - allocate memory for an array.*@n: number of elements.*@size: element size.*@flags: the type of memory to allocate (see kmalloc).
382  If Not insn Then Return -ENOMEM
385  When i < len - 3 cycle insn[i] = Internal classic blocks for direct assignment (BPF_LDX | 8-bit | BPF_MSH, 0)
388  insn[len - 3] = Internal classic blocks for direct assignment (BPF_LD | BPF_IMM, 0xabababab)
389  insn[len - 2] = Internal classic blocks for direct assignment (BPF_ALU | BPF_XOR | BPF_X, 0)
390  insn[len - 1] = Internal classic blocks for direct assignment (BPF_RET | BPF_A, 0)
392  insns = insn
393  len = len
395  Return 0