summaryrefslogtreecommitdiffstats
path: root/src/vnet/tcp/builtin_client.c
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2017-12-11 04:59:01 -0800
committerDave Barach <openvpp@barachs.net>2017-12-14 00:45:51 +0000
commitff6e7699a5e9921d73818970ecf3571080922ecc (patch)
treef22a28b2024833ae0128b7249ff7f9e71ec29bc7 /src/vnet/tcp/builtin_client.c
parentcf3561bde53173a7be9aa02ed4897c7f2d55bd0a (diff)
session: cleanup attach flags
Change-Id: I39d21d15677f57e10b69b8842f2cbca277abddf0 Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vnet/tcp/builtin_client.c')
-rw-r--r--src/vnet/tcp/builtin_client.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/vnet/tcp/builtin_client.c b/src/vnet/tcp/builtin_client.c
index 2b4f07dc415..b90773b7586 100644
--- a/src/vnet/tcp/builtin_client.c
+++ b/src/vnet/tcp/builtin_client.c
@@ -429,10 +429,10 @@ static clib_error_t *
attach_builtin_test_clients_app (u8 * appns_id, u64 appns_flags,
u64 appns_secret)
{
+ u32 segment_name_length, prealloc_fifos, segment_size = 2 << 20;
tclient_main_t *tm = &tclient_main;
vnet_app_attach_args_t _a, *a = &_a;
u8 segment_name[128];
- u32 segment_name_length, prealloc_fifos;
u64 options[16];
clib_error_t *error = 0;
@@ -448,12 +448,14 @@ attach_builtin_test_clients_app (u8 * appns_id, u64 appns_flags,
prealloc_fifos = tm->prealloc_fifos ? tm->expected_connections : 1;
- options[SESSION_OPTIONS_ACCEPT_COOKIE] = 0x12345678;
- options[SESSION_OPTIONS_SEGMENT_SIZE] = (2ULL << 32);
- options[SESSION_OPTIONS_RX_FIFO_SIZE] = tm->fifo_size;
- options[SESSION_OPTIONS_TX_FIFO_SIZE] = tm->fifo_size;
+ if (tm->private_segment_size)
+ segment_size = tm->private_segment_size;
+
+ options[APP_OPTIONS_ACCEPT_COOKIE] = 0x12345678;
+ options[APP_OPTIONS_SEGMENT_SIZE] = segment_size;
+ options[APP_OPTIONS_RX_FIFO_SIZE] = tm->fifo_size;
+ options[APP_OPTIONS_TX_FIFO_SIZE] = tm->fifo_size;
options[APP_OPTIONS_PRIVATE_SEGMENT_COUNT] = tm->private_segment_count;
- options[APP_OPTIONS_PRIVATE_SEGMENT_SIZE] = tm->private_segment_size;
options[APP_OPTIONS_PREALLOC_FIFO_PAIRS] = prealloc_fifos;
options[APP_OPTIONS_FLAGS] = APP_OPTIONS_FLAGS_IS_BUILTIN;