diff options
author | Florin Coras <fcoras@cisco.com> | 2022-01-12 10:32:52 -0800 |
---|---|---|
committer | Dave Barach <openvpp@barachs.net> | 2022-01-12 23:33:53 +0000 |
commit | 07bd9b14713dab2ca298c72205ebe348021c30ca (patch) | |
tree | 0009aa2c772d4be709539df97d0690ac4ac3e0f5 /src/plugins/hs_apps/echo_client.c | |
parent | 6c75cd2242c26819b6456578497db3e3eccf7ef6 (diff) |
hsa: allow large segments for echo apps
Type: improvement
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I4e60d83644878f7d267582c2497d785e0f6facc1
Diffstat (limited to 'src/plugins/hs_apps/echo_client.c')
-rw-r--r-- | src/plugins/hs_apps/echo_client.c | 23 |
1 files changed, 6 insertions, 17 deletions
diff --git a/src/plugins/hs_apps/echo_client.c b/src/plugins/hs_apps/echo_client.c index d641a9ec14e..15eceb62539 100644 --- a/src/plugins/hs_apps/echo_client.c +++ b/src/plugins/hs_apps/echo_client.c @@ -621,9 +621,9 @@ static clib_error_t * echo_clients_attach (u8 * appns_id, u64 appns_flags, u64 appns_secret) { vnet_app_add_cert_key_pair_args_t _ck_pair, *ck_pair = &_ck_pair; - u32 prealloc_fifos, segment_size = 256 << 20; echo_client_main_t *ecm = &echo_client_main; vnet_app_attach_args_t _a, *a = &_a; + u32 prealloc_fifos; u64 options[18]; int rv; @@ -639,12 +639,9 @@ echo_clients_attach (u8 * appns_id, u64 appns_flags, u64 appns_secret) prealloc_fifos = ecm->prealloc_fifos ? ecm->expected_connections : 1; - if (ecm->private_segment_size) - segment_size = ecm->private_segment_size; - options[APP_OPTIONS_ACCEPT_COOKIE] = 0x12345678; - options[APP_OPTIONS_SEGMENT_SIZE] = segment_size; - options[APP_OPTIONS_ADD_SEGMENT_SIZE] = segment_size; + options[APP_OPTIONS_SEGMENT_SIZE] = ecm->private_segment_size; + options[APP_OPTIONS_ADD_SEGMENT_SIZE] = ecm->private_segment_size; options[APP_OPTIONS_RX_FIFO_SIZE] = ecm->fifo_size; options[APP_OPTIONS_TX_FIFO_SIZE] = ecm->fifo_size; options[APP_OPTIONS_PRIVATE_SEGMENT_COUNT] = ecm->private_segment_count; @@ -799,7 +796,7 @@ echo_clients_command_fn (vlib_main_t * vm, ecm->fifo_size = 64 << 10; ecm->connections_per_batch = 1000; ecm->private_segment_count = 0; - ecm->private_segment_size = 0; + ecm->private_segment_size = 256 << 20; ecm->no_output = 0; ecm->test_bytes = 0; ecm->test_failed = 0; @@ -858,16 +855,8 @@ echo_clients_command_fn (vlib_main_t * vm, &ecm->private_segment_count)) ; else if (unformat (input, "private-segment-size %U", - unformat_memory_size, &tmp)) - { - if (tmp >= 0x100000000ULL) - { - error = clib_error_return ( - 0, "private segment size %lld (%llu) too large", tmp, tmp); - goto cleanup; - } - ecm->private_segment_size = tmp; - } + unformat_memory_size, &ecm->private_segment_size)) + ; else if (unformat (input, "preallocate-fifos")) ecm->prealloc_fifos = 1; else if (unformat (input, "preallocate-sessions")) |