[ovs-dev] [PATCH] ovs-ofctl: Avoid unnecessary flow replacement in "replace-flows" command.

Ben Pfaff blp at ovn.org
Thu Aug 3 20:57:09 UTC 2017


On Thu, Aug 03, 2017 at 01:35:50PM -0700, Andy Zhou wrote:
> On Wed, Aug 2, 2017 at 2:13 PM, Ben Pfaff <blp at ovn.org> wrote:
> > This bug fix still needs a review.  Also, Kevin, if you can verify that
> > it fixes the behavior you see, that would also be helpful.
> >
> > On Thu, Jul 06, 2017 at 04:40:30PM -0700, Ben Pfaff wrote:
> >> The ovs-ofctl "diff-flows" and "replace-flows" command compare the flows
> >> in two flow tables.  Until now, the "replace-flows" command has considered
> >> certain almost meaningless differences related to the version of OpenFlow
> >> used to add a flow as significant, which caused it to replace a flow by an
> >> identical-in-practice version, e.g. in the following, the "replace-flows"
> >> command prints a FLOW_MOD that adds the flow that was already added
> >> previously:
> >>
> >>     $ cat > flows
> >>     actions=resubmit(,1)
> >>     $ ovs-vsctl add-br br0
> >>     $ ovs-ofctl del-flows br0
> >>     $ ovs-ofctl add-flows br0 flows
> >>     $ ovs-ofctl -vvconn replace-flows br0 flows 2>&1 | grep FLOW_MOD
> >>
> >> Re-adding an existing flow has some effects, for example, it resets the
> >> flow's duration, so it's better to avoid it.
> >>
> >> This commit fixes the problem using the same trick previously used for a
> >> similar problem with the "diff-flows" command, which was fixed in commit
> >> 98f7f427bf8b ("ovs-ofctl: Avoid printing false differences on "ovs-ofctl
> >> diff-flows".").
> >>
> >> Reported-by: Kevin Lin <kevin at quilt.io>
> >> Signed-off-by: Ben Pfaff <blp at ovn.org>
> Acked-by: Andy Zhou <azhou at ovn.org>

Thanks for the review.  I applied this to master.


More information about the dev mailing list