aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/tcp/tcp.h
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2019-03-12 18:58:54 -0700
committerDamjan Marion <dmarion@me.com>2019-03-22 17:30:29 +0000
commit4759683744d079f868a6bcca8084eba8466620d7 (patch)
tree6795035edf69463107dfbaa54eae3183cdc62356 /src/vnet/tcp/tcp.h
parent881d13ede7336e5b16601033e5dd9aeb94c795e3 (diff)
tcp: improve handling of snd_nxt
- avoid changing snd_nxt when doing fast retransmits - use snd_una_max only to keep track of the max seq number sent - simplify future ack testing Change-Id: I3580ad3aefe30128486c3375d0ac3f3f62c04c5e Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vnet/tcp/tcp.h')
-rw-r--r--src/vnet/tcp/tcp.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/vnet/tcp/tcp.h b/src/vnet/tcp/tcp.h
index 07ceb5a67a6..9e2c6d8c4f5 100644
--- a/src/vnet/tcp/tcp.h
+++ b/src/vnet/tcp/tcp.h
@@ -680,7 +680,7 @@ tcp_flight_size (const tcp_connection_t * tc)
{
int flight_size;
- flight_size = (int) (tc->snd_una_max - tc->snd_una) - tcp_bytes_out (tc)
+ flight_size = (int) (tc->snd_nxt - tc->snd_una) - tcp_bytes_out (tc)
+ tc->snd_rxt_bytes;
if (flight_size < 0)
@@ -924,7 +924,7 @@ tcp_persist_timer_reset (tcp_connection_t * tc)
always_inline void
tcp_retransmit_timer_update (tcp_connection_t * tc)
{
- if (tc->snd_una == tc->snd_una_max)
+ if (tc->snd_una == tc->snd_nxt)
{
tcp_retransmit_timer_reset (tc);
if (tc->snd_wnd < tc->snd_mss)