Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Called from syscall only

Proto:static int reuseport_array_delete_elem(struct bpf_map *map, void *key)

Type:int

Parameter:

TypeParameterName
struct bpf_map *map
void *key
63  array = reuseport_array(map)
64  index = key
68  If index >= max_entries Then Return -E2BIG
71  If Not cu_access_pointer() - fetch RCU pointer with no dereferencing*@p: The pointer to read* Return the value of the specified RCU-protected pointer, but omit the* lockdep checks for being in an RCU read-side critical section(ptrs[index]) Then Return -ENOENT
74  spin_lock_bh( & reuseport_lock)
76  sk = cu_dereference_protected() - fetch RCU pointer when updates prevented*@p: The pointer to read, prior to dereferencing*@c: The conditions under which the dereference will take place* Return the value of the specified RCU-protected pointer, but omit(ptrs[index], lockdep_is_held( & reuseport_lock))
78  If sk Then
79  write_lock_bh( & sk_callback_lock)
80  WRITE_ONCE(sk_user_data, NULL)
81  RCU_INIT_POINTER() - initialize an RCU protected pointer*@p: The pointer to be initialized.*@v: The value to initialized the pointer to.* Initialize an RCU-protected pointer in special cases where readers(ptrs[index], NULL)
82  write_unlock_bh( & sk_callback_lock)
83  err = 0
84  Else
85  err = -ENOENT
88  spin_unlock_bh( & reuseport_lock)
90  Return err