Home
last modified time | relevance | path

Searched refs:sum4 (Results 1 – 1 of 1) sorted by relevance

/openbmc/linux/tools/testing/selftests/net/
H A Dnat6to4.c109 __wsum sum4 = 0; in sched_cls_ingress6_nat_6_prog() local
112 sum4 += ((__u16 *)&ip)[i]; in sched_cls_ingress6_nat_6_prog()
115 sum4 = (sum4 & 0xFFFF) + (sum4 >> 16); // collapse u32 into range 1 .. 0x1FFFE in sched_cls_ingress6_nat_6_prog()
116 sum4 = (sum4 & 0xFFFF) + (sum4 >> 16); // collapse any potential carry into u16 in sched_cls_ingress6_nat_6_prog()
117 ip.check = (__u16)~sum4; // sum4 cannot be zero, so this is never 0xFFFF in sched_cls_ingress6_nat_6_prog()
183 __wsum sum4 = 0; in sched_cls_egress4_snat4_prog() local
186 sum4 += ((__u16 *)ip4)[i]; in sched_cls_egress4_snat4_prog()
189 sum4 = (sum4 & 0xFFFF) + (sum4 >> 16); // collapse u32 into range 1 .. 0x1FFFE in sched_cls_egress4_snat4_prog()
190 sum4 = (sum4 & 0xFFFF) + (sum4 >> 16); // collapse any potential carry into u16 in sched_cls_egress4_snat4_prog()
192 if (sum4 != 0xFFFF) in sched_cls_egress4_snat4_prog()