summaryrefslogtreecommitdiffstats
path: root/src/plugins/hs_apps/sapi/vpp_echo.c
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2020-03-13 04:44:51 +0000
committerFlorin Coras <florin.coras@gmail.com>2020-03-25 18:56:27 +0000
commit07063b8ea39b05d5d7bb00ad2a2363b11792c571 (patch)
tree2df1cd5b5df869c729f534f093dea664eb059f3a /src/plugins/hs_apps/sapi/vpp_echo.c
parent4e783b9c901cf90e58c3f921bb17170ab23e540a (diff)
session: api to add new transport types
Type: feature Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: If4dee6dba1ea942daa921d566b35cdecdda680ee
Diffstat (limited to 'src/plugins/hs_apps/sapi/vpp_echo.c')
-rw-r--r--src/plugins/hs_apps/sapi/vpp_echo.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/plugins/hs_apps/sapi/vpp_echo.c b/src/plugins/hs_apps/sapi/vpp_echo.c
index 4dd8e0f2d80..d6f0b28cc18 100644
--- a/src/plugins/hs_apps/sapi/vpp_echo.c
+++ b/src/plugins/hs_apps/sapi/vpp_echo.c
@@ -1052,7 +1052,7 @@ print_usage_and_exit (void)
" nthreads N Use N busy loop threads for data [in addition to main & msg queue]\n"
" TX=1337[K|M|G]|RX Send 1337 [K|M|G]bytes, use TX=RX to reflect the data\n"
" RX=1337[K|M|G] Expect 1337 [K|M|G]bytes\n" "\n");
- for (i = 0; i < TRANSPORT_N_PROTO; i++)
+ for (i = 0; i < vec_len (em->available_proto_cb_vft); i++)
{
echo_proto_cb_vft_t *vft = em->available_proto_cb_vft[i];
if (vft && vft->print_usage_cb)
@@ -1069,7 +1069,7 @@ echo_process_each_proto_opts (unformat_input_t * a)
{
echo_main_t *em = &echo_main;
int i, rv;
- for (i = 0; i < TRANSPORT_N_PROTO; i++)
+ for (i = 0; i < vec_len (em->available_proto_cb_vft); i++)
{
echo_proto_cb_vft_t *vft = em->available_proto_cb_vft[i];
if (vft && vft->process_opts_cb)
@@ -1083,7 +1083,7 @@ static void
echo_set_each_proto_defaults_before_opts (echo_main_t * em)
{
int i;
- for (i = 0; i < TRANSPORT_N_PROTO; i++)
+ for (i = 0; i < vec_len (em->available_proto_cb_vft); i++)
{
echo_proto_cb_vft_t *vft = em->available_proto_cb_vft[i];
if (vft && vft->set_defaults_before_opts_cb)
@@ -1445,6 +1445,7 @@ exit_on_error:
else
print_global_stats (em);
vec_free (em->fail_descr);
+ vec_free (em->available_proto_cb_vft);
exit (em->has_failed);
}