ofproto: Better hide hidden tables.
authorBen Pfaff <blp@nicira.com>
Fri, 2 Nov 2012 17:37:59 +0000 (10:37 -0700)
committerBen Pfaff <blp@nicira.com>
Fri, 2 Nov 2012 17:37:59 +0000 (10:37 -0700)
ofproto has a concept of "hidden" OpenFlow tables.  Currently these are
used internally only for ofproto-dpif for a couple of unimportant
purposes.  However, hidden tables were not hidden well enough, because
OFTest was able to spot ofproto-dpif's hidden table and, seeing that it
had a couple of flows in it even after OFTest had tried to delete all
flows, failed at least one test.

This commit hides the tables better:

    - The number of tables reported in a feature reply no longer counts
      hidden tables.

    - Table stats replies omit hidden tables.

This commit introduces the requirement that hidden tables, if any, be the
highest-numbered tables.  This is because it's not clear to me that
OpenFlow intends to allow tables to be numbered noncontiguously.

We could take this further, by not exposing hidden tables in any way, but
I have this pet theory that being able to get the statistics for these
tables will come in handy for debugging someday.

Found by openflow_protocol_messages.ModifyStateDelete in OFTest.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Kyle Mestery <kmestery@cisco.com>

No differences found