Home
last modified time | relevance | path

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

123

/net/netfilter/
Dutils.c14 __sum16 csum = 0; in nf_ip_checksum() local
21 !csum_fold(skb->csum)) || in nf_ip_checksum()
24 skb->csum)) { in nf_ip_checksum()
31 skb->csum = 0; in nf_ip_checksum()
33 skb->csum = csum_tcpudp_nofold(iph->saddr, iph->daddr, in nf_ip_checksum()
36 csum = __skb_checksum_complete(skb); in nf_ip_checksum()
38 return csum; in nf_ip_checksum()
48 __sum16 csum = 0; in nf_ip_checksum_partial() local
56 skb->csum = csum_tcpudp_nofold(iph->saddr, iph->daddr, protocol, in nf_ip_checksum_partial()
61 return csum; in nf_ip_checksum_partial()
[all …]
Dxt_TCPMSS.c242 skb->csum = csum_add(csum_sub(skb->csum, oldlen), in tcpmss_tg6()
/net/sched/
Dact_csum.c157 skb->csum = csum_partial(icmph, ipl - ihl, 0); in tcf_csum_ipv4_icmp()
158 icmph->checksum = csum_fold(skb->csum); in tcf_csum_ipv4_icmp()
174 igmph->csum = 0; in tcf_csum_ipv4_igmp()
175 skb->csum = csum_partial(igmph, ipl - ihl, 0); in tcf_csum_ipv4_igmp()
176 igmph->csum = csum_fold(skb->csum); in tcf_csum_ipv4_igmp()
195 skb->csum = csum_partial(icmp6h, ipl - ihl, 0); in tcf_csum_ipv6_icmp()
198 skb->csum); in tcf_csum_ipv6_icmp()
220 skb->csum = csum_partial(tcph, ipl - ihl, 0); in tcf_csum_ipv4_tcp()
222 iph->saddr, iph->daddr, skb->csum); in tcf_csum_ipv4_tcp()
244 skb->csum = csum_partial(tcph, ipl - ihl, 0); in tcf_csum_ipv6_tcp()
[all …]
/net/sunrpc/
Dsocklib.c30 __wsum csum; member
74 desc->csum = csum_block_add(desc->csum, csum2, pos); in xdr_skb_read_and_csum_bits()
180 desc.csum = csum_partial(skb->data, desc.offset, skb->csum); in csum_partial_copy_to_xdr()
186 desc.csum = csum_block_add(desc.csum, csum2, desc.offset); in csum_partial_copy_to_xdr()
190 if (csum_fold(desc.csum)) in csum_partial_copy_to_xdr()
/net/ipv4/
Dip_output.c939 __wsum csum = 0; in ip_generic_getfrag() local
940 if (!csum_and_copy_from_iter_full(to, len, &csum, &msg->msg_iter)) in ip_generic_getfrag()
942 skb->csum = csum_block_add(skb->csum, csum, odd); in ip_generic_getfrag()
952 __wsum csum; in csum_page() local
954 csum = csum_partial(kaddr + offset, copy, 0); in csum_page()
956 return csum; in csum_page()
1120 skb->csum = 0; in __ip_append_data()
1133 skb->csum = skb_copy_and_csum_bits( in __ip_append_data()
1136 skb_prev->csum = csum_sub(skb_prev->csum, in __ip_append_data()
1137 skb->csum); in __ip_append_data()
[all …]
Dicmp.c356 __wsum csum; in icmp_glue_bits() local
358 csum = skb_copy_and_csum_bits(icmp_param->skb, in icmp_glue_bits()
362 skb->csum = csum_block_add(skb->csum, csum, odd); in icmp_glue_bits()
384 __wsum csum; in icmp_push_reply() local
387 csum = csum_partial_copy_nocheck((void *)&icmp_param->data, in icmp_push_reply()
391 csum = csum_add(csum, skb1->csum); in icmp_push_reply()
393 icmph->checksum = csum_fold(csum); in icmp_push_reply()
Dinet_fragment.c497 clone->csum = 0; in inet_frag_reasm_prepare()
540 head->csum = csum_add(head->csum, fp->csum); in inet_frag_reasm_finish()
Dudp.c844 __wsum csum = 0; in udp4_hwcsum() local
863 csum = csum_add(csum, frags->csum); in udp4_hwcsum()
867 csum = skb_checksum(skb, offset, hlen, csum); in udp4_hwcsum()
870 uh->check = csum_tcpudp_magic(src, dst, len, IPPROTO_UDP, csum); in udp4_hwcsum()
914 __wsum csum = 0; in udp_send_skb() local
957 csum = udplite_csum(skb); in udp_send_skb()
971 csum = udp_csum(skb); in udp_send_skb()
975 sk->sk_protocol, csum); in udp_send_skb()
2369 skb->csum = inet_compute_pseudo(skb, proto); in udp4_csum_init()
/net/netfilter/ipvs/
Dip_vs_proto_udp.c193 skb->csum = skb_checksum(skb, udphoff, skb->len - udphoff, 0); in udp_snat_handler()
199 cp->protocol, skb->csum); in udp_snat_handler()
206 skb->csum); in udp_snat_handler()
277 skb->csum = skb_checksum(skb, udphoff, skb->len - udphoff, 0); in udp_dnat_handler()
283 cp->protocol, skb->csum); in udp_dnat_handler()
290 skb->csum); in udp_dnat_handler()
319 skb->csum = skb_checksum(skb, udphoff, in udp_csum_check()
329 skb->csum)) { in udp_csum_check()
340 skb->csum)) { in udp_csum_check()
Dip_vs_proto_tcp.c200 skb->csum = skb_checksum(skb, tcphoff, skb->len - tcphoff, 0); in tcp_snat_handler()
206 cp->protocol, skb->csum); in tcp_snat_handler()
213 skb->csum); in tcp_snat_handler()
283 skb->csum = skb_checksum(skb, tcphoff, skb->len - tcphoff, 0); in tcp_dnat_handler()
289 cp->protocol, skb->csum); in tcp_dnat_handler()
296 skb->csum); in tcp_dnat_handler()
317 skb->csum = skb_checksum(skb, tcphoff, skb->len - tcphoff, 0); in tcp_csum_check()
326 skb->csum)) { in tcp_csum_check()
337 skb->csum)) { in tcp_csum_check()
/net/core/
Dskbuff.c833 skb->csum, skb->ip_summed, skb->csum_complete_sw, in skb_dump()
1025 CHECK_SKB_FIELD(csum); in __copy_skb_header()
2176 skb->csum = csum_block_sub(skb->csum, in pskb_trim_rcsum_slow()
2838 __wsum csum, const struct skb_checksum_ops *ops) in __skb_checksum() argument
2849 csum = INDIRECT_CALL_1(ops->update, csum_partial_ext, in __skb_checksum()
2850 skb->data + offset, copy, csum); in __skb_checksum()
2852 return csum; in __skb_checksum()
2881 csum = INDIRECT_CALL_1(ops->combine, in __skb_checksum()
2882 csum_block_add_ext, csum, in __skb_checksum()
2888 return csum; in __skb_checksum()
[all …]
Ddatagram.c724 struct csum_state csdata = { .csum = *csump }; in skb_copy_and_csum_datagram()
732 *csump = csdata.csum; in skb_copy_and_csum_datagram()
751 __wsum csum; in skb_copy_and_csum_datagram_msg() local
763 csum = csum_partial(skb->data, hlen, skb->csum); in skb_copy_and_csum_datagram_msg()
765 chunk, &csum)) in skb_copy_and_csum_datagram_msg()
768 if (csum_fold(csum)) { in skb_copy_and_csum_datagram_msg()
Dutils.c431 skb->csum = ~csum_add(csum_sub(~(skb->csum), in inet_proto_csum_replace4()
481 skb->csum = ~csum_add(diff, ~skb->csum); in inet_proto_csum_replace_by_diff()
/net/mptcp/
Doptions.c111 mp_opt->csum = get_unaligned((__force __sum16 *)ptr); in mptcp_parse_option()
117 mp_opt->rcvr_key, mp_opt->data_len, mp_opt->csum); in mptcp_parse_option()
225 mp_opt->csum = get_unaligned((__force __sum16 *)ptr); in mptcp_parse_option()
232 mp_opt->csum); in mptcp_parse_option()
488 opts->csum = mpext->csum; in mptcp_established_options_mp()
1194 mpext->csum = mp_opt.csum; in mptcp_incoming_options()
1219 __wsum csum; in __mptcp_make_csum() local
1229 header.csum = 0; in __mptcp_make_csum()
1231 csum = csum_partial(&header, sizeof(header), sum); in __mptcp_make_csum()
1232 return csum_fold(csum); in __mptcp_make_csum()
[all …]
Dsubflow.c873 __sum16 csum; in validate_data_csum() local
897 __wsum csum; in validate_data_csum() local
900 csum = skb_checksum(skb, offset, len, 0); in validate_data_csum()
901 subflow->map_data_csum = csum_block_add(subflow->map_data_csum, csum, in validate_data_csum()
934 csum = __mptcp_make_csum(subflow->map_seq, in validate_data_csum()
938 if (unlikely(csum)) { in validate_data_csum()
1068 subflow->map_data_csum = csum_unfold(mpext->csum); in get_mapping_status()
/net/ipv6/
Draw.c435 skb->len, inet->inet_num, skb->csum)) in rawv6_rcv()
439 skb->csum = ~csum_unfold(csum_ipv6_magic(&ipv6_hdr(skb)->saddr, in rawv6_rcv()
549 __sum16 csum; in rawv6_push_pending_frames() local
574 tmp_csum = skb->csum; in rawv6_push_pending_frames()
580 tmp_csum = csum_add(tmp_csum, skb->csum); in rawv6_push_pending_frames()
598 err = skb_copy_bits(skb, offset, &csum, 2); in rawv6_push_pending_frames()
605 if (unlikely(csum)) in rawv6_push_pending_frames()
606 tmp_csum = csum_sub(tmp_csum, csum_unfold(csum)); in rawv6_push_pending_frames()
608 csum = csum_ipv6_magic(&fl6->saddr, &fl6->daddr, in rawv6_push_pending_frames()
611 if (csum == 0 && fl6->flowi6_proto == IPPROTO_UDP) in rawv6_push_pending_frames()
[all …]
Dip6_checksum.c10 __u32 len, __u8 proto, __wsum csum) in csum_ipv6_magic() argument
16 __u32 sum = (__force u32)csum; in csum_ipv6_magic()
78 skb->csum = ip6_compute_pseudo(skb, proto); in udp6_csum_init()
Dudp_offload.c27 __wsum csum; in udp6_ufo_fragment() local
59 csum = skb_checksum(skb, 0, skb->len, 0); in udp6_ufo_fragment()
61 &ipv6h->daddr, csum); in udp6_ufo_fragment()
Dicmp.c291 skb->csum = csum_partial(icmp6h, in icmpv6_push_pending_frames()
292 sizeof(struct icmp6hdr), skb->csum); in icmpv6_push_pending_frames()
296 skb->csum); in icmpv6_push_pending_frames()
301 tmp_csum = csum_add(tmp_csum, skb->csum); in icmpv6_push_pending_frames()
324 __wsum csum; in icmpv6_getfrag() local
326 csum = skb_copy_and_csum_bits(org_skb, msg->offset + offset, in icmpv6_getfrag()
328 skb->csum = csum_block_add(skb->csum, csum, odd); in icmpv6_getfrag()
Dudp.c1177 __wsum csum = 0; in udp6_hwcsum_outgoing() local
1191 skb->csum = skb_checksum(skb, offset, skb->len - offset, 0); in udp6_hwcsum_outgoing()
1192 csum = skb->csum; in udp6_hwcsum_outgoing()
1197 csum = csum_add(csum, frags->csum); in udp6_hwcsum_outgoing()
1201 csum); in udp6_hwcsum_outgoing()
1218 __wsum csum = 0; in udp_v6_send_skb() local
1264 csum = udplite_csum(skb); in udp_v6_send_skb()
1273 csum = udp_csum(skb); in udp_v6_send_skb()
1277 len, fl6->flowi6_proto, csum); in udp_v6_send_skb()
/net/ipv6/netfilter/
Dnf_conntrack_reasm.c195 skb->csum = csum_sub(skb->csum, in nf_ct_frag6_queue()
359 skb->csum = csum_partial(skb_network_header(skb), in nf_ct_frag6_reasm()
361 skb->csum); in nf_ct_frag6_reasm()
/net/ipv4/netfilter/
Dnf_reject_ipv4.c83 __wsum csum; in nf_reject_skb_v4_unreach() local
127 csum = csum_partial((void *)icmph, len + sizeof(struct icmphdr), 0); in nf_reject_skb_v4_unreach()
128 icmph->checksum = csum_fold(csum); in nf_reject_skb_v4_unreach()
/net/dsa/
Dtag_dsa.c296 __wsum c = skb->csum; in dsa_rcv_ll()
299 skb->csum = c; in dsa_rcv_ll()
/net/can/
Dgw.c105 } csum; member
550 (*gwj->mod.csumfunc.crc8)(cf, &gwj->mod.csum.crc8); in can_can_gw_rcv()
553 (*gwj->mod.csumfunc.xor)(cf, &gwj->mod.csum.xor); in can_can_gw_rcv()
716 &gwj->mod.csum.crc8) < 0) in cgw_put_job()
722 &gwj->mod.csum.xor) < 0) in cgw_put_job()
974 nla_memcpy(&mod->csum.crc8, tb[CGW_CS_CRC8], in cgw_parse_attr()
997 nla_memcpy(&mod->csum.xor, tb[CGW_CS_XOR], in cgw_parse_attr()
/net/rxrpc/
Drxkad.c851 u32 csum = 1000003; in rxkad_calc_response_checksum() local
856 csum = csum * 0x10204081 + *p++; in rxkad_calc_response_checksum()
858 response->encrypted.checksum = htonl(csum); in rxkad_calc_response_checksum()
1170 __be32 csum; in rxkad_verify_response() local
1256 csum = response->encrypted.checksum; in rxkad_verify_response()
1260 if (response->encrypted.checksum != csum) in rxkad_verify_response()

123