summaryrefslogtreecommitdiffstats
path: root/src/vnet/tcp/tcp_output.c
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2017-04-03 18:00:00 -0700
committerFlorin Coras <fcoras@cisco.com>2017-04-15 12:15:35 -0700
commit5921f98635cbaa065b583d7520e0582f68218e70 (patch)
treea723a052294c7eaf329184bb45e93baf4c4099a3 /src/vnet/tcp/tcp_output.c
parent6cf260cb2a8b41450850a1578c708e1dd5af699f (diff)
Set lower bound on persist timer
Change-Id: Ie98ecb8944e4d27e943797948fad41ec074d6720 Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vnet/tcp/tcp_output.c')
-rw-r--r--src/vnet/tcp/tcp_output.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/vnet/tcp/tcp_output.c b/src/vnet/tcp/tcp_output.c
index d2fa1d7bbaf..a7be8bd56ec 100644
--- a/src/vnet/tcp/tcp_output.c
+++ b/src/vnet/tcp/tcp_output.c
@@ -993,6 +993,7 @@ tcp_prepare_retransmit_segment (tcp_connection_t * tc, vlib_buffer_t * b,
ASSERT (n_bytes != 0);
b->current_length = n_bytes;
tcp_push_hdr_i (tc, b, tc->state);
+ tc->rtx_bytes += n_bytes;
done:
TCP_EVT_DBG (TCP_EVT_CC_RTX, tc, offset, n_bytes);
@@ -1089,8 +1090,6 @@ tcp_timer_retransmit_handler_i (u32 index, u8 is_syn)
if (n_bytes == 0)
return;
-
- tc->rtx_bytes += n_bytes;
}
}
else
@@ -1217,10 +1216,12 @@ tcp_retransmit_first_unacked (tcp_connection_t * tc)
n_bytes = tcp_prepare_retransmit_segment (tc, b, 0, tc->snd_mss);
if (n_bytes == 0)
- return;
+ goto done;
tcp_enqueue_to_output (vm, b, bi, tc->c_is_ip4);
- tc->rtx_bytes += n_bytes;
+
+done:
+ tc->snd_nxt = tc->snd_una_max;
}
sack_scoreboard_hole_t *
@@ -1294,7 +1295,6 @@ tcp_fast_retransmit (tcp_connection_t * tc)
}
tcp_enqueue_to_output (vm, b, bi, tc->c_is_ip4);
- tc->rtx_bytes += n_written;
snd_space -= n_written;
}