Skip to content

Commit 6f7c159

Browse files
tcp: comment out some debugging
1 parent 9d89358 commit 6f7c159

1 file changed

Lines changed: 11 additions & 11 deletions

File tree

src/net/tcp/connection.cpp

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -405,8 +405,8 @@ bool Connection::handle_ack(const Packet_view& in)
405405

406406
if(is_win_update(in, true_win))
407407
{
408-
if(cb.SND.WND < SMSS()*2)
409-
printf("Win update: %u => %u\n", cb.SND.WND, true_win);
408+
//if(cb.SND.WND < SMSS()*2)
409+
// printf("Win update: %u => %u\n", cb.SND.WND, true_win);
410410
cb.SND.WND = true_win;
411411
cb.SND.WL1 = in.seq();
412412
cb.SND.WL2 = in.ack();
@@ -586,7 +586,7 @@ void Connection::on_dup_ack(const Packet_view& in)
586586
// 3 dup acks
587587
else if(dup_acks_ == 3)
588588
{
589-
printf("<TCP::Connection::on_dup_ack> Dup ACK == 3 - UNA=%u recover=%u\n", cb.SND.UNA, cb.recover);
589+
//printf("<TCP::Connection::on_dup_ack> Dup ACK == 3 - UNA=%u recover=%u\n", cb.SND.UNA, cb.recover);
590590

591591
if(cb.SND.UNA - 1 > cb.recover)
592592
goto fast_rtx;
@@ -970,8 +970,8 @@ void Connection::retransmit() {
970970

971971
// TODO: Finish to send window zero probe, but only on rtx timeout
972972

973-
printf("<Connection::retransmit> With data (wq.sz=%zu) buf.size=%zu buf.unacked=%zu SND.WND=%u CWND=%u\n",
974-
writeq.size(), buf->size(), buf->size() - writeq.acked(), cb.SND.WND, cb.cwnd);
973+
//printf("<Connection::retransmit> With data (wq.sz=%zu) buf.size=%zu buf.unacked=%zu SND.WND=%u CWND=%u\n",
974+
// writeq.size(), buf->size(), buf->size() - writeq.acked(), cb.SND.WND, cb.cwnd);
975975
fill_packet(*packet, buf->data() + writeq.acked(), buf->size() - writeq.acked());
976976
packet->set_flag(PSH);
977977
}
@@ -1043,8 +1043,8 @@ void Connection::rtx_clear() {
10431043
begins (i.e., after the three-way handshake completes).
10441044
*/
10451045
void Connection::rtx_timeout() {
1046-
printf("<Connection::RTX@timeout> Timed out (RTO %lld ms). FS: %u usable=%u\n",
1047-
rttm.rto_ms().count(), flight_size(), usable_window());
1046+
//printf("<Connection::RTX@timeout> Timed out (RTO %lld ms). FS: %u usable=%u\n",
1047+
// rttm.rto_ms().count(), flight_size(), usable_window());
10481048

10491049
signal_rtx_timeout();
10501050
// experimental
@@ -1385,12 +1385,12 @@ void Connection::reduce_ssthresh() {
13851385
fs = (fs >= two_seg) ? fs - two_seg : 0;
13861386

13871387
cb.ssthresh = std::max( (fs / 2), two_seg );
1388-
printf("<TCP::Connection::reduce_ssthresh> Slow start threshold reduced: %u\n",
1389-
cb.ssthresh);
1388+
//printf("<TCP::Connection::reduce_ssthresh> Slow start threshold reduced: %u\n",
1389+
// cb.ssthresh);
13901390
}
13911391

13921392
void Connection::fast_retransmit() {
1393-
printf("<TCP::Connection::fast_retransmit> Fast retransmit initiated.\n");
1393+
//printf("<TCP::Connection::fast_retransmit> Fast retransmit initiated.\n");
13941394
// reduce sshtresh
13951395
reduce_ssthresh();
13961396
// retransmit segment starting SND.UNA
@@ -1405,5 +1405,5 @@ void Connection::finish_fast_recovery() {
14051405
fast_recovery_ = false;
14061406
//cb.cwnd = std::min(cb.ssthresh, std::max(flight_size(), (uint32_t)SMSS()) + SMSS());
14071407
cb.cwnd = cb.ssthresh;
1408-
printf("<TCP::Connection::finish_fast_recovery> Finished Fast Recovery - Cwnd: %u\n", cb.cwnd);
1408+
//printf("<TCP::Connection::finish_fast_recovery> Finished Fast Recovery - Cwnd: %u\n", cb.cwnd);
14091409
}

0 commit comments

Comments
 (0)