On Wed, Jun 10, 2015 at 01:15:21AM -0700, michael.zay...@hp.com wrote:
> Per this patch ovs-vswitchd searches for shared objects, with 
> a certain set of exposed routines, in a specific configurable path. 
> Once found, all compatible plugins are loaded and their routines are 
> called at appropriate points of the daemon execution.
> 
> Currently, the main purpose is to allow integration of netdev/ofproto 
> providers without having to modify the main codebase.
> However, the design of the plugin core interface is intentionally
> kept simple enough (init, run, wait, destroy) to accomodate future 
> extensibility use cases.
> 
> All "make check" tests pass in both default and --enable-shared configuration.
> "make distcheck" pass.
> Additional test is added into the testsuite, validating plugin insertion 
> and operation. Note that this test is skipped if OVS is not configured 
> with --enable-shared.
> 
> Signed-off-by: Michael Zayats <michael.zay...@hp.com>

This patch didn't apply, with:

    Applying: vswitchd: adding plugin infrastructre
    /home/blp/nicira/ovs/.git/rebase-apply/patch:487: trailing whitespace.
    /* A routine that allows hook points to call certain API 
    /home/blp/nicira/ovs/.git/rebase-apply/patch:606: trailing whitespace.
    /* A simple plugin to test that ovs-vswitchd can load the plugin, 
    /home/blp/nicira/ovs/.git/rebase-apply/patch:607: trailing whitespace.
     * call its functions and plugin is able to make calls back into 
    error: patch failed: Makefile.am:172
    error: Makefile.am: patch does not apply
    error: lib/plugins.c: does not exist in index
    error: lib/plugins.h: does not exist in index
    error: lib/plugins.man: does not exist in index
    error: tests/libplugin.c: does not exist in index
    error: tests/plugin.at: does not exist in index
    error: patch failed: tests/testsuite.at:67
    error: tests/testsuite.at: patch does not apply
    error: patch failed: vswitchd/ovs-vswitchd.c:257
    error: vswitchd/ovs-vswitchd.c: patch does not apply
    Patch failed at 0001 vswitchd: adding plugin infrastructre

The "patch does not apply" messages look like simple patch rejects due
to changes in those files since then, but I don't remember seeing the
"does not exist in index" message for new files before; odd.

ovs_pluginsdir() doesn't follow the same pattern as the other directory
functions.  I think it should; especially, the use of an environment
variable to override a directory has been invaluable for testing and
sandboxing.  (With that change, --plugins-path probably isn't needed.)
Also, this function stores away a static pointer presumably as a cache
but doesn't use the cache for anything.

I have a lot of misgivings about this kind of plugin interface.  All of
its benefits seem to be only for out-of-tree code, whereas it has
drawbacks for in-tree code.  That is, after we apply it, everyone in the
community is stuck with maintaining it over time, even though we're not
getting anything out of it.
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to