From: Semir Sionek Date: Fri, 28 Mar 2025 15:05:11 +0000 (+0000) Subject: hsa: remove mbytes/gbytes parameters from echo client X-Git-Tag: v25.10-rc0~131 X-Git-Url: https://gerrit.fd.io/r/gitweb?a=commitdiff_plain;h=9316989e6ae038d2655b0a1d3059f11e0042d604;p=vpp.git hsa: remove mbytes/gbytes parameters from echo client ...since we're already doing unformat_memory_size on the regular bytes parameter anyway. In conjunction with that, adjust some make test/hs-test tests to make use of this parameter. Type: refactor Change-Id: Ia0c2899a31b14a8689fdc256e25c4bb418de37fc Signed-off-by: Semir Sionek --- diff --git a/extras/hs-test/echo_test.go b/extras/hs-test/echo_test.go index b21c69a1e99..8d69c007113 100644 --- a/extras/hs-test/echo_test.go +++ b/extras/hs-test/echo_test.go @@ -39,7 +39,7 @@ func TcpWithLossTest(s *VethsSuite) { clientVpp.Vppctl("nsim output-feature enable-disable host-" + s.Interfaces.Server.Name()) // Do echo test from client-vpp container - output := clientVpp.Vppctl("test echo client uri tcp://%s/20022 verbose echo-bytes mbytes 50", + output := clientVpp.Vppctl("test echo client uri tcp://%s/20022 verbose echo-bytes bytes 50m", s.Interfaces.Server.Ip4AddressString()) s.Log(output) s.AssertNotEqual(len(output), 0) diff --git a/extras/hs-test/vcl_test.go b/extras/hs-test/vcl_test.go index e88b6b7da38..bc557a90508 100644 --- a/extras/hs-test/vcl_test.go +++ b/extras/hs-test/vcl_test.go @@ -77,7 +77,7 @@ func testXEchoVclServer(s *VethsSuite, proto string) { serverVethAddress := s.Interfaces.Server.Ip4AddressString() clientVpp := s.Containers.ClientVpp.VppInstance - o := clientVpp.Vppctl("test echo client uri %s://%s/%s fifo-size 64k verbose mbytes 2", proto, serverVethAddress, port) + o := clientVpp.Vppctl("test echo client uri %s://%s/%s fifo-size 64k verbose bytes 2m", proto, serverVethAddress, port) s.Log(o) s.AssertContains(o, "Test finished at") } diff --git a/src/plugins/hs_apps/echo_client.c b/src/plugins/hs_apps/echo_client.c index ff5a3bd6b3c..b08edaaa5f5 100644 --- a/src/plugins/hs_apps/echo_client.c +++ b/src/plugins/hs_apps/echo_client.c @@ -1073,7 +1073,7 @@ ec_command_fn (vlib_main_t *vm, unformat_input_t *input, uword *event_data = 0, event_type; clib_error_t *error = 0; int rv, had_config = 1; - u64 tmp, total_bytes; + u64 total_bytes; f64 delta; if (ecm->test_client_attached) @@ -1099,10 +1099,6 @@ ec_command_fn (vlib_main_t *vm, unformat_input_t *input, ; else if (unformat (line_input, "quic-streams %d", &ecm->quic_streams)) ; - else if (unformat (line_input, "mbytes %lld", &tmp)) - ecm->bytes_to_send = tmp << 20; - else if (unformat (line_input, "gbytes %lld", &tmp)) - ecm->bytes_to_send = tmp << 30; else if (unformat (line_input, "bytes %U", unformat_memory_size, &ecm->bytes_to_send)) ; @@ -1336,7 +1332,7 @@ cleanup: VLIB_CLI_COMMAND (ec_command, static) = { .path = "test echo clients", .short_help = - "test echo clients [nclients %d][[m|g]bytes ]" + "test echo clients [nclients %d][bytes [m|g]]" "[test-timeout