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_ja

Proto:static int __bpf_fill_ja(struct bpf_test *self, unsigned int len, unsigned int plen)

Type:int

Parameter:

TypeParameterName
struct bpf_test *self
unsigned intlen
unsigned intplen
324  insn = kmalloc_array - allocate memory for an array.*@n: number of elements.*@size: element size.*@flags: the type of memory to allocate (see kmalloc).
325  If Not insn Then Return -ENOMEM
328  rlen = len % plen - 1
330  When i + plen < len cycle When j < plen cycle
332  insn[i + j] = __BPF_JUMP(BPF_JMP | BPF_JA, plen - 1 - j, 0, 0)
334  When j < rlen cycle insn[i + j] = __BPF_JUMP(BPF_JMP | BPF_JA, rlen - 1 - j, 0, 0)
338  insn[len - 1] = Internal classic blocks for direct assignment (BPF_RET | BPF_K, 0xababcbac)
340  insns = insn
341  len = len
343  Return 0
Caller
NameDescribe
bpf_fill_maxinsns11
bpf_fill_ja