The commit message is inaccurate then. It's not about registering a
custom ofproto_class, it's about suppressing registration of the
standard one.
On Wed, Dec 02, 2015 at 04:57:36AM +0000, Ansari, Shad wrote:
> Ben,
>
> I have my own custome ofproto provider class (for a hardware dp) which is to
> be registered. The existing ofproto_dpif_class instance is _not_ to be
> registered. However ofproto_init() is "hardcoded" to register the
> ofproto_dpif_class.
>
> So this is what I want to be able to do:
>
> const struct ofproto_class my_ofproto_class = {
> ....
> };
>
> ofproto_class_register(&my_ofproto_class);
> ofproto_init(&iface_hints); /* ofprot_init() should not register
> ofproto_dpfif_class */
>
> If I do as you suggest - i.e. register my class before calling
> ofproto_init(), then the default ofproto_dpif_class is also registered. I
> would like to avoid that?
>
> >
> > On Tue, Dec 01, 2015 at 10:33:41PM +0000, Ansari, Shad wrote:
> > > 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 <[email protected]>
> >
> > I think that the user could just register its class before calling
> > ofproto_init().
_______________________________________________
dev mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/dev