floodlight/ivs — pull request #39 by rlane (2013-07-31 00:22:49+00:00)
Title: Break link between flows and kflows

Reviewer: @poolakiran

In OpenFlow 1.0 a packet can only match a single flow. IVS maintained a list of kflows for each flow, and a pointer from the kflow to its parent flow. This was useful for stats and efficient kflow invalidation.

OpenFlow 1.3 allows a packet to match multiple flows on its way through the pipeline. This changes the 1:n relationship between flows and kflows to m:n.

These changes first simplify invalidation to always invalidate all kflows. This is extremely inefficient and is something we will have to revisit soon.

Then we rework stats collection to not require a list of kflows per flow. Instead, the kflow counter differences are periodically propagated back to the parent flow in the same timer used for kflow expiration.

Finally, the single kflow -> flow pointer is changed to a list of flows.

Bonus commit included which parses the entire OpenFlow instruction list into the effects struct.