floodlight/oftest — pull request #66 by rlane (2013-08-13 17:35:25+00:00)
Title: flow_query: handle different switch representations of nw src/dst masks

Reviewer: @dtalayco

There are multiple wire representations of the same OpenFlow match. One
example is the nw src/dst masks, where mask indices 32 to 63 are equivalent.
A switch may return a different representation of the same match in a flow
stats reply than was originally sent in a flow-mod, and the flow_query tests
need to handle this.

The solution is to define a canonical representation of the match for the
purpose of checking equality. In this case all nw src/dst mask indices >= 32
are changed to 32. The main change is canonicalizing the match received from
the switch (in `flow_tbl_verify`) before checking it against the already
canonical matches sent to the switch.

I tested this against OVS, IVS, and IVS with the flow-add-removal patches.