[ovs-dev] [PATCH v2 1/3] ovs-save: Use --bundle to restore flows (on OpenFlow 1.4+)

Ben Pfaff blp at ovn.org
Fri Oct 27 16:55:40 UTC 2017

On Mon, Sep 25, 2017 at 04:44:04PM +0200, Timothy Redaelli wrote:
> If possible, use OpenFlow 1.4 atomic bundle transaction to restore flows.
> The patch uses also the highest enabled OpenFlow version to do the queries.
> With the actual implementation, if you have the default OpenFlow version
> disabled then ovs-save fails. This patch also fixes that problem.
> Signed-off-by: Timothy Redaelli <tredaelli at redhat.com>

Thanks for working on this.

The get_highest_ofp_version might have surprising semantics.  The
ovs-vsctl command will print protocols in alphabetical order, and
get_highest_ofp_version assumes that the alphabetically last OpenFlow
protocol name is the "best".  That's currently true, but I am not sure
that it will be true forever.  What if, instead of taking the last, we
took all of them?  I believe that ovs-ofctl, given multiple protocols on
-O, will select the "best" or latest itself

Something like this would do the trick, I guess:
        ovs-vsctl get bridge br0 protocols | tr -d '[]" '

This is pretty petty, though.  It makes no difference for now.  I
applied this to master.

More information about the dev mailing list