summaryrefslogtreecommitdiffstats
path: root/src/vnet/tcp/tcp_output.c
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2019-08-30 11:06:35 -0700
committerDave Barach <openvpp@barachs.net>2019-09-03 15:40:26 +0000
commit017dc45243bad1b3708d0a9b902d23ca47859344 (patch)
treebaaa7f1107c9849985265a9df6f8a96fc513c5dd /src/vnet/tcp/tcp_output.c
parentbaf1c7ccc10134ee38d75532d7bef7d9f3fabfc9 (diff)
tcp: send rwnd update only if wnd is large enough
Type: feature Change-Id: I3e97e05a31806afb6b2e84ecf05fb96d285db92e Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vnet/tcp/tcp_output.c')
-rw-r--r--src/vnet/tcp/tcp_output.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/vnet/tcp/tcp_output.c b/src/vnet/tcp/tcp_output.c
index eb481582fae..20031b2ebbd 100644
--- a/src/vnet/tcp/tcp_output.c
+++ b/src/vnet/tcp/tcp_output.c
@@ -1185,19 +1185,19 @@ tcp_timer_delack_handler (u32 index)
}
/**
- * Send Window Update ACK,
- * ensuring that it will be sent once, if RWND became non-zero,
- * after zero RWND has been advertised in ACK before
+ * Send window update ack
+ *
+ * Ensures that it will be sent only once, after a zero rwnd has been
+ * advertised in a previous ack, and only if rwnd has grown beyond a
+ * configurable value.
*/
void
tcp_send_window_update_ack (tcp_connection_t * tc)
{
- u32 win;
-
if (tcp_zero_rwnd_sent (tc))
{
- win = tcp_window_to_advertise (tc, tc->state);
- if (win > 0)
+ tcp_update_rcv_wnd (tc);
+ if (tc->rcv_wnd >= tcp_cfg.rwnd_min_update_ack * tc->snd_mss)
{
tcp_zero_rwnd_sent_off (tc);
tcp_program_ack (tc);