summaryrefslogtreecommitdiff
path: root/tests/test-flows.c
diff options
context:
space:
mode:
authorBen Pfaff <blp@nicira.com>2010-11-10 14:39:54 -0800
committerBen Pfaff <blp@nicira.com>2010-11-22 10:11:40 -0800
commitd8ae4d672673cd72285eb405a96b4ac3590a7639 (patch)
treefb6c030b086cc5f2b492d3c4411d12d81c9093b3 /tests/test-flows.c
parent844dff325b1f6a6f520fce9242c85162275ab7ad (diff)
downloadopenvswitch-d8ae4d672673cd72285eb405a96b4ac3590a7639.tar.gz
flow: Fully separate flow_wildcards from OpenFlow wildcard bits.
Originally, wildcards were just the OpenFlow OFPFW_* bits. Then, when OpenFlow added CIDR masks for IP addresses, struct flow_wildcards was born with additional members for those masks, derived from the wildcard bits. Then, when OVS added support for tunnels, we added another bit NXFW_TUN_ID that coexisted with the OFPFW_*. Later we added even more bits that do not appear in the OpenFlow 1.0 match structure at all. This had become really confusing, and the difficulties were especially visible in the long list of invariants in comments on struct flow_wildcards. This commit cleanly separates the OpenFlow 1.0 wildcard bits from the bits used inside Open vSwitch, by defining a new set of bits that are used only internally to Open vSwitch and converting to and from those wildcard bits at the point where data comes off or goes onto the wire. It also moves those functions into ofp-util.[ch] since they are only for dealing with OpenFlow wire protocol now.
Diffstat (limited to 'tests/test-flows.c')
-rw-r--r--tests/test-flows.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/test-flows.c b/tests/test-flows.c
index b53d8532c..4ae198b25 100644
--- a/tests/test-flows.c
+++ b/tests/test-flows.c
@@ -70,7 +70,7 @@ main(int argc OVS_UNUSED, char *argv[])
flow_extract(packet, 0, 1, &flow);
cls_rule_init_exact(&flow, 0, &rule);
- cls_rule_to_match(&rule, NXFF_OPENFLOW10, &extracted_match);
+ ofputil_cls_rule_to_match(&rule, NXFF_OPENFLOW10, &extracted_match);
if (memcmp(&expected_match, &extracted_match, sizeof expected_match)) {
char *exp_s = ofp_match_to_string(&expected_match, 2);