[ovs-dev] [PATCH] controller: Remote connection option to OpenFlow switch.

Ben Pfaff blp at ovn.org
Mon Oct 30 23:41:21 UTC 2017


On Mon, Aug 07, 2017 at 08:48:07PM +0530, Jai Singh Rana wrote:
> Currently ovn-controller uses default unix domain socket in Open
> vSwitch's "run" directory to connect to OpenFlow switch. If
> ovn-controller/ovsdb-server and vswitchd are running on different
> systems, remote connection method needs to be provided.
> 
> Added configuration option to override default connection by using OVSDB
> external-ids "ovn-ofswitch-remote". Using this external-id, desired tcp
> or unix connection to OpenFlow switch can be specified.
> 
> Tested this by using tcp/unix method configured through external-id
> "ovn-ofswitch-remote" and confirmed connection as flows getting updated
> in Open vSwitch.
> 
> Signed-off-by: Jai Singh Rana <JaiSingh.Rana at caviumnetworks.com>

Thanks for the revised patch.

With this change, ofctrl_run() and pinctrl_run() both use xstrdup() to
make a copy of the ovn_ofswitch_remote string, and later free it.  I
don't see any reason to make the copy.

Please try to maintain the general principle of parameter ordering in
Open vSwitch, where read-only parameters go before read/write and
write-only parameters.  In this case, ofctrl_run() and pinctrl_run()
only read from ovn_ofswitch_remote, so it should go before the
parameters that it writes.

It looks like get_ovn_ofswitch_remote() will log the default remote on
every single trip through ovn-controller's main loop.  I don't think
it's necessary to log it at all.

This new feature seems to be pretty specialized.  The documentation
should explain that it's not normally necessary to set the new setting,
that it is only for use in situations where the most common
configuration will not work.

Thanks,

Ben.


More information about the dev mailing list