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:40
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:reuseport_array_update_check

Proto:static int reuseport_array_update_check(const struct reuseport_array *array, const struct sock *nsk, const struct sock *osk, const struct sock_reuseport *nsk_reuse, u32 map_flags)

Type:int

Parameter:

TypeParameterName
const struct reuseport_array *array
const struct sock *nsk
const struct sock *osk
const struct sock_reuseport *nsk_reuse
u32map_flags
210  If osk && map_flags == create new element if it didn't exist Then Return -EEXIST
213  If Not osk && map_flags == update existing element Then Return -ENOENT
216  If sk_protocol != IPPROTO_UDP && sk_protocol != IPPROTO_TCP Then Return -Operation is not supported
219  If sk_family != Internet IP Protocol && sk_family != IP version 6 Then Return -Operation is not supported
222  If sk_type != SOCK_STREAM && sk_type != SOCK_DGRAM Then Return -Operation is not supported
233  If Not sock_flag(nsk, SOCK_RCU_FREE) || Not sk_hashed(nsk) || Not nsk_reuse Then Return -EINVAL
237  If READ_ONCE(sk_user_data) Then Return -EBUSY
240  Return 0
Caller
NameDescribe
bpf_fd_reuseport_array_update_elemCalled from syscall only.* The "nsk" in the fd refcnt.* The "osk" and "reuse" are protected by reuseport_lock.