函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\bpf\arraymap.c Create Date:2022-07-27 14:27:53
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:fd_array_map_delete_elem

函数原型:static int fd_array_map_delete_elem(struct bpf_map *map, void *key)

返回类型:int

参数:

类型参数名称
struct bpf_map *map
void *key
605  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)
607  index等于key
609  如果index大于等于max_entries则返回:负E2BIG
612  如果map_poke_run
613  mutex_lock( & poke_mutex)
614  old_ptr等于xchg(ptrs + index, NULL)
615  map_poke_run(map, index, old_ptr, NULL)
616  mutex_unlock - release the mutex*@lock: the mutex to be released* Unlock a mutex that has been locked by this task previously.* This function must not be used in interrupt context. Unlocking* of a not locked mutex is not allowed.
617  否则
618  old_ptr等于xchg(ptrs + index, NULL)
621  如果old_ptr
622  map_fd_put_ptr(old_ptr)
623  返回:0
624  否则
625  返回:负ENOENT
调用者
名称描述
bpf_fd_array_map_cleardecrement refcnt of all bpf_progs that are stored in this map
perf_event_fd_array_release