Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\bpf\core.c Create Date:2022-07-28 12:47:23
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:bpf_prog_alloc

Proto:struct bpf_prog *bpf_prog_alloc(unsigned int size, gfp_t gfp_extra_flags)

Type:struct bpf_prog

Parameter:

TypeParameterName
unsigned intsize
gfp_tgfp_extra_flags
107  gfp_flags = GFP_KERNEL | __GFP_ZERO | gfp_extra_flags
111  prog = bpf_prog_alloc_no_stats(size, gfp_extra_flags)
112  If Not prog Then Return NULL
115  stats = alloc_percpu_gfp(structbpf_prog_stats, gfp_flags)
116  If Not stats Then
117  kfree( Auxiliary fields )
118  vfree(prog)
119  Return NULL
122  for_each_possible_cpu(cpu)
125  pstats = per_cpu_ptr(stats, cpu)
126  u64_stats_init( & syncp)
128  Return prog
Caller
NameDescribe
bpf_prog_load
generate_filter