Currently, ofproto_class_register() is invoked by ofproto_init(). Separating out the ofproto registration step from the initialization step makes it actually possible for a user of libofproto to register a custom ofproto_class.
Signed-off-by: Shad Ansari <shad.ans...@hp.com> --- ofproto/ofproto.c | 2 -- vswitchd/bridge.c | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ofproto/ofproto.c b/ofproto/ofproto.c index 5688c6e..ca7d40a 100644 --- a/ofproto/ofproto.c +++ b/ofproto/ofproto.c @@ -365,8 +365,6 @@ ofproto_init(const struct shash *iface_hints) struct shash_node *node; size_t i; - ofproto_class_register(&ofproto_dpif_class); - /* Make a local copy, since we don't own 'iface_hints' elements. */ SHASH_FOR_EACH(node, iface_hints) { const struct iface_hint *orig_hint = node->data; diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c index b966d92..6064a3f 100644 --- a/vswitchd/bridge.c +++ b/vswitchd/bridge.c @@ -376,6 +376,8 @@ bridge_init_ofproto(const struct ovsrec_open_vswitch *cfg) } } + ofproto_class_register(&ofproto_dpif_class); + ofproto_init(&iface_hints); shash_destroy_free_data(&iface_hints); -- 1.9.1 _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev