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.
This commit is contained in:
parent
dca0aae557
commit
a29f457114
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user