Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\bpf\syscall.c Create Date:2022-07-28 12:51:50
Last Modify:2022-05-19 18:06:12 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:bpf_map_alloc_id

Proto:static int bpf_map_alloc_id(struct bpf_map *map)

Type:int

Parameter:

TypeParameterName
struct bpf_map *map
278  dr_preload - preload for idr_alloc()*@gfp_mask: allocation mask to use for preloading* Preallocate memory to use for the next call to idr_alloc(). This function* returns with preemption disabled. It will be enabled by idr_preload_end().
279  spin_lock_bh( & map_idr_lock)
280  id = dr_alloc_cyclic() - Allocate an ID cyclically.*@idr: IDR handle.*@ptr: Pointer to be associated with the new ID.*@start: The minimum ID (inclusive).*@end: The maximum ID (exclusive).*@gfp: Memory allocation flags.
281  If id > 0 Then id = id
283  spin_unlock_bh( & map_idr_lock)
284  dr_preload_end - end preload section started with idr_preload()* Each idr_preload() should be matched with an invocation of this* function. See idr_preload() for details.
286  If WARN_ON_ONCE(!id) Then Return -ENOSPC
289  Return If id > 0 Then 0 Else id
Caller
NameDescribe
map_createalled via syscall