VPP-846: tcp perf / scale / hardening
Fix builtin server event queue handling
Change-Id: I21b49c37188746cadb2fd9423291c5dc1335798c
Signed-off-by: Dave Barach <dbarach@cisco.com>
diff --git a/src/vnet/tcp/builtin_client.c b/src/vnet/tcp/builtin_client.c
index a0e61f4..d13fd44 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 621ce02..64fc4a7 100644
--- a/src/vnet/tcp/builtin_server.c
+++ b/src/vnet/tcp/builtin_server.c
@@ -141,16 +141,14 @@
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 @@
return 0;
}
- svm_fifo_unset_event (rx_fifo);
-
vec_validate (bsm->rx_buf, max_transfer - 1);
_vec_len (bsm->rx_buf) = max_transfer;