summaryrefslogtreecommitdiffstats
path: root/src/vnet/tcp/builtin_server.c
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2017-03-30 02:54:28 -0700
committerDave Barach <openvpp@barachs.net>2017-04-02 14:02:30 +0000
commit3e350af5d3e9744a4529a28dd293b2d4601442f7 (patch)
treee4b489ddd509fc96382d49592cfc5bafc412a216 /src/vnet/tcp/builtin_server.c
parent799e26d5bdf6b74ab615644e0cd291de6e352989 (diff)
TCP cc/window management fixes and debugging
- added persist timer - update rcv_las whenever sending an ack - moved fifo size to its own cache line - improved session and builtin client debugging Change-Id: Ia649cf942cf0c061a713e8b67f0eb6974a6cd55b Signed-off-by: Florin Coras <fcoras@cisco.com> Signed-off-by: Dave Barach <dave@barachs.net>
Diffstat (limited to 'src/vnet/tcp/builtin_server.c')
-rw-r--r--src/vnet/tcp/builtin_server.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/vnet/tcp/builtin_server.c b/src/vnet/tcp/builtin_server.c
index efd26e91791..917d4bd3b94 100644
--- a/src/vnet/tcp/builtin_server.c
+++ b/src/vnet/tcp/builtin_server.c
@@ -127,6 +127,7 @@ builtin_server_rx_callback (stream_session_t * s)
{
/* XXX timeout for session that are stuck */
+ rx_event:
/* Program self-tap to retry */
if (svm_fifo_set_event (rx_fifo))
{
@@ -158,7 +159,9 @@ builtin_server_rx_callback (stream_session_t * s)
n_written =
svm_fifo_enqueue_nowait (tx_fifo, 0, actual_transfer, bsm->rx_buf);
- ASSERT (n_written == max_transfer);
+
+ if (n_written != max_transfer)
+ clib_warning ("short trout!");
if (svm_fifo_set_event (tx_fifo))
{
@@ -171,6 +174,9 @@ builtin_server_rx_callback (stream_session_t * s)
(u8 *) & evt, 0 /* do wait for mutex */ );
}
+ if (PREDICT_FALSE (max_enqueue < max_dequeue))
+ goto rx_event;
+
return 0;
}
@@ -204,8 +210,8 @@ server_create (vlib_main_t * vm)
a->session_cb_vft = &builtin_session_cb_vft;
a->options = options;
a->options[SESSION_OPTIONS_SEGMENT_SIZE] = 128 << 20;
- a->options[SESSION_OPTIONS_RX_FIFO_SIZE] = 64 << 10;
- a->options[SESSION_OPTIONS_TX_FIFO_SIZE] = 64 << 10;
+ a->options[SESSION_OPTIONS_RX_FIFO_SIZE] = 1 << 16;
+ a->options[SESSION_OPTIONS_TX_FIFO_SIZE] = 1 << 16;
a->segment_name = segment_name;
a->segment_name_length = ARRAY_LEN (segment_name);