Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:__bpf_fill_stxdw

Proto:static int __bpf_fill_stxdw(struct bpf_test *self, int size)

Type:int

Parameter:

TypeParameterName
struct bpf_test *self
intsize
430  len = BPF_MAXINSNS
434  insn = kmalloc_array - allocate memory for an array.*@n: number of elements.*@size: element size.*@flags: the type of memory to allocate (see kmalloc).
435  If Not insn Then Return -ENOMEM
438  insn[0] = BPF_ALU32_IMM(mov reg to reg , Redefine REGs to make tests less verbose , 1)
439  insn[1] = Memory store, *(uint *) (dst_reg + off16) = imm32 (size, R10, - 40, 42)
441  When i < len - 2 cycle insn[i] = Atomic memory add, *(uint *)(dst_reg + off16) += src_reg (size, R10, Redefine REGs to make tests less verbose , - 40)
444  insn[len - 2] = Memory load, dst_reg = *(uint *) (src_reg + off16) (size, Redefine REGs to make tests less verbose , R10, - 40)
445  insn[len - 1] = Program exit ()
447  insns = insn
448  len = len
449  for eBPF only, since tests don't call verifier = 40
451  Return 0
Caller
NameDescribe
bpf_fill_stxw
bpf_fill_stxdw