aboutsummaryrefslogtreecommitdiffstats
path: root/src/vat/main.c
diff options
context:
space:
mode:
authorOle Troan <ot@cisco.com>2020-09-15 10:53:34 +0200
committerDave Barach <openvpp@barachs.net>2020-09-18 15:24:52 +0000
commit3d81267945a732753b0dbd0a83a50ab0625b448a (patch)
treec00b5e6a5e798cbb29c9c450eb37d43f9303cb85 /src/vat/main.c
parent34262d4d56295b0872ad4e9a4a4791953f3fa444 (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/vat/main.c')
-rw-r--r--src/vat/main.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/vat/main.c b/src/vat/main.c
index 8a7ed6331f6..aaedf6c450b 100644
--- a/src/vat/main.c
+++ b/src/vat/main.c
@@ -318,6 +318,26 @@ vat_find_plugin_path ()
vat_plugin_path = (char *) s;
}
+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;
+ }
+}
+
int
main (int argc, char **argv)
{
@@ -422,6 +442,8 @@ main (int argc, char **argv)
vec_validate (vam->inbuf, 4096);
+ load_features ();
+
vam->current_file = (u8 *) "plugin-init";
vat_plugin_init (vam);