aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/tcp/tcp_input.c
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2019-10-16 19:28:17 -0700
committerAndrew Yourtchenko <ayourtch@gmail.com>2019-11-05 10:23:52 +0000
commit3d30598b7b4dd6d7dbffc883a96692e90e4320f5 (patch)
tree62fb869363ce6230cfe1ec12d24f0fd5cb106af3 /src/vnet/tcp/tcp_input.c
parentefb8db4c8a59ad5c9b66cad6f8b9c7862e3001aa (diff)
tcp: avoid sending acks when data available
Type: fix Change-Id: I02e2cb2d349f9ddb2bfed040a08ca448f379d565 Signed-off-by: Florin Coras <fcoras@cisco.com> (cherry picked from commit cb711a4ec908b89edc9da29d3c2e093dab85fbbf)
Diffstat (limited to 'src/vnet/tcp/tcp_input.c')
-rwxr-xr-xsrc/vnet/tcp/tcp_input.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/vnet/tcp/tcp_input.c b/src/vnet/tcp/tcp_input.c
index de59a4da0af..83769465525 100755
--- a/src/vnet/tcp/tcp_input.c
+++ b/src/vnet/tcp/tcp_input.c
@@ -1687,6 +1687,7 @@ tcp_rcv_fin (tcp_worker_ctx_t * wrk, tcp_connection_t * tc, vlib_buffer_t * b,
/* Account for the FIN and send ack */
tc->rcv_nxt += 1;
+ tc->flags |= TCP_CONN_FINRCVD;
tcp_program_ack (tc);
/* Enter CLOSE-WAIT and notify session. To avoid lingering
* in CLOSE-WAIT, set timer (reuse WAITCLOSE). */
@@ -2599,7 +2600,9 @@ tcp46_syn_sent_inline (vlib_main_t * vm, vlib_node_runtime_t * node,
}
else
{
- tcp_program_ack (new_tc0);
+ /* Send ack now instead of programming it because connection was
+ * just established and it's not optional. */
+ tcp_send_ack (new_tc0);
}
drop: