Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:bpf_fill_maxinsns10

Proto:static int bpf_fill_maxinsns10(struct bpf_test *self)

Type:int

Parameter:

TypeParameterName
struct bpf_test *self
294  len = BPF_MAXINSNS , hlen = len - 2
298  insn = kmalloc_array - allocate memory for an array.*@n: number of elements.*@size: element size.*@flags: the type of memory to allocate (see kmalloc).
299  If Not insn Then Return -ENOMEM
302  When i < hlen / 2 cycle insn[i] = Conditional jumps against immediates, if (dst_reg 'op' imm32) goto pc + off16 (BPF_JA, 0, 0, hlen - 2 - 2 * i)
304  When i > hlen / 2 cycle insn[i] = Conditional jumps against immediates, if (dst_reg 'op' imm32) goto pc + off16 (BPF_JA, 0, 0, hlen - 1 - 2 * i)
307  insn[hlen / 2] = Conditional jumps against immediates, if (dst_reg 'op' imm32) goto pc + off16 (BPF_JA, 0, 0, hlen / 2 - 1)
308  insn[hlen] = BPF_ALU32_IMM(mov reg to reg , Redefine REGs to make tests less verbose , 0xabababac)
309  insn[hlen + 1] = Program exit ()
311  insns = insn
312  len = len
314  Return 0