vswitchd: Delete flows on a deleted interface when revalidating.
authorBen Pfaff <blp@nicira.com>
Fri, 16 Jan 2009 18:08:51 +0000 (10:08 -0800)
committerBen Pfaff <blp@nicira.com>
Fri, 16 Jan 2009 18:08:51 +0000 (10:08 -0800)
commitf523312f3197bba9d17aeca57e1a9096c0d7baf4
treee41890662229735be9525bfdf5bec7d01f2b7512
parent41bf64fb03bceec4c522678be49ab2effc4b45cc
vswitchd: Delete flows on a deleted interface when revalidating.

When an interface is deleted from a datapath by an entity other than
vswitchd (e.g. by a vif being deleted), we would revalidate all the
flows and change them to drop packets.  But that's a waste of flow
table space.  This commit changes the behavior in this case to delete
those flows entirely.

This commit is complicated by the need to deal gracefully with flows
on datapath interfaces that we don't know about, e.g. from the local port
if the local port is not part of the bridge or from interfaces added to
a datapath by an external mechanism (e.g. added with "dpctl addif"
manually).  We don't want to delete those flows, even though they resemble
the ones that we do want to delete, because they potentially save us from
processing a lot of packet-in messages that we don't care about.  So we
mark those flows with a new "need_drop" flag.
vswitchd/bridge.c
vswitchd/flowtrack.c
vswitchd/flowtrack.h