classifier: Fix classifier bugs.
authorBen Pfaff <blp@nicira.com>
Mon, 12 Jul 2010 20:25:49 +0000 (13:25 -0700)
committerBen Pfaff <blp@nicira.com>
Mon, 12 Jul 2010 20:25:49 +0000 (13:25 -0700)
commite46d7d583fe7a6abc5b865f1ac5a27926aca9b83
treeaad994f2930add47d8420ffe92d1a0f9a84da007
parent8de77246db6f7a33036a1696dd0c47c9864777fb
classifier: Fix classifier bugs.

The classifier tests have been failing on the 'wdp' branch for a long time
now, ever since commit 8980c78 "ofproto: Start work to enable datapaths
with built-in wildcard support."  I finally got around to finding the
cause, which is that the classifier was hashing and comparing the
'priority' member of exact-match flows.  That member is basically
meaningless for such flows, so this commit fixes the problem by changing
the functions that hash and compare flows to ignore it.  They also now
ignore the 'wildcards' field.  These functions' callers already assumed
these semantics, so there is no change to the classifier itself.  The
classifier tests, on the other hand, were not treating the priority of
exact-match flows in the same way as the classifier itself, so this commit
changes the tests' behavior to match.
lib/flow.h
tests/test-classifier.c