floodlight/indigo — pull request #110 by rlane (2014-03-28 23:19:24+00:00)
Title: OFStateManager: convert duplicate flow-add to modify

Reviewer: @wilmo119

Previously we deleted existing flows when the controller added a new one with
the same match and priority. This was incorrect for a couple of reasons.
First, the OpenFlow 1.3 spec says that stats should be preserved and
flow-removed messages should not be generated for this case. Second, if an
error occured adding the new flow then the switch would end up in a state
where neither flow is present. Finally, doing a delete followed by an add can
cause brief traffic loss.