On Thu, Mar 01, 2012 at 11:09:07PM -0800, Chris Wright wrote: > I'm pondering adding a way to disable brcompat. This would keep from > building it and strip it from config templates, init scripts, ovs-ctl, > etc... Here's a quick hack to give an idea. > > Any thoughts whether this is worth pursuing, and if so ideas on best way > to do it?
I support the idea of adding a configure option to disable building ovs-brcompatd and the brcompat kernel module (though I suppose the latter doesn't matter for Fedora). The part I don't like is the @BUILD_BRCOMPAT@ markers. They are ugly, but, worse, they will make maintenance of those bits of the scripts difficult. Why is there such a strong motivation to entirely excise all the brcompat-related shell script code, instead of just disabling it? If you want to disable it in a pretty strong fashion, then it wouldn't be hard to just throw in an explicit "BRCOMPAT=no" somewhere in the script, disable the command line option, etc. (and maybe --disable-brcompat could do that automatically). The following block isn't strictly related to brcompat. Instead, it has to do with kernels that don't support loading both the bridge and openvswitch kernels at the same time. That's almost orthogonal to brcompat, in that it can be useful with older kernels even if the user doesn't want brcompat. So, I understand if it should be disabled (maybe we can be smarter about it?) but I don't think it should be tied to disabling brcompat. > +@BUILD_BRCOMPAT@ # If the bridge module is loaded, then that might be > blocking > +@BUILD_BRCOMPAT@ # @OVSKMOD@. Try to unload it, if there are no bridges. > +@BUILD_BRCOMPAT@ test -e /sys/module/bridge || return 1 > +@BUILD_BRCOMPAT@ bridges=`echo /sys/class/net/*/bridge | sed > 's,/sys/class/net/,,g;s,/bridge,,g'` > +@BUILD_BRCOMPAT@ if test "$bridges" != "*"; then > +@BUILD_BRCOMPAT@ log_warning_msg "not removing bridge module because > bridges exist ($bridges)" > +@BUILD_BRCOMPAT@ return 1 > +@BUILD_BRCOMPAT@ fi > +@BUILD_BRCOMPAT@ action "removing bridge module" rmmod bridge || return 1 > +@BUILD_BRCOMPAT@ > +@BUILD_BRCOMPAT@ # Try loading @OVSKMOD@ again. > +@BUILD_BRCOMPAT@ action "Inserting openvswitch module" modprobe @OVSKMOD@ > } Thanks, Ben. _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev