summaryrefslogtreecommitdiffstats
path: root/src/vnet/tcp/tcp_output.c
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2020-03-13 17:54:42 +0000
committerDave Barach <openvpp@barachs.net>2020-03-19 14:46:01 +0000
commit70f879d2852dfc042ad0911a4a6e4a1714c0eb83 (patch)
treed7ea7d76b8ec034d41ead0b9ada2db18d9676670 /src/vnet/tcp/tcp_output.c
parent7fd59cc79c9fb0cccd0cb5c0b4579d0f0a004f6b (diff)
session tcp udp: consolidate transport snd apis
Type: improvement Use only one api to retrieve transport send parameters. Additionally, allow transports to request postponing and descheduling of events. With this, tcp now requests descheduling of sessions when the connections are stuck probing for zero snd_wnd Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I722c974f3e68fa15424c519a1fffacda43af050c
Diffstat (limited to 'src/vnet/tcp/tcp_output.c')
-rw-r--r--src/vnet/tcp/tcp_output.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/vnet/tcp/tcp_output.c b/src/vnet/tcp/tcp_output.c
index 6ed478fd1bc..b77713e1538 100644
--- a/src/vnet/tcp/tcp_output.c
+++ b/src/vnet/tcp/tcp_output.c
@@ -1637,7 +1637,7 @@ tcp_timer_persist_handler (tcp_connection_t * tc)
/* Problem already solved or worse */
if (tc->state == TCP_STATE_CLOSED || tc->snd_wnd > tc->snd_mss
|| (tc->flags & TCP_CONN_FINSNT))
- return;
+ goto update_scheduler;
available_bytes = transport_max_tx_dequeue (&tc->connection);
offset = tc->snd_nxt - tc->snd_una;
@@ -1651,7 +1651,7 @@ tcp_timer_persist_handler (tcp_connection_t * tc)
}
if (available_bytes <= offset)
- return;
+ goto update_scheduler;
/* Increment RTO backoff */
tc->rto_boff += 1;
@@ -1665,6 +1665,7 @@ tcp_timer_persist_handler (tcp_connection_t * tc)
tcp_persist_timer_set (tc);
return;
}
+
b = vlib_get_buffer (vm, bi);
data = tcp_init_buffer (vm, b);
@@ -1693,6 +1694,11 @@ tcp_timer_persist_handler (tcp_connection_t * tc)
/* Just sent new data, enable retransmit */
tcp_retransmit_timer_update (tc);
+
+update_scheduler:
+
+ if (transport_connection_is_descheduled (&tc->connection))
+ transport_connection_reschedule (&tc->connection);
}
/**