3 AT_SETUP([ovs-ofctl parse-flows (OpenFlow 1.0)])
4 AT_DATA([flows.txt], [[
6 tcp,tp_src=123,actions=flood
7 in_port=LOCAL dl_vlan=9 dl_src=00:0A:E4:25:6B:B0 actions=drop
8 udp dl_vlan_pcp=7 idle_timeout=5 actions=strip_vlan output:0
9 tcp,nw_src=192.168.0.3,tp_dst=80 actions=set_queue:37,output:1
10 udp,nw_src=192.168.0.3,tp_dst=53 actions=pop_queue,output:1
11 cookie=0x123456789abcdef hard_timeout=10 priority=60000 actions=controller
12 actions=note:41.42.43,note:00.01.02.03.04.05.06.07,note
15 AT_CHECK([ovs-ofctl parse-flows flows.txt
17 AT_CHECK([[sed 's/ (xid=0x[0-9a-fA-F]*)//' stdout]], [0],
18 [[usable protocols: any
19 chosen protocol: OpenFlow10-table_id
20 OFPT_FLOW_MOD: ADD tcp,tp_src=123 actions=FLOOD
21 OFPT_FLOW_MOD: ADD in_port=65534,dl_vlan=9,dl_src=00:0a:e4:25:6b:b0 actions=drop
22 OFPT_FLOW_MOD: ADD udp,dl_vlan_pcp=7 idle:5 actions=strip_vlan,output:0
23 OFPT_FLOW_MOD: ADD tcp,nw_src=192.168.0.3,tp_dst=80 actions=set_queue:37,output:1
24 OFPT_FLOW_MOD: ADD udp,nw_src=192.168.0.3,tp_dst=53 actions=pop_queue,output:1
25 OFPT_FLOW_MOD: ADD priority=60000 cookie:0x123456789abcdef hard:10 actions=CONTROLLER:65535
26 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
30 AT_SETUP([ovs-ofctl parse-flows (NXM)])
31 AT_DATA([flows.txt], [[
33 tcp,tp_src=123,actions=flood
34 in_port=LOCAL dl_vlan=9 dl_src=00:0A:E4:25:6B:B0 actions=drop
35 udp dl_vlan_pcp=7 idle_timeout=5 actions=strip_vlan output:0
36 tcp,nw_src=192.168.0.3,tp_dst=80 actions=set_queue:37,output:1
37 udp,nw_src=192.168.0.3,tp_dst=53 actions=pop_queue,output:1
38 cookie=0x123456789abcdef hard_timeout=10 priority=60000 actions=controller
39 actions=note:41.42.43,note:00.01.02.03.04.05.06.07,note
40 tcp,tp_src=0x1230/0xfff0,tun_id=0x1234,cookie=0x5678,actions=flood
41 actions=set_tunnel:0x1234,set_tunnel64:0x9876,set_tunnel:0x123456789
42 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])
44 tun_id=0x1234000056780000/0xffff0000ffff0000,actions=drop
45 actions=bundle(eth_src,50,active_backup,ofport,slaves:1)
46 actions=bundle(symmetric_l4,60,hrw,ofport,slaves:2,3)
47 actions=bundle(symmetric_l4,60,hrw,ofport,slaves:)
48 actions=output:1,bundle(eth_src,0,hrw,ofport,slaves:1),output:2
49 actions=bundle_load(eth_src,50,active_backup,ofport,NXM_NX_REG0[],slaves:1)
50 actions=bundle_load(symmetric_l4,60,hrw,ofport,NXM_NX_REG0[0..15],slaves:2,3)
51 actions=bundle_load(symmetric_l4,60,hrw,ofport,NXM_NX_REG0[0..15],slaves:[2,3])
52 actions=bundle_load(symmetric_l4,60,hrw,ofport,NXM_NX_REG0[0..30],slaves:)
53 actions=output:1,bundle_load(eth_src,0,hrw,ofport,NXM_NX_REG0[16..31],slaves:1),output:2
54 actions=resubmit:1,resubmit(2),resubmit(,3),resubmit(2,3)
55 send_flow_rem,actions=output:1,output:NXM_NX_REG0[],output:2,output:NXM_NX_REG1[16..31],output:3
56 check_overlap,actions=output:1,exit,output:2
57 actions=fin_timeout(idle_timeout=5,hard_timeout=15)
58 actions=controller(max_len=123,reason=invalid_ttl,id=555)
61 AT_CHECK([ovs-ofctl parse-flows flows.txt
63 AT_CHECK([[sed 's/ (xid=0x[0-9a-fA-F]*)//' stdout]], [0],
64 [[usable protocols: NXM+table_id
65 chosen protocol: NXM+table_id
66 NXT_FLOW_MOD: ADD table:255 tcp,tp_src=123 actions=FLOOD
67 NXT_FLOW_MOD: ADD table:255 in_port=65534,dl_vlan=9,dl_src=00:0a:e4:25:6b:b0 actions=drop
68 NXT_FLOW_MOD: ADD table:255 udp,dl_vlan_pcp=7 idle:5 actions=strip_vlan,output:0
69 NXT_FLOW_MOD: ADD table:255 tcp,nw_src=192.168.0.3,tp_dst=80 actions=set_queue:37,output:1
70 NXT_FLOW_MOD: ADD table:255 udp,nw_src=192.168.0.3,tp_dst=53 actions=pop_queue,output:1
71 NXT_FLOW_MOD: ADD table:255 priority=60000 cookie:0x123456789abcdef hard:10 actions=CONTROLLER:65535
72 NXT_FLOW_MOD: ADD table:255 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
73 NXT_FLOW_MOD: ADD table:255 tcp,tun_id=0x1234,tp_src=0x1230/0xfff0 cookie:0x5678 actions=FLOOD
74 NXT_FLOW_MOD: ADD table:255 actions=set_tunnel:0x1234,set_tunnel64:0x9876,set_tunnel64:0x123456789
75 NXT_FLOW_MOD: ADD table:255 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])
76 NXT_FLOW_MOD: ADD table:1 actions=drop
77 NXT_FLOW_MOD: ADD table:255 tun_id=0x1234000056780000/0xffff0000ffff0000 actions=drop
78 NXT_FLOW_MOD: ADD table:255 actions=bundle(eth_src,50,active_backup,ofport,slaves:1)
79 NXT_FLOW_MOD: ADD table:255 actions=bundle(symmetric_l4,60,hrw,ofport,slaves:2,3)
80 NXT_FLOW_MOD: ADD table:255 actions=bundle(symmetric_l4,60,hrw,ofport,slaves:)
81 NXT_FLOW_MOD: ADD table:255 actions=output:1,bundle(eth_src,0,hrw,ofport,slaves:1),output:2
82 NXT_FLOW_MOD: ADD table:255 actions=bundle_load(eth_src,50,active_backup,ofport,NXM_NX_REG0[],slaves:1)
83 NXT_FLOW_MOD: ADD table:255 actions=bundle_load(symmetric_l4,60,hrw,ofport,NXM_NX_REG0[0..15],slaves:2,3)
84 NXT_FLOW_MOD: ADD table:255 actions=bundle_load(symmetric_l4,60,hrw,ofport,NXM_NX_REG0[0..15],slaves:2,3)
85 NXT_FLOW_MOD: ADD table:255 actions=bundle_load(symmetric_l4,60,hrw,ofport,NXM_NX_REG0[0..30],slaves:)
86 NXT_FLOW_MOD: ADD table:255 actions=output:1,bundle_load(eth_src,0,hrw,ofport,NXM_NX_REG0[16..31],slaves:1),output:2
87 NXT_FLOW_MOD: ADD table:255 actions=resubmit:1,resubmit:2,resubmit(,3),resubmit(2,3)
88 NXT_FLOW_MOD: ADD table:255 send_flow_rem actions=output:1,output:NXM_NX_REG0[],output:2,output:NXM_NX_REG1[16..31],output:3
89 NXT_FLOW_MOD: ADD table:255 check_overlap actions=output:1,exit,output:2
90 NXT_FLOW_MOD: ADD table:255 actions=fin_timeout(idle_timeout=5,hard_timeout=15)
91 NXT_FLOW_MOD: ADD table:255 actions=controller(reason=invalid_ttl,max_len=123,id=555)
95 AT_SETUP([ovs-ofctl -F nxm parse-flows])
96 AT_DATA([flows.txt], [
98 tcp,tp_src=123,actions=flood
99 in_port=LOCAL dl_vlan=9 dl_src=00:0A:E4:25:6B:B0 actions=drop
100 arp,dl_src=00:0A:E4:25:6B:B0,arp_sha=00:0A:E4:25:6B:B0 actions=drop
101 ipv6,ipv6_label=0x12345 actions=2
102 ipv6,ipv6_src=2001:db8:3c4d:1:2:3:4:5 actions=3
103 ipv6,ipv6_src=2001:db8:3c4d:1:2:3:4:5/64 actions=4
104 ipv6,ipv6_dst=2001:db8:3c4d:1:2:3:4:5/127 actions=5
105 tcp6,ipv6_src=2001:db8:3c4d:1::1,tp_dst=80 actions=drop
106 udp6,ipv6_src=2001:db8:3c4d:1::3,tp_dst=53 actions=drop
107 in_port=3 icmp6,ipv6_src=2001:db8:3c4d:1::1,icmp_type=134 actions=drop
108 udp dl_vlan_pcp=7 idle_timeout=5 actions=strip_vlan output:0
109 tcp,nw_src=192.168.0.3,tp_dst=80 actions=set_queue:37,output:1
110 udp,nw_src=192.168.0.3,tp_dst=53 actions=pop_queue,output:1
111 icmp6,icmp_type=135,nd_target=FEC0::1234:F045:8FFF:1111:FE4E:0571 actions=drop
112 icmp6,icmp_type=135,nd_sll=00:0A:E4:25:6B:B0 actions=drop
113 icmp6,icmp_type=136,nd_target=FEC0::1234:F045:8FFF:1111:FE4E:0571,nd_tll=00:0A:E4:25:6B:B1 actions=drop
114 cookie=0x123456789abcdef hard_timeout=10 priority=60000 actions=controller
115 actions=note:41.42.43,note:00.01.02.03.04.05.06.07,note
116 tun_id=0x1234,cookie=0x5678,actions=flood
118 tun_id=0x1234000056780000/0xffff0000ffff0000,actions=drop
119 dl_dst=01:00:00:00:00:00/01:00:00:00:00:00,actions=drop
120 dl_dst=00:00:00:00:00:00/01:00:00:00:00:00,actions=drop
121 dl_dst=aa:bb:cc:dd:ee:ff/fe:ff:ff:ff:ff:ff,actions=drop
122 dl_dst=aa:bb:cc:dd:ee:ff/00:00:00:00:00:00,actions=drop
124 AT_CHECK([ovs-ofctl -F nxm parse-flows flows.txt], [0], [stdout])
125 AT_CHECK([[sed 's/ (xid=0x[0-9a-fA-F]*)//' stdout]], [0], [dnl
126 usable protocols: NXM
127 chosen protocol: NXM-table_id
128 NXT_FLOW_MOD: ADD tcp,tp_src=123 actions=FLOOD
129 NXT_FLOW_MOD: ADD in_port=65534,dl_vlan=9,dl_src=00:0a:e4:25:6b:b0 actions=drop
130 NXT_FLOW_MOD: ADD arp,dl_src=00:0a:e4:25:6b:b0,arp_sha=00:0a:e4:25:6b:b0 actions=drop
131 NXT_FLOW_MOD: ADD ipv6,ipv6_label=0x12345 actions=output:2
132 NXT_FLOW_MOD: ADD ipv6,ipv6_src=2001:db8:3c4d:1:2:3:4:5 actions=output:3
133 NXT_FLOW_MOD: ADD ipv6,ipv6_src=2001:db8:3c4d:1::/64 actions=output:4
134 NXT_FLOW_MOD: ADD ipv6,ipv6_dst=2001:db8:3c4d:1:2:3:4:4/127 actions=output:5
135 NXT_FLOW_MOD: ADD tcp6,ipv6_src=2001:db8:3c4d:1::1,tp_dst=80 actions=drop
136 NXT_FLOW_MOD: ADD udp6,ipv6_src=2001:db8:3c4d:1::3,tp_dst=53 actions=drop
137 NXT_FLOW_MOD: ADD icmp6,in_port=3,ipv6_src=2001:db8:3c4d:1::1,icmp_type=134 actions=drop
138 NXT_FLOW_MOD: ADD udp,dl_vlan_pcp=7 idle:5 actions=strip_vlan,output:0
139 NXT_FLOW_MOD: ADD tcp,nw_src=192.168.0.3,tp_dst=80 actions=set_queue:37,output:1
140 NXT_FLOW_MOD: ADD udp,nw_src=192.168.0.3,tp_dst=53 actions=pop_queue,output:1
141 NXT_FLOW_MOD: ADD icmp6,icmp_type=135,nd_target=fec0:0:1234:f045:8fff:1111:fe4e:571 actions=drop
142 NXT_FLOW_MOD: ADD icmp6,icmp_type=135,nd_sll=00:0a:e4:25:6b:b0 actions=drop
143 NXT_FLOW_MOD: ADD icmp6,icmp_type=136,nd_target=fec0:0:1234:f045:8fff:1111:fe4e:571,nd_tll=00:0a:e4:25:6b:b1 actions=drop
144 NXT_FLOW_MOD: ADD priority=60000 cookie:0x123456789abcdef hard:10 actions=CONTROLLER:65535
145 NXT_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
146 NXT_FLOW_MOD: ADD tun_id=0x1234 cookie:0x5678 actions=FLOOD
147 NXT_FLOW_MOD: ADD actions=drop
148 NXT_FLOW_MOD: ADD tun_id=0x1234000056780000/0xffff0000ffff0000 actions=drop
149 NXT_FLOW_MOD: ADD dl_dst=01:00:00:00:00:00/01:00:00:00:00:00 actions=drop
150 NXT_FLOW_MOD: ADD dl_dst=00:00:00:00:00:00/01:00:00:00:00:00 actions=drop
151 NXT_FLOW_MOD: ADD dl_dst=aa:bb:cc:dd:ee:ff/fe:ff:ff:ff:ff:ff actions=drop
152 NXT_FLOW_MOD: ADD actions=drop
156 AT_SETUP([ovs-ofctl -F nxm -mmm parse-flows])
157 AT_DATA([flows.txt], [[
159 tcp,tp_src=123,actions=flood
160 in_port=LOCAL dl_vlan=9 dl_src=00:0A:E4:25:6B:B0 actions=drop
161 arp,dl_src=00:0A:E4:25:6B:B0,arp_sha=00:0A:E4:25:6B:B0 actions=drop
162 ipv6,ipv6_label=0x12345 actions=2
163 ipv6,ipv6_src=2001:db8:3c4d:1:2:3:4:5 actions=3
164 ipv6,ipv6_src=2001:db8:3c4d:1:2:3:4:5/64 actions=4
165 ipv6,ipv6_dst=2001:db8:3c4d:1:2:3:4:5/127 actions=5
166 tcp6,ipv6_src=2001:db8:3c4d:1::1,tp_dst=80 actions=drop
167 udp6,ipv6_src=2001:db8:3c4d:1::3,tp_dst=53 actions=drop
168 in_port=3 icmp6,ipv6_src=2001:db8:3c4d:1::1,icmp_type=134 actions=drop
169 udp dl_vlan_pcp=7 idle_timeout=5 actions=strip_vlan output:0
170 tcp,nw_src=192.168.0.3,tp_dst=80 actions=set_queue:37,output:1
171 udp,nw_src=192.168.0.3,tp_dst=53 actions=pop_queue,output:1
172 icmp6,icmp_type=135,nd_target=FEC0::1234:F045:8FFF:1111:FE4E:0571 actions=drop
173 icmp6,icmp_type=135,nd_sll=00:0A:E4:25:6B:B0 actions=drop
174 icmp6,icmp_type=136,nd_target=FEC0::1234:F045:8FFF:1111:FE4E:0571,nd_tll=00:0A:E4:25:6B:B1 actions=drop
175 cookie=0x123456789abcdef hard_timeout=10 priority=60000 actions=controller
176 actions=note:41.42.43,note:00.01.02.03.04.05.06.07,note
177 tun_id=0x1234,cookie=0x5678,actions=flood
179 reg0=123,actions=move:NXM_NX_REG0[0..5]->NXM_NX_REG1[26..31],load:55->NXM_NX_REG2[0..31],move:NXM_NX_REG0[0..31]->NXM_NX_TUN_ID[0..31],move:NXM_NX_REG0[0..15]->NXM_OF_VLAN_TCI[]
180 actions=autopath(5,NXM_NX_REG0[])
181 vlan_tci=0x1123/0x1fff,actions=drop
183 AT_CHECK([ovs-ofctl -F nxm -mmm parse-flows flows.txt], [0], [stdout])
184 AT_CHECK([[sed 's/ (xid=0x[0-9a-fA-F]*)//' stdout]], [0],
185 [[usable protocols: NXM
186 chosen protocol: NXM-table_id
187 NXT_FLOW_MOD: ADD NXM_OF_ETH_TYPE(0800), NXM_OF_IP_PROTO(06), NXM_OF_TCP_SRC(007b) actions=FLOOD
188 NXT_FLOW_MOD: ADD NXM_OF_IN_PORT(fffe), NXM_OF_ETH_SRC(000ae4256bb0), NXM_OF_VLAN_TCI_W(1009/1fff) actions=drop
189 NXT_FLOW_MOD: ADD NXM_OF_ETH_SRC(000ae4256bb0), NXM_OF_ETH_TYPE(0806), NXM_NX_ARP_SHA(000ae4256bb0) actions=drop
190 NXT_FLOW_MOD: ADD NXM_OF_ETH_TYPE(86dd), NXM_NX_IPV6_LABEL(00012345) actions=output:2
191 NXT_FLOW_MOD: ADD NXM_OF_ETH_TYPE(86dd), NXM_NX_IPV6_SRC(20010db83c4d00010002000300040005) actions=output:3
192 NXT_FLOW_MOD: ADD NXM_OF_ETH_TYPE(86dd), NXM_NX_IPV6_SRC_W(20010db83c4d00010000000000000000/ffffffffffffffff0000000000000000) actions=output:4
193 NXT_FLOW_MOD: ADD NXM_OF_ETH_TYPE(86dd), NXM_NX_IPV6_DST_W(20010db83c4d00010002000300040004/fffffffffffffffffffffffffffffffe) actions=output:5
194 NXT_FLOW_MOD: ADD NXM_OF_ETH_TYPE(86dd), NXM_NX_IPV6_SRC(20010db83c4d00010000000000000001), NXM_OF_IP_PROTO(06), NXM_OF_TCP_DST(0050) actions=drop
195 NXT_FLOW_MOD: ADD NXM_OF_ETH_TYPE(86dd), NXM_NX_IPV6_SRC(20010db83c4d00010000000000000003), NXM_OF_IP_PROTO(11), NXM_OF_UDP_DST(0035) actions=drop
196 NXT_FLOW_MOD: ADD NXM_OF_IN_PORT(0003), NXM_OF_ETH_TYPE(86dd), NXM_NX_IPV6_SRC(20010db83c4d00010000000000000001), NXM_OF_IP_PROTO(3a), NXM_NX_ICMPV6_TYPE(86) actions=drop
197 NXT_FLOW_MOD: ADD NXM_OF_ETH_TYPE(0800), NXM_OF_VLAN_TCI_W(f000/f000), NXM_OF_IP_PROTO(11) idle:5 actions=strip_vlan,output:0
198 NXT_FLOW_MOD: ADD NXM_OF_ETH_TYPE(0800), NXM_OF_IP_SRC(c0a80003), NXM_OF_IP_PROTO(06), NXM_OF_TCP_DST(0050) actions=set_queue:37,output:1
199 NXT_FLOW_MOD: ADD NXM_OF_ETH_TYPE(0800), NXM_OF_IP_SRC(c0a80003), NXM_OF_IP_PROTO(11), NXM_OF_UDP_DST(0035) actions=pop_queue,output:1
200 NXT_FLOW_MOD: ADD NXM_OF_ETH_TYPE(86dd), NXM_OF_IP_PROTO(3a), NXM_NX_ICMPV6_TYPE(87), NXM_NX_ND_TARGET(fec000001234f0458fff1111fe4e0571) actions=drop
201 NXT_FLOW_MOD: ADD NXM_OF_ETH_TYPE(86dd), NXM_OF_IP_PROTO(3a), NXM_NX_ICMPV6_TYPE(87), NXM_NX_ND_SLL(000ae4256bb0) actions=drop
202 NXT_FLOW_MOD: ADD NXM_OF_ETH_TYPE(86dd), NXM_OF_IP_PROTO(3a), NXM_NX_ICMPV6_TYPE(88), NXM_NX_ND_TARGET(fec000001234f0458fff1111fe4e0571), NXM_NX_ND_TLL(000ae4256bb1) actions=drop
203 NXT_FLOW_MOD: ADD <any> cookie:0x123456789abcdef hard:10 pri:60000 actions=CONTROLLER:65535
204 NXT_FLOW_MOD: ADD <any> 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
205 NXT_FLOW_MOD: ADD NXM_NX_TUN_ID(0000000000001234) cookie:0x5678 actions=FLOOD
206 NXT_FLOW_MOD: ADD <any> actions=drop
207 NXT_FLOW_MOD: ADD NXM_NX_REG0(0000007b) actions=move:NXM_NX_REG0[0..5]->NXM_NX_REG1[26..31],load:0x37->NXM_NX_REG2[],move:NXM_NX_REG0[]->NXM_NX_TUN_ID[0..31],move:NXM_NX_REG0[0..15]->NXM_OF_VLAN_TCI[]
208 NXT_FLOW_MOD: ADD <any> actions=autopath(5,NXM_NX_REG0[])
209 NXT_FLOW_MOD: ADD NXM_OF_VLAN_TCI_W(1123/1fff) actions=drop
213 AT_SETUP([ovs-ofctl parse-nx-match])
214 AT_KEYWORDS([nx-match])
215 AT_DATA([nx-match.txt], [dnl
223 NXM_OF_ETH_DST(0002e30f80a4)
224 NXM_OF_ETH_DST_W(010000000000/010000000000)
225 NXM_OF_ETH_DST_W(000000000000/010000000000)
226 NXM_OF_ETH_DST_W(ffffffffffff/010000000000)
227 NXM_OF_ETH_DST_W(0002e30f80a4/ffffffffffff)
228 NXM_OF_ETH_DST_W(0002e30f80a4/feffffffffff)
231 NXM_OF_ETH_SRC(020898456ddb)
234 NXM_OF_ETH_TYPE(0800)
235 NXM_OF_ETH_TYPE(0800) NXM_OF_IN_PORT(0012)
238 NXM_OF_VLAN_TCI(f009)
239 NXM_OF_VLAN_TCI(f009) NXM_OF_VLAN_TCI(f009)
240 NXM_OF_VLAN_TCI(0000) # Packets without 802.1Q header.
241 NXM_OF_VLAN_TCI(3123) # Packets with VID=123, PCP=1.
242 NXM_OF_VLAN_TCI(0123) # Does not make sense (but supported anyway)
243 NXM_OF_VLAN_TCI_W(1123/1fff) # Packets with VID=123, any PCP.
244 NXM_OF_VLAN_TCI_W(f000/f000) # Packets with any VID, PCP=7.
245 NXM_OF_VLAN_TCI_W(0000/e000) # No 802.1Q or with VID=0
248 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_TOS(f0)
249 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_TOS(41)
253 NXM_OF_ETH_TYPE(0800) NXM_NX_IP_ECN(03)
254 NXM_OF_ETH_TYPE(0800) NXM_NX_IP_ECN(06)
258 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_PROTO(01)
259 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_PROTO(05)
263 NXM_OF_ETH_TYPE(0800) NXM_NX_IP_TTL(80)
264 NXM_OF_ETH_TYPE(86dd) NXM_NX_IP_TTL(ff)
268 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_SRC(ac100014)
269 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_SRC_W(C0a80000/FFFF0000)
270 NXM_OF_ETH_TYPE(0806) NXM_OF_IP_SRC(ac100014)
271 NXM_OF_IP_SRC_W(C0D80000/FFFF0000)
274 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_DST(ac100014)
275 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_DST_W(C0a88012/FFFF0000)
276 NXM_OF_IP_DST(ac100014)
277 NXM_OF_ETH_TYPE(0806) NXM_OF_IP_DST_W(C0D80000/FFFF0000)
280 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_PROTO(06) NXM_OF_TCP_SRC(4231)
281 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_PROTO(06) NXM_OF_TCP_SRC_W(5050/F0F0)
282 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_PROTO(07) NXM_OF_TCP_SRC(4231)
284 # TCP destination port
285 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_PROTO(06) NXM_OF_TCP_DST(4231)
286 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_PROTO(06) NXM_OF_TCP_DST_W(FDE0/FFF0)
287 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_PROTO(07) NXM_OF_TCP_DST(4231)
290 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_PROTO(11) NXM_OF_UDP_SRC(8732)
291 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_PROTO(11) NXM_OF_UDP_SRC_W(0132/01FF)
292 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_PROTO(06) NXM_OF_UDP_SRC(7823)
294 # UDP destination port
295 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_PROTO(11) NXM_OF_UDP_DST(1782)
296 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_PROTO(11) NXM_OF_UDP_DST_W(5005/F00F)
297 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_PROTO(02) NXM_OF_UDP_DST(1293)
300 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_PROTO(01) NXM_OF_ICMP_TYPE(12)
301 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_PROTO(00) NXM_OF_ICMP_TYPE(10)
304 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_PROTO(01) NXM_OF_ICMP_CODE(12)
305 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_PROTO(00) NXM_OF_ICMP_CODE(10)
306 NXM_OF_ETH_TYPE(0800) NXM_OF_ICMP_CODE(10)
310 NXM_OF_ETH_TYPE(0806) NXM_OF_ARP_OP(0001)
311 NXM_OF_ETH_TYPE(0806) NXM_OF_ARP_OP(1111)
312 NXM_OF_ETH_TYPE(0000) NXM_OF_ARP_OP(0001)
314 NXM_OF_ETH_TYPE(0806) NXM_OF_ARP_OP(0001) NXM_OF_ARP_OP(0001)
316 # ARP source protocol address
317 NXM_OF_ETH_TYPE(0806) NXM_OF_ARP_SPA(ac100014)
318 NXM_OF_ETH_TYPE(0806) NXM_OF_ARP_SPA_W(C0a81234/FFFFFF00)
319 NXM_OF_ETH_TYPE(0800) NXM_OF_ARP_SPA(ac100014)
320 NXM_OF_ARP_SPA_W(C0D8fedc/FFFF0000)
322 # ARP destination protocol address
323 NXM_OF_ETH_TYPE(0806) NXM_OF_ARP_TPA(ac100014)
324 NXM_OF_ETH_TYPE(0806) NXM_OF_ARP_TPA_W(C0a812fe/FFFFFF00)
325 NXM_OF_ETH_TYPE(0800) NXM_OF_ARP_TPA(ac100014)
326 NXM_OF_ARP_TPA_W(C0D80000/FFFF0000)
328 # ARP source hardware address
329 NXM_OF_ETH_TYPE(0806) NXM_NX_ARP_SHA(0002e30f80a4)
330 NXM_OF_ETH_TYPE(0800) NXM_NX_ARP_SHA(0002e30f80a4)
331 NXM_NX_ARP_SHA(0002e30f80a4)
333 # ARP destination hardware address
334 NXM_OF_ETH_TYPE(0806) NXM_NX_ARP_THA(0002e30f80a4)
335 NXM_OF_ETH_TYPE(0800) NXM_NX_ARP_THA(0002e30f80a4)
336 NXM_NX_ARP_THA(0002e30f80a4)
339 NXM_OF_ETH_TYPE(86dd) NXM_NX_IPV6_SRC(20010db83c4d00010002000300040005)
340 NXM_OF_ETH_TYPE(0800) NXM_NX_IPV6_SRC(20010db83c4d00010002000300040005)
341 NXM_OF_ETH_TYPE(86dd) NXM_NX_IPV6_SRC_W(20010db83c4d00010000000000000000/ffffffffffffffff0000000000000000)
342 NXM_OF_ETH_TYPE(0800) NXM_NX_IPV6_SRC_W(20010db83c4d00010000000000000000/ffffffffffffffff0000000000000000)
345 NXM_OF_ETH_TYPE(86dd) NXM_NX_IPV6_DST(20010db83c4d00010002000300040005)
346 NXM_OF_ETH_TYPE(0800) NXM_NX_IPV6_DST(20010db83c4d00010002000300040005)
347 NXM_OF_ETH_TYPE(86dd) NXM_NX_IPV6_DST_W(20010db83c4d00010000000000000000/ffffffffffffffff0000000000000000)
348 NXM_OF_ETH_TYPE(0800) NXM_NX_IPV6_DST_W(20010db83c4d00010000000000000000/ffffffffffffffff0000000000000000)
350 # ND source hardware address
351 NXM_OF_ETH_TYPE(86dd) NXM_OF_IP_PROTO(3a) NXM_NX_ICMPV6_TYPE(87) NXM_NX_ND_TARGET(20010db83c4d00010002000300040005) NXM_NX_ND_SLL(0002e30f80a4)
352 NXM_OF_ETH_TYPE(86dd) NXM_OF_IP_PROTO(3a) NXM_NX_ICMPV6_TYPE(88) NXM_NX_ND_TARGET(20010db83c4d00010002000300040005) NXM_NX_ND_SLL(0002e30f80a4)
353 NXM_OF_ETH_TYPE(86dd) NXM_OF_IP_PROTO(3b) NXM_NX_ICMPV6_TYPE(87) NXM_NX_ND_TARGET(20010db83c4d00010002000300040005) NXM_NX_ND_SLL(0002e30f80a4)
354 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_PROTO(3a) NXM_NX_ICMPV6_TYPE(87) NXM_NX_ND_TARGET(20010db83c4d00010002000300040005) NXM_NX_ND_SLL(0002e30f80a4)
356 # ND destination hardware address
357 NXM_OF_ETH_TYPE(86dd) NXM_OF_IP_PROTO(3a) NXM_NX_ICMPV6_TYPE(88) NXM_NX_ND_TARGET(20010db83c4d00010002000300040005) NXM_NX_ND_TLL(0002e30f80a4)
358 NXM_OF_ETH_TYPE(86dd) NXM_OF_IP_PROTO(3a) NXM_NX_ICMPV6_TYPE(87) NXM_NX_ND_TARGET(20010db83c4d00010002000300040005) NXM_NX_ND_TLL(0002e30f80a4)
359 NXM_OF_ETH_TYPE(86dd) NXM_OF_IP_PROTO(3b) NXM_NX_ICMPV6_TYPE(87) NXM_NX_ND_TARGET(20010db83c4d00010002000300040005) NXM_NX_ND_TLL(0002e30f80a4)
360 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_PROTO(3a) NXM_NX_ICMPV6_TYPE(88) NXM_NX_ND_TARGET(20010db83c4d00010002000300040005) NXM_NX_ND_TLL(0002e30f80a4)
363 NXM_OF_ETH_TYPE(0800) NXM_NX_IP_FRAG(00)
364 NXM_OF_ETH_TYPE(0800) NXM_NX_IP_FRAG(01)
365 NXM_OF_ETH_TYPE(0800) NXM_NX_IP_FRAG(02)
366 NXM_OF_ETH_TYPE(0800) NXM_NX_IP_FRAG(03)
367 NXM_OF_ETH_TYPE(0800) NXM_NX_IP_FRAG_W(00/03)
368 NXM_OF_ETH_TYPE(0800) NXM_NX_IP_FRAG_W(00/fd)
369 NXM_OF_ETH_TYPE(0800) NXM_NX_IP_FRAG_W(00/02)
370 NXM_OF_ETH_TYPE(0800) NXM_NX_IP_FRAG_W(01/01)
371 NXM_OF_ETH_TYPE(0800) NXM_NX_IP_FRAG_W(02/02)
372 NXM_OF_ETH_TYPE(0800) NXM_NX_IP_FRAG_W(03/03)
373 NXM_OF_ETH_TYPE(0800) NXM_NX_IP_FRAG(f3)
376 NXM_OF_ETH_TYPE(86dd) NXM_NX_IP_FRAG(00)
377 NXM_OF_ETH_TYPE(86dd) NXM_NX_IP_FRAG(01)
378 NXM_OF_ETH_TYPE(86dd) NXM_NX_IP_FRAG(02)
379 NXM_OF_ETH_TYPE(86dd) NXM_NX_IP_FRAG(03)
380 NXM_OF_ETH_TYPE(86dd) NXM_NX_IP_FRAG_W(00/03)
381 NXM_OF_ETH_TYPE(86dd) NXM_NX_IP_FRAG_W(00/01)
382 NXM_OF_ETH_TYPE(86dd) NXM_NX_IP_FRAG_W(00/02)
383 NXM_OF_ETH_TYPE(86dd) NXM_NX_IP_FRAG_W(01/01)
384 NXM_OF_ETH_TYPE(86dd) NXM_NX_IP_FRAG_W(02/02)
385 NXM_OF_ETH_TYPE(86dd) NXM_NX_IP_FRAG_W(03/03)
386 NXM_OF_ETH_TYPE(86dd) NXM_NX_IP_FRAG(f3)
389 NXM_NX_COOKIE(00000000abcdef01)
390 NXM_NX_COOKIE_W(84200000abcdef01/84200000FFFFFFFF)
393 NXM_NX_TUN_ID(00000000abcdef01)
394 NXM_NX_TUN_ID_W(84200000abcdef01/84200000FFFFFFFF)
397 NXM_NX_REG0(acebdf56)
398 NXM_NX_REG0_W(a0e0d050/f0f0f0f0)
400 # Invalid field number.
403 # Unimplemented registers.
405 # This test assumes that at least two registers, but fewer than 16,
406 # registers are implemented.
408 00010108(12345678/12345678)
410 00011f08(12345678/12345678)
412 AT_CHECK([ovs-ofctl --strict parse-nx-match < nx-match.txt], [0], [dnl
420 NXM_OF_ETH_DST(0002e30f80a4)
421 NXM_OF_ETH_DST_W(010000000000/010000000000)
422 NXM_OF_ETH_DST_W(000000000000/010000000000)
423 NXM_OF_ETH_DST_W(010000000000/010000000000)
424 NXM_OF_ETH_DST(0002e30f80a4)
425 NXM_OF_ETH_DST_W(0002e30f80a4/feffffffffff)
428 NXM_OF_ETH_SRC(020898456ddb)
431 NXM_OF_ETH_TYPE(0800)
432 NXM_OF_IN_PORT(0012), NXM_OF_ETH_TYPE(0800)
435 NXM_OF_VLAN_TCI(f009)
436 nx_pull_match() returned error OFPBMC_DUP_FIELD
437 NXM_OF_VLAN_TCI(0000)
438 NXM_OF_VLAN_TCI(3123)
439 NXM_OF_VLAN_TCI(0123)
440 NXM_OF_VLAN_TCI_W(1123/1fff)
441 NXM_OF_VLAN_TCI_W(f000/f000)
442 NXM_OF_VLAN_TCI_W(0000/e000)
445 NXM_OF_ETH_TYPE(0800), NXM_OF_IP_TOS(f0)
446 nx_pull_match() returned error OFPBMC_BAD_VALUE
447 nx_pull_match() returned error OFPBMC_BAD_PREREQ
450 NXM_OF_ETH_TYPE(0800), NXM_NX_IP_ECN(03)
451 nx_pull_match() returned error OFPBMC_BAD_VALUE
452 nx_pull_match() returned error OFPBMC_BAD_PREREQ
455 NXM_OF_ETH_TYPE(0800), NXM_OF_IP_PROTO(01)
456 NXM_OF_ETH_TYPE(0800), NXM_OF_IP_PROTO(05)
457 nx_pull_match() returned error OFPBMC_BAD_PREREQ
460 NXM_OF_ETH_TYPE(0800), NXM_NX_IP_TTL(80)
461 NXM_OF_ETH_TYPE(86dd), NXM_NX_IP_TTL(ff)
462 nx_pull_match() returned error OFPBMC_BAD_PREREQ
465 NXM_OF_ETH_TYPE(0800), NXM_OF_IP_SRC(ac100014)
466 NXM_OF_ETH_TYPE(0800), NXM_OF_IP_SRC_W(c0a80000/ffff0000)
467 nx_pull_match() returned error OFPBMC_BAD_PREREQ
468 nx_pull_match() returned error OFPBMC_BAD_PREREQ
471 NXM_OF_ETH_TYPE(0800), NXM_OF_IP_DST(ac100014)
472 NXM_OF_ETH_TYPE(0800), NXM_OF_IP_DST_W(c0a80000/ffff0000)
473 nx_pull_match() returned error OFPBMC_BAD_PREREQ
474 nx_pull_match() returned error OFPBMC_BAD_PREREQ
477 NXM_OF_ETH_TYPE(0800), NXM_OF_IP_PROTO(06), NXM_OF_TCP_SRC(4231)
478 NXM_OF_ETH_TYPE(0800), NXM_OF_IP_PROTO(06), NXM_OF_TCP_SRC_W(5050/f0f0)
479 nx_pull_match() returned error OFPBMC_BAD_PREREQ
481 # TCP destination port
482 NXM_OF_ETH_TYPE(0800), NXM_OF_IP_PROTO(06), NXM_OF_TCP_DST(4231)
483 NXM_OF_ETH_TYPE(0800), NXM_OF_IP_PROTO(06), NXM_OF_TCP_DST_W(fde0/fff0)
484 nx_pull_match() returned error OFPBMC_BAD_PREREQ
487 NXM_OF_ETH_TYPE(0800), NXM_OF_IP_PROTO(11), NXM_OF_UDP_SRC(8732)
488 NXM_OF_ETH_TYPE(0800), NXM_OF_IP_PROTO(11), NXM_OF_UDP_SRC_W(0132/01ff)
489 nx_pull_match() returned error OFPBMC_BAD_PREREQ
491 # UDP destination port
492 NXM_OF_ETH_TYPE(0800), NXM_OF_IP_PROTO(11), NXM_OF_UDP_DST(1782)
493 NXM_OF_ETH_TYPE(0800), NXM_OF_IP_PROTO(11), NXM_OF_UDP_DST_W(5005/f00f)
494 nx_pull_match() returned error OFPBMC_BAD_PREREQ
497 NXM_OF_ETH_TYPE(0800), NXM_OF_IP_PROTO(01), NXM_OF_ICMP_TYPE(12)
498 nx_pull_match() returned error OFPBMC_BAD_PREREQ
501 NXM_OF_ETH_TYPE(0800), NXM_OF_IP_PROTO(01), NXM_OF_ICMP_CODE(12)
502 nx_pull_match() returned error OFPBMC_BAD_PREREQ
503 nx_pull_match() returned error OFPBMC_BAD_PREREQ
504 nx_pull_match() returned error OFPBMC_BAD_PREREQ
507 NXM_OF_ETH_TYPE(0806), NXM_OF_ARP_OP(0001)
508 nx_pull_match() returned error OFPBMC_BAD_VALUE
509 nx_pull_match() returned error OFPBMC_BAD_PREREQ
510 nx_pull_match() returned error OFPBMC_BAD_PREREQ
511 nx_pull_match() returned error OFPBMC_DUP_FIELD
513 # ARP source protocol address
514 NXM_OF_ETH_TYPE(0806), NXM_OF_ARP_SPA(ac100014)
515 NXM_OF_ETH_TYPE(0806), NXM_OF_ARP_SPA_W(c0a81200/ffffff00)
516 nx_pull_match() returned error OFPBMC_BAD_PREREQ
517 nx_pull_match() returned error OFPBMC_BAD_PREREQ
519 # ARP destination protocol address
520 NXM_OF_ETH_TYPE(0806), NXM_OF_ARP_TPA(ac100014)
521 NXM_OF_ETH_TYPE(0806), NXM_OF_ARP_TPA_W(c0a81200/ffffff00)
522 nx_pull_match() returned error OFPBMC_BAD_PREREQ
523 nx_pull_match() returned error OFPBMC_BAD_PREREQ
525 # ARP source hardware address
526 NXM_OF_ETH_TYPE(0806), NXM_NX_ARP_SHA(0002e30f80a4)
527 nx_pull_match() returned error OFPBMC_BAD_PREREQ
528 nx_pull_match() returned error OFPBMC_BAD_PREREQ
530 # ARP destination hardware address
531 NXM_OF_ETH_TYPE(0806), NXM_NX_ARP_THA(0002e30f80a4)
532 nx_pull_match() returned error OFPBMC_BAD_PREREQ
533 nx_pull_match() returned error OFPBMC_BAD_PREREQ
536 NXM_OF_ETH_TYPE(86dd), NXM_NX_IPV6_SRC(20010db83c4d00010002000300040005)
537 nx_pull_match() returned error OFPBMC_BAD_PREREQ
538 NXM_OF_ETH_TYPE(86dd), NXM_NX_IPV6_SRC_W(20010db83c4d00010000000000000000/ffffffffffffffff0000000000000000)
539 nx_pull_match() returned error OFPBMC_BAD_PREREQ
542 NXM_OF_ETH_TYPE(86dd), NXM_NX_IPV6_DST(20010db83c4d00010002000300040005)
543 nx_pull_match() returned error OFPBMC_BAD_PREREQ
544 NXM_OF_ETH_TYPE(86dd), NXM_NX_IPV6_DST_W(20010db83c4d00010000000000000000/ffffffffffffffff0000000000000000)
545 nx_pull_match() returned error OFPBMC_BAD_PREREQ
547 # ND source hardware address
548 NXM_OF_ETH_TYPE(86dd), NXM_OF_IP_PROTO(3a), NXM_NX_ICMPV6_TYPE(87), NXM_NX_ND_TARGET(20010db83c4d00010002000300040005), NXM_NX_ND_SLL(0002e30f80a4)
549 nx_pull_match() returned error OFPBMC_BAD_PREREQ
550 nx_pull_match() returned error OFPBMC_BAD_PREREQ
551 nx_pull_match() returned error OFPBMC_BAD_PREREQ
553 # ND destination hardware address
554 NXM_OF_ETH_TYPE(86dd), NXM_OF_IP_PROTO(3a), NXM_NX_ICMPV6_TYPE(88), NXM_NX_ND_TARGET(20010db83c4d00010002000300040005), NXM_NX_ND_TLL(0002e30f80a4)
555 nx_pull_match() returned error OFPBMC_BAD_PREREQ
556 nx_pull_match() returned error OFPBMC_BAD_PREREQ
557 nx_pull_match() returned error OFPBMC_BAD_PREREQ
560 NXM_OF_ETH_TYPE(0800), NXM_NX_IP_FRAG(00)
561 NXM_OF_ETH_TYPE(0800), NXM_NX_IP_FRAG(01)
562 NXM_OF_ETH_TYPE(0800), NXM_NX_IP_FRAG(02)
563 NXM_OF_ETH_TYPE(0800), NXM_NX_IP_FRAG(03)
564 NXM_OF_ETH_TYPE(0800), NXM_NX_IP_FRAG(00)
565 NXM_OF_ETH_TYPE(0800), NXM_NX_IP_FRAG_W(00/01)
566 NXM_OF_ETH_TYPE(0800), NXM_NX_IP_FRAG_W(00/02)
567 NXM_OF_ETH_TYPE(0800), NXM_NX_IP_FRAG_W(01/01)
568 NXM_OF_ETH_TYPE(0800), NXM_NX_IP_FRAG_W(02/02)
569 NXM_OF_ETH_TYPE(0800), NXM_NX_IP_FRAG(03)
570 nx_pull_match() returned error OFPBMC_BAD_VALUE
573 NXM_OF_ETH_TYPE(86dd), NXM_NX_IP_FRAG(00)
574 NXM_OF_ETH_TYPE(86dd), NXM_NX_IP_FRAG(01)
575 NXM_OF_ETH_TYPE(86dd), NXM_NX_IP_FRAG(02)
576 NXM_OF_ETH_TYPE(86dd), NXM_NX_IP_FRAG(03)
577 NXM_OF_ETH_TYPE(86dd), NXM_NX_IP_FRAG(00)
578 NXM_OF_ETH_TYPE(86dd), NXM_NX_IP_FRAG_W(00/01)
579 NXM_OF_ETH_TYPE(86dd), NXM_NX_IP_FRAG_W(00/02)
580 NXM_OF_ETH_TYPE(86dd), NXM_NX_IP_FRAG_W(01/01)
581 NXM_OF_ETH_TYPE(86dd), NXM_NX_IP_FRAG_W(02/02)
582 NXM_OF_ETH_TYPE(86dd), NXM_NX_IP_FRAG(03)
583 nx_pull_match() returned error OFPBMC_BAD_VALUE
586 NXM_NX_COOKIE(00000000abcdef01)
587 NXM_NX_COOKIE_W(84200000abcdef01/84200000ffffffff)
590 NXM_NX_TUN_ID(00000000abcdef01)
591 NXM_NX_TUN_ID_W(84200000abcdef01/84200000ffffffff)
594 NXM_NX_REG0(acebdf56)
595 NXM_NX_REG0_W(a0e0d050/f0f0f0f0)
597 # Invalid field number.
598 nx_pull_match() returned error OFPBMC_BAD_FIELD
600 # Unimplemented registers.
602 # This test assumes that at least two registers, but fewer than 16,
603 # registers are implemented.
604 NXM_NX_REG0(12345678)
605 NXM_NX_REG0_W(12345678/12345678)
606 nx_pull_match() returned error OFPBMC_BAD_FIELD
607 nx_pull_match() returned error OFPBMC_BAD_FIELD
611 AT_SETUP([ovs-ofctl parse-nx-match loose])
612 AT_KEYWORDS([nx-match])
613 AT_DATA([nx-match.txt], [dnl
614 NXM_OF_IN_PORT(0001), 01020304(1111/2222), NXM_OF_ETH_TYPE(0800)
617 AT_CHECK([ovs-ofctl --strict parse-nx-match < nx-match.txt], [0], [dnl
618 nx_pull_match() returned error OFPBMC_BAD_FIELD
621 AT_CHECK([ovs-ofctl parse-nx-match < nx-match.txt], [0], [dnl
622 NXM_OF_IN_PORT(0001), NXM_OF_ETH_TYPE(0800)
626 dnl Check that "-F openflow10" rejects a flow_mod with a tun_id, since
627 dnl OpenFlow 1.0 doesn't support tunnels.
628 AT_SETUP([ovs-ofctl -F option and tun_id])
629 AT_CHECK([ovs-ofctl -F openflow10 add-flow dummy tun_id=123,actions=drop],
630 [1], [], [ovs-ofctl: none of the usable flow formats (NXM) is among the allowed flow formats (OpenFlow10)
634 dnl Check that "-F nxm" really forces add-flow to use the NXM flow format.
635 dnl (If it doesn't, then either the tun_id won't show up at all, or it will
636 dnl additionally show up as the top 32 bits of the cookie.) This checks
637 dnl for regression against bug #4566.
638 AT_SETUP([ovs-ofctl -F option with flow_mods])
640 AT_CHECK([ovs-ofctl -F nxm add-flow br0 tun_id=0x12345678,actions=drop])
641 AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip], [0], [dnl
643 tun_id=0x12345678 actions=drop
648 dnl Check that "-F openflow10" is really honored on dump-flows.
649 dnl (If it isn't, then dump-flows will show the register match.)
650 AT_SETUP([ovs-ofctl dump-flows honors -F option])
652 AT_CHECK([ovs-ofctl add-flow br0 reg0=0x12345,actions=drop])
653 AT_CHECK([ovs-ofctl -F openflow10 dump-flows br0 | ofctl_strip], [0], [dnl
660 dnl Check that "-F openflow10" fails on dump-flows if the requested match
661 dnl can't be represented in OpenFlow 1.0.
662 AT_SETUP([ovs-ofctl dump-flows rejects bad -F option])
664 AT_CHECK([ovs-ofctl -F openflow10 dump-flows unix:br0.mgmt reg0=0xabcdef], [1], [],
665 [ovs-ofctl: none of the usable flow formats (NXM) is among the allowed flow formats (OpenFlow10)
670 dnl Check that add-flow reports non-normalized flows (feature #5029).
671 AT_SETUP([ovs-ofctl add-flow reports non-normalized flows])
673 AT_CHECK([ovs-ofctl TESTABLE_LOG add-flow br0 nw_src=1.2.3.4,actions=5],
675 ofp_util|INFO|normalization changed ofp_match, details:
676 ofp_util|INFO| pre: nw_src=1.2.3.4
677 ofp_util|INFO|post: @&t@