Lines Matching +full:4 +full:th

38 	struct tcphdr *th;  in __tcpv4_gso_segment_csum()  local
44 th = tcp_hdr(seg); in __tcpv4_gso_segment_csum()
47 inet_proto_csum_replace4(&th->check, seg, *oldip, newip, true); in __tcpv4_gso_segment_csum()
48 inet_proto_csum_replace2(&th->check, seg, *oldport, newport, false); in __tcpv4_gso_segment_csum()
57 const struct tcphdr *th; in __tcpv4_gso_segment_list_csum() local
64 th = tcp_hdr(seg); in __tcpv4_gso_segment_list_csum()
69 if (!(*(const u32 *)&th->source ^ *(const u32 *)&th2->source) && in __tcpv4_gso_segment_list_csum()
79 &th2->source, th->source); in __tcpv4_gso_segment_list_csum()
82 &th2->dest, th->dest); in __tcpv4_gso_segment_list_csum()
108 struct tcphdr *th = tcp_hdr(skb); in tcp4_gso_segment() local
110 if (skb_pagelen(skb) - th->doff * 4 == skb_shinfo(skb)->gso_size) in tcp4_gso_segment()
118 struct tcphdr *th = tcp_hdr(skb); in tcp4_gso_segment() local
124 th->check = 0; in tcp4_gso_segment()
137 struct tcphdr *th; in tcp_gso_segment() local
147 th = tcp_hdr(skb); in tcp_gso_segment()
148 thlen = th->doff * 4; in tcp_gso_segment()
149 if (thlen < sizeof(*th)) in tcp_gso_segment()
196 th = tcp_hdr(skb); in tcp_gso_segment()
197 seq = ntohl(th->seq); in tcp_gso_segment()
202 newcheck = ~csum_fold(csum_add(csum_unfold(th->check), delta)); in tcp_gso_segment()
205 th->fin = th->psh = 0; in tcp_gso_segment()
206 th->check = newcheck; in tcp_gso_segment()
209 gso_reset_checksum(skb, ~th->check); in tcp_gso_segment()
211 th->check = gso_make_checksum(skb, ~th->check); in tcp_gso_segment()
220 th = tcp_hdr(skb); in tcp_gso_segment()
222 th->seq = htonl(seq); in tcp_gso_segment()
223 th->cwr = 0; in tcp_gso_segment()
251 th->check = ~csum_fold(csum_add(csum_unfold(th->check), delta)); in tcp_gso_segment()
253 gso_reset_checksum(skb, ~th->check); in tcp_gso_segment()
255 th->check = gso_make_checksum(skb, ~th->check); in tcp_gso_segment()
260 struct sk_buff *tcp_gro_lookup(struct list_head *head, struct tcphdr *th) in tcp_gro_lookup() argument
270 if (*(u32 *)&th->source ^ *(u32 *)&th2->source) { in tcp_gro_lookup()
284 struct tcphdr *th; in tcp_gro_pull_header() local
287 hlen = off + sizeof(*th); in tcp_gro_pull_header()
288 th = skb_gro_header(skb, hlen, off); in tcp_gro_pull_header()
289 if (unlikely(!th)) in tcp_gro_pull_header()
292 thlen = th->doff * 4; in tcp_gro_pull_header()
293 if (thlen < sizeof(*th)) in tcp_gro_pull_header()
298 th = skb_gro_header_slow(skb, hlen, off); in tcp_gro_pull_header()
299 if (unlikely(!th)) in tcp_gro_pull_header()
305 return th; in tcp_gro_pull_header()
309 struct tcphdr *th) in tcp_gro_receive() argument
311 unsigned int thlen = th->doff * 4; in tcp_gro_receive()
322 flags = tcp_flag_word(th); in tcp_gro_receive()
324 p = tcp_gro_lookup(head, th); in tcp_gro_receive()
332 flush |= (__force int)(th->ack_seq ^ th2->ack_seq); in tcp_gro_receive()
333 for (i = sizeof(*th); i < thlen; i += 4) in tcp_gro_receive()
334 flush |= *(u32 *)((u8 *)th + i) ^ in tcp_gro_receive()
337 flush |= gro_receive_network_flush(th, th2, p); in tcp_gro_receive()
350 flush |= (ntohl(th2->seq) + skb_gro_len(p)) ^ ntohl(th->seq); in tcp_gro_receive()
393 struct tcphdr *th = tcp_hdr(skb); in tcp_gro_complete() local
399 skb->csum_start = (unsigned char *)th - skb->head; in tcp_gro_complete()
406 if (th->cwr) in tcp_gro_complete()
412 struct tcphdr *th) in tcp4_check_fraglist_gro() argument
423 p = tcp_gro_lookup(head, th); in tcp4_check_fraglist_gro()
433 iph->saddr, th->source, in tcp4_check_fraglist_gro()
434 iph->daddr, ntohs(th->dest), in tcp4_check_fraglist_gro()
444 struct tcphdr *th; in tcp4_gro_receive() local
452 th = tcp_gro_pull_header(skb); in tcp4_gro_receive()
453 if (!th) in tcp4_gro_receive()
456 tcp4_check_fraglist_gro(head, skb, th); in tcp4_gro_receive()
458 return tcp_gro_receive(head, skb, th); in tcp4_gro_receive()
469 struct tcphdr *th = tcp_hdr(skb); in tcp4_gro_complete() local
480 th->check = ~tcp_v4_check(skb->len - thoff, iph->saddr, in tcp4_gro_complete()