summaryrefslogtreecommitdiffstats
path: root/src/plugins/hs_apps/sapi/vpp_echo.c
diff options
context:
space:
mode:
authorMathiasRaoul <mathias.raoul@gmail.com>2019-09-23 11:48:49 +0000
committerDave Wallace <dwallacelf@gmail.com>2019-09-23 13:28:26 +0000
commitbb73ae7b14279a908991e19576a79b6d9a58a94d (patch)
tree634e1b567f954d5e9af49c2b91b1373a29d64f40 /src/plugins/hs_apps/sapi/vpp_echo.c
parent6c57a4a985a1e4a49d1aeaf2684166cf2e122cfb (diff)
hsa: fix typo in vpp_echo for tx-buf
fix typo and allow use of Gb, Mb or Kb for tx/rx-buf sizes Type: fix Change-Id: I2cfd4c09d6b14dd5c744d942eea09ca9ddcc0f46 Signed-off-by: MathiasRaoul <mathias.raoul@gmail.com>
Diffstat (limited to 'src/plugins/hs_apps/sapi/vpp_echo.c')
-rw-r--r--src/plugins/hs_apps/sapi/vpp_echo.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/plugins/hs_apps/sapi/vpp_echo.c b/src/plugins/hs_apps/sapi/vpp_echo.c
index 93495587423..4abc8f6896a 100644
--- a/src/plugins/hs_apps/sapi/vpp_echo.c
+++ b/src/plugins/hs_apps/sapi/vpp_echo.c
@@ -744,8 +744,8 @@ print_usage_and_exit (void)
" use-svm-api Use SVM API to connect to VPP\n"
" test-bytes[:assert] Check data correctness when receiving (assert fails on first error)\n"
" fifo-size N Use N Kb fifos\n"
- " rx-buf N Use N Kb RX buffer\n"
- " tx-buf N Use N Kb TX test buffer\n"
+ " rx-buf N[Kb|Mb|GB] Use N[Kb|Mb|GB] RX buffer\n"
+ " tx-buf N[Kb|Mb|GB] Use N[Kb|Mb|GB] TX test buffer\n"
" appns NAMESPACE Use the namespace NAMESPACE\n"
" all-scope all-scope option\n"
" local-scope local-scope option\n"
@@ -841,10 +841,10 @@ echo_process_opts (int argc, char **argv)
em->use_sock_api = 0;
else if (unformat (a, "fifo-size %d", &tmp))
em->fifo_size = tmp << 10;
- else if (unformat (a, "rx-buf %d", &tmp))
- em->rx_buf_size = tmp << 10;
- else if (unformat (a, "tx-buf %d", &tmp))
- em->rx_buf_size = tmp << 10;
+ else if (unformat (a, "rx-buf %U", unformat_data, &em->rx_buf_size))
+ ;
+ else if (unformat (a, "tx-buf %U", unformat_data, &em->tx_buf_size))
+ ;
else if (unformat (a, "nclients %d", &em->n_clients))
{
em->n_sessions = em->n_clients + 1;