summaryrefslogtreecommitdiffstats
path: root/src/vnet
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2019-03-12 20:37:09 -0700
committerDamjan Marion <dmarion@me.com>2019-03-13 08:23:55 +0000
commit47a9c651e21731ec4d20e123f6c591d7078f3992 (patch)
tree6e7e197ff347adbcd3b500ce738c852363f4b9f8 /src/vnet
parentfd2474430e280e9d1448a4f1a0b177c3e947b75a (diff)
tcp: fix entering closing state while in fast recovery
Change-Id: I30470e8a1404632b0350056769338dc69a94c105 Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vnet')
-rw-r--r--src/vnet/tcp/tcp_input.c20
1 files changed, 15 insertions, 5 deletions
diff --git a/src/vnet/tcp/tcp_input.c b/src/vnet/tcp/tcp_input.c
index c03c5db4332..0d75ba254ac 100644
--- a/src/vnet/tcp/tcp_input.c
+++ b/src/vnet/tcp/tcp_input.c
@@ -1317,18 +1317,20 @@ tcp_do_fastretransmits (tcp_worker_ctx_t * wrk)
for (i = 0; i < vec_len (ongoing_fast_rxt); i++)
{
+ tc = tcp_connection_get (ongoing_fast_rxt[i], thread_index);
+ if (!tcp_in_fastrecovery (tc))
+ {
+ tc->flags &= ~TCP_CONN_FRXT_PENDING;
+ continue;
+ }
+
if (n_segs >= VLIB_FRAME_SIZE)
{
vec_add1 (wrk->postponed_fast_rxt, ongoing_fast_rxt[i]);
continue;
}
- tc = tcp_connection_get (ongoing_fast_rxt[i], thread_index);
tc->flags &= ~TCP_CONN_FRXT_PENDING;
-
- if (!tcp_in_fastrecovery (tc))
- continue;
-
burst_size = clib_min (max_burst_size, VLIB_FRAME_SIZE - n_segs);
burst_bytes = transport_connection_tx_pacer_burst (&tc->connection,
last_cpu_time);
@@ -2959,6 +2961,14 @@ tcp46_rcv_process_inline (vlib_main_t * vm, vlib_node_runtime_t * node,
session_tx_fifo_dequeue_drop (&tc0->connection,
transport_max_tx_dequeue
(&tc0->connection));
+ /* Make it look as if we've recovered, if needed */
+ if (tcp_in_cong_recovery (tc0))
+ {
+ scoreboard_clear (&tc0->sack_sb);
+ tcp_fastrecovery_off (tc0);
+ tcp_recovery_off (tc0);
+ tc0->snd_nxt = tc0->snd_una_max = tc0->snd_una;
+ }
tcp_send_fin (tc0);
}
else
l */ .highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */ .highlight .py { color: #336699; font-weight: bold } /* Name.Property */ .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ }
# Copyright (c) 2015 Cisco and/or its affiliates.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at:
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

bin_PROGRAMS += vppapigen

tools/vppapigen/gram.h: tools/vppapigen/gram.y
	@$(YACC) -d @srcdir@/tools/vppapigen/gram.y
	@mv y.tab.h tools/vppapigen/gram.h
	@rm y.tab.c

tools/vppapigen/lex.o: tools/vppapigen/gram.h
tools/vppapigen/node.o: tools/vppapigen/gram.h

vppapigen_SOURCES = tools/vppapigen/gram.y tools/vppapigen/lex.c tools/vppapigen/node.c
vppapigen_LDADD = libvppinfra.la
vppapigen_LDFLAGS = -static

CLEANFILES += tools/vppapigen/gram.c tools/vppapigen/gram.h
# vi:syntax=automake