diff options
author | harti <harti@FreeBSD.org> | 2003-08-13 08:46:54 +0000 |
---|---|---|
committer | harti <harti@FreeBSD.org> | 2003-08-13 08:46:54 +0000 |
commit | 88c7bba592d07711248e3f377659d48df9cb4d22 (patch) | |
tree | d0ccb6e5e23baebcc3432abd56460cb6375310c3 /sys | |
parent | d199702b34f6e64a91ba3126b29b5b1d926772c9 (diff) | |
download | FreeBSD-src-88c7bba592d07711248e3f377659d48df9cb4d22.zip FreeBSD-src-88c7bba592d07711248e3f377659d48df9cb4d22.tar.gz |
A number of patches in the last years have created new return paths
in tcp_input that leave the function before hitting the tcp_trace
function call for the TCPDEBUG option. This has made TCPDEBUG mostly
useless (and tools like ports/benchmarks/dbs not working). Add
tcp_trace calls to the return paths that could be identified in this
maze.
This is a NOP unless you compile with TCPDEBUG.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/netinet/tcp_input.c | 21 | ||||
-rw-r--r-- | sys/netinet/tcp_reass.c | 21 |
2 files changed, 42 insertions, 0 deletions
diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index a58e830..54a87bc 100644 --- a/sys/netinet/tcp_input.c +++ b/sys/netinet/tcp_input.c @@ -445,6 +445,10 @@ tcp_input(m, off0) ip->ip_len + IPPROTO_TCP)); th->th_sum ^= 0xffff; +#ifdef TCPDEBUG + ipov->ih_len = (u_short)tlen; + ipov->ih_len = htons(ipov->ih_len); +#endif } else { /* * Checksum extended TCP header and data. @@ -864,6 +868,11 @@ findpcb: * for syncache, or perform t/tcp connection. */ if (so->so_qlen <= so->so_qlimit) { +#ifdef TCPDEBUG + if (so->so_options & SO_DEBUG) + tcp_trace(TA_INPUT, ostate, tp, + (void *)tcp_saveipgen, &tcp_savetcp, 0); +#endif tcp_dooptions(&to, optp, optlen, 1); if (!syncache_add(&inc, &to, th, &so, m)) goto drop; @@ -1058,6 +1067,13 @@ after_listen: * wakeup/selwakeup/signal. If data * are ready to send, let tcp_output * decide between more output or persist. + +#ifdef TCPDEBUG + if (so->so_options & SO_DEBUG) + tcp_trace(TA_INPUT, ostate, tp, + (void *)tcp_saveipgen, + &tcp_savetcp, 0); +#endif */ if (tp->snd_una == tp->snd_max) callout_stop(tp->tt_rexmt); @@ -1097,6 +1113,11 @@ after_listen: tcpstat.tcps_rcvbyte += tlen; ND6_HINT(tp); /* some progress has been done */ /* +#ifdef TCPDEBUG + if (so->so_options & SO_DEBUG) + tcp_trace(TA_INPUT, ostate, tp, + (void *)tcp_saveipgen, &tcp_savetcp, 0); +#endif * Add data to socket buffer. */ if (so->so_state & SS_CANTRCVMORE) { diff --git a/sys/netinet/tcp_reass.c b/sys/netinet/tcp_reass.c index a58e830..54a87bc 100644 --- a/sys/netinet/tcp_reass.c +++ b/sys/netinet/tcp_reass.c @@ -445,6 +445,10 @@ tcp_input(m, off0) ip->ip_len + IPPROTO_TCP)); th->th_sum ^= 0xffff; +#ifdef TCPDEBUG + ipov->ih_len = (u_short)tlen; + ipov->ih_len = htons(ipov->ih_len); +#endif } else { /* * Checksum extended TCP header and data. @@ -864,6 +868,11 @@ findpcb: * for syncache, or perform t/tcp connection. */ if (so->so_qlen <= so->so_qlimit) { +#ifdef TCPDEBUG + if (so->so_options & SO_DEBUG) + tcp_trace(TA_INPUT, ostate, tp, + (void *)tcp_saveipgen, &tcp_savetcp, 0); +#endif tcp_dooptions(&to, optp, optlen, 1); if (!syncache_add(&inc, &to, th, &so, m)) goto drop; @@ -1058,6 +1067,13 @@ after_listen: * wakeup/selwakeup/signal. If data * are ready to send, let tcp_output * decide between more output or persist. + +#ifdef TCPDEBUG + if (so->so_options & SO_DEBUG) + tcp_trace(TA_INPUT, ostate, tp, + (void *)tcp_saveipgen, + &tcp_savetcp, 0); +#endif */ if (tp->snd_una == tp->snd_max) callout_stop(tp->tt_rexmt); @@ -1097,6 +1113,11 @@ after_listen: tcpstat.tcps_rcvbyte += tlen; ND6_HINT(tp); /* some progress has been done */ /* +#ifdef TCPDEBUG + if (so->so_options & SO_DEBUG) + tcp_trace(TA_INPUT, ostate, tp, + (void *)tcp_saveipgen, &tcp_savetcp, 0); +#endif * Add data to socket buffer. */ if (so->so_state & SS_CANTRCVMORE) { |