vlib: add plugin override support 23/24823/2
authorDave Barach <dave@barachs.net>
Wed, 5 Feb 2020 22:31:09 +0000 (17:31 -0500)
committerDamjan Marion <dmarion@me.com>
Thu, 6 Feb 2020 16:58:30 +0000 (16:58 +0000)
commit8dc954a4e7931c07051ce22f8446d6e5dfb9ce7d
tree489b0f34397e73c1cf2bd844d79c71d1bf25cdf1
parent190dc1f6782eba4c49511636570eef678d1bac16
vlib: add plugin override support

Allow a plugin to override (suppress loading of) other plugins. This
mechanism allows a developer to prevent specific plugins from being
loaded.

To do so, provide an "overrides" list in the plugin definition:

VLIB_PLUGIN_REGISTER () =
{
  <snip>
  .overrides = "avf_plugin.so,ioam_plugin.so,dpdk_plugin.so",
};

or some such. Simply list the plugins in question as shown above. The
.overrides structure member is limited to 256 octets. The named .elf
section mechanism used to discover the vlib_plugin_registration_t's
precludes the use of a variable-length array of strings.

Use the vlib log to eliminate plugin and built-in vat plugin loader
console spew.

Added vlib_log_register_class_rate_limit(...) to allow procedural
configuration of the log rate-limit. We *never* want to rate-limit
plugin loader messages.

Type: feature

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I0a9327b8cf5508482f057342783252112cb44170
src/vlib/log.c
src/vlib/log.h
src/vlib/main.c
src/vlib/unix/main.c
src/vlib/unix/plugin.c
src/vlib/unix/plugin.h
src/vpp/api/plugin.c