Home
last modified time | relevance | path

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

/Linux-v6.6/tools/testing/selftests/bpf/
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()
/Linux-v6.6/tools/testing/selftests/net/
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()