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_OF_IP_PROTO(3a) NXM_NX_ICMPV6_TYPE(87) NXM_NX_ND_TARGET(20010db83c4d00010002000300040005)
366 NXM_OF_ETH_TYPE(86dd) NXM_OF_IP_PROTO(3a) NXM_NX_ICMPV6_TYPE(88) NXM_NX_ND_TARGET(20010db83c4d00010002000300040005)
367 NXM_OF_ETH_TYPE(86dd) NXM_OF_IP_PROTO(3a) NXM_NX_ICMPV6_TYPE(87) NXM_NX_ND_TARGET_W(20010db83c4d00010002000300040005/0123456789abcdeffedcba9876543210)
368 NXM_OF_ETH_TYPE(86dd) NXM_OF_IP_PROTO(3a) NXM_NX_ICMPV6_TYPE(88) NXM_NX_ND_TARGET_W(20010db83c4d00010002000300040005/fedcba98765432100123456789abcdef)
370 # ND source hardware address
371 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)
372 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)
373 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)
374 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)
376 # ND destination hardware address
377 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)
378 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)
379 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)
380 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)
383 NXM_OF_ETH_TYPE(0800) NXM_NX_IP_FRAG(00)
384 NXM_OF_ETH_TYPE(0800) NXM_NX_IP_FRAG(01)
385 NXM_OF_ETH_TYPE(0800) NXM_NX_IP_FRAG(02)
386 NXM_OF_ETH_TYPE(0800) NXM_NX_IP_FRAG(03)
387 NXM_OF_ETH_TYPE(0800) NXM_NX_IP_FRAG_W(00/03)
388 NXM_OF_ETH_TYPE(0800) NXM_NX_IP_FRAG_W(00/fd)
389 NXM_OF_ETH_TYPE(0800) NXM_NX_IP_FRAG_W(00/02)
390 NXM_OF_ETH_TYPE(0800) NXM_NX_IP_FRAG_W(01/01)
391 NXM_OF_ETH_TYPE(0800) NXM_NX_IP_FRAG_W(02/02)
392 NXM_OF_ETH_TYPE(0800) NXM_NX_IP_FRAG_W(03/03)
393 NXM_OF_ETH_TYPE(0800) NXM_NX_IP_FRAG(f3)
396 NXM_OF_ETH_TYPE(86dd) NXM_NX_IP_FRAG(00)
397 NXM_OF_ETH_TYPE(86dd) NXM_NX_IP_FRAG(01)
398 NXM_OF_ETH_TYPE(86dd) NXM_NX_IP_FRAG(02)
399 NXM_OF_ETH_TYPE(86dd) NXM_NX_IP_FRAG(03)
400 NXM_OF_ETH_TYPE(86dd) NXM_NX_IP_FRAG_W(00/03)
401 NXM_OF_ETH_TYPE(86dd) NXM_NX_IP_FRAG_W(00/01)
402 NXM_OF_ETH_TYPE(86dd) NXM_NX_IP_FRAG_W(00/02)
403 NXM_OF_ETH_TYPE(86dd) NXM_NX_IP_FRAG_W(01/01)
404 NXM_OF_ETH_TYPE(86dd) NXM_NX_IP_FRAG_W(02/02)
405 NXM_OF_ETH_TYPE(86dd) NXM_NX_IP_FRAG_W(03/03)
406 NXM_OF_ETH_TYPE(86dd) NXM_NX_IP_FRAG(f3)
409 NXM_NX_COOKIE(00000000abcdef01)
410 NXM_NX_COOKIE_W(84200000abcdef01/84200000FFFFFFFF)
413 NXM_NX_TUN_ID(00000000abcdef01)
414 NXM_NX_TUN_ID_W(84200000abcdef01/84200000FFFFFFFF)
417 NXM_NX_REG0(acebdf56)
418 NXM_NX_REG0_W(a0e0d050/f0f0f0f0)
420 # Invalid field number.
423 # Unimplemented registers.
425 # This test assumes that at least two registers, but fewer than 16,
426 # registers are implemented.
428 00010108(12345678/12345678)
430 00011f08(12345678/12345678)
432 AT_CHECK([ovs-ofctl --strict parse-nx-match < nx-match.txt], [0], [dnl
440 NXM_OF_ETH_DST(0002e30f80a4)
441 NXM_OF_ETH_DST_W(010000000000/010000000000)
442 NXM_OF_ETH_DST_W(000000000000/010000000000)
443 NXM_OF_ETH_DST_W(010000000000/010000000000)
444 NXM_OF_ETH_DST(0002e30f80a4)
445 NXM_OF_ETH_DST_W(0002e30f80a4/feffffffffff)
446 NXM_OF_ETH_DST_W(40125218000a/5a5a5a5a5a5a)
449 NXM_OF_ETH_SRC(020898456ddb)
450 NXM_OF_ETH_SRC_W(012345014545/ffffff555555)
451 NXM_OF_ETH_SRC(020898456ddb)
454 NXM_OF_ETH_TYPE(0800)
455 NXM_OF_IN_PORT(0012), NXM_OF_ETH_TYPE(0800)
458 NXM_OF_VLAN_TCI(f009)
459 nx_pull_match() returned error OFPBMC_DUP_FIELD
460 NXM_OF_VLAN_TCI(0000)
461 NXM_OF_VLAN_TCI(3123)
462 NXM_OF_VLAN_TCI(0123)
463 NXM_OF_VLAN_TCI_W(1123/1fff)
464 NXM_OF_VLAN_TCI_W(f000/f000)
465 NXM_OF_VLAN_TCI_W(0000/e000)
468 NXM_OF_ETH_TYPE(0800), NXM_OF_IP_TOS(f0)
469 nx_pull_match() returned error OFPBMC_BAD_VALUE
470 nx_pull_match() returned error OFPBMC_BAD_PREREQ
473 NXM_OF_ETH_TYPE(0800), NXM_NX_IP_ECN(03)
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_OF_IP_PROTO(01)
479 NXM_OF_ETH_TYPE(0800), NXM_OF_IP_PROTO(05)
480 nx_pull_match() returned error OFPBMC_BAD_PREREQ
483 NXM_OF_ETH_TYPE(0800), NXM_NX_IP_TTL(80)
484 NXM_OF_ETH_TYPE(86dd), NXM_NX_IP_TTL(ff)
485 nx_pull_match() returned error OFPBMC_BAD_PREREQ
488 NXM_OF_ETH_TYPE(0800), NXM_OF_IP_SRC(ac100014)
489 NXM_OF_ETH_TYPE(0800), NXM_OF_IP_SRC_W(c0a80000/ffff0000)
490 NXM_OF_ETH_TYPE(0800), NXM_OF_IP_SRC_W(40080000/5a5a5a5a)
491 nx_pull_match() returned error OFPBMC_BAD_PREREQ
492 nx_pull_match() returned error OFPBMC_BAD_PREREQ
495 NXM_OF_ETH_TYPE(0800), NXM_OF_IP_DST(ac100014)
496 NXM_OF_ETH_TYPE(0800), NXM_OF_IP_DST_W(c0a80000/ffff0000)
497 NXM_OF_ETH_TYPE(0800), NXM_OF_IP_DST_W(40080000/5a5a5a5a)
498 nx_pull_match() returned error OFPBMC_BAD_PREREQ
499 nx_pull_match() returned error OFPBMC_BAD_PREREQ
502 NXM_OF_ETH_TYPE(0800), NXM_OF_IP_PROTO(06), NXM_OF_TCP_SRC(4231)
503 NXM_OF_ETH_TYPE(0800), NXM_OF_IP_PROTO(06), NXM_OF_TCP_SRC_W(5050/f0f0)
504 nx_pull_match() returned error OFPBMC_BAD_PREREQ
506 # TCP destination port
507 NXM_OF_ETH_TYPE(0800), NXM_OF_IP_PROTO(06), NXM_OF_TCP_DST(4231)
508 NXM_OF_ETH_TYPE(0800), NXM_OF_IP_PROTO(06), NXM_OF_TCP_DST_W(fde0/fff0)
509 nx_pull_match() returned error OFPBMC_BAD_PREREQ
512 NXM_OF_ETH_TYPE(0800), NXM_OF_IP_PROTO(11), NXM_OF_UDP_SRC(8732)
513 NXM_OF_ETH_TYPE(0800), NXM_OF_IP_PROTO(11), NXM_OF_UDP_SRC_W(0132/01ff)
514 nx_pull_match() returned error OFPBMC_BAD_PREREQ
516 # UDP destination port
517 NXM_OF_ETH_TYPE(0800), NXM_OF_IP_PROTO(11), NXM_OF_UDP_DST(1782)
518 NXM_OF_ETH_TYPE(0800), NXM_OF_IP_PROTO(11), NXM_OF_UDP_DST_W(5005/f00f)
519 nx_pull_match() returned error OFPBMC_BAD_PREREQ
522 NXM_OF_ETH_TYPE(0800), NXM_OF_IP_PROTO(01), NXM_OF_ICMP_TYPE(12)
523 nx_pull_match() returned error OFPBMC_BAD_PREREQ
526 NXM_OF_ETH_TYPE(0800), NXM_OF_IP_PROTO(01), NXM_OF_ICMP_CODE(12)
527 nx_pull_match() returned error OFPBMC_BAD_PREREQ
528 nx_pull_match() returned error OFPBMC_BAD_PREREQ
529 nx_pull_match() returned error OFPBMC_BAD_PREREQ
532 NXM_OF_ETH_TYPE(0806), NXM_OF_ARP_OP(0001)
533 nx_pull_match() returned error OFPBMC_BAD_VALUE
534 nx_pull_match() returned error OFPBMC_BAD_PREREQ
535 nx_pull_match() returned error OFPBMC_BAD_PREREQ
536 nx_pull_match() returned error OFPBMC_DUP_FIELD
538 # ARP source protocol address
539 NXM_OF_ETH_TYPE(0806), NXM_OF_ARP_SPA(ac100014)
540 NXM_OF_ETH_TYPE(0806), NXM_OF_ARP_SPA_W(c0a81200/ffffff00)
541 NXM_OF_ETH_TYPE(0806), NXM_OF_ARP_SPA_W(80a80200/aaaaaa00)
542 nx_pull_match() returned error OFPBMC_BAD_PREREQ
543 nx_pull_match() returned error OFPBMC_BAD_PREREQ
545 # ARP destination protocol address
546 NXM_OF_ETH_TYPE(0806), NXM_OF_ARP_TPA(ac100014)
547 NXM_OF_ETH_TYPE(0806), NXM_OF_ARP_TPA_W(c0a81200/ffffff00)
548 NXM_OF_ETH_TYPE(0806), NXM_OF_ARP_TPA_W(40201234/77777777)
549 nx_pull_match() returned error OFPBMC_BAD_PREREQ
550 nx_pull_match() returned error OFPBMC_BAD_PREREQ
552 # ARP source hardware address
553 NXM_OF_ETH_TYPE(0806), NXM_NX_ARP_SHA(0002e30f80a4)
554 nx_pull_match() returned error OFPBMC_BAD_PREREQ
555 nx_pull_match() returned error OFPBMC_BAD_PREREQ
557 # ARP destination hardware address
558 NXM_OF_ETH_TYPE(0806), NXM_NX_ARP_THA(0002e30f80a4)
559 nx_pull_match() returned error OFPBMC_BAD_PREREQ
560 nx_pull_match() returned error OFPBMC_BAD_PREREQ
563 NXM_OF_ETH_TYPE(86dd), NXM_NX_IPV6_SRC(20010db83c4d00010002000300040005)
564 nx_pull_match() returned error OFPBMC_BAD_PREREQ
565 NXM_OF_ETH_TYPE(86dd), NXM_NX_IPV6_SRC_W(20010db83c4d00010000000000000000/ffffffffffffffff0000000000000000)
566 NXM_OF_ETH_TYPE(86dd), NXM_NX_IPV6_SRC_W(00000818184800000000000000000000/5a5a5a5a5a5a5a5a0000000000000000)
567 nx_pull_match() returned error OFPBMC_BAD_PREREQ
570 NXM_OF_ETH_TYPE(86dd), NXM_NX_IPV6_DST(20010db83c4d00010002000300040005)
571 nx_pull_match() returned error OFPBMC_BAD_PREREQ
572 NXM_OF_ETH_TYPE(86dd), NXM_NX_IPV6_DST_W(20010530344500010000000000000000/77777777777777777777777777777777)
573 nx_pull_match() returned error OFPBMC_BAD_PREREQ
576 NXM_OF_ETH_TYPE(86dd), NXM_OF_IP_PROTO(3a), NXM_NX_ICMPV6_TYPE(87), NXM_NX_ND_TARGET(20010db83c4d00010002000300040005)
577 NXM_OF_ETH_TYPE(86dd), NXM_OF_IP_PROTO(3a), NXM_NX_ICMPV6_TYPE(88), NXM_NX_ND_TARGET(20010db83c4d00010002000300040005)
578 NXM_OF_ETH_TYPE(86dd), NXM_OF_IP_PROTO(3a), NXM_NX_ICMPV6_TYPE(87), NXM_NX_ND_TARGET_W(00010520080900010000000000040000/0123456789abcdeffedcba9876543210)
579 NXM_OF_ETH_TYPE(86dd), NXM_OF_IP_PROTO(3a), NXM_NX_ICMPV6_TYPE(88), NXM_NX_ND_TARGET_W(20000898344400000002000300000005/fedcba98765432100123456789abcdef)
581 # ND source hardware address
582 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)
583 nx_pull_match() returned error OFPBMC_BAD_PREREQ
584 nx_pull_match() returned error OFPBMC_BAD_PREREQ
585 nx_pull_match() returned error OFPBMC_BAD_PREREQ
587 # ND destination hardware address
588 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)
589 nx_pull_match() returned error OFPBMC_BAD_PREREQ
590 nx_pull_match() returned error OFPBMC_BAD_PREREQ
591 nx_pull_match() returned error OFPBMC_BAD_PREREQ
594 NXM_OF_ETH_TYPE(0800), NXM_NX_IP_FRAG(00)
595 NXM_OF_ETH_TYPE(0800), NXM_NX_IP_FRAG(01)
596 NXM_OF_ETH_TYPE(0800), NXM_NX_IP_FRAG(02)
597 NXM_OF_ETH_TYPE(0800), NXM_NX_IP_FRAG(03)
598 NXM_OF_ETH_TYPE(0800), NXM_NX_IP_FRAG(00)
599 NXM_OF_ETH_TYPE(0800), NXM_NX_IP_FRAG_W(00/01)
600 NXM_OF_ETH_TYPE(0800), NXM_NX_IP_FRAG_W(00/02)
601 NXM_OF_ETH_TYPE(0800), NXM_NX_IP_FRAG_W(01/01)
602 NXM_OF_ETH_TYPE(0800), NXM_NX_IP_FRAG_W(02/02)
603 NXM_OF_ETH_TYPE(0800), NXM_NX_IP_FRAG(03)
604 nx_pull_match() returned error OFPBMC_BAD_VALUE
607 NXM_OF_ETH_TYPE(86dd), NXM_NX_IP_FRAG(00)
608 NXM_OF_ETH_TYPE(86dd), NXM_NX_IP_FRAG(01)
609 NXM_OF_ETH_TYPE(86dd), NXM_NX_IP_FRAG(02)
610 NXM_OF_ETH_TYPE(86dd), NXM_NX_IP_FRAG(03)
611 NXM_OF_ETH_TYPE(86dd), NXM_NX_IP_FRAG(00)
612 NXM_OF_ETH_TYPE(86dd), NXM_NX_IP_FRAG_W(00/01)
613 NXM_OF_ETH_TYPE(86dd), NXM_NX_IP_FRAG_W(00/02)
614 NXM_OF_ETH_TYPE(86dd), NXM_NX_IP_FRAG_W(01/01)
615 NXM_OF_ETH_TYPE(86dd), NXM_NX_IP_FRAG_W(02/02)
616 NXM_OF_ETH_TYPE(86dd), NXM_NX_IP_FRAG(03)
617 nx_pull_match() returned error OFPBMC_BAD_VALUE
620 NXM_NX_COOKIE(00000000abcdef01)
621 NXM_NX_COOKIE_W(84200000abcdef01/84200000ffffffff)
624 NXM_NX_TUN_ID(00000000abcdef01)
625 NXM_NX_TUN_ID_W(84200000abcdef01/84200000ffffffff)
628 NXM_NX_REG0(acebdf56)
629 NXM_NX_REG0_W(a0e0d050/f0f0f0f0)
631 # Invalid field number.
632 nx_pull_match() returned error OFPBMC_BAD_FIELD
634 # Unimplemented registers.
636 # This test assumes that at least two registers, but fewer than 16,
637 # registers are implemented.
638 NXM_NX_REG0(12345678)
639 NXM_NX_REG0_W(12345678/12345678)
640 nx_pull_match() returned error OFPBMC_BAD_FIELD
641 nx_pull_match() returned error OFPBMC_BAD_FIELD
645 AT_SETUP([ovs-ofctl parse-ofp11-match])
647 AT_DATA([test-data], [dnl
649 0000 0058 fffffffe 000003fe dnl
650 000000000000ffffffffffff 000000000000ffffffffffff dnl
651 0000 00 00 0000 00 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
652 00000000 00 000000 0000000000000000ffffffffffffffff
654 # bad ofp11_match: OFPBMC_BAD_VALUE
655 & ofp_util|WARN|port 305419896 is outside the supported range 0 through 65279 or 0xffffff00 through 0xffffffff
656 0000 0058 12345678 000003fe dnl
657 000000000000ffffffffffff 000000000000ffffffffffff dnl
658 0000 00 00 0000 00 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
659 00000000 00 000000 0000000000000000ffffffffffffffff
661 # dl_src=00:01:02:03:04:05
662 0000 0058 00000000 000003ff dnl
663 000102030405000000000000 000000000000ffffffffffff dnl
664 0000 00 00 0000 00 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
665 00000000 00 000000 0000000000000000ffffffffffffffff
667 # dl_src=55:55:55:55:55:55/55:55:55:55:55:55
668 0000 0058 00000000 000003ff dnl
669 555555555555aaaaaaaaaaaa 000000000000ffffffffffff dnl
670 0000 00 00 0000 00 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
671 00000000 00 000000 0000000000000000ffffffffffffffff
673 # dl_dst=00:01:02:03:04:05
674 0000 0058 00000000 000003ff dnl
675 000000000000ffffffffffff 000102030405000000000000 dnl
676 0000 00 00 0000 00 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
677 00000000 00 000000 0000000000000000ffffffffffffffff
679 # dl_dst=01:00:00:00:00:00/01:00:00:00:00:00
680 0000 0058 00000000 000003ff dnl
681 000000000000ffffffffffff 010000000000feffffffffff dnl
682 0000 00 00 0000 00 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
683 00000000 00 000000 0000000000000000ffffffffffffffff
685 # dl_dst=00:01:02:03:04:05/fe:ff:ff:ff:ff:ff
686 0000 0058 00000000 000003ff dnl
687 000000000000ffffffffffff 000102030405010000000000 dnl
688 0000 00 00 0000 00 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
689 00000000 00 000000 0000000000000000ffffffffffffffff
691 # dl_dst=55:55:55:55:55:55/55:55:55:55:55:55
692 0000 0058 00000000 000003ff dnl
693 000000000000ffffffffffff 555555555555aaaaaaaaaaaa dnl
694 0000 00 00 0000 00 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
695 00000000 00 000000 0000000000000000ffffffffffffffff
697 dnl dl_vlan_pcp is ignored if dl_vlan is wildcarded, which causes the
698 dnl the wildcard bit and the dl_vlan_pcp to be dropped for output:
702 0000 0058 00000001 000003fa dnl
703 000000000000ffffffffffff 000000000000ffffffffffff dnl
704 0000 03 00 0000 00 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
705 00000000 00 000000 0000000000000000ffffffffffffffff
708 0000 0058 00000000 000003fd dnl
709 000000000000ffffffffffff 000000000000ffffffffffff dnl
710 0123 00 00 0000 00 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
711 00000000 00 000000 0000000000000000ffffffffffffffff
715 0000 0058 00000000 000003fd dnl
716 000000000000ffffffffffff 000000000000ffffffffffff dnl
717 ffff 00 00 0000 00 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
718 00000000 00 000000 0000000000000000ffffffffffffffff
720 dnl OFPVID_NONE ignores dl_vlan_pcp even if not wildcarded, which causes
721 dnl the wildcard bit and the dl_vlan_pcp to be dropped for output:
725 0000 0058 00000000 000003f9 dnl
726 000000000000ffffffffffff 000000000000ffffffffffff dnl
727 ffff 05 00 0000 00 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
728 00000000 00 000000 0000000000000000ffffffffffffffff
730 # vlan_tci=0x1000/0x1000
731 0000 0058 00000000 000003fd dnl
732 000000000000ffffffffffff 000000000000ffffffffffff dnl
733 fffe 00 00 0000 00 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
734 00000000 00 000000 0000000000000000ffffffffffffffff
737 # bad ofp11_match: OFPBMC_BAD_VALUE
738 0000 0058 00000000 000003fd dnl
739 000000000000ffffffffffff 000000000000ffffffffffff dnl
740 1234 00 00 0000 00 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
741 00000000 00 000000 0000000000000000ffffffffffffffff
744 0000 0058 00000000 000003f9 dnl
745 000000000000ffffffffffff 000000000000ffffffffffff dnl
746 fffe 04 00 0000 00 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
747 00000000 00 000000 0000000000000000ffffffffffffffff
749 # dl_vlan=10,dl_vlan_pcp=6
750 0000 0058 00000000 000003f9 dnl
751 000000000000ffffffffffff 000000000000ffffffffffff dnl
752 000a 06 00 0000 00 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
753 00000000 00 000000 0000000000000000ffffffffffffffff
756 0000 0058 00000000 000003f7 dnl
757 000000000000ffffffffffff 000000000000ffffffffffff dnl
758 0000 00 00 1234 00 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
759 00000000 00 000000 0000000000000000ffffffffffffffff
762 0000 0058 00000000 000003e7 dnl
763 000000000000ffffffffffff 000000000000ffffffffffff dnl
764 0000 00 00 0800 fc 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
765 00000000 00 000000 0000000000000000ffffffffffffffff
768 # bad ofp11_match: OFPBMC_BAD_VALUE
769 0000 0058 00000000 000003e7 dnl
770 000000000000ffffffffffff 000000000000ffffffffffff dnl
771 0000 00 00 0800 01 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
772 00000000 00 000000 0000000000000000ffffffffffffffff
775 0000 0058 00000000 000003d7 dnl
776 000000000000ffffffffffff 000000000000ffffffffffff dnl
777 0000 00 00 0800 00 05 00000000ffffffff 00000000ffffffff 0000 0000 dnl
778 00000000 00 000000 0000000000000000ffffffffffffffff
781 0000 0058 00000000 000003d7 dnl
782 000000000000ffffffffffff 000000000000ffffffffffff dnl
783 0000 00 00 0806 00 02 00000000ffffffff 00000000ffffffff 0000 0000 dnl
784 00000000 00 000000 0000000000000000ffffffffffffffff
786 # ip,nw_src=192.168.128.0/24
787 0000 0058 00000000 000003f7 dnl
788 000000000000ffffffffffff 000000000000ffffffffffff dnl
789 0000 00 00 0800 00 00 c0a88000000000ff 00000000ffffffff 0000 0000 dnl
790 00000000 00 000000 0000000000000000ffffffffffffffff
792 # ip,nw_src=128.160.128.0/165.165.165.165
795 0000 0058 00000000 000003f7 dnl
796 000000000000ffffffffffff 000000000000ffffffffffff dnl
797 0000 00 00 0800 00 00 c0a880005a5a5a5a 00000000ffffffff 0000 0000 dnl
798 00000000 00 000000 0000000000000000ffffffffffffffff
800 # ip,nw_dst=192.168.128.0/24
801 0000 0058 00000000 000003f7 dnl
802 000000000000ffffffffffff 000000000000ffffffffffff dnl
803 0000 00 00 0800 00 00 00000000ffffffff c0a88000000000ff 0000 0000 dnl
804 00000000 00 000000 0000000000000000ffffffffffffffff
806 # ip,nw_dst=128.160.128.0/165.165.165.165
809 0000 0058 00000000 000003f7 dnl
810 000000000000ffffffffffff 000000000000ffffffffffff dnl
811 0000 00 00 0800 00 00 00000000ffffffff c0a880005a5a5a5a 0000 0000 dnl
812 00000000 00 000000 0000000000000000ffffffffffffffff
814 # arp,nw_src=192.168.128.0/24
815 0000 0058 00000000 000003f7 dnl
816 000000000000ffffffffffff 000000000000ffffffffffff dnl
817 0000 00 00 0806 00 00 c0a88000000000ff 00000000ffffffff 0000 0000 dnl
818 00000000 00 000000 0000000000000000ffffffffffffffff
820 # arp,nw_dst=192.168.128.0/24
821 0000 0058 00000000 000003f7 dnl
822 000000000000ffffffffffff 000000000000ffffffffffff dnl
823 0000 00 00 0806 00 00 00000000ffffffff c0a88000000000ff 0000 0000 dnl
824 00000000 00 000000 0000000000000000ffffffffffffffff
827 0000 0058 00000000 00000397 dnl
828 000000000000ffffffffffff 000000000000ffffffffffff dnl
829 0000 00 00 0800 00 06 00000000ffffffff 00000000ffffffff 01bb 0000 dnl
830 00000000 00 000000 0000000000000000ffffffffffffffff
833 0000 0058 00000000 00000357 dnl
834 000000000000ffffffffffff 000000000000ffffffffffff dnl
835 0000 00 00 0800 00 06 00000000ffffffff 00000000ffffffff 0000 01bb dnl
836 00000000 00 000000 0000000000000000ffffffffffffffff
839 0000 0058 00000000 00000397 dnl
840 000000000000ffffffffffff 000000000000ffffffffffff dnl
841 0000 00 00 0800 00 11 00000000ffffffff 00000000ffffffff 01bb 0000 dnl
842 00000000 00 000000 0000000000000000ffffffffffffffff
845 0000 0058 00000000 00000397 dnl
846 000000000000ffffffffffff 000000000000ffffffffffff dnl
847 0000 00 00 0800 00 01 00000000ffffffff 00000000ffffffff 0005 0000 dnl
848 00000000 00 000000 0000000000000000ffffffffffffffff
851 0000 0058 00000000 00000357 dnl
852 000000000000ffffffffffff 000000000000ffffffffffff dnl
853 0000 00 00 0800 00 01 00000000ffffffff 00000000ffffffff 0000 0008 dnl
854 00000000 00 000000 0000000000000000ffffffffffffffff
857 0000 0058 00000000 00000397 dnl
858 000000000000ffffffffffff 000000000000ffffffffffff dnl
859 0000 00 00 0800 00 11 00000000ffffffff 00000000ffffffff 01bb 0000 dnl
860 00000000 00 000000 0000000000000000ffffffffffffffff
863 0000 0058 00000000 00000357 dnl
864 000000000000ffffffffffff 000000000000ffffffffffff dnl
865 0000 00 00 0800 00 11 00000000ffffffff 00000000ffffffff 0000 01bb dnl
866 00000000 00 000000 0000000000000000ffffffffffffffff
870 0000 0058 00000000 000003d7 dnl
871 000000000000ffffffffffff 000000000000ffffffffffff dnl
872 0000 00 00 0800 00 84 00000000ffffffff 00000000ffffffff 0000 0000 dnl
873 00000000 00 000000 0000000000000000ffffffffffffffff
875 dnl SCTP tp_src matching not supported:
876 # bad ofp11_match: OFPBMC_BAD_FIELD
877 0000 0058 00000000 00000397 dnl
878 000000000000ffffffffffff 000000000000ffffffffffff dnl
879 0000 00 00 0800 00 84 00000000ffffffff 00000000ffffffff 01bb 0000 dnl
880 00000000 00 000000 0000000000000000ffffffffffffffff
882 dnl SCTP tp_dst matching not supported:
883 # bad ofp11_match: OFPBMC_BAD_FIELD
884 0000 0058 00000000 00000357 dnl
885 000000000000ffffffffffff 000000000000ffffffffffff dnl
886 0000 00 00 0800 00 84 00000000ffffffff 00000000ffffffff 0000 01bb dnl
887 00000000 00 000000 0000000000000000ffffffffffffffff
889 dnl Ignore tp_src if not TCP or UDP or SCTP:
894 0000 0058 00000000 00000397 dnl
895 000000000000ffffffffffff 000000000000ffffffffffff dnl
896 0000 00 00 0800 00 15 00000000ffffffff 00000000ffffffff 01bb 0000 dnl
897 00000000 00 000000 0000000000000000ffffffffffffffff
899 dnl Ignore tp_dst if not TCP or UDP or SCTP:
904 0000 0058 00000000 00000357 dnl
905 000000000000ffffffffffff 000000000000ffffffffffff dnl
906 0000 00 00 0800 00 16 00000000ffffffff 00000000ffffffff 0000 01bb dnl
907 00000000 00 000000 0000000000000000ffffffffffffffff
909 dnl mpls_label not yet supported:
910 # bad ofp11_match: OFPBMC_BAD_TAG
911 0000 0058 00000000 000002f7 dnl
912 000000000000ffffffffffff 000000000000ffffffffffff dnl
913 0000 00 00 8847 00 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
914 12345678 00 000000 0000000000000000ffffffffffffffff
916 dnl mpls_tc not yet supported:
917 # bad ofp11_match: OFPBMC_BAD_TAG
918 0000 0058 00000000 000001f7 dnl
919 000000000000ffffffffffff 000000000000ffffffffffff dnl
920 0000 00 00 8848 00 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
921 00000000 5a 000000 0000000000000000ffffffffffffffff
923 dnl mpls_label and mpls_tc must be ignored if dl_type is not MPLS:
931 0000 0058 00000000 000000f7 dnl
932 000000000000ffffffffffff 000000000000ffffffffffff dnl
933 0000 00 00 1234 00 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
934 12345678 5a 000000 0000000000000000ffffffffffffffff
936 dnl metadata match not yet supported:
937 # bad ofp11_match: OFPBMC_BAD_FIELD
938 0000 0058 00000000 000003ff dnl
939 000000000000ffffffffffff 000000000000ffffffffffff dnl
940 0000 00 00 0000 00 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
941 00000000 00 000000 0000000000000001fffffffffffffffe
944 sed '/^[[#&]]/d' < test-data > input.txt
945 sed -n 's/^# //p; /^$/p' < test-data > expout
946 sed -n 's/^& //p' < test-data > experr
947 AT_CAPTURE_FILE([input.txt])
948 AT_CAPTURE_FILE([expout])
949 AT_CAPTURE_FILE([experr])
951 [ovs-ofctl '-vPATTERN:console:%c|%p|%m' parse-ofp11-match < input.txt],
952 [0], [expout], [experr])
955 AT_SETUP([ovs-ofctl parse-nx-match loose])
956 AT_KEYWORDS([nx-match])
957 AT_DATA([nx-match.txt], [dnl
958 NXM_OF_IN_PORT(0001), 01020304(1111/2222), NXM_OF_ETH_TYPE(0800)
961 AT_CHECK([ovs-ofctl --strict parse-nx-match < nx-match.txt], [0], [dnl
962 nx_pull_match() returned error OFPBMC_BAD_FIELD
965 AT_CHECK([ovs-ofctl parse-nx-match < nx-match.txt], [0], [dnl
966 NXM_OF_IN_PORT(0001), NXM_OF_ETH_TYPE(0800)
970 AT_SETUP([ovs-ofctl parse-oxm])
972 AT_DATA([oxm.txt], [dnl
976 OXM_OF_IN_PORT(00000000)
977 OXM_OF_IN_PORT(fffffffe)
980 OXM_OF_ETH_DST(0002e30f80a4)
981 OXM_OF_ETH_DST_W(010000000000/010000000000)
982 OXM_OF_ETH_DST_W(000000000000/010000000000)
983 OXM_OF_ETH_DST_W(ffffffffffff/010000000000)
984 OXM_OF_ETH_DST_W(0002e30f80a4/ffffffffffff)
985 OXM_OF_ETH_DST_W(0002e30f80a4/feffffffffff)
988 OXM_OF_ETH_SRC(020898456ddb)
991 OXM_OF_ETH_TYPE(0800)
992 OXM_OF_ETH_TYPE(0800) OXM_OF_IN_PORT(00000012)
995 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_ECN(03)
996 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_ECN(06)
1000 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(01)
1001 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(05)
1005 OXM_OF_ETH_TYPE(0800) OXM_OF_IPV4_SRC(ac100014)
1006 OXM_OF_ETH_TYPE(0800) OXM_OF_IPV4_SRC_W(C0a80000/FFFF0000)
1007 OXM_OF_ETH_TYPE(0806) OXM_OF_IPV4_SRC(ac100014)
1008 OXM_OF_IPV4_SRC_W(C0D80000/FFFF0000)
1011 OXM_OF_ETH_TYPE(0800) OXM_OF_IPV4_DST(ac100014)
1012 OXM_OF_ETH_TYPE(0800) OXM_OF_IPV4_DST_W(C0a88012/FFFF0000)
1013 OXM_OF_IPV4_DST(ac100014)
1014 OXM_OF_ETH_TYPE(0806) OXM_OF_IPV4_DST_W(C0D80000/FFFF0000)
1017 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(06) OXM_OF_TCP_SRC(4231)
1018 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(06) OXM_OF_TCP_SRC_W(5050/F0F0)
1019 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(07) OXM_OF_TCP_SRC(4231)
1021 # TCP destination port
1022 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(06) OXM_OF_TCP_DST(4231)
1023 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(06) OXM_OF_TCP_DST_W(FDE0/FFF0)
1024 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(07) OXM_OF_TCP_DST(4231)
1027 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(11) OXM_OF_UDP_SRC(8732)
1028 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(11) OXM_OF_UDP_SRC_W(0132/01FF)
1029 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(06) OXM_OF_UDP_SRC(7823)
1031 # UDP destination port
1032 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(11) OXM_OF_UDP_DST(1782)
1033 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(11) OXM_OF_UDP_DST_W(5005/F00F)
1034 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(02) OXM_OF_UDP_DST(1293)
1037 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(01) OXM_OF_ICMPV4_TYPE(12)
1038 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(00) OXM_OF_ICMPV4_TYPE(10)
1041 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(01) OXM_OF_ICMPV4_CODE(12)
1042 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(00) OXM_OF_ICMPV4_CODE(10)
1043 OXM_OF_ETH_TYPE(0800) OXM_OF_ICMPV4_CODE(10)
1044 OXM_OF_ICMPV4_CODE(00)
1047 OXM_OF_ETH_TYPE(0806) OXM_OF_ARP_OP(0001)
1048 OXM_OF_ETH_TYPE(0806) OXM_OF_ARP_OP(1111)
1049 OXM_OF_ETH_TYPE(0000) OXM_OF_ARP_OP(0001)
1051 OXM_OF_ETH_TYPE(0806) OXM_OF_ARP_OP(0001) OXM_OF_ARP_OP(0001)
1053 # ARP source protocol address
1054 OXM_OF_ETH_TYPE(0806) OXM_OF_ARP_SPA(ac100014)
1055 OXM_OF_ETH_TYPE(0806) OXM_OF_ARP_SPA_W(C0a81234/FFFFFF00)
1056 OXM_OF_ETH_TYPE(0800) OXM_OF_ARP_SPA(ac100014)
1057 OXM_OF_ARP_SPA_W(C0D8fedc/FFFF0000)
1059 # ARP destination protocol address
1060 OXM_OF_ETH_TYPE(0806) OXM_OF_ARP_TPA(ac100014)
1061 OXM_OF_ETH_TYPE(0806) OXM_OF_ARP_TPA_W(C0a812fe/FFFFFF00)
1062 OXM_OF_ETH_TYPE(0800) OXM_OF_ARP_TPA(ac100014)
1063 OXM_OF_ARP_TPA_W(C0D80000/FFFF0000)
1065 # ARP source hardware address
1066 OXM_OF_ETH_TYPE(0806) OXM_OF_ARP_SHA(0002e30f80a4)
1067 OXM_OF_ETH_TYPE(0800) OXM_OF_ARP_SHA(0002e30f80a4)
1068 OXM_OF_ARP_SHA(0002e30f80a4)
1070 # ARP destination hardware address
1071 OXM_OF_ETH_TYPE(0806) OXM_OF_ARP_THA(0002e30f80a4)
1072 OXM_OF_ETH_TYPE(0800) OXM_OF_ARP_THA(0002e30f80a4)
1073 OXM_OF_ARP_THA(0002e30f80a4)
1076 OXM_OF_ETH_TYPE(86dd) OXM_OF_IPV6_SRC(20010db83c4d00010002000300040005)
1077 OXM_OF_ETH_TYPE(0800) OXM_OF_IPV6_SRC(20010db83c4d00010002000300040005)
1078 OXM_OF_ETH_TYPE(86dd) OXM_OF_IPV6_SRC_W(20010db83c4d00010000000000000000/ffffffffffffffff0000000000000000)
1079 OXM_OF_ETH_TYPE(0800) OXM_OF_IPV6_SRC_W(20010db83c4d00010000000000000000/ffffffffffffffff0000000000000000)
1082 OXM_OF_ETH_TYPE(86dd) OXM_OF_IPV6_DST(20010db83c4d00010002000300040005)
1083 OXM_OF_ETH_TYPE(0800) OXM_OF_IPV6_DST(20010db83c4d00010002000300040005)
1084 OXM_OF_ETH_TYPE(86dd) OXM_OF_IPV6_DST_W(20010db83c4d00010000000000000000/ffffffffffffffff0000000000000000)
1085 OXM_OF_ETH_TYPE(0800) OXM_OF_IPV6_DST_W(20010db83c4d00010000000000000000/ffffffffffffffff0000000000000000)
1087 # ND source hardware address
1088 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)
1089 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)
1090 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)
1091 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)
1093 # ND destination hardware address
1094 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)
1095 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)
1096 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)
1097 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)
1099 # Invalid field number.
1102 AT_CHECK([ovs-ofctl --strict parse-oxm < oxm.txt], [0], [dnl
1106 OXM_OF_IN_PORT(00000000)
1107 OXM_OF_IN_PORT(fffffffe)
1110 OXM_OF_ETH_DST(0002e30f80a4)
1111 OXM_OF_ETH_DST_W(010000000000/010000000000)
1112 OXM_OF_ETH_DST_W(000000000000/010000000000)
1113 OXM_OF_ETH_DST_W(010000000000/010000000000)
1114 OXM_OF_ETH_DST(0002e30f80a4)
1115 OXM_OF_ETH_DST_W(0002e30f80a4/feffffffffff)
1118 OXM_OF_ETH_SRC(020898456ddb)
1121 OXM_OF_ETH_TYPE(0800)
1122 OXM_OF_IN_PORT(00000012), OXM_OF_ETH_TYPE(0800)
1125 OXM_OF_ETH_TYPE(0800), OXM_OF_IP_ECN(03)
1126 nx_pull_match() returned error OFPBMC_BAD_VALUE
1127 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1130 OXM_OF_ETH_TYPE(0800), OXM_OF_IP_PROTO(01)
1131 OXM_OF_ETH_TYPE(0800), OXM_OF_IP_PROTO(05)
1132 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1135 OXM_OF_ETH_TYPE(0800), OXM_OF_IPV4_SRC(ac100014)
1136 OXM_OF_ETH_TYPE(0800), OXM_OF_IPV4_SRC_W(c0a80000/ffff0000)
1137 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1138 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1141 OXM_OF_ETH_TYPE(0800), OXM_OF_IPV4_DST(ac100014)
1142 OXM_OF_ETH_TYPE(0800), OXM_OF_IPV4_DST_W(c0a80000/ffff0000)
1143 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1144 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1147 OXM_OF_ETH_TYPE(0800), OXM_OF_IP_PROTO(06), OXM_OF_TCP_SRC(4231)
1148 OXM_OF_ETH_TYPE(0800), OXM_OF_IP_PROTO(06), OXM_OF_TCP_SRC_W(5050/f0f0)
1149 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1151 # TCP destination port
1152 OXM_OF_ETH_TYPE(0800), OXM_OF_IP_PROTO(06), OXM_OF_TCP_DST(4231)
1153 OXM_OF_ETH_TYPE(0800), OXM_OF_IP_PROTO(06), OXM_OF_TCP_DST_W(fde0/fff0)
1154 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1157 OXM_OF_ETH_TYPE(0800), OXM_OF_IP_PROTO(11), OXM_OF_UDP_SRC(8732)
1158 OXM_OF_ETH_TYPE(0800), OXM_OF_IP_PROTO(11), OXM_OF_UDP_SRC_W(0132/01ff)
1159 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1161 # UDP destination port
1162 OXM_OF_ETH_TYPE(0800), OXM_OF_IP_PROTO(11), OXM_OF_UDP_DST(1782)
1163 OXM_OF_ETH_TYPE(0800), OXM_OF_IP_PROTO(11), OXM_OF_UDP_DST_W(5005/f00f)
1164 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1167 OXM_OF_ETH_TYPE(0800), OXM_OF_IP_PROTO(01), OXM_OF_ICMPV4_TYPE(12)
1168 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1171 OXM_OF_ETH_TYPE(0800), OXM_OF_IP_PROTO(01), OXM_OF_ICMPV4_CODE(12)
1172 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1173 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1174 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1177 OXM_OF_ETH_TYPE(0806), OXM_OF_ARP_OP(0001)
1178 nx_pull_match() returned error OFPBMC_BAD_VALUE
1179 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1180 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1181 nx_pull_match() returned error OFPBMC_DUP_FIELD
1183 # ARP source protocol address
1184 OXM_OF_ETH_TYPE(0806), OXM_OF_ARP_SPA(ac100014)
1185 OXM_OF_ETH_TYPE(0806), OXM_OF_ARP_SPA_W(c0a81200/ffffff00)
1186 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1187 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1189 # ARP destination protocol address
1190 OXM_OF_ETH_TYPE(0806), OXM_OF_ARP_TPA(ac100014)
1191 OXM_OF_ETH_TYPE(0806), OXM_OF_ARP_TPA_W(c0a81200/ffffff00)
1192 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1193 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1195 # ARP source hardware address
1196 OXM_OF_ETH_TYPE(0806), OXM_OF_ARP_SHA(0002e30f80a4)
1197 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1198 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1200 # ARP destination hardware address
1201 OXM_OF_ETH_TYPE(0806), OXM_OF_ARP_THA(0002e30f80a4)
1202 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1203 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1206 OXM_OF_ETH_TYPE(86dd), OXM_OF_IPV6_SRC(20010db83c4d00010002000300040005)
1207 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1208 OXM_OF_ETH_TYPE(86dd), OXM_OF_IPV6_SRC_W(20010db83c4d00010000000000000000/ffffffffffffffff0000000000000000)
1209 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1212 OXM_OF_ETH_TYPE(86dd), OXM_OF_IPV6_DST(20010db83c4d00010002000300040005)
1213 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1214 OXM_OF_ETH_TYPE(86dd), OXM_OF_IPV6_DST_W(20010db83c4d00010000000000000000/ffffffffffffffff0000000000000000)
1215 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1217 # ND source hardware address
1218 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)
1219 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1220 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1221 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1223 # ND destination hardware address
1224 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)
1225 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1226 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1227 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1229 # Invalid field number.
1230 nx_pull_match() returned error OFPBMC_BAD_FIELD
1234 AT_SETUP([ovs-ofctl parse-oxm loose])
1236 AT_DATA([oxm.txt], [dnl
1237 OXM_OF_IN_PORT(00000001), 01020304(1111/2222), OXM_OF_ETH_TYPE(0800)
1240 AT_CHECK([ovs-ofctl --strict parse-oxm < oxm.txt], [0], [dnl
1241 nx_pull_match() returned error OFPBMC_BAD_FIELD
1244 AT_CHECK([ovs-ofctl parse-oxm < oxm.txt], [0], [dnl
1245 OXM_OF_IN_PORT(00000001), OXM_OF_ETH_TYPE(0800)
1249 dnl Check that "-F openflow10" rejects a flow_mod with a tun_id, since
1250 dnl OpenFlow 1.0 doesn't support tunnels.
1251 AT_SETUP([ovs-ofctl -F option and tun_id])
1252 AT_CHECK([ovs-ofctl -F openflow10 add-flow dummy tun_id=123,actions=drop],
1253 [1], [], [ovs-ofctl: none of the usable flow formats (NXM) is among the allowed flow formats (OpenFlow10)
1257 dnl Check that "-F nxm" really forces add-flow to use the NXM flow format.
1258 dnl (If it doesn't, then either the tun_id won't show up at all, or it will
1259 dnl additionally show up as the top 32 bits of the cookie.) This checks
1260 dnl for regression against bug #4566.
1261 AT_SETUP([ovs-ofctl -F option with flow_mods])
1263 AT_CHECK([ovs-ofctl -F nxm add-flow br0 tun_id=0x12345678,actions=drop])
1264 AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip], [0], [dnl
1266 tun_id=0x12345678 actions=drop
1271 dnl Check that "-F openflow10" is really honored on dump-flows.
1272 dnl (If it isn't, then dump-flows will show the register match.)
1273 AT_SETUP([ovs-ofctl dump-flows honors -F option])
1275 AT_CHECK([ovs-ofctl add-flow br0 reg0=0x12345,actions=drop])
1276 AT_CHECK([ovs-ofctl -F openflow10 dump-flows br0 | ofctl_strip], [0], [dnl
1283 dnl Check that "-F openflow10" fails on dump-flows if the requested match
1284 dnl can't be represented in OpenFlow 1.0.
1285 AT_SETUP([ovs-ofctl dump-flows rejects bad -F option])
1287 AT_CHECK([ovs-ofctl -F openflow10 dump-flows unix:br0.mgmt reg0=0xabcdef], [1], [],
1288 [ovs-ofctl: none of the usable flow formats (NXM) is among the allowed flow formats (OpenFlow10)
1293 dnl Check that add-flow reports non-normalized flows (feature #5029).
1294 AT_SETUP([ovs-ofctl add-flow reports non-normalized flows])
1296 AT_CHECK([ovs-ofctl TESTABLE_LOG add-flow br0 nw_src=1.2.3.4,actions=5],
1298 ofp_util|INFO|normalization changed ofp_match, details:
1299 ofp_util|INFO| pre: nw_src=1.2.3.4
1300 ofp_util|INFO|post: @&t@