summaryrefslogtreecommitdiffstats
path: root/src/vpp-api/vapi/vapi_c_test.c
diff options
context:
space:
mode:
authorKlement Sekera <klement@klementsekera.com>2023-08-06 19:33:16 +0200
committerOle Tr�an <otroan@employees.org>2023-08-18 06:09:41 +0000
commit03e1d559f912513e1bc2ffc615b7833471afc790 (patch)
treee1338544f64a0b16932583944dc2f50528209bfe /src/vpp-api/vapi/vapi_c_test.c
parent56777b9409c9e0be2ca86504aae95ad6472a78ea (diff)
vapi: improve vl_api_string_t handling
Define vl_api_string_t to correspond with vlibapi/api_types.h Fix allocation and size calculation routine generation. Type: improvement Change-Id: I6b0a3eb3459d75d326e67bfb76dac8125e480afa Signed-off-by: Klement Sekera <klement.sekera@gmail.com>
Diffstat (limited to 'src/vpp-api/vapi/vapi_c_test.c')
-rw-r--r--src/vpp-api/vapi/vapi_c_test.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/vpp-api/vapi/vapi_c_test.c b/src/vpp-api/vapi/vapi_c_test.c
index 5eccb0fac38..3f88dedca48 100644
--- a/src/vpp-api/vapi/vapi_c_test.c
+++ b/src/vpp-api/vapi/vapi_c_test.c
@@ -605,7 +605,7 @@ START_TEST (test_loopbacks_1)
{
dctx.last_called = false;
clib_memset (&seen, 0, sizeof (seen));
- dump = vapi_alloc_sw_interface_dump (ctx);
+ dump = vapi_alloc_sw_interface_dump (ctx, 0);
while (VAPI_EAGAIN ==
(rv =
vapi_sw_interface_dump (ctx, dump, sw_interface_dump_cb,
@@ -634,7 +634,7 @@ START_TEST (test_loopbacks_1)
}
dctx.last_called = false;
clib_memset (&seen, 0, sizeof (seen));
- dump = vapi_alloc_sw_interface_dump (ctx);
+ dump = vapi_alloc_sw_interface_dump (ctx, 0);
while (VAPI_EAGAIN ==
(rv =
vapi_sw_interface_dump (ctx, dump, sw_interface_dump_cb, &dctx)))
@@ -763,7 +763,7 @@ START_TEST (test_loopbacks_2)
bool seen[num_ifs];
clib_memset (&seen, 0, sizeof (seen));
sw_interface_dump_ctx dctx = { false, num_ifs, sw_if_indexes, seen, 0 };
- vapi_msg_sw_interface_dump *dump = vapi_alloc_sw_interface_dump (ctx);
+ vapi_msg_sw_interface_dump *dump = vapi_alloc_sw_interface_dump (ctx, 0);
while (VAPI_EAGAIN ==
(rv =
vapi_sw_interface_dump (ctx, dump, sw_interface_dump_cb, &dctx)))
@@ -803,7 +803,7 @@ START_TEST (test_loopbacks_2)
}
clib_memset (&seen, 0, sizeof (seen));
dctx.last_called = false;
- dump = vapi_alloc_sw_interface_dump (ctx);
+ dump = vapi_alloc_sw_interface_dump (ctx, 0);
while (VAPI_EAGAIN ==
(rv =
vapi_sw_interface_dump (ctx, dump, sw_interface_dump_cb, &dctx)))
@@ -922,7 +922,7 @@ START_TEST (test_no_response_2)
{
printf ("--- Simulate no response to dump message ---\n");
vapi_error_e rv;
- vapi_msg_sw_interface_dump *dump = vapi_alloc_sw_interface_dump (ctx);
+ vapi_msg_sw_interface_dump *dump = vapi_alloc_sw_interface_dump (ctx, 0);
dump->header._vl_msg_id = ~0; /* malformed ID causes vpp to drop the msg */
int no_called = 0;
while (VAPI_EAGAIN ==