As of today, plugins are loaded early enough in the vpp init sequence; everything which can be done in core engine code can also be done from plugins. They are not removed and they are not updated after vpp starts.
Making plugins removable or updateable would take considerable attention to detail, and doesn't seem worth the amount of work involved, especially with respect to plugin API changes. Plugins would need "unload_prep" methods, with fine-grained controls to minimize unnecessary data-structure teardowns. Best to keep FIBs and session tables and so on intact if data structures match. In my own production use of vpp, I expect a single vpp process to run for up to a year. Updates are scheduled in advance. The vpp update portion of the exercise typically takes about 10 seconds. I'd be interested in hearing from the community: should we think about how to refactor the entire code base to support arbitrary plugin load / unload / reload scenarios? I don't think it's worth the amount of effort involved, but that just my view. FWIW... Dave From: [email protected] <[email protected]> On Behalf Of chu.penghong Sent: Thursday, December 12, 2019 3:03 AM To: [email protected] Subject: [vpp-dev] How to add plugin in running VPP ? Hello, I have read the page about how to add plugin in VPP : https://fd.io/docs/vpp/master/gettingstarted/developers/add_plugin.html. However, the page describes that plugins can be added before VPP starts. I wonder if VPP can add plugins when VPP is running. I found comments in file src/vlib/unix/plugin.h : " If an application calls vlib_load_new_plugins() -- possibly after * changing vlib_plugin_main.plugin_path / vlib_plugin_main.plugin_name_filter, * -- new plugins will be loaded. That, in turn, allows considerable * flexibility in terms of adding feature code or fixing bugs without * requiring the data-plane process to restart. " It seems that VPP can add plugins when VPP is running. Can someone show me how to achive it ? Thanks, chupenghong
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#14882): https://lists.fd.io/g/vpp-dev/message/14882 Mute This Topic: https://lists.fd.io/mt/68267897/21656 Group Owner: [email protected] Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
