Changeset View
Changeset View
Standalone View
Standalone View
sys/netinet/tcp_output.c
Show First 20 Lines • Show All 1,278 Lines • ▼ Show 20 Lines | #endif | ||||
*/ | */ | ||||
if (tso) { | if (tso) { | ||||
KASSERT(len > tp->t_maxseg - optlen, | KASSERT(len > tp->t_maxseg - optlen, | ||||
("%s: len <= tso_segsz", __func__)); | ("%s: len <= tso_segsz", __func__)); | ||||
m->m_pkthdr.csum_flags |= CSUM_TSO; | m->m_pkthdr.csum_flags |= CSUM_TSO; | ||||
m->m_pkthdr.tso_segsz = tp->t_maxseg - optlen; | m->m_pkthdr.tso_segsz = tp->t_maxseg - optlen; | ||||
} | } | ||||
#if defined(IPSEC) || defined(IPSEC_SUPPORT) | KASSERT(len + hdrlen == m_length(m, NULL), | ||||
KASSERT(len + hdrlen + ipoptlen - ipsec_optlen == m_length(m, NULL), | ("%s: mbuf chain shorter than expected: %d + %u != %u", | ||||
("%s: mbuf chain shorter than expected: %d + %u + %u - %u != %u", | __func__, len, hdrlen, m_length(m, NULL))); | ||||
__func__, len, hdrlen, ipoptlen, ipsec_optlen, m_length(m, NULL))); | |||||
#else | |||||
KASSERT(len + hdrlen + ipoptlen == m_length(m, NULL), | |||||
("%s: mbuf chain shorter than expected: %d + %u + %u != %u", | |||||
__func__, len, hdrlen, ipoptlen, m_length(m, NULL))); | |||||
#endif | |||||
#ifdef TCP_HHOOK | #ifdef TCP_HHOOK | ||||
/* Run HHOOK_TCP_ESTABLISHED_OUT helper hooks. */ | /* Run HHOOK_TCP_ESTABLISHED_OUT helper hooks. */ | ||||
hhook_run_tcp_est_out(tp, th, &to, len, tso); | hhook_run_tcp_est_out(tp, th, &to, len, tso); | ||||
#endif | #endif | ||||
#ifdef TCPDEBUG | #ifdef TCPDEBUG | ||||
/* | /* | ||||
▲ Show 20 Lines • Show All 705 Lines • Show Last 20 Lines |