Home
last modified time | relevance | path

Searched refs:csum (Results 1 – 25 of 47) sorted by relevance

12

/net/sched/
Dact_csum.c143 skb->csum = csum_partial(icmph, ipl - ihl, 0); in tcf_csum_ipv4_icmp()
144 icmph->checksum = csum_fold(skb->csum); in tcf_csum_ipv4_icmp()
160 igmph->csum = 0; in tcf_csum_ipv4_igmp()
161 skb->csum = csum_partial(igmph, ipl - ihl, 0); in tcf_csum_ipv4_igmp()
162 igmph->csum = csum_fold(skb->csum); in tcf_csum_ipv4_igmp()
181 skb->csum = csum_partial(icmp6h, ipl - ihl, 0); in tcf_csum_ipv6_icmp()
184 skb->csum); in tcf_csum_ipv6_icmp()
203 skb->csum = csum_partial(tcph, ipl - ihl, 0); in tcf_csum_ipv4_tcp()
205 iph->saddr, iph->daddr, skb->csum); in tcf_csum_ipv4_tcp()
224 skb->csum = csum_partial(tcph, ipl - ihl, 0); in tcf_csum_ipv6_tcp()
[all …]
/net/ipv4/
Dnetfilter.c128 __sum16 csum = 0; in nf_ip_checksum() local
134 if ((protocol == 0 && !csum_fold(skb->csum)) || in nf_ip_checksum()
137 skb->csum)) { in nf_ip_checksum()
144 skb->csum = 0; in nf_ip_checksum()
146 skb->csum = csum_tcpudp_nofold(iph->saddr, iph->daddr, in nf_ip_checksum()
149 csum = __skb_checksum_complete(skb); in nf_ip_checksum()
151 return csum; in nf_ip_checksum()
160 __sum16 csum = 0; in nf_ip_checksum_partial() local
168 skb->csum = csum_tcpudp_nofold(iph->saddr, iph->daddr, protocol, in nf_ip_checksum_partial()
173 return csum; in nf_ip_checksum_partial()
Dip_output.c729 __wsum csum = 0; in ip_generic_getfrag() local
730 if (csum_partial_copy_fromiovecend(to, iov, offset, len, &csum) < 0) in ip_generic_getfrag()
732 skb->csum = csum_block_add(skb->csum, csum, odd); in ip_generic_getfrag()
742 __wsum csum; in csum_page() local
744 csum = csum_partial(kaddr + offset, copy, 0); in csum_page()
746 return csum; in csum_page()
784 skb->csum = 0; in ip_ufo_append_data()
937 skb->csum = 0; in __ip_append_data()
951 skb->csum = skb_copy_and_csum_bits( in __ip_append_data()
954 skb_prev->csum = csum_sub(skb_prev->csum, in __ip_append_data()
[all …]
Dicmp.c284 __wsum csum; in icmp_glue_bits() local
286 csum = skb_copy_and_csum_bits(icmp_param->skb, in icmp_glue_bits()
290 skb->csum = csum_block_add(skb->csum, csum, odd); in icmp_glue_bits()
312 __wsum csum = 0; in icmp_push_reply() local
316 csum = csum_add(csum, skb1->csum); in icmp_push_reply()
318 csum = csum_partial_copy_nocheck((void *)&icmp_param->data, in icmp_push_reply()
320 icmp_param->head_len, csum); in icmp_push_reply()
321 icmph->checksum = csum_fold(csum); in icmp_push_reply()
887 if (!csum_fold(skb->csum)) in icmp_rcv()
891 skb->csum = 0; in icmp_rcv()
Dgre.c126 bool csum; in gre_gso_segment() local
148 csum = true; in gre_gso_segment()
150 csum = false; in gre_gso_segment()
173 if (csum) { in gre_gso_segment()
Dip_gre.c126 __sum16 csum = 0; in check_checksum() local
130 csum = csum_fold(skb->csum); in check_checksum()
132 if (!csum) in check_checksum()
137 skb->csum = 0; in check_checksum()
138 csum = __skb_checksum_complete(skb); in check_checksum()
143 return csum; in check_checksum()
Dudp.c713 __wsum csum = 0; in udp4_hwcsum() local
730 csum = csum_add(csum, frags->csum); in udp4_hwcsum()
734 csum = skb_checksum(skb, offset, hlen, csum); in udp4_hwcsum()
737 uh->check = csum_tcpudp_magic(src, dst, len, IPPROTO_UDP, csum); in udp4_hwcsum()
752 __wsum csum = 0; in udp_send_skb() local
764 csum = udplite_csum(skb); in udp_send_skb()
777 csum = udp_csum(skb); in udp_send_skb()
781 sk->sk_protocol, csum); in udp_send_skb()
1650 proto, skb->csum)) in udp4_csum_init()
1654 skb->csum = csum_tcpudp_nofold(iph->saddr, iph->daddr, in udp4_csum_init()
[all …]
/net/core/
Diovec.c142 __wsum csum = *csump; in csum_partial_copy_fromiovecend() local
173 partial_cnt, csum); in csum_partial_copy_fromiovecend()
178 csum = csum_partial(kdata - partial_cnt, 4, csum); in csum_partial_copy_fromiovecend()
197 csum = csum_and_copy_from_user(base, kdata, copy, in csum_partial_copy_fromiovecend()
198 csum, &err); in csum_partial_copy_fromiovecend()
206 *csump = csum; in csum_partial_copy_fromiovecend()
Dskbuff.c719 new->csum = old->csum; in __copy_skb_header()
1949 int len, __wsum csum) in skb_checksum() argument
1960 csum = csum_partial(skb->data + offset, copy, csum); in skb_checksum()
1962 return csum; in skb_checksum()
1984 csum = csum_block_add(csum, csum2, pos); in skb_checksum()
1986 return csum; in skb_checksum()
2005 csum = csum_block_add(csum, csum2, pos); in skb_checksum()
2007 return csum; in skb_checksum()
2015 return csum; in skb_checksum()
2022 u8 *to, int len, __wsum csum) in skb_copy_and_csum_bits() argument
[all …]
Dutils.c314 skb->csum = ~csum_partial(diff, sizeof(diff), in inet_proto_csum_replace4()
315 ~skb->csum); in inet_proto_csum_replace4()
334 skb->csum = ~csum_partial(diff, sizeof(diff), in inet_proto_csum_replace16()
335 ~skb->csum); in inet_proto_csum_replace16()
Ddatagram.c664 sum = csum_fold(skb_checksum(skb, 0, len, skb->csum)); in __skb_checksum_complete_head()
696 __wsum csum; in skb_copy_and_csum_datagram_iovec() local
714 csum = csum_partial(skb->data, hlen, skb->csum); in skb_copy_and_csum_datagram_iovec()
716 chunk, &csum)) in skb_copy_and_csum_datagram_iovec()
718 if (csum_fold(csum)) in skb_copy_and_csum_datagram_iovec()
/net/ipv6/
Dnetfilter.c136 __sum16 csum = 0; in nf_ip6_checksum() local
144 csum_sub(skb->csum, in nf_ip6_checksum()
152 skb->csum = ~csum_unfold( in nf_ip6_checksum()
159 csum = __skb_checksum_complete(skb); in nf_ip6_checksum()
161 return csum; in nf_ip6_checksum()
171 __sum16 csum = 0; in nf_ip6_checksum_partial() local
180 skb->csum = ~csum_unfold(csum_ipv6_magic(&ip6h->saddr, in nf_ip6_checksum_partial()
188 return csum; in nf_ip6_checksum_partial()
Dip6_checksum.c10 __wsum csum) in csum_ipv6_magic() argument
16 __u32 sum = (__force u32)csum; in csum_ipv6_magic()
87 skb->len, proto, skb->csum)) in udp6_csum_init()
91 skb->csum = ~csum_unfold(csum_ipv6_magic(&ipv6_hdr(skb)->saddr, in udp6_csum_init()
Dicmp.c249 skb->csum = csum_partial(icmp6h, in icmpv6_push_pending_frames()
250 sizeof(struct icmp6hdr), skb->csum); in icmpv6_push_pending_frames()
254 skb->csum); in icmpv6_push_pending_frames()
259 tmp_csum = csum_add(tmp_csum, skb->csum); in icmpv6_push_pending_frames()
284 __wsum csum = 0; in icmpv6_getfrag() local
286 csum = skb_copy_and_csum_bits(org_skb, msg->offset + offset, in icmpv6_getfrag()
287 to, len, csum); in icmpv6_getfrag()
288 skb->csum = csum_block_add(skb->csum, csum, odd); in icmpv6_getfrag()
709 skb->csum)) in icmpv6_rcv()
713 skb->csum = ~csum_unfold(csum_ipv6_magic(saddr, daddr, skb->len, in icmpv6_rcv()
Dip6_offload.c156 __wsum csum; in ipv6_gro_receive() local
219 csum = skb->csum; in ipv6_gro_receive()
224 skb->csum = csum; in ipv6_gro_receive()
Dudp_offload.c53 __wsum csum; in udp6_ufo_fragment() local
81 csum = skb_checksum(skb, offset, skb->len - offset, 0); in udp6_ufo_fragment()
83 *(__sum16 *)(skb->data + offset) = csum_fold(csum); in udp6_ufo_fragment()
Draw.c422 skb->len, inet->inet_num, skb->csum)) in rawv6_rcv()
426 skb->csum = ~csum_unfold(csum_ipv6_magic(&ipv6_hdr(skb)->saddr, in rawv6_rcv()
536 __sum16 csum; in rawv6_push_pending_frames() local
557 tmp_csum = skb->csum; in rawv6_push_pending_frames()
563 tmp_csum = csum_add(tmp_csum, skb->csum); in rawv6_push_pending_frames()
581 if (skb_copy_bits(skb, offset, &csum, 2)) in rawv6_push_pending_frames()
585 if (unlikely(csum)) in rawv6_push_pending_frames()
586 tmp_csum = csum_sub(tmp_csum, csum_unfold(csum)); in rawv6_push_pending_frames()
588 csum = csum_ipv6_magic(&fl6->saddr, &fl6->daddr, in rawv6_push_pending_frames()
591 if (csum == 0 && fl6->flowi6_proto == IPPROTO_UDP) in rawv6_push_pending_frames()
[all …]
Dreassembly.c235 skb->csum = csum_sub(skb->csum, in ip6_frag_queue()
445 clone->csum = 0; in ip6_frag_reasm()
472 head->csum = csum_add(head->csum, fp->csum); in ip6_frag_reasm()
496 head->csum = csum_partial(skb_network_header(head), in ip6_frag_reasm()
498 head->csum); in ip6_frag_reasm()
/net/sunrpc/
Dsocklib.c58 desc->csum = csum_block_add(desc->csum, csum2, pos); in xdr_skb_read_and_csum_bits()
164 desc.csum = csum_partial(skb->data, desc.offset, skb->csum); in csum_partial_copy_to_xdr()
170 desc.csum = csum_block_add(desc.csum, csum2, desc.offset); in csum_partial_copy_to_xdr()
174 if (csum_fold(desc.csum)) in csum_partial_copy_to_xdr()
/net/netfilter/ipvs/
Dip_vs_proto_udp.c184 skb->csum = skb_checksum(skb, udphoff, skb->len - udphoff, 0); in udp_snat_handler()
190 cp->protocol, skb->csum); in udp_snat_handler()
197 skb->csum); in udp_snat_handler()
268 skb->csum = skb_checksum(skb, udphoff, skb->len - udphoff, 0); in udp_dnat_handler()
274 cp->protocol, skb->csum); in udp_dnat_handler()
281 skb->csum); in udp_dnat_handler()
310 skb->csum = skb_checksum(skb, udphoff, in udp_csum_check()
319 skb->csum)) { in udp_csum_check()
330 skb->csum)) { in udp_csum_check()
Dip_vs_proto_tcp.c182 skb->csum = skb_checksum(skb, tcphoff, skb->len - tcphoff, 0); in tcp_snat_handler()
188 cp->protocol, skb->csum); in tcp_snat_handler()
195 skb->csum); in tcp_snat_handler()
265 skb->csum = skb_checksum(skb, tcphoff, skb->len - tcphoff, 0); in tcp_dnat_handler()
271 cp->protocol, skb->csum); in tcp_dnat_handler()
278 skb->csum); in tcp_dnat_handler()
299 skb->csum = skb_checksum(skb, tcphoff, skb->len - tcphoff, 0); in tcp_csum_check()
307 skb->csum)) { in tcp_csum_check()
318 skb->csum)) { in tcp_csum_check()
/net/ipv6/netfilter/
Dnf_conntrack_reasm.c228 skb->csum = csum_sub(skb->csum, in nf_ct_frag6_queue()
412 clone->csum = 0; in nf_ct_frag6_reasm()
437 head->csum = csum_add(head->csum, fp->csum); in nf_ct_frag6_reasm()
452 head->csum = csum_partial(skb_network_header(head), in nf_ct_frag6_reasm()
454 head->csum); in nf_ct_frag6_reasm()
/net/dsa/
Dtag_dsa.c154 __wsum c = skb->csum; in dsa_rcv()
157 skb->csum = c; in dsa_rcv()
Dtag_edsa.c169 __wsum c = skb->csum; in edsa_rcv()
172 skb->csum = c; in edsa_rcv()
/net/can/
Dgw.c108 } csum; member
417 (*gwj->mod.csumfunc.crc8)(cf, &gwj->mod.csum.crc8); in can_can_gw_rcv()
420 (*gwj->mod.csumfunc.xor)(cf, &gwj->mod.csum.xor); in can_can_gw_rcv()
542 &gwj->mod.csum.crc8) < 0) in cgw_put_job()
548 &gwj->mod.csum.xor) < 0) in cgw_put_job()
705 nla_memcpy(&mod->csum.crc8, tb[CGW_CS_CRC8], in cgw_parse_attr()
729 nla_memcpy(&mod->csum.xor, tb[CGW_CS_XOR], in cgw_parse_attr()

12