diff options
author | Ben Pfaff <blp@nicira.com> | 2011-04-26 09:42:18 -0700 |
---|---|---|
committer | Ben Pfaff <blp@nicira.com> | 2011-04-26 09:42:18 -0700 |
commit | b78f6b77bcaefc7b1e480aa6063091cb9ad50ad2 (patch) | |
tree | a3e7029195e10f5ed70a5263c402ac494311bf1b /tests | |
parent | b0387df4e0ac796af05765834bb6e7750b8b6ae6 (diff) | |
download | openvswitch-b78f6b77bcaefc7b1e480aa6063091cb9ad50ad2.tar.gz |
Remove support for obsolete "tun_id_from_cookie" extension.
The "tun_id_from_cookie" OpenFlow extension predated NXM and supports only
a fraction of its features. Nothing (at Nicira, anyway) uses it any
longer. Support for it had been broken since January and it took until a
few days ago for anyone to complain, so it cannot be too important. This
commit removes it.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/ofp-print.at | 10 | ||||
-rw-r--r-- | tests/ofproto.at | 4 | ||||
-rw-r--r-- | tests/ovs-ofctl.at | 17 | ||||
-rw-r--r-- | tests/test-flows.c | 5 |
4 files changed, 7 insertions, 29 deletions
diff --git a/tests/ofp-print.at b/tests/ofp-print.at index 6e1e3bd4e..923e00e9c 100644 --- a/tests/ofp-print.at +++ b/tests/ofp-print.at @@ -601,16 +601,6 @@ OFPT_BARRIER_REPLY (xid=0x1): ]) AT_CLEANUP -AT_SETUP([NXT_TUN_ID_FROM_COOKIE]) -AT_KEYWORDS([ofp-print]) -AT_CHECK([ovs-ofctl ofp-print "\ -01 04 00 18 00 00 00 02 00 00 23 20 00 00 00 09 \ -01 00 00 00 00 00 00 00 \ -"], [0], [dnl -NXT_TUN_ID_FROM_COOKIE (xid=0x2): set=1 -]) -AT_CLEANUP - AT_SETUP([NXT_ROLE_REQUEST]) AT_KEYWORDS([ofp-print]) AT_CHECK([ovs-ofctl ofp-print "\ diff --git a/tests/ofproto.at b/tests/ofproto.at index fc7ff57ef..10080e671 100644 --- a/tests/ofproto.at +++ b/tests/ofproto.at @@ -48,13 +48,9 @@ AT_CHECK([ovs-ofctl dump-flows br0 | STRIP_XIDS], [0], [NXST_FLOW reply: ]) AT_CHECK([echo 'in_port=1,actions=0' | ovs-ofctl add-flows br0 -]) AT_CHECK([ovs-ofctl add-flow br0 in_port=0,actions=1]) -dnl Tests for a bug in which ofproto ignored tun_id in tun_id_from_cookie -dnl flow_mod commands. -AT_CHECK([ovs-ofctl add-flow -F tun_id_from_cookie br0 tun_id=1,actions=mod_vlan_vid:4]) AT_CHECK([ovs-ofctl dump-flows br0 | STRIP_XIDS | STRIP_DURATION | sort], [0], [dnl cookie=0x0, duration=?s, table_id=0, n_packets=0, n_bytes=0, in_port=1 actions=output:0 cookie=0x0, duration=?s, table_id=0, n_packets=0, n_bytes=0, in_port=65534 actions=output:1 - cookie=0x100000000, duration=?s, table_id=0, n_packets=0, n_bytes=0, tun_id=0x1 actions=mod_vlan_vid:4 NXST_FLOW reply: ]) AT_CHECK([ovs-ofctl del-flows br0]) diff --git a/tests/ovs-ofctl.at b/tests/ovs-ofctl.at index 466ade6b5..101471082 100644 --- a/tests/ovs-ofctl.at +++ b/tests/ovs-ofctl.at @@ -28,12 +28,11 @@ OFPT_FLOW_MOD: ADD tcp,nw_src=192.168.0.3,tp_dst=80 actions=set_queue:37,output: OFPT_FLOW_MOD: ADD udp,nw_src=192.168.0.3,tp_dst=53 actions=pop_queue,output:1 OFPT_FLOW_MOD: ADD priority=60000 cookie:0x123456789abcdef hard:10 actions=CONTROLLER:65535 OFPT_FLOW_MOD: ADD actions=note:41.42.43.00.00.00,note:00.01.02.03.04.05.06.07.00.00.00.00.00.00,note:00.00.00.00.00.00 -NXT_TUN_ID_FROM_COOKIE: set=1 -OFPT_FLOW_MOD: ADD cookie:0x123400005678 actions=FLOOD -OFPT_FLOW_MOD: ADD actions=set_tunnel:0x1234,set_tunnel64:0x9876,set_tunnel64:0x123456789 -OFPT_FLOW_MOD: ADD actions=multipath(eth_src,50,hrw,12,0,NXM_NX_REG0[0..3]),multipath(symmetric_l4,1024,iter_hash,5000,5050,NXM_NX_REG0[0..12]) -OFPT_FLOW_MOD: ADD actions=drop NXT_SET_FLOW_FORMAT: format=nxm +NXT_FLOW_MOD: ADD tun_id=0x1234 cookie:0x5678 actions=FLOOD +NXT_FLOW_MOD: ADD actions=set_tunnel:0x1234,set_tunnel64:0x9876,set_tunnel64:0x123456789 +NXT_FLOW_MOD: ADD actions=multipath(eth_src,50,hrw,12,0,NXM_NX_REG0[0..3]),multipath(symmetric_l4,1024,iter_hash,5000,5050,NXM_NX_REG0[0..12]) +NXT_FLOW_MOD: ADD actions=drop NXT_FLOW_MOD: ADD tun_id=0x1234000056780000/0xffff0000ffff0000 actions=drop ]]) AT_CHECK([sed 's/.*|//' stderr], [0], [dnl @@ -46,12 +45,6 @@ post: wildcards= 0x3fffff in_port=65534 dl_src=00:00:00:00:00:00 dl_dst=00:0 normalization changed ofp_match, details: pre: wildcards= 0x3820ff in_port=65534 dl_src=00:00:00:00:00:00 dl_dst=00:00:00:00:00:00 dl_vlan= 0 dl_vlan_pcp= 0 dl_type= 0 nw_tos= 0 nw_proto= 0 nw_src= 0 nw_dst= 0 tp_src= 0 tp_dst= 0 post: wildcards= 0x3fffff in_port=65534 dl_src=00:00:00:00:00:00 dl_dst=00:00:00:00:00:00 dl_vlan= 0 dl_vlan_pcp= 0 dl_type= 0 nw_tos= 0 nw_proto= 0 nw_src= 0 nw_dst= 0 tp_src= 0 tp_dst= 0 -normalization changed ofp_match, details: - pre: wildcards= 0x3820ff in_port=65534 dl_src=00:00:00:00:00:00 dl_dst=00:00:00:00:00:00 dl_vlan= 0 dl_vlan_pcp= 0 dl_type= 0 nw_tos= 0 nw_proto= 0 nw_src= 0 nw_dst= 0 tp_src= 0 tp_dst= 0 -post: wildcards= 0x3fffff in_port=65534 dl_src=00:00:00:00:00:00 dl_dst=00:00:00:00:00:00 dl_vlan= 0 dl_vlan_pcp= 0 dl_type= 0 nw_tos= 0 nw_proto= 0 nw_src= 0 nw_dst= 0 tp_src= 0 tp_dst= 0 -normalization changed ofp_match, details: - pre: wildcards= 0x23820ff in_port=65534 dl_src=00:00:00:00:00:00 dl_dst=00:00:00:00:00:00 dl_vlan= 0 dl_vlan_pcp= 0 dl_type= 0 nw_tos= 0 nw_proto= 0 nw_src= 0 nw_dst= 0 tp_src= 0 tp_dst= 0 -post: wildcards= 0x23fffff in_port=65534 dl_src=00:00:00:00:00:00 dl_dst=00:00:00:00:00:00 dl_vlan= 0 dl_vlan_pcp= 0 dl_type= 0 nw_tos= 0 nw_proto= 0 nw_src= 0 nw_dst= 0 tp_src= 0 tp_dst= 0 ]) AT_CLEANUP @@ -469,7 +462,7 @@ dnl Check that "-F openflow10" rejects a flow_mod with a tun_id, since dnl OpenFlow 1.0 doesn't support tunnels. AT_SETUP([ovs-ofctl -F option and tun_id]) AT_CHECK([ovs-ofctl -F openflow10 add-flow dummy tun_id=123,actions=drop], - [1], [], [ovs-ofctl: flow cannot be expressed in flow format openflow10 (flow format tun_id_from_cookie or better is required) + [1], [], [ovs-ofctl: flow cannot be expressed in flow format openflow10 (flow format nxm or better is required) ]) AT_CLEANUP diff --git a/tests/test-flows.c b/tests/test-flows.c index 2edfa35fe..559af3a31 100644 --- a/tests/test-flows.c +++ b/tests/test-flows.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2010 Nicira Networks. + * Copyright (c) 2009, 2010, 2011 Nicira Networks. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -70,8 +70,7 @@ main(int argc OVS_UNUSED, char *argv[]) flow_extract(packet, 0, 1, &flow); cls_rule_init_exact(&flow, 0, &rule); - ofputil_cls_rule_to_match(&rule, NXFF_OPENFLOW10, &extracted_match, - 0, NULL); + ofputil_cls_rule_to_match(&rule, &extracted_match); if (memcmp(&expected_match, &extracted_match, sizeof expected_match)) { char *exp_s = ofp_match_to_string(&expected_match, 2); |