diff options
author | Dave Barach <dbarach@cisco.com> | 2017-05-16 17:41:34 -0400 |
---|---|---|
committer | Florin Coras <florin.coras@gmail.com> | 2017-05-17 04:52:46 +0000 |
commit | acd2a6a32cebab70a054e9335e446798538d0524 (patch) | |
tree | a1202b3b20ae022894af6ceb9bd09a2ecb98f972 /src/vnet/tcp | |
parent | d5b6aa139856a1447f7bc5377058202110eaa4cf (diff) |
VPP-846: tcp perf / scale / hardening
Fix builtin server event queue handling
Change-Id: I21b49c37188746cadb2fd9423291c5dc1335798c
Signed-off-by: Dave Barach <dbarach@cisco.com>
Diffstat (limited to 'src/vnet/tcp')
-rw-r--r-- | src/vnet/tcp/builtin_client.c | 2 | ||||
-rw-r--r-- | src/vnet/tcp/builtin_server.c | 12 |
2 files changed, 5 insertions, 9 deletions
diff --git a/src/vnet/tcp/builtin_client.c b/src/vnet/tcp/builtin_client.c index a0e61f42f50..d13fd446182 100644 --- a/src/vnet/tcp/builtin_client.c +++ b/src/vnet/tcp/builtin_client.c @@ -44,7 +44,7 @@ #undef vl_printfun #define TCP_BUILTIN_CLIENT_DBG (1) -#define TCP_BUILTIN_CLIENT_VPP_THREAD (1) +#define TCP_BUILTIN_CLIENT_VPP_THREAD (0) #define TCP_BUILTIN_CLIENT_PTHREAD (!TCP_BUILTIN_CLIENT_VPP_THREAD) static void diff --git a/src/vnet/tcp/builtin_server.c b/src/vnet/tcp/builtin_server.c index 621ce02ad67..64fc4a7111a 100644 --- a/src/vnet/tcp/builtin_server.c +++ b/src/vnet/tcp/builtin_server.c @@ -141,16 +141,14 @@ builtin_server_rx_callback (stream_session_t * s) session_fifo_event_t evt; static int serial_number = 0; + tx_fifo = s->server_tx_fifo; + rx_fifo = s->server_rx_fifo; + max_dequeue = svm_fifo_max_dequeue (s->server_rx_fifo); max_enqueue = svm_fifo_max_enqueue (s->server_tx_fifo); if (PREDICT_FALSE (max_dequeue == 0)) - { - return 0; - } - - tx_fifo = s->server_tx_fifo; - rx_fifo = s->server_rx_fifo; + return 0; /* Number of bytes we're going to copy */ max_transfer = (max_dequeue < max_enqueue) ? max_dequeue : max_enqueue; @@ -175,8 +173,6 @@ builtin_server_rx_callback (stream_session_t * s) return 0; } - svm_fifo_unset_event (rx_fifo); - vec_validate (bsm->rx_buf, max_transfer - 1); _vec_len (bsm->rx_buf) = max_transfer; |