Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys Remove TCPREASS_DEBUG. It was introduced 20 years ago wh...
details: https://anonhg.NetBSD.org/src/rev/ece1d4ab6e6b
branches: trunk
changeset: 360763:ece1d4ab6e6b
user: maxv <maxv%NetBSD.org@localhost>
date: Thu Mar 29 18:54:48 2018 +0000
description:
Remove TCPREASS_DEBUG. It was introduced 20 years ago when the reassembler
was being developed, but it's irrelevant today. Makes the code clearer.
diffstat:
sys/arch/amd64/conf/ALL | 5 ++---
sys/arch/i386/conf/ALL | 5 ++---
sys/netinet/tcp_input.c | 34 ++--------------------------------
sys/netinet/tcp_subr.c | 12 ++----------
4 files changed, 8 insertions(+), 48 deletions(-)
diffs (174 lines):
diff -r 1959d5b8feb6 -r ece1d4ab6e6b sys/arch/amd64/conf/ALL
--- a/sys/arch/amd64/conf/ALL Thu Mar 29 18:34:32 2018 +0000
+++ b/sys/arch/amd64/conf/ALL Thu Mar 29 18:54:48 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: ALL,v 1.83 2018/03/16 12:48:54 maxv Exp $
+# $NetBSD: ALL,v 1.84 2018/03/29 18:54:48 maxv Exp $
# From NetBSD: GENERIC,v 1.787 2006/10/01 18:37:54 bouyer Exp
#
# ALL machine description file
@@ -17,7 +17,7 @@
options INCLUDE_CONFIG_FILE # embed config file in kernel binary
-#ident "ALL-$Revision: 1.83 $"
+#ident "ALL-$Revision: 1.84 $"
maxusers 64 # estimated number of users
@@ -2257,7 +2257,6 @@
options TCICDEBUG
options TCICISADEBUG
options TCPISS_DEBUG
-options TCPREASS_DEBUG
options TCTRLDEBUG
options TIMECOUNTER_DEBUG
options TIMEKEEPER_DEBUG
diff -r 1959d5b8feb6 -r ece1d4ab6e6b sys/arch/i386/conf/ALL
--- a/sys/arch/i386/conf/ALL Thu Mar 29 18:34:32 2018 +0000
+++ b/sys/arch/i386/conf/ALL Thu Mar 29 18:54:48 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: ALL,v 1.435 2018/03/16 12:48:54 maxv Exp $
+# $NetBSD: ALL,v 1.436 2018/03/29 18:54:48 maxv Exp $
# From NetBSD: GENERIC,v 1.787 2006/10/01 18:37:54 bouyer Exp
#
# ALL machine description file
@@ -17,7 +17,7 @@
options INCLUDE_CONFIG_FILE # embed config file in kernel binary
-#ident "ALL-$Revision: 1.435 $"
+#ident "ALL-$Revision: 1.436 $"
maxusers 64 # estimated number of users
@@ -2403,7 +2403,6 @@
options TCICDEBUG
options TCICISADEBUG
options TCPISS_DEBUG
-options TCPREASS_DEBUG
options TCTRLDEBUG
options TIMECOUNTER_DEBUG
options TIMEKEEPER_DEBUG
diff -r 1959d5b8feb6 -r ece1d4ab6e6b sys/netinet/tcp_input.c
--- a/sys/netinet/tcp_input.c Thu Mar 29 18:34:32 2018 +0000
+++ b/sys/netinet/tcp_input.c Thu Mar 29 18:54:48 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tcp_input.c,v 1.399 2018/03/29 17:46:17 maxv Exp $ */
+/* $NetBSD: tcp_input.c,v 1.400 2018/03/29 18:54:48 maxv Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -148,7 +148,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tcp_input.c,v 1.399 2018/03/29 17:46:17 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tcp_input.c,v 1.400 2018/03/29 18:54:48 maxv Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@@ -559,11 +559,6 @@
* for further overlaps.
*/
if (q->ipqe_seq + q->ipqe_len == pkt_seq) {
-#ifdef TCPREASS_DEBUG
- printf("tcp_reass[%p]: concat %u:%u(%u) to %u:%u(%u)\n",
- tp, pkt_seq, pkt_seq + pkt_len, pkt_len,
- q->ipqe_seq, q->ipqe_seq + q->ipqe_len, q->ipqe_len);
-#endif
pkt_len += q->ipqe_len;
pkt_flags |= q->ipqe_flags;
pkt_seq = q->ipqe_seq;
@@ -632,11 +627,6 @@
if (SEQ_LT(q->ipqe_seq, pkt_seq) &&
SEQ_GT(q->ipqe_seq + q->ipqe_len, pkt_seq)) {
int overlap = q->ipqe_seq + q->ipqe_len - pkt_seq;
-#ifdef TCPREASS_DEBUG
- printf("tcp_reass[%p]: trim starting %d bytes of %u:%u(%u)\n",
- tp, overlap,
- pkt_seq, pkt_seq + pkt_len, pkt_len);
-#endif
m_adj(m, overlap);
rcvpartdupbyte += overlap;
m_cat(q->ipre_mlast, m);
@@ -658,11 +648,6 @@
if (SEQ_GT(q->ipqe_seq, pkt_seq) &&
SEQ_LT(q->ipqe_seq, pkt_seq + pkt_len)) {
int overlap = pkt_seq + pkt_len - q->ipqe_seq;
-#ifdef TCPREASS_DEBUG
- printf("tcp_reass[%p]: trim trailing %d bytes of %u:%u(%u)\n",
- tp, overlap,
- pkt_seq, pkt_seq + pkt_len, pkt_len);
-#endif
m_adj(m, -overlap);
pkt_len -= overlap;
rcvpartdupbyte += overlap;
@@ -676,11 +661,6 @@
* and reinsert the data.
*/
if (q->ipqe_seq == pkt_seq + pkt_len) {
-#ifdef TCPREASS_DEBUG
- printf("tcp_reass[%p]: append %u:%u(%u) to %u:%u(%u)\n",
- tp, q->ipqe_seq, q->ipqe_seq + q->ipqe_len, q->ipqe_len,
- pkt_seq, pkt_seq + pkt_len, pkt_len);
-#endif
pkt_len += q->ipqe_len;
pkt_flags |= q->ipqe_flags;
m_cat(m, q->ipqe_m);
@@ -776,18 +756,8 @@
tiqe->ipqe_flags = pkt_flags;
if (p == NULL) {
TAILQ_INSERT_HEAD(&tp->segq, tiqe, ipqe_q);
-#ifdef TCPREASS_DEBUG
- if (tiqe->ipqe_seq != tp->rcv_nxt)
- printf("tcp_reass[%p]: insert %u:%u(%u) at front\n",
- tp, pkt_seq, pkt_seq + pkt_len, pkt_len);
-#endif
} else {
TAILQ_INSERT_AFTER(&tp->segq, p, tiqe, ipqe_q);
-#ifdef TCPREASS_DEBUG
- printf("tcp_reass[%p]: insert %u:%u(%u) after %u:%u(%u)\n",
- tp, pkt_seq, pkt_seq + pkt_len, pkt_len,
- p->ipqe_seq, p->ipqe_seq + p->ipqe_len, p->ipqe_len);
-#endif
}
tp->t_segqlen++;
diff -r 1959d5b8feb6 -r ece1d4ab6e6b sys/netinet/tcp_subr.c
--- a/sys/netinet/tcp_subr.c Thu Mar 29 18:34:32 2018 +0000
+++ b/sys/netinet/tcp_subr.c Thu Mar 29 18:54:48 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tcp_subr.c,v 1.275 2018/03/29 08:11:41 maxv Exp $ */
+/* $NetBSD: tcp_subr.c,v 1.276 2018/03/29 18:54:48 maxv Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -91,7 +91,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tcp_subr.c,v 1.275 2018/03/29 08:11:41 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tcp_subr.c,v 1.276 2018/03/29 18:54:48 maxv Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@@ -1236,18 +1236,10 @@
{
struct ipqent *qe;
int rv = 0;
-#ifdef TCPREASS_DEBUG
- int i = 0;
-#endif
TCP_REASS_LOCK_CHECK(tp);
while ((qe = TAILQ_FIRST(&tp->segq)) != NULL) {
-#ifdef TCPREASS_DEBUG
- printf("tcp_freeq[%p,%d]: %u:%u(%u) 0x%02x\n",
- tp, i++, qe->ipqe_seq, qe->ipqe_seq + qe->ipqe_len,
- qe->ipqe_len, qe->ipqe_flags & (TH_SYN|TH_FIN|TH_RST));
-#endif
TAILQ_REMOVE(&tp->segq, qe, ipqe_q);
TAILQ_REMOVE(&tp->timeq, qe, ipqe_timeq);
m_freem(qe->ipqe_m);
Home |
Main Index |
Thread Index |
Old Index