3 AT_SETUP([ovs-ofctl parse-flows (OpenFlow 1.0)])
4 AT_DATA([flows.txt], [[
6 tcp,tp_src=123,actions=flood
7 in_port=LOCAL dl_vlan=9 dl_src=00:0A:E4:25:6B:B0 actions=drop
8 udp dl_vlan_pcp=7 idle_timeout=5 actions=strip_vlan output:0
9 tcp,nw_src=192.168.0.3,tp_dst=80 actions=set_queue:37,output:1
10 udp,nw_src=192.168.0.3,tp_dst=53 actions=pop_queue,output:1
11 cookie=0x123456789abcdef hard_timeout=10 priority=60000 actions=controller
12 actions=note:41.42.43,note:00.01.02.03.04.05.06.07,note
15 AT_CHECK([ovs-ofctl parse-flows flows.txt
17 AT_CHECK([[sed 's/ (xid=0x[0-9a-fA-F]*)//' stdout]], [0],
18 [[usable protocols: any
19 chosen protocol: OpenFlow10-table_id
20 OFPT_FLOW_MOD: ADD tcp,tp_src=123 actions=FLOOD
21 OFPT_FLOW_MOD: ADD in_port=65534,dl_vlan=9,dl_src=00:0a:e4:25:6b:b0 actions=drop
22 OFPT_FLOW_MOD: ADD udp,dl_vlan_pcp=7 idle:5 actions=strip_vlan,output:0
23 OFPT_FLOW_MOD: ADD tcp,nw_src=192.168.0.3,tp_dst=80 actions=set_queue:37,output:1
24 OFPT_FLOW_MOD: ADD udp,nw_src=192.168.0.3,tp_dst=53 actions=pop_queue,output:1
25 OFPT_FLOW_MOD: ADD priority=60000 cookie:0x123456789abcdef hard:10 actions=CONTROLLER:65535
26 OFPT_FLOW_MOD: ADD actions=note:41.42.43.00.00.00,note:00.01.02.03.04.05.06.07.00.00.00.00.00.00,note:00.00.00.00.00.00
30 AT_SETUP([ovs-ofctl parse-flows (NXM)])
31 AT_DATA([flows.txt], [[
33 tcp,tp_src=123,actions=flood
34 in_port=LOCAL dl_vlan=9 dl_src=00:0A:E4:25:6B:B0 actions=drop
35 udp dl_vlan_pcp=7 idle_timeout=5 actions=strip_vlan output:0
36 tcp,nw_src=192.168.0.3,tp_dst=80 actions=set_queue:37,output:1
37 udp,nw_src=192.168.0.3,tp_dst=53 actions=pop_queue,output:1
38 cookie=0x123456789abcdef hard_timeout=10 priority=60000 actions=controller
39 actions=note:41.42.43,note:00.01.02.03.04.05.06.07,note
40 tcp,tp_src=0x1230/0xfff0,tun_id=0x1234,cookie=0x5678,actions=flood
41 actions=set_tunnel:0x1234,set_tunnel64:0x9876,set_tunnel:0x123456789
42 actions=multipath(eth_src, 50, hrw, 12, 0, NXM_NX_REG0[0..3]),multipath(symmetric_l4, 1024, iter_hash, 5000, 5050, NXM_NX_REG0[0..12])
44 tun_id=0x1234000056780000/0xffff0000ffff0000,actions=drop
45 actions=bundle(eth_src,50,active_backup,ofport,slaves:1)
46 actions=bundle(symmetric_l4,60,hrw,ofport,slaves:2,3)
47 actions=bundle(symmetric_l4,60,hrw,ofport,slaves:)
48 actions=output:1,bundle(eth_src,0,hrw,ofport,slaves:1),output:2
49 actions=bundle_load(eth_src,50,active_backup,ofport,NXM_NX_REG0[],slaves:1)
50 actions=bundle_load(symmetric_l4,60,hrw,ofport,NXM_NX_REG0[0..15],slaves:2,3)
51 actions=bundle_load(symmetric_l4,60,hrw,ofport,NXM_NX_REG0[0..15],slaves:[2,3])
52 actions=bundle_load(symmetric_l4,60,hrw,ofport,NXM_NX_REG0[0..30],slaves:)
53 actions=output:1,bundle_load(eth_src,0,hrw,ofport,NXM_NX_REG0[16..31],slaves:1),output:2
54 actions=resubmit:1,resubmit(2),resubmit(,3),resubmit(2,3)
55 send_flow_rem,actions=output:1,output:NXM_NX_REG0[],output:2,output:NXM_NX_REG1[16..31],output:3
56 check_overlap,actions=output:1,exit,output:2
57 actions=fin_timeout(idle_timeout=5,hard_timeout=15)
58 actions=controller(max_len=123,reason=invalid_ttl,id=555)
61 AT_CHECK([ovs-ofctl parse-flows flows.txt
63 AT_CHECK([[sed 's/ (xid=0x[0-9a-fA-F]*)//' stdout]], [0],
64 [[usable protocols: NXM+table_id
65 chosen protocol: NXM+table_id
66 NXT_FLOW_MOD: ADD table:255 tcp,tp_src=123 actions=FLOOD
67 NXT_FLOW_MOD: ADD table:255 in_port=65534,dl_vlan=9,dl_src=00:0a:e4:25:6b:b0 actions=drop
68 NXT_FLOW_MOD: ADD table:255 udp,dl_vlan_pcp=7 idle:5 actions=strip_vlan,output:0
69 NXT_FLOW_MOD: ADD table:255 tcp,nw_src=192.168.0.3,tp_dst=80 actions=set_queue:37,output:1
70 NXT_FLOW_MOD: ADD table:255 udp,nw_src=192.168.0.3,tp_dst=53 actions=pop_queue,output:1
71 NXT_FLOW_MOD: ADD table:255 priority=60000 cookie:0x123456789abcdef hard:10 actions=CONTROLLER:65535
72 NXT_FLOW_MOD: ADD table:255 actions=note:41.42.43.00.00.00,note:00.01.02.03.04.05.06.07.00.00.00.00.00.00,note:00.00.00.00.00.00
73 NXT_FLOW_MOD: ADD table:255 tcp,tun_id=0x1234,tp_src=0x1230/0xfff0 cookie:0x5678 actions=FLOOD
74 NXT_FLOW_MOD: ADD table:255 actions=set_tunnel:0x1234,set_tunnel64:0x9876,set_tunnel64:0x123456789
75 NXT_FLOW_MOD: ADD table:255 actions=multipath(eth_src,50,hrw,12,0,NXM_NX_REG0[0..3]),multipath(symmetric_l4,1024,iter_hash,5000,5050,NXM_NX_REG0[0..12])
76 NXT_FLOW_MOD: ADD table:1 actions=drop
77 NXT_FLOW_MOD: ADD table:255 tun_id=0x1234000056780000/0xffff0000ffff0000 actions=drop
78 NXT_FLOW_MOD: ADD table:255 actions=bundle(eth_src,50,active_backup,ofport,slaves:1)
79 NXT_FLOW_MOD: ADD table:255 actions=bundle(symmetric_l4,60,hrw,ofport,slaves:2,3)
80 NXT_FLOW_MOD: ADD table:255 actions=bundle(symmetric_l4,60,hrw,ofport,slaves:)
81 NXT_FLOW_MOD: ADD table:255 actions=output:1,bundle(eth_src,0,hrw,ofport,slaves:1),output:2
82 NXT_FLOW_MOD: ADD table:255 actions=bundle_load(eth_src,50,active_backup,ofport,NXM_NX_REG0[],slaves:1)
83 NXT_FLOW_MOD: ADD table:255 actions=bundle_load(symmetric_l4,60,hrw,ofport,NXM_NX_REG0[0..15],slaves:2,3)
84 NXT_FLOW_MOD: ADD table:255 actions=bundle_load(symmetric_l4,60,hrw,ofport,NXM_NX_REG0[0..15],slaves:2,3)
85 NXT_FLOW_MOD: ADD table:255 actions=bundle_load(symmetric_l4,60,hrw,ofport,NXM_NX_REG0[0..30],slaves:)
86 NXT_FLOW_MOD: ADD table:255 actions=output:1,bundle_load(eth_src,0,hrw,ofport,NXM_NX_REG0[16..31],slaves:1),output:2
87 NXT_FLOW_MOD: ADD table:255 actions=resubmit:1,resubmit:2,resubmit(,3),resubmit(2,3)
88 NXT_FLOW_MOD: ADD table:255 send_flow_rem actions=output:1,output:NXM_NX_REG0[],output:2,output:NXM_NX_REG1[16..31],output:3
89 NXT_FLOW_MOD: ADD table:255 check_overlap actions=output:1,exit,output:2
90 NXT_FLOW_MOD: ADD table:255 actions=fin_timeout(idle_timeout=5,hard_timeout=15)
91 NXT_FLOW_MOD: ADD table:255 actions=controller(reason=invalid_ttl,max_len=123,id=555)
95 AT_SETUP([ovs-ofctl -F nxm parse-flows])
96 AT_DATA([flows.txt], [
98 tcp,tp_src=123,actions=flood
99 in_port=LOCAL dl_vlan=9 dl_src=00:0A:E4:25:6B:B0 actions=drop
100 arp,dl_src=00:0A:E4:25:6B:B0,arp_sha=00:0A:E4:25:6B:B0 actions=drop
101 ipv6,ipv6_label=0x12345 actions=2
102 ipv6,ipv6_src=2001:db8:3c4d:1:2:3:4:5 actions=3
103 ipv6,ipv6_src=2001:db8:3c4d:1:2:3:4:5/64 actions=4
104 ipv6,ipv6_dst=2001:db8:3c4d:1:2:3:4:5/127 actions=5
105 tcp6,ipv6_src=2001:db8:3c4d:1::1,tp_dst=80 actions=drop
106 udp6,ipv6_src=2001:db8:3c4d:1::3,tp_dst=53 actions=drop
107 in_port=3 icmp6,ipv6_src=2001:db8:3c4d:1::1,icmp_type=134 actions=drop
108 udp dl_vlan_pcp=7 idle_timeout=5 actions=strip_vlan output:0
109 tcp,nw_src=192.168.0.3,tp_dst=80 actions=set_queue:37,output:1
110 udp,nw_src=192.168.0.3,tp_dst=53 actions=pop_queue,output:1
111 icmp6,icmp_type=135,nd_target=FEC0::1234:F045:8FFF:1111:FE4E:0571 actions=drop
112 icmp6,icmp_type=135,nd_target=FEC0::1234:F045:8FFF:1111:FE4F:0571/112 actions=drop
113 icmp6,icmp_type=135,nd_sll=00:0A:E4:25:6B:B0 actions=drop
114 icmp6,icmp_type=136,nd_target=FEC0::1234:F045:8FFF:1111:FE4E:0571,nd_tll=00:0A:E4:25:6B:B1 actions=drop
115 icmp6,icmp_type=136,nd_target=FEC0::1234:F045:8FFF:1111:FE00:0000/96,nd_tll=00:0A:E4:25:6B:B1 actions=drop
116 cookie=0x123456789abcdef hard_timeout=10 priority=60000 actions=controller
117 actions=note:41.42.43,note:00.01.02.03.04.05.06.07,note
118 tun_id=0x1234,cookie=0x5678,actions=flood
120 tun_id=0x1234000056780000/0xffff0000ffff0000,actions=drop
121 dl_dst=01:00:00:00:00:00/01:00:00:00:00:00,actions=drop
122 dl_dst=00:00:00:00:00:00/01:00:00:00:00:00,actions=drop
123 dl_dst=aa:bb:cc:dd:ee:ff/fe:ff:ff:ff:ff:ff,actions=drop
124 dl_dst=aa:bb:cc:dd:ee:ff/00:00:00:00:00:00,actions=drop
126 AT_CHECK([ovs-ofctl -F nxm parse-flows flows.txt], [0], [stdout])
127 AT_CHECK([[sed 's/ (xid=0x[0-9a-fA-F]*)//' stdout]], [0], [dnl
128 usable protocols: NXM
129 chosen protocol: NXM-table_id
130 NXT_FLOW_MOD: ADD tcp,tp_src=123 actions=FLOOD
131 NXT_FLOW_MOD: ADD in_port=65534,dl_vlan=9,dl_src=00:0a:e4:25:6b:b0 actions=drop
132 NXT_FLOW_MOD: ADD arp,dl_src=00:0a:e4:25:6b:b0,arp_sha=00:0a:e4:25:6b:b0 actions=drop
133 NXT_FLOW_MOD: ADD ipv6,ipv6_label=0x12345 actions=output:2
134 NXT_FLOW_MOD: ADD ipv6,ipv6_src=2001:db8:3c4d:1:2:3:4:5 actions=output:3
135 NXT_FLOW_MOD: ADD ipv6,ipv6_src=2001:db8:3c4d:1::/64 actions=output:4
136 NXT_FLOW_MOD: ADD ipv6,ipv6_dst=2001:db8:3c4d:1:2:3:4:4/127 actions=output:5
137 NXT_FLOW_MOD: ADD tcp6,ipv6_src=2001:db8:3c4d:1::1,tp_dst=80 actions=drop
138 NXT_FLOW_MOD: ADD udp6,ipv6_src=2001:db8:3c4d:1::3,tp_dst=53 actions=drop
139 NXT_FLOW_MOD: ADD icmp6,in_port=3,ipv6_src=2001:db8:3c4d:1::1,icmp_type=134 actions=drop
140 NXT_FLOW_MOD: ADD udp,dl_vlan_pcp=7 idle:5 actions=strip_vlan,output:0
141 NXT_FLOW_MOD: ADD tcp,nw_src=192.168.0.3,tp_dst=80 actions=set_queue:37,output:1
142 NXT_FLOW_MOD: ADD udp,nw_src=192.168.0.3,tp_dst=53 actions=pop_queue,output:1
143 NXT_FLOW_MOD: ADD icmp6,icmp_type=135,nd_target=fec0:0:1234:f045:8fff:1111:fe4e:571 actions=drop
144 NXT_FLOW_MOD: ADD icmp6,icmp_type=135,nd_target=fec0:0:1234:f045:8fff:1111:fe4f:0/112 actions=drop
145 NXT_FLOW_MOD: ADD icmp6,icmp_type=135,nd_sll=00:0a:e4:25:6b:b0 actions=drop
146 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
147 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
148 NXT_FLOW_MOD: ADD priority=60000 cookie:0x123456789abcdef hard:10 actions=CONTROLLER:65535
149 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
150 NXT_FLOW_MOD: ADD tun_id=0x1234 cookie:0x5678 actions=FLOOD
151 NXT_FLOW_MOD: ADD actions=drop
152 NXT_FLOW_MOD: ADD tun_id=0x1234000056780000/0xffff0000ffff0000 actions=drop
153 NXT_FLOW_MOD: ADD dl_dst=01:00:00:00:00:00/01:00:00:00:00:00 actions=drop
154 NXT_FLOW_MOD: ADD dl_dst=00:00:00:00:00:00/01:00:00:00:00:00 actions=drop
155 NXT_FLOW_MOD: ADD dl_dst=aa:bb:cc:dd:ee:ff/fe:ff:ff:ff:ff:ff actions=drop
156 NXT_FLOW_MOD: ADD actions=drop
160 AT_SETUP([ovs-ofctl -F nxm -mmm parse-flows])
161 AT_DATA([flows.txt], [[
163 tcp,tp_src=123,actions=flood
164 in_port=LOCAL dl_vlan=9 dl_src=00:0A:E4:25:6B:B0 actions=drop
165 arp,dl_src=00:0A:E4:25:6B:B0,arp_sha=00:0A:E4:25:6B:B0 actions=drop
166 ipv6,ipv6_label=0x12345 actions=2
167 ipv6,ipv6_src=2001:db8:3c4d:1:2:3:4:5 actions=3
168 ipv6,ipv6_src=2001:db8:3c4d:1:2:3:4:5/64 actions=4
169 ipv6,ipv6_dst=2001:db8:3c4d:1:2:3:4:5/127 actions=5
170 tcp6,ipv6_src=2001:db8:3c4d:1::1,tp_dst=80 actions=drop
171 udp6,ipv6_src=2001:db8:3c4d:1::3,tp_dst=53 actions=drop
172 in_port=3 icmp6,ipv6_src=2001:db8:3c4d:1::1,icmp_type=134 actions=drop
173 udp dl_vlan_pcp=7 idle_timeout=5 actions=strip_vlan output:0
174 tcp,nw_src=192.168.0.3,tp_dst=80 actions=set_queue:37,output:1
175 udp,nw_src=192.168.0.3,tp_dst=53 actions=pop_queue,output:1
176 icmp6,icmp_type=135,nd_target=FEC0::1234:F045:8FFF:1111:FE4E:0571 actions=drop
177 icmp6,icmp_type=135,nd_sll=00:0A:E4:25:6B:B0 actions=drop
178 icmp6,icmp_type=136,nd_target=FEC0::1234:F045:8FFF:1111:FE4E:0571,nd_tll=00:0A:E4:25:6B:B1 actions=drop
179 cookie=0x123456789abcdef hard_timeout=10 priority=60000 actions=controller
180 actions=note:41.42.43,note:00.01.02.03.04.05.06.07,note
181 tun_id=0x1234,cookie=0x5678,actions=flood
183 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[]
184 actions=move:OXM_OF_ETH_DST[]->OXM_OF_ETH_SRC[]
185 actions=autopath(5,NXM_NX_REG0[])
186 vlan_tci=0x1123/0x1fff,actions=drop
188 AT_CHECK([ovs-ofctl -F nxm -mmm parse-flows flows.txt], [0], [stdout])
189 AT_CHECK([[sed 's/ (xid=0x[0-9a-fA-F]*)//' stdout]], [0],
190 [[usable protocols: NXM
191 chosen protocol: NXM-table_id
192 NXT_FLOW_MOD: ADD NXM_OF_ETH_TYPE(0800), NXM_OF_IP_PROTO(06), NXM_OF_TCP_SRC(007b) actions=FLOOD
193 NXT_FLOW_MOD: ADD NXM_OF_IN_PORT(fffe), NXM_OF_ETH_SRC(000ae4256bb0), NXM_OF_VLAN_TCI_W(1009/1fff) actions=drop
194 NXT_FLOW_MOD: ADD NXM_OF_ETH_SRC(000ae4256bb0), NXM_OF_ETH_TYPE(0806), NXM_NX_ARP_SHA(000ae4256bb0) actions=drop
195 NXT_FLOW_MOD: ADD NXM_OF_ETH_TYPE(86dd), NXM_NX_IPV6_LABEL(00012345) actions=output:2
196 NXT_FLOW_MOD: ADD NXM_OF_ETH_TYPE(86dd), NXM_NX_IPV6_SRC(20010db83c4d00010002000300040005) actions=output:3
197 NXT_FLOW_MOD: ADD NXM_OF_ETH_TYPE(86dd), NXM_NX_IPV6_SRC_W(20010db83c4d00010000000000000000/ffffffffffffffff0000000000000000) actions=output:4
198 NXT_FLOW_MOD: ADD NXM_OF_ETH_TYPE(86dd), NXM_NX_IPV6_DST_W(20010db83c4d00010002000300040004/fffffffffffffffffffffffffffffffe) actions=output:5
199 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
200 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
201 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
202 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
203 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
204 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
205 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
206 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
207 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
208 NXT_FLOW_MOD: ADD <any> cookie:0x123456789abcdef hard:10 pri:60000 actions=CONTROLLER:65535
209 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
210 NXT_FLOW_MOD: ADD NXM_NX_TUN_ID(0000000000001234) cookie:0x5678 actions=FLOOD
211 NXT_FLOW_MOD: ADD <any> actions=drop
212 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[]
213 NXT_FLOW_MOD: ADD <any> actions=move:NXM_OF_ETH_DST[]->NXM_OF_ETH_SRC[]
214 NXT_FLOW_MOD: ADD <any> actions=autopath(5,NXM_NX_REG0[])
215 NXT_FLOW_MOD: ADD NXM_OF_VLAN_TCI_W(1123/1fff) actions=drop
219 AT_SETUP([ovs-ofctl parse-nx-match])
220 AT_KEYWORDS([nx-match])
221 AT_DATA([nx-match.txt], [dnl
229 NXM_OF_ETH_DST(0002e30f80a4)
230 NXM_OF_ETH_DST_W(010000000000/010000000000)
231 NXM_OF_ETH_DST_W(000000000000/010000000000)
232 NXM_OF_ETH_DST_W(ffffffffffff/010000000000)
233 NXM_OF_ETH_DST_W(0002e30f80a4/ffffffffffff)
234 NXM_OF_ETH_DST_W(0002e30f80a4/feffffffffff)
235 NXM_OF_ETH_DST_W(60175619848f/5a5a5a5a5a5a)
238 NXM_OF_ETH_SRC(020898456ddb)
239 NXM_OF_ETH_SRC_W(012345abcdef/ffffff555555)
240 NXM_OF_ETH_SRC_W(020898456ddb/ffffffffffff)
243 NXM_OF_ETH_TYPE(0800)
244 NXM_OF_ETH_TYPE(0800) NXM_OF_IN_PORT(0012)
247 NXM_OF_VLAN_TCI(f009)
248 NXM_OF_VLAN_TCI(f009) NXM_OF_VLAN_TCI(f009)
249 NXM_OF_VLAN_TCI(0000) # Packets without 802.1Q header.
250 NXM_OF_VLAN_TCI(3123) # Packets with VID=123, PCP=1.
251 NXM_OF_VLAN_TCI(0123) # Does not make sense (but supported anyway)
252 NXM_OF_VLAN_TCI_W(1123/1fff) # Packets with VID=123, any PCP.
253 NXM_OF_VLAN_TCI_W(f000/f000) # Packets with any VID, PCP=7.
254 NXM_OF_VLAN_TCI_W(0000/e000) # No 802.1Q or with VID=0
257 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_TOS(f0)
258 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_TOS(41)
262 NXM_OF_ETH_TYPE(0800) NXM_NX_IP_ECN(03)
263 NXM_OF_ETH_TYPE(0800) NXM_NX_IP_ECN(06)
267 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_PROTO(01)
268 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_PROTO(05)
272 NXM_OF_ETH_TYPE(0800) NXM_NX_IP_TTL(80)
273 NXM_OF_ETH_TYPE(86dd) NXM_NX_IP_TTL(ff)
277 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_SRC(ac100014)
278 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_SRC_W(C0a80000/FFFF0000)
279 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_SRC_W(C0a80000/5a5a5a5a)
280 NXM_OF_ETH_TYPE(0806) NXM_OF_IP_SRC(ac100014)
281 NXM_OF_IP_SRC_W(C0D80000/FFFF0000)
284 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_DST(ac100014)
285 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_DST_W(C0a88012/FFFF0000)
286 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_DST_W(C0a80000/5a5a5a5a)
287 NXM_OF_IP_DST(ac100014)
288 NXM_OF_ETH_TYPE(0806) NXM_OF_IP_DST_W(C0D80000/FFFF0000)
291 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_PROTO(06) NXM_OF_TCP_SRC(4231)
292 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_PROTO(06) NXM_OF_TCP_SRC_W(5050/F0F0)
293 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_PROTO(07) NXM_OF_TCP_SRC(4231)
295 # TCP destination port
296 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_PROTO(06) NXM_OF_TCP_DST(4231)
297 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_PROTO(06) NXM_OF_TCP_DST_W(FDE0/FFF0)
298 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_PROTO(07) NXM_OF_TCP_DST(4231)
301 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_PROTO(11) NXM_OF_UDP_SRC(8732)
302 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_PROTO(11) NXM_OF_UDP_SRC_W(0132/01FF)
303 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_PROTO(06) NXM_OF_UDP_SRC(7823)
305 # UDP destination port
306 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_PROTO(11) NXM_OF_UDP_DST(1782)
307 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_PROTO(11) NXM_OF_UDP_DST_W(5005/F00F)
308 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_PROTO(02) NXM_OF_UDP_DST(1293)
311 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_PROTO(01) NXM_OF_ICMP_TYPE(12)
312 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_PROTO(00) NXM_OF_ICMP_TYPE(10)
315 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_PROTO(01) NXM_OF_ICMP_CODE(12)
316 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_PROTO(00) NXM_OF_ICMP_CODE(10)
317 NXM_OF_ETH_TYPE(0800) NXM_OF_ICMP_CODE(10)
321 NXM_OF_ETH_TYPE(0806) NXM_OF_ARP_OP(0001)
322 NXM_OF_ETH_TYPE(0806) NXM_OF_ARP_OP(1111)
323 NXM_OF_ETH_TYPE(0000) NXM_OF_ARP_OP(0001)
325 NXM_OF_ETH_TYPE(0806) NXM_OF_ARP_OP(0001) NXM_OF_ARP_OP(0001)
327 # ARP source protocol address
328 NXM_OF_ETH_TYPE(0806) NXM_OF_ARP_SPA(ac100014)
329 NXM_OF_ETH_TYPE(0806) NXM_OF_ARP_SPA_W(C0a81234/FFFFFF00)
330 NXM_OF_ETH_TYPE(0806) NXM_OF_ARP_SPA_W(C0a81234/aaaaaa00)
331 NXM_OF_ETH_TYPE(0800) NXM_OF_ARP_SPA(ac100014)
332 NXM_OF_ARP_SPA_W(C0D8fedc/FFFF0000)
334 # ARP destination protocol address
335 NXM_OF_ETH_TYPE(0806) NXM_OF_ARP_TPA(ac100014)
336 NXM_OF_ETH_TYPE(0806) NXM_OF_ARP_TPA_W(C0a812fe/FFFFFF00)
337 NXM_OF_ETH_TYPE(0806) NXM_OF_ARP_TPA_W(C0a81234/77777777)
338 NXM_OF_ETH_TYPE(0800) NXM_OF_ARP_TPA(ac100014)
339 NXM_OF_ARP_TPA_W(C0D80000/FFFF0000)
341 # ARP source hardware address
342 NXM_OF_ETH_TYPE(0806) NXM_NX_ARP_SHA(0002e30f80a4)
343 NXM_OF_ETH_TYPE(0800) NXM_NX_ARP_SHA(0002e30f80a4)
344 NXM_NX_ARP_SHA(0002e30f80a4)
346 # ARP destination hardware address
347 NXM_OF_ETH_TYPE(0806) NXM_NX_ARP_THA(0002e30f80a4)
348 NXM_OF_ETH_TYPE(0800) NXM_NX_ARP_THA(0002e30f80a4)
349 NXM_NX_ARP_THA(0002e30f80a4)
352 NXM_OF_ETH_TYPE(86dd) NXM_NX_IPV6_SRC(20010db83c4d00010002000300040005)
353 NXM_OF_ETH_TYPE(0800) NXM_NX_IPV6_SRC(20010db83c4d00010002000300040005)
354 NXM_OF_ETH_TYPE(86dd) NXM_NX_IPV6_SRC_W(20010db83c4d00010000000000000000/ffffffffffffffff0000000000000000)
355 NXM_OF_ETH_TYPE(86dd) NXM_NX_IPV6_SRC_W(20010db83c4d00010000000000000000/5a5a5a5a5a5a5a5a0000000000000000)
356 NXM_OF_ETH_TYPE(0800) NXM_NX_IPV6_SRC_W(20010db83c4d00010000000000000000/ffffffffffffffff0000000000000000)
359 NXM_OF_ETH_TYPE(86dd) NXM_NX_IPV6_DST(20010db83c4d00010002000300040005)
360 NXM_OF_ETH_TYPE(0800) NXM_NX_IPV6_DST(20010db83c4d00010002000300040005)
361 NXM_OF_ETH_TYPE(86dd) NXM_NX_IPV6_DST_W(20010db83c4d00010000000000000000/77777777777777777777777777777777)
362 NXM_OF_ETH_TYPE(0800) NXM_NX_IPV6_DST_W(20010db83c4d00010000000000000000/ffffffffffffffff0000000000000000)
365 NXM_OF_ETH_TYPE(86dd) NXM_NX_IPV6_LABEL(1000000f)
366 NXM_NX_IPV6_LABEL(0000000f)
367 NXM_OF_ETH_TYPE(86dd) NXM_NX_IPV6_LABEL(0000000f)
370 NXM_OF_ETH_TYPE(86dd) NXM_OF_IP_PROTO(3a) NXM_NX_ICMPV6_TYPE(87) NXM_NX_ND_TARGET(20010db83c4d00010002000300040005)
371 NXM_OF_ETH_TYPE(86dd) NXM_OF_IP_PROTO(3a) NXM_NX_ICMPV6_TYPE(88) NXM_NX_ND_TARGET(20010db83c4d00010002000300040005)
372 NXM_OF_ETH_TYPE(86dd) NXM_OF_IP_PROTO(3a) NXM_NX_ICMPV6_TYPE(87) NXM_NX_ND_TARGET_W(20010db83c4d00010002000300040005/0123456789abcdeffedcba9876543210)
373 NXM_OF_ETH_TYPE(86dd) NXM_OF_IP_PROTO(3a) NXM_NX_ICMPV6_TYPE(88) NXM_NX_ND_TARGET_W(20010db83c4d00010002000300040005/fedcba98765432100123456789abcdef)
375 # ND source hardware address
376 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)
377 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)
378 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)
379 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)
381 # ND destination hardware address
382 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)
383 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)
384 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)
385 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)
388 NXM_OF_ETH_TYPE(0800) NXM_NX_IP_FRAG(00)
389 NXM_OF_ETH_TYPE(0800) NXM_NX_IP_FRAG(01)
390 NXM_OF_ETH_TYPE(0800) NXM_NX_IP_FRAG(02)
391 NXM_OF_ETH_TYPE(0800) NXM_NX_IP_FRAG(03)
392 NXM_OF_ETH_TYPE(0800) NXM_NX_IP_FRAG_W(00/03)
393 NXM_OF_ETH_TYPE(0800) NXM_NX_IP_FRAG_W(00/fd)
394 NXM_OF_ETH_TYPE(0800) NXM_NX_IP_FRAG_W(00/02)
395 NXM_OF_ETH_TYPE(0800) NXM_NX_IP_FRAG_W(01/01)
396 NXM_OF_ETH_TYPE(0800) NXM_NX_IP_FRAG_W(02/02)
397 NXM_OF_ETH_TYPE(0800) NXM_NX_IP_FRAG_W(03/03)
398 NXM_OF_ETH_TYPE(0800) NXM_NX_IP_FRAG(f3)
401 NXM_OF_ETH_TYPE(86dd) NXM_NX_IP_FRAG(00)
402 NXM_OF_ETH_TYPE(86dd) NXM_NX_IP_FRAG(01)
403 NXM_OF_ETH_TYPE(86dd) NXM_NX_IP_FRAG(02)
404 NXM_OF_ETH_TYPE(86dd) NXM_NX_IP_FRAG(03)
405 NXM_OF_ETH_TYPE(86dd) NXM_NX_IP_FRAG_W(00/03)
406 NXM_OF_ETH_TYPE(86dd) NXM_NX_IP_FRAG_W(00/01)
407 NXM_OF_ETH_TYPE(86dd) NXM_NX_IP_FRAG_W(00/02)
408 NXM_OF_ETH_TYPE(86dd) NXM_NX_IP_FRAG_W(01/01)
409 NXM_OF_ETH_TYPE(86dd) NXM_NX_IP_FRAG_W(02/02)
410 NXM_OF_ETH_TYPE(86dd) NXM_NX_IP_FRAG_W(03/03)
411 NXM_OF_ETH_TYPE(86dd) NXM_NX_IP_FRAG(f3)
414 NXM_NX_COOKIE(00000000abcdef01)
415 NXM_NX_COOKIE_W(84200000abcdef01/84200000FFFFFFFF)
418 NXM_NX_TUN_ID(00000000abcdef01)
419 NXM_NX_TUN_ID_W(84200000abcdef01/84200000FFFFFFFF)
422 NXM_NX_REG0(acebdf56)
423 NXM_NX_REG0_W(a0e0d050/f0f0f0f0)
425 # Invalid field number.
428 # Unimplemented registers.
430 # This test assumes that at least two registers, but fewer than 16,
431 # registers are implemented.
433 00010108(12345678/12345678)
435 00011f08(12345678/12345678)
437 AT_CHECK([ovs-ofctl --strict parse-nx-match < nx-match.txt], [0], [dnl
445 NXM_OF_ETH_DST(0002e30f80a4)
446 NXM_OF_ETH_DST_W(010000000000/010000000000)
447 NXM_OF_ETH_DST_W(000000000000/010000000000)
448 NXM_OF_ETH_DST_W(010000000000/010000000000)
449 NXM_OF_ETH_DST(0002e30f80a4)
450 NXM_OF_ETH_DST_W(0002e30f80a4/feffffffffff)
451 NXM_OF_ETH_DST_W(40125218000a/5a5a5a5a5a5a)
454 NXM_OF_ETH_SRC(020898456ddb)
455 NXM_OF_ETH_SRC_W(012345014545/ffffff555555)
456 NXM_OF_ETH_SRC(020898456ddb)
459 NXM_OF_ETH_TYPE(0800)
460 NXM_OF_IN_PORT(0012), NXM_OF_ETH_TYPE(0800)
463 NXM_OF_VLAN_TCI(f009)
464 nx_pull_match() returned error OFPBMC_DUP_FIELD
465 NXM_OF_VLAN_TCI(0000)
466 NXM_OF_VLAN_TCI(3123)
467 NXM_OF_VLAN_TCI(0123)
468 NXM_OF_VLAN_TCI_W(1123/1fff)
469 NXM_OF_VLAN_TCI_W(f000/f000)
470 NXM_OF_VLAN_TCI_W(0000/e000)
473 NXM_OF_ETH_TYPE(0800), NXM_OF_IP_TOS(f0)
474 nx_pull_match() returned error OFPBMC_BAD_VALUE
475 nx_pull_match() returned error OFPBMC_BAD_PREREQ
478 NXM_OF_ETH_TYPE(0800), NXM_NX_IP_ECN(03)
479 nx_pull_match() returned error OFPBMC_BAD_VALUE
480 nx_pull_match() returned error OFPBMC_BAD_PREREQ
483 NXM_OF_ETH_TYPE(0800), NXM_OF_IP_PROTO(01)
484 NXM_OF_ETH_TYPE(0800), NXM_OF_IP_PROTO(05)
485 nx_pull_match() returned error OFPBMC_BAD_PREREQ
488 NXM_OF_ETH_TYPE(0800), NXM_NX_IP_TTL(80)
489 NXM_OF_ETH_TYPE(86dd), NXM_NX_IP_TTL(ff)
490 nx_pull_match() returned error OFPBMC_BAD_PREREQ
493 NXM_OF_ETH_TYPE(0800), NXM_OF_IP_SRC(ac100014)
494 NXM_OF_ETH_TYPE(0800), NXM_OF_IP_SRC_W(c0a80000/ffff0000)
495 NXM_OF_ETH_TYPE(0800), NXM_OF_IP_SRC_W(40080000/5a5a5a5a)
496 nx_pull_match() returned error OFPBMC_BAD_PREREQ
497 nx_pull_match() returned error OFPBMC_BAD_PREREQ
500 NXM_OF_ETH_TYPE(0800), NXM_OF_IP_DST(ac100014)
501 NXM_OF_ETH_TYPE(0800), NXM_OF_IP_DST_W(c0a80000/ffff0000)
502 NXM_OF_ETH_TYPE(0800), NXM_OF_IP_DST_W(40080000/5a5a5a5a)
503 nx_pull_match() returned error OFPBMC_BAD_PREREQ
504 nx_pull_match() returned error OFPBMC_BAD_PREREQ
507 NXM_OF_ETH_TYPE(0800), NXM_OF_IP_PROTO(06), NXM_OF_TCP_SRC(4231)
508 NXM_OF_ETH_TYPE(0800), NXM_OF_IP_PROTO(06), NXM_OF_TCP_SRC_W(5050/f0f0)
509 nx_pull_match() returned error OFPBMC_BAD_PREREQ
511 # TCP destination port
512 NXM_OF_ETH_TYPE(0800), NXM_OF_IP_PROTO(06), NXM_OF_TCP_DST(4231)
513 NXM_OF_ETH_TYPE(0800), NXM_OF_IP_PROTO(06), NXM_OF_TCP_DST_W(fde0/fff0)
514 nx_pull_match() returned error OFPBMC_BAD_PREREQ
517 NXM_OF_ETH_TYPE(0800), NXM_OF_IP_PROTO(11), NXM_OF_UDP_SRC(8732)
518 NXM_OF_ETH_TYPE(0800), NXM_OF_IP_PROTO(11), NXM_OF_UDP_SRC_W(0132/01ff)
519 nx_pull_match() returned error OFPBMC_BAD_PREREQ
521 # UDP destination port
522 NXM_OF_ETH_TYPE(0800), NXM_OF_IP_PROTO(11), NXM_OF_UDP_DST(1782)
523 NXM_OF_ETH_TYPE(0800), NXM_OF_IP_PROTO(11), NXM_OF_UDP_DST_W(5005/f00f)
524 nx_pull_match() returned error OFPBMC_BAD_PREREQ
527 NXM_OF_ETH_TYPE(0800), NXM_OF_IP_PROTO(01), NXM_OF_ICMP_TYPE(12)
528 nx_pull_match() returned error OFPBMC_BAD_PREREQ
531 NXM_OF_ETH_TYPE(0800), NXM_OF_IP_PROTO(01), NXM_OF_ICMP_CODE(12)
532 nx_pull_match() returned error OFPBMC_BAD_PREREQ
533 nx_pull_match() returned error OFPBMC_BAD_PREREQ
534 nx_pull_match() returned error OFPBMC_BAD_PREREQ
537 NXM_OF_ETH_TYPE(0806), NXM_OF_ARP_OP(0001)
538 nx_pull_match() returned error OFPBMC_BAD_VALUE
539 nx_pull_match() returned error OFPBMC_BAD_PREREQ
540 nx_pull_match() returned error OFPBMC_BAD_PREREQ
541 nx_pull_match() returned error OFPBMC_DUP_FIELD
543 # ARP source protocol address
544 NXM_OF_ETH_TYPE(0806), NXM_OF_ARP_SPA(ac100014)
545 NXM_OF_ETH_TYPE(0806), NXM_OF_ARP_SPA_W(c0a81200/ffffff00)
546 NXM_OF_ETH_TYPE(0806), NXM_OF_ARP_SPA_W(80a80200/aaaaaa00)
547 nx_pull_match() returned error OFPBMC_BAD_PREREQ
548 nx_pull_match() returned error OFPBMC_BAD_PREREQ
550 # ARP destination protocol address
551 NXM_OF_ETH_TYPE(0806), NXM_OF_ARP_TPA(ac100014)
552 NXM_OF_ETH_TYPE(0806), NXM_OF_ARP_TPA_W(c0a81200/ffffff00)
553 NXM_OF_ETH_TYPE(0806), NXM_OF_ARP_TPA_W(40201234/77777777)
554 nx_pull_match() returned error OFPBMC_BAD_PREREQ
555 nx_pull_match() returned error OFPBMC_BAD_PREREQ
557 # ARP source hardware address
558 NXM_OF_ETH_TYPE(0806), NXM_NX_ARP_SHA(0002e30f80a4)
559 nx_pull_match() returned error OFPBMC_BAD_PREREQ
560 nx_pull_match() returned error OFPBMC_BAD_PREREQ
562 # ARP destination hardware address
563 NXM_OF_ETH_TYPE(0806), NXM_NX_ARP_THA(0002e30f80a4)
564 nx_pull_match() returned error OFPBMC_BAD_PREREQ
565 nx_pull_match() returned error OFPBMC_BAD_PREREQ
568 NXM_OF_ETH_TYPE(86dd), NXM_NX_IPV6_SRC(20010db83c4d00010002000300040005)
569 nx_pull_match() returned error OFPBMC_BAD_PREREQ
570 NXM_OF_ETH_TYPE(86dd), NXM_NX_IPV6_SRC_W(20010db83c4d00010000000000000000/ffffffffffffffff0000000000000000)
571 NXM_OF_ETH_TYPE(86dd), NXM_NX_IPV6_SRC_W(00000818184800000000000000000000/5a5a5a5a5a5a5a5a0000000000000000)
572 nx_pull_match() returned error OFPBMC_BAD_PREREQ
575 NXM_OF_ETH_TYPE(86dd), NXM_NX_IPV6_DST(20010db83c4d00010002000300040005)
576 nx_pull_match() returned error OFPBMC_BAD_PREREQ
577 NXM_OF_ETH_TYPE(86dd), NXM_NX_IPV6_DST_W(20010530344500010000000000000000/77777777777777777777777777777777)
578 nx_pull_match() returned error OFPBMC_BAD_PREREQ
581 nx_pull_match() returned error OFPBMC_BAD_VALUE
582 nx_pull_match() returned error OFPBMC_BAD_PREREQ
583 NXM_OF_ETH_TYPE(86dd), NXM_NX_IPV6_LABEL(0000000f)
586 NXM_OF_ETH_TYPE(86dd), NXM_OF_IP_PROTO(3a), NXM_NX_ICMPV6_TYPE(87), NXM_NX_ND_TARGET(20010db83c4d00010002000300040005)
587 NXM_OF_ETH_TYPE(86dd), NXM_OF_IP_PROTO(3a), NXM_NX_ICMPV6_TYPE(88), NXM_NX_ND_TARGET(20010db83c4d00010002000300040005)
588 NXM_OF_ETH_TYPE(86dd), NXM_OF_IP_PROTO(3a), NXM_NX_ICMPV6_TYPE(87), NXM_NX_ND_TARGET_W(00010520080900010000000000040000/0123456789abcdeffedcba9876543210)
589 NXM_OF_ETH_TYPE(86dd), NXM_OF_IP_PROTO(3a), NXM_NX_ICMPV6_TYPE(88), NXM_NX_ND_TARGET_W(20000898344400000002000300000005/fedcba98765432100123456789abcdef)
591 # ND source hardware address
592 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)
593 nx_pull_match() returned error OFPBMC_BAD_PREREQ
594 nx_pull_match() returned error OFPBMC_BAD_PREREQ
595 nx_pull_match() returned error OFPBMC_BAD_PREREQ
597 # ND destination hardware address
598 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)
599 nx_pull_match() returned error OFPBMC_BAD_PREREQ
600 nx_pull_match() returned error OFPBMC_BAD_PREREQ
601 nx_pull_match() returned error OFPBMC_BAD_PREREQ
604 NXM_OF_ETH_TYPE(0800), NXM_NX_IP_FRAG(00)
605 NXM_OF_ETH_TYPE(0800), NXM_NX_IP_FRAG(01)
606 NXM_OF_ETH_TYPE(0800), NXM_NX_IP_FRAG(02)
607 NXM_OF_ETH_TYPE(0800), NXM_NX_IP_FRAG(03)
608 NXM_OF_ETH_TYPE(0800), NXM_NX_IP_FRAG(00)
609 NXM_OF_ETH_TYPE(0800), NXM_NX_IP_FRAG_W(00/01)
610 NXM_OF_ETH_TYPE(0800), NXM_NX_IP_FRAG_W(00/02)
611 NXM_OF_ETH_TYPE(0800), NXM_NX_IP_FRAG_W(01/01)
612 NXM_OF_ETH_TYPE(0800), NXM_NX_IP_FRAG_W(02/02)
613 NXM_OF_ETH_TYPE(0800), NXM_NX_IP_FRAG(03)
614 nx_pull_match() returned error OFPBMC_BAD_VALUE
617 NXM_OF_ETH_TYPE(86dd), NXM_NX_IP_FRAG(00)
618 NXM_OF_ETH_TYPE(86dd), NXM_NX_IP_FRAG(01)
619 NXM_OF_ETH_TYPE(86dd), NXM_NX_IP_FRAG(02)
620 NXM_OF_ETH_TYPE(86dd), NXM_NX_IP_FRAG(03)
621 NXM_OF_ETH_TYPE(86dd), NXM_NX_IP_FRAG(00)
622 NXM_OF_ETH_TYPE(86dd), NXM_NX_IP_FRAG_W(00/01)
623 NXM_OF_ETH_TYPE(86dd), NXM_NX_IP_FRAG_W(00/02)
624 NXM_OF_ETH_TYPE(86dd), NXM_NX_IP_FRAG_W(01/01)
625 NXM_OF_ETH_TYPE(86dd), NXM_NX_IP_FRAG_W(02/02)
626 NXM_OF_ETH_TYPE(86dd), NXM_NX_IP_FRAG(03)
627 nx_pull_match() returned error OFPBMC_BAD_VALUE
630 NXM_NX_COOKIE(00000000abcdef01)
631 NXM_NX_COOKIE_W(84200000abcdef01/84200000ffffffff)
634 NXM_NX_TUN_ID(00000000abcdef01)
635 NXM_NX_TUN_ID_W(84200000abcdef01/84200000ffffffff)
638 NXM_NX_REG0(acebdf56)
639 NXM_NX_REG0_W(a0e0d050/f0f0f0f0)
641 # Invalid field number.
642 nx_pull_match() returned error OFPBMC_BAD_FIELD
644 # Unimplemented registers.
646 # This test assumes that at least two registers, but fewer than 16,
647 # registers are implemented.
648 NXM_NX_REG0(12345678)
649 NXM_NX_REG0_W(12345678/12345678)
650 nx_pull_match() returned error OFPBMC_BAD_FIELD
651 nx_pull_match() returned error OFPBMC_BAD_FIELD
655 AT_SETUP([ovs-ofctl parse-ofp11-match])
657 AT_DATA([test-data], [dnl
659 0000 0058 fffffffe 000003fe dnl
660 000000000000ffffffffffff 000000000000ffffffffffff dnl
661 0000 00 00 0000 00 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
662 00000000 00 000000 0000000000000000ffffffffffffffff
664 # bad ofp11_match: OFPBMC_BAD_VALUE
665 & ofp_util|WARN|port 305419896 is outside the supported range 0 through 65279 or 0xffffff00 through 0xffffffff
666 0000 0058 12345678 000003fe dnl
667 000000000000ffffffffffff 000000000000ffffffffffff dnl
668 0000 00 00 0000 00 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
669 00000000 00 000000 0000000000000000ffffffffffffffff
671 # dl_src=00:01:02:03:04:05
672 0000 0058 00000000 000003ff dnl
673 000102030405000000000000 000000000000ffffffffffff dnl
674 0000 00 00 0000 00 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
675 00000000 00 000000 0000000000000000ffffffffffffffff
677 # dl_src=55:55:55:55:55:55/55:55:55:55:55:55
678 0000 0058 00000000 000003ff dnl
679 555555555555aaaaaaaaaaaa 000000000000ffffffffffff dnl
680 0000 00 00 0000 00 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
681 00000000 00 000000 0000000000000000ffffffffffffffff
683 # dl_dst=00:01:02:03:04:05
684 0000 0058 00000000 000003ff dnl
685 000000000000ffffffffffff 000102030405000000000000 dnl
686 0000 00 00 0000 00 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
687 00000000 00 000000 0000000000000000ffffffffffffffff
689 # dl_dst=01:00:00:00:00:00/01:00:00:00:00:00
690 0000 0058 00000000 000003ff dnl
691 000000000000ffffffffffff 010000000000feffffffffff dnl
692 0000 00 00 0000 00 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
693 00000000 00 000000 0000000000000000ffffffffffffffff
695 # dl_dst=00:01:02:03:04:05/fe:ff:ff:ff:ff:ff
696 0000 0058 00000000 000003ff dnl
697 000000000000ffffffffffff 000102030405010000000000 dnl
698 0000 00 00 0000 00 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
699 00000000 00 000000 0000000000000000ffffffffffffffff
701 # dl_dst=55:55:55:55:55:55/55:55:55:55:55:55
702 0000 0058 00000000 000003ff dnl
703 000000000000ffffffffffff 555555555555aaaaaaaaaaaa dnl
704 0000 00 00 0000 00 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
705 00000000 00 000000 0000000000000000ffffffffffffffff
707 dnl dl_vlan_pcp is ignored if dl_vlan is wildcarded, which causes the
708 dnl the wildcard bit and the dl_vlan_pcp to be dropped for output:
712 0000 0058 00000001 000003fa dnl
713 000000000000ffffffffffff 000000000000ffffffffffff dnl
714 0000 03 00 0000 00 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
715 00000000 00 000000 0000000000000000ffffffffffffffff
718 0000 0058 00000000 000003fd dnl
719 000000000000ffffffffffff 000000000000ffffffffffff dnl
720 0123 00 00 0000 00 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
721 00000000 00 000000 0000000000000000ffffffffffffffff
725 0000 0058 00000000 000003fd dnl
726 000000000000ffffffffffff 000000000000ffffffffffff dnl
727 ffff 00 00 0000 00 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
728 00000000 00 000000 0000000000000000ffffffffffffffff
730 dnl OFPVID_NONE ignores dl_vlan_pcp even if not wildcarded, which causes
731 dnl the wildcard bit and the dl_vlan_pcp to be dropped for output:
735 0000 0058 00000000 000003f9 dnl
736 000000000000ffffffffffff 000000000000ffffffffffff dnl
737 ffff 05 00 0000 00 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
738 00000000 00 000000 0000000000000000ffffffffffffffff
740 # vlan_tci=0x1000/0x1000
741 0000 0058 00000000 000003fd dnl
742 000000000000ffffffffffff 000000000000ffffffffffff dnl
743 fffe 00 00 0000 00 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
744 00000000 00 000000 0000000000000000ffffffffffffffff
747 # bad ofp11_match: OFPBMC_BAD_VALUE
748 0000 0058 00000000 000003fd dnl
749 000000000000ffffffffffff 000000000000ffffffffffff dnl
750 1234 00 00 0000 00 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
751 00000000 00 000000 0000000000000000ffffffffffffffff
754 0000 0058 00000000 000003f9 dnl
755 000000000000ffffffffffff 000000000000ffffffffffff dnl
756 fffe 04 00 0000 00 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
757 00000000 00 000000 0000000000000000ffffffffffffffff
759 # dl_vlan=10,dl_vlan_pcp=6
760 0000 0058 00000000 000003f9 dnl
761 000000000000ffffffffffff 000000000000ffffffffffff dnl
762 000a 06 00 0000 00 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
763 00000000 00 000000 0000000000000000ffffffffffffffff
766 0000 0058 00000000 000003f7 dnl
767 000000000000ffffffffffff 000000000000ffffffffffff dnl
768 0000 00 00 1234 00 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
769 00000000 00 000000 0000000000000000ffffffffffffffff
772 0000 0058 00000000 000003e7 dnl
773 000000000000ffffffffffff 000000000000ffffffffffff dnl
774 0000 00 00 0800 fc 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
775 00000000 00 000000 0000000000000000ffffffffffffffff
778 # bad ofp11_match: OFPBMC_BAD_VALUE
779 0000 0058 00000000 000003e7 dnl
780 000000000000ffffffffffff 000000000000ffffffffffff dnl
781 0000 00 00 0800 01 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
782 00000000 00 000000 0000000000000000ffffffffffffffff
785 0000 0058 00000000 000003d7 dnl
786 000000000000ffffffffffff 000000000000ffffffffffff dnl
787 0000 00 00 0800 00 05 00000000ffffffff 00000000ffffffff 0000 0000 dnl
788 00000000 00 000000 0000000000000000ffffffffffffffff
791 0000 0058 00000000 000003d7 dnl
792 000000000000ffffffffffff 000000000000ffffffffffff dnl
793 0000 00 00 0806 00 02 00000000ffffffff 00000000ffffffff 0000 0000 dnl
794 00000000 00 000000 0000000000000000ffffffffffffffff
796 # ip,nw_src=192.168.128.0/24
797 0000 0058 00000000 000003f7 dnl
798 000000000000ffffffffffff 000000000000ffffffffffff dnl
799 0000 00 00 0800 00 00 c0a88000000000ff 00000000ffffffff 0000 0000 dnl
800 00000000 00 000000 0000000000000000ffffffffffffffff
802 # ip,nw_src=128.160.128.0/165.165.165.165
805 0000 0058 00000000 000003f7 dnl
806 000000000000ffffffffffff 000000000000ffffffffffff dnl
807 0000 00 00 0800 00 00 c0a880005a5a5a5a 00000000ffffffff 0000 0000 dnl
808 00000000 00 000000 0000000000000000ffffffffffffffff
810 # ip,nw_dst=192.168.128.0/24
811 0000 0058 00000000 000003f7 dnl
812 000000000000ffffffffffff 000000000000ffffffffffff dnl
813 0000 00 00 0800 00 00 00000000ffffffff c0a88000000000ff 0000 0000 dnl
814 00000000 00 000000 0000000000000000ffffffffffffffff
816 # ip,nw_dst=128.160.128.0/165.165.165.165
819 0000 0058 00000000 000003f7 dnl
820 000000000000ffffffffffff 000000000000ffffffffffff dnl
821 0000 00 00 0800 00 00 00000000ffffffff c0a880005a5a5a5a 0000 0000 dnl
822 00000000 00 000000 0000000000000000ffffffffffffffff
824 # arp,nw_src=192.168.128.0/24
825 0000 0058 00000000 000003f7 dnl
826 000000000000ffffffffffff 000000000000ffffffffffff dnl
827 0000 00 00 0806 00 00 c0a88000000000ff 00000000ffffffff 0000 0000 dnl
828 00000000 00 000000 0000000000000000ffffffffffffffff
830 # arp,nw_dst=192.168.128.0/24
831 0000 0058 00000000 000003f7 dnl
832 000000000000ffffffffffff 000000000000ffffffffffff dnl
833 0000 00 00 0806 00 00 00000000ffffffff c0a88000000000ff 0000 0000 dnl
834 00000000 00 000000 0000000000000000ffffffffffffffff
837 0000 0058 00000000 00000397 dnl
838 000000000000ffffffffffff 000000000000ffffffffffff dnl
839 0000 00 00 0800 00 06 00000000ffffffff 00000000ffffffff 01bb 0000 dnl
840 00000000 00 000000 0000000000000000ffffffffffffffff
843 0000 0058 00000000 00000357 dnl
844 000000000000ffffffffffff 000000000000ffffffffffff dnl
845 0000 00 00 0800 00 06 00000000ffffffff 00000000ffffffff 0000 01bb dnl
846 00000000 00 000000 0000000000000000ffffffffffffffff
849 0000 0058 00000000 00000397 dnl
850 000000000000ffffffffffff 000000000000ffffffffffff dnl
851 0000 00 00 0800 00 11 00000000ffffffff 00000000ffffffff 01bb 0000 dnl
852 00000000 00 000000 0000000000000000ffffffffffffffff
855 0000 0058 00000000 00000397 dnl
856 000000000000ffffffffffff 000000000000ffffffffffff dnl
857 0000 00 00 0800 00 01 00000000ffffffff 00000000ffffffff 0005 0000 dnl
858 00000000 00 000000 0000000000000000ffffffffffffffff
861 0000 0058 00000000 00000357 dnl
862 000000000000ffffffffffff 000000000000ffffffffffff dnl
863 0000 00 00 0800 00 01 00000000ffffffff 00000000ffffffff 0000 0008 dnl
864 00000000 00 000000 0000000000000000ffffffffffffffff
867 0000 0058 00000000 00000397 dnl
868 000000000000ffffffffffff 000000000000ffffffffffff dnl
869 0000 00 00 0800 00 11 00000000ffffffff 00000000ffffffff 01bb 0000 dnl
870 00000000 00 000000 0000000000000000ffffffffffffffff
873 0000 0058 00000000 00000357 dnl
874 000000000000ffffffffffff 000000000000ffffffffffff dnl
875 0000 00 00 0800 00 11 00000000ffffffff 00000000ffffffff 0000 01bb dnl
876 00000000 00 000000 0000000000000000ffffffffffffffff
880 0000 0058 00000000 000003d7 dnl
881 000000000000ffffffffffff 000000000000ffffffffffff dnl
882 0000 00 00 0800 00 84 00000000ffffffff 00000000ffffffff 0000 0000 dnl
883 00000000 00 000000 0000000000000000ffffffffffffffff
885 dnl SCTP tp_src matching not supported:
886 # bad ofp11_match: OFPBMC_BAD_FIELD
887 0000 0058 00000000 00000397 dnl
888 000000000000ffffffffffff 000000000000ffffffffffff dnl
889 0000 00 00 0800 00 84 00000000ffffffff 00000000ffffffff 01bb 0000 dnl
890 00000000 00 000000 0000000000000000ffffffffffffffff
892 dnl SCTP tp_dst matching not supported:
893 # bad ofp11_match: OFPBMC_BAD_FIELD
894 0000 0058 00000000 00000357 dnl
895 000000000000ffffffffffff 000000000000ffffffffffff dnl
896 0000 00 00 0800 00 84 00000000ffffffff 00000000ffffffff 0000 01bb dnl
897 00000000 00 000000 0000000000000000ffffffffffffffff
899 dnl Ignore tp_src if not TCP or UDP or SCTP:
904 0000 0058 00000000 00000397 dnl
905 000000000000ffffffffffff 000000000000ffffffffffff dnl
906 0000 00 00 0800 00 15 00000000ffffffff 00000000ffffffff 01bb 0000 dnl
907 00000000 00 000000 0000000000000000ffffffffffffffff
909 dnl Ignore tp_dst if not TCP or UDP or SCTP:
914 0000 0058 00000000 00000357 dnl
915 000000000000ffffffffffff 000000000000ffffffffffff dnl
916 0000 00 00 0800 00 16 00000000ffffffff 00000000ffffffff 0000 01bb dnl
917 00000000 00 000000 0000000000000000ffffffffffffffff
919 dnl mpls_label not yet supported:
920 # bad ofp11_match: OFPBMC_BAD_TAG
921 0000 0058 00000000 000002f7 dnl
922 000000000000ffffffffffff 000000000000ffffffffffff dnl
923 0000 00 00 8847 00 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
924 12345678 00 000000 0000000000000000ffffffffffffffff
926 dnl mpls_tc not yet supported:
927 # bad ofp11_match: OFPBMC_BAD_TAG
928 0000 0058 00000000 000001f7 dnl
929 000000000000ffffffffffff 000000000000ffffffffffff dnl
930 0000 00 00 8848 00 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
931 00000000 5a 000000 0000000000000000ffffffffffffffff
933 dnl mpls_label and mpls_tc must be ignored if dl_type is not MPLS:
941 0000 0058 00000000 000000f7 dnl
942 000000000000ffffffffffff 000000000000ffffffffffff dnl
943 0000 00 00 1234 00 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
944 12345678 5a 000000 0000000000000000ffffffffffffffff
947 # metadata=0x1234567890abcdef
948 0000 0058 00000000 000003ff dnl
949 000000000000ffffffffffff 000000000000ffffffffffff dnl
950 0000 00 00 0000 00 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
951 00000000 00 000000 1234567890abcdef0000000000000000
954 # metadata=0x5555555555555555/0x5555555555555555
955 0000 0058 00000000 000003ff dnl
956 000000000000ffffffffffff 000000000000ffffffffffff dnl
957 0000 00 00 0000 00 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
958 00000000 00 000000 5555555555555555aaaaaaaaaaaaaaaa
961 # metadata=0x1234000090ab0000/0xffff0000ffff0000
966 0000 0058 00000000 000003ff dnl
967 000000000000ffffffffffff 000000000000ffffffffffff dnl
968 0000 00 00 0000 00 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
969 00000000 00 000000 1234567890abcdef0000ffff0000ffff
972 sed '/^[[#&]]/d' < test-data > input.txt
973 sed -n 's/^# //p; /^$/p' < test-data > expout
974 sed -n 's/^& //p' < test-data > experr
975 AT_CAPTURE_FILE([input.txt])
976 AT_CAPTURE_FILE([expout])
977 AT_CAPTURE_FILE([experr])
979 [ovs-ofctl '-vPATTERN:console:%c|%p|%m' parse-ofp11-match < input.txt],
980 [0], [expout], [experr])
983 AT_SETUP([ovs-ofctl parse-nx-match loose])
984 AT_KEYWORDS([nx-match])
985 AT_DATA([nx-match.txt], [dnl
986 NXM_OF_IN_PORT(0001), 01020304(1111/2222), NXM_OF_ETH_TYPE(0800)
989 AT_CHECK([ovs-ofctl --strict parse-nx-match < nx-match.txt], [0], [dnl
990 nx_pull_match() returned error OFPBMC_BAD_FIELD
993 AT_CHECK([ovs-ofctl parse-nx-match < nx-match.txt], [0], [dnl
994 NXM_OF_IN_PORT(0001), NXM_OF_ETH_TYPE(0800)
998 AT_SETUP([ovs-ofctl parse-oxm])
1000 AT_DATA([oxm.txt], [dnl
1004 OXM_OF_IN_PORT(00000000)
1005 OXM_OF_IN_PORT(fffffffe)
1008 OXM_OF_METADATA(5a5a5a5a5a5a5a5a)
1009 OXM_OF_METADATA_W(0000000000000000/00000000ffffffff)
1010 OXM_OF_METADATA_W(1234567890abcdef/ffff0000ffff0000)
1011 OXM_OF_METADATA_W(1234567890abcdef/ffffffffffffffff)
1014 OXM_OF_ETH_DST(0002e30f80a4)
1015 OXM_OF_ETH_DST_W(010000000000/010000000000)
1016 OXM_OF_ETH_DST_W(000000000000/010000000000)
1017 OXM_OF_ETH_DST_W(ffffffffffff/010000000000)
1018 OXM_OF_ETH_DST_W(0002e30f80a4/ffffffffffff)
1019 OXM_OF_ETH_DST_W(0002e30f80a4/feffffffffff)
1022 OXM_OF_ETH_SRC(020898456ddb)
1025 OXM_OF_ETH_TYPE(0800)
1026 OXM_OF_ETH_TYPE(0800) OXM_OF_IN_PORT(00000012)
1029 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_ECN(03)
1030 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_ECN(06)
1034 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(01)
1035 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(05)
1039 OXM_OF_ETH_TYPE(0800) OXM_OF_IPV4_SRC(ac100014)
1040 OXM_OF_ETH_TYPE(0800) OXM_OF_IPV4_SRC_W(C0a80000/FFFF0000)
1041 OXM_OF_ETH_TYPE(0806) OXM_OF_IPV4_SRC(ac100014)
1042 OXM_OF_IPV4_SRC_W(C0D80000/FFFF0000)
1045 OXM_OF_ETH_TYPE(0800) OXM_OF_IPV4_DST(ac100014)
1046 OXM_OF_ETH_TYPE(0800) OXM_OF_IPV4_DST_W(C0a88012/FFFF0000)
1047 OXM_OF_IPV4_DST(ac100014)
1048 OXM_OF_ETH_TYPE(0806) OXM_OF_IPV4_DST_W(C0D80000/FFFF0000)
1051 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(06) OXM_OF_TCP_SRC(4231)
1052 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(06) OXM_OF_TCP_SRC_W(5050/F0F0)
1053 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(07) OXM_OF_TCP_SRC(4231)
1055 # TCP destination port
1056 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(06) OXM_OF_TCP_DST(4231)
1057 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(06) OXM_OF_TCP_DST_W(FDE0/FFF0)
1058 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(07) OXM_OF_TCP_DST(4231)
1061 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(11) OXM_OF_UDP_SRC(8732)
1062 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(11) OXM_OF_UDP_SRC_W(0132/01FF)
1063 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(06) OXM_OF_UDP_SRC(7823)
1065 # UDP destination port
1066 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(11) OXM_OF_UDP_DST(1782)
1067 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(11) OXM_OF_UDP_DST_W(5005/F00F)
1068 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(02) OXM_OF_UDP_DST(1293)
1071 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(01) OXM_OF_ICMPV4_TYPE(12)
1072 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(00) OXM_OF_ICMPV4_TYPE(10)
1075 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(01) OXM_OF_ICMPV4_CODE(12)
1076 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(00) OXM_OF_ICMPV4_CODE(10)
1077 OXM_OF_ETH_TYPE(0800) OXM_OF_ICMPV4_CODE(10)
1078 OXM_OF_ICMPV4_CODE(00)
1081 OXM_OF_ETH_TYPE(0806) OXM_OF_ARP_OP(0001)
1082 OXM_OF_ETH_TYPE(0806) OXM_OF_ARP_OP(1111)
1083 OXM_OF_ETH_TYPE(0000) OXM_OF_ARP_OP(0001)
1085 OXM_OF_ETH_TYPE(0806) OXM_OF_ARP_OP(0001) OXM_OF_ARP_OP(0001)
1087 # ARP source protocol address
1088 OXM_OF_ETH_TYPE(0806) OXM_OF_ARP_SPA(ac100014)
1089 OXM_OF_ETH_TYPE(0806) OXM_OF_ARP_SPA_W(C0a81234/FFFFFF00)
1090 OXM_OF_ETH_TYPE(0800) OXM_OF_ARP_SPA(ac100014)
1091 OXM_OF_ARP_SPA_W(C0D8fedc/FFFF0000)
1093 # ARP destination protocol address
1094 OXM_OF_ETH_TYPE(0806) OXM_OF_ARP_TPA(ac100014)
1095 OXM_OF_ETH_TYPE(0806) OXM_OF_ARP_TPA_W(C0a812fe/FFFFFF00)
1096 OXM_OF_ETH_TYPE(0800) OXM_OF_ARP_TPA(ac100014)
1097 OXM_OF_ARP_TPA_W(C0D80000/FFFF0000)
1099 # ARP source hardware address
1100 OXM_OF_ETH_TYPE(0806) OXM_OF_ARP_SHA(0002e30f80a4)
1101 OXM_OF_ETH_TYPE(0800) OXM_OF_ARP_SHA(0002e30f80a4)
1102 OXM_OF_ARP_SHA(0002e30f80a4)
1104 # ARP destination hardware address
1105 OXM_OF_ETH_TYPE(0806) OXM_OF_ARP_THA(0002e30f80a4)
1106 OXM_OF_ETH_TYPE(0800) OXM_OF_ARP_THA(0002e30f80a4)
1107 OXM_OF_ARP_THA(0002e30f80a4)
1110 OXM_OF_ETH_TYPE(86dd) OXM_OF_IPV6_SRC(20010db83c4d00010002000300040005)
1111 OXM_OF_ETH_TYPE(0800) OXM_OF_IPV6_SRC(20010db83c4d00010002000300040005)
1112 OXM_OF_ETH_TYPE(86dd) OXM_OF_IPV6_SRC_W(20010db83c4d00010000000000000000/ffffffffffffffff0000000000000000)
1113 OXM_OF_ETH_TYPE(0800) OXM_OF_IPV6_SRC_W(20010db83c4d00010000000000000000/ffffffffffffffff0000000000000000)
1116 OXM_OF_ETH_TYPE(86dd) OXM_OF_IPV6_DST(20010db83c4d00010002000300040005)
1117 OXM_OF_ETH_TYPE(0800) OXM_OF_IPV6_DST(20010db83c4d00010002000300040005)
1118 OXM_OF_ETH_TYPE(86dd) OXM_OF_IPV6_DST_W(20010db83c4d00010000000000000000/ffffffffffffffff0000000000000000)
1119 OXM_OF_ETH_TYPE(0800) OXM_OF_IPV6_DST_W(20010db83c4d00010000000000000000/ffffffffffffffff0000000000000000)
1122 OXM_OF_ETH_TYPE(86dd) OXM_OF_IPV6_FLABEL(1000000f)
1123 OXM_OF_IPV6_FLABEL(0000000f)
1124 OXM_OF_ETH_TYPE(86dd) OXM_OF_IPV6_FLABEL(0000000f)
1126 # ND source hardware address
1127 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)
1128 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)
1129 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)
1130 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)
1132 # ND destination hardware address
1133 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)
1134 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)
1135 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)
1136 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)
1138 # Invalid field number.
1141 AT_CHECK([ovs-ofctl --strict parse-oxm < oxm.txt], [0], [dnl
1145 OXM_OF_IN_PORT(00000000)
1146 OXM_OF_IN_PORT(fffffffe)
1149 OXM_OF_METADATA(5a5a5a5a5a5a5a5a)
1150 OXM_OF_METADATA_W(0000000000000000/00000000ffffffff)
1151 OXM_OF_METADATA_W(1234000090ab0000/ffff0000ffff0000)
1152 OXM_OF_METADATA(1234567890abcdef)
1155 OXM_OF_ETH_DST(0002e30f80a4)
1156 OXM_OF_ETH_DST_W(010000000000/010000000000)
1157 OXM_OF_ETH_DST_W(000000000000/010000000000)
1158 OXM_OF_ETH_DST_W(010000000000/010000000000)
1159 OXM_OF_ETH_DST(0002e30f80a4)
1160 OXM_OF_ETH_DST_W(0002e30f80a4/feffffffffff)
1163 OXM_OF_ETH_SRC(020898456ddb)
1166 OXM_OF_ETH_TYPE(0800)
1167 OXM_OF_IN_PORT(00000012), OXM_OF_ETH_TYPE(0800)
1170 OXM_OF_ETH_TYPE(0800), OXM_OF_IP_ECN(03)
1171 nx_pull_match() returned error OFPBMC_BAD_VALUE
1172 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1175 OXM_OF_ETH_TYPE(0800), OXM_OF_IP_PROTO(01)
1176 OXM_OF_ETH_TYPE(0800), OXM_OF_IP_PROTO(05)
1177 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1180 OXM_OF_ETH_TYPE(0800), OXM_OF_IPV4_SRC(ac100014)
1181 OXM_OF_ETH_TYPE(0800), OXM_OF_IPV4_SRC_W(c0a80000/ffff0000)
1182 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1183 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1186 OXM_OF_ETH_TYPE(0800), OXM_OF_IPV4_DST(ac100014)
1187 OXM_OF_ETH_TYPE(0800), OXM_OF_IPV4_DST_W(c0a80000/ffff0000)
1188 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1189 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1192 OXM_OF_ETH_TYPE(0800), OXM_OF_IP_PROTO(06), OXM_OF_TCP_SRC(4231)
1193 OXM_OF_ETH_TYPE(0800), OXM_OF_IP_PROTO(06), OXM_OF_TCP_SRC_W(5050/f0f0)
1194 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1196 # TCP destination port
1197 OXM_OF_ETH_TYPE(0800), OXM_OF_IP_PROTO(06), OXM_OF_TCP_DST(4231)
1198 OXM_OF_ETH_TYPE(0800), OXM_OF_IP_PROTO(06), OXM_OF_TCP_DST_W(fde0/fff0)
1199 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1202 OXM_OF_ETH_TYPE(0800), OXM_OF_IP_PROTO(11), OXM_OF_UDP_SRC(8732)
1203 OXM_OF_ETH_TYPE(0800), OXM_OF_IP_PROTO(11), OXM_OF_UDP_SRC_W(0132/01ff)
1204 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1206 # UDP destination port
1207 OXM_OF_ETH_TYPE(0800), OXM_OF_IP_PROTO(11), OXM_OF_UDP_DST(1782)
1208 OXM_OF_ETH_TYPE(0800), OXM_OF_IP_PROTO(11), OXM_OF_UDP_DST_W(5005/f00f)
1209 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1212 OXM_OF_ETH_TYPE(0800), OXM_OF_IP_PROTO(01), OXM_OF_ICMPV4_TYPE(12)
1213 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1216 OXM_OF_ETH_TYPE(0800), OXM_OF_IP_PROTO(01), OXM_OF_ICMPV4_CODE(12)
1217 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1218 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1219 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1222 OXM_OF_ETH_TYPE(0806), OXM_OF_ARP_OP(0001)
1223 nx_pull_match() returned error OFPBMC_BAD_VALUE
1224 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1225 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1226 nx_pull_match() returned error OFPBMC_DUP_FIELD
1228 # ARP source protocol address
1229 OXM_OF_ETH_TYPE(0806), OXM_OF_ARP_SPA(ac100014)
1230 OXM_OF_ETH_TYPE(0806), OXM_OF_ARP_SPA_W(c0a81200/ffffff00)
1231 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1232 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1234 # ARP destination protocol address
1235 OXM_OF_ETH_TYPE(0806), OXM_OF_ARP_TPA(ac100014)
1236 OXM_OF_ETH_TYPE(0806), OXM_OF_ARP_TPA_W(c0a81200/ffffff00)
1237 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1238 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1240 # ARP source hardware address
1241 OXM_OF_ETH_TYPE(0806), OXM_OF_ARP_SHA(0002e30f80a4)
1242 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1243 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1245 # ARP destination hardware address
1246 OXM_OF_ETH_TYPE(0806), OXM_OF_ARP_THA(0002e30f80a4)
1247 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1248 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1251 OXM_OF_ETH_TYPE(86dd), OXM_OF_IPV6_SRC(20010db83c4d00010002000300040005)
1252 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1253 OXM_OF_ETH_TYPE(86dd), OXM_OF_IPV6_SRC_W(20010db83c4d00010000000000000000/ffffffffffffffff0000000000000000)
1254 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1257 OXM_OF_ETH_TYPE(86dd), OXM_OF_IPV6_DST(20010db83c4d00010002000300040005)
1258 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1259 OXM_OF_ETH_TYPE(86dd), OXM_OF_IPV6_DST_W(20010db83c4d00010000000000000000/ffffffffffffffff0000000000000000)
1260 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1263 nx_pull_match() returned error OFPBMC_BAD_VALUE
1264 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1265 OXM_OF_ETH_TYPE(86dd), OXM_OF_IPV6_FLABEL(0000000f)
1267 # ND source hardware address
1268 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)
1269 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1270 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1271 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1273 # ND destination hardware address
1274 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)
1275 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1276 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1277 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1279 # Invalid field number.
1280 nx_pull_match() returned error OFPBMC_BAD_FIELD
1284 AT_SETUP([ovs-ofctl parse-oxm loose])
1286 AT_DATA([oxm.txt], [dnl
1287 OXM_OF_IN_PORT(00000001), 01020304(1111/2222), OXM_OF_ETH_TYPE(0800)
1290 AT_CHECK([ovs-ofctl --strict parse-oxm < oxm.txt], [0], [dnl
1291 nx_pull_match() returned error OFPBMC_BAD_FIELD
1294 AT_CHECK([ovs-ofctl parse-oxm < oxm.txt], [0], [dnl
1295 OXM_OF_IN_PORT(00000001), OXM_OF_ETH_TYPE(0800)
1299 dnl Check that "-F openflow10" rejects a flow_mod with a tun_id, since
1300 dnl OpenFlow 1.0 doesn't support tunnels.
1301 AT_SETUP([ovs-ofctl -F option and tun_id])
1302 AT_CHECK([ovs-ofctl -F openflow10 add-flow dummy tun_id=123,actions=drop],
1303 [1], [], [ovs-ofctl: none of the usable flow formats (NXM) is among the allowed flow formats (OpenFlow10)
1307 dnl Check that "-F nxm" really forces add-flow to use the NXM flow format.
1308 dnl (If it doesn't, then either the tun_id won't show up at all, or it will
1309 dnl additionally show up as the top 32 bits of the cookie.) This checks
1310 dnl for regression against bug #4566.
1311 AT_SETUP([ovs-ofctl -F option with flow_mods])
1313 AT_CHECK([ovs-ofctl -F nxm add-flow br0 tun_id=0x12345678,actions=drop])
1314 AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip], [0], [dnl
1316 tun_id=0x12345678 actions=drop
1321 dnl Check that "-F openflow10" is really honored on dump-flows.
1322 dnl (If it isn't, then dump-flows will show the register match.)
1323 AT_SETUP([ovs-ofctl dump-flows honors -F option])
1325 AT_CHECK([ovs-ofctl add-flow br0 reg0=0x12345,actions=drop])
1326 AT_CHECK([ovs-ofctl -F openflow10 dump-flows br0 | ofctl_strip], [0], [dnl
1333 dnl Check that "-F openflow10" fails on dump-flows if the requested match
1334 dnl can't be represented in OpenFlow 1.0.
1335 AT_SETUP([ovs-ofctl dump-flows rejects bad -F option])
1337 AT_CHECK([ovs-ofctl -F openflow10 dump-flows unix:br0.mgmt reg0=0xabcdef], [1], [],
1338 [ovs-ofctl: none of the usable flow formats (NXM) is among the allowed flow formats (OpenFlow10)
1343 dnl Check that add-flow reports non-normalized flows (feature #5029).
1344 AT_SETUP([ovs-ofctl add-flow reports non-normalized flows])
1346 AT_CHECK([ovs-ofctl TESTABLE_LOG add-flow br0 nw_src=1.2.3.4,actions=5],
1348 ofp_util|INFO|normalization changed ofp_match, details:
1349 ofp_util|INFO| pre: nw_src=1.2.3.4
1350 ofp_util|INFO|post: @&t@