summaryrefslogtreecommitdiffstats
path: root/src/vnet/tcp/builtin_server.c
diff options
context:
space:
mode:
authorDave Barach <dave@barachs.net>2017-05-30 09:30:07 -0400
committerFlorin Coras <florin.coras@gmail.com>2017-06-01 16:02:55 +0000
commit10d8cc6bf92851fcaec4a6b4c6d3554dc1eb2386 (patch)
treec146b324f974aa13499a1d784a96ef96438c9d15 /src/vnet/tcp/builtin_server.c
parent26261594a0b821770aa0a646cba8399aa6320c2e (diff)
Improve fifo allocator performance
- add option to preallocate fifos in a segment - track active fifos with doubly linked list instead of vector - update udp redirect test code to read fifo pointers from API call instead of digging them up from fifo segment header - input-node based active-open session generator Change-Id: I804b81e99d95f8690d17e12660c6645995e28a9a Signed-off-by: Dave Barach <dave@barachs.net> Signed-off-by: Florin Coras <fcoras@cisco.com> 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.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/vnet/tcp/builtin_server.c b/src/vnet/tcp/builtin_server.c
index 64fc4a7111a..4f0e211c7be 100644
--- a/src/vnet/tcp/builtin_server.c
+++ b/src/vnet/tcp/builtin_server.c
@@ -62,7 +62,6 @@ int
builtin_session_accept_callback (stream_session_t * s)
{
builtin_server_main_t *bsm = &builtin_server_main;
- clib_warning ("called...");
bsm->vpp_queue[s->thread_index] =
session_manager_get_vpp_event_queue (s->thread_index);
@@ -76,7 +75,6 @@ builtin_session_disconnect_callback (stream_session_t * s)
{
builtin_server_main_t *bsm = &builtin_server_main;
vnet_disconnect_args_t _a, *a = &_a;
- clib_warning ("called...");
a->handle = stream_session_handle (s);
a->app_index = bsm->app_index;
@@ -280,10 +278,11 @@ server_attach ()
a->api_client_index = bsm->my_client_index;
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] = 1 << 16;
- a->options[SESSION_OPTIONS_TX_FIFO_SIZE] = 1 << 16;
+ a->options[SESSION_OPTIONS_SEGMENT_SIZE] = 512 << 20;
+ a->options[SESSION_OPTIONS_RX_FIFO_SIZE] = 64 << 10;
+ a->options[SESSION_OPTIONS_TX_FIFO_SIZE] = 64 << 10;
a->options[APP_OPTIONS_FLAGS] = APP_OPTIONS_FLAGS_BUILTIN_APP;
+ a->options[APP_OPTIONS_PREALLOC_FIFO_PAIRS] = 8192;
a->segment_name = segment_name;
a->segment_name_length = ARRAY_LEN (segment_name);