Lines Matching +full:compute +full:-
1 /* SPDX-License-Identifier: GPL-2.0 */
29 /* +ve: Passed to listen() as-is.
33 * Most tests only have one on-going connection.
34 * -ve: It is changed to 0 before passing to listen().
90 * open_netns() - Switch to specified network namespace by name.
126 iph->check = 0; in build_ip_csum()
128 sum = csum_partial(p, iph->ihl << 2, 0); in build_ip_csum()
134 * csum_tcpudp_magic - compute IP pseudo-header checksum
136 * Compute the IPv4 pseudo header checksum. The helper can take a
164 * csum_ipv6_magic - compute IPv6 pseudo-header checksum
166 * Compute the ipv6 pseudo header checksum. The helper can take a
187 s += (__u32)saddr->s6_addr32[i]; in csum_ipv6_magic()
189 s += (__u32)daddr->s6_addr32[i]; in csum_ipv6_magic()
198 * build_udp_v4_csum - compute UDP checksum for UDP over IPv4
200 * Compute the checksum to embed in UDP header, composed of the sum of IP
201 * pseudo-header checksum, UDP header checksum and UDP data checksum
213 sum = csum_partial(udph, ntohs(udph->len), 0); in build_udp_v4_csum()
214 return csum_tcpudp_magic(iph->saddr, iph->daddr, ntohs(udph->len), in build_udp_v4_csum()
219 * build_udp_v6_csum - compute UDP checksum for UDP over IPv6
221 * Compute the checksum to embed in UDP header, composed of the sum of IPv6
222 * pseudo-header checksum, UDP header checksum and UDP data checksum
233 sum = csum_partial(udph, ntohs(udph->len), 0); in build_udp_v6_csum()
234 return csum_ipv6_magic(&ip6h->saddr, &ip6h->daddr, ntohs(udph->len), in build_udp_v6_csum()