Commit eb2d1563 authored by Olivier Crête's avatar Olivier Crête

pseudotcp: Improve debug prints

parent 083494f5
......@@ -2548,8 +2548,8 @@ process(PseudoTcpSocket *self, Segment *seg)
priv->rx_rto = bound(MIN_RTO,
priv->rx_srtt + max(1LU, 4 * priv->rx_rttvar), MAX_RTO);
DEBUG (PSEUDO_TCP_DEBUG_VERBOSE, "rtt: %ld srtt: %u rto: %u",
rtt, priv->rx_srtt, priv->rx_rto);
DEBUG (PSEUDO_TCP_DEBUG_VERBOSE, "rtt: %ld srtt: %u rttvar: %u rto: %u",
rtt, priv->rx_srtt, priv->rx_rttvar, priv->rx_rto);
} else {
DEBUG (PSEUDO_TCP_DEBUG_NORMAL, "Invalid RTT: %ld", rtt);
goto done;
......@@ -2599,7 +2599,7 @@ process(PseudoTcpSocket *self, Segment *seg)
guint32 nInFlight = priv->snd_nxt - priv->snd_una;
// (Fast Retransmit)
priv->cwnd = min(priv->ssthresh, nInFlight + priv->mss);
DEBUG (PSEUDO_TCP_DEBUG_NORMAL, "exit recovery cwd=%d ssthresh=%d nInFlight=%d mss: %d", priv->cwnd, priv->ssthresh, nInFlight, priv->mss);
DEBUG (PSEUDO_TCP_DEBUG_NORMAL, "exit recovery cwnd=%d ssthresh=%d nInFlight=%d mss: %d", priv->cwnd, priv->ssthresh, nInFlight, priv->mss);
priv->dup_acks = 0;
} else {
int transmit_status;
......@@ -3157,15 +3157,14 @@ attempt_send(PseudoTcpSocket *self, SendFlags sflags)
}
if (bFirst) {
bFirst = FALSE;
#if 0
gsize available_space = pseudo_tcp_fifo_get_write_remaining (&priv->sbuf);
bFirst = FALSE;
DEBUG (PSEUDO_TCP_DEBUG_VERBOSE, "[cwnd: %u nWindow: %u nInFlight: %u "
"nAvailable: %u nQueued: %" G_GSIZE_FORMAT " nEmpty: %" G_GSIZE_FORMAT
" ssthresh: %u]",
priv->cwnd, nWindow, nInFlight, nAvailable, snd_buffered,
available_space, priv->ssthresh);
#endif
}
if (nAvailable == 0 && sflags != sfFin && sflags != sfRst) {
......@@ -3299,6 +3298,7 @@ apply_window_scale_option (PseudoTcpSocket *self, guint8 scale_factor)
PseudoTcpSocketPrivate *priv = self->priv;
priv->swnd_scale = scale_factor;
DEBUG (PSEUDO_TCP_DEBUG_NORMAL, "Setting scale factor to %u", scale_factor);
}
static void
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment