summaryrefslogtreecommitdiff
path: root/tests/test-flows.c
diff options
context:
space:
mode:
authorJesse Gross <jesse@nicira.com>2010-04-12 11:49:16 -0400
committerJesse Gross <jesse@nicira.com>2010-04-19 09:11:51 -0400
commit659586efcf6f9539282da9447007897907c41112 (patch)
treebaffec5ba051a06cfb2a6fa84d0837068aca54f3 /tests/test-flows.c
parentdb0e2ad101f10288c002bd537047f3d9e1979c9f (diff)
downloadopenvswitch-659586efcf6f9539282da9447007897907c41112.tar.gz
tunneling: Add support for tunnel ID.
Add a tun_id field which contains the ID of the encapsulating tunnel on which a packet was received (0 if not received on a tunnel). Also add an action which allows the tunnel ID to be set for outgoing packets. At this point there aren't any tunnel implementations so these fields don't have any effect. The matching is exposed to OpenFlow by overloading the high 32 bits of the cookie as the tunnel ID. ovs-ofctl is capable of turning on this special behavior using a new "tun-cookie" command but this command is intentially undocumented to avoid it being used without a full understanding of the consequences.
Diffstat (limited to 'tests/test-flows.c')
-rw-r--r--tests/test-flows.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/test-flows.c b/tests/test-flows.c
index 451ca1ad0..424dd7b01 100644
--- a/tests/test-flows.c
+++ b/tests/test-flows.c
@@ -67,8 +67,8 @@ main(int argc OVS_UNUSED, char *argv[])
ovs_fatal(retval, "error reading pcap file");
}
- flow_extract(packet, 1, &flow);
- flow_to_match(&flow, 0, &extracted_match);
+ flow_extract(packet, 0, 1, &flow);
+ flow_to_match(&flow, 0, false, &extracted_match);
if (memcmp(&expected_match, &extracted_match, sizeof expected_match)) {
char *exp_s = ofp_match_to_string(&expected_match, 2);