diff options
author | Ole Troan <ot@cisco.com> | 2020-09-15 10:53:34 +0200 |
---|---|---|
committer | Dave Barach <openvpp@barachs.net> | 2020-09-18 15:24:52 +0000 |
commit | 3d81267945a732753b0dbd0a83a50ab0625b448a (patch) | |
tree | c00b5e6a5e798cbb29c9c450eb37d43f9303cb85 /src/vpp/api/api_main.c | |
parent | 34262d4d56295b0872ad4e9a4a4791953f3fa444 (diff) |
vat: add infrastructure to align vnet test code and plugin test code
Split vat/api_format.c also for VNET features.
Use auto-generated VAT test code and support dynamic message ID allocation as for plugins.
The arp and geneve features as Guinea pigs.
Type: improvement
Signed-off-by: Ole Troan <ot@cisco.com>
Change-Id: I461591496766bdf10c5f950fd30f1a0ae05909da
Signed-off-by: Ole Troan <ot@cisco.com>
Diffstat (limited to 'src/vpp/api/api_main.c')
-rw-r--r-- | src/vpp/api/api_main.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/vpp/api/api_main.c b/src/vpp/api/api_main.c index e2223a402b9..97dec9e1542 100644 --- a/src/vpp/api/api_main.c +++ b/src/vpp/api/api_main.c @@ -39,6 +39,26 @@ init_error_string_table (vat_main_t * vam) } #if VPP_API_TEST_BUILTIN > 0 +static void +load_features (void) +{ + vat_registered_features_t *f; + vat_main_t *vam = &vat_main; + clib_error_t *error; + + f = vam->feature_function_registrations; + + while (f) + { + error = f->function (vam); + if (error) + { + clib_warning ("INIT FAILED"); + } + f = f->next; + } +} + clib_error_t * vat_builtin_main_init (vlib_main_t * vm) { @@ -57,6 +77,8 @@ vat_builtin_main_init (vlib_main_t * vm) if (rv) clib_warning ("vat_plugin_init returned %d", rv); + load_features (); + return 0; } #endif |