函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:include\net\inet_ecn.h Create Date:2022-07-27 07:39:59
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:Note:* IP_ECN_set_ce() has to tweak IPV4 checksum when setting CE,* meaning both changes have no effect on skb->csum if/when CHECKSUM_COMPLETE* In IPv6 case, no checksum compensates the change in IPv6 header,* so we have to update skb->csum.

函数原型:static inline int IP6_ECN_set_ce(struct sk_buff *skb, struct ipv6hdr *iph)

返回类型:int

参数:

类型参数名称
struct sk_buff *skb
struct ipv6hdr *iph
125  如果INET_ECN_is_not_ect(ipv6_get_dsfield(iph))则返回:0
128  from等于iph
129  to等于from按位或htonl(INET_ECN_CE << 20)
130  iph等于to
131  如果ip_summed恒等于CHECKSUM_COMPLETEcsum等于csum_add(csum_sub(csum, (__force__wsum)from), (__force__wsum)to)
134  返回:1
调用者
名称描述
INET_ECN_set_ce