summaryrefslogtreecommitdiffstats
path: root/src/vnet/tcp/tcp.c
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2020-03-13 20:39:43 +0000
committerFlorin Coras <florin.coras@gmail.com>2020-03-19 14:48:15 +0000
commit6080e0d15e152e38811b01306eef6719a682c007 (patch)
tree4a3c344b1c9283d97908be78e4164bcbefeb2e1d /src/vnet/tcp/tcp.c
parent70f879d2852dfc042ad0911a4a6e4a1714c0eb83 (diff)
tcp: force deschedule if no send space available
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Iae9f118f710153b6c0e390265039db7434e67ed8
Diffstat (limited to 'src/vnet/tcp/tcp.c')
-rw-r--r--src/vnet/tcp/tcp.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/vnet/tcp/tcp.c b/src/vnet/tcp/tcp.c
index 4a0ffc137e5..dfcce771654 100644
--- a/src/vnet/tcp/tcp.c
+++ b/src/vnet/tcp/tcp.c
@@ -1281,14 +1281,7 @@ tcp_session_send_params (transport_connection_t * trans_conn,
/* This still works if fast retransmit is on */
sp->tx_offset = tc->snd_nxt - tc->snd_una;
- sp->flags = 0;
- if (!tc->snd_wnd)
- {
- if (tcp_timer_is_active (tc, TCP_TIMER_PERSIST))
- sp->flags = TRANSPORT_SND_F_DESCHED;
- else
- sp->flags = TRANSPORT_SND_F_POSTPONE;
- }
+ sp->flags = sp->snd_space ? 0 : TRANSPORT_SND_F_DESCHED;
return 0;
}
@@ -1540,6 +1533,13 @@ tcp_connection_tx_pacer_reset (tcp_connection_t * tc, u32 window,
srtt * CLIB_US_TIME_FREQ);
}
+void
+tcp_reschedule (tcp_connection_t * tc)
+{
+ if (tcp_in_cong_recovery (tc) || tcp_snd_space_inline (tc))
+ transport_connection_reschedule (&tc->connection);
+}
+
static void
tcp_expired_timers_dispatch (u32 * expired_timers)
{