aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/tcp/tcp_output.c
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2020-03-23 15:34:22 +0000
committerDave Barach <openvpp@barachs.net>2020-04-04 17:34:13 +0000
commit9f86d225ab4f3dccbf61383a75d6af7d321a204e (patch)
tree28051dc383a6214a20854fd21a460281cd8c373c /src/vnet/tcp/tcp_output.c
parented8db52539a8d8239a9a43bea53328d25eb47f0d (diff)
session tls: support tls descheduling
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ieb8bb9c6deb92479fdd3e045778fe5ae4782d1ea
Diffstat (limited to 'src/vnet/tcp/tcp_output.c')
-rw-r--r--src/vnet/tcp/tcp_output.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/vnet/tcp/tcp_output.c b/src/vnet/tcp/tcp_output.c
index 095f3602557..b1af535eea7 100644
--- a/src/vnet/tcp/tcp_output.c
+++ b/src/vnet/tcp/tcp_output.c
@@ -2010,7 +2010,7 @@ tcp_do_retransmit (tcp_connection_t * tc, u32 max_burst_size)
}
int
-tcp_session_custom_tx (void *conn, u32 max_burst_size)
+tcp_session_custom_tx (void *conn, transport_send_params_t * sp)
{
tcp_connection_t *tc = (tcp_connection_t *) conn;
u32 n_segs = 0;
@@ -2018,8 +2018,7 @@ tcp_session_custom_tx (void *conn, u32 max_burst_size)
if (tcp_in_cong_recovery (tc) && (tc->flags & TCP_CONN_RXT_PENDING))
{
tc->flags &= ~TCP_CONN_RXT_PENDING;
- n_segs = tcp_do_retransmit (tc, max_burst_size);
- max_burst_size -= n_segs;
+ n_segs = tcp_do_retransmit (tc, sp->max_burst_size);
}
if (!(tc->flags & TCP_CONN_SNDACK))
@@ -2031,13 +2030,13 @@ tcp_session_custom_tx (void *conn, u32 max_burst_size)
if (n_segs && !tc->pending_dupacks)
return n_segs;
- if (!max_burst_size)
+ if (sp->max_burst_size <= n_segs)
{
tcp_program_ack (tc);
- return max_burst_size;
+ return n_segs;
}
- n_segs += tcp_send_acks (tc, max_burst_size);
+ n_segs += tcp_send_acks (tc, sp->max_burst_size - n_segs);
return n_segs;
}