Implement learned flow deletion.
authorBen Pfaff <blp@nicira.com>
Fri, 6 Jun 2014 04:53:34 +0000 (21:53 -0700)
committerBen Pfaff <blp@nicira.com>
Thu, 12 Jun 2014 21:47:22 +0000 (14:47 -0700)
commit35f48b8bd9b3b3491d79418878ef70dc54b0a8f0
tree423a72ba1b6efbf159afb6356d0c15fb6a66cd63
parent9ca4a86fffcda89098588cbdd9ba0c21aa60a9c8
Implement learned flow deletion.

When a flow with a "learn" action is deleted, one often wants the flows
that it created (the "learned flows") to be deleted as well.  This commit
makes that possible.

I am aware of a race condition that could lead to a learned flow not being
properly deleted.  Suppose thread A deletes a flow with a "learn" action.
Meanwhile, thread B obtains the actions for this flow and translates and
executes them.  Thread B could obtain the actions for the flow before it is
deleted, but execute them after the "learn" flow and its learned flows are
deleted.  The result is that the flow created by thread B persists despite
its "learn" flow having been deleted.  This race can and should be fixed,
but I think that this commit is worth reviewing without it.

VMware-BZ: #1254021
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Thomas Graf <tgraf@suug.ch>
Acked-by: Ethan Jackson <ethan@nicira.com>
NEWS
include/openflow/nicira-ext.h
lib/learn.c
lib/ofp-actions.h
ofproto/ofproto-provider.h
ofproto/ofproto.c
tests/learn.at
utilities/ovs-ofctl.8.in