diff options
author | mohans <mohans@FreeBSD.org> | 2006-04-06 17:21:16 +0000 |
---|---|---|
committer | mohans <mohans@FreeBSD.org> | 2006-04-06 17:21:16 +0000 |
commit | a29f457114ce2ace6c1e5ca9ab7b2df898f96da3 (patch) | |
tree | c83f84a26b9e4f3add49057cf7169294e4207031 /sys/netinet | |
parent | dca0aae557f7b8fdc5869248a4f0b6c408895da8 (diff) | |
download | FreeBSD-src-a29f457114ce2ace6c1e5ca9ab7b2df898f96da3.zip FreeBSD-src-a29f457114ce2ace6c1e5ca9ab7b2df898f96da3.tar.gz |
Eliminate debug code that catches bugs in the hinting of sack variables
(tcp_sack_output_debug checks cached hints aginst computed values by walking the
scoreboard and reports discrepancies). The sack hinting code has been stable for
many months now so it is time for the debug code to go. Leaving tcp_sack_output_debug
ifdef'ed out in case we need to resurrect it at a later point.
Diffstat (limited to 'sys/netinet')
-rw-r--r-- | sys/netinet/tcp_sack.c | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/sys/netinet/tcp_sack.c b/sys/netinet/tcp_sack.c index 2d0a2c1..ca68002 100644 --- a/sys/netinet/tcp_sack.c +++ b/sys/netinet/tcp_sack.c @@ -604,6 +604,7 @@ tcp_sack_partialack(tp, th) (void) tcp_output(tp); } +#if 0 /* * Debug version of tcp_sack_output() that walks the scoreboard. Used for * now to sanity check the hint. @@ -627,6 +628,7 @@ tcp_sack_output_debug(struct tcpcb *tp, int *sack_bytes_rexmt) } return (p); } +#endif /* * Returns the next hole to retransmit and the number of retransmitted bytes @@ -648,11 +650,9 @@ tcp_sack_output_debug(struct tcpcb *tp, int *sack_bytes_rexmt) struct sackhole * tcp_sack_output(struct tcpcb *tp, int *sack_bytes_rexmt) { - struct sackhole *hole = NULL, *dbg_hole = NULL; - int dbg_bytes_rexmt; + struct sackhole *hole = NULL; INP_LOCK_ASSERT(tp->t_inpcb); - dbg_hole = tcp_sack_output_debug(tp, &dbg_bytes_rexmt); *sack_bytes_rexmt = tp->sackhint.sack_bytes_rexmit; hole = tp->sackhint.nexthole; if (hole == NULL || SEQ_LT(hole->rxmit, hole->end)) @@ -664,16 +664,6 @@ tcp_sack_output(struct tcpcb *tp, int *sack_bytes_rexmt) } } out: - if (dbg_hole != hole) { - printf("%s: Computed sack hole not the same as cached value\n", __func__); - hole = dbg_hole; - } - if (*sack_bytes_rexmt != dbg_bytes_rexmt) { - printf("%s: Computed sack_bytes_retransmitted (%d) not " - "the same as cached value (%d)\n", - __func__, dbg_bytes_rexmt, *sack_bytes_rexmt); - *sack_bytes_rexmt = dbg_bytes_rexmt; - } return (hole); } |