Home
last modified time | relevance | path

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

/openbmc/linux/tools/testing/selftests/bpf/
H A Dtest_flow_dissector.c214 unsigned long pseudo_sum; in build_udp_v4_csum() local
217 pseudo_sum = add_csum_hword((void *) &iph->saddr, num_u16); in build_udp_v4_csum()
218 pseudo_sum += htons(IPPROTO_UDP); in build_udp_v4_csum()
219 pseudo_sum += udph->len; in build_udp_v4_csum()
220 return build_ip_csum((void *) udph, num_words, pseudo_sum); in build_udp_v4_csum()
227 unsigned long pseudo_sum; in build_udp_v6_csum() local
230 pseudo_sum = add_csum_hword((void *) &ip6h->saddr, num_u16); in build_udp_v6_csum()
231 pseudo_sum += htons(ip6h->nexthdr); in build_udp_v6_csum()
232 pseudo_sum += ip6h->payload_len; in build_udp_v6_csum()
233 return build_ip_csum((void *) udph, num_words, pseudo_sum); in build_udp_v6_csum()
/openbmc/linux/tools/testing/selftests/net/
H A Dtxtimestamp.c417 unsigned long pseudo_sum, csum_len; in get_udp_csum() local
420 pseudo_sum = htons(IPPROTO_UDP); in get_udp_csum()
421 pseudo_sum += udph->len; in get_udp_csum()
427 return get_ip_csum(csum_start, csum_len >> 1, pseudo_sum); in get_udp_csum()