Lines Matching refs:uh

25 	struct udphdr *uh = udp_hdr(skb);  in __skb_udp_tunnel_segment()  local
43 partial = (__force __wsum)uh->len; in __skb_udp_tunnel_segment()
46 partial = csum_sub(csum_unfold(uh->check), partial); in __skb_udp_tunnel_segment()
119 uh = udp_hdr(skb); in __skb_udp_tunnel_segment()
126 uh->len = htons(skb_shinfo(skb)->gso_size + in __skb_udp_tunnel_segment()
128 skb->head - (unsigned char *)uh); in __skb_udp_tunnel_segment()
130 uh->len = htons(len); in __skb_udp_tunnel_segment()
136 uh->check = ~csum_fold(csum_add(partial, in __skb_udp_tunnel_segment()
140 uh->check = gso_make_checksum(skb, ~uh->check); in __skb_udp_tunnel_segment()
141 if (uh->check == 0) in __skb_udp_tunnel_segment()
142 uh->check = CSUM_MANGLED_0; in __skb_udp_tunnel_segment()
196 struct udphdr *uh; in __udpv4_gso_segment_csum() local
202 uh = udp_hdr(seg); in __udpv4_gso_segment_csum()
205 if (uh->check) { in __udpv4_gso_segment_csum()
206 inet_proto_csum_replace4(&uh->check, seg, *oldip, *newip, in __udpv4_gso_segment_csum()
208 inet_proto_csum_replace2(&uh->check, seg, *oldport, *newport, in __udpv4_gso_segment_csum()
210 if (!uh->check) in __udpv4_gso_segment_csum()
211 uh->check = CSUM_MANGLED_0; in __udpv4_gso_segment_csum()
222 struct udphdr *uh, *uh2; in __udpv4_gso_segment_list_csum() local
226 uh = udp_hdr(seg); in __udpv4_gso_segment_list_csum()
241 &uh2->source, &uh->source); in __udpv4_gso_segment_list_csum()
244 &uh2->dest, &uh->dest); in __udpv4_gso_segment_list_csum()
271 struct udphdr *uh; in __udp_gso_segment() local
278 if (gso_skb->len <= sizeof(*uh) + mss) in __udp_gso_segment()
294 skb_shinfo(gso_skb)->gso_segs = DIV_ROUND_UP(gso_skb->len - sizeof(*uh), in __udp_gso_segment()
301 if (skb_pagelen(gso_skb) - sizeof(*uh) == skb_shinfo(gso_skb)->gso_size) in __udp_gso_segment()
309 uh = udp_hdr(gso_skb); in __udp_gso_segment()
311 uh->check = ~udp_v6_check(gso_skb->len, in __udp_gso_segment()
315 uh->check = ~udp_v4_check(gso_skb->len, in __udp_gso_segment()
320 skb_pull(gso_skb, sizeof(*uh)); in __udp_gso_segment()
342 uh = udp_hdr(seg); in __udp_gso_segment()
350 newlen = htons(sizeof(*uh) + mss); in __udp_gso_segment()
351 check = csum16_add(csum16_sub(uh->check, uh->len), newlen); in __udp_gso_segment()
363 uh->len = newlen; in __udp_gso_segment()
364 uh->check = check; in __udp_gso_segment()
369 uh->check = gso_make_checksum(seg, ~check) ? : in __udp_gso_segment()
373 uh = udp_hdr(seg); in __udp_gso_segment()
379 check = csum16_add(csum16_sub(uh->check, uh->len), newlen); in __udp_gso_segment()
381 uh->len = newlen; in __udp_gso_segment()
382 uh->check = check; in __udp_gso_segment()
387 uh->check = gso_make_checksum(seg, ~check) ? : CSUM_MANGLED_0; in __udp_gso_segment()
419 struct udphdr *uh; in udp4_ufo_fragment() local
447 uh = udp_hdr(skb); in udp4_ufo_fragment()
450 uh->check = 0; in udp4_ufo_fragment()
452 uh->check = udp_v4_check(skb->len, iph->saddr, iph->daddr, csum); in udp4_ufo_fragment()
453 if (uh->check == 0) in udp4_ufo_fragment()
454 uh->check = CSUM_MANGLED_0; in udp4_ufo_fragment()
478 struct udphdr *uh = udp_gro_udphdr(skb); in udp_gro_receive_segment() local
487 if (!uh->check) { in udp_gro_receive_segment()
493 ulen = ntohs(uh->len); in udp_gro_receive_segment()
494 if (ulen <= sizeof(*uh) || ulen != skb_gro_len(skb)) { in udp_gro_receive_segment()
508 if ((*(u32 *)&uh->source != *(u32 *)&uh2->source)) { in udp_gro_receive_segment()
518 flush = gro_receive_network_flush(uh, uh2, p); in udp_gro_receive_segment()
541 skb_gro_postpull_rcsum(skb, uh, in udp_gro_receive_segment()
560 struct udphdr *uh, struct sock *sk) in udp_gro_receive() argument
593 (uh->check && skb->ip_summed != CHECKSUM_PARTIAL && in udp_gro_receive()
612 if ((*(u32 *)&uh->source != *(u32 *)&uh2->source) || in udp_gro_receive()
613 (!uh->check ^ !uh2->check)) { in udp_gro_receive()
620 skb_gro_postpull_rcsum(skb, uh, sizeof(struct udphdr)); in udp_gro_receive()
646 struct udphdr *uh = udp_gro_udphdr(skb); in udp4_gro_receive() local
650 if (unlikely(!uh)) in udp4_gro_receive()
657 if (skb_gro_checksum_validate_zero_check(skb, IPPROTO_UDP, uh->check, in udp4_gro_receive()
660 else if (uh->check) in udp4_gro_receive()
667 sk = udp4_gro_lookup_skb(skb, uh->source, uh->dest); in udp4_gro_receive()
669 pp = udp_gro_receive(head, skb, uh, sk); in udp4_gro_receive()
679 struct udphdr *uh = udp_hdr(skb); in udp_gro_complete_segment() local
681 skb->csum_start = (unsigned char *)uh - skb->head; in udp_gro_complete_segment()
698 struct udphdr *uh = (struct udphdr *)(skb->data + nhoff); in udp_gro_complete() local
702 uh->len = newlen; in udp_gro_complete()
705 udp4_lib_lookup_skb, skb, uh->source, uh->dest); in udp_gro_complete()
707 skb_shinfo(skb)->gso_type = uh->check ? SKB_GSO_UDP_TUNNEL_CSUM in udp_gro_complete()
736 struct udphdr *uh = (struct udphdr *)(skb->data + nhoff); in udp4_gro_complete() local
740 uh->len = htons(skb->len - nhoff); in udp4_gro_complete()
750 if (uh->check) in udp4_gro_complete()
751 uh->check = ~udp_v4_check(skb->len - nhoff, iph->saddr, in udp4_gro_complete()