aboutsummaryrefslogtreecommitdiffstats
path: root/src/vlib/unix/plugin.c
diff options
context:
space:
mode:
authorMohsin Kazmi <sykazmi@cisco.com>2018-03-22 23:45:23 +0100
committerDamjan Marion <dmarion.lists@gmail.com>2018-03-26 12:18:30 +0000
commit06bc26077c59c26afb8a6ab44d274e98efbbba95 (patch)
treeeaf39a863a21f5da290375b87a4b5f6ead50bf17 /src/vlib/unix/plugin.c
parentecfa2aaa631933f5c77858ae3e5e15a76619dd77 (diff)
plugin: Add plugin 'default' disable/enable
How to use: plugins { plugin default {disable} plugin dpdk_plugin.so {enable} plugin acl_plugin.so {enable} } It also preserves the old behavior. Change-Id: I9901c56d82ec4410e69c917992b78052aa6a99e0 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Diffstat (limited to 'src/vlib/unix/plugin.c')
-rw-r--r--src/vlib/unix/plugin.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/vlib/unix/plugin.c b/src/vlib/unix/plugin.c
index a1df3b24b66..b4eb0b92fb4 100644
--- a/src/vlib/unix/plugin.c
+++ b/src/vlib/unix/plugin.c
@@ -94,6 +94,9 @@ load_one_plugin (plugin_main_t * pm, plugin_info_t * pi, int from_early_init)
goto error;
}
+ if (pm->plugins_default_disable)
+ reg->default_disabled = 1;
+
p = hash_get_mem (pm->config_index_by_name, pi->name);
if (p)
{
@@ -517,6 +520,13 @@ done:
pm->vat_plugin_path = s;
else if (unformat (input, "vat-name-filter %s", &s))
pm->vat_plugin_name_filter = s;
+ else if (unformat (input, "plugin default %U",
+ unformat_vlib_cli_sub_input, &sub_input))
+ {
+ pm->plugins_default_disable =
+ unformat (&sub_input, "disable") ? 1 : 0;
+ unformat_free (&sub_input);
+ }
else if (unformat (input, "plugin %s %U", &s,
unformat_vlib_cli_sub_input, &sub_input))
{