3 AT_SETUP([ovs-ofctl parse-flows choice of protocol])
4 # This doesn't cover some potential vlan_tci test cases.
7 'tun_id=0/0x1 NXM,OXM' \
8 'tun_src=1.2.3.4 NXM,OXM' \
9 'tun_src=1.2.3.4/0.0.0.1 NXM,OXM' \
10 'tun_dst=1.2.3.4 NXM,OXM' \
11 'tun_dst=1.2.3.4/0.0.0.1 NXM,OXM' \
12 'tun_flags=1 NXM,OXM' \
13 'tun_flags=+oam NXM,OXM' \
16 'tun_gbp_id=0 NXM,OXM' \
17 'tun_gbp_id=0/0x1 NXM,OXM' \
18 'tun_gbp_flags=0 NXM,OXM' \
19 'tun_gbp_flags=0/0x1 NXM,OXM' \
20 'tun_metadata0=0 NXM,OXM' \
21 'tun_metadata0=0/0x1 NXM,OXM' \
22 'metadata=0 NXM,OXM,OpenFlow11' \
23 'metadata=1/1 NXM,OXM,OpenFlow11' \
25 'skb_priority=0 none' \
26 'pkt_mark=1 NXM,OXM' \
27 'pkt_mark=1/1 NXM,OXM' \
52 'dl_src=00:11:22:33:44:55 any' \
53 'dl_src=00:11:22:33:44:55/00:ff:ff:ff:ff:ff NXM,OXM,OpenFlow11' \
54 'dl_dst=00:11:22:33:44:55 any' \
55 'dl_dst=00:11:22:33:44:55/00:ff:ff:ff:ff:ff NXM,OXM,OpenFlow11' \
56 'dl_type=0x1234 any' \
57 'dl_type=0x0800 any' \
58 'dl_type=0x0806 any' \
59 'dl_type=0x86dd any' \
61 'vlan_tci=0x1009 any' \
62 'vlan_tci=0x1009/0x1 NXM,OXM' \
65 'vlan_vid=11/0x1 NXM,OXM' \
68 'mpls,mpls_label=5 NXM,OXM,OpenFlow11' \
69 'mpls,mpls_tc=1 NXM,OXM,OpenFlow11' \
70 'mpls,mpls_bos=0 NXM,OXM' \
71 'ip,ip_src=1.2.3.4 any' \
72 'ip,ip_src=192.168.0.0/24 any' \
73 'ip,ip_src=192.0.168.0/255.0.255.0 NXM,OXM,OpenFlow11' \
74 'ip,ip_dst=1.2.3.4 any' \
75 'ip,ip_dst=192.168.0.0/24 any' \
76 'ip,ip_dst=192.0.168.0/255.0.255.0 NXM,OXM,OpenFlow11' \
77 'ipv6,ipv6_src=::1 NXM,OXM' \
78 'ipv6,ipv6_src=0:0:0:0:0:0:0:1/::1 NXM,OXM' \
79 'ipv6,ipv6_dst=::1 NXM,OXM' \
80 'ipv6,ipv6_dst=0:0:0:0:0:0:0:1/::1 NXM,OXM' \
81 'ipv6,ipv6_label=5 NXM,OXM' \
82 'ipv6,ipv6_label=5/1 NXM,OXM' \
84 'ipv6,nw_proto=1 NXM,OXM' \
85 'ip,nw_tos=0xf0 any' \
86 'ipv6,nw_tos=0xf0 NXM,OXM' \
87 'ip,ip_dscp=0x3c any' \
88 'ipv6,ip_dscp=0x3c NXM,OXM' \
89 'ip,nw_ecn=1 NXM,OXM' \
90 'ipv6,nw_ecn=1 NXM,OXM' \
91 'ip,nw_ttl=5 NXM,OXM' \
92 'ipv6,nw_ttl=5 NXM,OXM' \
93 'ip,ip_frag=no NXM,OXM' \
94 'ipv6,ip_frag=no NXM,OXM' \
96 'arp,arp_spa=1.2.3.4 any' \
97 'arp,arp_spa=1.2.3.4/0.0.0.1 NXM,OXM,OpenFlow11' \
98 'arp,arp_tpa=1.2.3.4 any' \
99 'arp,arp_tpa=1.2.3.4/0.0.0.1 NXM,OXM,OpenFlow11' \
100 'arp,arp_sha=00:11:22:33:44:55 NXM,OXM' \
101 'arp,arp_sha=00:11:22:33:44:55/00:ff:ff:ff:ff:ff NXM,OXM' \
102 'arp,arp_tha=00:11:22:33:44:55 NXM,OXM' \
103 'arp,arp_tha=00:11:22:33:44:55/00:ff:ff:ff:ff:ff NXM,OXM' \
104 'tcp,tcp_src=80 any' \
105 'tcp,tcp_src=0x1000/0x1000 NXM,OXM' \
106 'tcp6,tcp_src=80 NXM,OXM' \
107 'tcp6,tcp_src=0x1000/0x1000 NXM,OXM' \
108 'tcp,tcp_dst=80 any' \
109 'tcp,tcp_dst=0x1000/0x1000 NXM,OXM' \
110 'tcp6,tcp_dst=80 NXM,OXM' \
111 'tcp6,tcp_dst=0x1000/0x1000 NXM,OXM' \
112 'udp,udp_src=80 any' \
113 'udp,udp_src=0x1000/0x1000 NXM,OXM' \
114 'udp6,udp_src=80 NXM,OXM' \
115 'udp6,udp_src=0x1000/0x1000 NXM,OXM' \
116 'udp,udp_dst=80 any' \
117 'udp,udp_dst=0x1000/0x1000 NXM,OXM' \
118 'udp6,udp_dst=80 NXM,OXM' \
119 'udp6,udp_dst=0x1000/0x1000 NXM,OXM' \
120 'icmp,icmp_type=1 any' \
121 'icmp,icmp_code=2 any' \
122 'icmp6,icmpv6_type=1 NXM,OXM' \
123 'icmp6,icmpv6_code=2 NXM,OXM'
127 echo "### test case: '$1' should have usable protocols '$2'"
128 if test "$2" = none; then
129 AT_CHECK([ovs-ofctl parse-flow "$1,actions=drop"], [1],
132 [ovs-ofctl: actions are invalid with specified match (OFPBAC_MATCH_INCONSISTENT)
135 AT_CHECK_UNQUOTED([ovs-ofctl parse-flow "$1,actions=drop" | sed 1q], [0],
136 [usable protocols: $2
142 AT_SETUP([ovs-ofctl parse-flows (OpenFlow 1.0)])
143 AT_DATA([flows.txt], [[
145 tcp,tp_src=123,actions=flood
146 in_port=LOCAL dl_vlan=9 dl_src=00:0A:E4:25:6B:B0 actions=drop
147 udp dl_vlan_pcp=7 idle_timeout=5 actions=strip_vlan output:0
148 tcp,nw_src=192.168.0.3,tp_dst=80 actions=set_queue:37,output:1
149 udp,nw_src=192.168.0.3,tp_dst=53 actions=pop_queue,output:1
150 cookie=0x123456789abcdef hard_timeout=10 priority=60000 actions=controller
151 actions=note:41.42.43,note:00.01.02.03.04.05.06.07,note
152 ip,actions=set_field:10.4.3.77->ip_src
155 in_port=0 actions=resubmit:0
156 actions=sample(probability=12345,collector_set_id=23456,obs_domain_id=34567,obs_point_id=45678)
159 AT_CHECK([ovs-ofctl parse-flows flows.txt
161 AT_CHECK([[sed 's/ (xid=0x[0-9a-fA-F]*)//' stdout]], [0],
162 [[usable protocols: any
163 chosen protocol: OpenFlow10-table_id
164 OFPT_FLOW_MOD: ADD tcp,tp_src=123 actions=FLOOD
165 OFPT_FLOW_MOD: ADD in_port=LOCAL,dl_vlan=9,dl_src=00:0a:e4:25:6b:b0 actions=drop
166 OFPT_FLOW_MOD: ADD udp,dl_vlan_pcp=7 idle:5 actions=strip_vlan,output:0
167 OFPT_FLOW_MOD: ADD tcp,nw_src=192.168.0.3,tp_dst=80 actions=set_queue:37,output:1
168 OFPT_FLOW_MOD: ADD udp,nw_src=192.168.0.3,tp_dst=53 actions=pop_queue,output:1
169 OFPT_FLOW_MOD: ADD priority=60000 cookie:0x123456789abcdef hard:10 actions=CONTROLLER:65535
170 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
171 OFPT_FLOW_MOD: ADD ip actions=mod_nw_src:10.4.3.77
172 OFPT_FLOW_MOD: ADD sctp actions=drop
173 OFPT_FLOW_MOD: ADD sctp actions=drop
174 OFPT_FLOW_MOD: ADD in_port=0 actions=resubmit:0
175 OFPT_FLOW_MOD: ADD actions=sample(probability=12345,collector_set_id=23456,obs_domain_id=34567,obs_point_id=45678)
179 AT_SETUP([ovs-ofctl parse-flows (OpenFlow 1.1)])
180 AT_DATA([flows.txt], [[
182 tcp,tp_src=123,actions=flood
183 in_port=LOCAL dl_vlan=9 dl_src=00:0A:E4:25:6B:B0 actions=drop
184 udp dl_vlan_pcp=7 idle_timeout=5 actions=strip_vlan output:0
185 tcp,nw_src=192.168.0.3,tp_dst=80 actions=set_queue:37,output:1
186 udp,nw_src=192.168.0.3,tp_dst=53 actions=mod_nw_ecn:2,output:1
187 cookie=0x123456789abcdef hard_timeout=10 priority=60000 actions=controller
188 actions=note:41.42.43,note:00.01.02.03.04.05.06.07,note
189 ip,actions=mod_nw_ttl:1,set_field:10.4.3.77->ip_src
192 in_port=0 actions=resubmit:0
193 actions=sample(probability=12345,collector_set_id=23456,obs_domain_id=34567,obs_point_id=45678)
196 AT_CHECK([ovs-ofctl --protocols OpenFlow11 parse-flows flows.txt
198 AT_CHECK([[sed 's/ (xid=0x[0-9a-fA-F]*)//' stdout]], [0],
199 [[usable protocols: any
200 chosen protocol: OpenFlow11
201 OFPT_FLOW_MOD (OF1.1): ADD tcp,tp_src=123 actions=FLOOD
202 OFPT_FLOW_MOD (OF1.1): ADD in_port=LOCAL,dl_vlan=9,dl_src=00:0a:e4:25:6b:b0 actions=drop
203 OFPT_FLOW_MOD (OF1.1): ADD udp,dl_vlan_pcp=7 idle:5 actions=pop_vlan,output:0
204 OFPT_FLOW_MOD (OF1.1): ADD tcp,nw_src=192.168.0.3,tp_dst=80 actions=set_queue:37,output:1
205 OFPT_FLOW_MOD (OF1.1): ADD udp,nw_src=192.168.0.3,tp_dst=53 actions=mod_nw_ecn:2,output:1
206 OFPT_FLOW_MOD (OF1.1): ADD priority=60000 cookie:0x123456789abcdef hard:10 actions=CONTROLLER:65535
207 OFPT_FLOW_MOD (OF1.1): 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
208 OFPT_FLOW_MOD (OF1.1): ADD ip actions=mod_nw_ttl:1,mod_nw_src:10.4.3.77
209 OFPT_FLOW_MOD (OF1.1): ADD sctp actions=drop
210 OFPT_FLOW_MOD (OF1.1): ADD sctp actions=drop
211 OFPT_FLOW_MOD (OF1.1): ADD in_port=0 actions=resubmit:0
212 OFPT_FLOW_MOD (OF1.1): ADD actions=sample(probability=12345,collector_set_id=23456,obs_domain_id=34567,obs_point_id=45678)
216 AT_SETUP([ovs-ofctl parse-flows (OpenFlow 1.2)])
217 AT_DATA([flows.txt], [[
219 tcp,tp_src=123,actions=flood
220 in_port=LOCAL dl_vlan=9 dl_src=00:0A:E4:25:6B:B0 actions=mod_vlan_vid:7,mod_vlan_pcp:2
221 udp dl_vlan_pcp=7 idle_timeout=5 actions=strip_vlan output:0
222 tcp,nw_src=192.168.0.3,tp_dst=80 actions=set_queue:37,output:1
223 udp,nw_src=192.168.0.3,tp_dst=53 actions=pop_queue,output:1
224 cookie=0x123456789abcdef hard_timeout=10 priority=60000 actions=controller
225 actions=note:41.42.43,note:00.01.02.03.04.05.06.07,note
226 ipv6,actions=set_field:fe80:0123:4567:890a:a6ba:dbff:fefe:59fa->ipv6_src
227 sctp actions=set_field:3334->sctp_src
228 sctp actions=set_field:4445->sctp_dst
229 tcp actions=mod_tp_dst:1234
230 udp actions=mod_tp_src:1111
231 ip actions=mod_nw_src:10.1.1.2,mod_nw_dst:192.168.10.1,mod_nw_ttl:1,mod_nw_tos:16,mod_nw_ecn:2
232 in_port=0 actions=mod_dl_src:11:22:33:44:55:66,mod_dl_dst:10:20:30:40:50:60
233 in_port=0 actions=resubmit:0
234 actions=sample(probability=12345,collector_set_id=23456,obs_domain_id=34567,obs_point_id=45678)
237 AT_CHECK([ovs-ofctl --protocols OpenFlow12 parse-flows flows.txt
239 AT_CHECK([[sed 's/ (xid=0x[0-9a-fA-F]*)//' stdout]], [0],
240 [[usable protocols: NXM,OXM
241 chosen protocol: OXM-OpenFlow12
242 OFPT_FLOW_MOD (OF1.2): ADD tcp,tp_src=123 actions=FLOOD
243 OFPT_FLOW_MOD (OF1.2): ADD in_port=LOCAL,dl_vlan=9,dl_src=00:0a:e4:25:6b:b0 actions=set_field:4103->vlan_vid,set_field:2->vlan_pcp
244 OFPT_FLOW_MOD (OF1.2): ADD udp,dl_vlan_pcp=7 idle:5 actions=pop_vlan,output:0
245 OFPT_FLOW_MOD (OF1.2): ADD tcp,nw_src=192.168.0.3,tp_dst=80 actions=set_queue:37,output:1
246 OFPT_FLOW_MOD (OF1.2): ADD udp,nw_src=192.168.0.3,tp_dst=53 actions=pop_queue,output:1
247 OFPT_FLOW_MOD (OF1.2): ADD priority=60000 cookie:0x123456789abcdef hard:10 actions=CONTROLLER:65535
248 OFPT_FLOW_MOD (OF1.2): 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
249 OFPT_FLOW_MOD (OF1.2): ADD ipv6 actions=set_field:fe80:123:4567:890a:a6ba:dbff:fefe:59fa->ipv6_src
250 OFPT_FLOW_MOD (OF1.2): ADD sctp actions=set_field:3334->sctp_src
251 OFPT_FLOW_MOD (OF1.2): ADD sctp actions=set_field:4445->sctp_dst
252 OFPT_FLOW_MOD (OF1.2): ADD tcp actions=set_field:1234->tcp_dst
253 OFPT_FLOW_MOD (OF1.2): ADD udp actions=set_field:1111->udp_src
254 OFPT_FLOW_MOD (OF1.2): ADD ip actions=set_field:10.1.1.2->ip_src,set_field:192.168.10.1->ip_dst,mod_nw_ttl:1,set_field:4->ip_dscp,set_field:2->nw_ecn
255 OFPT_FLOW_MOD (OF1.2): ADD in_port=0 actions=set_field:11:22:33:44:55:66->eth_src,set_field:10:20:30:40:50:60->eth_dst
256 OFPT_FLOW_MOD (OF1.2): ADD in_port=0 actions=resubmit:0
257 OFPT_FLOW_MOD (OF1.2): ADD actions=sample(probability=12345,collector_set_id=23456,obs_domain_id=34567,obs_point_id=45678)
261 AT_SETUP([ovs-ofctl parse-flow with invalid mask])
266 'eth_type 0x1234/0x1' \
268 'dl_vlan_pcp 6/0x1' \
270 'mpls mpls_label 5/0x1' \
271 'mpls mpls_tc 1/0x1' \
272 'mpls mpls_bos 1/0x1' \
274 'ipv6 nw_proto 1/1' \
275 'ip nw_tos 0xf0/0xf0' \
276 'ipv6 nw_tos 0xf0/0xf0' \
277 'ip ip_dscp 0x3c/0xf0' \
278 'ipv6 ip_dscp 0x3c/0xf0' \
284 'icmp icmp_type 1/1' \
285 'icmp icmp_code 2/1' \
286 'icmp6 icmpv6_code 2/1'
290 prereq=$1, field=$2 value=$3
292 prereq= field=$1 value=$2
294 AT_CHECK_UNQUOTED([ovs-ofctl parse-flow "$prereq$field=$value,actions=drop"], [1], [],
295 [ovs-ofctl: $value: invalid mask for field $field
300 AT_SETUP([ovs-ofctl action inconsistency (OpenFlow 1.1)])
301 AT_CHECK([ovs-ofctl --protocols OpenFlow11 add-flow br0 'ip actions=mod_tp_dst:1234'
302 ], [1], [stdout], [ovs-ofctl: none of the usable flow formats (OpenFlow10,NXM) is among the allowed flow formats (OpenFlow11)
306 AT_SETUP([ovs-ofctl parse-flows (skb_priority)])
307 AT_DATA([flows.txt], [[
308 skb_priority=0x12341234,tcp,tp_src=123,actions=flood
311 AT_CHECK([ovs-ofctl parse-flows flows.txt
318 AT_SETUP([ovs-ofctl parse-flows (NXM)])
319 AT_DATA([flows.txt], [[
321 tcp,tp_src=123,actions=flood
322 in_port=LOCAL dl_vlan=9 dl_src=00:0A:E4:25:6B:B0 actions=drop
323 pkt_mark=0xbb,actions=set_field:0xaa->pkt_mark
324 udp dl_vlan_pcp=7 idle_timeout=5 actions=strip_vlan output:0
325 tcp,nw_src=192.168.0.3,tp_dst=80 actions=set_queue:37,output:1
326 udp,nw_src=192.168.0.3,tp_dst=53 actions=pop_queue,output:1
327 cookie=0x123456789abcdef hard_timeout=10 priority=60000 actions=controller
328 actions=note:41.42.43,note:00.01.02.03.04.05.06.07,note
329 tcp,tp_src=0x1230/0xfff0,tun_id=0x1234,cookie=0x5678,actions=flood
330 actions=set_tunnel:0x1234,set_tunnel64:0x9876,set_tunnel:0x123456789
331 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])
333 tun_id=0x1234000056780000/0xffff0000ffff0000,actions=drop
334 metadata=0x1234ffff5678ffff/0xffff0000ffff0000,actions=drop
335 actions=bundle(eth_src,50,active_backup,ofport,slaves:1)
336 actions=bundle(symmetric_l4,60,hrw,ofport,slaves:2,3)
337 actions=bundle(symmetric_l4,60,hrw,ofport,slaves:)
338 actions=output:1,bundle(eth_src,0,hrw,ofport,slaves:1),output:2
339 actions=bundle_load(eth_src,50,active_backup,ofport,NXM_NX_REG0[],slaves:1)
340 actions=bundle_load(symmetric_l4,60,hrw,ofport,NXM_NX_REG0[0..15],slaves:2,3)
341 actions=bundle_load(symmetric_l4,60,hrw,ofport,NXM_NX_REG0[0..15],slaves:[2,3])
342 actions=bundle_load(symmetric_l4,60,hrw,ofport,NXM_NX_REG0[0..30],slaves:)
343 actions=output:1,bundle_load(eth_src,0,hrw,ofport,NXM_NX_REG0[16..31],slaves:1),output:2
344 actions=resubmit:1,resubmit(2),resubmit(,3),resubmit(2,3)
345 send_flow_rem,actions=output:1,output:NXM_NX_REG0[],output:2,output:NXM_NX_REG1[16..31],output:3
346 check_overlap,actions=output:1,exit,output:2
347 tcp,actions=fin_timeout(idle_timeout=5,hard_timeout=15)
348 actions=controller(max_len=123,reason=invalid_ttl,id=555)
349 actions=sample(probability=12345,collector_set_id=23456,obs_domain_id=34567,obs_point_id=45678)
352 AT_CHECK([ovs-ofctl parse-flows flows.txt
354 AT_CHECK([[sed 's/ (xid=0x[0-9a-fA-F]*)//' stdout]], [0],
355 [[usable protocols: OXM,NXM+table_id
356 chosen protocol: NXM+table_id
357 NXT_FLOW_MOD: ADD table:255 tcp,tp_src=123 actions=FLOOD
358 NXT_FLOW_MOD: ADD table:255 in_port=LOCAL,dl_vlan=9,dl_src=00:0a:e4:25:6b:b0 actions=drop
359 NXT_FLOW_MOD: ADD table:255 pkt_mark=0xbb actions=load:0xaa->NXM_NX_PKT_MARK[]
360 NXT_FLOW_MOD: ADD table:255 udp,dl_vlan_pcp=7 idle:5 actions=strip_vlan,output:0
361 NXT_FLOW_MOD: ADD table:255 tcp,nw_src=192.168.0.3,tp_dst=80 actions=set_queue:37,output:1
362 NXT_FLOW_MOD: ADD table:255 udp,nw_src=192.168.0.3,tp_dst=53 actions=pop_queue,output:1
363 NXT_FLOW_MOD: ADD table:255 priority=60000 cookie:0x123456789abcdef hard:10 actions=CONTROLLER:65535
364 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
365 NXT_FLOW_MOD: ADD table:255 tcp,tun_id=0x1234,tp_src=0x1230/0xfff0 cookie:0x5678 actions=FLOOD
366 NXT_FLOW_MOD: ADD table:255 actions=set_tunnel:0x1234,set_tunnel64:0x9876,set_tunnel64:0x123456789
367 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])
368 NXT_FLOW_MOD: ADD table:1 actions=drop
369 NXT_FLOW_MOD: ADD table:255 tun_id=0x1234000056780000/0xffff0000ffff0000 actions=drop
370 NXT_FLOW_MOD: ADD table:255 metadata=0x1234000056780000/0xffff0000ffff0000 actions=drop
371 NXT_FLOW_MOD: ADD table:255 actions=bundle(eth_src,50,active_backup,ofport,slaves:1)
372 NXT_FLOW_MOD: ADD table:255 actions=bundle(symmetric_l4,60,hrw,ofport,slaves:2,3)
373 NXT_FLOW_MOD: ADD table:255 actions=bundle(symmetric_l4,60,hrw,ofport,slaves:)
374 NXT_FLOW_MOD: ADD table:255 actions=output:1,bundle(eth_src,0,hrw,ofport,slaves:1),output:2
375 NXT_FLOW_MOD: ADD table:255 actions=bundle_load(eth_src,50,active_backup,ofport,NXM_NX_REG0[],slaves:1)
376 NXT_FLOW_MOD: ADD table:255 actions=bundle_load(symmetric_l4,60,hrw,ofport,NXM_NX_REG0[0..15],slaves:2,3)
377 NXT_FLOW_MOD: ADD table:255 actions=bundle_load(symmetric_l4,60,hrw,ofport,NXM_NX_REG0[0..15],slaves:2,3)
378 NXT_FLOW_MOD: ADD table:255 actions=bundle_load(symmetric_l4,60,hrw,ofport,NXM_NX_REG0[0..30],slaves:)
379 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
380 NXT_FLOW_MOD: ADD table:255 actions=resubmit:1,resubmit:2,resubmit(,3),resubmit(2,3)
381 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
382 NXT_FLOW_MOD: ADD table:255 check_overlap actions=output:1,exit,output:2
383 NXT_FLOW_MOD: ADD table:255 tcp actions=fin_timeout(idle_timeout=5,hard_timeout=15)
384 NXT_FLOW_MOD: ADD table:255 actions=controller(reason=invalid_ttl,max_len=123,id=555)
385 NXT_FLOW_MOD: ADD table:255 actions=sample(probability=12345,collector_set_id=23456,obs_domain_id=34567,obs_point_id=45678)
389 AT_SETUP([ovs-ofctl -F nxm parse-flows])
390 AT_DATA([flows.txt], [
392 tcp,tp_src=123,actions=flood
393 in_port=LOCAL dl_vlan=9 dl_src=00:0A:E4:25:6B:B0 actions=drop
394 arp,dl_src=00:0A:E4:25:6B:B0,arp_sha=00:0A:E4:25:6B:B0 actions=drop
395 ipv6,ipv6_label=0x12345 actions=2
396 ipv6,ipv6_src=2001:db8:3c4d:1:2:3:4:5 actions=3
397 ipv6,ipv6_src=2001:db8:3c4d:1:2:3:4:5/64 actions=4
398 ipv6,ipv6_dst=2001:db8:3c4d:1:2:3:4:5/127 actions=5
399 tcp6,ipv6_src=2001:db8:3c4d:1::1,tp_dst=80 actions=drop
400 udp6,ipv6_src=2001:db8:3c4d:1::3,tp_dst=53 actions=drop
401 in_port=3 icmp6,ipv6_src=2001:db8:3c4d:1::1,icmp_type=134 actions=drop
402 udp dl_vlan_pcp=7 idle_timeout=5 actions=strip_vlan output:0
403 tcp,nw_src=192.168.0.3,tp_dst=80 actions=set_queue:37,output:1
404 udp,nw_src=192.168.0.3,tp_dst=53 actions=pop_queue,output:1
405 icmp6,icmp_type=135,nd_target=FEC0::1234:F045:8FFF:1111:FE4E:0571 actions=drop
406 icmp6,icmp_type=135,nd_target=FEC0::1234:F045:8FFF:1111:FE4F:0571/112 actions=drop
407 icmp6,icmp_type=135,nd_sll=00:0A:E4:25:6B:B0 actions=drop
408 icmp6,icmp_type=136,nd_target=FEC0::1234:F045:8FFF:1111:FE4E:0571,nd_tll=00:0A:E4:25:6B:B1 actions=drop
409 icmp6,icmp_type=136,nd_target=FEC0::1234:F045:8FFF:1111:FE00:0000/96,nd_tll=00:0A:E4:25:6B:B1 actions=drop
410 cookie=0x123456789abcdef hard_timeout=10 priority=60000 actions=controller
411 actions=note:41.42.43,note:00.01.02.03.04.05.06.07,note
412 tun_id=0x1234,cookie=0x5678,actions=flood
414 tun_id=0x1234000056780000/0xffff0000ffff0000,actions=drop
415 dl_dst=01:00:00:00:00:00/01:00:00:00:00:00,actions=drop
416 dl_dst=00:00:00:00:00:00/01:00:00:00:00:00,actions=drop
417 dl_dst=aa:bb:cc:dd:ee:ff/fe:ff:ff:ff:ff:ff,actions=drop
418 dl_dst=aa:bb:cc:dd:ee:ff/00:00:00:00:00:00,actions=drop
419 actions=sample(probability=12345,collector_set_id=23456,obs_domain_id=34567,obs_point_id=45678)
421 AT_CHECK([ovs-ofctl -F nxm parse-flows flows.txt], [0], [stdout])
422 AT_CHECK([[sed 's/ (xid=0x[0-9a-fA-F]*)//' stdout]], [0], [dnl
423 usable protocols: NXM,OXM
424 chosen protocol: NXM-table_id
425 NXT_FLOW_MOD: ADD tcp,tp_src=123 actions=FLOOD
426 NXT_FLOW_MOD: ADD in_port=LOCAL,dl_vlan=9,dl_src=00:0a:e4:25:6b:b0 actions=drop
427 NXT_FLOW_MOD: ADD arp,dl_src=00:0a:e4:25:6b:b0,arp_sha=00:0a:e4:25:6b:b0 actions=drop
428 NXT_FLOW_MOD: ADD ipv6,ipv6_label=0x12345 actions=output:2
429 NXT_FLOW_MOD: ADD ipv6,ipv6_src=2001:db8:3c4d:1:2:3:4:5 actions=output:3
430 NXT_FLOW_MOD: ADD ipv6,ipv6_src=2001:db8:3c4d:1::/64 actions=output:4
431 NXT_FLOW_MOD: ADD ipv6,ipv6_dst=2001:db8:3c4d:1:2:3:4:4/127 actions=output:5
432 NXT_FLOW_MOD: ADD tcp6,ipv6_src=2001:db8:3c4d:1::1,tp_dst=80 actions=drop
433 NXT_FLOW_MOD: ADD udp6,ipv6_src=2001:db8:3c4d:1::3,tp_dst=53 actions=drop
434 NXT_FLOW_MOD: ADD icmp6,in_port=3,ipv6_src=2001:db8:3c4d:1::1,icmp_type=134 actions=drop
435 NXT_FLOW_MOD: ADD udp,dl_vlan_pcp=7 idle:5 actions=strip_vlan,output:0
436 NXT_FLOW_MOD: ADD tcp,nw_src=192.168.0.3,tp_dst=80 actions=set_queue:37,output:1
437 NXT_FLOW_MOD: ADD udp,nw_src=192.168.0.3,tp_dst=53 actions=pop_queue,output:1
438 NXT_FLOW_MOD: ADD icmp6,icmp_type=135,nd_target=fec0:0:1234:f045:8fff:1111:fe4e:571 actions=drop
439 NXT_FLOW_MOD: ADD icmp6,icmp_type=135,nd_target=fec0:0:1234:f045:8fff:1111:fe4f:0/112 actions=drop
440 NXT_FLOW_MOD: ADD icmp6,icmp_type=135,nd_sll=00:0a:e4:25:6b:b0 actions=drop
441 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
442 NXT_FLOW_MOD: ADD icmp6,icmp_type=136,nd_target=fec0:0:1234:f045:8fff:1111::/96,nd_tll=00:0a:e4:25:6b:b1 actions=drop
443 NXT_FLOW_MOD: ADD priority=60000 cookie:0x123456789abcdef hard:10 actions=CONTROLLER:65535
444 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
445 NXT_FLOW_MOD: ADD tun_id=0x1234 cookie:0x5678 actions=FLOOD
446 NXT_FLOW_MOD: ADD actions=drop
447 NXT_FLOW_MOD: ADD tun_id=0x1234000056780000/0xffff0000ffff0000 actions=drop
448 NXT_FLOW_MOD: ADD dl_dst=01:00:00:00:00:00/01:00:00:00:00:00 actions=drop
449 NXT_FLOW_MOD: ADD dl_dst=00:00:00:00:00:00/01:00:00:00:00:00 actions=drop
450 NXT_FLOW_MOD: ADD dl_dst=aa:bb:cc:dd:ee:ff/fe:ff:ff:ff:ff:ff actions=drop
451 NXT_FLOW_MOD: ADD actions=drop
452 NXT_FLOW_MOD: ADD actions=sample(probability=12345,collector_set_id=23456,obs_domain_id=34567,obs_point_id=45678)
456 AT_SETUP([ovs-ofctl -F nxm -mmm parse-flows])
457 AT_DATA([flows.txt], [[
459 tcp,tp_src=123,actions=flood
460 in_port=LOCAL dl_vlan=9 dl_src=00:0A:E4:25:6B:B0 actions=drop
461 arp,dl_src=00:0A:E4:25:6B:B0,arp_sha=00:0A:E4:25:6B:B0 actions=drop
462 ipv6,ipv6_label=0x12345 actions=2
463 ipv6,ipv6_src=2001:db8:3c4d:1:2:3:4:5 actions=3
464 ipv6,ipv6_src=2001:db8:3c4d:1:2:3:4:5/64 actions=4
465 ipv6,ipv6_dst=2001:db8:3c4d:1:2:3:4:5/127 actions=5
466 tcp6,ipv6_src=2001:db8:3c4d:1::1,tp_dst=80 actions=drop
467 udp6,ipv6_src=2001:db8:3c4d:1::3,tp_dst=53 actions=drop
468 sctp6,ipv6_src=2001:db8:3c4d:1::5,tp_dst=309 actions=drop
469 in_port=3 icmp6,ipv6_src=2001:db8:3c4d:1::1,icmp_type=134 actions=drop
470 udp dl_vlan_pcp=7 idle_timeout=5 actions=strip_vlan output:0
471 tcp,nw_src=192.168.0.3,tp_dst=80 actions=set_queue:37,output:1
472 udp,nw_src=192.168.0.3,tp_dst=53 actions=pop_queue,output:1
473 sctp,nw_src=192.168.0.3,tp_dst=309 actions=pop_queue,output:1
474 icmp6,icmp_type=135,nd_target=FEC0::1234:F045:8FFF:1111:FE4E:0571 actions=drop
475 icmp6,icmp_type=135,nd_sll=00:0A:E4:25:6B:B0 actions=drop
476 icmp6,icmp_type=136,nd_target=FEC0::1234:F045:8FFF:1111:FE4E:0571,nd_tll=00:0A:E4:25:6B:B1 actions=drop
477 cookie=0x123456789abcdef hard_timeout=10 priority=60000 actions=controller
478 actions=note:41.42.43,note:00.01.02.03.04.05.06.07,note
479 tun_id=0x1234,cookie=0x5678,actions=flood
481 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[]
482 actions=move:OXM_OF_ETH_DST[]->OXM_OF_ETH_SRC[]
483 actions=push:NXM_NX_REG0[0..31],pop:NXM_NX_REG0[]
484 vlan_tci=0x1123/0x1fff,actions=drop
485 actions=sample(probability=12345,collector_set_id=23456,obs_domain_id=34567,obs_point_id=45678)
487 AT_CHECK([ovs-ofctl -F nxm -mmm parse-flows flows.txt], [0], [stdout], [stderr])
488 AT_CHECK([[sed 's/ (xid=0x[0-9a-fA-F]*)//' stdout]], [0],
489 [[usable protocols: NXM,OXM
490 chosen protocol: NXM-table_id
491 NXT_FLOW_MOD: ADD NXM_OF_ETH_TYPE(0800), NXM_OF_IP_PROTO(06), NXM_OF_TCP_SRC(007b) actions=FLOOD
492 NXT_FLOW_MOD: ADD NXM_OF_IN_PORT(fffe), NXM_OF_ETH_SRC(000ae4256bb0), NXM_OF_VLAN_TCI_W(1009/1fff) actions=drop
493 NXT_FLOW_MOD: ADD NXM_OF_ETH_SRC(000ae4256bb0), NXM_OF_ETH_TYPE(0806), NXM_NX_ARP_SHA(000ae4256bb0) actions=drop
494 NXT_FLOW_MOD: ADD NXM_OF_ETH_TYPE(86dd), NXM_NX_IPV6_LABEL(00012345) actions=output:2
495 NXT_FLOW_MOD: ADD NXM_OF_ETH_TYPE(86dd), NXM_NX_IPV6_SRC(20010db83c4d00010002000300040005) actions=output:3
496 NXT_FLOW_MOD: ADD NXM_OF_ETH_TYPE(86dd), NXM_NX_IPV6_SRC_W(20010db83c4d00010000000000000000/ffffffffffffffff0000000000000000) actions=output:4
497 NXT_FLOW_MOD: ADD NXM_OF_ETH_TYPE(86dd), NXM_NX_IPV6_DST_W(20010db83c4d00010002000300040004/fffffffffffffffffffffffffffffffe) actions=output:5
498 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
499 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
500 NXT_FLOW_MOD: ADD NXM_OF_ETH_TYPE(86dd), NXM_NX_IPV6_SRC(20010db83c4d00010000000000000005), NXM_OF_IP_PROTO(84), OXM_OF_SCTP_DST(0135) actions=drop
501 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
502 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
503 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
504 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
505 NXT_FLOW_MOD: ADD NXM_OF_ETH_TYPE(0800), NXM_OF_IP_SRC(c0a80003), NXM_OF_IP_PROTO(84), OXM_OF_SCTP_DST(0135) actions=pop_queue,output:1
506 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
507 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
508 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
509 NXT_FLOW_MOD: ADD <any> cookie:0x123456789abcdef hard:10 pri:60000 actions=CONTROLLER:65535
510 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
511 NXT_FLOW_MOD: ADD NXM_NX_TUN_ID(0000000000001234) cookie:0x5678 actions=FLOOD
512 NXT_FLOW_MOD: ADD <any> actions=drop
513 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[]
514 NXT_FLOW_MOD: ADD <any> actions=move:NXM_OF_ETH_DST[]->NXM_OF_ETH_SRC[]
515 NXT_FLOW_MOD: ADD <any> actions=push:NXM_NX_REG0[],pop:NXM_NX_REG0[]
516 NXT_FLOW_MOD: ADD NXM_OF_VLAN_TCI_W(1123/1fff) actions=drop
517 NXT_FLOW_MOD: ADD <any> actions=sample(probability=12345,collector_set_id=23456,obs_domain_id=34567,obs_point_id=45678)
521 AT_SETUP([ovs-ofctl parse-nx-match])
522 AT_KEYWORDS([nx-match])
523 AT_DATA([nx-match.txt], [dnl
531 NXM_OF_ETH_DST(0002e30f80a4)
532 NXM_OF_ETH_DST_W(010000000000/010000000000)
533 NXM_OF_ETH_DST_W(000000000000/010000000000)
534 NXM_OF_ETH_DST_W(ffffffffffff/010000000000)
535 NXM_OF_ETH_DST_W(0002e30f80a4/ffffffffffff)
536 NXM_OF_ETH_DST_W(60175619848f/000000000000)
537 NXM_OF_ETH_DST_W(0002e30f80a4/feffffffffff)
538 NXM_OF_ETH_DST_W(60175619848f/5a5a5a5a5a5a)
541 NXM_OF_ETH_SRC(020898456ddb)
542 NXM_OF_ETH_SRC_W(012345abcdef/ffffff555555)
543 NXM_OF_ETH_SRC_W(020898456ddb/ffffffffffff)
544 NXM_OF_ETH_SRC_W(020898456ddb/000000000000)
547 NXM_OF_ETH_TYPE(0800)
548 NXM_OF_ETH_TYPE(0800) NXM_OF_IN_PORT(0012)
551 NXM_OF_VLAN_TCI(f009)
552 NXM_OF_VLAN_TCI(f009) NXM_OF_VLAN_TCI(f009)
553 NXM_OF_VLAN_TCI(0000) # Packets without 802.1Q header.
554 NXM_OF_VLAN_TCI(3123) # Packets with VID=123, PCP=1.
555 NXM_OF_VLAN_TCI(0123) # Does not make sense (but supported anyway)
556 NXM_OF_VLAN_TCI_W(1123/1fff) # Packets with VID=123, any PCP.
557 NXM_OF_VLAN_TCI_W(1123/ffff) # Packets with VID=123, PCP=0
558 NXM_OF_VLAN_TCI_W(1123/0000) # Packets with or without 802.1Q header
559 NXM_OF_VLAN_TCI_W(f000/f000) # Packets with any VID, PCP=7.
560 NXM_OF_VLAN_TCI_W(0000/e000) # No 802.1Q or with VID=0
563 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_TOS(f0)
564 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_TOS(41)
568 NXM_OF_ETH_TYPE(0800) NXM_NX_IP_ECN(03)
569 NXM_OF_ETH_TYPE(0800) NXM_NX_IP_ECN(06)
573 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_PROTO(01)
574 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_PROTO(05)
578 NXM_OF_ETH_TYPE(0800) NXM_NX_IP_TTL(80)
579 NXM_OF_ETH_TYPE(86dd) NXM_NX_IP_TTL(ff)
583 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_SRC(ac100014)
584 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_SRC_W(C0a80000/FFFF0000)
585 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_SRC_W(C0a80000/5a5a5a5a)
586 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_SRC_W(C0a80000/ffffffff)
587 NXM_OF_ETH_TYPE(0806) NXM_OF_IP_SRC(ac100014)
588 NXM_OF_IP_SRC_W(C0D80000/FFFF0000)
591 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_DST(ac100014)
592 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_DST_W(C0a88012/FFFF0000)
593 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_DST_W(C0a80000/5a5a5a5a)
594 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_DST_W(C0a80000/ffffffff)
595 NXM_OF_IP_DST(ac100014)
596 NXM_OF_ETH_TYPE(0806) NXM_OF_IP_DST_W(C0D80000/FFFF0000)
599 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_PROTO(06) NXM_OF_TCP_SRC(4231)
600 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_PROTO(06) NXM_OF_TCP_SRC_W(5050/F0F0)
601 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_PROTO(06) NXM_OF_TCP_SRC_W(5050/ffff)
602 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_PROTO(07) NXM_OF_TCP_SRC(4231)
604 # TCP destination port
605 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_PROTO(06) NXM_OF_TCP_DST(4231)
606 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_PROTO(06) NXM_OF_TCP_DST_W(FDE0/FFF0)
607 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_PROTO(06) NXM_OF_TCP_DST_W(FDE0/ffff)
608 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_PROTO(07) NXM_OF_TCP_DST(4231)
611 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_PROTO(06) NXM_NX_TCP_FLAGS(0131)
612 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_PROTO(06) NXM_NX_TCP_FLAGS_W(00F0/0FF0)
613 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_PROTO(06) NXM_NX_TCP_FLAGS_W(01E2/ffff)
614 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_PROTO(07) NXM_NX_TCP_FLAGS(0fff)
617 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_PROTO(11) NXM_OF_UDP_SRC(8732)
618 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_PROTO(11) NXM_OF_UDP_SRC_W(0132/01FF)
619 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_PROTO(11) NXM_OF_UDP_SRC_W(0132/ffff)
620 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_PROTO(06) NXM_OF_UDP_SRC(7823)
622 # UDP destination port
623 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_PROTO(11) NXM_OF_UDP_DST(1782)
624 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_PROTO(11) NXM_OF_UDP_DST_W(5005/F00F)
625 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_PROTO(11) NXM_OF_UDP_DST_W(5005/FFFF)
626 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_PROTO(02) NXM_OF_UDP_DST(1293)
629 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_PROTO(01) NXM_OF_ICMP_TYPE(12)
630 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_PROTO(00) NXM_OF_ICMP_TYPE(10)
633 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_PROTO(01) NXM_OF_ICMP_CODE(12)
634 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_PROTO(00) NXM_OF_ICMP_CODE(10)
635 NXM_OF_ETH_TYPE(0800) NXM_OF_ICMP_CODE(10)
639 NXM_OF_ETH_TYPE(0806) NXM_OF_ARP_OP(0001)
640 NXM_OF_ETH_TYPE(0806) NXM_OF_ARP_OP(1111)
641 NXM_OF_ETH_TYPE(0000) NXM_OF_ARP_OP(0001)
643 NXM_OF_ETH_TYPE(0806) NXM_OF_ARP_OP(0001) NXM_OF_ARP_OP(0001)
645 # ARP source protocol address
646 NXM_OF_ETH_TYPE(0806) NXM_OF_ARP_SPA(ac100014)
647 NXM_OF_ETH_TYPE(0806) NXM_OF_ARP_SPA_W(C0a81234/FFFFFF00)
648 NXM_OF_ETH_TYPE(0806) NXM_OF_ARP_SPA_W(C0a81234/aaaaaa00)
649 NXM_OF_ETH_TYPE(0806) NXM_OF_ARP_SPA_W(C0a81234/ffffffff)
650 NXM_OF_ETH_TYPE(0800) NXM_OF_ARP_SPA(ac100014)
651 NXM_OF_ARP_SPA_W(C0D80000/FFFF0000)
653 # ARP destination protocol address
654 NXM_OF_ETH_TYPE(0806) NXM_OF_ARP_TPA(ac100014)
655 NXM_OF_ETH_TYPE(0806) NXM_OF_ARP_TPA_W(C0a812fe/FFFFFF00)
656 NXM_OF_ETH_TYPE(0806) NXM_OF_ARP_TPA_W(C0a81234/77777777)
657 NXM_OF_ETH_TYPE(0806) NXM_OF_ARP_TPA_W(C0a81234/ffffffff)
658 NXM_OF_ETH_TYPE(0800) NXM_OF_ARP_TPA(ac100014)
659 NXM_OF_ARP_TPA_W(C0D80000/FFFF0000)
661 # ARP source hardware address
662 NXM_OF_ETH_TYPE(0806) NXM_NX_ARP_SHA(0002e30f80a4)
663 NXM_OF_ETH_TYPE(0800) NXM_NX_ARP_SHA(0002e30f80a4)
664 NXM_NX_ARP_SHA(0002e30f80a4)
666 # ARP destination hardware address
667 NXM_OF_ETH_TYPE(0806) NXM_NX_ARP_THA(0002e30f80a4)
668 NXM_OF_ETH_TYPE(0800) NXM_NX_ARP_THA(0002e30f80a4)
669 NXM_NX_ARP_THA(0002e30f80a4)
672 NXM_OF_ETH_TYPE(8035) NXM_OF_ARP_OP(0003)
673 NXM_OF_ETH_TYPE(8035) NXM_OF_ARP_OP(1111)
674 NXM_OF_ETH_TYPE(0000) NXM_OF_ARP_OP(0003)
676 NXM_OF_ETH_TYPE(8035) NXM_OF_ARP_OP(0003) NXM_OF_ARP_OP(0003)
678 # RARP source protocol address
679 NXM_OF_ETH_TYPE(8035) NXM_OF_ARP_SPA(ac100014)
680 NXM_OF_ETH_TYPE(8035) NXM_OF_ARP_SPA_W(C0a81200/FFFFFF00)
681 NXM_OF_ETH_TYPE(8035) NXM_OF_ARP_SPA_W(C0a81234/aaaaaa00)
682 NXM_OF_ETH_TYPE(8035) NXM_OF_ARP_SPA_W(C0a81234/ffffffff)
683 NXM_OF_ETH_TYPE(0800) NXM_OF_ARP_SPA(ac100014)
684 NXM_OF_ARP_SPA_W(C0D80000/FFFF0000)
686 # RARP destination protocol address
687 NXM_OF_ETH_TYPE(8035) NXM_OF_ARP_TPA(ac100014)
688 NXM_OF_ETH_TYPE(8035) NXM_OF_ARP_TPA_W(C0a81200/FFFFFF00)
689 NXM_OF_ETH_TYPE(8035) NXM_OF_ARP_TPA_W(C0a81234/77777777)
690 NXM_OF_ETH_TYPE(8035) NXM_OF_ARP_TPA_W(C0a81234/ffffffff)
691 NXM_OF_ETH_TYPE(0800) NXM_OF_ARP_TPA(ac100014)
692 NXM_OF_ARP_TPA_W(C0D80000/FFFF0000)
694 # RARP source hardware address
695 NXM_OF_ETH_TYPE(8035) NXM_NX_ARP_SHA(0002e30f80a4)
696 NXM_OF_ETH_TYPE(0800) NXM_NX_ARP_SHA(0002e30f80a4)
697 NXM_NX_ARP_SHA(0002e30f80a4)
699 # RARP destination hardware address
700 NXM_OF_ETH_TYPE(8035) NXM_NX_ARP_THA(0002e30f80a4)
701 NXM_OF_ETH_TYPE(0800) NXM_NX_ARP_THA(0002e30f80a4)
702 NXM_NX_ARP_THA(0002e30f80a4)
705 NXM_OF_ETH_TYPE(86dd) NXM_NX_IPV6_SRC(20010db83c4d00010002000300040005)
706 NXM_OF_ETH_TYPE(0800) NXM_NX_IPV6_SRC(20010db83c4d00010002000300040005)
707 NXM_OF_ETH_TYPE(86dd) NXM_NX_IPV6_SRC_W(20010db83c4d00010000000000000000/ffffffffffffffff0000000000000000)
708 NXM_OF_ETH_TYPE(86dd) NXM_NX_IPV6_SRC_W(20010db83c4d00010000000000000000/5a5a5a5a5a5a5a5a0000000000000000)
709 NXM_OF_ETH_TYPE(86dd) NXM_NX_IPV6_SRC_W(20010db83c4d00010000000000000000/ffffffffffffffffffffffffffffffff)
710 NXM_OF_ETH_TYPE(86dd) NXM_NX_IPV6_SRC_W(20010db83c4d00010000000000000000/00000000000000000000000000000000)
711 NXM_OF_ETH_TYPE(0800) NXM_NX_IPV6_SRC_W(20010db83c4d00010000000000000000/ffffffffffffffffffff000000000000)
714 NXM_OF_ETH_TYPE(86dd) NXM_NX_IPV6_DST(20010db83c4d00010002000300040005)
715 NXM_OF_ETH_TYPE(0800) NXM_NX_IPV6_DST(20010db83c4d00010002000300040005)
716 NXM_OF_ETH_TYPE(86dd) NXM_NX_IPV6_DST_W(20010db83c4d00010000000000000000/77777777777777777777777777777777)
717 NXM_OF_ETH_TYPE(86dd) NXM_NX_IPV6_DST_W(20010db83c4d00010000000000000000/ffffffffffffffffffffffffffffffff)
718 NXM_OF_ETH_TYPE(86dd) NXM_NX_IPV6_DST_W(00000000000000000000000000000000/00000000000000000000000000000000)
719 NXM_OF_ETH_TYPE(0800) NXM_NX_IPV6_DST_W(20010db83c4d00010000000000000000/ffffffffffffffff0000000000000000)
722 NXM_OF_ETH_TYPE(86dd) NXM_NX_IPV6_LABEL(1000000f)
723 NXM_NX_IPV6_LABEL(0000000f)
724 NXM_OF_ETH_TYPE(86dd) NXM_NX_IPV6_LABEL(0000000f)
727 NXM_OF_ETH_TYPE(86dd) NXM_OF_IP_PROTO(3a) NXM_NX_ICMPV6_TYPE(87) NXM_NX_ND_TARGET(20010db83c4d00010002000300040005)
728 NXM_OF_ETH_TYPE(86dd) NXM_OF_IP_PROTO(3a) NXM_NX_ICMPV6_TYPE(88) NXM_NX_ND_TARGET(20010db83c4d00010002000300040005)
729 NXM_OF_ETH_TYPE(86dd) NXM_OF_IP_PROTO(3a) NXM_NX_ICMPV6_TYPE(87) NXM_NX_ND_TARGET_W(20010db83c4d00010002000300040005/0123456789abcdeffedcba9876543210)
730 NXM_OF_ETH_TYPE(86dd) NXM_OF_IP_PROTO(3a) NXM_NX_ICMPV6_TYPE(87) NXM_NX_ND_TARGET_W(20010db83c4d00010002000300040005/ffffffffffffffffffffffffffffffff)
731 NXM_OF_ETH_TYPE(86dd) NXM_OF_IP_PROTO(3a) NXM_NX_ICMPV6_TYPE(87) NXM_NX_ND_TARGET_W(00000000000000000000000000000000/00000000000000000000000000000000)
732 NXM_OF_ETH_TYPE(86dd) NXM_OF_IP_PROTO(3a) NXM_NX_ICMPV6_TYPE(88) NXM_NX_ND_TARGET_W(20010db83c4d00010002000300040005/fedcba98765432100123456789abcdef)
734 # ND source hardware address
735 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)
736 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)
737 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)
738 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)
740 # ND destination hardware address
741 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)
742 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)
743 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)
744 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)
747 NXM_OF_ETH_TYPE(0800) NXM_NX_IP_FRAG(00)
748 NXM_OF_ETH_TYPE(0800) NXM_NX_IP_FRAG(01)
749 NXM_OF_ETH_TYPE(0800) NXM_NX_IP_FRAG(02)
750 NXM_OF_ETH_TYPE(0800) NXM_NX_IP_FRAG(03)
751 NXM_OF_ETH_TYPE(0800) NXM_NX_IP_FRAG_W(00/03)
752 NXM_OF_ETH_TYPE(0800) NXM_NX_IP_FRAG_W(00/fd)
753 NXM_OF_ETH_TYPE(0800) NXM_NX_IP_FRAG_W(00/02)
754 NXM_OF_ETH_TYPE(0800) NXM_NX_IP_FRAG_W(01/01)
755 NXM_OF_ETH_TYPE(0800) NXM_NX_IP_FRAG_W(02/02)
756 NXM_OF_ETH_TYPE(0800) NXM_NX_IP_FRAG_W(03/03)
757 NXM_OF_ETH_TYPE(0800) NXM_NX_IP_FRAG_W(03/ff)
758 NXM_OF_ETH_TYPE(0800) NXM_NX_IP_FRAG_W(03/00)
759 NXM_OF_ETH_TYPE(0800) NXM_NX_IP_FRAG(f3)
762 NXM_OF_ETH_TYPE(86dd) NXM_NX_IP_FRAG(00)
763 NXM_OF_ETH_TYPE(86dd) NXM_NX_IP_FRAG(01)
764 NXM_OF_ETH_TYPE(86dd) NXM_NX_IP_FRAG(02)
765 NXM_OF_ETH_TYPE(86dd) NXM_NX_IP_FRAG(03)
766 NXM_OF_ETH_TYPE(86dd) NXM_NX_IP_FRAG_W(00/03)
767 NXM_OF_ETH_TYPE(86dd) NXM_NX_IP_FRAG_W(00/01)
768 NXM_OF_ETH_TYPE(86dd) NXM_NX_IP_FRAG_W(00/02)
769 NXM_OF_ETH_TYPE(86dd) NXM_NX_IP_FRAG_W(01/01)
770 NXM_OF_ETH_TYPE(86dd) NXM_NX_IP_FRAG_W(02/02)
771 NXM_OF_ETH_TYPE(86dd) NXM_NX_IP_FRAG_W(03/03)
772 NXM_OF_ETH_TYPE(86dd) NXM_NX_IP_FRAG_W(03/00)
773 NXM_OF_ETH_TYPE(86dd) NXM_NX_IP_FRAG_W(03/ff)
774 NXM_OF_ETH_TYPE(86dd) NXM_NX_IP_FRAG(f3)
777 NXM_NX_COOKIE(00000000abcdef01)
778 NXM_NX_COOKIE_W(84200000abcdef01/84200000FFFFFFFF)
779 NXM_NX_COOKIE_W(84200000abcdef01/ffffffffffffffff)
780 NXM_NX_COOKIE_W(0000000000000000/0000000000000000)
783 NXM_NX_TUN_ID(00000000abcdef01)
784 NXM_NX_TUN_ID_W(84200000abcdef01/84200000FFFFFFFF)
785 NXM_NX_TUN_ID_W(84200000abcdef01/FFFFFFFFFFFFFFFF)
786 NXM_NX_TUN_ID_W(0000000000000000/0000000000000000)
789 NXM_NX_REG0(acebdf56)
790 NXM_NX_REG0_W(a0e0d050/f0f0f0f0)
791 NXM_NX_REG0_W(a0e0d050/ffffffff)
792 NXM_NX_REG0_W(00000000/00000000)
794 # dp_hash (testing experimenter OXM).
795 NXM_NX_DP_HASH(01234567)
796 NXOXM_ET_DP_HASH(01234567)
798 # Invalid field number.
801 # Invalid field numbers (experimenter OXM).
802 ffff020800002320(11112222)
803 ffff030800002320(1111/3333)
805 # Unimplemented registers.
807 # This test assumes that at least two registers, but fewer than 16,
808 # registers are implemented.
810 00010108(12345678/12345678)
812 00011f08(12345678/12345678)
814 AT_CHECK([ovs-ofctl -vPATTERN:'console:%c|%p|%m' --strict parse-nx-match < nx-match.txt], [0], [dnl
822 NXM_OF_ETH_DST(0002e30f80a4)
823 NXM_OF_ETH_DST_W(010000000000/010000000000)
824 NXM_OF_ETH_DST_W(000000000000/010000000000)
825 nx_pull_match() returned error OFPBMC_BAD_WILDCARDS
826 NXM_OF_ETH_DST(0002e30f80a4)
827 nx_pull_match() returned error OFPBMC_BAD_WILDCARDS
828 NXM_OF_ETH_DST_W(0002e30f80a4/feffffffffff)
829 nx_pull_match() returned error OFPBMC_BAD_WILDCARDS
832 NXM_OF_ETH_SRC(020898456ddb)
833 nx_pull_match() returned error OFPBMC_BAD_WILDCARDS
834 NXM_OF_ETH_SRC(020898456ddb)
835 nx_pull_match() returned error OFPBMC_BAD_WILDCARDS
838 NXM_OF_ETH_TYPE(0800)
839 NXM_OF_IN_PORT(0012), NXM_OF_ETH_TYPE(0800)
842 NXM_OF_VLAN_TCI(f009)
843 nx_pull_match() returned error OFPBMC_DUP_FIELD
844 NXM_OF_VLAN_TCI(0000)
845 NXM_OF_VLAN_TCI(3123)
846 NXM_OF_VLAN_TCI(0123)
847 NXM_OF_VLAN_TCI_W(1123/1fff)
848 NXM_OF_VLAN_TCI(1123)
849 nx_pull_match() returned error OFPBMC_BAD_WILDCARDS
850 NXM_OF_VLAN_TCI_W(f000/f000)
851 NXM_OF_VLAN_TCI_W(0000/e000)
854 NXM_OF_ETH_TYPE(0800), NXM_OF_IP_TOS(f0)
855 nx_pull_match() returned error OFPBMC_BAD_VALUE
856 nx_pull_match() returned error OFPBMC_BAD_PREREQ
859 NXM_OF_ETH_TYPE(0800), NXM_NX_IP_ECN(03)
860 nx_pull_match() returned error OFPBMC_BAD_VALUE
861 nx_pull_match() returned error OFPBMC_BAD_PREREQ
864 NXM_OF_ETH_TYPE(0800), NXM_OF_IP_PROTO(01)
865 NXM_OF_ETH_TYPE(0800), NXM_OF_IP_PROTO(05)
866 nx_pull_match() returned error OFPBMC_BAD_PREREQ
869 NXM_OF_ETH_TYPE(0800), NXM_NX_IP_TTL(80)
870 NXM_OF_ETH_TYPE(86dd), NXM_NX_IP_TTL(ff)
871 nx_pull_match() returned error OFPBMC_BAD_PREREQ
874 NXM_OF_ETH_TYPE(0800), NXM_OF_IP_SRC(ac100014)
875 NXM_OF_ETH_TYPE(0800), NXM_OF_IP_SRC_W(c0a80000/ffff0000)
876 nx_pull_match() returned error OFPBMC_BAD_WILDCARDS
877 NXM_OF_ETH_TYPE(0800), NXM_OF_IP_SRC(c0a80000)
878 nx_pull_match() returned error OFPBMC_BAD_PREREQ
879 nx_pull_match() returned error OFPBMC_BAD_PREREQ
882 NXM_OF_ETH_TYPE(0800), NXM_OF_IP_DST(ac100014)
883 nx_pull_match() returned error OFPBMC_BAD_WILDCARDS
884 nx_pull_match() returned error OFPBMC_BAD_WILDCARDS
885 NXM_OF_ETH_TYPE(0800), NXM_OF_IP_DST(c0a80000)
886 nx_pull_match() returned error OFPBMC_BAD_PREREQ
887 nx_pull_match() returned error OFPBMC_BAD_PREREQ
890 NXM_OF_ETH_TYPE(0800), NXM_OF_IP_PROTO(06), NXM_OF_TCP_SRC(4231)
891 NXM_OF_ETH_TYPE(0800), NXM_OF_IP_PROTO(06), NXM_OF_TCP_SRC_W(5050/f0f0)
892 NXM_OF_ETH_TYPE(0800), NXM_OF_IP_PROTO(06), NXM_OF_TCP_SRC(5050)
893 nx_pull_match() returned error OFPBMC_BAD_PREREQ
895 # TCP destination port
896 NXM_OF_ETH_TYPE(0800), NXM_OF_IP_PROTO(06), NXM_OF_TCP_DST(4231)
897 NXM_OF_ETH_TYPE(0800), NXM_OF_IP_PROTO(06), NXM_OF_TCP_DST_W(fde0/fff0)
898 NXM_OF_ETH_TYPE(0800), NXM_OF_IP_PROTO(06), NXM_OF_TCP_DST(fde0)
899 nx_pull_match() returned error OFPBMC_BAD_PREREQ
902 NXM_OF_ETH_TYPE(0800), NXM_OF_IP_PROTO(06), NXM_NX_TCP_FLAGS(0131)
903 NXM_OF_ETH_TYPE(0800), NXM_OF_IP_PROTO(06), NXM_NX_TCP_FLAGS_W(00f0/0ff0)
904 NXM_OF_ETH_TYPE(0800), NXM_OF_IP_PROTO(06), NXM_NX_TCP_FLAGS(01e2)
905 nx_pull_match() returned error OFPBMC_BAD_PREREQ
908 NXM_OF_ETH_TYPE(0800), NXM_OF_IP_PROTO(11), NXM_OF_UDP_SRC(8732)
909 NXM_OF_ETH_TYPE(0800), NXM_OF_IP_PROTO(11), NXM_OF_UDP_SRC_W(0132/01ff)
910 NXM_OF_ETH_TYPE(0800), NXM_OF_IP_PROTO(11), NXM_OF_UDP_SRC(0132)
911 nx_pull_match() returned error OFPBMC_BAD_PREREQ
913 # UDP destination port
914 NXM_OF_ETH_TYPE(0800), NXM_OF_IP_PROTO(11), NXM_OF_UDP_DST(1782)
915 NXM_OF_ETH_TYPE(0800), NXM_OF_IP_PROTO(11), NXM_OF_UDP_DST_W(5005/f00f)
916 NXM_OF_ETH_TYPE(0800), NXM_OF_IP_PROTO(11), NXM_OF_UDP_DST(5005)
917 nx_pull_match() returned error OFPBMC_BAD_PREREQ
920 NXM_OF_ETH_TYPE(0800), NXM_OF_IP_PROTO(01), NXM_OF_ICMP_TYPE(12)
921 nx_pull_match() returned error OFPBMC_BAD_PREREQ
924 NXM_OF_ETH_TYPE(0800), NXM_OF_IP_PROTO(01), NXM_OF_ICMP_CODE(12)
925 nx_pull_match() returned error OFPBMC_BAD_PREREQ
926 nx_pull_match() returned error OFPBMC_BAD_PREREQ
927 nx_pull_match() returned error OFPBMC_BAD_PREREQ
930 NXM_OF_ETH_TYPE(0806), NXM_OF_ARP_OP(0001)
931 nx_pull_match() returned error OFPBMC_BAD_VALUE
932 nx_pull_match() returned error OFPBMC_BAD_PREREQ
933 nx_pull_match() returned error OFPBMC_BAD_PREREQ
934 nx_pull_match() returned error OFPBMC_DUP_FIELD
936 # ARP source protocol address
937 NXM_OF_ETH_TYPE(0806), NXM_OF_ARP_SPA(ac100014)
938 nx_pull_match() returned error OFPBMC_BAD_WILDCARDS
939 nx_pull_match() returned error OFPBMC_BAD_WILDCARDS
940 NXM_OF_ETH_TYPE(0806), NXM_OF_ARP_SPA(c0a81234)
941 nx_pull_match() returned error OFPBMC_BAD_PREREQ
942 nx_pull_match() returned error OFPBMC_BAD_PREREQ
944 # ARP destination protocol address
945 NXM_OF_ETH_TYPE(0806), NXM_OF_ARP_TPA(ac100014)
946 nx_pull_match() returned error OFPBMC_BAD_WILDCARDS
947 nx_pull_match() returned error OFPBMC_BAD_WILDCARDS
948 NXM_OF_ETH_TYPE(0806), NXM_OF_ARP_TPA(c0a81234)
949 nx_pull_match() returned error OFPBMC_BAD_PREREQ
950 nx_pull_match() returned error OFPBMC_BAD_PREREQ
952 # ARP source hardware address
953 NXM_OF_ETH_TYPE(0806), NXM_NX_ARP_SHA(0002e30f80a4)
954 nx_pull_match() returned error OFPBMC_BAD_PREREQ
955 nx_pull_match() returned error OFPBMC_BAD_PREREQ
957 # ARP destination hardware address
958 NXM_OF_ETH_TYPE(0806), NXM_NX_ARP_THA(0002e30f80a4)
959 nx_pull_match() returned error OFPBMC_BAD_PREREQ
960 nx_pull_match() returned error OFPBMC_BAD_PREREQ
963 NXM_OF_ETH_TYPE(8035), NXM_OF_ARP_OP(0003)
964 nx_pull_match() returned error OFPBMC_BAD_VALUE
965 nx_pull_match() returned error OFPBMC_BAD_PREREQ
966 nx_pull_match() returned error OFPBMC_BAD_PREREQ
967 nx_pull_match() returned error OFPBMC_DUP_FIELD
969 # RARP source protocol address
970 NXM_OF_ETH_TYPE(8035), NXM_OF_ARP_SPA(ac100014)
971 NXM_OF_ETH_TYPE(8035), NXM_OF_ARP_SPA_W(c0a81200/ffffff00)
972 nx_pull_match() returned error OFPBMC_BAD_WILDCARDS
973 NXM_OF_ETH_TYPE(8035), NXM_OF_ARP_SPA(c0a81234)
974 nx_pull_match() returned error OFPBMC_BAD_PREREQ
975 nx_pull_match() returned error OFPBMC_BAD_PREREQ
977 # RARP destination protocol address
978 NXM_OF_ETH_TYPE(8035), NXM_OF_ARP_TPA(ac100014)
979 NXM_OF_ETH_TYPE(8035), NXM_OF_ARP_TPA_W(c0a81200/ffffff00)
980 nx_pull_match() returned error OFPBMC_BAD_WILDCARDS
981 NXM_OF_ETH_TYPE(8035), NXM_OF_ARP_TPA(c0a81234)
982 nx_pull_match() returned error OFPBMC_BAD_PREREQ
983 nx_pull_match() returned error OFPBMC_BAD_PREREQ
985 # RARP source hardware address
986 NXM_OF_ETH_TYPE(8035), NXM_NX_ARP_SHA(0002e30f80a4)
987 nx_pull_match() returned error OFPBMC_BAD_PREREQ
988 nx_pull_match() returned error OFPBMC_BAD_PREREQ
990 # RARP destination hardware address
991 NXM_OF_ETH_TYPE(8035), NXM_NX_ARP_THA(0002e30f80a4)
992 nx_pull_match() returned error OFPBMC_BAD_PREREQ
993 nx_pull_match() returned error OFPBMC_BAD_PREREQ
996 NXM_OF_ETH_TYPE(86dd), NXM_NX_IPV6_SRC(20010db83c4d00010002000300040005)
997 nx_pull_match() returned error OFPBMC_BAD_PREREQ
998 NXM_OF_ETH_TYPE(86dd), NXM_NX_IPV6_SRC_W(20010db83c4d00010000000000000000/ffffffffffffffff0000000000000000)
999 nx_pull_match() returned error OFPBMC_BAD_WILDCARDS
1000 NXM_OF_ETH_TYPE(86dd), NXM_NX_IPV6_SRC(20010db83c4d00010000000000000000)
1001 nx_pull_match() returned error OFPBMC_BAD_WILDCARDS
1002 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1005 NXM_OF_ETH_TYPE(86dd), NXM_NX_IPV6_DST(20010db83c4d00010002000300040005)
1006 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1007 nx_pull_match() returned error OFPBMC_BAD_WILDCARDS
1008 NXM_OF_ETH_TYPE(86dd), NXM_NX_IPV6_DST(20010db83c4d00010000000000000000)
1009 NXM_OF_ETH_TYPE(86dd)
1010 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1013 nx_pull_match() returned error OFPBMC_BAD_VALUE
1014 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1015 NXM_OF_ETH_TYPE(86dd), NXM_NX_IPV6_LABEL(0000000f)
1018 NXM_OF_ETH_TYPE(86dd), NXM_OF_IP_PROTO(3a), NXM_NX_ICMPV6_TYPE(87), NXM_NX_ND_TARGET(20010db83c4d00010002000300040005)
1019 NXM_OF_ETH_TYPE(86dd), NXM_OF_IP_PROTO(3a), NXM_NX_ICMPV6_TYPE(88), NXM_NX_ND_TARGET(20010db83c4d00010002000300040005)
1020 nx_pull_match() returned error OFPBMC_BAD_WILDCARDS
1021 NXM_OF_ETH_TYPE(86dd), NXM_OF_IP_PROTO(3a), NXM_NX_ICMPV6_TYPE(87), NXM_NX_ND_TARGET(20010db83c4d00010002000300040005)
1022 NXM_OF_ETH_TYPE(86dd), NXM_OF_IP_PROTO(3a), NXM_NX_ICMPV6_TYPE(87)
1023 nx_pull_match() returned error OFPBMC_BAD_WILDCARDS
1025 # ND source hardware address
1026 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)
1027 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1028 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1029 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1031 # ND destination hardware address
1032 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)
1033 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1034 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1035 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1038 NXM_OF_ETH_TYPE(0800), NXM_NX_IP_FRAG(00)
1039 NXM_OF_ETH_TYPE(0800), NXM_NX_IP_FRAG(01)
1040 NXM_OF_ETH_TYPE(0800), NXM_NX_IP_FRAG(02)
1041 NXM_OF_ETH_TYPE(0800), NXM_NX_IP_FRAG(03)
1042 NXM_OF_ETH_TYPE(0800), NXM_NX_IP_FRAG(00)
1043 NXM_OF_ETH_TYPE(0800), NXM_NX_IP_FRAG_W(00/01)
1044 NXM_OF_ETH_TYPE(0800), NXM_NX_IP_FRAG_W(00/02)
1045 NXM_OF_ETH_TYPE(0800), NXM_NX_IP_FRAG_W(01/01)
1046 NXM_OF_ETH_TYPE(0800), NXM_NX_IP_FRAG_W(02/02)
1047 NXM_OF_ETH_TYPE(0800), NXM_NX_IP_FRAG(03)
1048 NXM_OF_ETH_TYPE(0800), NXM_NX_IP_FRAG(03)
1049 nx_pull_match() returned error OFPBMC_BAD_WILDCARDS
1050 nx_pull_match() returned error OFPBMC_BAD_VALUE
1053 NXM_OF_ETH_TYPE(86dd), NXM_NX_IP_FRAG(00)
1054 NXM_OF_ETH_TYPE(86dd), NXM_NX_IP_FRAG(01)
1055 NXM_OF_ETH_TYPE(86dd), NXM_NX_IP_FRAG(02)
1056 NXM_OF_ETH_TYPE(86dd), NXM_NX_IP_FRAG(03)
1057 NXM_OF_ETH_TYPE(86dd), NXM_NX_IP_FRAG(00)
1058 NXM_OF_ETH_TYPE(86dd), NXM_NX_IP_FRAG_W(00/01)
1059 NXM_OF_ETH_TYPE(86dd), NXM_NX_IP_FRAG_W(00/02)
1060 NXM_OF_ETH_TYPE(86dd), NXM_NX_IP_FRAG_W(01/01)
1061 NXM_OF_ETH_TYPE(86dd), NXM_NX_IP_FRAG_W(02/02)
1062 NXM_OF_ETH_TYPE(86dd), NXM_NX_IP_FRAG(03)
1063 nx_pull_match() returned error OFPBMC_BAD_WILDCARDS
1064 NXM_OF_ETH_TYPE(86dd), NXM_NX_IP_FRAG(03)
1065 nx_pull_match() returned error OFPBMC_BAD_VALUE
1068 NXM_NX_COOKIE(00000000abcdef01)
1069 NXM_NX_COOKIE_W(84200000abcdef01/84200000ffffffff)
1070 NXM_NX_COOKIE(84200000abcdef01)
1074 NXM_NX_TUN_ID(00000000abcdef01)
1075 NXM_NX_TUN_ID_W(84200000abcdef01/84200000ffffffff)
1076 NXM_NX_TUN_ID(84200000abcdef01)
1080 NXM_NX_REG0(acebdf56)
1081 NXM_NX_REG0_W(a0e0d050/f0f0f0f0)
1082 NXM_NX_REG0(a0e0d050)
1085 # dp_hash (testing experimenter OXM).
1086 NXM_NX_DP_HASH(01234567)
1087 NXM_NX_DP_HASH(01234567)
1089 # Invalid field number.
1090 nx_pull_match() returned error OFPBMC_BAD_FIELD
1092 # Invalid field numbers (experimenter OXM).
1093 nx_pull_match() returned error OFPBMC_BAD_FIELD
1094 nx_pull_match() returned error OFPBMC_BAD_FIELD
1096 # Unimplemented registers.
1098 # This test assumes that at least two registers, but fewer than 16,
1099 # registers are implemented.
1100 NXM_NX_REG0(12345678)
1101 NXM_NX_REG0_W(12345678/12345678)
1102 nx_pull_match() returned error OFPBMC_BAD_FIELD
1103 nx_pull_match() returned error OFPBMC_BAD_FIELD
1106 # Check that at least the first warning made it. (It's rate-limited
1107 # so a variable number could show up, especially under valgrind etc.)
1108 AT_CHECK([grep '1-bits in value' stderr | sed 1q], [0], [dnl
1109 nx_match|WARN|Rejecting NXM/OXM entry 0:0:1:1:12 with 1-bits in value for bits wildcarded by the mask.
1112 # Check that there wasn't any other stderr output.
1113 AT_CHECK([grep -v '1-bits in value' stderr], [1])
1116 AT_SETUP([ovs-ofctl parse-ofp10-match])
1117 AT_KEYWORDS([OF1.0])
1118 AT_DATA([test-data], [dnl
1120 003820fe fffe xxxxxxxxxxxx xxxxxxxxxxxx xxxx xx xx xxxx xx xx xxxx dnl
1121 xxxxxxxx xxxxxxxx xxxx xxxx
1123 # dl_src=00:01:02:03:04:05
1124 003820fb xxxx 000102030405 xxxxxxxxxxxx xxxx xx xx xxxx xx xx xxxx dnl
1125 xxxxxxxx xxxxxxxx xxxx xxxx
1127 # dl_dst=10:20:30:40:50:60
1128 003820f7 xxxx xxxxxxxxxxxx 102030405060 xxxx xx xx xxxx xx xx xxxx dnl
1129 xxxxxxxx xxxxxxxx xxxx xxxx
1132 003820fd xxxx xxxxxxxxxxxx xxxxxxxxxxxx 0123 xx xx xxxx xx xx xxxx dnl
1133 xxxxxxxx xxxxxxxx xxxx xxxx
1136 002820ff xxxx xxxxxxxxxxxx xxxxxxxxxxxx xxxx 05 xx xxxx xx xx xxxx dnl
1137 xxxxxxxx xxxxxxxx xxxx xxxx
1139 # dl_vlan=291,dl_vlan_pcp=4
1140 002820fd xxxx xxxxxxxxxxxx xxxxxxxxxxxx 0123 04 xx xxxx xx xx xxxx dnl
1141 xxxxxxxx xxxxxxxx xxxx xxxx
1143 dnl dl_vlan_pcp doesn't make sense when 802.1Q is not present, so
1144 dnl OVS ignores it and drops it on output.
1147 003820fd xxxx xxxxxxxxxxxx xxxxxxxxxxxx ffff xx xx xxxx xx xx xxxx dnl
1148 xxxxxxxx xxxxxxxx xxxx xxxx
1150 dnl dl_vlan_pcp doesn't make sense when 802.1Q is not present, so
1151 dnl OVS ignores it and drops it on output.
1154 002820fd xxxx xxxxxxxxxxxx xxxxxxxxxxxx ffff 05 xx xxxx xx xx xxxx dnl
1155 xxxxxxxx xxxxxxxx xxxx xxxx
1157 dnl Invalid VID and PCP discards out-of-range bits:
1158 # dl_vlan=256,dl_vlan_pcp=7
1161 002820fd xxxx xxxxxxxxxxxx xxxxxxxxxxxx f100 ff xx xxxx xx xx xxxx dnl
1162 xxxxxxxx xxxxxxxx xxxx xxxx
1165 003820ef xxxx xxxxxxxxxxxx xxxxxxxxxxxx xxxx xx xx 1234 xx xx xxxx dnl
1166 xxxxxxxx xxxxxxxx xxxx xxxx
1169 003820cf xxxx xxxxxxxxxxxx xxxxxxxxxxxx xxxx xx xx 0800 xx 05 xxxx dnl
1170 xxxxxxxx xxxxxxxx xxxx xxxx
1172 dnl Ignore nw_proto if not IP or ARP:
1173 # dl_type=0x1234,nw_proto=5
1174 # normal: 3: cf -> ef
1175 # normal: 25: 05 -> 00
1176 & ofp_util|INFO|normalization changed ofp_match, details:
1177 & ofp_util|INFO| pre: dl_type=0x1234,nw_proto=5
1178 & ofp_util|INFO|post: dl_type=0x1234
1179 003820cf xxxx xxxxxxxxxxxx xxxxxxxxxxxx xxxx xx xx 1234 xx 05 xxxx dnl
1180 xxxxxxxx xxxxxxxx xxxx xxxx
1183 001820ef xxxx xxxxxxxxxxxx xxxxxxxxxxxx xxxx xx xx 0800 fc xx xxxx dnl
1184 xxxxxxxx xxxxxxxx xxxx xxxx
1186 dnl Ignore nw_tos if not IP:
1189 # normal: 1: 18 -> 38
1190 # normal: 24: 04 -> 00
1191 & ofp_util|INFO|normalization changed ofp_match, details:
1192 & ofp_util|INFO| pre: arp,nw_tos=4
1193 & ofp_util|INFO|post: arp
1194 001820ef xxxx xxxxxxxxxxxx xxxxxxxxxxxx xxxx xx xx 0806 05 xx xxxx dnl
1195 xxxxxxxx xxxxxxxx xxxx xxxx
1197 dnl Low 2 bits of invalid TOS are forced to 0:
1200 001820ef xxxx xxxxxxxxxxxx xxxxxxxxxxxx xxxx xx xx 0800 31 xx xxxx dnl
1201 xxxxxxxx xxxxxxxx xxxx xxxx
1204 003820cf xxxx xxxxxxxxxxxx xxxxxxxxxxxx xxxx xx xx 0806 xx 02 xxxx dnl
1205 xxxxxxxx xxxxxxxx xxxx xxxx
1207 # ip,nw_src=192.168.128.85
1208 003800ef xxxx xxxxxxxxxxxx xxxxxxxxxxxx xxxx xx xx 0800 xx xx xxxx dnl
1209 c0a88055 xxxxxxxx xxxx xxxx
1211 # ip,nw_src=192.168.128.0/24
1213 003808ef xxxx xxxxxxxxxxxx xxxxxxxxxxxx xxxx xx xx 0800 xx xx xxxx dnl
1214 c0a88055 xxxxxxxx xxxx xxxx
1216 # ip,nw_dst=192.168.128.85
1217 003020ef xxxx xxxxxxxxxxxx xxxxxxxxxxxx xxxx xx xx 0800 xx xx xxxx dnl
1218 xxxxxxxx c0a88055 xxxx xxxx
1220 # ip,nw_dst=192.168.128.0/24
1222 003220ef xxxx xxxxxxxxxxxx xxxxxxxxxxxx xxxx xx xx 0800 xx xx xxxx dnl
1223 xxxxxxxx c0a88055 xxxx xxxx
1225 # arp,arp_spa=192.168.128.85
1226 003800ef xxxx xxxxxxxxxxxx xxxxxxxxxxxx xxxx xx xx 0806 xx xx xxxx dnl
1227 c0a88055 xxxxxxxx xxxx xxxx
1229 # arp,arp_spa=192.168.128.0/24
1231 003808ef xxxx xxxxxxxxxxxx xxxxxxxxxxxx xxxx xx xx 0806 xx xx xxxx dnl
1232 c0a88055 xxxxxxxx xxxx xxxx
1234 # arp,arp_tpa=192.168.128.85
1235 003020ef xxxx xxxxxxxxxxxx xxxxxxxxxxxx xxxx xx xx 0806 xx xx xxxx dnl
1236 xxxxxxxx c0a88055 xxxx xxxx
1238 # arp,arp_tpa=192.168.128.0/24
1240 003220ef xxxx xxxxxxxxxxxx xxxxxxxxxxxx xxxx xx xx 0806 xx xx xxxx dnl
1241 xxxxxxxx c0a88055 xxxx xxxx
1243 dnl Ignore nw_src if not IP or ARP:
1244 # dl_type=0x1234,nw_src=192.168.128.0/24
1246 # normal: 2: 08 -> 20
1247 # normal: 28: c0 -> 00
1248 # normal: 29: a8 -> 00
1249 # normal: 30: 80 -> 00
1250 & ofp_util|INFO|normalization changed ofp_match, details:
1251 & ofp_util|INFO| pre: dl_type=0x1234,nw_src=192.168.128.0/24
1252 & ofp_util|INFO|post: dl_type=0x1234
1253 003808ef xxxx xxxxxxxxxxxx xxxxxxxxxxxx xxxx xx xx 1234 xx xx xxxx dnl
1254 c0a88055 xxxxxxxx xxxx xxxx
1256 dnl Ignore nw_dst if not IP or ARP:
1257 # dl_type=0x1234,nw_dst=192.168.128.0/24
1259 # normal: 1: 32 -> 38
1260 # normal: 32: c0 -> 00
1261 # normal: 33: a8 -> 00
1262 # normal: 34: 80 -> 00
1263 & ofp_util|INFO|normalization changed ofp_match, details:
1264 & ofp_util|INFO| pre: dl_type=0x1234,nw_dst=192.168.128.0/24
1265 & ofp_util|INFO|post: dl_type=0x1234
1266 003220ef xxxx xxxxxxxxxxxx xxxxxxxxxxxx xxxx xx xx 1234 xx xx xxxx dnl
1267 xxxxxxxx c0a88055 xxxx xxxx
1270 0038208f xxxx xxxxxxxxxxxx xxxxxxxxxxxx xxxx xx xx 0800 xx 06 xxxx dnl
1271 xxxxxxxx xxxxxxxx 01bb xxxx
1274 0038204f xxxx xxxxxxxxxxxx xxxxxxxxxxxx xxxx xx xx 0800 xx 06 xxxx dnl
1275 xxxxxxxx xxxxxxxx xxxx 01bb
1278 0038208f xxxx xxxxxxxxxxxx xxxxxxxxxxxx xxxx xx xx 0800 xx 11 xxxx dnl
1279 xxxxxxxx xxxxxxxx 01bb xxxx
1282 0038204f xxxx xxxxxxxxxxxx xxxxxxxxxxxx xxxx xx xx 0800 xx 11 xxxx dnl
1283 xxxxxxxx xxxxxxxx xxxx 01bb
1286 0038208f xxxx xxxxxxxxxxxx xxxxxxxxxxxx xxxx xx xx 0800 xx 84 xxxx dnl
1287 xxxxxxxx xxxxxxxx 01bb xxxx
1290 0038204f xxxx xxxxxxxxxxxx xxxxxxxxxxxx xxxx xx xx 0800 xx 84 xxxx dnl
1291 xxxxxxxx xxxxxxxx xxxx 01bb
1294 0038208f xxxx xxxxxxxxxxxx xxxxxxxxxxxx xxxx xx xx 0800 xx 01 xxxx dnl
1295 xxxxxxxx xxxxxxxx 0005 xxxx
1298 0038204f xxxx xxxxxxxxxxxx xxxxxxxxxxxx xxxx xx xx 0800 xx 01 xxxx dnl
1299 xxxxxxxx xxxxxxxx xxxx 0008
1301 dnl Ignore tp_src if not TCP/UDP/SCTP:
1302 # ip,nw_proto=21,tp_src=443
1303 # normal: 3: 8f -> cf
1304 # normal: 36: 01 -> 00
1305 # normal: 37: bb -> 00
1306 & ofp_util|INFO|normalization changed ofp_match, details:
1307 & ofp_util|INFO| pre: ip,nw_proto=21,tp_src=443
1308 & ofp_util|INFO|post: ip,nw_proto=21
1309 0038208f xxxx xxxxxxxxxxxx xxxxxxxxxxxx xxxx xx xx 0800 xx 15 xxxx dnl
1310 xxxxxxxx xxxxxxxx 01bb xxxx
1312 dnl Ignore tp_dst if not TCP/UDP/SCTP:
1313 # ip,nw_proto=21,tp_dst=443
1314 # normal: 3: 4f -> cf
1315 # normal: 38: 01 -> 00
1316 # normal: 39: bb -> 00
1317 dnl The normalization details are suppressed here due to rate-limiting.
1318 0038204f xxxx xxxxxxxxxxxx xxxxxxxxxxxx xxxx xx xx 0800 xx 15 xxxx dnl
1319 xxxxxxxx xxxxxxxx xxxx 01bb
1322 sed '/^[[#&]]/d' < test-data > input.txt
1323 sed -n 's/^# //p; /^$/p' < test-data > expout
1324 sed -n 's/^& //p' < test-data > experr
1325 AT_CAPTURE_FILE([input.txt])
1326 AT_CAPTURE_FILE([expout])
1327 AT_CAPTURE_FILE([experr])
1329 [ovs-ofctl '-vPATTERN:console:%c|%p|%m' parse-ofp10-match < input.txt],
1330 [0], [expout], [experr])
1333 AT_SETUP([ovs-ofctl parse-ofp11-match])
1334 AT_KEYWORDS([OF1.1])
1335 AT_DATA([test-data], [dnl
1337 0000 0058 fffffffe 000003fe dnl
1338 000000000000ffffffffffff 000000000000ffffffffffff dnl
1339 0000 00 00 0000 00 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
1340 00000000 00 000000 0000000000000000ffffffffffffffff
1342 # bad ofp11_match: OFPBMC_BAD_VALUE
1343 & ofp_util|WARN|port 305419896 is outside the supported range 0 through 65279 or 0xffffff00 through 0xffffffff
1344 0000 0058 12345678 000003fe dnl
1345 000000000000ffffffffffff 000000000000ffffffffffff dnl
1346 0000 00 00 0000 00 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
1347 00000000 00 000000 0000000000000000ffffffffffffffff
1349 # dl_src=00:01:02:03:04:05
1350 0000 0058 00000000 000003ff dnl
1351 000102030405000000000000 000000000000ffffffffffff dnl
1352 0000 00 00 0000 00 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
1353 00000000 00 000000 0000000000000000ffffffffffffffff
1355 # dl_src=55:55:55:55:55:55/55:55:55:55:55:55
1356 0000 0058 00000000 000003ff dnl
1357 555555555555aaaaaaaaaaaa 000000000000ffffffffffff dnl
1358 0000 00 00 0000 00 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
1359 00000000 00 000000 0000000000000000ffffffffffffffff
1361 # dl_dst=00:01:02:03:04:05
1362 0000 0058 00000000 000003ff dnl
1363 000000000000ffffffffffff 000102030405000000000000 dnl
1364 0000 00 00 0000 00 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
1365 00000000 00 000000 0000000000000000ffffffffffffffff
1367 # dl_dst=01:00:00:00:00:00/01:00:00:00:00:00
1368 0000 0058 00000000 000003ff dnl
1369 000000000000ffffffffffff 010000000000feffffffffff dnl
1370 0000 00 00 0000 00 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
1371 00000000 00 000000 0000000000000000ffffffffffffffff
1373 # dl_dst=00:01:02:03:04:05/fe:ff:ff:ff:ff:ff
1374 0000 0058 00000000 000003ff dnl
1375 000000000000ffffffffffff 000102030405010000000000 dnl
1376 0000 00 00 0000 00 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
1377 00000000 00 000000 0000000000000000ffffffffffffffff
1379 # dl_dst=55:55:55:55:55:55/55:55:55:55:55:55
1380 0000 0058 00000000 000003ff dnl
1381 000000000000ffffffffffff 555555555555aaaaaaaaaaaa dnl
1382 0000 00 00 0000 00 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
1383 00000000 00 000000 0000000000000000ffffffffffffffff
1385 dnl dl_vlan_pcp is ignored if dl_vlan is wildcarded, which causes the
1386 dnl the wildcard bit and the dl_vlan_pcp to be dropped for output:
1390 0000 0058 00000001 000003fa dnl
1391 000000000000ffffffffffff 000000000000ffffffffffff dnl
1392 0000 03 00 0000 00 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
1393 00000000 00 000000 0000000000000000ffffffffffffffff
1396 0000 0058 00000000 000003fd dnl
1397 000000000000ffffffffffff 000000000000ffffffffffff dnl
1398 0123 00 00 0000 00 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
1399 00000000 00 000000 0000000000000000ffffffffffffffff
1403 0000 0058 00000000 000003fd dnl
1404 000000000000ffffffffffff 000000000000ffffffffffff dnl
1405 ffff 00 00 0000 00 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
1406 00000000 00 000000 0000000000000000ffffffffffffffff
1408 dnl OFPVID_NONE ignores dl_vlan_pcp even if not wildcarded, which causes
1409 dnl the wildcard bit and the dl_vlan_pcp to be dropped for output:
1413 0000 0058 00000000 000003f9 dnl
1414 000000000000ffffffffffff 000000000000ffffffffffff dnl
1415 ffff 05 00 0000 00 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
1416 00000000 00 000000 0000000000000000ffffffffffffffff
1418 # vlan_tci=0x1000/0x1000
1419 0000 0058 00000000 000003fd dnl
1420 000000000000ffffffffffff 000000000000ffffffffffff dnl
1421 fffe 00 00 0000 00 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
1422 00000000 00 000000 0000000000000000ffffffffffffffff
1424 dnl Try invalid VID:
1425 # bad ofp11_match: OFPBMC_BAD_VALUE
1426 0000 0058 00000000 000003fd dnl
1427 000000000000ffffffffffff 000000000000ffffffffffff dnl
1428 1234 00 00 0000 00 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
1429 00000000 00 000000 0000000000000000ffffffffffffffff
1432 0000 0058 00000000 000003f9 dnl
1433 000000000000ffffffffffff 000000000000ffffffffffff dnl
1434 fffe 04 00 0000 00 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
1435 00000000 00 000000 0000000000000000ffffffffffffffff
1437 # dl_vlan=10,dl_vlan_pcp=6
1438 0000 0058 00000000 000003f9 dnl
1439 000000000000ffffffffffff 000000000000ffffffffffff dnl
1440 000a 06 00 0000 00 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
1441 00000000 00 000000 0000000000000000ffffffffffffffff
1444 0000 0058 00000000 000003f7 dnl
1445 000000000000ffffffffffff 000000000000ffffffffffff dnl
1446 0000 00 00 1234 00 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
1447 00000000 00 000000 0000000000000000ffffffffffffffff
1450 0000 0058 00000000 000003e7 dnl
1451 000000000000ffffffffffff 000000000000ffffffffffff dnl
1452 0000 00 00 0800 fc 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
1453 00000000 00 000000 0000000000000000ffffffffffffffff
1455 dnl Try invalid TOS:
1456 # bad ofp11_match: OFPBMC_BAD_VALUE
1457 0000 0058 00000000 000003e7 dnl
1458 000000000000ffffffffffff 000000000000ffffffffffff dnl
1459 0000 00 00 0800 01 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
1460 00000000 00 000000 0000000000000000ffffffffffffffff
1463 0000 0058 00000000 000003d7 dnl
1464 000000000000ffffffffffff 000000000000ffffffffffff dnl
1465 0000 00 00 0800 00 05 00000000ffffffff 00000000ffffffff 0000 0000 dnl
1466 00000000 00 000000 0000000000000000ffffffffffffffff
1469 0000 0058 00000000 000003d7 dnl
1470 000000000000ffffffffffff 000000000000ffffffffffff dnl
1471 0000 00 00 0806 00 02 00000000ffffffff 00000000ffffffff 0000 0000 dnl
1472 00000000 00 000000 0000000000000000ffffffffffffffff
1474 # ip,nw_src=192.168.128.0/24
1475 0000 0058 00000000 000003f7 dnl
1476 000000000000ffffffffffff 000000000000ffffffffffff dnl
1477 0000 00 00 0800 00 00 c0a88000000000ff 00000000ffffffff 0000 0000 dnl
1478 00000000 00 000000 0000000000000000ffffffffffffffff
1480 # ip,nw_src=128.160.128.0/165.165.165.165
1483 0000 0058 00000000 000003f7 dnl
1484 000000000000ffffffffffff 000000000000ffffffffffff dnl
1485 0000 00 00 0800 00 00 c0a880005a5a5a5a 00000000ffffffff 0000 0000 dnl
1486 00000000 00 000000 0000000000000000ffffffffffffffff
1488 # ip,nw_dst=192.168.128.0/24
1489 0000 0058 00000000 000003f7 dnl
1490 000000000000ffffffffffff 000000000000ffffffffffff dnl
1491 0000 00 00 0800 00 00 00000000ffffffff c0a88000000000ff 0000 0000 dnl
1492 00000000 00 000000 0000000000000000ffffffffffffffff
1494 # ip,nw_dst=128.160.128.0/165.165.165.165
1497 0000 0058 00000000 000003f7 dnl
1498 000000000000ffffffffffff 000000000000ffffffffffff dnl
1499 0000 00 00 0800 00 00 00000000ffffffff c0a880005a5a5a5a 0000 0000 dnl
1500 00000000 00 000000 0000000000000000ffffffffffffffff
1502 # arp,arp_spa=192.168.128.0/24
1503 0000 0058 00000000 000003f7 dnl
1504 000000000000ffffffffffff 000000000000ffffffffffff dnl
1505 0000 00 00 0806 00 00 c0a88000000000ff 00000000ffffffff 0000 0000 dnl
1506 00000000 00 000000 0000000000000000ffffffffffffffff
1508 # arp,arp_tpa=192.168.128.0/24
1509 0000 0058 00000000 000003f7 dnl
1510 000000000000ffffffffffff 000000000000ffffffffffff dnl
1511 0000 00 00 0806 00 00 00000000ffffffff c0a88000000000ff 0000 0000 dnl
1512 00000000 00 000000 0000000000000000ffffffffffffffff
1515 0000 0058 00000000 00000397 dnl
1516 000000000000ffffffffffff 000000000000ffffffffffff dnl
1517 0000 00 00 0800 00 06 00000000ffffffff 00000000ffffffff 01bb 0000 dnl
1518 00000000 00 000000 0000000000000000ffffffffffffffff
1521 0000 0058 00000000 00000357 dnl
1522 000000000000ffffffffffff 000000000000ffffffffffff dnl
1523 0000 00 00 0800 00 06 00000000ffffffff 00000000ffffffff 0000 01bb dnl
1524 00000000 00 000000 0000000000000000ffffffffffffffff
1527 0000 0058 00000000 00000397 dnl
1528 000000000000ffffffffffff 000000000000ffffffffffff dnl
1529 0000 00 00 0800 00 11 00000000ffffffff 00000000ffffffff 01bb 0000 dnl
1530 00000000 00 000000 0000000000000000ffffffffffffffff
1533 0000 0058 00000000 00000397 dnl
1534 000000000000ffffffffffff 000000000000ffffffffffff dnl
1535 0000 00 00 0800 00 01 00000000ffffffff 00000000ffffffff 0005 0000 dnl
1536 00000000 00 000000 0000000000000000ffffffffffffffff
1539 0000 0058 00000000 00000357 dnl
1540 000000000000ffffffffffff 000000000000ffffffffffff dnl
1541 0000 00 00 0800 00 01 00000000ffffffff 00000000ffffffff 0000 0008 dnl
1542 00000000 00 000000 0000000000000000ffffffffffffffff
1545 0000 0058 00000000 00000397 dnl
1546 000000000000ffffffffffff 000000000000ffffffffffff dnl
1547 0000 00 00 0800 00 11 00000000ffffffff 00000000ffffffff 01bb 0000 dnl
1548 00000000 00 000000 0000000000000000ffffffffffffffff
1551 0000 0058 00000000 00000357 dnl
1552 000000000000ffffffffffff 000000000000ffffffffffff dnl
1553 0000 00 00 0800 00 11 00000000ffffffff 00000000ffffffff 0000 01bb dnl
1554 00000000 00 000000 0000000000000000ffffffffffffffff
1557 0000 0058 00000000 000003d7 dnl
1558 000000000000ffffffffffff 000000000000ffffffffffff dnl
1559 0000 00 00 0800 00 84 00000000ffffffff 00000000ffffffff 0000 0000 dnl
1560 00000000 00 000000 0000000000000000ffffffffffffffff
1563 0000 0058 00000000 00000397 dnl
1564 000000000000ffffffffffff 000000000000ffffffffffff dnl
1565 0000 00 00 0800 00 84 00000000ffffffff 00000000ffffffff 01bb 0000 dnl
1566 00000000 00 000000 0000000000000000ffffffffffffffff
1569 0000 0058 00000000 00000357 dnl
1570 000000000000ffffffffffff 000000000000ffffffffffff dnl
1571 0000 00 00 0800 00 84 00000000ffffffff 00000000ffffffff 0000 01bb dnl
1572 00000000 00 000000 0000000000000000ffffffffffffffff
1574 dnl Ignore tp_src if not TCP/UDP/SCTP:
1579 0000 0058 00000000 00000397 dnl
1580 000000000000ffffffffffff 000000000000ffffffffffff dnl
1581 0000 00 00 0800 00 15 00000000ffffffff 00000000ffffffff 01bb 0000 dnl
1582 00000000 00 000000 0000000000000000ffffffffffffffff
1584 dnl Ignore tp_dst if not TCP/UDP/SCTP:
1589 0000 0058 00000000 00000357 dnl
1590 000000000000ffffffffffff 000000000000ffffffffffff dnl
1591 0000 00 00 0800 00 16 00000000ffffffff 00000000ffffffff 0000 01bb dnl
1592 00000000 00 000000 0000000000000000ffffffffffffffff
1594 # mpls,mpls_label=284280
1597 0000 0058 00000000 000002f7 dnl
1598 000000000000ffffffffffff 000000000000ffffffffffff dnl
1599 0000 00 00 8847 00 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
1600 12345678 00 000000 0000000000000000ffffffffffffffff
1604 0000 0058 00000000 000001f7 dnl
1605 000000000000ffffffffffff 000000000000ffffffffffff dnl
1606 0000 00 00 8848 00 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
1607 00000000 5a 000000 0000000000000000ffffffffffffffff
1609 dnl mpls_label and mpls_tc must be ignored if dl_type is not MPLS:
1617 0000 0058 00000000 000000f7 dnl
1618 000000000000ffffffffffff 000000000000ffffffffffff dnl
1619 0000 00 00 1234 00 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
1620 12345678 5a 000000 0000000000000000ffffffffffffffff
1623 # metadata=0x1234567890abcdef
1624 0000 0058 00000000 000003ff dnl
1625 000000000000ffffffffffff 000000000000ffffffffffff dnl
1626 0000 00 00 0000 00 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
1627 00000000 00 000000 1234567890abcdef0000000000000000
1630 # metadata=0x5555555555555555/0x5555555555555555
1631 0000 0058 00000000 000003ff dnl
1632 000000000000ffffffffffff 000000000000ffffffffffff dnl
1633 0000 00 00 0000 00 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
1634 00000000 00 000000 5555555555555555aaaaaaaaaaaaaaaa
1637 # metadata=0x1234000090ab0000/0xffff0000ffff0000
1642 0000 0058 00000000 000003ff dnl
1643 000000000000ffffffffffff 000000000000ffffffffffff dnl
1644 0000 00 00 0000 00 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
1645 00000000 00 000000 1234567890abcdef0000ffff0000ffff
1648 sed '/^[[#&]]/d' < test-data > input.txt
1649 sed -n 's/^# //p; /^$/p' < test-data > expout
1650 sed -n 's/^& //p' < test-data > experr
1651 AT_CAPTURE_FILE([input.txt])
1652 AT_CAPTURE_FILE([expout])
1653 AT_CAPTURE_FILE([experr])
1655 [ovs-ofctl '-vPATTERN:console:%c|%p|%m' parse-ofp11-match < input.txt],
1656 [0], [expout], [experr])
1659 AT_SETUP([ovs-ofctl parse-nx-match loose])
1660 AT_KEYWORDS([nx-match])
1661 AT_DATA([nx-match.txt], [dnl
1662 NXM_OF_IN_PORT(0001), 01020304(1111/3333), NXM_OF_ETH_TYPE(0800)
1663 NXM_OF_IN_PORT(0001), ffff020800002320(11112222), NXM_OF_ETH_TYPE(0800)
1664 NXM_OF_IN_PORT(0001), ffff030800002320(1111/3333), NXM_OF_ETH_TYPE(0800)
1667 AT_CHECK([ovs-ofctl --strict parse-nx-match < nx-match.txt], [0], [dnl
1668 nx_pull_match() returned error OFPBMC_BAD_FIELD
1669 nx_pull_match() returned error OFPBMC_BAD_FIELD
1670 nx_pull_match() returned error OFPBMC_BAD_FIELD
1673 AT_CHECK([ovs-ofctl parse-nx-match < nx-match.txt], [0], [dnl
1674 NXM_OF_IN_PORT(0001), NXM_OF_ETH_TYPE(0800)
1675 NXM_OF_IN_PORT(0001), NXM_OF_ETH_TYPE(0800)
1676 NXM_OF_IN_PORT(0001), NXM_OF_ETH_TYPE(0800)
1680 AT_SETUP([ovs-ofctl parse-oxm (OpenFlow 1.2)])
1682 AT_DATA([oxm.txt], [dnl
1686 OXM_OF_IN_PORT(00000000)
1687 OXM_OF_IN_PORT(fffffffe)
1690 OXM_OF_METADATA(5a5a5a5a5a5a5a5a)
1691 OXM_OF_METADATA_W(0000000000000000/00000000ffffffff)
1692 OXM_OF_METADATA_W(1234567890abcdef/ffff0000ffff0000)
1693 OXM_OF_METADATA_W(1234567890abcdef/ffffffffffffffff)
1694 OXM_OF_METADATA_W(1234567890abcdef/0000000000000000)
1697 OXM_OF_ETH_DST(0002e30f80a4)
1698 OXM_OF_ETH_DST_W(010000000000/010000000000)
1699 OXM_OF_ETH_DST_W(000000000000/010000000000)
1700 OXM_OF_ETH_DST_W(ffffffffffff/010000000000)
1701 OXM_OF_ETH_DST_W(0002e30f80a4/ffffffffffff)
1702 OXM_OF_ETH_DST_W(0002e30f80a4/000000000000)
1703 OXM_OF_ETH_DST_W(0002e30f80a4/feffffffffff)
1706 OXM_OF_ETH_SRC(020898456ddb)
1709 OXM_OF_ETH_TYPE(0800)
1710 OXM_OF_ETH_TYPE(0800) OXM_OF_IN_PORT(00000012)
1713 OXM_OF_VLAN_VID(1009) OXM_OF_VLAN_VID(1009) # Duplicate Field
1714 OXM_OF_VLAN_VID(f009) # Bad Value
1715 OXM_OF_VLAN_PCP(00) # Bad Pre-Requisite
1716 OXM_OF_VLAN_VID(0000) # Packets without 802.1Q header or with VID=0
1717 OXM_OF_VLAN_VID(1123) # Packets with VID=123, any PCP
1718 OXM_OF_VLAN_VID(1123) OXM_OF_VLAN_PCP(01) # Packets with VID=123, PCP=1.
1719 OXM_OF_VLAN_VID(0123) # Does not make sense (but supported anyway)
1720 OXM_OF_VLAN_VID_W(0123/0123) # Does not make sense (but supported anyway)
1721 OXM_OF_VLAN_VID_W(1123/0123) # Does not make sense (but supported anyway)
1722 OXM_OF_VLAN_VID_W(0123/1123) # Does not make sense (but supported anyway)
1723 OXM_OF_VLAN_VID(0123) OXM_OF_VLAN_PCP(01) #Bad Pre-Requisite
1724 OXM_OF_VLAN_VID_W(1123/1fff) # Packets with VID=123, any PCP.
1725 OXM_OF_VLAN_VID_W(1123/ffff) # Packets with VID=123, any PCP.
1726 OXM_OF_VLAN_VID_W(0000/0000) # Packets with or without 802.1Q header
1727 OXM_OF_VLAN_VID_W(1103/1f0f), # Packets with # VID=123 (masked)
1728 OXM_OF_VLAN_VID_W(1103/1f0f), OXM_OF_VLAN_PCP(01) # Packets with VID=123 (masked), any PCP.
1729 OXM_OF_VLAN_VID_W(1000/1000) # Packets with any VID, any PCP
1730 OXM_OF_VLAN_VID_W(1000/1000), OXM_OF_VLAN_PCP(01) # Packets with any VID, PCP=1.
1733 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_DSCP(f0)
1734 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_DSCP(41)
1735 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_DSCP(3f)
1739 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_ECN(03)
1740 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_ECN(06)
1744 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(01)
1745 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(05)
1749 OXM_OF_ETH_TYPE(0800) OXM_OF_IPV4_SRC(ac100014)
1750 OXM_OF_ETH_TYPE(0800) OXM_OF_IPV4_SRC_W(C0a80000/FFFF0000)
1751 OXM_OF_ETH_TYPE(0800) OXM_OF_IPV4_SRC_W(C0a80000/FFFFFFFF)
1752 OXM_OF_ETH_TYPE(0800) OXM_OF_IPV4_SRC_W(00000000/00000000)
1753 OXM_OF_ETH_TYPE(0806) OXM_OF_IPV4_SRC(ac100014)
1754 OXM_OF_IPV4_SRC_W(C0D80000/FFFF0000)
1757 OXM_OF_ETH_TYPE(0800) OXM_OF_IPV4_DST(ac100014)
1758 OXM_OF_ETH_TYPE(0800) OXM_OF_IPV4_DST_W(C0a80000/FFFF0000)
1759 OXM_OF_ETH_TYPE(0800) OXM_OF_IPV4_DST_W(C0a88012/FFFFFFFF)
1760 OXM_OF_ETH_TYPE(0800) OXM_OF_IPV4_DST_W(00000000/00000000)
1761 OXM_OF_IPV4_DST(ac100014)
1762 OXM_OF_ETH_TYPE(0806) OXM_OF_IPV4_DST_W(C0D80000/FFFF0000)
1765 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(06) OXM_OF_TCP_SRC(4231)
1766 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(06) OXM_OF_TCP_SRC_W(5050/F0F0)
1767 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(06) OXM_OF_TCP_SRC_W(5050/FFFF)
1768 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(06) OXM_OF_TCP_SRC_W(0000/0000)
1769 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(07) OXM_OF_TCP_SRC(4231)
1771 # TCP destination port
1772 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(06) OXM_OF_TCP_DST(4231)
1773 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(06) OXM_OF_TCP_DST_W(FDE0/FFF0)
1774 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(06) OXM_OF_TCP_DST_W(FDE0/FFFF)
1775 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(06) OXM_OF_TCP_DST_W(0000/0000)
1776 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(07) OXM_OF_TCP_DST(4231)
1779 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(11) OXM_OF_UDP_SRC(8732)
1780 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(11) OXM_OF_UDP_SRC_W(0132/01FF)
1781 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(11) OXM_OF_UDP_SRC_W(0132/FFFF)
1782 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(11) OXM_OF_UDP_SRC_W(0000/0000)
1783 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(06) OXM_OF_UDP_SRC(7823)
1785 # UDP destination port
1786 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(11) OXM_OF_UDP_DST(1782)
1787 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(11) OXM_OF_UDP_DST_W(5005/F00F)
1788 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(11) OXM_OF_UDP_DST_W(5005/FFFF)
1789 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(11) OXM_OF_UDP_DST_W(0000/0000)
1790 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(02) OXM_OF_UDP_DST(1293)
1793 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(84) OXM_OF_SCTP_SRC(8732)
1794 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(84) OXM_OF_SCTP_SRC_W(0132/01FF)
1795 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(84) OXM_OF_SCTP_SRC_W(0132/FFFF)
1796 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(84) OXM_OF_SCTP_SRC_W(0000/0000)
1797 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(06) OXM_OF_SCTP_SRC(7823)
1799 # SCTP destination port
1800 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(84) OXM_OF_SCTP_DST(1782)
1801 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(84) OXM_OF_SCTP_DST_W(5005/F00F)
1802 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(84) OXM_OF_SCTP_DST_W(5005/FFFF)
1803 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(84) OXM_OF_SCTP_DST_W(0000/0000)
1804 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(02) OXM_OF_SCTP_DST(1293)
1807 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(01) OXM_OF_ICMPV4_TYPE(12)
1808 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(00) OXM_OF_ICMPV4_TYPE(10)
1811 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(01) OXM_OF_ICMPV4_CODE(12)
1812 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(00) OXM_OF_ICMPV4_CODE(10)
1813 OXM_OF_ETH_TYPE(0800) OXM_OF_ICMPV4_CODE(10)
1814 OXM_OF_ICMPV4_CODE(00)
1817 OXM_OF_ETH_TYPE(0806) OXM_OF_ARP_OP(0001)
1818 OXM_OF_ETH_TYPE(0806) OXM_OF_ARP_OP(1111)
1819 OXM_OF_ETH_TYPE(0000) OXM_OF_ARP_OP(0001)
1821 OXM_OF_ETH_TYPE(0806) OXM_OF_ARP_OP(0001) OXM_OF_ARP_OP(0001)
1823 # ARP source protocol address
1824 OXM_OF_ETH_TYPE(0806) OXM_OF_ARP_SPA(ac100014)
1825 OXM_OF_ETH_TYPE(0806) OXM_OF_ARP_SPA_W(C0a81200/FFFFFF00)
1826 OXM_OF_ETH_TYPE(0806) OXM_OF_ARP_SPA_W(C0a81234/FFFFFFFF)
1827 OXM_OF_ETH_TYPE(0806) OXM_OF_ARP_SPA_W(00000000/00000000)
1828 OXM_OF_ETH_TYPE(0800) OXM_OF_ARP_SPA(ac100014)
1829 OXM_OF_ARP_SPA_W(C0D80000/FFFF0000)
1831 # ARP destination protocol address
1832 OXM_OF_ETH_TYPE(0806) OXM_OF_ARP_TPA(ac100014)
1833 OXM_OF_ETH_TYPE(0806) OXM_OF_ARP_TPA_W(C0a81200/FFFFFF00)
1834 OXM_OF_ETH_TYPE(0806) OXM_OF_ARP_TPA_W(C0a812fe/FFFFFFFF)
1835 OXM_OF_ETH_TYPE(0806) OXM_OF_ARP_TPA_W(00000000/00000000)
1836 OXM_OF_ETH_TYPE(0800) OXM_OF_ARP_TPA(ac100014)
1837 OXM_OF_ARP_TPA_W(C0D80000/FFFF0000)
1839 # ARP source hardware address
1840 OXM_OF_ETH_TYPE(0806) OXM_OF_ARP_SHA(0002e30f80a4)
1841 OXM_OF_ETH_TYPE(0800) OXM_OF_ARP_SHA(0002e30f80a4)
1842 OXM_OF_ARP_SHA(0002e30f80a4)
1843 OXM_OF_ETH_TYPE(0806) OXM_OF_ARP_SHA_W(0002e30f80a4/ffffffffffff)
1844 OXM_OF_ETH_TYPE(0806) OXM_OF_ARP_SHA_W(000000000000/000000000000)
1845 OXM_OF_ETH_TYPE(0806) OXM_OF_ARP_SHA_W(000000000004/00000000000f)
1847 # ARP destination hardware address
1848 OXM_OF_ETH_TYPE(0806) OXM_OF_ARP_THA(0002e30f80a4)
1849 OXM_OF_ETH_TYPE(0800) OXM_OF_ARP_THA(0002e30f80a4)
1850 OXM_OF_ARP_THA(0002e30f80a4)
1851 OXM_OF_ETH_TYPE(0806) OXM_OF_ARP_THA_W(0002e30f80a4/ffffffffffff)
1852 OXM_OF_ETH_TYPE(0806) OXM_OF_ARP_THA_W(000000000000/000000000000)
1853 OXM_OF_ETH_TYPE(0806) OXM_OF_ARP_THA_W(000000000004/00000000000f)
1856 OXM_OF_ETH_TYPE(86dd) OXM_OF_IPV6_SRC(20010db83c4d00010002000300040005)
1857 OXM_OF_ETH_TYPE(0800) OXM_OF_IPV6_SRC(20010db83c4d00010002000300040005)
1858 OXM_OF_ETH_TYPE(86dd) OXM_OF_IPV6_SRC_W(20010db83c4d00010000000000000000/ffffffffffffffff0000000000000000)
1859 OXM_OF_ETH_TYPE(86dd) OXM_OF_IPV6_SRC_W(20010db83c4d00010000000000000000/ffffffffffffffffffffffffffffffff)
1860 OXM_OF_ETH_TYPE(86dd) OXM_OF_IPV6_SRC_W(00000000000000000000000000000000/00000000000000000000000000000000)
1861 OXM_OF_ETH_TYPE(0800) OXM_OF_IPV6_SRC_W(20010db83c4d00010000000000000000/ffffffffffffffff0000000000000000)
1864 OXM_OF_ETH_TYPE(86dd) OXM_OF_IPV6_DST(20010db83c4d00010002000300040005)
1865 OXM_OF_ETH_TYPE(0800) OXM_OF_IPV6_DST(20010db83c4d00010002000300040005)
1866 OXM_OF_ETH_TYPE(86dd) OXM_OF_IPV6_DST_W(20010db83c4d00010000000000000000/ffffffffffffffff0000000000000000)
1867 OXM_OF_ETH_TYPE(86dd) OXM_OF_IPV6_DST_W(20010db83c4d00010000000000000000/ffffffffffffffffffffffffffffffff)
1868 OXM_OF_ETH_TYPE(86dd) OXM_OF_IPV6_DST_W(00000000000000000000000000000000/00000000000000000000000000000000)
1869 OXM_OF_ETH_TYPE(0800) OXM_OF_IPV6_DST_W(20010db83c4d00010000000000000000/ffffffffffffffff0000000000000000)
1872 OXM_OF_ETH_TYPE(86dd) OXM_OF_IPV6_FLABEL(1000000f)
1873 OXM_OF_IPV6_FLABEL(0000000f)
1874 OXM_OF_ETH_TYPE(86dd) OXM_OF_IPV6_FLABEL(0000000f)
1875 OXM_OF_ETH_TYPE(86dd) OXM_OF_IPV6_FLABEL_W(0000000f/0000000f)
1876 OXM_OF_ETH_TYPE(86dd) OXM_OF_IPV6_FLABEL_W(0000000f/000fffff)
1877 OXM_OF_ETH_TYPE(86dd) OXM_OF_IPV6_FLABEL_W(00000000/000ffff0)
1878 OXM_OF_ETH_TYPE(86dd) OXM_OF_IPV6_FLABEL_W(0000000f/100fffff)
1879 OXM_OF_ETH_TYPE(86dd) OXM_OF_IPV6_FLABEL_W(0000000f/ffffffff)
1880 OXM_OF_ETH_TYPE(86dd) OXM_OF_IPV6_FLABEL_W(00000000/00000000)
1882 # ND source hardware address
1883 OXM_OF_ETH_TYPE(86dd) OXM_OF_IP_PROTO(3a) OXM_OF_ICMPV6_TYPE(87) OXM_OF_IPV6_ND_TARGET(20010db83c4d00010002000300040005) OXM_OF_IPV6_ND_SLL(0002e30f80a4)
1884 OXM_OF_ETH_TYPE(86dd) OXM_OF_IP_PROTO(3a) OXM_OF_ICMPV6_TYPE(88) OXM_OF_IPV6_ND_TARGET(20010db83c4d00010002000300040005) OXM_OF_IPV6_ND_SLL(0002e30f80a4)
1885 OXM_OF_ETH_TYPE(86dd) OXM_OF_IP_PROTO(3b) OXM_OF_ICMPV6_TYPE(87) OXM_OF_IPV6_ND_TARGET(20010db83c4d00010002000300040005) OXM_OF_IPV6_ND_SLL(0002e30f80a4)
1886 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(3a) OXM_OF_ICMPV6_TYPE(87) OXM_OF_IPV6_ND_TARGET(20010db83c4d00010002000300040005) OXM_OF_IPV6_ND_SLL(0002e30f80a4)
1888 # ND destination hardware address
1889 OXM_OF_ETH_TYPE(86dd) OXM_OF_IP_PROTO(3a) OXM_OF_ICMPV6_TYPE(88) OXM_OF_IPV6_ND_TARGET(20010db83c4d00010002000300040005) OXM_OF_IPV6_ND_TLL(0002e30f80a4)
1890 OXM_OF_ETH_TYPE(86dd) OXM_OF_IP_PROTO(3a) OXM_OF_ICMPV6_TYPE(87) OXM_OF_IPV6_ND_TARGET(20010db83c4d00010002000300040005) OXM_OF_IPV6_ND_TLL(0002e30f80a4)
1891 OXM_OF_ETH_TYPE(86dd) OXM_OF_IP_PROTO(3b) OXM_OF_ICMPV6_TYPE(87) OXM_OF_IPV6_ND_TARGET(20010db83c4d00010002000300040005) OXM_OF_IPV6_ND_TLL(0002e30f80a4)
1892 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(3a) OXM_OF_ICMPV6_TYPE(88) OXM_OF_IPV6_ND_TARGET(20010db83c4d00010002000300040005) OXM_OF_IPV6_ND_TLL(0002e30f80a4)
1894 # Registers 0, 1, and 2.
1895 NXM_NX_REG0(acebdf56)
1896 NXM_NX_REG0_W(a0e0d050/f0f0f0f0)
1897 NXM_NX_REG0(a0e0d050)
1898 NXM_NX_REG1(acebdf56)
1899 NXM_NX_REG0_W(a0e0d050/f0f0f0f0), NXM_NX_REG1_W(a0e0d050/f0f0f0f0)
1900 NXM_NX_REG0_W(a0e0d050/f0f0f0f0), NXM_NX_REG1(a0e0d050)
1901 NXM_NX_REG1_W(a0e0d050/f0f0f0f0), NXM_NX_REG2_W(a0e0d050/f0f0f0f0)
1902 NXM_NX_REG1_W(a0e0d050/f0f0f0f0), NXM_NX_REG2(a0e0d050)
1904 # Extended registers 0, 1, and 2.
1905 # (For OpenFlow 1.2, OVS transforms these into its extension registers.)
1906 OXM_OF_PKT_REG0_W(acebdf5600000000/ffffffff00000000)
1907 OXM_OF_PKT_REG0_W(a0e0d05000000000/f0f0f0f000000000)
1908 OXM_OF_PKT_REG0_W(a0e0d05000000000/ffffffff00000000)
1909 OXM_OF_PKT_REG0_W(00000000acebdf56/00000000ffffffff)
1910 OXM_OF_PKT_REG0_W(a0e0d050a0e0d050/f0f0f0f0f0f0f0f0)
1911 OXM_OF_PKT_REG0_W(a0e0d050a0e0d050/f0f0f0f0ffffffff)
1912 OXM_OF_PKT_REG0_W(00000000a0e0d050/00000000f0f0f0f0), OXM_OF_PKT_REG1_W(a0e0d05000000000/f0f0f0f000000000)
1913 OXM_OF_PKT_REG0_W(00000000a0e0d050/00000000f0f0f0f0), OXM_OF_PKT_REG1_W(a0e0d05000000000/ffffffff00000000)
1915 # Invalid field number.
1918 # Invalid field numbers (experimenter OXM).
1919 ffff020800002320(11112222)
1920 ffff030800002320(1111/3333)
1922 AT_CHECK([ovs-ofctl '-vPATTERN:console:%c|%p|%m' --strict parse-oxm OpenFlow12 < oxm.txt],
1927 OXM_OF_IN_PORT(00000000)
1928 OXM_OF_IN_PORT(fffffffe)
1931 OXM_OF_METADATA(5a5a5a5a5a5a5a5a)
1932 OXM_OF_METADATA_W(0000000000000000/00000000ffffffff)
1933 nx_pull_match() returned error OFPBMC_BAD_WILDCARDS
1934 OXM_OF_METADATA(1234567890abcdef)
1935 nx_pull_match() returned error OFPBMC_BAD_WILDCARDS
1938 OXM_OF_ETH_DST(0002e30f80a4)
1939 OXM_OF_ETH_DST_W(010000000000/010000000000)
1940 OXM_OF_ETH_DST_W(000000000000/010000000000)
1941 nx_pull_match() returned error OFPBMC_BAD_WILDCARDS
1942 OXM_OF_ETH_DST(0002e30f80a4)
1943 nx_pull_match() returned error OFPBMC_BAD_WILDCARDS
1944 OXM_OF_ETH_DST_W(0002e30f80a4/feffffffffff)
1947 OXM_OF_ETH_SRC(020898456ddb)
1950 OXM_OF_ETH_TYPE(0800)
1951 OXM_OF_IN_PORT(00000012), OXM_OF_ETH_TYPE(0800)
1954 nx_pull_match() returned error OFPBMC_DUP_FIELD
1955 nx_pull_match() returned error OFPBMC_BAD_VALUE
1956 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1957 OXM_OF_VLAN_VID(0000)
1958 OXM_OF_VLAN_VID(1123)
1959 OXM_OF_VLAN_VID(1123), OXM_OF_VLAN_PCP(01)
1960 OXM_OF_VLAN_VID(0123)
1961 OXM_OF_VLAN_VID_W(0123/0123)
1962 nx_pull_match() returned error OFPBMC_BAD_WILDCARDS
1963 OXM_OF_VLAN_VID_W(0123/1123)
1964 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1965 OXM_OF_VLAN_VID(1123)
1966 OXM_OF_VLAN_VID(1123)
1968 OXM_OF_VLAN_VID_W(1103/1f0f)
1969 OXM_OF_VLAN_VID_W(1103/1f0f), OXM_OF_VLAN_PCP(01)
1970 OXM_OF_VLAN_VID_W(1000/1000)
1971 OXM_OF_VLAN_VID_W(1000/1000), OXM_OF_VLAN_PCP(01)
1974 nx_pull_match() returned error OFPBMC_BAD_VALUE
1975 nx_pull_match() returned error OFPBMC_BAD_VALUE
1976 OXM_OF_ETH_TYPE(0800), OXM_OF_IP_DSCP(3f)
1977 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1980 OXM_OF_ETH_TYPE(0800), OXM_OF_IP_ECN(03)
1981 nx_pull_match() returned error OFPBMC_BAD_VALUE
1982 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1985 OXM_OF_ETH_TYPE(0800), OXM_OF_IP_PROTO(01)
1986 OXM_OF_ETH_TYPE(0800), OXM_OF_IP_PROTO(05)
1987 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1990 OXM_OF_ETH_TYPE(0800), OXM_OF_IPV4_SRC(ac100014)
1991 OXM_OF_ETH_TYPE(0800), OXM_OF_IPV4_SRC_W(c0a80000/ffff0000)
1992 OXM_OF_ETH_TYPE(0800), OXM_OF_IPV4_SRC(c0a80000)
1993 OXM_OF_ETH_TYPE(0800)
1994 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1995 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1998 OXM_OF_ETH_TYPE(0800), OXM_OF_IPV4_DST(ac100014)
1999 OXM_OF_ETH_TYPE(0800), OXM_OF_IPV4_DST_W(c0a80000/ffff0000)
2000 OXM_OF_ETH_TYPE(0800), OXM_OF_IPV4_DST(c0a88012)
2001 OXM_OF_ETH_TYPE(0800)
2002 nx_pull_match() returned error OFPBMC_BAD_PREREQ
2003 nx_pull_match() returned error OFPBMC_BAD_PREREQ
2006 OXM_OF_ETH_TYPE(0800), OXM_OF_IP_PROTO(06), OXM_OF_TCP_SRC(4231)
2007 OXM_OF_ETH_TYPE(0800), OXM_OF_IP_PROTO(06), OXM_OF_TCP_SRC_W(5050/f0f0)
2008 OXM_OF_ETH_TYPE(0800), OXM_OF_IP_PROTO(06), OXM_OF_TCP_SRC(5050)
2009 OXM_OF_ETH_TYPE(0800), OXM_OF_IP_PROTO(06)
2010 nx_pull_match() returned error OFPBMC_BAD_PREREQ
2012 # TCP destination port
2013 OXM_OF_ETH_TYPE(0800), OXM_OF_IP_PROTO(06), OXM_OF_TCP_DST(4231)
2014 OXM_OF_ETH_TYPE(0800), OXM_OF_IP_PROTO(06), OXM_OF_TCP_DST_W(fde0/fff0)
2015 OXM_OF_ETH_TYPE(0800), OXM_OF_IP_PROTO(06), OXM_OF_TCP_DST(fde0)
2016 OXM_OF_ETH_TYPE(0800), OXM_OF_IP_PROTO(06)
2017 nx_pull_match() returned error OFPBMC_BAD_PREREQ
2020 OXM_OF_ETH_TYPE(0800), OXM_OF_IP_PROTO(11), OXM_OF_UDP_SRC(8732)
2021 OXM_OF_ETH_TYPE(0800), OXM_OF_IP_PROTO(11), OXM_OF_UDP_SRC_W(0132/01ff)
2022 OXM_OF_ETH_TYPE(0800), OXM_OF_IP_PROTO(11), OXM_OF_UDP_SRC(0132)
2023 OXM_OF_ETH_TYPE(0800), OXM_OF_IP_PROTO(11)
2024 nx_pull_match() returned error OFPBMC_BAD_PREREQ
2026 # UDP destination port
2027 OXM_OF_ETH_TYPE(0800), OXM_OF_IP_PROTO(11), OXM_OF_UDP_DST(1782)
2028 OXM_OF_ETH_TYPE(0800), OXM_OF_IP_PROTO(11), OXM_OF_UDP_DST_W(5005/f00f)
2029 OXM_OF_ETH_TYPE(0800), OXM_OF_IP_PROTO(11), OXM_OF_UDP_DST(5005)
2030 OXM_OF_ETH_TYPE(0800), OXM_OF_IP_PROTO(11)
2031 nx_pull_match() returned error OFPBMC_BAD_PREREQ
2034 OXM_OF_ETH_TYPE(0800), OXM_OF_IP_PROTO(84), OXM_OF_SCTP_SRC(8732)
2035 OXM_OF_ETH_TYPE(0800), OXM_OF_IP_PROTO(84), OXM_OF_SCTP_SRC_W(0132/01ff)
2036 OXM_OF_ETH_TYPE(0800), OXM_OF_IP_PROTO(84), OXM_OF_SCTP_SRC(0132)
2037 OXM_OF_ETH_TYPE(0800), OXM_OF_IP_PROTO(84)
2038 nx_pull_match() returned error OFPBMC_BAD_PREREQ
2040 # SCTP destination port
2041 OXM_OF_ETH_TYPE(0800), OXM_OF_IP_PROTO(84), OXM_OF_SCTP_DST(1782)
2042 OXM_OF_ETH_TYPE(0800), OXM_OF_IP_PROTO(84), OXM_OF_SCTP_DST_W(5005/f00f)
2043 OXM_OF_ETH_TYPE(0800), OXM_OF_IP_PROTO(84), OXM_OF_SCTP_DST(5005)
2044 OXM_OF_ETH_TYPE(0800), OXM_OF_IP_PROTO(84)
2045 nx_pull_match() returned error OFPBMC_BAD_PREREQ
2048 OXM_OF_ETH_TYPE(0800), OXM_OF_IP_PROTO(01), OXM_OF_ICMPV4_TYPE(12)
2049 nx_pull_match() returned error OFPBMC_BAD_PREREQ
2052 OXM_OF_ETH_TYPE(0800), OXM_OF_IP_PROTO(01), OXM_OF_ICMPV4_CODE(12)
2053 nx_pull_match() returned error OFPBMC_BAD_PREREQ
2054 nx_pull_match() returned error OFPBMC_BAD_PREREQ
2055 nx_pull_match() returned error OFPBMC_BAD_PREREQ
2058 OXM_OF_ETH_TYPE(0806), OXM_OF_ARP_OP(0001)
2059 nx_pull_match() returned error OFPBMC_BAD_VALUE
2060 nx_pull_match() returned error OFPBMC_BAD_PREREQ
2061 nx_pull_match() returned error OFPBMC_BAD_PREREQ
2062 nx_pull_match() returned error OFPBMC_DUP_FIELD
2064 # ARP source protocol address
2065 OXM_OF_ETH_TYPE(0806), OXM_OF_ARP_SPA(ac100014)
2066 OXM_OF_ETH_TYPE(0806), OXM_OF_ARP_SPA_W(c0a81200/ffffff00)
2067 OXM_OF_ETH_TYPE(0806), OXM_OF_ARP_SPA(c0a81234)
2068 OXM_OF_ETH_TYPE(0806)
2069 nx_pull_match() returned error OFPBMC_BAD_PREREQ
2070 nx_pull_match() returned error OFPBMC_BAD_PREREQ
2072 # ARP destination protocol address
2073 OXM_OF_ETH_TYPE(0806), OXM_OF_ARP_TPA(ac100014)
2074 OXM_OF_ETH_TYPE(0806), OXM_OF_ARP_TPA_W(c0a81200/ffffff00)
2075 OXM_OF_ETH_TYPE(0806), OXM_OF_ARP_TPA(c0a812fe)
2076 OXM_OF_ETH_TYPE(0806)
2077 nx_pull_match() returned error OFPBMC_BAD_PREREQ
2078 nx_pull_match() returned error OFPBMC_BAD_PREREQ
2080 # ARP source hardware address
2081 OXM_OF_ETH_TYPE(0806), OXM_OF_ARP_SHA(0002e30f80a4)
2082 nx_pull_match() returned error OFPBMC_BAD_PREREQ
2083 nx_pull_match() returned error OFPBMC_BAD_PREREQ
2084 OXM_OF_ETH_TYPE(0806), OXM_OF_ARP_SHA(0002e30f80a4)
2085 OXM_OF_ETH_TYPE(0806)
2086 OXM_OF_ETH_TYPE(0806), OXM_OF_ARP_SHA_W(000000000004/00000000000f)
2088 # ARP destination hardware address
2089 OXM_OF_ETH_TYPE(0806), OXM_OF_ARP_THA(0002e30f80a4)
2090 nx_pull_match() returned error OFPBMC_BAD_PREREQ
2091 nx_pull_match() returned error OFPBMC_BAD_PREREQ
2092 OXM_OF_ETH_TYPE(0806), OXM_OF_ARP_THA(0002e30f80a4)
2093 OXM_OF_ETH_TYPE(0806)
2094 OXM_OF_ETH_TYPE(0806), OXM_OF_ARP_THA_W(000000000004/00000000000f)
2097 OXM_OF_ETH_TYPE(86dd), OXM_OF_IPV6_SRC(20010db83c4d00010002000300040005)
2098 nx_pull_match() returned error OFPBMC_BAD_PREREQ
2099 OXM_OF_ETH_TYPE(86dd), OXM_OF_IPV6_SRC_W(20010db83c4d00010000000000000000/ffffffffffffffff0000000000000000)
2100 OXM_OF_ETH_TYPE(86dd), OXM_OF_IPV6_SRC(20010db83c4d00010000000000000000)
2101 OXM_OF_ETH_TYPE(86dd)
2102 nx_pull_match() returned error OFPBMC_BAD_PREREQ
2105 OXM_OF_ETH_TYPE(86dd), OXM_OF_IPV6_DST(20010db83c4d00010002000300040005)
2106 nx_pull_match() returned error OFPBMC_BAD_PREREQ
2107 OXM_OF_ETH_TYPE(86dd), OXM_OF_IPV6_DST_W(20010db83c4d00010000000000000000/ffffffffffffffff0000000000000000)
2108 OXM_OF_ETH_TYPE(86dd), OXM_OF_IPV6_DST(20010db83c4d00010000000000000000)
2109 OXM_OF_ETH_TYPE(86dd)
2110 nx_pull_match() returned error OFPBMC_BAD_PREREQ
2113 nx_pull_match() returned error OFPBMC_BAD_VALUE
2114 nx_pull_match() returned error OFPBMC_BAD_PREREQ
2115 OXM_OF_ETH_TYPE(86dd), OXM_OF_IPV6_FLABEL(0000000f)
2116 OXM_OF_ETH_TYPE(86dd), OXM_OF_IPV6_FLABEL_W(0000000f/0000000f)
2117 OXM_OF_ETH_TYPE(86dd), OXM_OF_IPV6_FLABEL(0000000f)
2118 OXM_OF_ETH_TYPE(86dd), OXM_OF_IPV6_FLABEL_W(00000000/000ffff0)
2119 OXM_OF_ETH_TYPE(86dd), OXM_OF_IPV6_FLABEL(0000000f)
2120 OXM_OF_ETH_TYPE(86dd), OXM_OF_IPV6_FLABEL(0000000f)
2121 OXM_OF_ETH_TYPE(86dd)
2123 # ND source hardware address
2124 OXM_OF_ETH_TYPE(86dd), OXM_OF_IP_PROTO(3a), OXM_OF_ICMPV6_TYPE(87), OXM_OF_IPV6_ND_TARGET(20010db83c4d00010002000300040005), OXM_OF_IPV6_ND_SLL(0002e30f80a4)
2125 nx_pull_match() returned error OFPBMC_BAD_PREREQ
2126 nx_pull_match() returned error OFPBMC_BAD_PREREQ
2127 nx_pull_match() returned error OFPBMC_BAD_PREREQ
2129 # ND destination hardware address
2130 OXM_OF_ETH_TYPE(86dd), OXM_OF_IP_PROTO(3a), OXM_OF_ICMPV6_TYPE(88), OXM_OF_IPV6_ND_TARGET(20010db83c4d00010002000300040005), OXM_OF_IPV6_ND_TLL(0002e30f80a4)
2131 nx_pull_match() returned error OFPBMC_BAD_PREREQ
2132 nx_pull_match() returned error OFPBMC_BAD_PREREQ
2133 nx_pull_match() returned error OFPBMC_BAD_PREREQ
2135 # Registers 0, 1, and 2.
2136 NXM_NX_REG0(acebdf56)
2137 NXM_NX_REG0_W(a0e0d050/f0f0f0f0)
2138 NXM_NX_REG0(a0e0d050)
2139 NXM_NX_REG1(acebdf56)
2140 NXM_NX_REG0_W(a0e0d050/f0f0f0f0), NXM_NX_REG1_W(a0e0d050/f0f0f0f0)
2141 NXM_NX_REG0_W(a0e0d050/f0f0f0f0), NXM_NX_REG1(a0e0d050)
2142 NXM_NX_REG1_W(a0e0d050/f0f0f0f0), NXM_NX_REG2_W(a0e0d050/f0f0f0f0)
2143 NXM_NX_REG1_W(a0e0d050/f0f0f0f0), NXM_NX_REG2(a0e0d050)
2145 # Extended registers 0, 1, and 2.
2146 # (For OpenFlow 1.2, OVS transforms these into its extension registers.)
2147 NXM_NX_REG0(acebdf56)
2148 NXM_NX_REG0_W(a0e0d050/f0f0f0f0)
2149 NXM_NX_REG0(a0e0d050)
2150 NXM_NX_REG1(acebdf56)
2151 NXM_NX_REG0_W(a0e0d050/f0f0f0f0), NXM_NX_REG1_W(a0e0d050/f0f0f0f0)
2152 NXM_NX_REG0_W(a0e0d050/f0f0f0f0), NXM_NX_REG1(a0e0d050)
2153 NXM_NX_REG1_W(a0e0d050/f0f0f0f0), NXM_NX_REG2_W(a0e0d050/f0f0f0f0)
2154 NXM_NX_REG1_W(a0e0d050/f0f0f0f0), NXM_NX_REG2(a0e0d050)
2156 # Invalid field number.
2157 nx_pull_match() returned error OFPBMC_BAD_FIELD
2159 # Invalid field numbers (experimenter OXM).
2160 nx_pull_match() returned error OFPBMC_BAD_FIELD
2161 nx_pull_match() returned error OFPBMC_BAD_FIELD
2164 # Check that at least the first warning made it. (It's rate-limited
2165 # so a variable number could show up, especially under valgrind etc.)
2166 AT_CHECK([grep '1-bits in value' stderr | sed 1q], [0], [dnl
2167 nx_match|WARN|Rejecting NXM/OXM entry 0:32768:2:1:16 with 1-bits in value for bits wildcarded by the mask.
2170 # Check that there wasn't any other stderr output.
2171 AT_CHECK([grep -v '1-bits in value' stderr], [1])
2174 AT_SETUP([ovs-ofctl parse-oxm (OpenFlow 1.3)])
2176 AT_DATA([oxm.txt], [dnl
2178 ONFOXM_ET_ACTSET_OUTPUT(00000000)
2179 ONFOXM_ET_ACTSET_OUTPUT(fffffffe)
2180 ONFOXM_ET_ACTSET_OUTPUT(fffffff7)
2181 OXM_OF_ACTSET_OUTPUT(00000000)
2182 OXM_OF_ACTSET_OUTPUT(fffffffe)
2183 OXM_OF_ACTSET_OUTPUT(fffffff7)
2185 AT_CHECK([ovs-ofctl '-vPATTERN:console:%c|%p|%m' --strict parse-oxm OpenFlow13 < oxm.txt],
2188 ONFOXM_ET_ACTSET_OUTPUT(00000000)
2189 ONFOXM_ET_ACTSET_OUTPUT(fffffffe)
2190 ONFOXM_ET_ACTSET_OUTPUT(fffffff7)
2191 ONFOXM_ET_ACTSET_OUTPUT(00000000)
2192 ONFOXM_ET_ACTSET_OUTPUT(fffffffe)
2193 ONFOXM_ET_ACTSET_OUTPUT(fffffff7)
2197 AT_SETUP([ovs-ofctl parse-oxm (OpenFlow 1.5)])
2199 AT_DATA([oxm.txt], [dnl
2200 # Extended registers 0 and 1.
2201 OXM_OF_PKT_REG0_W(acebdf5600000000/ffffffff00000000)
2202 OXM_OF_PKT_REG0_W(a0e0d05000000000/f0f0f0f000000000)
2203 OXM_OF_PKT_REG0_W(a0e0d05000000000/ffffffff00000000)
2204 OXM_OF_PKT_REG0_W(00000000acebdf56/00000000ffffffff)
2205 OXM_OF_PKT_REG0_W(a0e0d050a0e0d050/f0f0f0f0f0f0f0f0)
2206 OXM_OF_PKT_REG0_W(a0e0d050a0e0d050/f0f0f0f0ffffffff)
2207 OXM_OF_PKT_REG0_W(00000000a0e0d050/00000000f0f0f0f0), OXM_OF_PKT_REG1_W(a0e0d05000000000/f0f0f0f000000000)
2208 OXM_OF_PKT_REG0_W(00000000a0e0d050/00000000f0f0f0f0), OXM_OF_PKT_REG1_W(a0e0d05000000000/ffffffff00000000)
2210 # Registers 0, 1, and 2.
2211 # (OpenFlow 1.5 transforms these into the standard "xregs".)
2212 NXM_NX_REG0(acebdf56)
2213 NXM_NX_REG0_W(a0e0d050/f0f0f0f0)
2214 NXM_NX_REG0(a0e0d050)
2215 NXM_NX_REG1(acebdf56)
2216 NXM_NX_REG0_W(a0e0d050/f0f0f0f0), NXM_NX_REG1_W(a0e0d050/f0f0f0f0)
2217 NXM_NX_REG0_W(a0e0d050/f0f0f0f0), NXM_NX_REG1(a0e0d050)
2218 NXM_NX_REG1_W(a0e0d050/f0f0f0f0), NXM_NX_REG2_W(a0e0d050/f0f0f0f0)
2219 NXM_NX_REG1_W(a0e0d050/f0f0f0f0), NXM_NX_REG2(a0e0d050)
2222 ONFOXM_ET_ACTSET_OUTPUT(00000000)
2223 ONFOXM_ET_ACTSET_OUTPUT(fffffffe)
2224 ONFOXM_ET_ACTSET_OUTPUT(fffffff7)
2225 OXM_OF_ACTSET_OUTPUT(00000000)
2226 OXM_OF_ACTSET_OUTPUT(fffffffe)
2227 OXM_OF_ACTSET_OUTPUT(fffffff7)
2229 AT_CHECK([ovs-ofctl '-vPATTERN:console:%c|%p|%m' --strict parse-oxm OpenFlow15 < oxm.txt],
2231 # Extended registers 0 and 1.
2232 OXM_OF_PKT_REG0_W(acebdf5600000000/ffffffff00000000)
2233 OXM_OF_PKT_REG0_W(a0e0d05000000000/f0f0f0f000000000)
2234 OXM_OF_PKT_REG0_W(a0e0d05000000000/ffffffff00000000)
2235 OXM_OF_PKT_REG0_W(00000000acebdf56/00000000ffffffff)
2236 OXM_OF_PKT_REG0_W(a0e0d050a0e0d050/f0f0f0f0f0f0f0f0)
2237 OXM_OF_PKT_REG0_W(a0e0d050a0e0d050/f0f0f0f0ffffffff)
2238 OXM_OF_PKT_REG0_W(00000000a0e0d050/00000000f0f0f0f0), OXM_OF_PKT_REG1_W(a0e0d05000000000/f0f0f0f000000000)
2239 OXM_OF_PKT_REG0_W(00000000a0e0d050/00000000f0f0f0f0), OXM_OF_PKT_REG1_W(a0e0d05000000000/ffffffff00000000)
2241 # Registers 0, 1, and 2.
2242 # (OpenFlow 1.5 transforms these into the standard "xregs".)
2243 OXM_OF_PKT_REG0_W(acebdf5600000000/ffffffff00000000)
2244 OXM_OF_PKT_REG0_W(a0e0d05000000000/f0f0f0f000000000)
2245 OXM_OF_PKT_REG0_W(a0e0d05000000000/ffffffff00000000)
2246 OXM_OF_PKT_REG0_W(00000000acebdf56/00000000ffffffff)
2247 OXM_OF_PKT_REG0_W(a0e0d050a0e0d050/f0f0f0f0f0f0f0f0)
2248 OXM_OF_PKT_REG0_W(a0e0d050a0e0d050/f0f0f0f0ffffffff)
2249 OXM_OF_PKT_REG0_W(00000000a0e0d050/00000000f0f0f0f0), OXM_OF_PKT_REG1_W(a0e0d05000000000/f0f0f0f000000000)
2250 OXM_OF_PKT_REG0_W(00000000a0e0d050/00000000f0f0f0f0), OXM_OF_PKT_REG1_W(a0e0d05000000000/ffffffff00000000)
2253 OXM_OF_ACTSET_OUTPUT(00000000)
2254 OXM_OF_ACTSET_OUTPUT(fffffffe)
2255 OXM_OF_ACTSET_OUTPUT(fffffff7)
2256 OXM_OF_ACTSET_OUTPUT(00000000)
2257 OXM_OF_ACTSET_OUTPUT(fffffffe)
2258 OXM_OF_ACTSET_OUTPUT(fffffff7)
2262 AT_SETUP([ovs-ofctl parse-oxm loose])
2264 AT_DATA([oxm.txt], [dnl
2265 OXM_OF_IN_PORT(00000001), 01020304(1111/3333), OXM_OF_ETH_TYPE(0800)
2266 OXM_OF_IN_PORT(00000001), ffff020800002320(11112222), OXM_OF_ETH_TYPE(0800)
2267 OXM_OF_IN_PORT(00000001), ffff030800002320(1111/3333), OXM_OF_ETH_TYPE(0800)
2270 AT_CHECK([ovs-ofctl --strict parse-oxm OpenFlow12 < oxm.txt], [0], [dnl
2271 nx_pull_match() returned error OFPBMC_BAD_FIELD
2272 nx_pull_match() returned error OFPBMC_BAD_FIELD
2273 nx_pull_match() returned error OFPBMC_BAD_FIELD
2276 AT_CHECK([ovs-ofctl parse-oxm OpenFlow12 < oxm.txt], [0], [dnl
2277 OXM_OF_IN_PORT(00000001), OXM_OF_ETH_TYPE(0800)
2278 OXM_OF_IN_PORT(00000001), OXM_OF_ETH_TYPE(0800)
2279 OXM_OF_IN_PORT(00000001), OXM_OF_ETH_TYPE(0800)
2283 AT_SETUP([experimenter OXM encoding])
2284 AT_DATA([oxm.txt], [dnl
2285 NXM_NX_DP_HASH(01234567)
2286 NXOXM_ET_DP_HASH(01234567)
2288 NXM_NX_DP_HASH_W(01234567/0fffffff)
2289 NXOXM_ET_DP_HASH_W(01234567/0fffffff)
2292 # To allow for testing experimenter OXM, which doesn't really have many
2293 # examples in the wild, we've defined a variant of NXM_NX_DP_HASH that uses
2294 # the experimenter OXM mechanism, called NXOXM_ET_DP_HASH. We've defined
2295 # it as if it were introduced with OpenFlow 1.5, which gives us the
2296 # opportunity to see that both forms are accepted in all OpenFlow versions
2297 # but the experimenter form is used for encoding in OF1.5+.
2299 # First verify that both forms are accepted and NXOXM_ET_DP_HASH is encoded
2301 AT_CHECK([ovs-ofctl -m --strict parse-oxm OpenFlow15 < oxm.txt], [0], [dnl
2302 NXOXM_ET_DP_HASH(01234567)
2303 00000000 00 01 00 10 ff ff 00 08-00 00 23 20 01 23 45 67 @&t@
2304 NXOXM_ET_DP_HASH(01234567)
2305 00000000 00 01 00 10 ff ff 00 08-00 00 23 20 01 23 45 67 @&t@
2307 NXOXM_ET_DP_HASH_W(01234567/0fffffff)
2308 00000000 00 01 00 14 ff ff 01 0c-00 00 23 20 01 23 45 67 @&t@
2309 00000010 0f ff ff ff 00 00 00 00-
2310 NXOXM_ET_DP_HASH_W(01234567/0fffffff)
2311 00000000 00 01 00 14 ff ff 01 0c-00 00 23 20 01 23 45 67 @&t@
2312 00000010 0f ff ff ff 00 00 00 00-
2315 # Then verify that both forms are accepted and NXM_NX_DP_HASH is encoded
2317 AT_CHECK([ovs-ofctl -m --strict parse-oxm OpenFlow12 < oxm.txt], [0], [dnl
2318 NXM_NX_DP_HASH(01234567)
2319 00000000 00 01 00 0c 00 01 46 04-01 23 45 67 00 00 00 00 @&t@
2320 NXM_NX_DP_HASH(01234567)
2321 00000000 00 01 00 0c 00 01 46 04-01 23 45 67 00 00 00 00 @&t@
2323 NXM_NX_DP_HASH_W(01234567/0fffffff)
2324 00000000 00 01 00 10 00 01 47 08-01 23 45 67 0f ff ff ff @&t@
2325 NXM_NX_DP_HASH_W(01234567/0fffffff)
2326 00000000 00 01 00 10 00 01 47 08-01 23 45 67 0f ff ff ff @&t@
2330 AT_SETUP([check TCP flags expression in OXM and NXM])
2331 # NXM/OXM input for matching on TCP flags.
2332 tcp_flags='OXM_OF_ETH_TYPE(0800), OXM_OF_IP_PROTO(06), OXM_OF_TCP_FLAGS(0fff)'
2334 # Check that marshaling into NXM gives all NXM headers.
2335 AT_CHECK([echo "$tcp_flags" | ovs-ofctl parse-nxm], [0],
2336 [NXM_OF_ETH_TYPE(0800), NXM_OF_IP_PROTO(06), NXM_NX_TCP_FLAGS(0fff)
2339 # Check that marshaling in OXM for OF1.2 gives OXM headers except for
2340 # TCP flags, which didn't have an OXM definition.
2341 AT_CHECK([echo "$tcp_flags" | ovs-ofctl parse-oxm OpenFlow12], [0],
2342 [OXM_OF_ETH_TYPE(0800), OXM_OF_IP_PROTO(06), NXM_NX_TCP_FLAGS(0fff)
2345 # Check that marshaling in OXM for OF1.3 and OF1.4 gives OXM headers,
2346 # including the ONF extension for TCP flags introduced in OF1.3.
2347 AT_CHECK([echo "$tcp_flags" | ovs-ofctl parse-oxm OpenFlow13], [0],
2348 [OXM_OF_ETH_TYPE(0800), OXM_OF_IP_PROTO(06), ONFOXM_ET_TCP_FLAGS(0fff)
2350 AT_CHECK([echo "$tcp_flags" | ovs-ofctl parse-oxm OpenFlow14], [0],
2351 [OXM_OF_ETH_TYPE(0800), OXM_OF_IP_PROTO(06), ONFOXM_ET_TCP_FLAGS(0fff)
2354 # OpenFlow 1.5 added an OXM header for TCP flags:
2355 AT_CHECK([echo "$tcp_flags" | ovs-ofctl parse-oxm OpenFlow15], [0],
2356 [OXM_OF_ETH_TYPE(0800), OXM_OF_IP_PROTO(06), OXM_OF_TCP_FLAGS(0fff)
2360 dnl Check all of the patterns mentioned in the "VLAN Matching" section
2361 dnl in the DESIGN file at top level.
2362 AT_SETUP([ovs-ofctl check-vlan])
2366 AT_CHECK([ovs-ofctl check-vlan 0000 0000], [0], [dnl
2368 NXM: <any> -> 0000/0000
2369 OXM: <any> -> 0000/0000,--
2370 OF1.0: 0000/1,00/1 -> 0000/0000
2371 OF1.1: 0000/1,00/1 -> 0000/0000
2375 AT_CHECK([ovs-ofctl check-vlan 0000 ffff], [0], [dnl
2376 vlan_tci=0x0000 -> 0000/ffff
2377 NXM: NXM_OF_VLAN_TCI(0000) -> 0000/ffff
2378 OXM: OXM_OF_VLAN_VID(0000) -> 0000/1fff,--
2379 OF1.0: ffff/0,00/0 -> 0000/ffff
2380 OF1.1: ffff/0,00/1 -> 0000/ffff
2384 AT_CHECK([ovs-ofctl check-vlan 1abc 1fff], [0], [dnl
2385 dl_vlan=2748 -> 1abc/1fff
2386 NXM: NXM_OF_VLAN_TCI_W(1abc/1fff) -> 1abc/1fff
2387 OXM: OXM_OF_VLAN_VID(1abc) -> 1abc/1fff,--
2388 OF1.0: 0abc/0,00/1 -> 1abc/1fff
2389 OF1.1: 0abc/0,00/1 -> 1abc/1fff
2393 AT_CHECK([ovs-ofctl check-vlan b000 f000], [0], [dnl
2394 dl_vlan_pcp=5 -> b000/f000
2395 NXM: NXM_OF_VLAN_TCI_W(b000/f000) -> b000/f000
2396 OXM: OXM_OF_VLAN_VID_W(1000/1000), OXM_OF_VLAN_PCP(05) -> 1000/1000,05
2397 OF1.0: 0000/1,05/0 -> b000/f000
2398 OF1.1: fffe/0,05/0 -> b000/f000
2402 AT_CHECK([ovs-ofctl check-vlan babc ffff], [0], [dnl
2403 dl_vlan=2748,dl_vlan_pcp=5 -> babc/ffff
2404 NXM: NXM_OF_VLAN_TCI(babc) -> babc/ffff
2405 OXM: OXM_OF_VLAN_VID(1abc), OXM_OF_VLAN_PCP(05) -> 1abc/1fff,05
2406 OF1.0: 0abc/0,05/0 -> babc/ffff
2407 OF1.1: 0abc/0,05/0 -> babc/ffff
2411 AT_CHECK([ovs-ofctl check-vlan 0000 0fff], [0], [dnl
2412 vlan_tci=0x0000/0x0fff -> 0000/0fff
2413 NXM: NXM_OF_VLAN_TCI_W(0000/0fff) -> 0000/0fff
2414 OXM: OXM_OF_VLAN_VID_W(0000/0fff) -> 0000/0fff,--
2415 OF1.0: 0000/0,00/1 -> 1000/1fff
2416 OF1.1: 0000/0,00/1 -> 1000/1fff
2420 AT_CHECK([ovs-ofctl check-vlan 0000 f000], [0], [dnl
2421 vlan_tci=0x0000/0xf000 -> 0000/f000
2422 NXM: NXM_OF_VLAN_TCI_W(0000/f000) -> 0000/f000
2423 OXM: OXM_OF_VLAN_VID_W(0000/1000) -> 0000/1000,--
2424 OF1.0: ffff/0,00/0 -> 0000/ffff
2425 OF1.1: ffff/0,00/1 -> 0000/ffff
2429 AT_CHECK([ovs-ofctl check-vlan 0000 efff], [0], [dnl
2430 vlan_tci=0x0000/0xefff -> 0000/efff
2431 NXM: NXM_OF_VLAN_TCI_W(0000/efff) -> 0000/efff
2432 OXM: OXM_OF_VLAN_VID_W(0000/0fff) -> 0000/0fff,--
2433 OF1.0: 0000/0,00/0 -> 1000/ffff
2434 OF1.1: 0000/0,00/0 -> 1000/ffff
2438 AT_CHECK([ovs-ofctl check-vlan 1001 1001], [0], [dnl
2439 vlan_tci=0x1001/0x1001 -> 1001/1001
2440 NXM: NXM_OF_VLAN_TCI_W(1001/1001) -> 1001/1001
2441 OXM: OXM_OF_VLAN_VID_W(1001/1001) -> 1001/1001,--
2442 OF1.0: 0001/0,00/1 -> 1001/1fff
2443 OF1.1: 0001/0,00/1 -> 1001/1fff
2447 AT_CHECK([ovs-ofctl check-vlan 3000 3000], [0], [dnl
2448 vlan_tci=0x3000/0x3000 -> 3000/3000
2449 NXM: NXM_OF_VLAN_TCI_W(3000/3000) -> 3000/3000
2450 OXM: OXM_OF_VLAN_VID_W(1000/1000), OXM_OF_VLAN_PCP(01) -> 1000/1000,01
2451 OF1.0: 0000/1,01/0 -> 3000/f000
2452 OF1.1: fffe/0,01/0 -> 3000/f000
2457 dnl Check that "-F openflow10" rejects a flow_mod with unsupported features,
2458 dnl such as tunnels and metadata.
2459 AT_SETUP([ovs-ofctl -F option and NXM features])
2460 AT_CHECK([ovs-ofctl -F openflow10 add-flow dummy tun_id=123,actions=drop],
2461 [1], [], [ovs-ofctl: none of the usable flow formats (NXM,OXM) is among the allowed flow formats (OpenFlow10)
2463 AT_CHECK([ovs-ofctl -F openflow10 add-flow dummy metadata=123,actions=drop],
2464 [1], [], [ovs-ofctl: none of the usable flow formats (NXM,OXM,OpenFlow11) is among the allowed flow formats (OpenFlow10)
2468 dnl Check that "-F nxm" really forces add-flow to use the NXM flow format.
2469 dnl (If it doesn't, then either the tun_id won't show up at all, or it will
2470 dnl additionally show up as the top 32 bits of the cookie.) This checks
2471 dnl for regression against bug #4566.
2472 AT_SETUP([ovs-ofctl -F option with flow_mods])
2474 AT_CHECK([ovs-ofctl -F nxm add-flow br0 tun_id=0x12345678,actions=drop])
2475 AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip], [0], [dnl
2477 tun_id=0x12345678 actions=drop
2482 dnl Check that "-F openflow10" is really honored on dump-flows.
2483 dnl (If it isn't, then dump-flows will show the register match.)
2484 AT_SETUP([ovs-ofctl dump-flows honors -F option])
2486 AT_CHECK([ovs-ofctl add-flow br0 reg0=0x12345,actions=drop])
2487 AT_CHECK([ovs-ofctl -F openflow10 dump-flows br0 | ofctl_strip], [0], [dnl
2494 dnl Check that "-F openflow10" fails on dump-flows if the requested match
2495 dnl can't be represented in OpenFlow 1.0.
2496 AT_SETUP([ovs-ofctl dump-flows rejects bad -F option])
2498 AT_CHECK([ovs-ofctl -F openflow10 dump-flows unix:br0.mgmt reg0=0xabcdef], [1], [],
2499 [ovs-ofctl: none of the usable flow formats (NXM,OXM) is among the allowed flow formats (OpenFlow10)
2504 dnl Check that add-flow reports non-normalized flows (feature #5029).
2505 AT_SETUP([ovs-ofctl add-flow reports non-normalized flows])
2507 AT_CHECK([ovs-ofctl TESTABLE_LOG add-flow br0 nw_src=1.2.3.4,actions=5],
2509 ofp_util|INFO|normalization changed ofp_match, details:
2510 ofp_util|INFO| pre: nw_src=1.2.3.4
2511 ofp_util|INFO|post: @&t@
2516 dnl Check that --sort and --rsort works with dump-flows
2517 dnl Default field is 'priority'. Flow entries are displayed based
2518 dnl on field to sort.
2519 AT_SETUP([ovs-ofctl dump-flows with sorting])
2522 AT_DATA([allflows.txt], [[
2523 priority=4,in_port=23213 actions=output:42
2524 priority=5,in_port=1029 actions=output:43
2525 priority=7,in_port=1029 actions=output:43
2526 priority=3,in_port=1028 actions=output:44
2527 priority=1,in_port=1026 actions=output:45
2528 priority=6,in_port=1027 actions=output:64
2529 priority=2,in_port=1025 actions=output:47
2530 priority=8,tcp,tp_src=5 actions=drop
2531 priority=9,tcp,tp_src=6 actions=drop
2534 AT_CHECK([ovs-ofctl add-flows br0 allflows.txt
2536 AT_CHECK([ovs-ofctl --sort dump-flows br0 | ofctl_strip], [0], [dnl
2537 priority=1,in_port=1026 actions=output:45
2538 priority=2,in_port=1025 actions=output:47
2539 priority=3,in_port=1028 actions=output:44
2540 priority=4,in_port=23213 actions=output:42
2541 priority=5,in_port=1029 actions=output:43
2542 priority=6,in_port=1027 actions=output:64
2543 priority=7,in_port=1029 actions=output:43
2544 priority=8,tcp,tp_src=5 actions=drop
2545 priority=9,tcp,tp_src=6 actions=drop
2547 AT_CHECK([ovs-ofctl --rsort dump-flows br0 | ofctl_strip], [0], [dnl
2548 priority=9,tcp,tp_src=6 actions=drop
2549 priority=8,tcp,tp_src=5 actions=drop
2550 priority=7,in_port=1029 actions=output:43
2551 priority=6,in_port=1027 actions=output:64
2552 priority=5,in_port=1029 actions=output:43
2553 priority=4,in_port=23213 actions=output:42
2554 priority=3,in_port=1028 actions=output:44
2555 priority=2,in_port=1025 actions=output:47
2556 priority=1,in_port=1026 actions=output:45
2558 AT_CHECK([ovs-ofctl --sort=in_port dump-flows br0 | ofctl_strip], [0], [dnl
2559 priority=2,in_port=1025 actions=output:47
2560 priority=1,in_port=1026 actions=output:45
2561 priority=6,in_port=1027 actions=output:64
2562 priority=3,in_port=1028 actions=output:44
2563 priority=7,in_port=1029 actions=output:43
2564 priority=5,in_port=1029 actions=output:43
2565 priority=4,in_port=23213 actions=output:42
2566 priority=9,tcp,tp_src=6 actions=drop
2567 priority=8,tcp,tp_src=5 actions=drop
2569 AT_CHECK([ovs-ofctl --rsort=in_port dump-flows br0 | ofctl_strip], [0], [dnl
2570 priority=4,in_port=23213 actions=output:42
2571 priority=7,in_port=1029 actions=output:43
2572 priority=5,in_port=1029 actions=output:43
2573 priority=3,in_port=1028 actions=output:44
2574 priority=6,in_port=1027 actions=output:64
2575 priority=1,in_port=1026 actions=output:45
2576 priority=2,in_port=1025 actions=output:47
2577 priority=9,tcp,tp_src=6 actions=drop
2578 priority=8,tcp,tp_src=5 actions=drop
2580 AT_CHECK([ovs-ofctl --sort=tcp_src dump-flows br0 | ofctl_strip], [0], [dnl
2581 priority=8,tcp,tp_src=5 actions=drop
2582 priority=9,tcp,tp_src=6 actions=drop
2583 priority=7,in_port=1029 actions=output:43
2584 priority=6,in_port=1027 actions=output:64
2585 priority=5,in_port=1029 actions=output:43
2586 priority=4,in_port=23213 actions=output:42
2587 priority=3,in_port=1028 actions=output:44
2588 priority=2,in_port=1025 actions=output:47
2589 priority=1,in_port=1026 actions=output:45
2592 [ovs-ofctl --sort=in_port --sort=tcp_src dump-flows br0 | ofctl_strip], [0],
2593 [ priority=2,in_port=1025 actions=output:47
2594 priority=1,in_port=1026 actions=output:45
2595 priority=6,in_port=1027 actions=output:64
2596 priority=3,in_port=1028 actions=output:44
2597 priority=7,in_port=1029 actions=output:43
2598 priority=5,in_port=1029 actions=output:43
2599 priority=4,in_port=23213 actions=output:42
2600 priority=8,tcp,tp_src=5 actions=drop
2601 priority=9,tcp,tp_src=6 actions=drop
2606 AT_SETUP([ovs-ofctl diff-flows])
2609 # Add tons of flows to br0.
2610 for i in `seq 0 1023`; do echo "dl_vlan=$i,actions=drop"; done > add-flows.txt
2611 AT_CHECK([ovs-ofctl add-flows br0 add-flows.txt])
2613 # Dump them and compare against what we expect by hand, then with diff-flows.
2614 for i in `seq 0 1023`; do echo " dl_vlan=$i actions=drop"; done | sort > expout
2615 AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sed '/NXST_FLOW/d' | sort],
2617 AT_CHECK([ovs-ofctl diff-flows br0 add-flows.txt])
2619 # Remove even-numbered flows, compare again.
2620 for i in `seq 0 1023 2`; do echo "dl_vlan=$i"; done > del-flows.txt
2621 AT_CHECK([ovs-ofctl del-flows br0 - < del-flows.txt])
2622 for i in `seq 0 1023 2`; do echo "+dl_vlan=$i actions=drop"; done | sort > expout
2623 AT_CHECK([ovs-ofctl diff-flows br0 add-flows.txt | sort], [0], [expout])
2624 for i in `seq 0 1023 2`; do echo "-dl_vlan=$i actions=drop"; done | sort > expout
2625 AT_CHECK([ovs-ofctl diff-flows add-flows.txt br0 | sort], [0], [expout])
2630 dnl ofpacts that differ bytewise don't necessarily differ when
2631 dnl converted to another representation, such as OpenFlow 1.0
2632 dnl or to a string. "resubmit(,1)" is an example of an action
2633 dnl of this type: "ofpact_resubmit"s can differ in their "compat"
2634 dnl values even though this doesn't affect the string format.
2636 dnl This test checks that "ovs-ofctl diff-flows" doesn't report
2637 dnl false ofpacts differences.
2638 AT_SETUP([ovs-ofctl diff-flows - suppress false differences])
2640 AT_DATA([flows.txt], [actions=resubmit(,1)
2642 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
2643 AT_CHECK([ovs-ofctl diff-flows br0 flows.txt])
2644 AT_CHECK([ovs-ofctl add-flow br0 idle_timeout=60,dl_vlan=9,actions=output:1])
2645 AT_CHECK([ovs-ofctl diff-flows br0 flows.txt], [2], [dnl
2646 -dl_vlan=9 idle_timeout=60 actions=output:1
2648 AT_CHECK([ovs-ofctl add-flow br0 hard_timeout=120,cookie=1234,dl_vlan=9,actions=output:1])
2649 AT_CHECK([ovs-ofctl diff-flows flows.txt br0], [2], [dnl
2650 +dl_vlan=9 cookie=0x4d2 hard_timeout=120 actions=output:1
2655 AT_SETUP([ovs-ofctl -F and -O interaction])
2656 AT_CHECK([ovs-ofctl -F oxm -O openflow10], [1], [],
2657 [ovs-ofctl: None of the enabled OpenFlow versions (OpenFlow10) supports any of the enabled flow formats (OXM). (Use -O to enable additional OpenFlow versions or -F to enable additional flow formats.)
2659 AT_CHECK([ovs-ofctl -F oxm -O openflow11], [1], [],
2660 [ovs-ofctl: None of the enabled OpenFlow versions (OpenFlow11) supports any of the enabled flow formats (OXM). (Use -O to enable additional OpenFlow versions or -F to enable additional flow formats.)
2662 AT_CHECK([ovs-ofctl -F oxm -O openflow10,openflow11], [1], [],
2663 [ovs-ofctl: None of the enabled OpenFlow versions (OpenFlow10, OpenFlow11) supports any of the enabled flow formats (OXM). (Use -O to enable additional OpenFlow versions or -F to enable additional flow formats.)
2665 AT_CHECK([ovs-ofctl -F oxm -O openflow10,openflow12], [1], [],
2666 [ovs-ofctl: missing command name; use --help for help
2668 AT_CHECK([ovs-ofctl -F oxm -O openflow12], [1], [],
2669 [ovs-ofctl: missing command name; use --help for help
2671 AT_CHECK([ovs-ofctl -F oxm -O openflow13], [1], [],
2672 [ovs-ofctl: missing command name; use --help for help
2676 AT_SETUP([ovs-ofctl ofp-parse])
2677 # Test the echo request/reply messages (0 payload).
2678 AT_CHECK([printf '\1\2\0\10\0\0\0\0\1\3\0\10\0\0\0\0' > binary_ofp_msg])
2679 AT_CHECK([ovs-ofctl ofp-parse binary_ofp_msg], [0], [dnl
2680 OFPT_ECHO_REQUEST (xid=0x0): 0 bytes of payload
2681 OFPT_ECHO_REPLY (xid=0x0): 0 bytes of payload
2684 # Test the hello (xid:1 3-byte payload).
2685 AT_CHECK([printf '\1\0\0\13\0\0\0\1\101\102\103' > binary_ofp_msg])
2686 AT_CHECK([ovs-ofctl ofp-parse - < binary_ofp_msg], [0], [dnl
2687 OFPT_HELLO (xid=0x1):
2688 version bitmap: 0x01
2689 unknown data in hello:
2690 00000000 01 00 00 0b 00 00 00 01-41 42 43 |........ABC |
2694 AT_SETUP([tcp flags - filtering])
2695 OVS_VSWITCHD_START([add-port br0 p1 -- set Interface p1 type=dummy ofport_request=1 \
2696 -- add-port br0 p2 -- set Interface p2 type=dummy ofport_request=2])
2697 AT_DATA([flows.txt], [dnl
2698 in_port=1,tcp,tp_dst=80,tcp_flags=+syn-rst-ack-fin,action=2 # Allow outbound web traffic bare-SYN
2699 in_port=1,tcp,tp_dst=80,tcp_flags=+ack,action=2 # Allow outbound web traffic with ACK bit
2700 in_port=1,tcp,tp_dst=80,tcp_flags=+rst,action=2 # Allow outbound web traffic with RST bit
2701 in_port=2,tcp,tp_src=80,tcp_flags=+ack,action=1 # Allow inbound web traffic with ACK bit
2702 in_port=2,tcp,tp_src=80,tcp_flags=+rst,action=1 # Allow inbound web traffic with RST bit
2703 priority=0,in_port=1,action=drop # Default drop outbound
2704 priority=0,in_port=2,action=drop # Default drop inbound
2707 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
2709 AT_CHECK([ovs-ofctl add-flow br0 "tcp,tcp_flags=+ack-ack,action="], [1], [],
2710 [ovs-ofctl: ack: Each TCP flag can be specified only once
2713 AT_CHECK([ovs-appctl dpif/show | tail -n +4], [0], [dnl
2718 dnl Outbound web traffic with bare-SYN
2719 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=80),tcp_flags(0x002)'], [0], [stdout])
2720 AT_CHECK([tail -1 stdout], [0],
2721 [Datapath actions: 2
2724 dnl Outbopund web traffic with ACK bit
2725 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=80),tcp_flags(0x110)'], [0], [stdout])
2726 AT_CHECK([tail -1 stdout], [0],
2727 [Datapath actions: 2
2730 dnl Outbound web traffic with RST bit
2731 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=80),tcp_flags(0x104)'], [0], [stdout])
2732 AT_CHECK([tail -1 stdout], [0],
2733 [Datapath actions: 2
2736 dnl Inbound web traffic with ACK bit
2737 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(2),eth(src=50:54:00:00:00:07,dst=50:54:00:00:00:05),eth_type(0x0800),ipv4(src=192.168.0.2,dst=192.168.0.1,proto=6,tos=0,ttl=64,frag=no),tcp(src=80,dst=8),tcp_flags(0x010)'], [0], [stdout])
2738 AT_CHECK([tail -1 stdout], [0],
2739 [Datapath actions: 1
2742 dnl Inbound web traffic with RST bit
2743 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(2),eth(src=50:54:00:00:00:07,dst=50:54:00:00:00:05),eth_type(0x0800),ipv4(src=192.168.0.2,dst=192.168.0.1,proto=6,tos=0,ttl=64,frag=no),tcp(src=80,dst=8),tcp_flags(0x014)'], [0], [stdout])
2744 AT_CHECK([tail -1 stdout], [0],
2745 [Datapath actions: 1
2748 dnl Inbound web traffic with SYN bit without ACK or RST bits
2749 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(2),eth(src=50:54:00:00:00:07,dst=50:54:00:00:00:05),eth_type(0x0800),ipv4(src=192.168.0.2,dst=192.168.0.1,proto=6,tos=0,ttl=64,frag=no),tcp(src=80,dst=8),tcp_flags(0xfeb)'], [0], [stdout])
2750 AT_CHECK([tail -1 stdout], [0],
2751 [Datapath actions: drop
2757 dnl Check importance parameter added in OF1.4.
2758 dnl It validates whether importance set via add-flow via OpenFlow1.4+ gets
2759 dnl set or not by validating it againt the dump-flows output via OpenFlow1.4+
2760 dnl If add-flow or dump-flows is used with later version of OpenFlow prior to 1.4+
2761 dnl then the importance will be considered zero whether provided as an argument.
2763 AT_SETUP([ovs-ofctl rule with importance])
2765 dnl Flow with importance parameter added via OF1.4+ and later version
2766 AT_CHECK([ovs-ofctl -O OpenFlow14 add-flow br0 priority=21,importance=21,actions=normal])
2767 AT_CHECK([ovs-ofctl add-flow br0 priority=22,importance=22,actions=normal])
2769 dnl Importance parameter will only be visible of flows that are added via OF1.4+ if dumped via OF1.4+
2770 AT_CHECK([ovs-ofctl -O OpenFlow14 dump-flows br0 | ofctl_strip | sed '/ST_FLOW reply/d' | sort], [0], [dnl
2771 importance=21, priority=21 actions=NORMAL
2772 priority=22 actions=NORMAL
2775 dnl Importance parameter will not be visible if flow is dumped with previous version prior to OF1.4+ whether added via OF1.4+
2776 AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sed '/ST_FLOW reply/d' | sort], [0], [dnl
2777 priority=21 actions=NORMAL
2778 priority=22 actions=NORMAL
2785 dnl Importance parameter added in OF1.4.
2786 dnl This validates whether flows with importance
2787 dnl parameter are getting replaced with "replace-flows" or
2788 dnl not by validating dump-flows output after replace with the expected output.
2790 AT_SETUP([ovs-ofctl replace-flows with importance])
2793 dnl Add flows to br0 with importance via OF1.4+. For more details refer "ovs-ofctl rule with importance" test case.
2794 for i in 1 2 3 4 5 6 7 8; do echo "dl_vlan=$i,importance=$i,actions=drop"; done > add-flows.txt
2795 AT_CHECK([ovs-ofctl -O OpenFlow14 add-flows br0 add-flows.txt])
2797 dnl Replace some flows in the bridge.
2798 for i in 1 3 5 7; do echo "dl_vlan=$i,importance=`expr $i + 10`,actions=drop"; done > replace-flows.txt
2799 AT_CHECK([ovs-ofctl -O OpenFlow14 replace-flows br0 replace-flows.txt])
2801 dnl Dump them and compare the dump flows output against the expected output.
2802 for i in 1 2 3 4 5 6 7 8; do if [[ `expr $i % 2` -eq 1 ]]; then importance=`expr $i + 10`; else importance=$i; fi; echo " importance=$importance, dl_vlan=$i actions=drop"; done | sort > expout
2803 AT_CHECK([ovs-ofctl -O OpenFlow14 dump-flows br0 | ofctl_strip | sed '/OFPST_FLOW/d' | sort],
2809 AT_SETUP([ovs-ofctl replace-flows with --bundle])
2812 AT_CHECK([ovs-appctl vlog/set vconn:dbg])
2814 dnl Add flows to br0 with importance via OF1.4+, using an OF1.4+ bundle. For more details refer "ovs-ofctl rule with importance" test case.
2815 for i in 1 2 3 4 5 6 7 8; do echo "dl_vlan=$i,importance=$i,actions=drop"; done > add-flows.txt
2816 AT_CHECK([ovs-ofctl --bundle add-flows br0 add-flows.txt])
2818 dnl Replace some flows in the bridge.
2819 for i in 1 3 5 7; do echo "dl_vlan=$i,importance=`expr $i + 10`,actions=drop"; done > replace-flows.txt
2820 AT_CHECK([ovs-ofctl --bundle replace-flows br0 replace-flows.txt])
2822 dnl Dump them and compare the dump flows output against the expected output.
2823 for i in 1 2 3 4 5 6 7 8; do if [[ `expr $i % 2` -eq 1 ]]; then importance=`expr $i + 10`; else importance=$i; fi; echo " importance=$importance, dl_vlan=$i actions=drop"; done | sort > expout
2824 AT_CHECK([ovs-ofctl -O OpenFlow14 dump-flows br0 | ofctl_strip | sed '/OFPST_FLOW/d' | sort],
2827 dnl Check logs for OpenFlow trace
2829 OVS_WAIT_UNTIL([cat ovs-vswitchd.log | vconn_windows_sub | test `grep -- "|vconn|DBG|unix: sent (Success): OFPST_FLOW reply" | wc -l` -ge 2])
2830 # AT_CHECK([sed -n "s/^.*\(|vconn|DBG|.*xid=.*:\).*$/\1/p" ovs-vswitchd.log], [0], [dnl
2831 AT_CHECK([print_vconn_debug | vconn_windows_sub | ofctl_strip], [0], [dnl
2832 vconn|DBG|unix: sent (Success): OFPT_HELLO (OF1.5):
2833 version bitmap: 0x01, 0x02, 0x03, 0x04, 0x05, 0x06
2834 vconn|DBG|unix: received: OFPT_HELLO (OF1.4):
2835 version bitmap: 0x01, 0x05
2836 vconn|DBG|unix: negotiated OpenFlow version 0x05 (we support version 0x06 and earlier, peer supports versions 0x01, 0x05)
2837 vconn|DBG|unix: received: OFPT_BUNDLE_CONTROL (OF1.4):
2838 bundle_id=0 type=OPEN_REQUEST flags=atomic ordered
2839 vconn|DBG|unix: sent (Success): OFPT_BUNDLE_CONTROL (OF1.4):
2840 bundle_id=0 type=OPEN_REPLY flags=0
2841 vconn|DBG|unix: received: OFPT_BUNDLE_ADD_MESSAGE (OF1.4):
2842 bundle_id=0 flags=atomic ordered
2843 OFPT_FLOW_MOD (OF1.4): ADD dl_vlan=1 importance:1 actions=drop
2844 vconn|DBG|unix: received: OFPT_BUNDLE_ADD_MESSAGE (OF1.4):
2845 bundle_id=0 flags=atomic ordered
2846 OFPT_FLOW_MOD (OF1.4): ADD dl_vlan=2 importance:2 actions=drop
2847 vconn|DBG|unix: received: OFPT_BUNDLE_ADD_MESSAGE (OF1.4):
2848 bundle_id=0 flags=atomic ordered
2849 OFPT_FLOW_MOD (OF1.4): ADD dl_vlan=3 importance:3 actions=drop
2850 vconn|DBG|unix: received: OFPT_BUNDLE_ADD_MESSAGE (OF1.4):
2851 bundle_id=0 flags=atomic ordered
2852 OFPT_FLOW_MOD (OF1.4): ADD dl_vlan=4 importance:4 actions=drop
2853 vconn|DBG|unix: received: OFPT_BUNDLE_ADD_MESSAGE (OF1.4):
2854 bundle_id=0 flags=atomic ordered
2855 OFPT_FLOW_MOD (OF1.4): ADD dl_vlan=5 importance:5 actions=drop
2856 vconn|DBG|unix: received: OFPT_BUNDLE_ADD_MESSAGE (OF1.4):
2857 bundle_id=0 flags=atomic ordered
2858 OFPT_FLOW_MOD (OF1.4): ADD dl_vlan=6 importance:6 actions=drop
2859 vconn|DBG|unix: received: OFPT_BUNDLE_ADD_MESSAGE (OF1.4):
2860 bundle_id=0 flags=atomic ordered
2861 OFPT_FLOW_MOD (OF1.4): ADD dl_vlan=7 importance:7 actions=drop
2862 vconn|DBG|unix: received: OFPT_BUNDLE_ADD_MESSAGE (OF1.4):
2863 bundle_id=0 flags=atomic ordered
2864 OFPT_FLOW_MOD (OF1.4): ADD dl_vlan=8 importance:8 actions=drop
2865 vconn|DBG|unix: received: OFPT_BUNDLE_CONTROL (OF1.4):
2866 bundle_id=0 type=COMMIT_REQUEST flags=atomic ordered
2867 vconn|DBG|unix: sent (Success): OFPT_BUNDLE_CONTROL (OF1.4):
2868 bundle_id=0 type=COMMIT_REPLY flags=0
2869 vconn|DBG|unix: sent (Success): OFPT_HELLO (OF1.5):
2870 version bitmap: 0x01, 0x02, 0x03, 0x04, 0x05, 0x06
2871 vconn|DBG|unix: received: OFPT_HELLO (OF1.4):
2872 version bitmap: 0x01, 0x05
2873 vconn|DBG|unix: negotiated OpenFlow version 0x05 (we support version 0x06 and earlier, peer supports versions 0x01, 0x05)
2874 vconn|DBG|unix: received: OFPST_FLOW request (OF1.4):
2875 vconn|DBG|unix: sent (Success): OFPST_FLOW reply (OF1.4):
2876 vconn|DBG|unix: received: OFPT_BUNDLE_CONTROL (OF1.4):
2877 bundle_id=0 type=OPEN_REQUEST flags=atomic ordered
2878 vconn|DBG|unix: sent (Success): OFPT_BUNDLE_CONTROL (OF1.4):
2879 bundle_id=0 type=OPEN_REPLY flags=0
2880 vconn|DBG|unix: received: OFPT_BUNDLE_ADD_MESSAGE (OF1.4):
2881 bundle_id=0 flags=atomic ordered
2882 OFPT_FLOW_MOD (OF1.4): ADD dl_vlan=1 importance:11 actions=drop
2883 vconn|DBG|unix: received: OFPT_BUNDLE_ADD_MESSAGE (OF1.4):
2884 bundle_id=0 flags=atomic ordered
2885 OFPT_FLOW_MOD (OF1.4): ADD dl_vlan=3 importance:13 actions=drop
2886 vconn|DBG|unix: received: OFPT_BUNDLE_ADD_MESSAGE (OF1.4):
2887 bundle_id=0 flags=atomic ordered
2888 OFPT_FLOW_MOD (OF1.4): ADD dl_vlan=5 importance:15 actions=drop
2889 vconn|DBG|unix: received: OFPT_BUNDLE_ADD_MESSAGE (OF1.4):
2890 bundle_id=0 flags=atomic ordered
2891 OFPT_FLOW_MOD (OF1.4): ADD dl_vlan=7 importance:17 actions=drop
2892 vconn|DBG|unix: received: OFPT_BUNDLE_CONTROL (OF1.4):
2893 bundle_id=0 type=COMMIT_REQUEST flags=atomic ordered
2894 vconn|DBG|unix: sent (Success): OFPT_BUNDLE_CONTROL (OF1.4):
2895 bundle_id=0 type=COMMIT_REPLY flags=0
2896 vconn|DBG|unix: sent (Success): OFPT_HELLO (OF1.5):
2897 version bitmap: 0x01, 0x02, 0x03, 0x04, 0x05, 0x06
2898 vconn|DBG|unix: received: OFPT_HELLO (OF1.4):
2899 version bitmap: 0x05
2900 vconn|DBG|unix: negotiated OpenFlow version 0x05 (we support version 0x06 and earlier, peer supports version 0x05)
2901 vconn|DBG|unix: received: OFPST_FLOW request (OF1.4):
2902 vconn|DBG|unix: sent (Success): OFPST_FLOW reply (OF1.4):
2903 importance=2, dl_vlan=2 actions=drop
2904 importance=4, dl_vlan=4 actions=drop
2905 importance=6, dl_vlan=6 actions=drop
2906 importance=8, dl_vlan=8 actions=drop
2907 importance=11, dl_vlan=1 actions=drop
2908 importance=13, dl_vlan=3 actions=drop
2909 importance=15, dl_vlan=5 actions=drop
2910 importance=17, dl_vlan=7 actions=drop