aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/session/session.c
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2019-02-16 20:47:32 -0800
committerDamjan Marion <dmarion@me.com>2019-02-18 20:43:33 +0000
commit222e1f4160a5828bb2b5bf62716cd76664f6100b (patch)
treeeeb8b47fa94dc23152f1652e9dbd14c384d910ff /src/vnet/session/session.c
parenta333795d1c425877645754a384af47755a80712e (diff)
tcp: harden for high scale scenarios
- Better handle buffer starvation scenarios - Handle case when both peers enter recovery due to packet loss. - Fix passive open establish cleanup Change-Id: I2f28baa2ff0383bb8f5f6d2452b49aa38ce69bce Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vnet/session/session.c')
-rw-r--r--src/vnet/session/session.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/vnet/session/session.c b/src/vnet/session/session.c
index a94a0c40882..58e085ee29b 100644
--- a/src/vnet/session/session.c
+++ b/src/vnet/session/session.c
@@ -862,6 +862,12 @@ session_transport_delete_notify (transport_connection_t * tc)
switch (s->session_state)
{
+ case SESSION_STATE_CREATED:
+ /* Session was created but accept notification was not yet sent to the
+ * app. Cleanup everything. */
+ session_lookup_del_session (s);
+ session_free_w_fifos (s);
+ break;
case SESSION_STATE_ACCEPTING:
case SESSION_STATE_TRANSPORT_CLOSING:
/* If transport finishes or times out before we get a reply
@@ -963,6 +969,7 @@ session_stream_accept (transport_connection_t * tc, u32 listener_index,
s->app_wrk_index = app_wrk->wrk_index;
s->listener_index = listener_index;
+ s->session_state = SESSION_STATE_CREATED;
/* Shoulder-tap the server */
if (notify)