Lines Matching +full:4 +full:th
35 struct tcphdr *th; in __tcpv4_gso_segment_csum() local
41 th = tcp_hdr(seg); in __tcpv4_gso_segment_csum()
44 inet_proto_csum_replace4(&th->check, seg, *oldip, newip, true); in __tcpv4_gso_segment_csum()
45 inet_proto_csum_replace2(&th->check, seg, *oldport, newport, false); in __tcpv4_gso_segment_csum()
54 const struct tcphdr *th; in __tcpv4_gso_segment_list_csum() local
61 th = tcp_hdr(seg); in __tcpv4_gso_segment_list_csum()
66 if (!(*(const u32 *)&th->source ^ *(const u32 *)&th2->source) && in __tcpv4_gso_segment_list_csum()
76 &th2->source, th->source); in __tcpv4_gso_segment_list_csum()
79 &th2->dest, th->dest); in __tcpv4_gso_segment_list_csum()
105 struct tcphdr *th = tcp_hdr(skb); in tcp4_gso_segment() local
107 if (skb_pagelen(skb) - th->doff * 4 == skb_shinfo(skb)->gso_size) in tcp4_gso_segment()
115 struct tcphdr *th = tcp_hdr(skb); in tcp4_gso_segment() local
121 th->check = 0; in tcp4_gso_segment()
134 struct tcphdr *th; in tcp_gso_segment() local
144 th = tcp_hdr(skb); in tcp_gso_segment()
145 thlen = th->doff * 4; in tcp_gso_segment()
146 if (thlen < sizeof(*th)) in tcp_gso_segment()
193 th = tcp_hdr(skb); in tcp_gso_segment()
194 seq = ntohl(th->seq); in tcp_gso_segment()
199 newcheck = ~csum_fold(csum_add(csum_unfold(th->check), delta)); in tcp_gso_segment()
202 th->fin = th->psh = 0; in tcp_gso_segment()
203 th->check = newcheck; in tcp_gso_segment()
206 gso_reset_checksum(skb, ~th->check); in tcp_gso_segment()
208 th->check = gso_make_checksum(skb, ~th->check); in tcp_gso_segment()
217 th = tcp_hdr(skb); in tcp_gso_segment()
219 th->seq = htonl(seq); in tcp_gso_segment()
220 th->cwr = 0; in tcp_gso_segment()
248 th->check = ~csum_fold(csum_add(csum_unfold(th->check), delta)); in tcp_gso_segment()
250 gso_reset_checksum(skb, ~th->check); in tcp_gso_segment()
252 th->check = gso_make_checksum(skb, ~th->check); in tcp_gso_segment()
257 struct sk_buff *tcp_gro_lookup(struct list_head *head, struct tcphdr *th) in tcp_gro_lookup() argument
267 if (*(u32 *)&th->source ^ *(u32 *)&th2->source) { in tcp_gro_lookup()
281 struct tcphdr *th; in tcp_gro_pull_header() local
284 hlen = off + sizeof(*th); in tcp_gro_pull_header()
285 th = skb_gro_header(skb, hlen, off); in tcp_gro_pull_header()
286 if (unlikely(!th)) in tcp_gro_pull_header()
289 thlen = th->doff * 4; in tcp_gro_pull_header()
290 if (thlen < sizeof(*th)) in tcp_gro_pull_header()
295 th = skb_gro_header_slow(skb, hlen, off); in tcp_gro_pull_header()
296 if (unlikely(!th)) in tcp_gro_pull_header()
302 return th; in tcp_gro_pull_header()
306 struct tcphdr *th) in tcp_gro_receive() argument
308 unsigned int thlen = th->doff * 4; in tcp_gro_receive()
319 flags = tcp_flag_word(th); in tcp_gro_receive()
321 p = tcp_gro_lookup(head, th); in tcp_gro_receive()
329 flush |= (__force int)(th->ack_seq ^ th2->ack_seq); in tcp_gro_receive()
330 for (i = sizeof(*th); i < thlen; i += 4) in tcp_gro_receive()
331 flush |= *(u32 *)((u8 *)th + i) ^ in tcp_gro_receive()
334 flush |= gro_receive_network_flush(th, th2, p); in tcp_gro_receive()
347 flush |= (ntohl(th2->seq) + skb_gro_len(p)) ^ ntohl(th->seq); in tcp_gro_receive()
390 struct tcphdr *th = tcp_hdr(skb); in tcp_gro_complete() local
396 skb->csum_start = (unsigned char *)th - skb->head; in tcp_gro_complete()
403 if (th->cwr) in tcp_gro_complete()
409 struct tcphdr *th) in tcp4_check_fraglist_gro() argument
420 p = tcp_gro_lookup(head, th); in tcp4_check_fraglist_gro()
430 iph->saddr, th->source, in tcp4_check_fraglist_gro()
431 iph->daddr, ntohs(th->dest), in tcp4_check_fraglist_gro()
441 struct tcphdr *th; in tcp4_gro_receive() local
449 th = tcp_gro_pull_header(skb); in tcp4_gro_receive()
450 if (!th) in tcp4_gro_receive()
453 tcp4_check_fraglist_gro(head, skb, th); in tcp4_gro_receive()
455 return tcp_gro_receive(head, skb, th); in tcp4_gro_receive()
466 struct tcphdr *th = tcp_hdr(skb); in tcp4_gro_complete() local
477 th->check = ~tcp_v4_check(skb->len - thoff, iph->saddr, in tcp4_gro_complete()