Lines Matching 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
148 th = tcp_hdr(skb); in tcp_gso_segment()
149 thlen = th->doff * 4; in tcp_gso_segment()
150 if (thlen < sizeof(*th)) in tcp_gso_segment()
197 th = tcp_hdr(skb); in tcp_gso_segment()
198 seq = ntohl(th->seq); in tcp_gso_segment()
203 newcheck = ~csum_fold(csum_add(csum_unfold(th->check), delta)); in tcp_gso_segment()
208 th->fin = th->psh = 0; in tcp_gso_segment()
209 th->check = newcheck; in tcp_gso_segment()
212 gso_reset_checksum(skb, ~th->check); in tcp_gso_segment()
214 th->check = gso_make_checksum(skb, ~th->check); in tcp_gso_segment()
223 th = tcp_hdr(skb); in tcp_gso_segment()
225 th->seq = htonl(seq); in tcp_gso_segment()
227 th->cwr &= ecn_cwr_mask; in tcp_gso_segment()
255 th->check = ~csum_fold(csum_add(csum_unfold(th->check), delta)); in tcp_gso_segment()
257 gso_reset_checksum(skb, ~th->check); in tcp_gso_segment()
259 th->check = gso_make_checksum(skb, ~th->check); in tcp_gso_segment()
264 struct sk_buff *tcp_gro_lookup(struct list_head *head, struct tcphdr *th) in tcp_gro_lookup() argument
274 if (*(u32 *)&th->source ^ *(u32 *)&th2->source) { in tcp_gro_lookup()
288 struct tcphdr *th; in tcp_gro_pull_header() local
291 hlen = off + sizeof(*th); in tcp_gro_pull_header()
292 th = skb_gro_header(skb, hlen, off); in tcp_gro_pull_header()
293 if (unlikely(!th)) in tcp_gro_pull_header()
296 thlen = th->doff * 4; in tcp_gro_pull_header()
297 if (thlen < sizeof(*th)) in tcp_gro_pull_header()
302 th = skb_gro_header_slow(skb, hlen, off); in tcp_gro_pull_header()
303 if (unlikely(!th)) in tcp_gro_pull_header()
309 return th; in tcp_gro_pull_header()
313 struct tcphdr *th) in tcp_gro_receive() argument
315 unsigned int thlen = th->doff * 4; in tcp_gro_receive()
326 flags = tcp_flag_word(th); in tcp_gro_receive()
328 p = tcp_gro_lookup(head, th); in tcp_gro_receive()
336 flush |= (__force int)(th->ack_seq ^ th2->ack_seq); in tcp_gro_receive()
337 for (i = sizeof(*th); i < thlen; i += 4) in tcp_gro_receive()
338 flush |= *(u32 *)((u8 *)th + i) ^ in tcp_gro_receive()
341 flush |= gro_receive_network_flush(th, th2, p); in tcp_gro_receive()
354 flush |= (ntohl(th2->seq) + skb_gro_len(p)) ^ ntohl(th->seq); in tcp_gro_receive()
397 struct tcphdr *th = tcp_hdr(skb); in tcp_gro_complete() local
403 skb->csum_start = (unsigned char *)th - skb->head; in tcp_gro_complete()
410 if (th->cwr) in tcp_gro_complete()
416 struct tcphdr *th) in tcp4_check_fraglist_gro() argument
427 p = tcp_gro_lookup(head, th); in tcp4_check_fraglist_gro()
437 iph->saddr, th->source, in tcp4_check_fraglist_gro()
438 iph->daddr, ntohs(th->dest), in tcp4_check_fraglist_gro()
448 struct tcphdr *th; in tcp4_gro_receive() local
456 th = tcp_gro_pull_header(skb); in tcp4_gro_receive()
457 if (!th) in tcp4_gro_receive()
460 tcp4_check_fraglist_gro(head, skb, th); in tcp4_gro_receive()
462 return tcp_gro_receive(head, skb, th); in tcp4_gro_receive()
473 struct tcphdr *th = tcp_hdr(skb); in tcp4_gro_complete() local
484 th->check = ~tcp_v4_check(skb->len - thoff, iph->saddr, in tcp4_gro_complete()