Lines Matching refs:th

113 tcp_lro_csum_th(struct tcphdr *th)
118 ch = th->th_sum = 0x0000;
119 l = th->th_off;
120 p = (uint16_t *)th;
135 tcp_lro_rx_csum_fixup(struct lro_entry *le, void *l3hdr, struct tcphdr *th,
187 cs = ~tcp_lro_csum_th(th);
201 struct tcphdr *th;
213 th = (struct tcphdr *)(ip6 + 1);
244 th = (struct tcphdr *)(ip4 + 1);
252 th = NULL; /* Keep compiler happy. */
258 th->th_ack = le->ack_seq;
259 th->th_win = le->window;
264 ts_ptr = (uint32_t *)(th + 1);
271 le->ulp_csum += tcp_lro_csum_th(th);
275 th->th_sum = (le->ulp_csum & 0xffff);
276 th->th_sum = ~th->th_sum;
278 th->th_sum = TCP_LRO_INVALID_CSUM;
292 struct tcphdr **th)
302 *th = (struct tcphdr *)(ip6 + 1);
311 struct tcphdr **th)
343 *th = (struct tcphdr *)(ip4 + 1);
360 struct tcphdr *th;
383 error = tcp_lro_rx_ipv6(lc, m, ip6, &th);
402 error = tcp_lro_rx_ipv4(lc, m, ip4, &th);
432 if ((th->th_flags & ~(TH_ACK | TH_PUSH)) != 0)
443 l = (th->th_off << 2);
445 l -= sizeof(*th);
446 ts_ptr = (uint32_t *)(th + 1);
454 csum = th->th_sum;
456 seq = ntohl(th->th_seq);
462 if (le->source_port != th->th_sport ||
463 le->dest_port != th->th_dport)
493 (tcp_data_len == 0 && le->ack_seq == th->th_ack))) {
512 le->ack_seq = th->th_ack;
513 le->window = th->th_win;
517 le->ulp_csum += tcp_lro_rx_csum_fixup(le, l3hdr, th,
581 le->source_port = th->th_sport;
582 le->dest_port = th->th_dport;
585 le->ack_seq = th->th_ack;
586 le->window = th->th_win;
604 le->ulp_csum = tcp_lro_rx_csum_fixup(le, l3hdr, th, tcp_data_len,
606 th->th_sum = csum; /* Restore checksum on first packet. */