Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:prog_fd_array_get_ptr

Proto:static void *prog_fd_array_get_ptr(struct bpf_map *map, struct file *map_file, int fd)

Type:void

Parameter:

TypeParameterName
struct bpf_map *map
struct file *map_file
intfd
632  array = container_of - cast a member of a structure out to the containing structure*@ptr: the pointer to the member.*@type: the type of the container struct this is embedded in.*@member: the name of the member within the struct.(map, structbpf_array, map)
633  prog = bpf_prog_get(fd)
635  If IS_ERR(prog) Then Return prog
638  If Not bpf_prog_array_compatible(array, prog) Then
639  bpf_prog_put(prog)
640  Return ERR_PTR( - EINVAL)
643  Return prog