summaryrefslogtreecommitdiffstats
path: root/src/vnet/tcp/builtin_server.c
diff options
context:
space:
mode:
authorDave Barach <dbarach@cisco.com>2017-05-16 17:41:34 -0400
committerFlorin Coras <florin.coras@gmail.com>2017-05-17 04:52:46 +0000
commitacd2a6a32cebab70a054e9335e446798538d0524 (patch)
treea1202b3b20ae022894af6ceb9bd09a2ecb98f972 /src/vnet/tcp/builtin_server.c
parentd5b6aa139856a1447f7bc5377058202110eaa4cf (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/builtin_server.c')
-rw-r--r--src/vnet/tcp/builtin_server.c12
1 files changed, 4 insertions, 8 deletions
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;