summaryrefslogtreecommitdiffstats
path: root/src/vnet/tcp/tcp.c
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.c
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.c')
-rw-r--r--src/vnet/tcp/tcp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/vnet/tcp/tcp.c b/src/vnet/tcp/tcp.c
index 215bcbb159e..39d683c78e7 100644
--- a/src/vnet/tcp/tcp.c
+++ b/src/vnet/tcp/tcp.c
@@ -1164,7 +1164,7 @@ tcp_session_flush_data (transport_connection_t * tconn)
if (tc->flags & TCP_CONN_PSH_PENDING)
return;
tc->flags |= TCP_CONN_PSH_PENDING;
- tc->psh_seq = tc->snd_una_max + transport_max_tx_dequeue (tconn) - 1;
+ tc->psh_seq = tc->snd_una + transport_max_tx_dequeue (tconn) - 1;
}
/* *INDENT-OFF* */
@@ -1296,7 +1296,7 @@ tcp_timer_waitclose_handler (u32 conn_index)
* and switch to LAST_ACK. */
tcp_cong_recovery_off (tc);
/* Make sure we don't try to send unsent data */
- tc->snd_una_max = tc->snd_nxt = tc->snd_una;
+ tc->snd_nxt = tc->snd_una;
tcp_send_fin (tc);
tcp_connection_set_state (tc, TCP_STATE_LAST_ACK);