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_ld_abs_get_processor_id

Proto:static int bpf_fill_ld_abs_get_processor_id(struct bpf_test *self)

Type:int

Parameter:

TypeParameterName
struct bpf_test *self
406  len = BPF_MAXINSNS
410  insn = kmalloc_array - allocate memory for an array.*@n: number of elements.*@size: element size.*@flags: the type of memory to allocate (see kmalloc).
411  If Not insn Then Return -ENOMEM
414  When i < len - 1 cycle
415  insn[i] = Internal classic blocks for direct assignment (BPF_LD | 8-bit | BPF_ABS, 0)
416  insn[i + 1] = Internal classic blocks for direct assignment (BPF_LD | 32-bit | BPF_ABS, RATIONALE. Negative offsets are invalid in BPF.We use them to reference ancillary data.Unlike introduction new instructions, it does not breakexisting compilers/optimizers. + SKF_AD_CPU)
420  insn[len - 1] = Internal classic blocks for direct assignment (BPF_RET | BPF_K, 0xbee)
422  insns = insn
423  len = len
425  Return 0