Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:include\net\inet_ecn.h Create Date:2022-07-28 06:42:22
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name: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.

Proto:static inline int IP6_ECN_set_ce(struct sk_buff *skb, struct ipv6hdr *iph)

Type:int

Parameter:

TypeParameterName
struct sk_buff *skb
struct ipv6hdr *iph
125  If INET_ECN_is_not_ect(ipv6_get_dsfield(iph)) Then Return 0
128  from = iph
129  to = from | htonl(INET_ECN_CE << 20)
130  iph = to
131  If ip_summed == This is the most generic way Then csum = csum_add(csum_sub(csum, (__force__wsum)from), (__force__wsum)to)
134  Return 1