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 'tun_metadata0 NXM,OXM' \
23 'metadata=0 NXM,OXM,OpenFlow11' \
24 'metadata=1/1 NXM,OXM,OpenFlow11' \
26 'skb_priority=0 none' \
27 'pkt_mark=1 NXM,OXM' \
28 'pkt_mark=1/1 NXM,OXM' \
53 'dl_src=00:11:22:33:44:55 any' \
54 'dl_src=00:11:22:33:44:55/00:ff:ff:ff:ff:ff NXM,OXM,OpenFlow11' \
55 'dl_dst=00:11:22:33:44:55 any' \
56 'dl_dst=00:11:22:33:44:55/00:ff:ff:ff:ff:ff NXM,OXM,OpenFlow11' \
57 'dl_type=0x1234 any' \
58 'dl_type=0x0800 any' \
59 'dl_type=0x0806 any' \
60 'dl_type=0x86dd any' \
62 'vlan_tci=0x1009 any' \
63 'vlan_tci=0x1009/0x1 NXM,OXM' \
66 'vlan_vid=11/0x1 NXM,OXM' \
69 'mpls,mpls_label=5 NXM,OXM,OpenFlow11' \
70 'mpls,mpls_tc=1 NXM,OXM,OpenFlow11' \
71 'mpls,mpls_bos=0 NXM,OXM' \
72 'ip,ip_src=1.2.3.4 any' \
73 'ip,ip_src=192.168.0.0/24 any' \
74 'ip,ip_src=192.0.168.0/255.0.255.0 NXM,OXM,OpenFlow11' \
75 'ip,ip_dst=1.2.3.4 any' \
76 'ip,ip_dst=192.168.0.0/24 any' \
77 'ip,ip_dst=192.0.168.0/255.0.255.0 NXM,OXM,OpenFlow11' \
78 'ipv6,ipv6_src=::1 NXM,OXM' \
79 'ipv6,ipv6_src=0:0:0:0:0:0:0:1/::1 NXM,OXM' \
80 'ipv6,ipv6_dst=::1 NXM,OXM' \
81 'ipv6,ipv6_dst=0:0:0:0:0:0:0:1/::1 NXM,OXM' \
82 'ipv6,ipv6_label=5 NXM,OXM' \
83 'ipv6,ipv6_label=5/1 NXM,OXM' \
85 'ipv6,nw_proto=1 NXM,OXM' \
86 'ip,nw_tos=0xf0 any' \
87 'ipv6,nw_tos=0xf0 NXM,OXM' \
88 'ip,ip_dscp=0x3c any' \
89 'ipv6,ip_dscp=0x3c NXM,OXM' \
90 'ip,nw_ecn=1 NXM,OXM' \
91 'ipv6,nw_ecn=1 NXM,OXM' \
92 'ip,nw_ttl=5 NXM,OXM' \
93 'ipv6,nw_ttl=5 NXM,OXM' \
94 'ip,ip_frag=no NXM,OXM' \
95 'ipv6,ip_frag=no NXM,OXM' \
97 'arp,arp_spa=1.2.3.4 any' \
98 'arp,arp_spa=1.2.3.4/0.0.0.1 NXM,OXM,OpenFlow11' \
99 'arp,arp_tpa=1.2.3.4 any' \
100 'arp,arp_tpa=1.2.3.4/0.0.0.1 NXM,OXM,OpenFlow11' \
101 'arp,arp_sha=00:11:22:33:44:55 NXM,OXM' \
102 'arp,arp_sha=00:11:22:33:44:55/00:ff:ff:ff:ff:ff NXM,OXM' \
103 'arp,arp_tha=00:11:22:33:44:55 NXM,OXM' \
104 'arp,arp_tha=00:11:22:33:44:55/00:ff:ff:ff:ff:ff NXM,OXM' \
105 'tcp,tcp_src=80 any' \
106 'tcp,tcp_src=0x1000/0x1000 NXM,OXM' \
107 'tcp6,tcp_src=80 NXM,OXM' \
108 'tcp6,tcp_src=0x1000/0x1000 NXM,OXM' \
109 'tcp,tcp_dst=80 any' \
110 'tcp,tcp_dst=0x1000/0x1000 NXM,OXM' \
111 'tcp6,tcp_dst=80 NXM,OXM' \
112 'tcp6,tcp_dst=0x1000/0x1000 NXM,OXM' \
113 'udp,udp_src=80 any' \
114 'udp,udp_src=0x1000/0x1000 NXM,OXM' \
115 'udp6,udp_src=80 NXM,OXM' \
116 'udp6,udp_src=0x1000/0x1000 NXM,OXM' \
117 'udp,udp_dst=80 any' \
118 'udp,udp_dst=0x1000/0x1000 NXM,OXM' \
119 'udp6,udp_dst=80 NXM,OXM' \
120 'udp6,udp_dst=0x1000/0x1000 NXM,OXM' \
121 'icmp,icmp_type=1 any' \
122 'icmp,icmp_code=2 any' \
123 'icmp6,icmpv6_type=1 NXM,OXM' \
124 'icmp6,icmpv6_code=2 NXM,OXM' \
125 'ct_state=+trk NXM,OXM' \
126 'ct_zone=0 NXM,OXM' \
127 'ct_mark=0 NXM,OXM' \
128 'ct_label=0 NXM,OXM' \
129 'ct_label=0x1234567890ABCDEF12345678 NXM,OXM'
133 echo "### test case: '$1' should have usable protocols '$2'"
134 if test "$2" = none; then
135 AT_CHECK([ovs-ofctl parse-flow "$1,actions=drop"], [1],
138 [ovs-ofctl: actions are invalid with specified match (OFPBAC_MATCH_INCONSISTENT)
141 AT_CHECK_UNQUOTED([ovs-ofctl parse-flow "$1,actions=drop" | sed 1q], [0],
142 [usable protocols: $2
148 AT_SETUP([ovs-ofctl parse-flows (OpenFlow 1.0)])
149 AT_DATA([flows.txt], [[
151 tcp,tp_src=123,actions=flood
152 in_port=LOCAL dl_vlan=9 dl_src=00:0A:E4:25:6B:B0 actions=drop
153 udp dl_vlan_pcp=7 idle_timeout=5 actions=strip_vlan output:0
154 tcp,nw_src=192.168.0.3,tp_dst=80 actions=set_queue:37,output:1
155 udp,nw_src=192.168.0.3,tp_dst=53 actions=pop_queue,output:1
156 cookie=0x123456789abcdef hard_timeout=10 priority=60000 actions=controller
157 actions=note:41.42.43,note:00.01.02.03.04.05.06.07,note
158 ip,actions=set_field:10.4.3.77->ip_src
161 in_port=0 actions=resubmit:0
162 actions=sample(probability=12345,collector_set_id=23456,obs_domain_id=34567,obs_point_id=45678)
164 actions=ct(commit,nat(dst))
165 actions=ct(commit,nat(src))
166 actions=ct(commit,nat(src=10.0.0.240,random))
167 actions=ct(commit,nat(src=10.0.0.240:32768-65535,random))
168 actions=ct(commit,nat(dst=10.0.0.128-10.0.0.254,hash))
169 actions=ct(commit,nat(src=10.0.0.240-10.0.0.254:32768-65535,persistent))
170 actions=ct(commit,nat(src=fe80::20c:29ff:fe88:a18b,random))
171 actions=ct(commit,nat(src=fe80::20c:29ff:fe88:1-fe80::20c:29ff:fe88:a18b,random))
172 actions=ct(commit,nat(src=[fe80::20c:29ff:fe88:1]-[fe80::20c:29ff:fe88:a18b]:255-4096,random))
173 actions=ct(commit,nat(src=10.1.1.240-10.1.1.255),alg=ftp)
176 AT_CHECK([ovs-ofctl parse-flows flows.txt
178 AT_CHECK([[sed 's/ (xid=0x[0-9a-fA-F]*)//' stdout]], [0],
179 [[usable protocols: OpenFlow10,NXM
180 chosen protocol: OpenFlow10-table_id
181 OFPT_FLOW_MOD: ADD tcp,tp_src=123 actions=FLOOD
182 OFPT_FLOW_MOD: ADD in_port=LOCAL,dl_vlan=9,dl_src=00:0a:e4:25:6b:b0 actions=drop
183 OFPT_FLOW_MOD: ADD udp,dl_vlan_pcp=7 idle:5 actions=strip_vlan,output:0
184 OFPT_FLOW_MOD: ADD tcp,nw_src=192.168.0.3,tp_dst=80 actions=set_queue:37,output:1
185 OFPT_FLOW_MOD: ADD udp,nw_src=192.168.0.3,tp_dst=53 actions=pop_queue,output:1
186 OFPT_FLOW_MOD: ADD priority=60000 cookie:0x123456789abcdef hard:10 actions=CONTROLLER:65535
187 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
188 OFPT_FLOW_MOD: ADD ip actions=mod_nw_src:10.4.3.77
189 OFPT_FLOW_MOD: ADD sctp actions=drop
190 OFPT_FLOW_MOD: ADD sctp actions=drop
191 OFPT_FLOW_MOD: ADD in_port=0 actions=resubmit:0
192 OFPT_FLOW_MOD: ADD actions=sample(probability=12345,collector_set_id=23456,obs_domain_id=34567,obs_point_id=45678)
193 OFPT_FLOW_MOD: ADD actions=ct(nat)
194 OFPT_FLOW_MOD: ADD actions=ct(commit,nat(dst))
195 OFPT_FLOW_MOD: ADD actions=ct(commit,nat(src))
196 OFPT_FLOW_MOD: ADD actions=ct(commit,nat(src=10.0.0.240,random))
197 OFPT_FLOW_MOD: ADD actions=ct(commit,nat(src=10.0.0.240:32768-65535,random))
198 OFPT_FLOW_MOD: ADD actions=ct(commit,nat(dst=10.0.0.128-10.0.0.254,hash))
199 OFPT_FLOW_MOD: ADD actions=ct(commit,nat(src=10.0.0.240-10.0.0.254:32768-65535,persistent))
200 OFPT_FLOW_MOD: ADD actions=ct(commit,nat(src=fe80::20c:29ff:fe88:a18b,random))
201 OFPT_FLOW_MOD: ADD actions=ct(commit,nat(src=fe80::20c:29ff:fe88:1-fe80::20c:29ff:fe88:a18b,random))
202 OFPT_FLOW_MOD: ADD actions=ct(commit,nat(src=[fe80::20c:29ff:fe88:1]-[fe80::20c:29ff:fe88:a18b]:255-4096,random))
203 OFPT_FLOW_MOD: ADD actions=ct(commit,nat(src=10.1.1.240-10.1.1.255),alg=ftp)
207 AT_SETUP([ovs-ofctl parse-flows (OpenFlow 1.1)])
208 AT_DATA([flows.txt], [[
210 tcp,tp_src=123,actions=flood
211 in_port=LOCAL dl_vlan=9 dl_src=00:0A:E4:25:6B:B0 actions=drop
212 udp dl_vlan_pcp=7 idle_timeout=5 actions=strip_vlan output:0
213 tcp,nw_src=192.168.0.3,tp_dst=80 actions=set_queue:37,output:1
214 udp,nw_src=192.168.0.3,tp_dst=53 actions=mod_nw_ecn:2,output:1
215 cookie=0x123456789abcdef hard_timeout=10 priority=60000 actions=controller
216 actions=note:41.42.43,note:00.01.02.03.04.05.06.07,note
217 ip,actions=mod_nw_ttl:1,set_field:10.4.3.77->ip_src
220 in_port=0 actions=resubmit:0
221 actions=sample(probability=12345,collector_set_id=23456,obs_domain_id=34567,obs_point_id=45678)
224 AT_CHECK([ovs-ofctl --protocols OpenFlow11 parse-flows flows.txt
226 AT_CHECK([[sed 's/ (xid=0x[0-9a-fA-F]*)//' stdout]], [0],
227 [[usable protocols: any
228 chosen protocol: OpenFlow11
229 OFPT_FLOW_MOD (OF1.1): ADD tcp,tp_src=123 actions=FLOOD
230 OFPT_FLOW_MOD (OF1.1): ADD in_port=LOCAL,dl_vlan=9,dl_src=00:0a:e4:25:6b:b0 actions=drop
231 OFPT_FLOW_MOD (OF1.1): ADD udp,dl_vlan_pcp=7 idle:5 actions=pop_vlan,output:0
232 OFPT_FLOW_MOD (OF1.1): ADD tcp,nw_src=192.168.0.3,tp_dst=80 actions=set_queue:37,output:1
233 OFPT_FLOW_MOD (OF1.1): ADD udp,nw_src=192.168.0.3,tp_dst=53 actions=mod_nw_ecn:2,output:1
234 OFPT_FLOW_MOD (OF1.1): ADD priority=60000 cookie:0x123456789abcdef hard:10 actions=CONTROLLER:65535
235 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
236 OFPT_FLOW_MOD (OF1.1): ADD ip actions=mod_nw_ttl:1,mod_nw_src:10.4.3.77
237 OFPT_FLOW_MOD (OF1.1): ADD sctp actions=drop
238 OFPT_FLOW_MOD (OF1.1): ADD sctp actions=drop
239 OFPT_FLOW_MOD (OF1.1): ADD in_port=0 actions=resubmit:0
240 OFPT_FLOW_MOD (OF1.1): ADD actions=sample(probability=12345,collector_set_id=23456,obs_domain_id=34567,obs_point_id=45678)
244 AT_SETUP([ovs-ofctl parse-flows (OpenFlow 1.2)])
245 AT_DATA([flows.txt], [[
247 tcp,tp_src=123,actions=flood
248 in_port=LOCAL dl_vlan=9 dl_src=00:0A:E4:25:6B:B0 actions=mod_vlan_vid:7,mod_vlan_pcp:2
249 udp dl_vlan_pcp=7 idle_timeout=5 actions=strip_vlan output:0
250 tcp,nw_src=192.168.0.3,tp_dst=80 actions=set_queue:37,output:1
251 udp,nw_src=192.168.0.3,tp_dst=53 actions=pop_queue,output:1
252 cookie=0x123456789abcdef hard_timeout=10 priority=60000 actions=controller
253 actions=note:41.42.43,note:00.01.02.03.04.05.06.07,note
254 ipv6,actions=set_field:fe80:0123:4567:890a:a6ba:dbff:fefe:59fa->ipv6_src
255 sctp actions=set_field:3334->sctp_src
256 sctp actions=set_field:4445->sctp_dst
257 tcp actions=mod_tp_dst:1234
258 udp actions=mod_tp_src:1111
259 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
260 in_port=0 actions=mod_dl_src:11:22:33:44:55:66,mod_dl_dst:10:20:30:40:50:60
261 in_port=0 actions=resubmit:0
262 actions=sample(probability=12345,collector_set_id=23456,obs_domain_id=34567,obs_point_id=45678)
265 AT_CHECK([ovs-ofctl --protocols OpenFlow12 parse-flows flows.txt
267 AT_CHECK([[sed 's/ (xid=0x[0-9a-fA-F]*)//' stdout]], [0],
268 [[usable protocols: NXM,OXM
269 chosen protocol: OXM-OpenFlow12
270 OFPT_FLOW_MOD (OF1.2): ADD tcp,tp_src=123 actions=FLOOD
271 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
272 OFPT_FLOW_MOD (OF1.2): ADD udp,dl_vlan_pcp=7 idle:5 actions=pop_vlan,output:0
273 OFPT_FLOW_MOD (OF1.2): ADD tcp,nw_src=192.168.0.3,tp_dst=80 actions=set_queue:37,output:1
274 OFPT_FLOW_MOD (OF1.2): ADD udp,nw_src=192.168.0.3,tp_dst=53 actions=pop_queue,output:1
275 OFPT_FLOW_MOD (OF1.2): ADD priority=60000 cookie:0x123456789abcdef hard:10 actions=CONTROLLER:65535
276 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
277 OFPT_FLOW_MOD (OF1.2): ADD ipv6 actions=set_field:fe80:123:4567:890a:a6ba:dbff:fefe:59fa->ipv6_src
278 OFPT_FLOW_MOD (OF1.2): ADD sctp actions=set_field:3334->sctp_src
279 OFPT_FLOW_MOD (OF1.2): ADD sctp actions=set_field:4445->sctp_dst
280 OFPT_FLOW_MOD (OF1.2): ADD tcp actions=set_field:1234->tcp_dst
281 OFPT_FLOW_MOD (OF1.2): ADD udp actions=set_field:1111->udp_src
282 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
283 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
284 OFPT_FLOW_MOD (OF1.2): ADD in_port=0 actions=resubmit:0
285 OFPT_FLOW_MOD (OF1.2): ADD actions=sample(probability=12345,collector_set_id=23456,obs_domain_id=34567,obs_point_id=45678)
289 AT_SETUP([ovs-ofctl parse-flow with invalid mask])
294 'eth_type 0x1234/0x1' \
296 'dl_vlan_pcp 6/0x1' \
298 'mpls mpls_label 5/0x1' \
299 'mpls mpls_tc 1/0x1' \
300 'mpls mpls_bos 1/0x1' \
302 'ipv6 nw_proto 1/1' \
303 'ip nw_tos 0xf0/0xf0' \
304 'ipv6 nw_tos 0xf0/0xf0' \
305 'ip ip_dscp 0x3c/0xf0' \
306 'ipv6 ip_dscp 0x3c/0xf0' \
312 'icmp icmp_type 1/1' \
313 'icmp icmp_code 2/1' \
314 'icmp6 icmpv6_code 2/1'
318 prereq=$1, field=$2 value=$3
320 prereq= field=$1 value=$2
322 AT_CHECK_UNQUOTED([ovs-ofctl parse-flow "$prereq$field=$value,actions=drop"], [1], [],
323 [ovs-ofctl: $value: invalid mask for field $field
328 AT_SETUP([ovs-ofctl action inconsistency (OpenFlow 1.1)])
329 AT_CHECK([ovs-ofctl --protocols OpenFlow11 add-flow br0 'ip actions=mod_tp_dst:1234'
330 ], [1], [stdout], [ovs-ofctl: none of the usable flow formats (OpenFlow10,NXM) is among the allowed flow formats (OpenFlow11)
334 AT_SETUP([ovs-ofctl parse-flows (skb_priority)])
335 AT_DATA([flows.txt], [[
336 skb_priority=0x12341234,tcp,tp_src=123,actions=flood
339 AT_CHECK([ovs-ofctl parse-flows flows.txt
346 AT_SETUP([ovs-ofctl parse-flows (NXM)])
347 AT_DATA([flows.txt], [[
349 tcp,tp_src=123,actions=flood
350 in_port=LOCAL dl_vlan=9 dl_src=00:0A:E4:25:6B:B0 actions=drop
351 pkt_mark=0xbb,actions=set_field:0xaa->pkt_mark
352 udp dl_vlan_pcp=7 idle_timeout=5 actions=strip_vlan output:0
353 tcp,nw_src=192.168.0.3,tp_dst=80 actions=set_queue:37,output:1
354 udp,nw_src=192.168.0.3,tp_dst=53 actions=pop_queue,output:1
355 cookie=0x123456789abcdef hard_timeout=10 priority=60000 actions=controller
356 actions=note:41.42.43,note:00.01.02.03.04.05.06.07,note
357 tcp,tp_src=0x1230/0xfff0,tun_id=0x1234,cookie=0x5678,actions=flood
358 actions=set_tunnel:0x1234,set_tunnel64:0x9876,set_tunnel:0x123456789
359 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])
361 tun_id=0x1234000056780000/0xffff0000ffff0000,actions=drop
362 metadata=0x1234ffff5678ffff/0xffff0000ffff0000,actions=drop
363 actions=bundle(eth_src,50,active_backup,ofport,slaves:1)
364 actions=bundle(symmetric_l4,60,hrw,ofport,slaves:2,3)
365 actions=bundle(symmetric_l4,60,hrw,ofport,slaves:)
366 actions=output:1,bundle(eth_src,0,hrw,ofport,slaves:1),output:2
367 actions=bundle_load(eth_src,50,active_backup,ofport,NXM_NX_REG0[],slaves:1)
368 actions=bundle_load(symmetric_l4,60,hrw,ofport,NXM_NX_REG0[0..15],slaves:2,3)
369 actions=bundle_load(symmetric_l4,60,hrw,ofport,NXM_NX_REG0[0..15],slaves:[2,3])
370 actions=bundle_load(symmetric_l4,60,hrw,ofport,NXM_NX_REG0[0..30],slaves:)
371 actions=output:1,bundle_load(eth_src,0,hrw,ofport,NXM_NX_REG0[16..31],slaves:1),output:2
372 actions=resubmit:1,resubmit(2),resubmit(,3),resubmit(2,3)
373 send_flow_rem,actions=output:1,output:NXM_NX_REG0[],output:2,output:NXM_NX_REG1[16..31],output:3
374 check_overlap,actions=output:1,exit,output:2
375 tcp,actions=fin_timeout(idle_timeout=5,hard_timeout=15)
376 actions=controller(max_len=123,reason=invalid_ttl,id=555)
377 actions=sample(probability=12345,collector_set_id=23456,obs_domain_id=34567,obs_point_id=45678)
378 ip,actions=ct(commit,zone=5)
379 ip,actions=ct(commit,exec(load(1->NXM_NX_CT_MARK[])))
380 ip,actions=ct(commit,exec(load(0x1->NXM_NX_CT_LABEL[])))
381 ip,actions=ct(commit,exec(load(0x1234567890ABCDEF->NXM_NX_CT_LABEL[32..95])))
382 ip,actions=ct(commit,exec(set_field(0x1->ct_label)))
383 ip,ct_state=+trk,ct_label=0x1234567890abcdef12345678,actions=ct(commit)
386 AT_CHECK([ovs-ofctl parse-flows flows.txt
388 AT_CHECK([[sed 's/ (xid=0x[0-9a-fA-F]*)//' stdout]], [0],
389 [[usable protocols: OXM,NXM+table_id
390 chosen protocol: NXM+table_id
391 NXT_FLOW_MOD: ADD table:255 tcp,tp_src=123 actions=FLOOD
392 NXT_FLOW_MOD: ADD table:255 in_port=LOCAL,dl_vlan=9,dl_src=00:0a:e4:25:6b:b0 actions=drop
393 NXT_FLOW_MOD: ADD table:255 pkt_mark=0xbb actions=load:0xaa->NXM_NX_PKT_MARK[]
394 NXT_FLOW_MOD: ADD table:255 udp,dl_vlan_pcp=7 idle:5 actions=strip_vlan,output:0
395 NXT_FLOW_MOD: ADD table:255 tcp,nw_src=192.168.0.3,tp_dst=80 actions=set_queue:37,output:1
396 NXT_FLOW_MOD: ADD table:255 udp,nw_src=192.168.0.3,tp_dst=53 actions=pop_queue,output:1
397 NXT_FLOW_MOD: ADD table:255 priority=60000 cookie:0x123456789abcdef hard:10 actions=CONTROLLER:65535
398 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
399 NXT_FLOW_MOD: ADD table:255 tcp,tun_id=0x1234,tp_src=0x1230/0xfff0 cookie:0x5678 actions=FLOOD
400 NXT_FLOW_MOD: ADD table:255 actions=set_tunnel:0x1234,set_tunnel64:0x9876,set_tunnel64:0x123456789
401 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])
402 NXT_FLOW_MOD: ADD table:1 actions=drop
403 NXT_FLOW_MOD: ADD table:255 tun_id=0x1234000056780000/0xffff0000ffff0000 actions=drop
404 NXT_FLOW_MOD: ADD table:255 metadata=0x1234000056780000/0xffff0000ffff0000 actions=drop
405 NXT_FLOW_MOD: ADD table:255 actions=bundle(eth_src,50,active_backup,ofport,slaves:1)
406 NXT_FLOW_MOD: ADD table:255 actions=bundle(symmetric_l4,60,hrw,ofport,slaves:2,3)
407 NXT_FLOW_MOD: ADD table:255 actions=bundle(symmetric_l4,60,hrw,ofport,slaves:)
408 NXT_FLOW_MOD: ADD table:255 actions=output:1,bundle(eth_src,0,hrw,ofport,slaves:1),output:2
409 NXT_FLOW_MOD: ADD table:255 actions=bundle_load(eth_src,50,active_backup,ofport,NXM_NX_REG0[],slaves:1)
410 NXT_FLOW_MOD: ADD table:255 actions=bundle_load(symmetric_l4,60,hrw,ofport,NXM_NX_REG0[0..15],slaves:2,3)
411 NXT_FLOW_MOD: ADD table:255 actions=bundle_load(symmetric_l4,60,hrw,ofport,NXM_NX_REG0[0..15],slaves:2,3)
412 NXT_FLOW_MOD: ADD table:255 actions=bundle_load(symmetric_l4,60,hrw,ofport,NXM_NX_REG0[0..30],slaves:)
413 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
414 NXT_FLOW_MOD: ADD table:255 actions=resubmit:1,resubmit:2,resubmit(,3),resubmit(2,3)
415 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
416 NXT_FLOW_MOD: ADD table:255 check_overlap actions=output:1,exit,output:2
417 NXT_FLOW_MOD: ADD table:255 tcp actions=fin_timeout(idle_timeout=5,hard_timeout=15)
418 NXT_FLOW_MOD: ADD table:255 actions=controller(reason=invalid_ttl,max_len=123,id=555)
419 NXT_FLOW_MOD: ADD table:255 actions=sample(probability=12345,collector_set_id=23456,obs_domain_id=34567,obs_point_id=45678)
420 NXT_FLOW_MOD: ADD table:255 ip actions=ct(commit,zone=5)
421 NXT_FLOW_MOD: ADD table:255 ip actions=ct(commit,exec(load:0x1->NXM_NX_CT_MARK[]))
422 NXT_FLOW_MOD: ADD table:255 ip actions=ct(commit,exec(load:0x1->NXM_NX_CT_LABEL[0..63],load:0->NXM_NX_CT_LABEL[64..127]))
423 NXT_FLOW_MOD: ADD table:255 ip actions=ct(commit,exec(load:0x1234567890abcdef->NXM_NX_CT_LABEL[32..95]))
424 NXT_FLOW_MOD: ADD table:255 ip actions=ct(commit,exec(load:0x1->NXM_NX_CT_LABEL[0..63],load:0->NXM_NX_CT_LABEL[64..127]))
425 NXT_FLOW_MOD: ADD table:255 ct_state=+trk,ct_label=0x1234567890abcdef12345678,ip actions=ct(commit)
429 AT_SETUP([ovs-ofctl -F nxm parse-flows])
430 AT_DATA([flows.txt], [
432 tcp,tp_src=123,actions=flood
433 in_port=LOCAL dl_vlan=9 dl_src=00:0A:E4:25:6B:B0 actions=drop
434 arp,dl_src=00:0A:E4:25:6B:B0,arp_sha=00:0A:E4:25:6B:B0 actions=drop
435 ipv6,ipv6_label=0x12345 actions=2
436 ipv6,ipv6_src=2001:db8:3c4d:1:2:3:4:5 actions=3
437 ipv6,ipv6_src=2001:db8:3c4d:1:2:3:4:5/64 actions=4
438 ipv6,ipv6_dst=2001:db8:3c4d:1:2:3:4:5/127 actions=5
439 tcp6,ipv6_src=2001:db8:3c4d:1::1,tp_dst=80 actions=drop
440 udp6,ipv6_src=2001:db8:3c4d:1::3,tp_dst=53 actions=drop
441 in_port=3 icmp6,ipv6_src=2001:db8:3c4d:1::1,icmp_type=134 actions=drop
442 udp dl_vlan_pcp=7 idle_timeout=5 actions=strip_vlan output:0
443 tcp,nw_src=192.168.0.3,tp_dst=80 actions=set_queue:37,output:1
444 udp,nw_src=192.168.0.3,tp_dst=53 actions=pop_queue,output:1
445 icmp6,icmp_type=135,nd_target=FEC0::1234:F045:8FFF:1111:FE4E:0571 actions=drop
446 icmp6,icmp_type=135,nd_target=FEC0::1234:F045:8FFF:1111:FE4F:0571/112 actions=drop
447 icmp6,icmp_type=135,nd_sll=00:0A:E4:25:6B:B0 actions=drop
448 icmp6,icmp_type=136,nd_target=FEC0::1234:F045:8FFF:1111:FE4E:0571,nd_tll=00:0A:E4:25:6B:B1 actions=drop
449 icmp6,icmp_type=136,nd_target=FEC0::1234:F045:8FFF:1111:FE00:0000/96,nd_tll=00:0A:E4:25:6B:B1 actions=drop
450 cookie=0x123456789abcdef hard_timeout=10 priority=60000 actions=controller
451 actions=note:41.42.43,note:00.01.02.03.04.05.06.07,note
452 tun_id=0x1234,cookie=0x5678,actions=flood
454 tun_id=0x1234000056780000/0xffff0000ffff0000,actions=drop
455 dl_dst=01:00:00:00:00:00/01:00:00:00:00:00,actions=drop
456 dl_dst=00:00:00:00:00:00/01:00:00:00:00:00,actions=drop
457 dl_dst=aa:bb:cc:dd:ee:ff/fe:ff:ff:ff:ff:ff,actions=drop
458 dl_dst=aa:bb:cc:dd:ee:ff/00:00:00:00:00:00,actions=drop
459 actions=sample(probability=12345,collector_set_id=23456,obs_domain_id=34567,obs_point_id=45678)
460 ip,actions=ct(commit,zone=5)
461 ip,actions=ct(commit,exec(load(1->NXM_NX_CT_MARK[[]])))
462 ip,actions=ct(commit,exec(load(0x1->NXM_NX_CT_LABEL[[]])))
464 AT_CHECK([ovs-ofctl -F nxm parse-flows flows.txt], [0], [stdout])
465 AT_CHECK([[sed 's/ (xid=0x[0-9a-fA-F]*)//' stdout]], [0], [dnl
466 usable protocols: NXM,OXM
467 chosen protocol: NXM-table_id
468 NXT_FLOW_MOD: ADD tcp,tp_src=123 actions=FLOOD
469 NXT_FLOW_MOD: ADD in_port=LOCAL,dl_vlan=9,dl_src=00:0a:e4:25:6b:b0 actions=drop
470 NXT_FLOW_MOD: ADD arp,dl_src=00:0a:e4:25:6b:b0,arp_sha=00:0a:e4:25:6b:b0 actions=drop
471 NXT_FLOW_MOD: ADD ipv6,ipv6_label=0x12345 actions=output:2
472 NXT_FLOW_MOD: ADD ipv6,ipv6_src=2001:db8:3c4d:1:2:3:4:5 actions=output:3
473 NXT_FLOW_MOD: ADD ipv6,ipv6_src=2001:db8:3c4d:1::/64 actions=output:4
474 NXT_FLOW_MOD: ADD ipv6,ipv6_dst=2001:db8:3c4d:1:2:3:4:4/127 actions=output:5
475 NXT_FLOW_MOD: ADD tcp6,ipv6_src=2001:db8:3c4d:1::1,tp_dst=80 actions=drop
476 NXT_FLOW_MOD: ADD udp6,ipv6_src=2001:db8:3c4d:1::3,tp_dst=53 actions=drop
477 NXT_FLOW_MOD: ADD icmp6,in_port=3,ipv6_src=2001:db8:3c4d:1::1,icmp_type=134 actions=drop
478 NXT_FLOW_MOD: ADD udp,dl_vlan_pcp=7 idle:5 actions=strip_vlan,output:0
479 NXT_FLOW_MOD: ADD tcp,nw_src=192.168.0.3,tp_dst=80 actions=set_queue:37,output:1
480 NXT_FLOW_MOD: ADD udp,nw_src=192.168.0.3,tp_dst=53 actions=pop_queue,output:1
481 NXT_FLOW_MOD: ADD icmp6,icmp_type=135,nd_target=fec0:0:1234:f045:8fff:1111:fe4e:571 actions=drop
482 NXT_FLOW_MOD: ADD icmp6,icmp_type=135,nd_target=fec0:0:1234:f045:8fff:1111:fe4f:0/112 actions=drop
483 NXT_FLOW_MOD: ADD icmp6,icmp_type=135,nd_sll=00:0a:e4:25:6b:b0 actions=drop
484 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
485 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
486 NXT_FLOW_MOD: ADD priority=60000 cookie:0x123456789abcdef hard:10 actions=CONTROLLER:65535
487 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
488 NXT_FLOW_MOD: ADD tun_id=0x1234 cookie:0x5678 actions=FLOOD
489 NXT_FLOW_MOD: ADD actions=drop
490 NXT_FLOW_MOD: ADD tun_id=0x1234000056780000/0xffff0000ffff0000 actions=drop
491 NXT_FLOW_MOD: ADD dl_dst=01:00:00:00:00:00/01:00:00:00:00:00 actions=drop
492 NXT_FLOW_MOD: ADD dl_dst=00:00:00:00:00:00/01:00:00:00:00:00 actions=drop
493 NXT_FLOW_MOD: ADD dl_dst=aa:bb:cc:dd:ee:ff/fe:ff:ff:ff:ff:ff actions=drop
494 NXT_FLOW_MOD: ADD actions=drop
495 NXT_FLOW_MOD: ADD actions=sample(probability=12345,collector_set_id=23456,obs_domain_id=34567,obs_point_id=45678)
496 NXT_FLOW_MOD: ADD ip actions=ct(commit,zone=5)
497 NXT_FLOW_MOD: ADD ip actions=ct(commit,exec(load:0x1->NXM_NX_CT_MARK[[]]))
498 NXT_FLOW_MOD: ADD ip actions=ct(commit,exec(load:0x1->NXM_NX_CT_LABEL[[0..63]],load:0->NXM_NX_CT_LABEL[[64..127]]))
502 AT_SETUP([ovs-ofctl -F nxm -mmm parse-flows])
503 AT_DATA([flows.txt], [[
505 tcp,tp_src=123,actions=flood
506 in_port=LOCAL dl_vlan=9 dl_src=00:0A:E4:25:6B:B0 actions=drop
507 arp,dl_src=00:0A:E4:25:6B:B0,arp_sha=00:0A:E4:25:6B:B0 actions=drop
508 ipv6,ipv6_label=0x12345 actions=2
509 ipv6,ipv6_src=2001:db8:3c4d:1:2:3:4:5 actions=3
510 ipv6,ipv6_src=2001:db8:3c4d:1:2:3:4:5/64 actions=4
511 ipv6,ipv6_dst=2001:db8:3c4d:1:2:3:4:5/127 actions=5
512 tcp6,ipv6_src=2001:db8:3c4d:1::1,tp_dst=80 actions=drop
513 udp6,ipv6_src=2001:db8:3c4d:1::3,tp_dst=53 actions=drop
514 sctp6,ipv6_src=2001:db8:3c4d:1::5,tp_dst=309 actions=drop
515 in_port=3 icmp6,ipv6_src=2001:db8:3c4d:1::1,icmp_type=134 actions=drop
516 udp dl_vlan_pcp=7 idle_timeout=5 actions=strip_vlan output:0
517 tcp,nw_src=192.168.0.3,tp_dst=80 actions=set_queue:37,output:1
518 udp,nw_src=192.168.0.3,tp_dst=53 actions=pop_queue,output:1
519 sctp,nw_src=192.168.0.3,tp_dst=309 actions=pop_queue,output:1
520 icmp6,icmp_type=135,nd_target=FEC0::1234:F045:8FFF:1111:FE4E:0571 actions=drop
521 icmp6,icmp_type=135,nd_sll=00:0A:E4:25:6B:B0 actions=drop
522 icmp6,icmp_type=136,nd_target=FEC0::1234:F045:8FFF:1111:FE4E:0571,nd_tll=00:0A:E4:25:6B:B1 actions=drop
523 cookie=0x123456789abcdef hard_timeout=10 priority=60000 actions=controller
524 actions=note:41.42.43,note:00.01.02.03.04.05.06.07,note
525 tun_id=0x1234,cookie=0x5678,actions=flood
527 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[]
528 actions=move:OXM_OF_ETH_DST[]->OXM_OF_ETH_SRC[]
529 actions=push:NXM_NX_REG0[0..31],pop:NXM_NX_REG0[]
530 vlan_tci=0x1123/0x1fff,actions=drop
531 actions=sample(probability=12345,collector_set_id=23456,obs_domain_id=34567,obs_point_id=45678)
532 ip,actions=ct(commit,zone=5)
533 ip,actions=ct(commit,exec(load(1->NXM_NX_CT_MARK[])))
534 ip,actions=ct(commit,exec(load(1->NXM_NX_CT_LABEL[])))
535 ip,actions=ct(commit,exec(set_field(1->ct_label)))
537 AT_CHECK([ovs-ofctl -F nxm -mmm parse-flows flows.txt], [0], [stdout], [stderr])
538 AT_CHECK([[sed 's/ (xid=0x[0-9a-fA-F]*)//' stdout]], [0],
539 [[usable protocols: NXM,OXM
540 chosen protocol: NXM-table_id
541 NXT_FLOW_MOD: ADD NXM_OF_ETH_TYPE(0800), NXM_OF_IP_PROTO(06), NXM_OF_TCP_SRC(007b) actions=FLOOD
542 NXT_FLOW_MOD: ADD NXM_OF_IN_PORT(fffe), NXM_OF_ETH_SRC(000ae4256bb0), NXM_OF_VLAN_TCI_W(1009/1fff) actions=drop
543 NXT_FLOW_MOD: ADD NXM_OF_ETH_SRC(000ae4256bb0), NXM_OF_ETH_TYPE(0806), NXM_NX_ARP_SHA(000ae4256bb0) actions=drop
544 NXT_FLOW_MOD: ADD NXM_OF_ETH_TYPE(86dd), NXM_NX_IPV6_LABEL(00012345) actions=output:2
545 NXT_FLOW_MOD: ADD NXM_OF_ETH_TYPE(86dd), NXM_NX_IPV6_SRC(20010db83c4d00010002000300040005) actions=output:3
546 NXT_FLOW_MOD: ADD NXM_OF_ETH_TYPE(86dd), NXM_NX_IPV6_SRC_W(20010db83c4d00010000000000000000/ffffffffffffffff0000000000000000) actions=output:4
547 NXT_FLOW_MOD: ADD NXM_OF_ETH_TYPE(86dd), NXM_NX_IPV6_DST_W(20010db83c4d00010002000300040004/fffffffffffffffffffffffffffffffe) actions=output:5
548 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
549 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
550 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
551 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
552 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
553 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
554 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
555 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
556 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
557 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
558 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
559 NXT_FLOW_MOD: ADD <any> cookie:0x123456789abcdef hard:10 pri:60000 actions=CONTROLLER:65535
560 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
561 NXT_FLOW_MOD: ADD NXM_NX_TUN_ID(0000000000001234) cookie:0x5678 actions=FLOOD
562 NXT_FLOW_MOD: ADD <any> actions=drop
563 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[]
564 NXT_FLOW_MOD: ADD <any> actions=move:NXM_OF_ETH_DST[]->NXM_OF_ETH_SRC[]
565 NXT_FLOW_MOD: ADD <any> actions=push:NXM_NX_REG0[],pop:NXM_NX_REG0[]
566 NXT_FLOW_MOD: ADD NXM_OF_VLAN_TCI_W(1123/1fff) actions=drop
567 NXT_FLOW_MOD: ADD <any> actions=sample(probability=12345,collector_set_id=23456,obs_domain_id=34567,obs_point_id=45678)
568 NXT_FLOW_MOD: ADD NXM_OF_ETH_TYPE(0800) actions=ct(commit,zone=5)
569 NXT_FLOW_MOD: ADD NXM_OF_ETH_TYPE(0800) actions=ct(commit,exec(load:0x1->NXM_NX_CT_MARK[]))
570 NXT_FLOW_MOD: ADD NXM_OF_ETH_TYPE(0800) actions=ct(commit,exec(load:0x1->NXM_NX_CT_LABEL[0..63],load:0->NXM_NX_CT_LABEL[64..127]))
571 NXT_FLOW_MOD: ADD NXM_OF_ETH_TYPE(0800) actions=ct(commit,exec(load:0x1->NXM_NX_CT_LABEL[0..63],load:0->NXM_NX_CT_LABEL[64..127]))
575 AT_SETUP([ovs-ofctl parse-nx-match])
576 AT_KEYWORDS([nx-match])
577 AT_DATA([nx-match.txt], [dnl
585 NXM_OF_ETH_DST(0002e30f80a4)
586 NXM_OF_ETH_DST_W(010000000000/010000000000)
587 NXM_OF_ETH_DST_W(000000000000/010000000000)
588 NXM_OF_ETH_DST_W(ffffffffffff/010000000000)
589 NXM_OF_ETH_DST_W(0002e30f80a4/ffffffffffff)
590 NXM_OF_ETH_DST_W(60175619848f/000000000000)
591 NXM_OF_ETH_DST_W(0002e30f80a4/feffffffffff)
592 NXM_OF_ETH_DST_W(60175619848f/5a5a5a5a5a5a)
595 NXM_OF_ETH_SRC(020898456ddb)
596 NXM_OF_ETH_SRC_W(012345abcdef/ffffff555555)
597 NXM_OF_ETH_SRC_W(020898456ddb/ffffffffffff)
598 NXM_OF_ETH_SRC_W(020898456ddb/000000000000)
601 NXM_OF_ETH_TYPE(0800)
602 NXM_OF_ETH_TYPE(0800) NXM_OF_IN_PORT(0012)
605 NXM_OF_VLAN_TCI(f009)
606 NXM_OF_VLAN_TCI(f009) NXM_OF_VLAN_TCI(f009)
607 NXM_OF_VLAN_TCI(0000) # Packets without 802.1Q header.
608 NXM_OF_VLAN_TCI(3123) # Packets with VID=123, PCP=1.
609 NXM_OF_VLAN_TCI(0123) # Does not make sense (but supported anyway)
610 NXM_OF_VLAN_TCI_W(1123/1fff) # Packets with VID=123, any PCP.
611 NXM_OF_VLAN_TCI_W(1123/ffff) # Packets with VID=123, PCP=0
612 NXM_OF_VLAN_TCI_W(1123/0000) # Packets with or without 802.1Q header
613 NXM_OF_VLAN_TCI_W(f000/f000) # Packets with any VID, PCP=7.
614 NXM_OF_VLAN_TCI_W(0000/e000) # No 802.1Q or with VID=0
617 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_TOS(f0)
618 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_TOS(41)
622 NXM_OF_ETH_TYPE(0800) NXM_NX_IP_ECN(03)
623 NXM_OF_ETH_TYPE(0800) NXM_NX_IP_ECN(06)
627 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_PROTO(01)
628 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_PROTO(05)
632 NXM_OF_ETH_TYPE(0800) NXM_NX_IP_TTL(80)
633 NXM_OF_ETH_TYPE(86dd) NXM_NX_IP_TTL(ff)
637 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_SRC(ac100014)
638 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_SRC_W(C0a80000/FFFF0000)
639 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_SRC_W(C0a80000/5a5a5a5a)
640 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_SRC_W(C0a80000/ffffffff)
641 NXM_OF_ETH_TYPE(0806) NXM_OF_IP_SRC(ac100014)
642 NXM_OF_IP_SRC_W(C0D80000/FFFF0000)
645 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_DST(ac100014)
646 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_DST_W(C0a88012/FFFF0000)
647 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_DST_W(C0a80000/5a5a5a5a)
648 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_DST_W(C0a80000/ffffffff)
649 NXM_OF_IP_DST(ac100014)
650 NXM_OF_ETH_TYPE(0806) NXM_OF_IP_DST_W(C0D80000/FFFF0000)
653 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_PROTO(06) NXM_OF_TCP_SRC(4231)
654 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_PROTO(06) NXM_OF_TCP_SRC_W(5050/F0F0)
655 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_PROTO(06) NXM_OF_TCP_SRC_W(5050/ffff)
656 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_PROTO(07) NXM_OF_TCP_SRC(4231)
658 # TCP destination port
659 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_PROTO(06) NXM_OF_TCP_DST(4231)
660 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_PROTO(06) NXM_OF_TCP_DST_W(FDE0/FFF0)
661 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_PROTO(06) NXM_OF_TCP_DST_W(FDE0/ffff)
662 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_PROTO(07) NXM_OF_TCP_DST(4231)
665 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_PROTO(06) NXM_NX_TCP_FLAGS(0131)
666 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_PROTO(06) NXM_NX_TCP_FLAGS_W(00F0/0FF0)
667 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_PROTO(06) NXM_NX_TCP_FLAGS_W(01E2/ffff)
668 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_PROTO(07) NXM_NX_TCP_FLAGS(0fff)
671 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_PROTO(11) NXM_OF_UDP_SRC(8732)
672 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_PROTO(11) NXM_OF_UDP_SRC_W(0132/01FF)
673 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_PROTO(11) NXM_OF_UDP_SRC_W(0132/ffff)
674 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_PROTO(06) NXM_OF_UDP_SRC(7823)
676 # UDP destination port
677 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_PROTO(11) NXM_OF_UDP_DST(1782)
678 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_PROTO(11) NXM_OF_UDP_DST_W(5005/F00F)
679 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_PROTO(11) NXM_OF_UDP_DST_W(5005/FFFF)
680 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_PROTO(02) NXM_OF_UDP_DST(1293)
683 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_PROTO(01) NXM_OF_ICMP_TYPE(12)
684 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_PROTO(00) NXM_OF_ICMP_TYPE(10)
687 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_PROTO(01) NXM_OF_ICMP_CODE(12)
688 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_PROTO(00) NXM_OF_ICMP_CODE(10)
689 NXM_OF_ETH_TYPE(0800) NXM_OF_ICMP_CODE(10)
693 NXM_OF_ETH_TYPE(0806) NXM_OF_ARP_OP(0001)
694 NXM_OF_ETH_TYPE(0806) NXM_OF_ARP_OP(1111)
695 NXM_OF_ETH_TYPE(0000) NXM_OF_ARP_OP(0001)
697 NXM_OF_ETH_TYPE(0806) NXM_OF_ARP_OP(0001) NXM_OF_ARP_OP(0001)
699 # ARP source protocol address
700 NXM_OF_ETH_TYPE(0806) NXM_OF_ARP_SPA(ac100014)
701 NXM_OF_ETH_TYPE(0806) NXM_OF_ARP_SPA_W(C0a81234/FFFFFF00)
702 NXM_OF_ETH_TYPE(0806) NXM_OF_ARP_SPA_W(C0a81234/aaaaaa00)
703 NXM_OF_ETH_TYPE(0806) NXM_OF_ARP_SPA_W(C0a81234/ffffffff)
704 NXM_OF_ETH_TYPE(0800) NXM_OF_ARP_SPA(ac100014)
705 NXM_OF_ARP_SPA_W(C0D80000/FFFF0000)
707 # ARP destination protocol address
708 NXM_OF_ETH_TYPE(0806) NXM_OF_ARP_TPA(ac100014)
709 NXM_OF_ETH_TYPE(0806) NXM_OF_ARP_TPA_W(C0a812fe/FFFFFF00)
710 NXM_OF_ETH_TYPE(0806) NXM_OF_ARP_TPA_W(C0a81234/77777777)
711 NXM_OF_ETH_TYPE(0806) NXM_OF_ARP_TPA_W(C0a81234/ffffffff)
712 NXM_OF_ETH_TYPE(0800) NXM_OF_ARP_TPA(ac100014)
713 NXM_OF_ARP_TPA_W(C0D80000/FFFF0000)
715 # ARP source hardware address
716 NXM_OF_ETH_TYPE(0806) NXM_NX_ARP_SHA(0002e30f80a4)
717 NXM_OF_ETH_TYPE(0800) NXM_NX_ARP_SHA(0002e30f80a4)
718 NXM_NX_ARP_SHA(0002e30f80a4)
720 # ARP destination hardware address
721 NXM_OF_ETH_TYPE(0806) NXM_NX_ARP_THA(0002e30f80a4)
722 NXM_OF_ETH_TYPE(0800) NXM_NX_ARP_THA(0002e30f80a4)
723 NXM_NX_ARP_THA(0002e30f80a4)
726 NXM_OF_ETH_TYPE(8035) NXM_OF_ARP_OP(0003)
727 NXM_OF_ETH_TYPE(8035) NXM_OF_ARP_OP(1111)
728 NXM_OF_ETH_TYPE(0000) NXM_OF_ARP_OP(0003)
730 NXM_OF_ETH_TYPE(8035) NXM_OF_ARP_OP(0003) NXM_OF_ARP_OP(0003)
732 # RARP source protocol address
733 NXM_OF_ETH_TYPE(8035) NXM_OF_ARP_SPA(ac100014)
734 NXM_OF_ETH_TYPE(8035) NXM_OF_ARP_SPA_W(C0a81200/FFFFFF00)
735 NXM_OF_ETH_TYPE(8035) NXM_OF_ARP_SPA_W(C0a81234/aaaaaa00)
736 NXM_OF_ETH_TYPE(8035) NXM_OF_ARP_SPA_W(C0a81234/ffffffff)
737 NXM_OF_ETH_TYPE(0800) NXM_OF_ARP_SPA(ac100014)
738 NXM_OF_ARP_SPA_W(C0D80000/FFFF0000)
740 # RARP destination protocol address
741 NXM_OF_ETH_TYPE(8035) NXM_OF_ARP_TPA(ac100014)
742 NXM_OF_ETH_TYPE(8035) NXM_OF_ARP_TPA_W(C0a81200/FFFFFF00)
743 NXM_OF_ETH_TYPE(8035) NXM_OF_ARP_TPA_W(C0a81234/77777777)
744 NXM_OF_ETH_TYPE(8035) NXM_OF_ARP_TPA_W(C0a81234/ffffffff)
745 NXM_OF_ETH_TYPE(0800) NXM_OF_ARP_TPA(ac100014)
746 NXM_OF_ARP_TPA_W(C0D80000/FFFF0000)
748 # RARP source hardware address
749 NXM_OF_ETH_TYPE(8035) NXM_NX_ARP_SHA(0002e30f80a4)
750 NXM_OF_ETH_TYPE(0800) NXM_NX_ARP_SHA(0002e30f80a4)
751 NXM_NX_ARP_SHA(0002e30f80a4)
753 # RARP destination hardware address
754 NXM_OF_ETH_TYPE(8035) NXM_NX_ARP_THA(0002e30f80a4)
755 NXM_OF_ETH_TYPE(0800) NXM_NX_ARP_THA(0002e30f80a4)
756 NXM_NX_ARP_THA(0002e30f80a4)
759 NXM_OF_ETH_TYPE(86dd) NXM_NX_IPV6_SRC(20010db83c4d00010002000300040005)
760 NXM_OF_ETH_TYPE(0800) NXM_NX_IPV6_SRC(20010db83c4d00010002000300040005)
761 NXM_OF_ETH_TYPE(86dd) NXM_NX_IPV6_SRC_W(20010db83c4d00010000000000000000/ffffffffffffffff0000000000000000)
762 NXM_OF_ETH_TYPE(86dd) NXM_NX_IPV6_SRC_W(20010db83c4d00010000000000000000/5a5a5a5a5a5a5a5a0000000000000000)
763 NXM_OF_ETH_TYPE(86dd) NXM_NX_IPV6_SRC_W(20010db83c4d00010000000000000000/ffffffffffffffffffffffffffffffff)
764 NXM_OF_ETH_TYPE(86dd) NXM_NX_IPV6_SRC_W(20010db83c4d00010000000000000000/00000000000000000000000000000000)
765 NXM_OF_ETH_TYPE(0800) NXM_NX_IPV6_SRC_W(20010db83c4d00010000000000000000/ffffffffffffffffffff000000000000)
768 NXM_OF_ETH_TYPE(86dd) NXM_NX_IPV6_DST(20010db83c4d00010002000300040005)
769 NXM_OF_ETH_TYPE(0800) NXM_NX_IPV6_DST(20010db83c4d00010002000300040005)
770 NXM_OF_ETH_TYPE(86dd) NXM_NX_IPV6_DST_W(20010db83c4d00010000000000000000/77777777777777777777777777777777)
771 NXM_OF_ETH_TYPE(86dd) NXM_NX_IPV6_DST_W(20010db83c4d00010000000000000000/ffffffffffffffffffffffffffffffff)
772 NXM_OF_ETH_TYPE(86dd) NXM_NX_IPV6_DST_W(00000000000000000000000000000000/00000000000000000000000000000000)
773 NXM_OF_ETH_TYPE(0800) NXM_NX_IPV6_DST_W(20010db83c4d00010000000000000000/ffffffffffffffff0000000000000000)
776 NXM_OF_ETH_TYPE(86dd) NXM_NX_IPV6_LABEL(1000000f)
777 NXM_NX_IPV6_LABEL(0000000f)
778 NXM_OF_ETH_TYPE(86dd) NXM_NX_IPV6_LABEL(0000000f)
781 NXM_OF_ETH_TYPE(86dd) NXM_OF_IP_PROTO(3a) NXM_NX_ICMPV6_TYPE(87) NXM_NX_ND_TARGET(20010db83c4d00010002000300040005)
782 NXM_OF_ETH_TYPE(86dd) NXM_OF_IP_PROTO(3a) NXM_NX_ICMPV6_TYPE(88) NXM_NX_ND_TARGET(20010db83c4d00010002000300040005)
783 NXM_OF_ETH_TYPE(86dd) NXM_OF_IP_PROTO(3a) NXM_NX_ICMPV6_TYPE(87) NXM_NX_ND_TARGET_W(20010db83c4d00010002000300040005/0123456789abcdeffedcba9876543210)
784 NXM_OF_ETH_TYPE(86dd) NXM_OF_IP_PROTO(3a) NXM_NX_ICMPV6_TYPE(87) NXM_NX_ND_TARGET_W(20010db83c4d00010002000300040005/ffffffffffffffffffffffffffffffff)
785 NXM_OF_ETH_TYPE(86dd) NXM_OF_IP_PROTO(3a) NXM_NX_ICMPV6_TYPE(87) NXM_NX_ND_TARGET_W(00000000000000000000000000000000/00000000000000000000000000000000)
786 NXM_OF_ETH_TYPE(86dd) NXM_OF_IP_PROTO(3a) NXM_NX_ICMPV6_TYPE(88) NXM_NX_ND_TARGET_W(20010db83c4d00010002000300040005/fedcba98765432100123456789abcdef)
788 # ND source hardware address
789 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)
790 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)
791 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)
792 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)
794 # ND destination hardware address
795 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)
796 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)
797 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)
798 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)
801 NXM_OF_ETH_TYPE(0800) NXM_NX_IP_FRAG(00)
802 NXM_OF_ETH_TYPE(0800) NXM_NX_IP_FRAG(01)
803 NXM_OF_ETH_TYPE(0800) NXM_NX_IP_FRAG(02)
804 NXM_OF_ETH_TYPE(0800) NXM_NX_IP_FRAG(03)
805 NXM_OF_ETH_TYPE(0800) NXM_NX_IP_FRAG_W(00/03)
806 NXM_OF_ETH_TYPE(0800) NXM_NX_IP_FRAG_W(00/fd)
807 NXM_OF_ETH_TYPE(0800) NXM_NX_IP_FRAG_W(00/02)
808 NXM_OF_ETH_TYPE(0800) NXM_NX_IP_FRAG_W(01/01)
809 NXM_OF_ETH_TYPE(0800) NXM_NX_IP_FRAG_W(02/02)
810 NXM_OF_ETH_TYPE(0800) NXM_NX_IP_FRAG_W(03/03)
811 NXM_OF_ETH_TYPE(0800) NXM_NX_IP_FRAG_W(03/ff)
812 NXM_OF_ETH_TYPE(0800) NXM_NX_IP_FRAG_W(03/00)
813 NXM_OF_ETH_TYPE(0800) NXM_NX_IP_FRAG(f3)
816 NXM_OF_ETH_TYPE(86dd) NXM_NX_IP_FRAG(00)
817 NXM_OF_ETH_TYPE(86dd) NXM_NX_IP_FRAG(01)
818 NXM_OF_ETH_TYPE(86dd) NXM_NX_IP_FRAG(02)
819 NXM_OF_ETH_TYPE(86dd) NXM_NX_IP_FRAG(03)
820 NXM_OF_ETH_TYPE(86dd) NXM_NX_IP_FRAG_W(00/03)
821 NXM_OF_ETH_TYPE(86dd) NXM_NX_IP_FRAG_W(00/01)
822 NXM_OF_ETH_TYPE(86dd) NXM_NX_IP_FRAG_W(00/02)
823 NXM_OF_ETH_TYPE(86dd) NXM_NX_IP_FRAG_W(01/01)
824 NXM_OF_ETH_TYPE(86dd) NXM_NX_IP_FRAG_W(02/02)
825 NXM_OF_ETH_TYPE(86dd) NXM_NX_IP_FRAG_W(03/03)
826 NXM_OF_ETH_TYPE(86dd) NXM_NX_IP_FRAG_W(03/00)
827 NXM_OF_ETH_TYPE(86dd) NXM_NX_IP_FRAG_W(03/ff)
828 NXM_OF_ETH_TYPE(86dd) NXM_NX_IP_FRAG(f3)
831 NXM_NX_COOKIE(00000000abcdef01)
832 NXM_NX_COOKIE_W(84200000abcdef01/84200000FFFFFFFF)
833 NXM_NX_COOKIE_W(84200000abcdef01/ffffffffffffffff)
834 NXM_NX_COOKIE_W(0000000000000000/0000000000000000)
837 NXM_NX_TUN_ID(00000000abcdef01)
838 NXM_NX_TUN_ID_W(84200000abcdef01/84200000FFFFFFFF)
839 NXM_NX_TUN_ID_W(84200000abcdef01/FFFFFFFFFFFFFFFF)
840 NXM_NX_TUN_ID_W(0000000000000000/0000000000000000)
843 NXM_NX_REG0(acebdf56)
844 NXM_NX_REG0_W(a0e0d050/f0f0f0f0)
845 NXM_NX_REG0_W(a0e0d050/ffffffff)
846 NXM_NX_REG0_W(00000000/00000000)
848 # Connection tracking fields,
849 NXM_OF_ETH_TYPE(0800) NXM_NX_CT_STATE(00000020)
850 NXM_OF_ETH_TYPE(0800) NXM_NX_CT_STATE(00001080)
851 NXM_OF_ETH_TYPE(0800) NXM_NX_CT_STATE_W(00000020/00000020)
852 NXM_OF_ETH_TYPE(0800) NXM_NX_CT_STATE_W(00000020/000000F0)
853 NXM_OF_ETH_TYPE(0800) NXM_NX_CT_ZONE(5a5a)
854 NXM_OF_ETH_TYPE(0800) NXM_NX_CT_MARK(5a5a5a5a)
855 NXM_OF_ETH_TYPE(0800) NXM_NX_CT_MARK_W(5a5a5a5a/fefefefe)
856 NXM_OF_ETH_TYPE(0800) NXM_NX_CT_LABEL(1234567890abcdef1234567890abcdef)
857 NXM_OF_ETH_TYPE(0800) NXM_NX_CT_LABEL_W(10203040506070809000a0b0c0d0e0f0/f1f2f3f4f5f6f7f8f9f0fafbfcfdfeff)
859 # dp_hash (testing experimenter OXM).
860 NXM_NX_DP_HASH(01234567)
861 NXOXM_ET_DP_HASH(01234567)
863 # Invalid field number.
866 # Invalid field numbers (experimenter OXM).
867 ffff020800002320(11112222)
868 ffff030800002320(1111/3333)
870 # Unimplemented registers.
872 # This test assumes that at least two registers, but fewer than 16,
873 # registers are implemented.
875 00010108(12345678/12345678)
877 00011f08(12345678/12345678)
879 AT_CHECK([ovs-ofctl -vPATTERN:'console:%c|%p|%m' --strict parse-nx-match < nx-match.txt], [0], [dnl
887 NXM_OF_ETH_DST(0002e30f80a4)
888 NXM_OF_ETH_DST_W(010000000000/010000000000)
889 NXM_OF_ETH_DST_W(000000000000/010000000000)
890 nx_pull_match() returned error OFPBMC_BAD_WILDCARDS
891 NXM_OF_ETH_DST(0002e30f80a4)
892 nx_pull_match() returned error OFPBMC_BAD_WILDCARDS
893 NXM_OF_ETH_DST_W(0002e30f80a4/feffffffffff)
894 nx_pull_match() returned error OFPBMC_BAD_WILDCARDS
897 NXM_OF_ETH_SRC(020898456ddb)
898 nx_pull_match() returned error OFPBMC_BAD_WILDCARDS
899 NXM_OF_ETH_SRC(020898456ddb)
900 nx_pull_match() returned error OFPBMC_BAD_WILDCARDS
903 NXM_OF_ETH_TYPE(0800)
904 NXM_OF_IN_PORT(0012), NXM_OF_ETH_TYPE(0800)
907 NXM_OF_VLAN_TCI(f009)
908 nx_pull_match() returned error OFPBMC_DUP_FIELD
909 NXM_OF_VLAN_TCI(0000)
910 NXM_OF_VLAN_TCI(3123)
911 NXM_OF_VLAN_TCI(0123)
912 NXM_OF_VLAN_TCI_W(1123/1fff)
913 NXM_OF_VLAN_TCI(1123)
914 nx_pull_match() returned error OFPBMC_BAD_WILDCARDS
915 NXM_OF_VLAN_TCI_W(f000/f000)
916 NXM_OF_VLAN_TCI_W(0000/e000)
919 NXM_OF_ETH_TYPE(0800), NXM_OF_IP_TOS(f0)
920 nx_pull_match() returned error OFPBMC_BAD_VALUE
921 nx_pull_match() returned error OFPBMC_BAD_PREREQ
924 NXM_OF_ETH_TYPE(0800), NXM_NX_IP_ECN(03)
925 nx_pull_match() returned error OFPBMC_BAD_VALUE
926 nx_pull_match() returned error OFPBMC_BAD_PREREQ
929 NXM_OF_ETH_TYPE(0800), NXM_OF_IP_PROTO(01)
930 NXM_OF_ETH_TYPE(0800), NXM_OF_IP_PROTO(05)
931 nx_pull_match() returned error OFPBMC_BAD_PREREQ
934 NXM_OF_ETH_TYPE(0800), NXM_NX_IP_TTL(80)
935 NXM_OF_ETH_TYPE(86dd), NXM_NX_IP_TTL(ff)
936 nx_pull_match() returned error OFPBMC_BAD_PREREQ
939 NXM_OF_ETH_TYPE(0800), NXM_OF_IP_SRC(ac100014)
940 NXM_OF_ETH_TYPE(0800), NXM_OF_IP_SRC_W(c0a80000/ffff0000)
941 nx_pull_match() returned error OFPBMC_BAD_WILDCARDS
942 NXM_OF_ETH_TYPE(0800), NXM_OF_IP_SRC(c0a80000)
943 nx_pull_match() returned error OFPBMC_BAD_PREREQ
944 nx_pull_match() returned error OFPBMC_BAD_PREREQ
947 NXM_OF_ETH_TYPE(0800), NXM_OF_IP_DST(ac100014)
948 nx_pull_match() returned error OFPBMC_BAD_WILDCARDS
949 nx_pull_match() returned error OFPBMC_BAD_WILDCARDS
950 NXM_OF_ETH_TYPE(0800), NXM_OF_IP_DST(c0a80000)
951 nx_pull_match() returned error OFPBMC_BAD_PREREQ
952 nx_pull_match() returned error OFPBMC_BAD_PREREQ
955 NXM_OF_ETH_TYPE(0800), NXM_OF_IP_PROTO(06), NXM_OF_TCP_SRC(4231)
956 NXM_OF_ETH_TYPE(0800), NXM_OF_IP_PROTO(06), NXM_OF_TCP_SRC_W(5050/f0f0)
957 NXM_OF_ETH_TYPE(0800), NXM_OF_IP_PROTO(06), NXM_OF_TCP_SRC(5050)
958 nx_pull_match() returned error OFPBMC_BAD_PREREQ
960 # TCP destination port
961 NXM_OF_ETH_TYPE(0800), NXM_OF_IP_PROTO(06), NXM_OF_TCP_DST(4231)
962 NXM_OF_ETH_TYPE(0800), NXM_OF_IP_PROTO(06), NXM_OF_TCP_DST_W(fde0/fff0)
963 NXM_OF_ETH_TYPE(0800), NXM_OF_IP_PROTO(06), NXM_OF_TCP_DST(fde0)
964 nx_pull_match() returned error OFPBMC_BAD_PREREQ
967 NXM_OF_ETH_TYPE(0800), NXM_OF_IP_PROTO(06), NXM_NX_TCP_FLAGS(0131)
968 NXM_OF_ETH_TYPE(0800), NXM_OF_IP_PROTO(06), NXM_NX_TCP_FLAGS_W(00f0/0ff0)
969 NXM_OF_ETH_TYPE(0800), NXM_OF_IP_PROTO(06), NXM_NX_TCP_FLAGS(01e2)
970 nx_pull_match() returned error OFPBMC_BAD_PREREQ
973 NXM_OF_ETH_TYPE(0800), NXM_OF_IP_PROTO(11), NXM_OF_UDP_SRC(8732)
974 NXM_OF_ETH_TYPE(0800), NXM_OF_IP_PROTO(11), NXM_OF_UDP_SRC_W(0132/01ff)
975 NXM_OF_ETH_TYPE(0800), NXM_OF_IP_PROTO(11), NXM_OF_UDP_SRC(0132)
976 nx_pull_match() returned error OFPBMC_BAD_PREREQ
978 # UDP destination port
979 NXM_OF_ETH_TYPE(0800), NXM_OF_IP_PROTO(11), NXM_OF_UDP_DST(1782)
980 NXM_OF_ETH_TYPE(0800), NXM_OF_IP_PROTO(11), NXM_OF_UDP_DST_W(5005/f00f)
981 NXM_OF_ETH_TYPE(0800), NXM_OF_IP_PROTO(11), NXM_OF_UDP_DST(5005)
982 nx_pull_match() returned error OFPBMC_BAD_PREREQ
985 NXM_OF_ETH_TYPE(0800), NXM_OF_IP_PROTO(01), NXM_OF_ICMP_TYPE(12)
986 nx_pull_match() returned error OFPBMC_BAD_PREREQ
989 NXM_OF_ETH_TYPE(0800), NXM_OF_IP_PROTO(01), NXM_OF_ICMP_CODE(12)
990 nx_pull_match() returned error OFPBMC_BAD_PREREQ
991 nx_pull_match() returned error OFPBMC_BAD_PREREQ
992 nx_pull_match() returned error OFPBMC_BAD_PREREQ
995 NXM_OF_ETH_TYPE(0806), NXM_OF_ARP_OP(0001)
996 nx_pull_match() returned error OFPBMC_BAD_VALUE
997 nx_pull_match() returned error OFPBMC_BAD_PREREQ
998 nx_pull_match() returned error OFPBMC_BAD_PREREQ
999 nx_pull_match() returned error OFPBMC_DUP_FIELD
1001 # ARP source protocol address
1002 NXM_OF_ETH_TYPE(0806), NXM_OF_ARP_SPA(ac100014)
1003 nx_pull_match() returned error OFPBMC_BAD_WILDCARDS
1004 nx_pull_match() returned error OFPBMC_BAD_WILDCARDS
1005 NXM_OF_ETH_TYPE(0806), NXM_OF_ARP_SPA(c0a81234)
1006 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1007 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1009 # ARP destination protocol address
1010 NXM_OF_ETH_TYPE(0806), NXM_OF_ARP_TPA(ac100014)
1011 nx_pull_match() returned error OFPBMC_BAD_WILDCARDS
1012 nx_pull_match() returned error OFPBMC_BAD_WILDCARDS
1013 NXM_OF_ETH_TYPE(0806), NXM_OF_ARP_TPA(c0a81234)
1014 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1015 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1017 # ARP source hardware address
1018 NXM_OF_ETH_TYPE(0806), NXM_NX_ARP_SHA(0002e30f80a4)
1019 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1020 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1022 # ARP destination hardware address
1023 NXM_OF_ETH_TYPE(0806), NXM_NX_ARP_THA(0002e30f80a4)
1024 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1025 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1028 NXM_OF_ETH_TYPE(8035), NXM_OF_ARP_OP(0003)
1029 nx_pull_match() returned error OFPBMC_BAD_VALUE
1030 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1031 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1032 nx_pull_match() returned error OFPBMC_DUP_FIELD
1034 # RARP source protocol address
1035 NXM_OF_ETH_TYPE(8035), NXM_OF_ARP_SPA(ac100014)
1036 NXM_OF_ETH_TYPE(8035), NXM_OF_ARP_SPA_W(c0a81200/ffffff00)
1037 nx_pull_match() returned error OFPBMC_BAD_WILDCARDS
1038 NXM_OF_ETH_TYPE(8035), NXM_OF_ARP_SPA(c0a81234)
1039 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1040 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1042 # RARP destination protocol address
1043 NXM_OF_ETH_TYPE(8035), NXM_OF_ARP_TPA(ac100014)
1044 NXM_OF_ETH_TYPE(8035), NXM_OF_ARP_TPA_W(c0a81200/ffffff00)
1045 nx_pull_match() returned error OFPBMC_BAD_WILDCARDS
1046 NXM_OF_ETH_TYPE(8035), NXM_OF_ARP_TPA(c0a81234)
1047 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1048 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1050 # RARP source hardware address
1051 NXM_OF_ETH_TYPE(8035), NXM_NX_ARP_SHA(0002e30f80a4)
1052 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1053 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1055 # RARP destination hardware address
1056 NXM_OF_ETH_TYPE(8035), NXM_NX_ARP_THA(0002e30f80a4)
1057 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1058 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1061 NXM_OF_ETH_TYPE(86dd), NXM_NX_IPV6_SRC(20010db83c4d00010002000300040005)
1062 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1063 NXM_OF_ETH_TYPE(86dd), NXM_NX_IPV6_SRC_W(20010db83c4d00010000000000000000/ffffffffffffffff0000000000000000)
1064 nx_pull_match() returned error OFPBMC_BAD_WILDCARDS
1065 NXM_OF_ETH_TYPE(86dd), NXM_NX_IPV6_SRC(20010db83c4d00010000000000000000)
1066 nx_pull_match() returned error OFPBMC_BAD_WILDCARDS
1067 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1070 NXM_OF_ETH_TYPE(86dd), NXM_NX_IPV6_DST(20010db83c4d00010002000300040005)
1071 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1072 nx_pull_match() returned error OFPBMC_BAD_WILDCARDS
1073 NXM_OF_ETH_TYPE(86dd), NXM_NX_IPV6_DST(20010db83c4d00010000000000000000)
1074 NXM_OF_ETH_TYPE(86dd)
1075 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1078 nx_pull_match() returned error OFPBMC_BAD_VALUE
1079 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1080 NXM_OF_ETH_TYPE(86dd), NXM_NX_IPV6_LABEL(0000000f)
1083 NXM_OF_ETH_TYPE(86dd), NXM_OF_IP_PROTO(3a), NXM_NX_ICMPV6_TYPE(87), NXM_NX_ND_TARGET(20010db83c4d00010002000300040005)
1084 NXM_OF_ETH_TYPE(86dd), NXM_OF_IP_PROTO(3a), NXM_NX_ICMPV6_TYPE(88), NXM_NX_ND_TARGET(20010db83c4d00010002000300040005)
1085 nx_pull_match() returned error OFPBMC_BAD_WILDCARDS
1086 NXM_OF_ETH_TYPE(86dd), NXM_OF_IP_PROTO(3a), NXM_NX_ICMPV6_TYPE(87), NXM_NX_ND_TARGET(20010db83c4d00010002000300040005)
1087 NXM_OF_ETH_TYPE(86dd), NXM_OF_IP_PROTO(3a), NXM_NX_ICMPV6_TYPE(87)
1088 nx_pull_match() returned error OFPBMC_BAD_WILDCARDS
1090 # ND source hardware address
1091 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)
1092 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1093 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1094 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1096 # ND destination hardware address
1097 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)
1098 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1099 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1100 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1103 NXM_OF_ETH_TYPE(0800), NXM_NX_IP_FRAG(00)
1104 NXM_OF_ETH_TYPE(0800), NXM_NX_IP_FRAG(01)
1105 NXM_OF_ETH_TYPE(0800), NXM_NX_IP_FRAG(02)
1106 NXM_OF_ETH_TYPE(0800), NXM_NX_IP_FRAG(03)
1107 NXM_OF_ETH_TYPE(0800), NXM_NX_IP_FRAG(00)
1108 NXM_OF_ETH_TYPE(0800), NXM_NX_IP_FRAG_W(00/01)
1109 NXM_OF_ETH_TYPE(0800), NXM_NX_IP_FRAG_W(00/02)
1110 NXM_OF_ETH_TYPE(0800), NXM_NX_IP_FRAG_W(01/01)
1111 NXM_OF_ETH_TYPE(0800), NXM_NX_IP_FRAG_W(02/02)
1112 NXM_OF_ETH_TYPE(0800), NXM_NX_IP_FRAG(03)
1113 NXM_OF_ETH_TYPE(0800), NXM_NX_IP_FRAG(03)
1114 nx_pull_match() returned error OFPBMC_BAD_WILDCARDS
1115 nx_pull_match() returned error OFPBMC_BAD_VALUE
1118 NXM_OF_ETH_TYPE(86dd), NXM_NX_IP_FRAG(00)
1119 NXM_OF_ETH_TYPE(86dd), NXM_NX_IP_FRAG(01)
1120 NXM_OF_ETH_TYPE(86dd), NXM_NX_IP_FRAG(02)
1121 NXM_OF_ETH_TYPE(86dd), NXM_NX_IP_FRAG(03)
1122 NXM_OF_ETH_TYPE(86dd), NXM_NX_IP_FRAG(00)
1123 NXM_OF_ETH_TYPE(86dd), NXM_NX_IP_FRAG_W(00/01)
1124 NXM_OF_ETH_TYPE(86dd), NXM_NX_IP_FRAG_W(00/02)
1125 NXM_OF_ETH_TYPE(86dd), NXM_NX_IP_FRAG_W(01/01)
1126 NXM_OF_ETH_TYPE(86dd), NXM_NX_IP_FRAG_W(02/02)
1127 NXM_OF_ETH_TYPE(86dd), NXM_NX_IP_FRAG(03)
1128 nx_pull_match() returned error OFPBMC_BAD_WILDCARDS
1129 NXM_OF_ETH_TYPE(86dd), NXM_NX_IP_FRAG(03)
1130 nx_pull_match() returned error OFPBMC_BAD_VALUE
1133 NXM_NX_COOKIE(00000000abcdef01)
1134 NXM_NX_COOKIE_W(84200000abcdef01/84200000ffffffff)
1135 NXM_NX_COOKIE(84200000abcdef01)
1139 NXM_NX_TUN_ID(00000000abcdef01)
1140 NXM_NX_TUN_ID_W(84200000abcdef01/84200000ffffffff)
1141 NXM_NX_TUN_ID(84200000abcdef01)
1145 NXM_NX_REG0(acebdf56)
1146 NXM_NX_REG0_W(a0e0d050/f0f0f0f0)
1147 NXM_NX_REG0(a0e0d050)
1150 # Connection tracking fields,
1152 dnl When re-serialising, bits 16-31 are wildcarded, because current OVS userspace
1153 dnl doesn't understand (or store) those bits.
1154 NXM_OF_ETH_TYPE(0800), NXM_NX_CT_STATE_W(00000020/0000ffff)
1155 nx_pull_match() returned error OFPBMC_BAD_VALUE
1156 NXM_OF_ETH_TYPE(0800), NXM_NX_CT_STATE_W(00000020/00000020)
1157 NXM_OF_ETH_TYPE(0800), NXM_NX_CT_STATE_W(00000020/000000f0)
1158 NXM_OF_ETH_TYPE(0800), NXM_NX_CT_ZONE(5a5a)
1159 NXM_OF_ETH_TYPE(0800), NXM_NX_CT_MARK(5a5a5a5a)
1160 NXM_OF_ETH_TYPE(0800), NXM_NX_CT_MARK_W(5a5a5a5a/fefefefe)
1161 NXM_OF_ETH_TYPE(0800), NXM_NX_CT_LABEL(1234567890abcdef1234567890abcdef)
1162 NXM_OF_ETH_TYPE(0800), NXM_NX_CT_LABEL_W(10203040506070809000a0b0c0d0e0f0/f1f2f3f4f5f6f7f8f9f0fafbfcfdfeff)
1164 # dp_hash (testing experimenter OXM).
1165 NXM_NX_DP_HASH(01234567)
1166 NXM_NX_DP_HASH(01234567)
1168 # Invalid field number.
1169 nx_pull_match() returned error OFPBMC_BAD_FIELD
1171 # Invalid field numbers (experimenter OXM).
1172 nx_pull_match() returned error OFPBMC_BAD_FIELD
1173 nx_pull_match() returned error OFPBMC_BAD_FIELD
1175 # Unimplemented registers.
1177 # This test assumes that at least two registers, but fewer than 16,
1178 # registers are implemented.
1179 NXM_NX_REG0(12345678)
1180 NXM_NX_REG0_W(12345678/12345678)
1181 nx_pull_match() returned error OFPBMC_BAD_FIELD
1182 nx_pull_match() returned error OFPBMC_BAD_FIELD
1185 # Check that at least the first warning made it. (It's rate-limited
1186 # so a variable number could show up, especially under valgrind etc.)
1187 AT_CHECK([grep '1-bits in value' stderr | sed 1q], [0], [dnl
1188 nx_match|WARN|Rejecting NXM/OXM entry 0:0:1:1:12 with 1-bits in value for bits wildcarded by the mask.
1191 # Check that there wasn't any other stderr output.
1192 AT_CHECK([grep -v '1-bits in value' stderr], [1])
1195 AT_SETUP([ovs-ofctl parse-ofp10-match])
1196 AT_KEYWORDS([OF1.0])
1197 AT_DATA([test-data], [dnl
1199 003820fe fffe xxxxxxxxxxxx xxxxxxxxxxxx xxxx xx xx xxxx xx xx xxxx dnl
1200 xxxxxxxx xxxxxxxx xxxx xxxx
1202 # dl_src=00:01:02:03:04:05
1203 003820fb xxxx 000102030405 xxxxxxxxxxxx xxxx xx xx xxxx xx xx xxxx dnl
1204 xxxxxxxx xxxxxxxx xxxx xxxx
1206 # dl_dst=10:20:30:40:50:60
1207 003820f7 xxxx xxxxxxxxxxxx 102030405060 xxxx xx xx xxxx xx xx xxxx dnl
1208 xxxxxxxx xxxxxxxx xxxx xxxx
1211 003820fd xxxx xxxxxxxxxxxx xxxxxxxxxxxx 0123 xx xx xxxx xx xx xxxx dnl
1212 xxxxxxxx xxxxxxxx xxxx xxxx
1215 002820ff xxxx xxxxxxxxxxxx xxxxxxxxxxxx xxxx 05 xx xxxx xx xx xxxx dnl
1216 xxxxxxxx xxxxxxxx xxxx xxxx
1218 # dl_vlan=291,dl_vlan_pcp=4
1219 002820fd xxxx xxxxxxxxxxxx xxxxxxxxxxxx 0123 04 xx xxxx xx xx xxxx dnl
1220 xxxxxxxx xxxxxxxx xxxx xxxx
1222 dnl dl_vlan_pcp doesn't make sense when 802.1Q is not present, so
1223 dnl OVS ignores it and drops it on output.
1226 003820fd xxxx xxxxxxxxxxxx xxxxxxxxxxxx ffff xx xx xxxx xx xx xxxx dnl
1227 xxxxxxxx xxxxxxxx xxxx xxxx
1229 dnl dl_vlan_pcp doesn't make sense when 802.1Q is not present, so
1230 dnl OVS ignores it and drops it on output.
1233 002820fd xxxx xxxxxxxxxxxx xxxxxxxxxxxx ffff 05 xx xxxx xx xx xxxx dnl
1234 xxxxxxxx xxxxxxxx xxxx xxxx
1236 dnl Invalid VID and PCP discards out-of-range bits:
1237 # dl_vlan=256,dl_vlan_pcp=7
1240 002820fd xxxx xxxxxxxxxxxx xxxxxxxxxxxx f100 ff xx xxxx xx xx xxxx dnl
1241 xxxxxxxx xxxxxxxx xxxx xxxx
1244 003820ef xxxx xxxxxxxxxxxx xxxxxxxxxxxx xxxx xx xx 1234 xx xx xxxx dnl
1245 xxxxxxxx xxxxxxxx xxxx xxxx
1248 003820cf xxxx xxxxxxxxxxxx xxxxxxxxxxxx xxxx xx xx 0800 xx 05 xxxx dnl
1249 xxxxxxxx xxxxxxxx xxxx xxxx
1251 dnl Ignore nw_proto if not IP or ARP:
1252 # dl_type=0x1234,nw_proto=5
1253 # normal: 3: cf -> ef
1254 # normal: 25: 05 -> 00
1255 & ofp_util|INFO|normalization changed ofp_match, details:
1256 & ofp_util|INFO| pre: dl_type=0x1234,nw_proto=5
1257 & ofp_util|INFO|post: dl_type=0x1234
1258 003820cf xxxx xxxxxxxxxxxx xxxxxxxxxxxx xxxx xx xx 1234 xx 05 xxxx dnl
1259 xxxxxxxx xxxxxxxx xxxx xxxx
1262 001820ef xxxx xxxxxxxxxxxx xxxxxxxxxxxx xxxx xx xx 0800 fc xx xxxx dnl
1263 xxxxxxxx xxxxxxxx xxxx xxxx
1265 dnl Ignore nw_tos if not IP:
1268 # normal: 1: 18 -> 38
1269 # normal: 24: 04 -> 00
1270 & ofp_util|INFO|normalization changed ofp_match, details:
1271 & ofp_util|INFO| pre: arp,nw_tos=4
1272 & ofp_util|INFO|post: arp
1273 001820ef xxxx xxxxxxxxxxxx xxxxxxxxxxxx xxxx xx xx 0806 05 xx xxxx dnl
1274 xxxxxxxx xxxxxxxx xxxx xxxx
1276 dnl Low 2 bits of invalid TOS are forced to 0:
1279 001820ef xxxx xxxxxxxxxxxx xxxxxxxxxxxx xxxx xx xx 0800 31 xx xxxx dnl
1280 xxxxxxxx xxxxxxxx xxxx xxxx
1283 003820cf xxxx xxxxxxxxxxxx xxxxxxxxxxxx xxxx xx xx 0806 xx 02 xxxx dnl
1284 xxxxxxxx xxxxxxxx xxxx xxxx
1286 # ip,nw_src=192.168.128.85
1287 003800ef xxxx xxxxxxxxxxxx xxxxxxxxxxxx xxxx xx xx 0800 xx xx xxxx dnl
1288 c0a88055 xxxxxxxx xxxx xxxx
1290 # ip,nw_src=192.168.128.0/24
1292 003808ef xxxx xxxxxxxxxxxx xxxxxxxxxxxx xxxx xx xx 0800 xx xx xxxx dnl
1293 c0a88055 xxxxxxxx xxxx xxxx
1295 # ip,nw_dst=192.168.128.85
1296 003020ef xxxx xxxxxxxxxxxx xxxxxxxxxxxx xxxx xx xx 0800 xx xx xxxx dnl
1297 xxxxxxxx c0a88055 xxxx xxxx
1299 # ip,nw_dst=192.168.128.0/24
1301 003220ef xxxx xxxxxxxxxxxx xxxxxxxxxxxx xxxx xx xx 0800 xx xx xxxx dnl
1302 xxxxxxxx c0a88055 xxxx xxxx
1304 # arp,arp_spa=192.168.128.85
1305 003800ef xxxx xxxxxxxxxxxx xxxxxxxxxxxx xxxx xx xx 0806 xx xx xxxx dnl
1306 c0a88055 xxxxxxxx xxxx xxxx
1308 # arp,arp_spa=192.168.128.0/24
1310 003808ef xxxx xxxxxxxxxxxx xxxxxxxxxxxx xxxx xx xx 0806 xx xx xxxx dnl
1311 c0a88055 xxxxxxxx xxxx xxxx
1313 # arp,arp_tpa=192.168.128.85
1314 003020ef xxxx xxxxxxxxxxxx xxxxxxxxxxxx xxxx xx xx 0806 xx xx xxxx dnl
1315 xxxxxxxx c0a88055 xxxx xxxx
1317 # arp,arp_tpa=192.168.128.0/24
1319 003220ef xxxx xxxxxxxxxxxx xxxxxxxxxxxx xxxx xx xx 0806 xx xx xxxx dnl
1320 xxxxxxxx c0a88055 xxxx xxxx
1322 dnl Ignore nw_src if not IP or ARP:
1323 # dl_type=0x1234,nw_src=192.168.128.0/24
1325 # normal: 2: 08 -> 20
1326 # normal: 28: c0 -> 00
1327 # normal: 29: a8 -> 00
1328 # normal: 30: 80 -> 00
1329 & ofp_util|INFO|normalization changed ofp_match, details:
1330 & ofp_util|INFO| pre: dl_type=0x1234,nw_src=192.168.128.0/24
1331 & ofp_util|INFO|post: dl_type=0x1234
1332 003808ef xxxx xxxxxxxxxxxx xxxxxxxxxxxx xxxx xx xx 1234 xx xx xxxx dnl
1333 c0a88055 xxxxxxxx xxxx xxxx
1335 dnl Ignore nw_dst if not IP or ARP:
1336 # dl_type=0x1234,nw_dst=192.168.128.0/24
1338 # normal: 1: 32 -> 38
1339 # normal: 32: c0 -> 00
1340 # normal: 33: a8 -> 00
1341 # normal: 34: 80 -> 00
1342 & ofp_util|INFO|normalization changed ofp_match, details:
1343 & ofp_util|INFO| pre: dl_type=0x1234,nw_dst=192.168.128.0/24
1344 & ofp_util|INFO|post: dl_type=0x1234
1345 003220ef xxxx xxxxxxxxxxxx xxxxxxxxxxxx xxxx xx xx 1234 xx xx xxxx dnl
1346 xxxxxxxx c0a88055 xxxx xxxx
1349 0038208f xxxx xxxxxxxxxxxx xxxxxxxxxxxx xxxx xx xx 0800 xx 06 xxxx dnl
1350 xxxxxxxx xxxxxxxx 01bb xxxx
1353 0038204f xxxx xxxxxxxxxxxx xxxxxxxxxxxx xxxx xx xx 0800 xx 06 xxxx dnl
1354 xxxxxxxx xxxxxxxx xxxx 01bb
1357 0038208f xxxx xxxxxxxxxxxx xxxxxxxxxxxx xxxx xx xx 0800 xx 11 xxxx dnl
1358 xxxxxxxx xxxxxxxx 01bb xxxx
1361 0038204f xxxx xxxxxxxxxxxx xxxxxxxxxxxx xxxx xx xx 0800 xx 11 xxxx dnl
1362 xxxxxxxx xxxxxxxx xxxx 01bb
1365 0038208f xxxx xxxxxxxxxxxx xxxxxxxxxxxx xxxx xx xx 0800 xx 84 xxxx dnl
1366 xxxxxxxx xxxxxxxx 01bb xxxx
1369 0038204f xxxx xxxxxxxxxxxx xxxxxxxxxxxx xxxx xx xx 0800 xx 84 xxxx dnl
1370 xxxxxxxx xxxxxxxx xxxx 01bb
1373 0038208f xxxx xxxxxxxxxxxx xxxxxxxxxxxx xxxx xx xx 0800 xx 01 xxxx dnl
1374 xxxxxxxx xxxxxxxx 0005 xxxx
1377 0038204f xxxx xxxxxxxxxxxx xxxxxxxxxxxx xxxx xx xx 0800 xx 01 xxxx dnl
1378 xxxxxxxx xxxxxxxx xxxx 0008
1380 dnl Ignore tp_src if not TCP/UDP/SCTP:
1381 # ip,nw_proto=21,tp_src=443
1382 # normal: 3: 8f -> cf
1383 # normal: 36: 01 -> 00
1384 # normal: 37: bb -> 00
1385 & ofp_util|INFO|normalization changed ofp_match, details:
1386 & ofp_util|INFO| pre: ip,nw_proto=21,tp_src=443
1387 & ofp_util|INFO|post: ip,nw_proto=21
1388 0038208f xxxx xxxxxxxxxxxx xxxxxxxxxxxx xxxx xx xx 0800 xx 15 xxxx dnl
1389 xxxxxxxx xxxxxxxx 01bb xxxx
1391 dnl Ignore tp_dst if not TCP/UDP/SCTP:
1392 # ip,nw_proto=21,tp_dst=443
1393 # normal: 3: 4f -> cf
1394 # normal: 38: 01 -> 00
1395 # normal: 39: bb -> 00
1396 dnl The normalization details are suppressed here due to rate-limiting.
1397 0038204f xxxx xxxxxxxxxxxx xxxxxxxxxxxx xxxx xx xx 0800 xx 15 xxxx dnl
1398 xxxxxxxx xxxxxxxx xxxx 01bb
1401 sed '/^[[#&]]/d' < test-data > input.txt
1402 sed -n 's/^# //p; /^$/p' < test-data > expout
1403 sed -n 's/^& //p' < test-data > experr
1404 AT_CAPTURE_FILE([input.txt])
1405 AT_CAPTURE_FILE([expout])
1406 AT_CAPTURE_FILE([experr])
1408 [ovs-ofctl '-vPATTERN:console:%c|%p|%m' parse-ofp10-match < input.txt],
1409 [0], [expout], [experr])
1412 AT_SETUP([ovs-ofctl parse-ofp11-match])
1413 AT_KEYWORDS([OF1.1])
1414 AT_DATA([test-data], [dnl
1416 0000 0058 fffffffe 000003fe dnl
1417 000000000000ffffffffffff 000000000000ffffffffffff dnl
1418 0000 00 00 0000 00 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
1419 00000000 00 000000 0000000000000000ffffffffffffffff
1421 # bad ofp11_match: OFPBMC_BAD_VALUE
1422 & ofp_util|WARN|port 305419896 is outside the supported range 0 through 65279 or 0xffffff00 through 0xffffffff
1423 0000 0058 12345678 000003fe dnl
1424 000000000000ffffffffffff 000000000000ffffffffffff dnl
1425 0000 00 00 0000 00 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
1426 00000000 00 000000 0000000000000000ffffffffffffffff
1428 # dl_src=00:01:02:03:04:05
1429 0000 0058 00000000 000003ff dnl
1430 000102030405000000000000 000000000000ffffffffffff dnl
1431 0000 00 00 0000 00 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
1432 00000000 00 000000 0000000000000000ffffffffffffffff
1434 # dl_src=55:55:55:55:55:55/55:55:55:55:55:55
1435 0000 0058 00000000 000003ff dnl
1436 555555555555aaaaaaaaaaaa 000000000000ffffffffffff dnl
1437 0000 00 00 0000 00 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
1438 00000000 00 000000 0000000000000000ffffffffffffffff
1440 # dl_dst=00:01:02:03:04:05
1441 0000 0058 00000000 000003ff dnl
1442 000000000000ffffffffffff 000102030405000000000000 dnl
1443 0000 00 00 0000 00 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
1444 00000000 00 000000 0000000000000000ffffffffffffffff
1446 # dl_dst=01:00:00:00:00:00/01:00:00:00:00:00
1447 0000 0058 00000000 000003ff dnl
1448 000000000000ffffffffffff 010000000000feffffffffff dnl
1449 0000 00 00 0000 00 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
1450 00000000 00 000000 0000000000000000ffffffffffffffff
1452 # dl_dst=00:01:02:03:04:05/fe:ff:ff:ff:ff:ff
1453 0000 0058 00000000 000003ff dnl
1454 000000000000ffffffffffff 000102030405010000000000 dnl
1455 0000 00 00 0000 00 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
1456 00000000 00 000000 0000000000000000ffffffffffffffff
1458 # dl_dst=55:55:55:55:55:55/55:55:55:55:55:55
1459 0000 0058 00000000 000003ff dnl
1460 000000000000ffffffffffff 555555555555aaaaaaaaaaaa dnl
1461 0000 00 00 0000 00 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
1462 00000000 00 000000 0000000000000000ffffffffffffffff
1464 dnl dl_vlan_pcp is ignored if dl_vlan is wildcarded, which causes the
1465 dnl the wildcard bit and the dl_vlan_pcp to be dropped for output:
1469 0000 0058 00000001 000003fa dnl
1470 000000000000ffffffffffff 000000000000ffffffffffff dnl
1471 0000 03 00 0000 00 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
1472 00000000 00 000000 0000000000000000ffffffffffffffff
1475 0000 0058 00000000 000003fd dnl
1476 000000000000ffffffffffff 000000000000ffffffffffff dnl
1477 0123 00 00 0000 00 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
1478 00000000 00 000000 0000000000000000ffffffffffffffff
1482 0000 0058 00000000 000003fd dnl
1483 000000000000ffffffffffff 000000000000ffffffffffff dnl
1484 ffff 00 00 0000 00 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
1485 00000000 00 000000 0000000000000000ffffffffffffffff
1487 dnl OFPVID_NONE ignores dl_vlan_pcp even if not wildcarded, which causes
1488 dnl the wildcard bit and the dl_vlan_pcp to be dropped for output:
1492 0000 0058 00000000 000003f9 dnl
1493 000000000000ffffffffffff 000000000000ffffffffffff dnl
1494 ffff 05 00 0000 00 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
1495 00000000 00 000000 0000000000000000ffffffffffffffff
1497 # vlan_tci=0x1000/0x1000
1498 0000 0058 00000000 000003fd dnl
1499 000000000000ffffffffffff 000000000000ffffffffffff dnl
1500 fffe 00 00 0000 00 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
1501 00000000 00 000000 0000000000000000ffffffffffffffff
1503 dnl Try invalid VID:
1504 # bad ofp11_match: OFPBMC_BAD_VALUE
1505 0000 0058 00000000 000003fd dnl
1506 000000000000ffffffffffff 000000000000ffffffffffff dnl
1507 1234 00 00 0000 00 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
1508 00000000 00 000000 0000000000000000ffffffffffffffff
1511 0000 0058 00000000 000003f9 dnl
1512 000000000000ffffffffffff 000000000000ffffffffffff dnl
1513 fffe 04 00 0000 00 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
1514 00000000 00 000000 0000000000000000ffffffffffffffff
1516 # dl_vlan=10,dl_vlan_pcp=6
1517 0000 0058 00000000 000003f9 dnl
1518 000000000000ffffffffffff 000000000000ffffffffffff dnl
1519 000a 06 00 0000 00 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
1520 00000000 00 000000 0000000000000000ffffffffffffffff
1523 0000 0058 00000000 000003f7 dnl
1524 000000000000ffffffffffff 000000000000ffffffffffff dnl
1525 0000 00 00 1234 00 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
1526 00000000 00 000000 0000000000000000ffffffffffffffff
1529 0000 0058 00000000 000003e7 dnl
1530 000000000000ffffffffffff 000000000000ffffffffffff dnl
1531 0000 00 00 0800 fc 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
1532 00000000 00 000000 0000000000000000ffffffffffffffff
1534 dnl Try invalid TOS:
1535 # bad ofp11_match: OFPBMC_BAD_VALUE
1536 0000 0058 00000000 000003e7 dnl
1537 000000000000ffffffffffff 000000000000ffffffffffff dnl
1538 0000 00 00 0800 01 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
1539 00000000 00 000000 0000000000000000ffffffffffffffff
1542 0000 0058 00000000 000003d7 dnl
1543 000000000000ffffffffffff 000000000000ffffffffffff dnl
1544 0000 00 00 0800 00 05 00000000ffffffff 00000000ffffffff 0000 0000 dnl
1545 00000000 00 000000 0000000000000000ffffffffffffffff
1548 0000 0058 00000000 000003d7 dnl
1549 000000000000ffffffffffff 000000000000ffffffffffff dnl
1550 0000 00 00 0806 00 02 00000000ffffffff 00000000ffffffff 0000 0000 dnl
1551 00000000 00 000000 0000000000000000ffffffffffffffff
1553 # ip,nw_src=192.168.128.0/24
1554 0000 0058 00000000 000003f7 dnl
1555 000000000000ffffffffffff 000000000000ffffffffffff dnl
1556 0000 00 00 0800 00 00 c0a88000000000ff 00000000ffffffff 0000 0000 dnl
1557 00000000 00 000000 0000000000000000ffffffffffffffff
1559 # ip,nw_src=128.160.128.0/165.165.165.165
1562 0000 0058 00000000 000003f7 dnl
1563 000000000000ffffffffffff 000000000000ffffffffffff dnl
1564 0000 00 00 0800 00 00 c0a880005a5a5a5a 00000000ffffffff 0000 0000 dnl
1565 00000000 00 000000 0000000000000000ffffffffffffffff
1567 # ip,nw_dst=192.168.128.0/24
1568 0000 0058 00000000 000003f7 dnl
1569 000000000000ffffffffffff 000000000000ffffffffffff dnl
1570 0000 00 00 0800 00 00 00000000ffffffff c0a88000000000ff 0000 0000 dnl
1571 00000000 00 000000 0000000000000000ffffffffffffffff
1573 # ip,nw_dst=128.160.128.0/165.165.165.165
1576 0000 0058 00000000 000003f7 dnl
1577 000000000000ffffffffffff 000000000000ffffffffffff dnl
1578 0000 00 00 0800 00 00 00000000ffffffff c0a880005a5a5a5a 0000 0000 dnl
1579 00000000 00 000000 0000000000000000ffffffffffffffff
1581 # arp,arp_spa=192.168.128.0/24
1582 0000 0058 00000000 000003f7 dnl
1583 000000000000ffffffffffff 000000000000ffffffffffff dnl
1584 0000 00 00 0806 00 00 c0a88000000000ff 00000000ffffffff 0000 0000 dnl
1585 00000000 00 000000 0000000000000000ffffffffffffffff
1587 # arp,arp_tpa=192.168.128.0/24
1588 0000 0058 00000000 000003f7 dnl
1589 000000000000ffffffffffff 000000000000ffffffffffff dnl
1590 0000 00 00 0806 00 00 00000000ffffffff c0a88000000000ff 0000 0000 dnl
1591 00000000 00 000000 0000000000000000ffffffffffffffff
1594 0000 0058 00000000 00000397 dnl
1595 000000000000ffffffffffff 000000000000ffffffffffff dnl
1596 0000 00 00 0800 00 06 00000000ffffffff 00000000ffffffff 01bb 0000 dnl
1597 00000000 00 000000 0000000000000000ffffffffffffffff
1600 0000 0058 00000000 00000357 dnl
1601 000000000000ffffffffffff 000000000000ffffffffffff dnl
1602 0000 00 00 0800 00 06 00000000ffffffff 00000000ffffffff 0000 01bb dnl
1603 00000000 00 000000 0000000000000000ffffffffffffffff
1606 0000 0058 00000000 00000397 dnl
1607 000000000000ffffffffffff 000000000000ffffffffffff dnl
1608 0000 00 00 0800 00 11 00000000ffffffff 00000000ffffffff 01bb 0000 dnl
1609 00000000 00 000000 0000000000000000ffffffffffffffff
1612 0000 0058 00000000 00000397 dnl
1613 000000000000ffffffffffff 000000000000ffffffffffff dnl
1614 0000 00 00 0800 00 01 00000000ffffffff 00000000ffffffff 0005 0000 dnl
1615 00000000 00 000000 0000000000000000ffffffffffffffff
1618 0000 0058 00000000 00000357 dnl
1619 000000000000ffffffffffff 000000000000ffffffffffff dnl
1620 0000 00 00 0800 00 01 00000000ffffffff 00000000ffffffff 0000 0008 dnl
1621 00000000 00 000000 0000000000000000ffffffffffffffff
1624 0000 0058 00000000 00000397 dnl
1625 000000000000ffffffffffff 000000000000ffffffffffff dnl
1626 0000 00 00 0800 00 11 00000000ffffffff 00000000ffffffff 01bb 0000 dnl
1627 00000000 00 000000 0000000000000000ffffffffffffffff
1630 0000 0058 00000000 00000357 dnl
1631 000000000000ffffffffffff 000000000000ffffffffffff dnl
1632 0000 00 00 0800 00 11 00000000ffffffff 00000000ffffffff 0000 01bb dnl
1633 00000000 00 000000 0000000000000000ffffffffffffffff
1636 0000 0058 00000000 000003d7 dnl
1637 000000000000ffffffffffff 000000000000ffffffffffff dnl
1638 0000 00 00 0800 00 84 00000000ffffffff 00000000ffffffff 0000 0000 dnl
1639 00000000 00 000000 0000000000000000ffffffffffffffff
1642 0000 0058 00000000 00000397 dnl
1643 000000000000ffffffffffff 000000000000ffffffffffff dnl
1644 0000 00 00 0800 00 84 00000000ffffffff 00000000ffffffff 01bb 0000 dnl
1645 00000000 00 000000 0000000000000000ffffffffffffffff
1648 0000 0058 00000000 00000357 dnl
1649 000000000000ffffffffffff 000000000000ffffffffffff dnl
1650 0000 00 00 0800 00 84 00000000ffffffff 00000000ffffffff 0000 01bb dnl
1651 00000000 00 000000 0000000000000000ffffffffffffffff
1653 dnl Ignore tp_src if not TCP/UDP/SCTP:
1658 0000 0058 00000000 00000397 dnl
1659 000000000000ffffffffffff 000000000000ffffffffffff dnl
1660 0000 00 00 0800 00 15 00000000ffffffff 00000000ffffffff 01bb 0000 dnl
1661 00000000 00 000000 0000000000000000ffffffffffffffff
1663 dnl Ignore tp_dst if not TCP/UDP/SCTP:
1668 0000 0058 00000000 00000357 dnl
1669 000000000000ffffffffffff 000000000000ffffffffffff dnl
1670 0000 00 00 0800 00 16 00000000ffffffff 00000000ffffffff 0000 01bb dnl
1671 00000000 00 000000 0000000000000000ffffffffffffffff
1673 # mpls,mpls_label=284280
1676 0000 0058 00000000 000002f7 dnl
1677 000000000000ffffffffffff 000000000000ffffffffffff dnl
1678 0000 00 00 8847 00 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
1679 12345678 00 000000 0000000000000000ffffffffffffffff
1683 0000 0058 00000000 000001f7 dnl
1684 000000000000ffffffffffff 000000000000ffffffffffff dnl
1685 0000 00 00 8848 00 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
1686 00000000 5a 000000 0000000000000000ffffffffffffffff
1688 dnl mpls_label and mpls_tc must be ignored if dl_type is not MPLS:
1696 0000 0058 00000000 000000f7 dnl
1697 000000000000ffffffffffff 000000000000ffffffffffff dnl
1698 0000 00 00 1234 00 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
1699 12345678 5a 000000 0000000000000000ffffffffffffffff
1702 # metadata=0x1234567890abcdef
1703 0000 0058 00000000 000003ff dnl
1704 000000000000ffffffffffff 000000000000ffffffffffff dnl
1705 0000 00 00 0000 00 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
1706 00000000 00 000000 1234567890abcdef0000000000000000
1709 # metadata=0x5555555555555555/0x5555555555555555
1710 0000 0058 00000000 000003ff dnl
1711 000000000000ffffffffffff 000000000000ffffffffffff dnl
1712 0000 00 00 0000 00 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
1713 00000000 00 000000 5555555555555555aaaaaaaaaaaaaaaa
1716 # metadata=0x1234000090ab0000/0xffff0000ffff0000
1721 0000 0058 00000000 000003ff dnl
1722 000000000000ffffffffffff 000000000000ffffffffffff dnl
1723 0000 00 00 0000 00 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
1724 00000000 00 000000 1234567890abcdef0000ffff0000ffff
1727 sed '/^[[#&]]/d' < test-data > input.txt
1728 sed -n 's/^# //p; /^$/p' < test-data > expout
1729 sed -n 's/^& //p' < test-data > experr
1730 AT_CAPTURE_FILE([input.txt])
1731 AT_CAPTURE_FILE([expout])
1732 AT_CAPTURE_FILE([experr])
1734 [ovs-ofctl '-vPATTERN:console:%c|%p|%m' parse-ofp11-match < input.txt],
1735 [0], [expout], [experr])
1738 AT_SETUP([ovs-ofctl parse-nx-match loose])
1739 AT_KEYWORDS([nx-match])
1740 AT_DATA([nx-match.txt], [dnl
1741 NXM_OF_IN_PORT(0001), 01020304(1111/3333), NXM_OF_ETH_TYPE(0800)
1742 NXM_OF_IN_PORT(0001), ffff020800002320(11112222), NXM_OF_ETH_TYPE(0800)
1743 NXM_OF_IN_PORT(0001), ffff030800002320(1111/3333), NXM_OF_ETH_TYPE(0800)
1746 AT_CHECK([ovs-ofctl --strict parse-nx-match < nx-match.txt], [0], [dnl
1747 nx_pull_match() returned error OFPBMC_BAD_FIELD
1748 nx_pull_match() returned error OFPBMC_BAD_FIELD
1749 nx_pull_match() returned error OFPBMC_BAD_FIELD
1752 AT_CHECK([ovs-ofctl parse-nx-match < nx-match.txt], [0], [dnl
1753 NXM_OF_IN_PORT(0001), NXM_OF_ETH_TYPE(0800)
1754 NXM_OF_IN_PORT(0001), NXM_OF_ETH_TYPE(0800)
1755 NXM_OF_IN_PORT(0001), NXM_OF_ETH_TYPE(0800)
1759 AT_SETUP([ovs-ofctl parse-oxm (OpenFlow 1.2)])
1761 AT_DATA([oxm.txt], [dnl
1765 OXM_OF_IN_PORT(00000000)
1766 OXM_OF_IN_PORT(fffffffe)
1769 OXM_OF_METADATA(5a5a5a5a5a5a5a5a)
1770 OXM_OF_METADATA_W(0000000000000000/00000000ffffffff)
1771 OXM_OF_METADATA_W(1234567890abcdef/ffff0000ffff0000)
1772 OXM_OF_METADATA_W(1234567890abcdef/ffffffffffffffff)
1773 OXM_OF_METADATA_W(1234567890abcdef/0000000000000000)
1776 OXM_OF_ETH_DST(0002e30f80a4)
1777 OXM_OF_ETH_DST_W(010000000000/010000000000)
1778 OXM_OF_ETH_DST_W(000000000000/010000000000)
1779 OXM_OF_ETH_DST_W(ffffffffffff/010000000000)
1780 OXM_OF_ETH_DST_W(0002e30f80a4/ffffffffffff)
1781 OXM_OF_ETH_DST_W(0002e30f80a4/000000000000)
1782 OXM_OF_ETH_DST_W(0002e30f80a4/feffffffffff)
1785 OXM_OF_ETH_SRC(020898456ddb)
1788 OXM_OF_ETH_TYPE(0800)
1789 OXM_OF_ETH_TYPE(0800) OXM_OF_IN_PORT(00000012)
1792 OXM_OF_VLAN_VID(1009) OXM_OF_VLAN_VID(1009) # Duplicate Field
1793 OXM_OF_VLAN_VID(f009) # Bad Value
1794 OXM_OF_VLAN_PCP(00) # Bad Pre-Requisite
1795 OXM_OF_VLAN_VID(0000) # Packets without 802.1Q header or with VID=0
1796 OXM_OF_VLAN_VID(1123) # Packets with VID=123, any PCP
1797 OXM_OF_VLAN_VID(1123) OXM_OF_VLAN_PCP(01) # Packets with VID=123, PCP=1.
1798 OXM_OF_VLAN_VID(0123) # Does not make sense (but supported anyway)
1799 OXM_OF_VLAN_VID_W(0123/0123) # Does not make sense (but supported anyway)
1800 OXM_OF_VLAN_VID_W(1123/0123) # Does not make sense (but supported anyway)
1801 OXM_OF_VLAN_VID_W(0123/1123) # Does not make sense (but supported anyway)
1802 OXM_OF_VLAN_VID(0123) OXM_OF_VLAN_PCP(01) #Bad Pre-Requisite
1803 OXM_OF_VLAN_VID_W(1123/1fff) # Packets with VID=123, any PCP.
1804 OXM_OF_VLAN_VID_W(1123/ffff) # Packets with VID=123, any PCP.
1805 OXM_OF_VLAN_VID_W(0000/0000) # Packets with or without 802.1Q header
1806 OXM_OF_VLAN_VID_W(1103/1f0f), # Packets with # VID=123 (masked)
1807 OXM_OF_VLAN_VID_W(1103/1f0f), OXM_OF_VLAN_PCP(01) # Packets with VID=123 (masked), any PCP.
1808 OXM_OF_VLAN_VID_W(1000/1000) # Packets with any VID, any PCP
1809 OXM_OF_VLAN_VID_W(1000/1000), OXM_OF_VLAN_PCP(01) # Packets with any VID, PCP=1.
1812 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_DSCP(f0)
1813 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_DSCP(41)
1814 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_DSCP(3f)
1818 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_ECN(03)
1819 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_ECN(06)
1823 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(01)
1824 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(05)
1828 OXM_OF_ETH_TYPE(0800) OXM_OF_IPV4_SRC(ac100014)
1829 OXM_OF_ETH_TYPE(0800) OXM_OF_IPV4_SRC_W(C0a80000/FFFF0000)
1830 OXM_OF_ETH_TYPE(0800) OXM_OF_IPV4_SRC_W(C0a80000/FFFFFFFF)
1831 OXM_OF_ETH_TYPE(0800) OXM_OF_IPV4_SRC_W(00000000/00000000)
1832 OXM_OF_ETH_TYPE(0806) OXM_OF_IPV4_SRC(ac100014)
1833 OXM_OF_IPV4_SRC_W(C0D80000/FFFF0000)
1836 OXM_OF_ETH_TYPE(0800) OXM_OF_IPV4_DST(ac100014)
1837 OXM_OF_ETH_TYPE(0800) OXM_OF_IPV4_DST_W(C0a80000/FFFF0000)
1838 OXM_OF_ETH_TYPE(0800) OXM_OF_IPV4_DST_W(C0a88012/FFFFFFFF)
1839 OXM_OF_ETH_TYPE(0800) OXM_OF_IPV4_DST_W(00000000/00000000)
1840 OXM_OF_IPV4_DST(ac100014)
1841 OXM_OF_ETH_TYPE(0806) OXM_OF_IPV4_DST_W(C0D80000/FFFF0000)
1844 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(06) OXM_OF_TCP_SRC(4231)
1845 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(06) OXM_OF_TCP_SRC_W(5050/F0F0)
1846 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(06) OXM_OF_TCP_SRC_W(5050/FFFF)
1847 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(06) OXM_OF_TCP_SRC_W(0000/0000)
1848 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(07) OXM_OF_TCP_SRC(4231)
1850 # TCP destination port
1851 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(06) OXM_OF_TCP_DST(4231)
1852 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(06) OXM_OF_TCP_DST_W(FDE0/FFF0)
1853 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(06) OXM_OF_TCP_DST_W(FDE0/FFFF)
1854 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(06) OXM_OF_TCP_DST_W(0000/0000)
1855 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(07) OXM_OF_TCP_DST(4231)
1858 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(11) OXM_OF_UDP_SRC(8732)
1859 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(11) OXM_OF_UDP_SRC_W(0132/01FF)
1860 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(11) OXM_OF_UDP_SRC_W(0132/FFFF)
1861 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(11) OXM_OF_UDP_SRC_W(0000/0000)
1862 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(06) OXM_OF_UDP_SRC(7823)
1864 # UDP destination port
1865 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(11) OXM_OF_UDP_DST(1782)
1866 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(11) OXM_OF_UDP_DST_W(5005/F00F)
1867 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(11) OXM_OF_UDP_DST_W(5005/FFFF)
1868 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(11) OXM_OF_UDP_DST_W(0000/0000)
1869 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(02) OXM_OF_UDP_DST(1293)
1872 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(84) OXM_OF_SCTP_SRC(8732)
1873 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(84) OXM_OF_SCTP_SRC_W(0132/01FF)
1874 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(84) OXM_OF_SCTP_SRC_W(0132/FFFF)
1875 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(84) OXM_OF_SCTP_SRC_W(0000/0000)
1876 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(06) OXM_OF_SCTP_SRC(7823)
1878 # SCTP destination port
1879 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(84) OXM_OF_SCTP_DST(1782)
1880 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(84) OXM_OF_SCTP_DST_W(5005/F00F)
1881 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(84) OXM_OF_SCTP_DST_W(5005/FFFF)
1882 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(84) OXM_OF_SCTP_DST_W(0000/0000)
1883 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(02) OXM_OF_SCTP_DST(1293)
1886 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(01) OXM_OF_ICMPV4_TYPE(12)
1887 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(00) OXM_OF_ICMPV4_TYPE(10)
1890 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(01) OXM_OF_ICMPV4_CODE(12)
1891 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(00) OXM_OF_ICMPV4_CODE(10)
1892 OXM_OF_ETH_TYPE(0800) OXM_OF_ICMPV4_CODE(10)
1893 OXM_OF_ICMPV4_CODE(00)
1896 OXM_OF_ETH_TYPE(0806) OXM_OF_ARP_OP(0001)
1897 OXM_OF_ETH_TYPE(0806) OXM_OF_ARP_OP(1111)
1898 OXM_OF_ETH_TYPE(0000) OXM_OF_ARP_OP(0001)
1900 OXM_OF_ETH_TYPE(0806) OXM_OF_ARP_OP(0001) OXM_OF_ARP_OP(0001)
1902 # ARP source protocol address
1903 OXM_OF_ETH_TYPE(0806) OXM_OF_ARP_SPA(ac100014)
1904 OXM_OF_ETH_TYPE(0806) OXM_OF_ARP_SPA_W(C0a81200/FFFFFF00)
1905 OXM_OF_ETH_TYPE(0806) OXM_OF_ARP_SPA_W(C0a81234/FFFFFFFF)
1906 OXM_OF_ETH_TYPE(0806) OXM_OF_ARP_SPA_W(00000000/00000000)
1907 OXM_OF_ETH_TYPE(0800) OXM_OF_ARP_SPA(ac100014)
1908 OXM_OF_ARP_SPA_W(C0D80000/FFFF0000)
1910 # ARP destination protocol address
1911 OXM_OF_ETH_TYPE(0806) OXM_OF_ARP_TPA(ac100014)
1912 OXM_OF_ETH_TYPE(0806) OXM_OF_ARP_TPA_W(C0a81200/FFFFFF00)
1913 OXM_OF_ETH_TYPE(0806) OXM_OF_ARP_TPA_W(C0a812fe/FFFFFFFF)
1914 OXM_OF_ETH_TYPE(0806) OXM_OF_ARP_TPA_W(00000000/00000000)
1915 OXM_OF_ETH_TYPE(0800) OXM_OF_ARP_TPA(ac100014)
1916 OXM_OF_ARP_TPA_W(C0D80000/FFFF0000)
1918 # ARP source hardware address
1919 OXM_OF_ETH_TYPE(0806) OXM_OF_ARP_SHA(0002e30f80a4)
1920 OXM_OF_ETH_TYPE(0800) OXM_OF_ARP_SHA(0002e30f80a4)
1921 OXM_OF_ARP_SHA(0002e30f80a4)
1922 OXM_OF_ETH_TYPE(0806) OXM_OF_ARP_SHA_W(0002e30f80a4/ffffffffffff)
1923 OXM_OF_ETH_TYPE(0806) OXM_OF_ARP_SHA_W(000000000000/000000000000)
1924 OXM_OF_ETH_TYPE(0806) OXM_OF_ARP_SHA_W(000000000004/00000000000f)
1926 # ARP destination hardware address
1927 OXM_OF_ETH_TYPE(0806) OXM_OF_ARP_THA(0002e30f80a4)
1928 OXM_OF_ETH_TYPE(0800) OXM_OF_ARP_THA(0002e30f80a4)
1929 OXM_OF_ARP_THA(0002e30f80a4)
1930 OXM_OF_ETH_TYPE(0806) OXM_OF_ARP_THA_W(0002e30f80a4/ffffffffffff)
1931 OXM_OF_ETH_TYPE(0806) OXM_OF_ARP_THA_W(000000000000/000000000000)
1932 OXM_OF_ETH_TYPE(0806) OXM_OF_ARP_THA_W(000000000004/00000000000f)
1935 OXM_OF_ETH_TYPE(86dd) OXM_OF_IPV6_SRC(20010db83c4d00010002000300040005)
1936 OXM_OF_ETH_TYPE(0800) OXM_OF_IPV6_SRC(20010db83c4d00010002000300040005)
1937 OXM_OF_ETH_TYPE(86dd) OXM_OF_IPV6_SRC_W(20010db83c4d00010000000000000000/ffffffffffffffff0000000000000000)
1938 OXM_OF_ETH_TYPE(86dd) OXM_OF_IPV6_SRC_W(20010db83c4d00010000000000000000/ffffffffffffffffffffffffffffffff)
1939 OXM_OF_ETH_TYPE(86dd) OXM_OF_IPV6_SRC_W(00000000000000000000000000000000/00000000000000000000000000000000)
1940 OXM_OF_ETH_TYPE(0800) OXM_OF_IPV6_SRC_W(20010db83c4d00010000000000000000/ffffffffffffffff0000000000000000)
1943 OXM_OF_ETH_TYPE(86dd) OXM_OF_IPV6_DST(20010db83c4d00010002000300040005)
1944 OXM_OF_ETH_TYPE(0800) OXM_OF_IPV6_DST(20010db83c4d00010002000300040005)
1945 OXM_OF_ETH_TYPE(86dd) OXM_OF_IPV6_DST_W(20010db83c4d00010000000000000000/ffffffffffffffff0000000000000000)
1946 OXM_OF_ETH_TYPE(86dd) OXM_OF_IPV6_DST_W(20010db83c4d00010000000000000000/ffffffffffffffffffffffffffffffff)
1947 OXM_OF_ETH_TYPE(86dd) OXM_OF_IPV6_DST_W(00000000000000000000000000000000/00000000000000000000000000000000)
1948 OXM_OF_ETH_TYPE(0800) OXM_OF_IPV6_DST_W(20010db83c4d00010000000000000000/ffffffffffffffff0000000000000000)
1951 OXM_OF_ETH_TYPE(86dd) OXM_OF_IPV6_FLABEL(1000000f)
1952 OXM_OF_IPV6_FLABEL(0000000f)
1953 OXM_OF_ETH_TYPE(86dd) OXM_OF_IPV6_FLABEL(0000000f)
1954 OXM_OF_ETH_TYPE(86dd) OXM_OF_IPV6_FLABEL_W(0000000f/0000000f)
1955 OXM_OF_ETH_TYPE(86dd) OXM_OF_IPV6_FLABEL_W(0000000f/000fffff)
1956 OXM_OF_ETH_TYPE(86dd) OXM_OF_IPV6_FLABEL_W(00000000/000ffff0)
1957 OXM_OF_ETH_TYPE(86dd) OXM_OF_IPV6_FLABEL_W(0000000f/100fffff)
1958 OXM_OF_ETH_TYPE(86dd) OXM_OF_IPV6_FLABEL_W(0000000f/ffffffff)
1959 OXM_OF_ETH_TYPE(86dd) OXM_OF_IPV6_FLABEL_W(00000000/00000000)
1961 # ND source hardware address
1962 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)
1963 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)
1964 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)
1965 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)
1967 # ND destination hardware address
1968 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)
1969 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)
1970 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)
1971 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)
1973 # Registers 0, 1, and 2.
1974 NXM_NX_REG0(acebdf56)
1975 NXM_NX_REG0_W(a0e0d050/f0f0f0f0)
1976 NXM_NX_REG0(a0e0d050)
1977 NXM_NX_REG1(acebdf56)
1978 NXM_NX_REG0_W(a0e0d050/f0f0f0f0), NXM_NX_REG1_W(a0e0d050/f0f0f0f0)
1979 NXM_NX_REG0_W(a0e0d050/f0f0f0f0), NXM_NX_REG1(a0e0d050)
1980 NXM_NX_REG1_W(a0e0d050/f0f0f0f0), NXM_NX_REG2_W(a0e0d050/f0f0f0f0)
1981 NXM_NX_REG1_W(a0e0d050/f0f0f0f0), NXM_NX_REG2(a0e0d050)
1983 # Extended registers 0, 1, and 2.
1984 # (For OpenFlow 1.2, OVS transforms these into its extension registers.)
1985 OXM_OF_PKT_REG0_W(acebdf5600000000/ffffffff00000000)
1986 OXM_OF_PKT_REG0_W(a0e0d05000000000/f0f0f0f000000000)
1987 OXM_OF_PKT_REG0_W(a0e0d05000000000/ffffffff00000000)
1988 OXM_OF_PKT_REG0_W(00000000acebdf56/00000000ffffffff)
1989 OXM_OF_PKT_REG0_W(a0e0d050a0e0d050/f0f0f0f0f0f0f0f0)
1990 OXM_OF_PKT_REG0_W(a0e0d050a0e0d050/f0f0f0f0ffffffff)
1991 OXM_OF_PKT_REG0_W(00000000a0e0d050/00000000f0f0f0f0), OXM_OF_PKT_REG1_W(a0e0d05000000000/f0f0f0f000000000)
1992 OXM_OF_PKT_REG0_W(00000000a0e0d050/00000000f0f0f0f0), OXM_OF_PKT_REG1_W(a0e0d05000000000/ffffffff00000000)
1994 # Invalid field number.
1997 # Invalid field numbers (experimenter OXM).
1998 ffff020800002320(11112222)
1999 ffff030800002320(1111/3333)
2001 AT_CHECK([ovs-ofctl '-vPATTERN:console:%c|%p|%m' --strict parse-oxm OpenFlow12 < oxm.txt],
2006 OXM_OF_IN_PORT(00000000)
2007 OXM_OF_IN_PORT(fffffffe)
2010 OXM_OF_METADATA(5a5a5a5a5a5a5a5a)
2011 OXM_OF_METADATA_W(0000000000000000/00000000ffffffff)
2012 nx_pull_match() returned error OFPBMC_BAD_WILDCARDS
2013 OXM_OF_METADATA(1234567890abcdef)
2014 nx_pull_match() returned error OFPBMC_BAD_WILDCARDS
2017 OXM_OF_ETH_DST(0002e30f80a4)
2018 OXM_OF_ETH_DST_W(010000000000/010000000000)
2019 OXM_OF_ETH_DST_W(000000000000/010000000000)
2020 nx_pull_match() returned error OFPBMC_BAD_WILDCARDS
2021 OXM_OF_ETH_DST(0002e30f80a4)
2022 nx_pull_match() returned error OFPBMC_BAD_WILDCARDS
2023 OXM_OF_ETH_DST_W(0002e30f80a4/feffffffffff)
2026 OXM_OF_ETH_SRC(020898456ddb)
2029 OXM_OF_ETH_TYPE(0800)
2030 OXM_OF_IN_PORT(00000012), OXM_OF_ETH_TYPE(0800)
2033 nx_pull_match() returned error OFPBMC_DUP_FIELD
2034 nx_pull_match() returned error OFPBMC_BAD_VALUE
2035 nx_pull_match() returned error OFPBMC_BAD_PREREQ
2036 OXM_OF_VLAN_VID(0000)
2037 OXM_OF_VLAN_VID(1123)
2038 OXM_OF_VLAN_VID(1123), OXM_OF_VLAN_PCP(01)
2039 OXM_OF_VLAN_VID(0123)
2040 OXM_OF_VLAN_VID_W(0123/0123)
2041 nx_pull_match() returned error OFPBMC_BAD_WILDCARDS
2042 OXM_OF_VLAN_VID_W(0123/1123)
2043 nx_pull_match() returned error OFPBMC_BAD_PREREQ
2044 OXM_OF_VLAN_VID(1123)
2045 OXM_OF_VLAN_VID(1123)
2047 OXM_OF_VLAN_VID_W(1103/1f0f)
2048 OXM_OF_VLAN_VID_W(1103/1f0f), OXM_OF_VLAN_PCP(01)
2049 OXM_OF_VLAN_VID_W(1000/1000)
2050 OXM_OF_VLAN_VID_W(1000/1000), OXM_OF_VLAN_PCP(01)
2053 nx_pull_match() returned error OFPBMC_BAD_VALUE
2054 nx_pull_match() returned error OFPBMC_BAD_VALUE
2055 OXM_OF_ETH_TYPE(0800), OXM_OF_IP_DSCP(3f)
2056 nx_pull_match() returned error OFPBMC_BAD_PREREQ
2059 OXM_OF_ETH_TYPE(0800), OXM_OF_IP_ECN(03)
2060 nx_pull_match() returned error OFPBMC_BAD_VALUE
2061 nx_pull_match() returned error OFPBMC_BAD_PREREQ
2064 OXM_OF_ETH_TYPE(0800), OXM_OF_IP_PROTO(01)
2065 OXM_OF_ETH_TYPE(0800), OXM_OF_IP_PROTO(05)
2066 nx_pull_match() returned error OFPBMC_BAD_PREREQ
2069 OXM_OF_ETH_TYPE(0800), OXM_OF_IPV4_SRC(ac100014)
2070 OXM_OF_ETH_TYPE(0800), OXM_OF_IPV4_SRC_W(c0a80000/ffff0000)
2071 OXM_OF_ETH_TYPE(0800), OXM_OF_IPV4_SRC(c0a80000)
2072 OXM_OF_ETH_TYPE(0800)
2073 nx_pull_match() returned error OFPBMC_BAD_PREREQ
2074 nx_pull_match() returned error OFPBMC_BAD_PREREQ
2077 OXM_OF_ETH_TYPE(0800), OXM_OF_IPV4_DST(ac100014)
2078 OXM_OF_ETH_TYPE(0800), OXM_OF_IPV4_DST_W(c0a80000/ffff0000)
2079 OXM_OF_ETH_TYPE(0800), OXM_OF_IPV4_DST(c0a88012)
2080 OXM_OF_ETH_TYPE(0800)
2081 nx_pull_match() returned error OFPBMC_BAD_PREREQ
2082 nx_pull_match() returned error OFPBMC_BAD_PREREQ
2085 OXM_OF_ETH_TYPE(0800), OXM_OF_IP_PROTO(06), OXM_OF_TCP_SRC(4231)
2086 OXM_OF_ETH_TYPE(0800), OXM_OF_IP_PROTO(06), OXM_OF_TCP_SRC_W(5050/f0f0)
2087 OXM_OF_ETH_TYPE(0800), OXM_OF_IP_PROTO(06), OXM_OF_TCP_SRC(5050)
2088 OXM_OF_ETH_TYPE(0800), OXM_OF_IP_PROTO(06)
2089 nx_pull_match() returned error OFPBMC_BAD_PREREQ
2091 # TCP destination port
2092 OXM_OF_ETH_TYPE(0800), OXM_OF_IP_PROTO(06), OXM_OF_TCP_DST(4231)
2093 OXM_OF_ETH_TYPE(0800), OXM_OF_IP_PROTO(06), OXM_OF_TCP_DST_W(fde0/fff0)
2094 OXM_OF_ETH_TYPE(0800), OXM_OF_IP_PROTO(06), OXM_OF_TCP_DST(fde0)
2095 OXM_OF_ETH_TYPE(0800), OXM_OF_IP_PROTO(06)
2096 nx_pull_match() returned error OFPBMC_BAD_PREREQ
2099 OXM_OF_ETH_TYPE(0800), OXM_OF_IP_PROTO(11), OXM_OF_UDP_SRC(8732)
2100 OXM_OF_ETH_TYPE(0800), OXM_OF_IP_PROTO(11), OXM_OF_UDP_SRC_W(0132/01ff)
2101 OXM_OF_ETH_TYPE(0800), OXM_OF_IP_PROTO(11), OXM_OF_UDP_SRC(0132)
2102 OXM_OF_ETH_TYPE(0800), OXM_OF_IP_PROTO(11)
2103 nx_pull_match() returned error OFPBMC_BAD_PREREQ
2105 # UDP destination port
2106 OXM_OF_ETH_TYPE(0800), OXM_OF_IP_PROTO(11), OXM_OF_UDP_DST(1782)
2107 OXM_OF_ETH_TYPE(0800), OXM_OF_IP_PROTO(11), OXM_OF_UDP_DST_W(5005/f00f)
2108 OXM_OF_ETH_TYPE(0800), OXM_OF_IP_PROTO(11), OXM_OF_UDP_DST(5005)
2109 OXM_OF_ETH_TYPE(0800), OXM_OF_IP_PROTO(11)
2110 nx_pull_match() returned error OFPBMC_BAD_PREREQ
2113 OXM_OF_ETH_TYPE(0800), OXM_OF_IP_PROTO(84), OXM_OF_SCTP_SRC(8732)
2114 OXM_OF_ETH_TYPE(0800), OXM_OF_IP_PROTO(84), OXM_OF_SCTP_SRC_W(0132/01ff)
2115 OXM_OF_ETH_TYPE(0800), OXM_OF_IP_PROTO(84), OXM_OF_SCTP_SRC(0132)
2116 OXM_OF_ETH_TYPE(0800), OXM_OF_IP_PROTO(84)
2117 nx_pull_match() returned error OFPBMC_BAD_PREREQ
2119 # SCTP destination port
2120 OXM_OF_ETH_TYPE(0800), OXM_OF_IP_PROTO(84), OXM_OF_SCTP_DST(1782)
2121 OXM_OF_ETH_TYPE(0800), OXM_OF_IP_PROTO(84), OXM_OF_SCTP_DST_W(5005/f00f)
2122 OXM_OF_ETH_TYPE(0800), OXM_OF_IP_PROTO(84), OXM_OF_SCTP_DST(5005)
2123 OXM_OF_ETH_TYPE(0800), OXM_OF_IP_PROTO(84)
2124 nx_pull_match() returned error OFPBMC_BAD_PREREQ
2127 OXM_OF_ETH_TYPE(0800), OXM_OF_IP_PROTO(01), OXM_OF_ICMPV4_TYPE(12)
2128 nx_pull_match() returned error OFPBMC_BAD_PREREQ
2131 OXM_OF_ETH_TYPE(0800), OXM_OF_IP_PROTO(01), OXM_OF_ICMPV4_CODE(12)
2132 nx_pull_match() returned error OFPBMC_BAD_PREREQ
2133 nx_pull_match() returned error OFPBMC_BAD_PREREQ
2134 nx_pull_match() returned error OFPBMC_BAD_PREREQ
2137 OXM_OF_ETH_TYPE(0806), OXM_OF_ARP_OP(0001)
2138 nx_pull_match() returned error OFPBMC_BAD_VALUE
2139 nx_pull_match() returned error OFPBMC_BAD_PREREQ
2140 nx_pull_match() returned error OFPBMC_BAD_PREREQ
2141 nx_pull_match() returned error OFPBMC_DUP_FIELD
2143 # ARP source protocol address
2144 OXM_OF_ETH_TYPE(0806), OXM_OF_ARP_SPA(ac100014)
2145 OXM_OF_ETH_TYPE(0806), OXM_OF_ARP_SPA_W(c0a81200/ffffff00)
2146 OXM_OF_ETH_TYPE(0806), OXM_OF_ARP_SPA(c0a81234)
2147 OXM_OF_ETH_TYPE(0806)
2148 nx_pull_match() returned error OFPBMC_BAD_PREREQ
2149 nx_pull_match() returned error OFPBMC_BAD_PREREQ
2151 # ARP destination protocol address
2152 OXM_OF_ETH_TYPE(0806), OXM_OF_ARP_TPA(ac100014)
2153 OXM_OF_ETH_TYPE(0806), OXM_OF_ARP_TPA_W(c0a81200/ffffff00)
2154 OXM_OF_ETH_TYPE(0806), OXM_OF_ARP_TPA(c0a812fe)
2155 OXM_OF_ETH_TYPE(0806)
2156 nx_pull_match() returned error OFPBMC_BAD_PREREQ
2157 nx_pull_match() returned error OFPBMC_BAD_PREREQ
2159 # ARP source hardware address
2160 OXM_OF_ETH_TYPE(0806), OXM_OF_ARP_SHA(0002e30f80a4)
2161 nx_pull_match() returned error OFPBMC_BAD_PREREQ
2162 nx_pull_match() returned error OFPBMC_BAD_PREREQ
2163 OXM_OF_ETH_TYPE(0806), OXM_OF_ARP_SHA(0002e30f80a4)
2164 OXM_OF_ETH_TYPE(0806)
2165 OXM_OF_ETH_TYPE(0806), OXM_OF_ARP_SHA_W(000000000004/00000000000f)
2167 # ARP destination hardware address
2168 OXM_OF_ETH_TYPE(0806), OXM_OF_ARP_THA(0002e30f80a4)
2169 nx_pull_match() returned error OFPBMC_BAD_PREREQ
2170 nx_pull_match() returned error OFPBMC_BAD_PREREQ
2171 OXM_OF_ETH_TYPE(0806), OXM_OF_ARP_THA(0002e30f80a4)
2172 OXM_OF_ETH_TYPE(0806)
2173 OXM_OF_ETH_TYPE(0806), OXM_OF_ARP_THA_W(000000000004/00000000000f)
2176 OXM_OF_ETH_TYPE(86dd), OXM_OF_IPV6_SRC(20010db83c4d00010002000300040005)
2177 nx_pull_match() returned error OFPBMC_BAD_PREREQ
2178 OXM_OF_ETH_TYPE(86dd), OXM_OF_IPV6_SRC_W(20010db83c4d00010000000000000000/ffffffffffffffff0000000000000000)
2179 OXM_OF_ETH_TYPE(86dd), OXM_OF_IPV6_SRC(20010db83c4d00010000000000000000)
2180 OXM_OF_ETH_TYPE(86dd)
2181 nx_pull_match() returned error OFPBMC_BAD_PREREQ
2184 OXM_OF_ETH_TYPE(86dd), OXM_OF_IPV6_DST(20010db83c4d00010002000300040005)
2185 nx_pull_match() returned error OFPBMC_BAD_PREREQ
2186 OXM_OF_ETH_TYPE(86dd), OXM_OF_IPV6_DST_W(20010db83c4d00010000000000000000/ffffffffffffffff0000000000000000)
2187 OXM_OF_ETH_TYPE(86dd), OXM_OF_IPV6_DST(20010db83c4d00010000000000000000)
2188 OXM_OF_ETH_TYPE(86dd)
2189 nx_pull_match() returned error OFPBMC_BAD_PREREQ
2192 nx_pull_match() returned error OFPBMC_BAD_VALUE
2193 nx_pull_match() returned error OFPBMC_BAD_PREREQ
2194 OXM_OF_ETH_TYPE(86dd), OXM_OF_IPV6_FLABEL(0000000f)
2195 OXM_OF_ETH_TYPE(86dd), OXM_OF_IPV6_FLABEL_W(0000000f/0000000f)
2196 OXM_OF_ETH_TYPE(86dd), OXM_OF_IPV6_FLABEL(0000000f)
2197 OXM_OF_ETH_TYPE(86dd), OXM_OF_IPV6_FLABEL_W(00000000/000ffff0)
2198 OXM_OF_ETH_TYPE(86dd), OXM_OF_IPV6_FLABEL(0000000f)
2199 OXM_OF_ETH_TYPE(86dd), OXM_OF_IPV6_FLABEL(0000000f)
2200 OXM_OF_ETH_TYPE(86dd)
2202 # ND source hardware address
2203 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)
2204 nx_pull_match() returned error OFPBMC_BAD_PREREQ
2205 nx_pull_match() returned error OFPBMC_BAD_PREREQ
2206 nx_pull_match() returned error OFPBMC_BAD_PREREQ
2208 # ND destination hardware address
2209 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)
2210 nx_pull_match() returned error OFPBMC_BAD_PREREQ
2211 nx_pull_match() returned error OFPBMC_BAD_PREREQ
2212 nx_pull_match() returned error OFPBMC_BAD_PREREQ
2214 # Registers 0, 1, and 2.
2215 NXM_NX_REG0(acebdf56)
2216 NXM_NX_REG0_W(a0e0d050/f0f0f0f0)
2217 NXM_NX_REG0(a0e0d050)
2218 NXM_NX_REG1(acebdf56)
2219 NXM_NX_REG0_W(a0e0d050/f0f0f0f0), NXM_NX_REG1_W(a0e0d050/f0f0f0f0)
2220 NXM_NX_REG0_W(a0e0d050/f0f0f0f0), NXM_NX_REG1(a0e0d050)
2221 NXM_NX_REG1_W(a0e0d050/f0f0f0f0), NXM_NX_REG2_W(a0e0d050/f0f0f0f0)
2222 NXM_NX_REG1_W(a0e0d050/f0f0f0f0), NXM_NX_REG2(a0e0d050)
2224 # Extended registers 0, 1, and 2.
2225 # (For OpenFlow 1.2, OVS transforms these into its extension registers.)
2226 NXM_NX_REG0(acebdf56)
2227 NXM_NX_REG0_W(a0e0d050/f0f0f0f0)
2228 NXM_NX_REG0(a0e0d050)
2229 NXM_NX_REG1(acebdf56)
2230 NXM_NX_REG0_W(a0e0d050/f0f0f0f0), NXM_NX_REG1_W(a0e0d050/f0f0f0f0)
2231 NXM_NX_REG0_W(a0e0d050/f0f0f0f0), NXM_NX_REG1(a0e0d050)
2232 NXM_NX_REG1_W(a0e0d050/f0f0f0f0), NXM_NX_REG2_W(a0e0d050/f0f0f0f0)
2233 NXM_NX_REG1_W(a0e0d050/f0f0f0f0), NXM_NX_REG2(a0e0d050)
2235 # Invalid field number.
2236 nx_pull_match() returned error OFPBMC_BAD_FIELD
2238 # Invalid field numbers (experimenter OXM).
2239 nx_pull_match() returned error OFPBMC_BAD_FIELD
2240 nx_pull_match() returned error OFPBMC_BAD_FIELD
2243 # Check that at least the first warning made it. (It's rate-limited
2244 # so a variable number could show up, especially under valgrind etc.)
2245 AT_CHECK([grep '1-bits in value' stderr | sed 1q], [0], [dnl
2246 nx_match|WARN|Rejecting NXM/OXM entry 0:32768:2:1:16 with 1-bits in value for bits wildcarded by the mask.
2249 # Check that there wasn't any other stderr output.
2250 AT_CHECK([grep -v '1-bits in value' stderr], [1])
2253 AT_SETUP([ovs-ofctl parse-oxm (OpenFlow 1.3)])
2255 AT_DATA([oxm.txt], [dnl
2257 ONFOXM_ET_ACTSET_OUTPUT(00000000)
2258 ONFOXM_ET_ACTSET_OUTPUT(fffffffe)
2259 ONFOXM_ET_ACTSET_OUTPUT(fffffff7)
2260 OXM_OF_ACTSET_OUTPUT(00000000)
2261 OXM_OF_ACTSET_OUTPUT(fffffffe)
2262 OXM_OF_ACTSET_OUTPUT(fffffff7)
2264 AT_CHECK([ovs-ofctl '-vPATTERN:console:%c|%p|%m' --strict parse-oxm OpenFlow13 < oxm.txt],
2267 ONFOXM_ET_ACTSET_OUTPUT(00000000)
2268 ONFOXM_ET_ACTSET_OUTPUT(fffffffe)
2269 ONFOXM_ET_ACTSET_OUTPUT(fffffff7)
2270 ONFOXM_ET_ACTSET_OUTPUT(00000000)
2271 ONFOXM_ET_ACTSET_OUTPUT(fffffffe)
2272 ONFOXM_ET_ACTSET_OUTPUT(fffffff7)
2276 AT_SETUP([ovs-ofctl parse-oxm (OpenFlow 1.5)])
2278 AT_DATA([oxm.txt], [dnl
2279 # Extended registers 0 and 1.
2280 OXM_OF_PKT_REG0_W(acebdf5600000000/ffffffff00000000)
2281 OXM_OF_PKT_REG0_W(a0e0d05000000000/f0f0f0f000000000)
2282 OXM_OF_PKT_REG0_W(a0e0d05000000000/ffffffff00000000)
2283 OXM_OF_PKT_REG0_W(00000000acebdf56/00000000ffffffff)
2284 OXM_OF_PKT_REG0_W(a0e0d050a0e0d050/f0f0f0f0f0f0f0f0)
2285 OXM_OF_PKT_REG0_W(a0e0d050a0e0d050/f0f0f0f0ffffffff)
2286 OXM_OF_PKT_REG0_W(00000000a0e0d050/00000000f0f0f0f0), OXM_OF_PKT_REG1_W(a0e0d05000000000/f0f0f0f000000000)
2287 OXM_OF_PKT_REG0_W(00000000a0e0d050/00000000f0f0f0f0), OXM_OF_PKT_REG1_W(a0e0d05000000000/ffffffff00000000)
2289 # Registers 0, 1, and 2.
2290 # (OpenFlow 1.5 transforms these into the standard "xregs".)
2291 NXM_NX_REG0(acebdf56)
2292 NXM_NX_REG0_W(a0e0d050/f0f0f0f0)
2293 NXM_NX_REG0(a0e0d050)
2294 NXM_NX_REG1(acebdf56)
2295 NXM_NX_REG0_W(a0e0d050/f0f0f0f0), NXM_NX_REG1_W(a0e0d050/f0f0f0f0)
2296 NXM_NX_REG0_W(a0e0d050/f0f0f0f0), NXM_NX_REG1(a0e0d050)
2297 NXM_NX_REG1_W(a0e0d050/f0f0f0f0), NXM_NX_REG2_W(a0e0d050/f0f0f0f0)
2298 NXM_NX_REG1_W(a0e0d050/f0f0f0f0), NXM_NX_REG2(a0e0d050)
2301 ONFOXM_ET_ACTSET_OUTPUT(00000000)
2302 ONFOXM_ET_ACTSET_OUTPUT(fffffffe)
2303 ONFOXM_ET_ACTSET_OUTPUT(fffffff7)
2304 OXM_OF_ACTSET_OUTPUT(00000000)
2305 OXM_OF_ACTSET_OUTPUT(fffffffe)
2306 OXM_OF_ACTSET_OUTPUT(fffffff7)
2308 AT_CHECK([ovs-ofctl '-vPATTERN:console:%c|%p|%m' --strict parse-oxm OpenFlow15 < oxm.txt],
2310 # Extended registers 0 and 1.
2311 OXM_OF_PKT_REG0_W(acebdf5600000000/ffffffff00000000)
2312 OXM_OF_PKT_REG0_W(a0e0d05000000000/f0f0f0f000000000)
2313 OXM_OF_PKT_REG0_W(a0e0d05000000000/ffffffff00000000)
2314 OXM_OF_PKT_REG0_W(00000000acebdf56/00000000ffffffff)
2315 OXM_OF_PKT_REG0_W(a0e0d050a0e0d050/f0f0f0f0f0f0f0f0)
2316 OXM_OF_PKT_REG0_W(a0e0d050a0e0d050/f0f0f0f0ffffffff)
2317 OXM_OF_PKT_REG0_W(00000000a0e0d050/00000000f0f0f0f0), OXM_OF_PKT_REG1_W(a0e0d05000000000/f0f0f0f000000000)
2318 OXM_OF_PKT_REG0_W(00000000a0e0d050/00000000f0f0f0f0), OXM_OF_PKT_REG1_W(a0e0d05000000000/ffffffff00000000)
2320 # Registers 0, 1, and 2.
2321 # (OpenFlow 1.5 transforms these into the standard "xregs".)
2322 OXM_OF_PKT_REG0_W(acebdf5600000000/ffffffff00000000)
2323 OXM_OF_PKT_REG0_W(a0e0d05000000000/f0f0f0f000000000)
2324 OXM_OF_PKT_REG0_W(a0e0d05000000000/ffffffff00000000)
2325 OXM_OF_PKT_REG0_W(00000000acebdf56/00000000ffffffff)
2326 OXM_OF_PKT_REG0_W(a0e0d050a0e0d050/f0f0f0f0f0f0f0f0)
2327 OXM_OF_PKT_REG0_W(a0e0d050a0e0d050/f0f0f0f0ffffffff)
2328 OXM_OF_PKT_REG0_W(00000000a0e0d050/00000000f0f0f0f0), OXM_OF_PKT_REG1_W(a0e0d05000000000/f0f0f0f000000000)
2329 OXM_OF_PKT_REG0_W(00000000a0e0d050/00000000f0f0f0f0), OXM_OF_PKT_REG1_W(a0e0d05000000000/ffffffff00000000)
2332 OXM_OF_ACTSET_OUTPUT(00000000)
2333 OXM_OF_ACTSET_OUTPUT(fffffffe)
2334 OXM_OF_ACTSET_OUTPUT(fffffff7)
2335 OXM_OF_ACTSET_OUTPUT(00000000)
2336 OXM_OF_ACTSET_OUTPUT(fffffffe)
2337 OXM_OF_ACTSET_OUTPUT(fffffff7)
2341 AT_SETUP([ovs-ofctl parse-oxm loose])
2343 AT_DATA([oxm.txt], [dnl
2344 OXM_OF_IN_PORT(00000001), 01020304(1111/3333), OXM_OF_ETH_TYPE(0800)
2345 OXM_OF_IN_PORT(00000001), ffff020800002320(11112222), OXM_OF_ETH_TYPE(0800)
2346 OXM_OF_IN_PORT(00000001), ffff030800002320(1111/3333), OXM_OF_ETH_TYPE(0800)
2349 AT_CHECK([ovs-ofctl --strict parse-oxm OpenFlow12 < oxm.txt], [0], [dnl
2350 nx_pull_match() returned error OFPBMC_BAD_FIELD
2351 nx_pull_match() returned error OFPBMC_BAD_FIELD
2352 nx_pull_match() returned error OFPBMC_BAD_FIELD
2355 AT_CHECK([ovs-ofctl parse-oxm OpenFlow12 < oxm.txt], [0], [dnl
2356 OXM_OF_IN_PORT(00000001), OXM_OF_ETH_TYPE(0800)
2357 OXM_OF_IN_PORT(00000001), OXM_OF_ETH_TYPE(0800)
2358 OXM_OF_IN_PORT(00000001), OXM_OF_ETH_TYPE(0800)
2362 AT_SETUP([experimenter OXM encoding])
2363 AT_DATA([oxm.txt], [dnl
2364 NXM_NX_DP_HASH(01234567)
2365 NXOXM_ET_DP_HASH(01234567)
2367 NXM_NX_DP_HASH_W(01234567/0fffffff)
2368 NXOXM_ET_DP_HASH_W(01234567/0fffffff)
2371 # To allow for testing experimenter OXM, which doesn't really have many
2372 # examples in the wild, we've defined a variant of NXM_NX_DP_HASH that uses
2373 # the experimenter OXM mechanism, called NXOXM_ET_DP_HASH. We've defined
2374 # it as if it were introduced with OpenFlow 1.5, which gives us the
2375 # opportunity to see that both forms are accepted in all OpenFlow versions
2376 # but the experimenter form is used for encoding in OF1.5+.
2378 # First verify that both forms are accepted and NXOXM_ET_DP_HASH is encoded
2380 AT_CHECK([ovs-ofctl -m --strict parse-oxm OpenFlow15 < oxm.txt], [0], [dnl
2381 NXOXM_ET_DP_HASH(01234567)
2382 00000000 00 01 00 10 ff ff 00 08-00 00 23 20 01 23 45 67 @&t@
2383 NXOXM_ET_DP_HASH(01234567)
2384 00000000 00 01 00 10 ff ff 00 08-00 00 23 20 01 23 45 67 @&t@
2386 NXOXM_ET_DP_HASH_W(01234567/0fffffff)
2387 00000000 00 01 00 14 ff ff 01 0c-00 00 23 20 01 23 45 67 @&t@
2388 00000010 0f ff ff ff 00 00 00 00-
2389 NXOXM_ET_DP_HASH_W(01234567/0fffffff)
2390 00000000 00 01 00 14 ff ff 01 0c-00 00 23 20 01 23 45 67 @&t@
2391 00000010 0f ff ff ff 00 00 00 00-
2394 # Then verify that both forms are accepted and NXM_NX_DP_HASH is encoded
2396 AT_CHECK([ovs-ofctl -m --strict parse-oxm OpenFlow12 < oxm.txt], [0], [dnl
2397 NXM_NX_DP_HASH(01234567)
2398 00000000 00 01 00 0c 00 01 46 04-01 23 45 67 00 00 00 00 @&t@
2399 NXM_NX_DP_HASH(01234567)
2400 00000000 00 01 00 0c 00 01 46 04-01 23 45 67 00 00 00 00 @&t@
2402 NXM_NX_DP_HASH_W(01234567/0fffffff)
2403 00000000 00 01 00 10 00 01 47 08-01 23 45 67 0f ff ff ff @&t@
2404 NXM_NX_DP_HASH_W(01234567/0fffffff)
2405 00000000 00 01 00 10 00 01 47 08-01 23 45 67 0f ff ff ff @&t@
2409 AT_SETUP([check TCP flags expression in OXM and NXM])
2410 # NXM/OXM input for matching on TCP flags.
2411 tcp_flags='OXM_OF_ETH_TYPE(0800), OXM_OF_IP_PROTO(06), OXM_OF_TCP_FLAGS(0fff)'
2413 # Check that marshaling into NXM gives all NXM headers.
2414 AT_CHECK([echo "$tcp_flags" | ovs-ofctl parse-nxm], [0],
2415 [NXM_OF_ETH_TYPE(0800), NXM_OF_IP_PROTO(06), NXM_NX_TCP_FLAGS(0fff)
2418 # Check that marshaling in OXM for OF1.2 gives OXM headers except for
2419 # TCP flags, which didn't have an OXM definition.
2420 AT_CHECK([echo "$tcp_flags" | ovs-ofctl parse-oxm OpenFlow12], [0],
2421 [OXM_OF_ETH_TYPE(0800), OXM_OF_IP_PROTO(06), NXM_NX_TCP_FLAGS(0fff)
2424 # Check that marshaling in OXM for OF1.3 and OF1.4 gives OXM headers,
2425 # including the ONF extension for TCP flags introduced in OF1.3.
2426 AT_CHECK([echo "$tcp_flags" | ovs-ofctl parse-oxm OpenFlow13], [0],
2427 [OXM_OF_ETH_TYPE(0800), OXM_OF_IP_PROTO(06), ONFOXM_ET_TCP_FLAGS(0fff)
2429 AT_CHECK([echo "$tcp_flags" | ovs-ofctl parse-oxm OpenFlow14], [0],
2430 [OXM_OF_ETH_TYPE(0800), OXM_OF_IP_PROTO(06), ONFOXM_ET_TCP_FLAGS(0fff)
2433 # OpenFlow 1.5 added an OXM header for TCP flags:
2434 AT_CHECK([echo "$tcp_flags" | ovs-ofctl parse-oxm OpenFlow15], [0],
2435 [OXM_OF_ETH_TYPE(0800), OXM_OF_IP_PROTO(06), OXM_OF_TCP_FLAGS(0fff)
2439 dnl Check all of the patterns mentioned in the "VLAN Matching" section
2440 dnl in the DESIGN file at top level.
2441 AT_SETUP([ovs-ofctl check-vlan])
2445 AT_CHECK([ovs-ofctl check-vlan 0000 0000], [0], [dnl
2447 NXM: <any> -> 0000/0000
2448 OXM: <any> -> 0000/0000,--
2449 OF1.0: 0000/1,00/1 -> 0000/0000
2450 OF1.1: 0000/1,00/1 -> 0000/0000
2454 AT_CHECK([ovs-ofctl check-vlan 0000 ffff], [0], [dnl
2455 vlan_tci=0x0000 -> 0000/ffff
2456 NXM: NXM_OF_VLAN_TCI(0000) -> 0000/ffff
2457 OXM: OXM_OF_VLAN_VID(0000) -> 0000/1fff,--
2458 OF1.0: ffff/0,00/0 -> 0000/ffff
2459 OF1.1: ffff/0,00/1 -> 0000/ffff
2463 AT_CHECK([ovs-ofctl check-vlan 1abc 1fff], [0], [dnl
2464 dl_vlan=2748 -> 1abc/1fff
2465 NXM: NXM_OF_VLAN_TCI_W(1abc/1fff) -> 1abc/1fff
2466 OXM: OXM_OF_VLAN_VID(1abc) -> 1abc/1fff,--
2467 OF1.0: 0abc/0,00/1 -> 1abc/1fff
2468 OF1.1: 0abc/0,00/1 -> 1abc/1fff
2472 AT_CHECK([ovs-ofctl check-vlan b000 f000], [0], [dnl
2473 dl_vlan_pcp=5 -> b000/f000
2474 NXM: NXM_OF_VLAN_TCI_W(b000/f000) -> b000/f000
2475 OXM: OXM_OF_VLAN_VID_W(1000/1000), OXM_OF_VLAN_PCP(05) -> 1000/1000,05
2476 OF1.0: 0000/1,05/0 -> b000/f000
2477 OF1.1: fffe/0,05/0 -> b000/f000
2481 AT_CHECK([ovs-ofctl check-vlan babc ffff], [0], [dnl
2482 dl_vlan=2748,dl_vlan_pcp=5 -> babc/ffff
2483 NXM: NXM_OF_VLAN_TCI(babc) -> babc/ffff
2484 OXM: OXM_OF_VLAN_VID(1abc), OXM_OF_VLAN_PCP(05) -> 1abc/1fff,05
2485 OF1.0: 0abc/0,05/0 -> babc/ffff
2486 OF1.1: 0abc/0,05/0 -> babc/ffff
2490 AT_CHECK([ovs-ofctl check-vlan 0000 0fff], [0], [dnl
2491 vlan_tci=0x0000/0x0fff -> 0000/0fff
2492 NXM: NXM_OF_VLAN_TCI_W(0000/0fff) -> 0000/0fff
2493 OXM: OXM_OF_VLAN_VID_W(0000/0fff) -> 0000/0fff,--
2494 OF1.0: 0000/0,00/1 -> 1000/1fff
2495 OF1.1: 0000/0,00/1 -> 1000/1fff
2499 AT_CHECK([ovs-ofctl check-vlan 0000 f000], [0], [dnl
2500 vlan_tci=0x0000/0xf000 -> 0000/f000
2501 NXM: NXM_OF_VLAN_TCI_W(0000/f000) -> 0000/f000
2502 OXM: OXM_OF_VLAN_VID_W(0000/1000) -> 0000/1000,--
2503 OF1.0: ffff/0,00/0 -> 0000/ffff
2504 OF1.1: ffff/0,00/1 -> 0000/ffff
2508 AT_CHECK([ovs-ofctl check-vlan 0000 efff], [0], [dnl
2509 vlan_tci=0x0000/0xefff -> 0000/efff
2510 NXM: NXM_OF_VLAN_TCI_W(0000/efff) -> 0000/efff
2511 OXM: OXM_OF_VLAN_VID_W(0000/0fff) -> 0000/0fff,--
2512 OF1.0: 0000/0,00/0 -> 1000/ffff
2513 OF1.1: 0000/0,00/0 -> 1000/ffff
2517 AT_CHECK([ovs-ofctl check-vlan 1001 1001], [0], [dnl
2518 vlan_tci=0x1001/0x1001 -> 1001/1001
2519 NXM: NXM_OF_VLAN_TCI_W(1001/1001) -> 1001/1001
2520 OXM: OXM_OF_VLAN_VID_W(1001/1001) -> 1001/1001,--
2521 OF1.0: 0001/0,00/1 -> 1001/1fff
2522 OF1.1: 0001/0,00/1 -> 1001/1fff
2526 AT_CHECK([ovs-ofctl check-vlan 3000 3000], [0], [dnl
2527 vlan_tci=0x3000/0x3000 -> 3000/3000
2528 NXM: NXM_OF_VLAN_TCI_W(3000/3000) -> 3000/3000
2529 OXM: OXM_OF_VLAN_VID_W(1000/1000), OXM_OF_VLAN_PCP(01) -> 1000/1000,01
2530 OF1.0: 0000/1,01/0 -> 3000/f000
2531 OF1.1: fffe/0,01/0 -> 3000/f000
2536 dnl Check that "-F openflow10" rejects a flow_mod with unsupported features,
2537 dnl such as tunnels and metadata.
2538 AT_SETUP([ovs-ofctl -F option and NXM features])
2539 AT_CHECK([ovs-ofctl -F openflow10 add-flow dummy tun_id=123,actions=drop],
2540 [1], [], [ovs-ofctl: none of the usable flow formats (NXM,OXM) is among the allowed flow formats (OpenFlow10)
2542 AT_CHECK([ovs-ofctl -F openflow10 add-flow dummy metadata=123,actions=drop],
2543 [1], [], [ovs-ofctl: none of the usable flow formats (NXM,OXM,OpenFlow11) is among the allowed flow formats (OpenFlow10)
2547 dnl Check that "-F nxm" really forces add-flow to use the NXM flow format.
2548 dnl (If it doesn't, then either the tun_id won't show up at all, or it will
2549 dnl additionally show up as the top 32 bits of the cookie.) This checks
2550 dnl for regression against bug #4566.
2551 AT_SETUP([ovs-ofctl -F option with flow_mods])
2553 AT_CHECK([ovs-ofctl -F nxm add-flow br0 tun_id=0x12345678,actions=drop])
2554 AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip], [0], [dnl
2556 tun_id=0x12345678 actions=drop
2561 dnl Check that "-F openflow10" is really honored on dump-flows.
2562 dnl (If it isn't, then dump-flows will show the register match.)
2563 AT_SETUP([ovs-ofctl dump-flows honors -F option])
2565 AT_CHECK([ovs-ofctl add-flow br0 reg0=0x12345,actions=drop])
2566 AT_CHECK([ovs-ofctl -F openflow10 dump-flows br0 | ofctl_strip], [0], [dnl
2573 dnl Check that "-F openflow10" fails on dump-flows if the requested match
2574 dnl can't be represented in OpenFlow 1.0.
2575 AT_SETUP([ovs-ofctl dump-flows rejects bad -F option])
2577 AT_CHECK([ovs-ofctl -F openflow10 dump-flows unix:br0.mgmt reg0=0xabcdef], [1], [],
2578 [ovs-ofctl: none of the usable flow formats (NXM,OXM) is among the allowed flow formats (OpenFlow10)
2583 dnl Check that add-flow reports non-normalized flows (feature #5029).
2584 AT_SETUP([ovs-ofctl add-flow reports non-normalized flows])
2586 AT_CHECK([ovs-ofctl TESTABLE_LOG add-flow br0 nw_src=1.2.3.4,actions=5],
2588 ofp_util|INFO|normalization changed ofp_match, details:
2589 ofp_util|INFO| pre: nw_src=1.2.3.4
2590 ofp_util|INFO|post: @&t@
2595 dnl Check that --sort and --rsort works with dump-flows
2596 dnl Default field is 'priority'. Flow entries are displayed based
2597 dnl on field to sort.
2598 AT_SETUP([ovs-ofctl dump-flows with sorting])
2601 AT_DATA([allflows.txt], [[
2602 priority=4,in_port=23213 actions=output:42
2603 priority=5,in_port=1029 actions=output:43
2604 priority=7,in_port=1029 actions=output:43
2605 priority=3,in_port=1028 actions=output:44
2606 priority=1,in_port=1026 actions=output:45
2607 priority=6,in_port=1027 actions=output:64
2608 priority=2,in_port=1025 actions=output:47
2609 priority=8,tcp,tp_src=5 actions=drop
2610 priority=9,tcp,tp_src=6 actions=drop
2613 AT_CHECK([ovs-ofctl add-flows br0 allflows.txt
2615 AT_CHECK([ovs-ofctl --sort dump-flows br0 | ofctl_strip], [0], [dnl
2616 priority=1,in_port=1026 actions=output:45
2617 priority=2,in_port=1025 actions=output:47
2618 priority=3,in_port=1028 actions=output:44
2619 priority=4,in_port=23213 actions=output:42
2620 priority=5,in_port=1029 actions=output:43
2621 priority=6,in_port=1027 actions=output:64
2622 priority=7,in_port=1029 actions=output:43
2623 priority=8,tcp,tp_src=5 actions=drop
2624 priority=9,tcp,tp_src=6 actions=drop
2626 AT_CHECK([ovs-ofctl --rsort dump-flows br0 | ofctl_strip], [0], [dnl
2627 priority=9,tcp,tp_src=6 actions=drop
2628 priority=8,tcp,tp_src=5 actions=drop
2629 priority=7,in_port=1029 actions=output:43
2630 priority=6,in_port=1027 actions=output:64
2631 priority=5,in_port=1029 actions=output:43
2632 priority=4,in_port=23213 actions=output:42
2633 priority=3,in_port=1028 actions=output:44
2634 priority=2,in_port=1025 actions=output:47
2635 priority=1,in_port=1026 actions=output:45
2637 AT_CHECK([ovs-ofctl --sort=in_port dump-flows br0 | ofctl_strip], [0], [dnl
2638 priority=2,in_port=1025 actions=output:47
2639 priority=1,in_port=1026 actions=output:45
2640 priority=6,in_port=1027 actions=output:64
2641 priority=3,in_port=1028 actions=output:44
2642 priority=7,in_port=1029 actions=output:43
2643 priority=5,in_port=1029 actions=output:43
2644 priority=4,in_port=23213 actions=output:42
2645 priority=9,tcp,tp_src=6 actions=drop
2646 priority=8,tcp,tp_src=5 actions=drop
2648 AT_CHECK([ovs-ofctl --rsort=in_port dump-flows br0 | ofctl_strip], [0], [dnl
2649 priority=4,in_port=23213 actions=output:42
2650 priority=7,in_port=1029 actions=output:43
2651 priority=5,in_port=1029 actions=output:43
2652 priority=3,in_port=1028 actions=output:44
2653 priority=6,in_port=1027 actions=output:64
2654 priority=1,in_port=1026 actions=output:45
2655 priority=2,in_port=1025 actions=output:47
2656 priority=9,tcp,tp_src=6 actions=drop
2657 priority=8,tcp,tp_src=5 actions=drop
2659 AT_CHECK([ovs-ofctl --sort=tcp_src dump-flows br0 | ofctl_strip], [0], [dnl
2660 priority=8,tcp,tp_src=5 actions=drop
2661 priority=9,tcp,tp_src=6 actions=drop
2662 priority=7,in_port=1029 actions=output:43
2663 priority=6,in_port=1027 actions=output:64
2664 priority=5,in_port=1029 actions=output:43
2665 priority=4,in_port=23213 actions=output:42
2666 priority=3,in_port=1028 actions=output:44
2667 priority=2,in_port=1025 actions=output:47
2668 priority=1,in_port=1026 actions=output:45
2671 [ovs-ofctl --sort=in_port --sort=tcp_src dump-flows br0 | ofctl_strip], [0],
2672 [ priority=2,in_port=1025 actions=output:47
2673 priority=1,in_port=1026 actions=output:45
2674 priority=6,in_port=1027 actions=output:64
2675 priority=3,in_port=1028 actions=output:44
2676 priority=7,in_port=1029 actions=output:43
2677 priority=5,in_port=1029 actions=output:43
2678 priority=4,in_port=23213 actions=output:42
2679 priority=8,tcp,tp_src=5 actions=drop
2680 priority=9,tcp,tp_src=6 actions=drop
2685 AT_SETUP([ovs-ofctl diff-flows])
2688 # Add tons of flows to br0.
2689 for i in `seq 0 1023`; do echo "dl_vlan=$i,actions=drop"; done > add-flows.txt
2690 AT_CHECK([ovs-ofctl add-flows br0 add-flows.txt])
2692 # Dump them and compare against what we expect by hand, then with diff-flows.
2693 for i in `seq 0 1023`; do echo " dl_vlan=$i actions=drop"; done | sort > expout
2694 AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sed '/NXST_FLOW/d' | sort],
2696 AT_CHECK([ovs-ofctl diff-flows br0 add-flows.txt])
2698 # Remove even-numbered flows, compare again.
2699 for i in `seq 0 1023 2`; do echo "dl_vlan=$i"; done > del-flows.txt
2700 AT_CHECK([ovs-ofctl del-flows br0 - < del-flows.txt])
2701 for i in `seq 0 1023 2`; do echo "+dl_vlan=$i actions=drop"; done | sort > expout
2702 AT_CHECK([ovs-ofctl diff-flows br0 add-flows.txt | sort], [0], [expout])
2703 for i in `seq 0 1023 2`; do echo "-dl_vlan=$i actions=drop"; done | sort > expout
2704 AT_CHECK([ovs-ofctl diff-flows add-flows.txt br0 | sort], [0], [expout])
2709 dnl ofpacts that differ bytewise don't necessarily differ when
2710 dnl converted to another representation, such as OpenFlow 1.0
2711 dnl or to a string. "resubmit(,1)" is an example of an action
2712 dnl of this type: "ofpact_resubmit"s can differ in their "compat"
2713 dnl values even though this doesn't affect the string format.
2715 dnl This test checks that "ovs-ofctl diff-flows" doesn't report
2716 dnl false ofpacts differences.
2717 AT_SETUP([ovs-ofctl diff-flows - suppress false differences])
2719 AT_DATA([flows.txt], [actions=resubmit(,1)
2721 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
2722 AT_CHECK([ovs-ofctl diff-flows br0 flows.txt])
2723 AT_CHECK([ovs-ofctl add-flow br0 idle_timeout=60,dl_vlan=9,actions=output:1])
2724 AT_CHECK([ovs-ofctl diff-flows br0 flows.txt], [2], [dnl
2725 -dl_vlan=9 idle_timeout=60 actions=output:1
2727 AT_CHECK([ovs-ofctl add-flow br0 hard_timeout=120,cookie=1234,dl_vlan=9,actions=output:1])
2728 AT_CHECK([ovs-ofctl diff-flows flows.txt br0], [2], [dnl
2729 +dl_vlan=9 cookie=0x4d2 hard_timeout=120 actions=output:1
2734 AT_SETUP([ovs-ofctl -F and -O interaction])
2735 AT_CHECK([ovs-ofctl -F oxm -O openflow10], [1], [],
2736 [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.)
2738 AT_CHECK([ovs-ofctl -F oxm -O openflow11], [1], [],
2739 [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.)
2741 AT_CHECK([ovs-ofctl -F oxm -O openflow10,openflow11], [1], [],
2742 [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.)
2744 AT_CHECK([ovs-ofctl -F oxm -O openflow10,openflow12], [1], [],
2745 [ovs-ofctl: missing command name; use --help for help
2747 AT_CHECK([ovs-ofctl -F oxm -O openflow12], [1], [],
2748 [ovs-ofctl: missing command name; use --help for help
2750 AT_CHECK([ovs-ofctl -F oxm -O openflow13], [1], [],
2751 [ovs-ofctl: missing command name; use --help for help
2755 AT_SETUP([ovs-ofctl ofp-parse])
2756 # Test the echo request/reply messages (0 payload).
2757 AT_CHECK([printf '\1\2\0\10\0\0\0\0\1\3\0\10\0\0\0\0' > binary_ofp_msg])
2758 AT_CHECK([ovs-ofctl ofp-parse binary_ofp_msg], [0], [dnl
2759 OFPT_ECHO_REQUEST (xid=0x0): 0 bytes of payload
2760 OFPT_ECHO_REPLY (xid=0x0): 0 bytes of payload
2763 # Test the hello (xid:1 3-byte payload).
2764 AT_CHECK([printf '\1\0\0\13\0\0\0\1\101\102\103' > binary_ofp_msg])
2765 AT_CHECK([ovs-ofctl ofp-parse - < binary_ofp_msg], [0], [dnl
2766 OFPT_HELLO (xid=0x1):
2767 version bitmap: 0x01
2768 unknown data in hello:
2769 00000000 01 00 00 0b 00 00 00 01-41 42 43 |........ABC |
2773 AT_SETUP([tcp flags - filtering])
2774 OVS_VSWITCHD_START([add-port br0 p1 -- set Interface p1 type=dummy ofport_request=1 \
2775 -- add-port br0 p2 -- set Interface p2 type=dummy ofport_request=2])
2776 AT_DATA([flows.txt], [dnl
2777 in_port=1,tcp,tp_dst=80,tcp_flags=+syn-rst-ack-fin,action=2 # Allow outbound web traffic bare-SYN
2778 in_port=1,tcp,tp_dst=80,tcp_flags=+ack,action=2 # Allow outbound web traffic with ACK bit
2779 in_port=1,tcp,tp_dst=80,tcp_flags=+rst,action=2 # Allow outbound web traffic with RST bit
2780 in_port=2,tcp,tp_src=80,tcp_flags=+ack,action=1 # Allow inbound web traffic with ACK bit
2781 in_port=2,tcp,tp_src=80,tcp_flags=+rst,action=1 # Allow inbound web traffic with RST bit
2782 priority=0,in_port=1,action=drop # Default drop outbound
2783 priority=0,in_port=2,action=drop # Default drop inbound
2786 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
2788 AT_CHECK([ovs-ofctl add-flow br0 "tcp,tcp_flags=+ack-ack,action="], [1], [],
2789 [ovs-ofctl: ack: Each TCP flag can be specified only once
2792 AT_CHECK([ovs-appctl dpif/show | tail -n +4], [0], [dnl
2797 dnl Outbound web traffic with bare-SYN
2798 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])
2799 AT_CHECK([tail -1 stdout], [0],
2800 [Datapath actions: 2
2803 dnl Outbopund web traffic with ACK bit
2804 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])
2805 AT_CHECK([tail -1 stdout], [0],
2806 [Datapath actions: 2
2809 dnl Outbound web traffic with RST bit
2810 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])
2811 AT_CHECK([tail -1 stdout], [0],
2812 [Datapath actions: 2
2815 dnl Inbound web traffic with ACK bit
2816 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])
2817 AT_CHECK([tail -1 stdout], [0],
2818 [Datapath actions: 1
2821 dnl Inbound web traffic with RST bit
2822 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])
2823 AT_CHECK([tail -1 stdout], [0],
2824 [Datapath actions: 1
2827 dnl Inbound web traffic with SYN bit without ACK or RST bits
2828 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])
2829 AT_CHECK([tail -1 stdout], [0],
2830 [Datapath actions: drop
2836 dnl Check importance parameter added in OF1.4.
2837 dnl It validates whether importance set via add-flow via OpenFlow1.4+ gets
2838 dnl set or not by validating it against the dump-flows output via OpenFlow1.4+
2839 dnl If add-flow or dump-flows is used with later version of OpenFlow prior to 1.4+
2840 dnl then the importance will be considered zero whether provided as an argument.
2842 AT_SETUP([ovs-ofctl rule with importance])
2844 dnl Flow with importance parameter added via OF1.4+ and later version
2845 AT_CHECK([ovs-ofctl -O OpenFlow14 add-flow br0 priority=21,importance=21,actions=normal])
2846 AT_CHECK([ovs-ofctl add-flow br0 priority=22,importance=22,actions=normal])
2848 dnl Importance parameter will only be visible of flows that are added via OF1.4+ if dumped via OF1.4+
2849 AT_CHECK([ovs-ofctl -O OpenFlow14 dump-flows br0 | ofctl_strip | sed '/ST_FLOW reply/d' | sort], [0], [dnl
2850 importance=21, priority=21 actions=NORMAL
2851 reset_counts priority=22 actions=NORMAL
2854 dnl Importance parameter will not be visible if flow is dumped with previous version prior to OF1.4+ whether added via OF1.4+
2855 AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sed '/ST_FLOW reply/d' | sort], [0], [dnl
2856 priority=21 actions=NORMAL
2857 priority=22 actions=NORMAL
2864 dnl Importance parameter added in OF1.4.
2865 dnl This validates whether flows with importance
2866 dnl parameter are getting replaced with "replace-flows" or
2867 dnl not by validating dump-flows output after replace with the expected output.
2869 AT_SETUP([ovs-ofctl replace-flows with importance])
2872 dnl Add flows to br0 with importance via OF1.4+. For more details refer "ovs-ofctl rule with importance" test case.
2873 for i in 1 2 3 4 5 6 7 8; do echo "dl_vlan=$i,importance=$i,actions=drop"; done > add-flows.txt
2874 AT_CHECK([ovs-ofctl -O OpenFlow14 add-flows br0 add-flows.txt])
2876 dnl Replace the flows in the bridge.
2877 for i in 1 3 5 7; do echo " importance=`expr $i + 10`, dl_vlan=$i actions=drop"; done > replace-flows.txt
2878 AT_CHECK([ovs-ofctl -O OpenFlow14 replace-flows br0 replace-flows.txt])
2880 dnl Dump them and compare the dump flows output against the expected output.
2881 cat replace-flows.txt > expout
2882 AT_CHECK([ovs-ofctl -O OpenFlow14 dump-flows br0 | ofctl_strip | sed '/OFPST_FLOW/d' | sort],
2888 AT_SETUP([ovs-ofctl replace-flows with --bundle])
2891 AT_CHECK([ovs-appctl vlog/set vconn:dbg])
2893 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.
2894 for i in 1 2 3 4 5 6 7 8; do echo "table=$i,dl_vlan=$i,importance=$i,actions=drop"; done > add-flows.txt
2895 AT_CHECK([ovs-ofctl --bundle add-flows br0 add-flows.txt])
2897 dnl Replace some flows in the bridge.
2898 for i in 1 3 5 7; do echo " table=$i, importance=`expr $i + 10`, dl_vlan=$i actions=drop"; done > replace-flows.txt
2899 AT_CHECK([ovs-ofctl --bundle replace-flows br0 replace-flows.txt])
2901 dnl Dump them and compare the dump flows output against the expected output.
2902 cat replace-flows.txt > expout
2903 AT_CHECK([ovs-ofctl -O OpenFlow14 dump-flows br0 | ofctl_strip | sed '/OFPST_FLOW/d' | sort],
2906 dnl Check logs for OpenFlow trace
2908 OVS_WAIT_UNTIL([vconn_sub < ovs-vswitchd.log | test `grep -- "|vconn|DBG|unix: sent (Success): OFPST_FLOW reply" | wc -l` -ge 2])
2909 # AT_CHECK([sed -n "s/^.*\(|vconn|DBG|.*xid=.*:\).*$/\1/p" ovs-vswitchd.log], [0], [dnl
2910 AT_CHECK([print_vconn_debug | vconn_sub | ofctl_strip], [0], [dnl
2911 vconn|DBG|unix: sent (Success): OFPT_HELLO (OF1.5):
2912 version bitmap: 0x01, 0x02, 0x03, 0x04, 0x05, 0x06
2913 vconn|DBG|unix: received: OFPT_HELLO (OF1.4):
2914 version bitmap: 0x05
2915 vconn|DBG|unix: negotiated OpenFlow version 0x05 (we support version 0x06 and earlier, peer supports version 0x05)
2916 vconn|DBG|unix: received: OFPT_BUNDLE_CONTROL (OF1.4):
2917 bundle_id=0 type=OPEN_REQUEST flags=atomic ordered
2918 vconn|DBG|unix: sent (Success): OFPT_BUNDLE_CONTROL (OF1.4):
2919 bundle_id=0 type=OPEN_REPLY flags=0
2920 vconn|DBG|unix: received: OFPT_BUNDLE_ADD_MESSAGE (OF1.4):
2921 bundle_id=0 flags=atomic ordered
2922 OFPT_FLOW_MOD (OF1.4): ADD table:1 dl_vlan=1 importance:1 actions=drop
2923 vconn|DBG|unix: received: OFPT_BUNDLE_ADD_MESSAGE (OF1.4):
2924 bundle_id=0 flags=atomic ordered
2925 OFPT_FLOW_MOD (OF1.4): ADD table:2 dl_vlan=2 importance:2 actions=drop
2926 vconn|DBG|unix: received: OFPT_BUNDLE_ADD_MESSAGE (OF1.4):
2927 bundle_id=0 flags=atomic ordered
2928 OFPT_FLOW_MOD (OF1.4): ADD table:3 dl_vlan=3 importance:3 actions=drop
2929 vconn|DBG|unix: received: OFPT_BUNDLE_ADD_MESSAGE (OF1.4):
2930 bundle_id=0 flags=atomic ordered
2931 OFPT_FLOW_MOD (OF1.4): ADD table:4 dl_vlan=4 importance:4 actions=drop
2932 vconn|DBG|unix: received: OFPT_BUNDLE_ADD_MESSAGE (OF1.4):
2933 bundle_id=0 flags=atomic ordered
2934 OFPT_FLOW_MOD (OF1.4): ADD table:5 dl_vlan=5 importance:5 actions=drop
2935 vconn|DBG|unix: received: OFPT_BUNDLE_ADD_MESSAGE (OF1.4):
2936 bundle_id=0 flags=atomic ordered
2937 OFPT_FLOW_MOD (OF1.4): ADD table:6 dl_vlan=6 importance:6 actions=drop
2938 vconn|DBG|unix: received: OFPT_BUNDLE_ADD_MESSAGE (OF1.4):
2939 bundle_id=0 flags=atomic ordered
2940 OFPT_FLOW_MOD (OF1.4): ADD table:7 dl_vlan=7 importance:7 actions=drop
2941 vconn|DBG|unix: received: OFPT_BUNDLE_ADD_MESSAGE (OF1.4):
2942 bundle_id=0 flags=atomic ordered
2943 OFPT_FLOW_MOD (OF1.4): ADD table:8 dl_vlan=8 importance:8 actions=drop
2944 vconn|DBG|unix: received: OFPT_BUNDLE_CONTROL (OF1.4):
2945 bundle_id=0 type=COMMIT_REQUEST flags=atomic ordered
2946 vconn|DBG|unix: sent (Success): OFPT_BUNDLE_CONTROL (OF1.4):
2947 bundle_id=0 type=COMMIT_REPLY flags=0
2948 vconn|DBG|unix: sent (Success): OFPT_HELLO (OF1.5):
2949 version bitmap: 0x01, 0x02, 0x03, 0x04, 0x05, 0x06
2950 vconn|DBG|unix: received: OFPT_HELLO (OF1.4):
2951 version bitmap: 0x05
2952 vconn|DBG|unix: negotiated OpenFlow version 0x05 (we support version 0x06 and earlier, peer supports version 0x05)
2953 vconn|DBG|unix: received: OFPST_FLOW request (OF1.4):
2954 vconn|DBG|unix: sent (Success): OFPST_FLOW reply (OF1.4):
2955 table=1, importance=1, dl_vlan=1 actions=drop
2956 table=2, importance=2, dl_vlan=2 actions=drop
2957 table=3, importance=3, dl_vlan=3 actions=drop
2958 table=4, importance=4, dl_vlan=4 actions=drop
2959 table=5, importance=5, dl_vlan=5 actions=drop
2960 table=6, importance=6, dl_vlan=6 actions=drop
2961 table=7, importance=7, dl_vlan=7 actions=drop
2962 table=8, importance=8, dl_vlan=8 actions=drop
2963 vconn|DBG|unix: received: OFPT_BUNDLE_CONTROL (OF1.4):
2964 bundle_id=0 type=OPEN_REQUEST flags=atomic ordered
2965 vconn|DBG|unix: sent (Success): OFPT_BUNDLE_CONTROL (OF1.4):
2966 bundle_id=0 type=OPEN_REPLY flags=0
2967 vconn|DBG|unix: received: OFPT_BUNDLE_ADD_MESSAGE (OF1.4):
2968 bundle_id=0 flags=atomic ordered
2969 OFPT_FLOW_MOD (OF1.4): ADD table:1 dl_vlan=1 importance:11 actions=drop
2970 vconn|DBG|unix: received: OFPT_BUNDLE_ADD_MESSAGE (OF1.4):
2971 bundle_id=0 flags=atomic ordered
2972 OFPT_FLOW_MOD (OF1.4): DEL_STRICT table:2 dl_vlan=2 actions=drop
2973 vconn|DBG|unix: received: OFPT_BUNDLE_ADD_MESSAGE (OF1.4):
2974 bundle_id=0 flags=atomic ordered
2975 OFPT_FLOW_MOD (OF1.4): ADD table:3 dl_vlan=3 importance:13 actions=drop
2976 vconn|DBG|unix: received: OFPT_BUNDLE_ADD_MESSAGE (OF1.4):
2977 bundle_id=0 flags=atomic ordered
2978 OFPT_FLOW_MOD (OF1.4): DEL_STRICT table:4 dl_vlan=4 actions=drop
2979 vconn|DBG|unix: received: OFPT_BUNDLE_ADD_MESSAGE (OF1.4):
2980 bundle_id=0 flags=atomic ordered
2981 OFPT_FLOW_MOD (OF1.4): ADD table:5 dl_vlan=5 importance:15 actions=drop
2982 vconn|DBG|unix: received: OFPT_BUNDLE_ADD_MESSAGE (OF1.4):
2983 bundle_id=0 flags=atomic ordered
2984 OFPT_FLOW_MOD (OF1.4): DEL_STRICT table:6 dl_vlan=6 actions=drop
2985 vconn|DBG|unix: received: OFPT_BUNDLE_ADD_MESSAGE (OF1.4):
2986 bundle_id=0 flags=atomic ordered
2987 OFPT_FLOW_MOD (OF1.4): ADD table:7 dl_vlan=7 importance:17 actions=drop
2988 vconn|DBG|unix: received: OFPT_BUNDLE_ADD_MESSAGE (OF1.4):
2989 bundle_id=0 flags=atomic ordered
2990 OFPT_FLOW_MOD (OF1.4): DEL_STRICT table:8 dl_vlan=8 actions=drop
2991 vconn|DBG|unix: received: OFPT_BUNDLE_CONTROL (OF1.4):
2992 bundle_id=0 type=COMMIT_REQUEST flags=atomic ordered
2993 vconn|DBG|unix: sent (Success): OFPT_BUNDLE_CONTROL (OF1.4):
2994 bundle_id=0 type=COMMIT_REPLY flags=0
2995 vconn|DBG|unix: sent (Success): OFPT_HELLO (OF1.5):
2996 version bitmap: 0x01, 0x02, 0x03, 0x04, 0x05, 0x06
2997 vconn|DBG|unix: received: OFPT_HELLO (OF1.4):
2998 version bitmap: 0x05
2999 vconn|DBG|unix: negotiated OpenFlow version 0x05 (we support version 0x06 and earlier, peer supports version 0x05)
3000 vconn|DBG|unix: received: OFPST_FLOW request (OF1.4):
3001 vconn|DBG|unix: sent (Success): OFPST_FLOW reply (OF1.4):
3002 table=1, importance=11, dl_vlan=1 actions=drop
3003 table=3, importance=13, dl_vlan=3 actions=drop
3004 table=5, importance=15, dl_vlan=5 actions=drop
3005 table=7, importance=17, dl_vlan=7 actions=drop