aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/session
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2017-09-05 14:03:37 -0400
committerDamjan Marion <dmarion.lists@gmail.com>2017-09-12 11:41:10 +0000
commit4eeeaaf5e822718eb222e6c49abd82e1bcb566fd (patch)
treef8ceca24b5f954bc615f1ef2e9383652b035052b /src/vnet/session
parent2504ac699e423f1ca840a63247ce55cb27735e0a (diff)
tcp: horizontal scaling improvments
- do not scale syn-ack window - fix the max number of outstanding syns in builtin client - fix syn-sent ack validation to use modulo arithmetic - improve retransmit timer handler - fix output buffer allocator leakeage - improved debugging Change-Id: Iac3bc0eadf7d0b494a93e22d210a3153b61b3273 Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vnet/session')
-rw-r--r--src/vnet/session/session.c21
-rw-r--r--src/vnet/session/session_node.c6
2 files changed, 15 insertions, 12 deletions
diff --git a/src/vnet/session/session.c b/src/vnet/session/session.c
index 17644e292a9..4544f9a0f93 100644
--- a/src/vnet/session/session.c
+++ b/src/vnet/session/session.c
@@ -456,13 +456,16 @@ stream_session_connect_notify (transport_connection_t * tc, u8 is_fail)
st);
if (handle == HALF_OPEN_LOOKUP_INVALID_VALUE)
{
- clib_warning ("This can't be good!");
+ clib_warning ("half-open was removed!");
return -1;
}
+ /* Cleanup half-open table */
+ stream_session_half_open_table_del (tc);
+
/* Get the app's index from the handle we stored when opening connection
* and the opaque (api_context for external apps) from transport session
- * index*/
+ * index */
app = application_get_if_valid (handle >> 32);
if (!app)
return -1;
@@ -499,9 +502,6 @@ stream_session_connect_notify (transport_connection_t * tc, u8 is_fail)
new_s->session_state = SESSION_STATE_READY;
}
- /* Cleanup session lookup */
- stream_session_half_open_table_del (tc);
-
return error;
}
@@ -535,7 +535,7 @@ stream_session_disconnect_notify (transport_connection_t * tc)
}
/**
- * Cleans up session and associated app if needed.
+ * Cleans up session and lookup table.
*/
void
stream_session_delete (stream_session_t * s)
@@ -559,9 +559,10 @@ stream_session_delete (stream_session_t * s)
/**
* Notification from transport that connection is being deleted
*
- * This should be called only on previously fully established sessions. For
- * instance failed connects should call stream_session_connect_notify and
- * indicate that the connect has failed.
+ * This removes the session if it is still valid. It should be called only on
+ * previously fully established sessions. For instance failed connects should
+ * call stream_session_connect_notify and indicate that the connect has
+ * failed.
*/
void
stream_session_delete_notify (transport_connection_t * tc)
@@ -748,7 +749,7 @@ session_send_session_evt_to_thread (u64 session_handle,
if (PREDICT_TRUE (q->cursize < q->maxsize))
{
if (unix_shared_memory_queue_add (q, (u8 *) & evt,
- 1 /* do wait for mutex */ ))
+ 0 /* do wait for mutex */ ))
{
clib_warning ("failed to enqueue evt");
}
diff --git a/src/vnet/session/session_node.c b/src/vnet/session/session_node.c
index dec6d13ca84..09687687189 100644
--- a/src/vnet/session/session_node.c
+++ b/src/vnet/session/session_node.c
@@ -267,7 +267,7 @@ session_tx_fifo_read_and_snd_i (vlib_main_t * vm, vlib_node_runtime_t * node,
b0 = vlib_get_buffer (vm, bi0);
b0->error = 0;
- b0->flags = VNET_BUFFER_F_LOCALLY_ORIGINATED;
+ b0->flags |= VNET_BUFFER_F_LOCALLY_ORIGINATED;
b0->current_data = 0;
b0->total_length_not_including_first_buffer = 0;
@@ -321,8 +321,10 @@ session_tx_fifo_read_and_snd_i (vlib_main_t * vm, vlib_node_runtime_t * node,
}));
/* *INDENT-ON* */
-
VLIB_BUFFER_TRACE_TRAJECTORY_INIT (b0);
+ if (VLIB_BUFFER_TRACE_TRAJECTORY)
+ b0->pre_data[1] = 3;
+
if (PREDICT_FALSE (n_trace > 0))
{
session_queue_trace_t *t0;