函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:reuseport_array_update_check

函数原型: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)

返回类型:int

参数:

类型参数名称
const struct reuseport_array *array
const struct sock *nsk
const struct sock *osk
const struct sock_reuseport *nsk_reuse
u32map_flags
210  如果oskmap_flags恒等于create new element if it didn't exist 则返回:负EEXIST
213  如果非oskmap_flags恒等于update existing element 则返回:负ENOENT
216  如果sk_protocol不等于IPPROTO_UDPsk_protocol不等于IPPROTO_TCP则返回:负Operation is not supported
219  如果sk_family不等于Internet IP Protocol sk_family不等于IP version 6 则返回:负Operation is not supported
222  如果sk_type不等于SOCK_STREAMsk_type不等于SOCK_DGRAM则返回:负Operation is not supported
233  如果非sock_flag(nsk, SOCK_RCU_FREE)或非sk_hashed(nsk)或非nsk_reuse则返回:负EINVAL
237  如果READ_ONCE(sk_user_data)则返回:负EBUSY
240  返回:0
调用者
名称描述
bpf_fd_reuseport_array_update_elemCalled from syscall only.* The "nsk" in the fd refcnt.* The "osk" and "reuse" are protected by reuseport_lock.