diff --git a/sys/conf/NOTES b/sys/conf/NOTES --- a/sys/conf/NOTES +++ b/sys/conf/NOTES @@ -1009,10 +1009,6 @@ # # PF_DEFAULT_TO_DROP causes the default pf(4) rule to deny everything. # -# TCPDEBUG enables code which keeps traces of the TCP state machine -# for sockets with the SO_DEBUG option set, which can then be examined -# using the trpt(8) utility. -# # TCPPCAP enables code which keeps the last n packets sent and received # on a TCP socket. # @@ -1037,7 +1033,6 @@ options IPFILTER_DEFAULT_BLOCK #block all packets by default options IPSTEALTH #support for stealth forwarding options PF_DEFAULT_TO_DROP #drop everything by default -options TCPDEBUG options TCPPCAP options TCP_BLACKBOX options TCP_HHOOK diff --git a/sys/conf/files b/sys/conf/files --- a/sys/conf/files +++ b/sys/conf/files @@ -4387,7 +4387,6 @@ netinet/sctp_usrreq.c optional inet sctp | inet6 sctp netinet/sctputil.c optional inet sctp | inet6 sctp netinet/siftr.c optional inet siftr alq | inet6 siftr alq -netinet/tcp_debug.c optional tcpdebug netinet/tcp_ecn.c optional inet | inet6 netinet/tcp_fastopen.c optional inet tcp_rfc7413 | inet6 tcp_rfc7413 netinet/tcp_hostcache.c optional inet | inet6 diff --git a/sys/conf/options b/sys/conf/options --- a/sys/conf/options +++ b/sys/conf/options @@ -465,7 +465,6 @@ FIB_ALGO opt_route.h RSS opt_rss.h SLIP_IFF_OPTS opt_slip.h -TCPDEBUG TCPPCAP opt_global.h SIFTR TCP_BLACKBOX opt_global.h diff --git a/sys/modules/tcp/bbr/Makefile b/sys/modules/tcp/bbr/Makefile --- a/sys/modules/tcp/bbr/Makefile +++ b/sys/modules/tcp/bbr/Makefile @@ -11,7 +11,6 @@ SRCS+= opt_inet.h opt_inet6.h opt_ipsec.h SRCS+= opt_kern_tls.h SRCS+= opt_ratelimit.h -SRCS+= opt_tcpdebug.h # # Enable full debugging diff --git a/sys/modules/tcp/rack/Makefile b/sys/modules/tcp/rack/Makefile --- a/sys/modules/tcp/rack/Makefile +++ b/sys/modules/tcp/rack/Makefile @@ -11,7 +11,6 @@ SRCS+= opt_inet.h opt_inet6.h opt_ipsec.h SRCS+= opt_kern_tls.h SRCS+= opt_ratelimit.h -SRCS+= opt_tcpdebug.h # # Enable full debugging diff --git a/sys/netinet/in_kdtrace.h b/sys/netinet/in_kdtrace.h --- a/sys/netinet/in_kdtrace.h +++ b/sys/netinet/in_kdtrace.h @@ -78,4 +78,55 @@ SDT_PROBE_DECLARE(udplite, , , receive); SDT_PROBE_DECLARE(udplite, , , send); +/* + * These constants originate from the 4.4BSD sys/protosw.h. They lost + * their initial purpose in 2c37256e5a59, when single pr_usrreq method + * was split into multiple methods. However, they were used by TCPDEBUG, + * a feature barely used, but it kept them in the tree for many years. + * In 5d06879adb95 DTrace probes started to use them. Note that they + * are not documented in dtrace_tcp(4), so they are likely to be + * eventually renamed to something better and extended/trimmed. + */ +#define PRU_ATTACH 0 /* attach protocol to up */ +#define PRU_DETACH 1 /* detach protocol from up */ +#define PRU_BIND 2 /* bind socket to address */ +#define PRU_LISTEN 3 /* listen for connection */ +#define PRU_CONNECT 4 /* establish connection to peer */ +#define PRU_ACCEPT 5 /* accept connection from peer */ +#define PRU_DISCONNECT 6 /* disconnect from peer */ +#define PRU_SHUTDOWN 7 /* won't send any more data */ +#define PRU_RCVD 8 /* have taken data; more room now */ +#define PRU_SEND 9 /* send this data */ +#define PRU_ABORT 10 /* abort (fast DISCONNECT, DETATCH) */ +#define PRU_CONTROL 11 /* control operations on protocol */ +#define PRU_SENSE 12 /* return status into m */ +#define PRU_RCVOOB 13 /* retrieve out of band data */ +#define PRU_SENDOOB 14 /* send out of band data */ +#define PRU_SOCKADDR 15 /* fetch socket's address */ +#define PRU_PEERADDR 16 /* fetch peer's address */ +#define PRU_CONNECT2 17 /* connect two sockets */ +/* begin for protocols internal use */ +#define PRU_FASTTIMO 18 /* 200ms timeout */ +#define PRU_SLOWTIMO 19 /* 500ms timeout */ +#define PRU_PROTORCV 20 /* receive from below */ +#define PRU_PROTOSEND 21 /* send to below */ +/* end for protocol's internal use */ +#define PRU_SEND_EOF 22 /* send and close */ +#define PRU_SOSETLABEL 23 /* MAC label change */ +#define PRU_CLOSE 24 /* socket close */ +#define PRU_FLUSH 25 /* flush the socket */ +#define PRU_NREQ 25 + +#ifdef PRUREQUESTS +const char *prurequests[] = { + "ATTACH", "DETACH", "BIND", "LISTEN", + "CONNECT", "ACCEPT", "DISCONNECT", "SHUTDOWN", + "RCVD", "SEND", "ABORT", "CONTROL", + "SENSE", "RCVOOB", "SENDOOB", "SOCKADDR", + "PEERADDR", "CONNECT2", "FASTTIMO", "SLOWTIMO", + "PROTORCV", "PROTOSEND", "SEND_EOF", "SOSETLABEL", + "CLOSE", "FLUSH", +}; +#endif + #endif diff --git a/sys/netinet/tcp_debug.h b/sys/netinet/tcp_debug.h deleted file mode 100644 --- a/sys/netinet/tcp_debug.h +++ /dev/null @@ -1,119 +0,0 @@ -/*- - * SPDX-License-Identifier: BSD-3-Clause - * - * Copyright (c) 1982, 1986, 1993 - * The Regents of the University of California. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * @(#)tcp_debug.h 8.1 (Berkeley) 6/10/93 - * $FreeBSD$ - */ - -#ifndef _NETINET_TCP_DEBUG_H_ -#define _NETINET_TCP_DEBUG_H_ - -struct tcp_debug { - uint32_t td_time; /* network format */ - short td_act; - short td_ostate; - caddr_t td_tcb; - int td_family; - /* - * Co-existense of td_ti and td_ti6 below is ugly, but it is necessary - * to achieve backword compatibility to some extent. - */ - struct tcpiphdr td_ti; - struct { -#define IP6_HDR_LEN 40 /* sizeof(struct ip6_hdr) */ -#if !defined(_KERNEL) && defined(INET6) - struct ip6_hdr ip6; -#else - u_char ip6buf[IP6_HDR_LEN]; -#endif - struct tcphdr th; - } td_ti6; -#define td_ip6buf td_ti6.ip6buf - short td_req; - struct tcpcb td_cb; -}; - -#define TA_INPUT 0 -#define TA_OUTPUT 1 -#define TA_USER 2 -#define TA_RESPOND 3 -#define TA_DROP 4 - -#ifdef TANAMES -static const char *tanames[] = - { "input", "output", "user", "respond", "drop" }; -#endif - -#define TCP_NDEBUG 100 - -/* These older constants are still present in order to support TCP debugging. */ -#define PRU_ATTACH 0 /* attach protocol to up */ -#define PRU_DETACH 1 /* detach protocol from up */ -#define PRU_BIND 2 /* bind socket to address */ -#define PRU_LISTEN 3 /* listen for connection */ -#define PRU_CONNECT 4 /* establish connection to peer */ -#define PRU_ACCEPT 5 /* accept connection from peer */ -#define PRU_DISCONNECT 6 /* disconnect from peer */ -#define PRU_SHUTDOWN 7 /* won't send any more data */ -#define PRU_RCVD 8 /* have taken data; more room now */ -#define PRU_SEND 9 /* send this data */ -#define PRU_ABORT 10 /* abort (fast DISCONNECT, DETATCH) */ -#define PRU_CONTROL 11 /* control operations on protocol */ -#define PRU_SENSE 12 /* return status into m */ -#define PRU_RCVOOB 13 /* retrieve out of band data */ -#define PRU_SENDOOB 14 /* send out of band data */ -#define PRU_SOCKADDR 15 /* fetch socket's address */ -#define PRU_PEERADDR 16 /* fetch peer's address */ -#define PRU_CONNECT2 17 /* connect two sockets */ -/* begin for protocols internal use */ -#define PRU_FASTTIMO 18 /* 200ms timeout */ -#define PRU_SLOWTIMO 19 /* 500ms timeout */ -#define PRU_PROTORCV 20 /* receive from below */ -#define PRU_PROTOSEND 21 /* send to below */ -/* end for protocol's internal use */ -#define PRU_SEND_EOF 22 /* send and close */ -#define PRU_SOSETLABEL 23 /* MAC label change */ -#define PRU_CLOSE 24 /* socket close */ -#define PRU_FLUSH 25 /* flush the socket */ -#define PRU_NREQ 25 - -#ifdef PRUREQUESTS -const char *prurequests[] = { - "ATTACH", "DETACH", "BIND", "LISTEN", - "CONNECT", "ACCEPT", "DISCONNECT", "SHUTDOWN", - "RCVD", "SEND", "ABORT", "CONTROL", - "SENSE", "RCVOOB", "SENDOOB", "SOCKADDR", - "PEERADDR", "CONNECT2", "FASTTIMO", "SLOWTIMO", - "PROTORCV", "PROTOSEND", "SEND_EOF", "SOSETLABEL", - "CLOSE", "FLUSH", -}; -#endif - -#endif /* !_NETINET_TCP_DEBUG_H_ */ diff --git a/sys/netinet/tcp_debug.c b/sys/netinet/tcp_debug.c deleted file mode 100644 --- a/sys/netinet/tcp_debug.c +++ /dev/null @@ -1,225 +0,0 @@ -/*- - * SPDX-License-Identifier: BSD-3-Clause - * - * Copyright (c) 1982, 1986, 1993 - * The Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * @(#)tcp_debug.c 8.1 (Berkeley) 6/10/93 - */ - -#include -__FBSDID("$FreeBSD$"); - -#include "opt_inet.h" -#include "opt_inet6.h" -#include "opt_tcpdebug.h" - -#ifdef TCPDEBUG -/* load symbolic names */ -#define PRUREQUESTS -#define TCPSTATES -#define TCPTIMERS -#define TANAMES -#endif - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#ifdef INET6 -#include -#endif -#include -#include -#include -#include -#include -#include -#include - -#ifdef TCPDEBUG -static int tcpconsdebug = 0; -#endif - -/* - * Global ring buffer of TCP debugging state. Each entry captures a snapshot - * of TCP connection state at any given moment. tcp_debx addresses at the - * next available slot. There is no explicit export of this data structure; - * it will be read via /dev/kmem by debugging tools. - */ -static struct tcp_debug tcp_debug[TCP_NDEBUG]; -static int tcp_debx; - -/* - * All global state is protected by tcp_debug_mtx; tcp_trace() is split into - * two parts, one of which saves connection and other state into the global - * array (locked by tcp_debug_mtx). - */ -struct mtx tcp_debug_mtx; -MTX_SYSINIT(tcp_debug_mtx, &tcp_debug_mtx, "tcp_debug_mtx", MTX_DEF); - -/* - * Save TCP state at a given moment; optionally, both tcpcb and TCP packet - * header state will be saved. - */ -void -tcp_trace(short act, short ostate, struct tcpcb *tp, void *ipgen, - struct tcphdr *th, int req) -{ -#ifdef INET6 - int isipv6; -#endif /* INET6 */ - tcp_seq seq, ack; - int len, flags; - struct tcp_debug *td; - - mtx_lock(&tcp_debug_mtx); - td = &tcp_debug[tcp_debx++]; - if (tcp_debx == TCP_NDEBUG) - tcp_debx = 0; - bzero(td, sizeof(*td)); -#ifdef INET6 - isipv6 = (ipgen != NULL && ((struct ip *)ipgen)->ip_v == 6) ? 1 : 0; -#endif /* INET6 */ - td->td_family = -#ifdef INET6 - (isipv6 != 0) ? AF_INET6 : -#endif - AF_INET; -#ifdef INET - td->td_time = iptime(); -#endif - td->td_act = act; - td->td_ostate = ostate; - td->td_tcb = (caddr_t)tp; - if (tp != NULL) - td->td_cb = *tp; - if (ipgen != NULL) { - switch (td->td_family) { -#ifdef INET - case AF_INET: - bcopy(ipgen, &td->td_ti.ti_i, sizeof(td->td_ti.ti_i)); - break; -#endif -#ifdef INET6 - case AF_INET6: - bcopy(ipgen, td->td_ip6buf, sizeof(td->td_ip6buf)); - break; -#endif - } - } - if (th != NULL) { - switch (td->td_family) { -#ifdef INET - case AF_INET: - td->td_ti.ti_t = *th; - break; -#endif -#ifdef INET6 - case AF_INET6: - td->td_ti6.th = *th; - break; -#endif - } - } - td->td_req = req; - mtx_unlock(&tcp_debug_mtx); -#ifdef TCPDEBUG - if (tcpconsdebug == 0) - return; - if (tp != NULL) - printf("%p %s:", tp, tcpstates[ostate]); - else - printf("???????? "); - printf("%s ", tanames[act]); - switch (act) { - case TA_INPUT: - case TA_OUTPUT: - case TA_DROP: - if (ipgen == NULL || th == NULL) - break; - seq = th->th_seq; - ack = th->th_ack; - len = -#ifdef INET6 - isipv6 ? ntohs(((struct ip6_hdr *)ipgen)->ip6_plen) : -#endif - ntohs(((struct ip *)ipgen)->ip_len); - if (act == TA_OUTPUT) { - seq = ntohl(seq); - ack = ntohl(ack); - } - if (act == TA_OUTPUT) - len -= sizeof (struct tcphdr); - if (len) - printf("[%x..%x)", seq, seq+len); - else - printf("%x", seq); - printf("@%x, urp=%x", ack, th->th_urp); - flags = tcp_get_flags(th); - if (flags) { - char *cp = "<"; -#define pf(f) { \ - if (tcp_get_flags(th) & TH_##f) { \ - printf("%s%s", cp, #f); \ - cp = ","; \ - } \ -} - pf(SYN); pf(ACK); pf(FIN); pf(RST); pf(PUSH); pf(URG); - printf(">"); - } - break; - - case TA_USER: - printf("%s", prurequests[req&0xff]); - if ((req & 0xff) == PRU_SLOWTIMO) - printf("<%s>", tcptimers[req>>8]); - break; - } - if (tp != NULL) - printf(" -> %s", tcpstates[tp->t_state]); - /* print out internal state of tp !?! */ - printf("\n"); - if (tp == NULL) - return; - printf( - "\trcv_(nxt,wnd,up) (%lx,%lx,%lx) snd_(una,nxt,max) (%lx,%lx,%lx)\n", - (u_long)tp->rcv_nxt, (u_long)tp->rcv_wnd, (u_long)tp->rcv_up, - (u_long)tp->snd_una, (u_long)tp->snd_nxt, (u_long)tp->snd_max); - printf("\tsnd_(wl1,wl2,wnd) (%lx,%lx,%lx)\n", - (u_long)tp->snd_wl1, (u_long)tp->snd_wl2, (u_long)tp->snd_wnd); -#endif /* TCPDEBUG */ -} diff --git a/sys/netinet/tcp_ecn.c b/sys/netinet/tcp_ecn.c --- a/sys/netinet/tcp_ecn.c +++ b/sys/netinet/tcp_ecn.c @@ -61,7 +61,6 @@ #include "opt_inet.h" #include "opt_inet6.h" -#include "opt_tcpdebug.h" #include #include diff --git a/sys/netinet/tcp_hpts.c b/sys/netinet/tcp_hpts.c --- a/sys/netinet/tcp_hpts.c +++ b/sys/netinet/tcp_hpts.c @@ -29,7 +29,6 @@ #include "opt_inet.h" #include "opt_inet6.h" #include "opt_rss.h" -#include "opt_tcpdebug.h" /** * Some notes about usage. diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c --- a/sys/netinet/tcp_input.c +++ b/sys/netinet/tcp_input.c @@ -55,7 +55,6 @@ #include "opt_inet.h" #include "opt_inet6.h" #include "opt_ipsec.h" -#include "opt_tcpdebug.h" #include #include @@ -632,15 +631,6 @@ #endif /* INET6 */ struct tcpopt to; /* options in this segment */ char *s = NULL; /* address and port logging */ -#ifdef TCPDEBUG - /* - * The size of tcp_saveipgen must be the size of the max ip header, - * now IPv6. - */ - u_char tcp_saveipgen[IP6_HDR_LEN]; - struct tcphdr tcp_savetcp; - short ostate = 0; -#endif NET_EPOCH_ASSERT(); @@ -1021,18 +1011,6 @@ #endif so = inp->inp_socket; KASSERT(so != NULL, ("%s: so == NULL", __func__)); -#ifdef TCPDEBUG - if (so->so_options & SO_DEBUG) { - ostate = tp->t_state; -#ifdef INET6 - if (isipv6) { - bcopy((char *)ip6, (char *)tcp_saveipgen, sizeof(*ip6)); - } else -#endif - bcopy((char *)ip, (char *)tcp_saveipgen, sizeof(*ip)); - tcp_savetcp = *th; - } -#endif /* TCPDEBUG */ /* * When the socket is accepting connections (the INPCB is in LISTEN * state) we look into the SYN cache if this is a new connection @@ -1344,11 +1322,6 @@ * SYN appears to be valid. Create compressed TCP state * for syncache. */ -#ifdef TCPDEBUG - if (so->so_options & SO_DEBUG) - tcp_trace(TA_INPUT, ostate, tp, - (void *)tcp_saveipgen, &tcp_savetcp, 0); -#endif TCP_PROBE3(debug__input, tp, th, m); tcp_dooptions(&to, optp, optlen, TO_SYN); if ((so = syncache_add(&inc, &to, th, inp, so, m, NULL, NULL, @@ -1528,15 +1501,6 @@ int tfo_syn; u_int maxseg; -#ifdef TCPDEBUG - /* - * The size of tcp_saveipgen must be the size of the max ip header, - * now IPv6. - */ - u_char tcp_saveipgen[IP6_HDR_LEN]; - struct tcphdr tcp_savetcp; - short ostate = 0; -#endif thflags = tcp_get_flags(th); tp->sackhint.last_sack_ack = 0; sack_changed = 0; @@ -1856,12 +1820,6 @@ * 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 TCP_PROBE3(debug__input, tp, th, m); /* * Clear t_acktime if remote side has ACKd @@ -1918,11 +1876,6 @@ tp->rcv_up = tp->rcv_nxt; TCPSTAT_ADD(tcps_rcvpack, nsegs); TCPSTAT_ADD(tcps_rcvbyte, tlen); -#ifdef TCPDEBUG - if (so->so_options & SO_DEBUG) - tcp_trace(TA_INPUT, ostate, tp, - (void *)tcp_saveipgen, &tcp_savetcp, 0); -#endif TCP_PROBE3(debug__input, tp, th, m); newsize = tcp_autorcvbuf(m, th, so, tp, tlen); @@ -3298,11 +3251,6 @@ return; } } -#ifdef TCPDEBUG - if (so->so_options & SO_DEBUG) - tcp_trace(TA_INPUT, ostate, tp, (void *)tcp_saveipgen, - &tcp_savetcp, 0); -#endif TCP_PROBE3(debug__input, tp, th, m); /* @@ -3344,11 +3292,6 @@ tcp_log_end_status(tp, TCP_EI_STATUS_RST_IN_FRONT); goto dropwithreset; } -#ifdef TCPDEBUG - if (so->so_options & SO_DEBUG) - tcp_trace(TA_DROP, ostate, tp, (void *)tcp_saveipgen, - &tcp_savetcp, 0); -#endif TCP_PROBE3(debug__input, tp, th, m); tp->t_flags |= TF_ACKNOW; (void) tcp_output(tp); @@ -3368,11 +3311,6 @@ /* * Drop space held by incoming segment and return. */ -#ifdef TCPDEBUG - if (tp == NULL || (inp->inp_socket->so_options & SO_DEBUG)) - tcp_trace(TA_DROP, ostate, tp, (void *)tcp_saveipgen, - &tcp_savetcp, 0); -#endif TCP_PROBE3(debug__input, tp, th, m); if (tp != NULL) { INP_WUNLOCK(inp); diff --git a/sys/netinet/tcp_output.c b/sys/netinet/tcp_output.c --- a/sys/netinet/tcp_output.c +++ b/sys/netinet/tcp_output.c @@ -38,7 +38,6 @@ #include "opt_inet6.h" #include "opt_ipsec.h" #include "opt_kern_tls.h" -#include "opt_tcpdebug.h" #include #include @@ -93,9 +92,6 @@ #ifdef TCPPCAP #include #endif -#ifdef TCPDEBUG -#include -#endif #ifdef TCP_OFFLOAD #include #endif @@ -206,9 +202,6 @@ u_int if_hw_tsomaxsegsize = 0; struct mbuf *m; struct ip *ip = NULL; -#ifdef TCPDEBUG - struct ipovly *ipov = NULL; -#endif struct tcphdr *th; u_char opt[TCP_MAXOLEN]; unsigned ipoptlen, optlen, hdrlen, ulen; @@ -1175,9 +1168,6 @@ #endif /* INET6 */ { ip = mtod(m, struct ip *); -#ifdef TCPDEBUG - ipov = (struct ipovly *)ip; -#endif if (tp->t_port) { udp = (struct udphdr *)((caddr_t)ip + sizeof(struct ip)); udp->uh_sport = htons(V_tcp_udp_tunneling_port); @@ -1419,26 +1409,6 @@ hhook_run_tcp_est_out(tp, th, &to, len, tso); #endif -#ifdef TCPDEBUG - /* - * Trace. - */ - if (so->so_options & SO_DEBUG) { - u_short save = 0; -#ifdef INET6 - if (!isipv6) -#endif - { - save = ipov->ih_len; - ipov->ih_len = htons(m->m_pkthdr.len /* - hdrlen + (th->th_off << 2) */); - } - tcp_trace(TA_OUTPUT, tp->t_state, tp, mtod(m, void *), th, 0); -#ifdef INET6 - if (!isipv6) -#endif - ipov->ih_len = save; - } -#endif /* TCPDEBUG */ TCP_PROBE3(debug__output, tp, th, m); /* We're getting ready to send; log now. */ diff --git a/sys/netinet/tcp_ratelimit.c b/sys/netinet/tcp_ratelimit.c --- a/sys/netinet/tcp_ratelimit.c +++ b/sys/netinet/tcp_ratelimit.c @@ -36,7 +36,6 @@ #include "opt_inet.h" #include "opt_inet6.h" #include "opt_ipsec.h" -#include "opt_tcpdebug.h" #include "opt_ratelimit.h" #include #include diff --git a/sys/netinet/tcp_reass.c b/sys/netinet/tcp_reass.c --- a/sys/netinet/tcp_reass.c +++ b/sys/netinet/tcp_reass.c @@ -36,7 +36,6 @@ #include "opt_inet.h" #include "opt_inet6.h" -#include "opt_tcpdebug.h" /* For debugging we want counters and BB logging */ /* #define TCP_REASS_COUNTERS 1 */ @@ -81,9 +80,6 @@ #include #endif #include -#ifdef TCPDEBUG -#include -#endif /* TCPDEBUG */ #define TCP_R_LOG_ADD 1 #define TCP_R_LOG_LIMIT_REACHED 2 diff --git a/sys/netinet/tcp_sack.c b/sys/netinet/tcp_sack.c --- a/sys/netinet/tcp_sack.c +++ b/sys/netinet/tcp_sack.c @@ -77,7 +77,6 @@ #include "opt_inet.h" #include "opt_inet6.h" -#include "opt_tcpdebug.h" #include #include @@ -119,9 +118,6 @@ #include #include #include -#ifdef TCPDEBUG -#include -#endif /* TCPDEBUG */ #include diff --git a/sys/netinet/tcp_stacks/bbr.c b/sys/netinet/tcp_stacks/bbr.c --- a/sys/netinet/tcp_stacks/bbr.c +++ b/sys/netinet/tcp_stacks/bbr.c @@ -36,7 +36,6 @@ #include "opt_inet.h" #include "opt_inet6.h" #include "opt_ipsec.h" -#include "opt_tcpdebug.h" #include "opt_ratelimit.h" #include #include @@ -99,9 +98,6 @@ #include #include #include -#ifdef TCPDEBUG -#include -#endif /* TCPDEBUG */ #ifdef TCP_OFFLOAD #include #endif @@ -8409,16 +8405,7 @@ #ifdef NETFLIX_SB_LIMITS u_int mcnt, appended; #endif -#ifdef TCPDEBUG - /* - * The size of tcp_saveipgen must be the size of the max ip header, - * now IPv6. - */ - u_char tcp_saveipgen[IP6_HDR_LEN]; - struct tcphdr tcp_savetcp; - short ostate = 0; -#endif /* On the hpts and we would have called output */ bbr = (struct tcp_bbr *)tp->t_fb_ptr; @@ -8493,11 +8480,6 @@ tp->rcv_up = tp->rcv_nxt; KMOD_TCPSTAT_ADD(tcps_rcvpack, (int)nsegs); KMOD_TCPSTAT_ADD(tcps_rcvbyte, tlen); -#ifdef TCPDEBUG - if (so->so_options & SO_DEBUG) - tcp_trace(TA_INPUT, ostate, tp, - (void *)tcp_saveipgen, &tcp_savetcp, 0); -#endif newsize = tcp_autorcvbuf(m, th, so, tp, tlen); /* Add data to socket buffer. */ @@ -8555,16 +8537,6 @@ int32_t acked; uint16_t nsegs; uint32_t sack_changed; -#ifdef TCPDEBUG - /* - * The size of tcp_saveipgen must be the size of the max ip header, - * now IPv6. - */ - u_char tcp_saveipgen[IP6_HDR_LEN]; - struct tcphdr tcp_savetcp; - short ostate = 0; - -#endif uint32_t prev_acked = 0; struct tcp_bbr *bbr; @@ -8704,14 +8676,8 @@ * value. If process is waiting for space, wakeup/selwakeup/signal. * If data are ready to send, let tcp_output decide between more * output or persist. + * Wake up the socket if we have room to write more. */ -#ifdef TCPDEBUG - if (so->so_options & SO_DEBUG) - tcp_trace(TA_INPUT, ostate, tp, - (void *)tcp_saveipgen, - &tcp_savetcp, 0); -#endif - /* Wake up the socket if we have room to write more */ sowwakeup(so); if (tp->snd_una == tp->snd_max) { /* Nothing left outstanding */ @@ -11847,9 +11813,6 @@ uint32_t if_hw_tsomaxsegsize = 0; uint32_t if_hw_tsomax = 0; struct ip *ip = NULL; -#ifdef TCPDEBUG - struct ipovly *ipov = NULL; -#endif struct tcp_bbr *bbr; struct tcphdr *th; struct udphdr *udp = NULL; @@ -13298,9 +13261,6 @@ #endif /* INET6 */ { ip = mtod(m, struct ip *); -#ifdef TCPDEBUG - ipov = (struct ipovly *)ip; -#endif if (tp->t_port) { udp = (struct udphdr *)((caddr_t)ip + sizeof(struct ip)); udp->uh_sport = htons(V_tcp_udp_tunneling_port); @@ -13511,28 +13471,6 @@ /* Run HHOOK_TC_ESTABLISHED_OUT helper hooks. */ hhook_run_tcp_est_out(tp, th, &to, len, tso); #endif -#ifdef TCPDEBUG - /* - * Trace. - */ - if (so->so_options & SO_DEBUG) { - u_short save = 0; - -#ifdef INET6 - if (!isipv6) -#endif - { - save = ipov->ih_len; - ipov->ih_len = htons(m->m_pkthdr.len /* - hdrlen + - * (th->th_off << 2) */ ); - } - tcp_trace(TA_OUTPUT, tp->t_state, tp, mtod(m, void *), th, 0); -#ifdef INET6 - if (!isipv6) -#endif - ipov->ih_len = save; - } -#endif /* TCPDEBUG */ /* Log to the black box */ if (tp->t_logstate != TCP_LOG_STATE_OFF) { diff --git a/sys/netinet/tcp_stacks/rack.c b/sys/netinet/tcp_stacks/rack.c --- a/sys/netinet/tcp_stacks/rack.c +++ b/sys/netinet/tcp_stacks/rack.c @@ -30,7 +30,6 @@ #include "opt_inet.h" #include "opt_inet6.h" #include "opt_ipsec.h" -#include "opt_tcpdebug.h" #include "opt_ratelimit.h" #include "opt_kern_tls.h" #include @@ -105,9 +104,6 @@ #ifdef NETFLIX_SHARED_CWND #include #endif -#ifdef TCPDEBUG -#include -#endif /* TCPDEBUG */ #ifdef TCP_OFFLOAD #include #endif @@ -10797,16 +10793,7 @@ #ifdef NETFLIX_SB_LIMITS u_int mcnt, appended; #endif -#ifdef TCPDEBUG - /* - * The size of tcp_saveipgen must be the size of the max ip header, - * now IPv6. - */ - u_char tcp_saveipgen[IP6_HDR_LEN]; - struct tcphdr tcp_savetcp; - short ostate = 0; -#endif /* * If last ACK falls within this segment's sequence numbers, record * the timestamp. NOTE that the test is modified according to the @@ -10882,11 +10869,6 @@ tp->rcv_up = tp->rcv_nxt; KMOD_TCPSTAT_ADD(tcps_rcvpack, nsegs); KMOD_TCPSTAT_ADD(tcps_rcvbyte, tlen); -#ifdef TCPDEBUG - if (so->so_options & SO_DEBUG) - tcp_trace(TA_INPUT, ostate, tp, - (void *)tcp_saveipgen, &tcp_savetcp, 0); -#endif newsize = tcp_autorcvbuf(m, th, so, tp, tlen); /* Add data to socket buffer. */ @@ -10937,15 +10919,6 @@ { int32_t acked; int32_t nsegs; -#ifdef TCPDEBUG - /* - * The size of tcp_saveipgen must be the size of the max ip header, - * now IPv6. - */ - u_char tcp_saveipgen[IP6_HDR_LEN]; - struct tcphdr tcp_savetcp; - short ostate = 0; -#endif int32_t under_pacing = 0; struct tcp_rack *rack; @@ -11114,12 +11087,6 @@ * 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 (under_pacing && (rack->use_fixed_rate == 0) && (rack->in_probe_rtt == 0) && diff --git a/sys/netinet/tcp_stacks/rack_bbr_common.c b/sys/netinet/tcp_stacks/rack_bbr_common.c --- a/sys/netinet/tcp_stacks/rack_bbr_common.c +++ b/sys/netinet/tcp_stacks/rack_bbr_common.c @@ -36,7 +36,6 @@ #include "opt_inet.h" #include "opt_inet6.h" #include "opt_ipsec.h" -#include "opt_tcpdebug.h" #include "opt_ratelimit.h" #include "opt_kern_tls.h" #include @@ -100,9 +99,6 @@ #include #include #include -#ifdef TCPDEBUG -#include -#endif /* TCPDEBUG */ #ifdef TCP_OFFLOAD #include #endif diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c --- a/sys/netinet/tcp_subr.c +++ b/sys/netinet/tcp_subr.c @@ -38,7 +38,6 @@ #include "opt_inet6.h" #include "opt_ipsec.h" #include "opt_kern_tls.h" -#include "opt_tcpdebug.h" #include #include @@ -115,9 +114,6 @@ #ifdef TCPPCAP #include #endif -#ifdef TCPDEBUG -#include -#endif #ifdef TCP_OFFLOAD #include #endif @@ -2077,10 +2073,6 @@ } } #endif /* INET */ -#ifdef TCPDEBUG - if (tp == NULL || (inp->inp_socket->so_options & SO_DEBUG)) - tcp_trace(TA_OUTPUT, 0, tp, mtod(m, void *), th, 0); -#endif TCP_PROBE3(debug__output, tp, th, m); if (flags & TH_RST) TCP_PROBE5(accept__refused, NULL, NULL, m, tp, nth); diff --git a/sys/netinet/tcp_timer.c b/sys/netinet/tcp_timer.c --- a/sys/netinet/tcp_timer.c +++ b/sys/netinet/tcp_timer.c @@ -36,7 +36,6 @@ #include "opt_inet.h" #include "opt_inet6.h" -#include "opt_tcpdebug.h" #include "opt_rss.h" #include diff --git a/sys/netinet/tcp_timewait.c b/sys/netinet/tcp_timewait.c --- a/sys/netinet/tcp_timewait.c +++ b/sys/netinet/tcp_timewait.c @@ -37,7 +37,6 @@ #include "opt_inet.h" #include "opt_inet6.h" #include "opt_ipsec.h" -#include "opt_tcpdebug.h" #include #include @@ -83,9 +82,6 @@ #include #include #include -#ifdef TCPDEBUG -#include -#endif #include #include diff --git a/sys/netinet/tcp_usrreq.c b/sys/netinet/tcp_usrreq.c --- a/sys/netinet/tcp_usrreq.c +++ b/sys/netinet/tcp_usrreq.c @@ -45,7 +45,6 @@ #include "opt_inet6.h" #include "opt_ipsec.h" #include "opt_kern_tls.h" -#include "opt_tcpdebug.h" #include #include @@ -133,17 +132,6 @@ static int tcp_pru_options_support(struct tcpcb *tp, int flags); -#ifdef TCPDEBUG -#define TCPDEBUG0 int ostate = 0 -#define TCPDEBUG1() ostate = tp ? tp->t_state : 0 -#define TCPDEBUG2(req) if (tp && (so->so_options & SO_DEBUG)) \ - tcp_trace(TA_USER, ostate, tp, 0, 0, req) -#else -#define TCPDEBUG0 -#define TCPDEBUG1() -#define TCPDEBUG2(req) -#endif - /* * tcp_require_unique port requires a globally-unique source port for each * outgoing connection. The default is to require the 4-tuple to be unique. @@ -164,11 +152,9 @@ struct inpcb *inp; struct tcpcb *tp = NULL; int error; - TCPDEBUG0; inp = sotoinpcb(so); KASSERT(inp == NULL, ("tcp_usr_attach: inp != NULL")); - TCPDEBUG1(); error = soreserve(so, V_tcp_sendspace, V_tcp_recvspace); if (error) @@ -191,7 +177,6 @@ INP_WUNLOCK(inp); TCPSTATES_INC(TCPS_CLOSED); out: - TCPDEBUG2(PRU_ATTACH); TCP_PROBE2(debug__user, tp, PRU_ATTACH); return (error); } @@ -260,7 +245,6 @@ if (IN_MULTICAST(ntohl(sinp->sin_addr.s_addr))) return (EAFNOSUPPORT); - TCPDEBUG0; inp = sotoinpcb(so); KASSERT(inp != NULL, ("tcp_usr_bind: inp == NULL")); INP_WLOCK(inp); @@ -271,12 +255,10 @@ #ifdef KDTRACE_HOOKS tp = intotcpcb(inp); #endif - TCPDEBUG1(); INP_HASH_WLOCK(&V_tcbinfo); error = in_pcbbind(inp, nam, td->td_ucred); INP_HASH_WUNLOCK(&V_tcbinfo); out: - TCPDEBUG2(PRU_BIND); TCP_PROBE2(debug__user, tp, PRU_BIND); INP_WUNLOCK(inp); @@ -309,7 +291,6 @@ if (IN6_IS_ADDR_MULTICAST(&sin6->sin6_addr)) return (EAFNOSUPPORT); - TCPDEBUG0; inp = sotoinpcb(so); KASSERT(inp != NULL, ("tcp6_usr_bind: inp == NULL")); INP_WLOCK(inp); @@ -321,7 +302,6 @@ #ifdef KDTRACE_HOOKS tp = intotcpcb(inp); #endif - TCPDEBUG1(); INP_HASH_WLOCK(&V_tcbinfo); inp->inp_vflag &= ~INP_IPV4; inp->inp_vflag |= INP_IPV6; @@ -352,7 +332,6 @@ out: if (error != 0) inp->inp_vflag = vflagsav; - TCPDEBUG2(PRU_BIND); TCP_PROBE2(debug__user, tp, PRU_BIND); INP_WUNLOCK(inp); return (error); @@ -370,7 +349,6 @@ struct inpcb *inp; struct tcpcb *tp = NULL; - TCPDEBUG0; inp = sotoinpcb(so); KASSERT(inp != NULL, ("tcp_usr_listen: inp == NULL")); INP_WLOCK(inp); @@ -379,7 +357,6 @@ goto out; } tp = intotcpcb(inp); - TCPDEBUG1(); SOCK_LOCK(so); error = solisten_proto_check(so); if (error != 0) { @@ -407,7 +384,6 @@ tp->t_tfo_pending = tcp_fastopen_alloc_counter(); out: - TCPDEBUG2(PRU_LISTEN); TCP_PROBE2(debug__user, tp, PRU_LISTEN); INP_WUNLOCK(inp); return (error); @@ -423,7 +399,6 @@ struct tcpcb *tp = NULL; u_char vflagsav; - TCPDEBUG0; inp = sotoinpcb(so); KASSERT(inp != NULL, ("tcp6_usr_listen: inp == NULL")); INP_WLOCK(inp); @@ -433,7 +408,6 @@ } vflagsav = inp->inp_vflag; tp = intotcpcb(inp); - TCPDEBUG1(); SOCK_LOCK(so); error = solisten_proto_check(so); if (error != 0) { @@ -467,7 +441,6 @@ inp->inp_vflag = vflagsav; out: - TCPDEBUG2(PRU_LISTEN); TCP_PROBE2(debug__user, tp, PRU_LISTEN); INP_WUNLOCK(inp); return (error); @@ -507,7 +480,6 @@ if ((error = prison_remote_ip4(td->td_ucred, &sinp->sin_addr)) != 0) return (error); - TCPDEBUG0; inp = sotoinpcb(so); KASSERT(inp != NULL, ("tcp_usr_connect: inp == NULL")); INP_WLOCK(inp); @@ -520,7 +492,6 @@ goto out; } tp = intotcpcb(inp); - TCPDEBUG1(); NET_EPOCH_ENTER(et); if ((error = tcp_connect(tp, nam, td)) != 0) goto out_in_epoch; @@ -537,7 +508,6 @@ out_in_epoch: NET_EPOCH_EXIT(et); out: - TCPDEBUG2(PRU_CONNECT); TCP_PROBE2(debug__user, tp, PRU_CONNECT); INP_WUNLOCK(inp); return (error); @@ -556,8 +526,6 @@ u_int8_t incflagsav; u_char vflagsav; - TCPDEBUG0; - sin6 = (struct sockaddr_in6 *)nam; if (nam->sa_family != AF_INET6) return (EAFNOSUPPORT); @@ -584,7 +552,6 @@ goto out; } tp = intotcpcb(inp); - TCPDEBUG1(); #ifdef INET /* * XXXRW: Some confusion: V4/V6 flags relate to binding, and @@ -665,7 +632,6 @@ inp->inp_inc.inc_flags = incflagsav; } - TCPDEBUG2(PRU_CONNECT); TCP_PROBE2(debug__user, tp, PRU_CONNECT); INP_WUNLOCK(inp); return (error); @@ -691,7 +657,6 @@ struct epoch_tracker et; int error = 0; - TCPDEBUG0; NET_EPOCH_ENTER(et); inp = sotoinpcb(so); KASSERT(inp != NULL, ("tcp_usr_disconnect: inp == NULL")); @@ -701,10 +666,8 @@ goto out; } tp = intotcpcb(inp); - TCPDEBUG1(); tcp_disconnect(tp); out: - TCPDEBUG2(PRU_DISCONNECT); TCP_PROBE2(debug__user, tp, PRU_DISCONNECT); INP_WUNLOCK(inp); NET_EPOCH_EXIT(et); @@ -726,7 +689,6 @@ #endif struct in_addr addr; in_port_t port = 0; - TCPDEBUG0; if (so->so_state & SS_ISDISCONNECTED) return (ECONNABORTED); @@ -741,7 +703,6 @@ #ifdef KDTRACE_HOOKS tp = intotcpcb(inp); #endif - TCPDEBUG1(); /* * We inline in_getpeeraddr and COMMON_END here, so that we can @@ -752,7 +713,6 @@ addr = inp->inp_faddr; out: - TCPDEBUG2(PRU_ACCEPT); TCP_PROBE2(debug__user, tp, PRU_ACCEPT); INP_WUNLOCK(inp); if (error == 0) @@ -775,7 +735,6 @@ struct epoch_tracker et; in_port_t port = 0; int v4 = 0; - TCPDEBUG0; if (so->so_state & SS_ISDISCONNECTED) return (ECONNABORTED); @@ -791,7 +750,6 @@ #ifdef KDTRACE_HOOKS tp = intotcpcb(inp); #endif - TCPDEBUG1(); /* * We inline in6_mapped_peeraddr and COMMON_END here, so that we can @@ -808,7 +766,6 @@ } out: - TCPDEBUG2(PRU_ACCEPT); TCP_PROBE2(debug__user, tp, PRU_ACCEPT); INP_WUNLOCK(inp); NET_EPOCH_EXIT(et); @@ -833,7 +790,6 @@ struct tcpcb *tp = NULL; struct epoch_tracker et; - TCPDEBUG0; inp = sotoinpcb(so); KASSERT(inp != NULL, ("inp == NULL")); INP_WLOCK(inp); @@ -843,12 +799,10 @@ } tp = intotcpcb(inp); NET_EPOCH_ENTER(et); - TCPDEBUG1(); socantsendmore(so); tcp_usrclosed(tp); if (!(inp->inp_flags & INP_DROPPED)) error = tcp_output_nodrop(tp); - TCPDEBUG2(PRU_SHUTDOWN); TCP_PROBE2(debug__user, tp, PRU_SHUTDOWN); error = tcp_unlock_or_drop(tp, error); NET_EPOCH_EXIT(et); @@ -867,7 +821,6 @@ struct tcpcb *tp = NULL; int outrv = 0, error = 0; - TCPDEBUG0; inp = sotoinpcb(so); KASSERT(inp != NULL, ("tcp_usr_rcvd: inp == NULL")); INP_WLOCK(inp); @@ -877,7 +830,6 @@ } tp = intotcpcb(inp); NET_EPOCH_ENTER(et); - TCPDEBUG1(); /* * For passively-created TFO connections, don't attempt a window * update while still in SYN_RECEIVED as this may trigger an early @@ -895,7 +847,6 @@ #endif outrv = tcp_output_nodrop(tp); out: - TCPDEBUG2(PRU_RCVD); TCP_PROBE2(debug__user, tp, PRU_RCVD); (void) tcp_unlock_or_drop(tp, outrv); NET_EPOCH_EXIT(et); @@ -929,7 +880,6 @@ u_int8_t incflagsav; u_char vflagsav; bool restoreflags; - TCPDEBUG0; if (control != NULL) { /* TCP doesn't do control messages (rights, creds, etc) */ @@ -960,7 +910,6 @@ (error = tcp_pru_options_support(tp, PRUS_OOB)) != 0) goto out; - TCPDEBUG1(); if (nam != NULL && tp->t_state < TCPS_SYN_SENT) { if (tp->t_state == TCPS_LISTEN) { error = EINVAL; @@ -1222,8 +1171,6 @@ inp->inp_vflag = vflagsav; inp->inp_inc.inc_flags = incflagsav; } - TCPDEBUG2((flags & PRUS_OOB) ? PRU_SENDOOB : - ((flags & PRUS_EOF) ? PRU_SEND_EOF : PRU_SEND)); TCP_PROBE2(debug__user, tp, (flags & PRUS_OOB) ? PRU_SENDOOB : ((flags & PRUS_EOF) ? PRU_SEND_EOF : PRU_SEND)); error = tcp_unlock_or_drop(tp, error); @@ -1271,7 +1218,6 @@ struct inpcb *inp; struct tcpcb *tp = NULL; struct epoch_tracker et; - TCPDEBUG0; inp = sotoinpcb(so); KASSERT(inp != NULL, ("tcp_usr_abort: inp == NULL")); @@ -1286,11 +1232,9 @@ */ if (!(inp->inp_flags & INP_DROPPED)) { tp = intotcpcb(inp); - TCPDEBUG1(); tp = tcp_drop(tp, ECONNABORTED); if (tp == NULL) goto dropped; - TCPDEBUG2(PRU_ABORT); TCP_PROBE2(debug__user, tp, PRU_ABORT); } if (!(inp->inp_flags & INP_DROPPED)) { @@ -1311,7 +1255,6 @@ struct inpcb *inp; struct tcpcb *tp = NULL; struct epoch_tracker et; - TCPDEBUG0; inp = sotoinpcb(so); KASSERT(inp != NULL, ("tcp_usr_close: inp == NULL")); @@ -1328,9 +1271,7 @@ if (!(inp->inp_flags & INP_DROPPED)) { tp = intotcpcb(inp); tp->t_flags |= TF_CLOSED; - TCPDEBUG1(); tcp_disconnect(tp); - TCPDEBUG2(PRU_CLOSE); TCP_PROBE2(debug__user, tp, PRU_CLOSE); } if (!(inp->inp_flags & INP_DROPPED)) { @@ -1369,7 +1310,6 @@ struct inpcb *inp; struct tcpcb *tp = NULL; - TCPDEBUG0; inp = sotoinpcb(so); KASSERT(inp != NULL, ("tcp_usr_rcvoob: inp == NULL")); INP_WLOCK(inp); @@ -1382,7 +1322,6 @@ if (error) { goto out; } - TCPDEBUG1(); if ((so->so_oobmark == 0 && (so->so_rcv.sb_state & SBS_RCVATMARK) == 0) || so->so_options & SO_OOBINLINE || @@ -1400,7 +1339,6 @@ tp->t_oobflags ^= (TCPOOB_HAVEDATA | TCPOOB_HADDATA); out: - TCPDEBUG2(PRU_RCVOOB); TCP_PROBE2(debug__user, tp, PRU_RCVOOB); INP_WUNLOCK(inp); return (error);