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 metadata=0x1234ffff5678ffff/0xffff0000ffff0000,actions=drop
46 actions=bundle(eth_src,50,active_backup,ofport,slaves:1)
47 actions=bundle(symmetric_l4,60,hrw,ofport,slaves:2,3)
48 actions=bundle(symmetric_l4,60,hrw,ofport,slaves:)
49 actions=output:1,bundle(eth_src,0,hrw,ofport,slaves:1),output:2
50 actions=bundle_load(eth_src,50,active_backup,ofport,NXM_NX_REG0[],slaves:1)
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..15],slaves:[2,3])
53 actions=bundle_load(symmetric_l4,60,hrw,ofport,NXM_NX_REG0[0..30],slaves:)
54 actions=output:1,bundle_load(eth_src,0,hrw,ofport,NXM_NX_REG0[16..31],slaves:1),output:2
55 actions=resubmit:1,resubmit(2),resubmit(,3),resubmit(2,3)
56 send_flow_rem,actions=output:1,output:NXM_NX_REG0[],output:2,output:NXM_NX_REG1[16..31],output:3
57 check_overlap,actions=output:1,exit,output:2
58 actions=fin_timeout(idle_timeout=5,hard_timeout=15)
59 actions=controller(max_len=123,reason=invalid_ttl,id=555)
62 AT_CHECK([ovs-ofctl parse-flows flows.txt
64 AT_CHECK([[sed 's/ (xid=0x[0-9a-fA-F]*)//' stdout]], [0],
65 [[usable protocols: NXM+table_id
66 chosen protocol: NXM+table_id
67 NXT_FLOW_MOD: ADD table:255 tcp,tp_src=123 actions=FLOOD
68 NXT_FLOW_MOD: ADD table:255 in_port=65534,dl_vlan=9,dl_src=00:0a:e4:25:6b:b0 actions=drop
69 NXT_FLOW_MOD: ADD table:255 udp,dl_vlan_pcp=7 idle:5 actions=strip_vlan,output:0
70 NXT_FLOW_MOD: ADD table:255 tcp,nw_src=192.168.0.3,tp_dst=80 actions=set_queue:37,output:1
71 NXT_FLOW_MOD: ADD table:255 udp,nw_src=192.168.0.3,tp_dst=53 actions=pop_queue,output:1
72 NXT_FLOW_MOD: ADD table:255 priority=60000 cookie:0x123456789abcdef hard:10 actions=CONTROLLER:65535
73 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
74 NXT_FLOW_MOD: ADD table:255 tcp,tun_id=0x1234,tp_src=0x1230/0xfff0 cookie:0x5678 actions=FLOOD
75 NXT_FLOW_MOD: ADD table:255 actions=set_tunnel:0x1234,set_tunnel64:0x9876,set_tunnel64:0x123456789
76 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])
77 NXT_FLOW_MOD: ADD table:1 actions=drop
78 NXT_FLOW_MOD: ADD table:255 tun_id=0x1234000056780000/0xffff0000ffff0000 actions=drop
79 NXT_FLOW_MOD: ADD table:255 metadata=0x1234000056780000/0xffff0000ffff0000 actions=drop
80 NXT_FLOW_MOD: ADD table:255 actions=bundle(eth_src,50,active_backup,ofport,slaves:1)
81 NXT_FLOW_MOD: ADD table:255 actions=bundle(symmetric_l4,60,hrw,ofport,slaves:2,3)
82 NXT_FLOW_MOD: ADD table:255 actions=bundle(symmetric_l4,60,hrw,ofport,slaves:)
83 NXT_FLOW_MOD: ADD table:255 actions=output:1,bundle(eth_src,0,hrw,ofport,slaves:1),output:2
84 NXT_FLOW_MOD: ADD table:255 actions=bundle_load(eth_src,50,active_backup,ofport,NXM_NX_REG0[],slaves:1)
85 NXT_FLOW_MOD: ADD table:255 actions=bundle_load(symmetric_l4,60,hrw,ofport,NXM_NX_REG0[0..15],slaves:2,3)
86 NXT_FLOW_MOD: ADD table:255 actions=bundle_load(symmetric_l4,60,hrw,ofport,NXM_NX_REG0[0..15],slaves:2,3)
87 NXT_FLOW_MOD: ADD table:255 actions=bundle_load(symmetric_l4,60,hrw,ofport,NXM_NX_REG0[0..30],slaves:)
88 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
89 NXT_FLOW_MOD: ADD table:255 actions=resubmit:1,resubmit:2,resubmit(,3),resubmit(2,3)
90 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
91 NXT_FLOW_MOD: ADD table:255 check_overlap actions=output:1,exit,output:2
92 NXT_FLOW_MOD: ADD table:255 actions=fin_timeout(idle_timeout=5,hard_timeout=15)
93 NXT_FLOW_MOD: ADD table:255 actions=controller(reason=invalid_ttl,max_len=123,id=555)
97 AT_SETUP([ovs-ofctl -F nxm parse-flows])
98 AT_DATA([flows.txt], [
100 tcp,tp_src=123,actions=flood
101 in_port=LOCAL dl_vlan=9 dl_src=00:0A:E4:25:6B:B0 actions=drop
102 arp,dl_src=00:0A:E4:25:6B:B0,arp_sha=00:0A:E4:25:6B:B0 actions=drop
103 ipv6,ipv6_label=0x12345 actions=2
104 ipv6,ipv6_src=2001:db8:3c4d:1:2:3:4:5 actions=3
105 ipv6,ipv6_src=2001:db8:3c4d:1:2:3:4:5/64 actions=4
106 ipv6,ipv6_dst=2001:db8:3c4d:1:2:3:4:5/127 actions=5
107 tcp6,ipv6_src=2001:db8:3c4d:1::1,tp_dst=80 actions=drop
108 udp6,ipv6_src=2001:db8:3c4d:1::3,tp_dst=53 actions=drop
109 in_port=3 icmp6,ipv6_src=2001:db8:3c4d:1::1,icmp_type=134 actions=drop
110 udp dl_vlan_pcp=7 idle_timeout=5 actions=strip_vlan output:0
111 tcp,nw_src=192.168.0.3,tp_dst=80 actions=set_queue:37,output:1
112 udp,nw_src=192.168.0.3,tp_dst=53 actions=pop_queue,output:1
113 icmp6,icmp_type=135,nd_target=FEC0::1234:F045:8FFF:1111:FE4E:0571 actions=drop
114 icmp6,icmp_type=135,nd_target=FEC0::1234:F045:8FFF:1111:FE4F:0571/112 actions=drop
115 icmp6,icmp_type=135,nd_sll=00:0A:E4:25:6B:B0 actions=drop
116 icmp6,icmp_type=136,nd_target=FEC0::1234:F045:8FFF:1111:FE4E:0571,nd_tll=00:0A:E4:25:6B:B1 actions=drop
117 icmp6,icmp_type=136,nd_target=FEC0::1234:F045:8FFF:1111:FE00:0000/96,nd_tll=00:0A:E4:25:6B:B1 actions=drop
118 cookie=0x123456789abcdef hard_timeout=10 priority=60000 actions=controller
119 actions=note:41.42.43,note:00.01.02.03.04.05.06.07,note
120 tun_id=0x1234,cookie=0x5678,actions=flood
122 tun_id=0x1234000056780000/0xffff0000ffff0000,actions=drop
123 dl_dst=01:00:00:00:00:00/01:00:00:00:00:00,actions=drop
124 dl_dst=00:00:00:00:00:00/01:00:00:00:00:00,actions=drop
125 dl_dst=aa:bb:cc:dd:ee:ff/fe:ff:ff:ff:ff:ff,actions=drop
126 dl_dst=aa:bb:cc:dd:ee:ff/00:00:00:00:00:00,actions=drop
128 AT_CHECK([ovs-ofctl -F nxm parse-flows flows.txt], [0], [stdout])
129 AT_CHECK([[sed 's/ (xid=0x[0-9a-fA-F]*)//' stdout]], [0], [dnl
130 usable protocols: NXM
131 chosen protocol: NXM-table_id
132 NXT_FLOW_MOD: ADD tcp,tp_src=123 actions=FLOOD
133 NXT_FLOW_MOD: ADD in_port=65534,dl_vlan=9,dl_src=00:0a:e4:25:6b:b0 actions=drop
134 NXT_FLOW_MOD: ADD arp,dl_src=00:0a:e4:25:6b:b0,arp_sha=00:0a:e4:25:6b:b0 actions=drop
135 NXT_FLOW_MOD: ADD ipv6,ipv6_label=0x12345 actions=output:2
136 NXT_FLOW_MOD: ADD ipv6,ipv6_src=2001:db8:3c4d:1:2:3:4:5 actions=output:3
137 NXT_FLOW_MOD: ADD ipv6,ipv6_src=2001:db8:3c4d:1::/64 actions=output:4
138 NXT_FLOW_MOD: ADD ipv6,ipv6_dst=2001:db8:3c4d:1:2:3:4:4/127 actions=output:5
139 NXT_FLOW_MOD: ADD tcp6,ipv6_src=2001:db8:3c4d:1::1,tp_dst=80 actions=drop
140 NXT_FLOW_MOD: ADD udp6,ipv6_src=2001:db8:3c4d:1::3,tp_dst=53 actions=drop
141 NXT_FLOW_MOD: ADD icmp6,in_port=3,ipv6_src=2001:db8:3c4d:1::1,icmp_type=134 actions=drop
142 NXT_FLOW_MOD: ADD udp,dl_vlan_pcp=7 idle:5 actions=strip_vlan,output:0
143 NXT_FLOW_MOD: ADD tcp,nw_src=192.168.0.3,tp_dst=80 actions=set_queue:37,output:1
144 NXT_FLOW_MOD: ADD udp,nw_src=192.168.0.3,tp_dst=53 actions=pop_queue,output:1
145 NXT_FLOW_MOD: ADD icmp6,icmp_type=135,nd_target=fec0:0:1234:f045:8fff:1111:fe4e:571 actions=drop
146 NXT_FLOW_MOD: ADD icmp6,icmp_type=135,nd_target=fec0:0:1234:f045:8fff:1111:fe4f:0/112 actions=drop
147 NXT_FLOW_MOD: ADD icmp6,icmp_type=135,nd_sll=00:0a:e4:25:6b:b0 actions=drop
148 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
149 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
150 NXT_FLOW_MOD: ADD priority=60000 cookie:0x123456789abcdef hard:10 actions=CONTROLLER:65535
151 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
152 NXT_FLOW_MOD: ADD tun_id=0x1234 cookie:0x5678 actions=FLOOD
153 NXT_FLOW_MOD: ADD actions=drop
154 NXT_FLOW_MOD: ADD tun_id=0x1234000056780000/0xffff0000ffff0000 actions=drop
155 NXT_FLOW_MOD: ADD dl_dst=01:00:00:00:00:00/01:00:00:00:00:00 actions=drop
156 NXT_FLOW_MOD: ADD dl_dst=00:00:00:00:00:00/01:00:00:00:00:00 actions=drop
157 NXT_FLOW_MOD: ADD dl_dst=aa:bb:cc:dd:ee:ff/fe:ff:ff:ff:ff:ff actions=drop
158 NXT_FLOW_MOD: ADD actions=drop
162 AT_SETUP([ovs-ofctl -F nxm -mmm parse-flows])
163 AT_DATA([flows.txt], [[
165 tcp,tp_src=123,actions=flood
166 in_port=LOCAL dl_vlan=9 dl_src=00:0A:E4:25:6B:B0 actions=drop
167 arp,dl_src=00:0A:E4:25:6B:B0,arp_sha=00:0A:E4:25:6B:B0 actions=drop
168 ipv6,ipv6_label=0x12345 actions=2
169 ipv6,ipv6_src=2001:db8:3c4d:1:2:3:4:5 actions=3
170 ipv6,ipv6_src=2001:db8:3c4d:1:2:3:4:5/64 actions=4
171 ipv6,ipv6_dst=2001:db8:3c4d:1:2:3:4:5/127 actions=5
172 tcp6,ipv6_src=2001:db8:3c4d:1::1,tp_dst=80 actions=drop
173 udp6,ipv6_src=2001:db8:3c4d:1::3,tp_dst=53 actions=drop
174 in_port=3 icmp6,ipv6_src=2001:db8:3c4d:1::1,icmp_type=134 actions=drop
175 udp dl_vlan_pcp=7 idle_timeout=5 actions=strip_vlan output:0
176 tcp,nw_src=192.168.0.3,tp_dst=80 actions=set_queue:37,output:1
177 udp,nw_src=192.168.0.3,tp_dst=53 actions=pop_queue,output:1
178 icmp6,icmp_type=135,nd_target=FEC0::1234:F045:8FFF:1111:FE4E:0571 actions=drop
179 icmp6,icmp_type=135,nd_sll=00:0A:E4:25:6B:B0 actions=drop
180 icmp6,icmp_type=136,nd_target=FEC0::1234:F045:8FFF:1111:FE4E:0571,nd_tll=00:0A:E4:25:6B:B1 actions=drop
181 cookie=0x123456789abcdef hard_timeout=10 priority=60000 actions=controller
182 actions=note:41.42.43,note:00.01.02.03.04.05.06.07,note
183 tun_id=0x1234,cookie=0x5678,actions=flood
185 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[]
186 actions=move:OXM_OF_ETH_DST[]->OXM_OF_ETH_SRC[]
187 actions=autopath(5,NXM_NX_REG0[])
188 vlan_tci=0x1123/0x1fff,actions=drop
190 AT_CHECK([ovs-ofctl -F nxm -mmm parse-flows flows.txt], [0], [stdout])
191 AT_CHECK([[sed 's/ (xid=0x[0-9a-fA-F]*)//' stdout]], [0],
192 [[usable protocols: NXM
193 chosen protocol: NXM-table_id
194 NXT_FLOW_MOD: ADD NXM_OF_ETH_TYPE(0800), NXM_OF_IP_PROTO(06), NXM_OF_TCP_SRC(007b) actions=FLOOD
195 NXT_FLOW_MOD: ADD NXM_OF_IN_PORT(fffe), NXM_OF_ETH_SRC(000ae4256bb0), NXM_OF_VLAN_TCI_W(1009/1fff) actions=drop
196 NXT_FLOW_MOD: ADD NXM_OF_ETH_SRC(000ae4256bb0), NXM_OF_ETH_TYPE(0806), NXM_NX_ARP_SHA(000ae4256bb0) actions=drop
197 NXT_FLOW_MOD: ADD NXM_OF_ETH_TYPE(86dd), NXM_NX_IPV6_LABEL(00012345) actions=output:2
198 NXT_FLOW_MOD: ADD NXM_OF_ETH_TYPE(86dd), NXM_NX_IPV6_SRC(20010db83c4d00010002000300040005) actions=output:3
199 NXT_FLOW_MOD: ADD NXM_OF_ETH_TYPE(86dd), NXM_NX_IPV6_SRC_W(20010db83c4d00010000000000000000/ffffffffffffffff0000000000000000) actions=output:4
200 NXT_FLOW_MOD: ADD NXM_OF_ETH_TYPE(86dd), NXM_NX_IPV6_DST_W(20010db83c4d00010002000300040004/fffffffffffffffffffffffffffffffe) actions=output:5
201 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
202 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
203 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
204 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
205 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
206 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
207 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
208 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
209 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
210 NXT_FLOW_MOD: ADD <any> cookie:0x123456789abcdef hard:10 pri:60000 actions=CONTROLLER:65535
211 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
212 NXT_FLOW_MOD: ADD NXM_NX_TUN_ID(0000000000001234) cookie:0x5678 actions=FLOOD
213 NXT_FLOW_MOD: ADD <any> actions=drop
214 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[]
215 NXT_FLOW_MOD: ADD <any> actions=move:NXM_OF_ETH_DST[]->NXM_OF_ETH_SRC[]
216 NXT_FLOW_MOD: ADD <any> actions=autopath(5,NXM_NX_REG0[])
217 NXT_FLOW_MOD: ADD NXM_OF_VLAN_TCI_W(1123/1fff) actions=drop
221 AT_SETUP([ovs-ofctl parse-nx-match])
222 AT_KEYWORDS([nx-match])
223 AT_DATA([nx-match.txt], [dnl
231 NXM_OF_ETH_DST(0002e30f80a4)
232 NXM_OF_ETH_DST_W(010000000000/010000000000)
233 NXM_OF_ETH_DST_W(000000000000/010000000000)
234 NXM_OF_ETH_DST_W(ffffffffffff/010000000000)
235 NXM_OF_ETH_DST_W(0002e30f80a4/ffffffffffff)
236 NXM_OF_ETH_DST_W(0002e30f80a4/feffffffffff)
237 NXM_OF_ETH_DST_W(60175619848f/5a5a5a5a5a5a)
240 NXM_OF_ETH_SRC(020898456ddb)
241 NXM_OF_ETH_SRC_W(012345abcdef/ffffff555555)
242 NXM_OF_ETH_SRC_W(020898456ddb/ffffffffffff)
245 NXM_OF_ETH_TYPE(0800)
246 NXM_OF_ETH_TYPE(0800) NXM_OF_IN_PORT(0012)
249 NXM_OF_VLAN_TCI(f009)
250 NXM_OF_VLAN_TCI(f009) NXM_OF_VLAN_TCI(f009)
251 NXM_OF_VLAN_TCI(0000) # Packets without 802.1Q header.
252 NXM_OF_VLAN_TCI(3123) # Packets with VID=123, PCP=1.
253 NXM_OF_VLAN_TCI(0123) # Does not make sense (but supported anyway)
254 NXM_OF_VLAN_TCI_W(1123/1fff) # Packets with VID=123, any PCP.
255 NXM_OF_VLAN_TCI_W(f000/f000) # Packets with any VID, PCP=7.
256 NXM_OF_VLAN_TCI_W(0000/e000) # No 802.1Q or with VID=0
259 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_TOS(f0)
260 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_TOS(41)
264 NXM_OF_ETH_TYPE(0800) NXM_NX_IP_ECN(03)
265 NXM_OF_ETH_TYPE(0800) NXM_NX_IP_ECN(06)
269 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_PROTO(01)
270 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_PROTO(05)
274 NXM_OF_ETH_TYPE(0800) NXM_NX_IP_TTL(80)
275 NXM_OF_ETH_TYPE(86dd) NXM_NX_IP_TTL(ff)
279 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_SRC(ac100014)
280 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_SRC_W(C0a80000/FFFF0000)
281 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_SRC_W(C0a80000/5a5a5a5a)
282 NXM_OF_ETH_TYPE(0806) NXM_OF_IP_SRC(ac100014)
283 NXM_OF_IP_SRC_W(C0D80000/FFFF0000)
286 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_DST(ac100014)
287 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_DST_W(C0a88012/FFFF0000)
288 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_DST_W(C0a80000/5a5a5a5a)
289 NXM_OF_IP_DST(ac100014)
290 NXM_OF_ETH_TYPE(0806) NXM_OF_IP_DST_W(C0D80000/FFFF0000)
293 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_PROTO(06) NXM_OF_TCP_SRC(4231)
294 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_PROTO(06) NXM_OF_TCP_SRC_W(5050/F0F0)
295 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_PROTO(07) NXM_OF_TCP_SRC(4231)
297 # TCP destination port
298 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_PROTO(06) NXM_OF_TCP_DST(4231)
299 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_PROTO(06) NXM_OF_TCP_DST_W(FDE0/FFF0)
300 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_PROTO(07) NXM_OF_TCP_DST(4231)
303 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_PROTO(11) NXM_OF_UDP_SRC(8732)
304 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_PROTO(11) NXM_OF_UDP_SRC_W(0132/01FF)
305 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_PROTO(06) NXM_OF_UDP_SRC(7823)
307 # UDP destination port
308 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_PROTO(11) NXM_OF_UDP_DST(1782)
309 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_PROTO(11) NXM_OF_UDP_DST_W(5005/F00F)
310 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_PROTO(02) NXM_OF_UDP_DST(1293)
313 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_PROTO(01) NXM_OF_ICMP_TYPE(12)
314 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_PROTO(00) NXM_OF_ICMP_TYPE(10)
317 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_PROTO(01) NXM_OF_ICMP_CODE(12)
318 NXM_OF_ETH_TYPE(0800) NXM_OF_IP_PROTO(00) NXM_OF_ICMP_CODE(10)
319 NXM_OF_ETH_TYPE(0800) NXM_OF_ICMP_CODE(10)
323 NXM_OF_ETH_TYPE(0806) NXM_OF_ARP_OP(0001)
324 NXM_OF_ETH_TYPE(0806) NXM_OF_ARP_OP(1111)
325 NXM_OF_ETH_TYPE(0000) NXM_OF_ARP_OP(0001)
327 NXM_OF_ETH_TYPE(0806) NXM_OF_ARP_OP(0001) NXM_OF_ARP_OP(0001)
329 # ARP source protocol address
330 NXM_OF_ETH_TYPE(0806) NXM_OF_ARP_SPA(ac100014)
331 NXM_OF_ETH_TYPE(0806) NXM_OF_ARP_SPA_W(C0a81234/FFFFFF00)
332 NXM_OF_ETH_TYPE(0806) NXM_OF_ARP_SPA_W(C0a81234/aaaaaa00)
333 NXM_OF_ETH_TYPE(0800) NXM_OF_ARP_SPA(ac100014)
334 NXM_OF_ARP_SPA_W(C0D8fedc/FFFF0000)
336 # ARP destination protocol address
337 NXM_OF_ETH_TYPE(0806) NXM_OF_ARP_TPA(ac100014)
338 NXM_OF_ETH_TYPE(0806) NXM_OF_ARP_TPA_W(C0a812fe/FFFFFF00)
339 NXM_OF_ETH_TYPE(0806) NXM_OF_ARP_TPA_W(C0a81234/77777777)
340 NXM_OF_ETH_TYPE(0800) NXM_OF_ARP_TPA(ac100014)
341 NXM_OF_ARP_TPA_W(C0D80000/FFFF0000)
343 # ARP source hardware address
344 NXM_OF_ETH_TYPE(0806) NXM_NX_ARP_SHA(0002e30f80a4)
345 NXM_OF_ETH_TYPE(0800) NXM_NX_ARP_SHA(0002e30f80a4)
346 NXM_NX_ARP_SHA(0002e30f80a4)
348 # ARP destination hardware address
349 NXM_OF_ETH_TYPE(0806) NXM_NX_ARP_THA(0002e30f80a4)
350 NXM_OF_ETH_TYPE(0800) NXM_NX_ARP_THA(0002e30f80a4)
351 NXM_NX_ARP_THA(0002e30f80a4)
354 NXM_OF_ETH_TYPE(86dd) NXM_NX_IPV6_SRC(20010db83c4d00010002000300040005)
355 NXM_OF_ETH_TYPE(0800) NXM_NX_IPV6_SRC(20010db83c4d00010002000300040005)
356 NXM_OF_ETH_TYPE(86dd) NXM_NX_IPV6_SRC_W(20010db83c4d00010000000000000000/ffffffffffffffff0000000000000000)
357 NXM_OF_ETH_TYPE(86dd) NXM_NX_IPV6_SRC_W(20010db83c4d00010000000000000000/5a5a5a5a5a5a5a5a0000000000000000)
358 NXM_OF_ETH_TYPE(0800) NXM_NX_IPV6_SRC_W(20010db83c4d00010000000000000000/ffffffffffffffff0000000000000000)
361 NXM_OF_ETH_TYPE(86dd) NXM_NX_IPV6_DST(20010db83c4d00010002000300040005)
362 NXM_OF_ETH_TYPE(0800) NXM_NX_IPV6_DST(20010db83c4d00010002000300040005)
363 NXM_OF_ETH_TYPE(86dd) NXM_NX_IPV6_DST_W(20010db83c4d00010000000000000000/77777777777777777777777777777777)
364 NXM_OF_ETH_TYPE(0800) NXM_NX_IPV6_DST_W(20010db83c4d00010000000000000000/ffffffffffffffff0000000000000000)
367 NXM_OF_ETH_TYPE(86dd) NXM_NX_IPV6_LABEL(1000000f)
368 NXM_NX_IPV6_LABEL(0000000f)
369 NXM_OF_ETH_TYPE(86dd) NXM_NX_IPV6_LABEL(0000000f)
372 NXM_OF_ETH_TYPE(86dd) NXM_OF_IP_PROTO(3a) NXM_NX_ICMPV6_TYPE(87) NXM_NX_ND_TARGET(20010db83c4d00010002000300040005)
373 NXM_OF_ETH_TYPE(86dd) NXM_OF_IP_PROTO(3a) NXM_NX_ICMPV6_TYPE(88) NXM_NX_ND_TARGET(20010db83c4d00010002000300040005)
374 NXM_OF_ETH_TYPE(86dd) NXM_OF_IP_PROTO(3a) NXM_NX_ICMPV6_TYPE(87) NXM_NX_ND_TARGET_W(20010db83c4d00010002000300040005/0123456789abcdeffedcba9876543210)
375 NXM_OF_ETH_TYPE(86dd) NXM_OF_IP_PROTO(3a) NXM_NX_ICMPV6_TYPE(88) NXM_NX_ND_TARGET_W(20010db83c4d00010002000300040005/fedcba98765432100123456789abcdef)
377 # ND source hardware address
378 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)
379 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)
380 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)
381 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)
383 # ND destination hardware address
384 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)
385 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)
386 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)
387 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)
390 NXM_OF_ETH_TYPE(0800) NXM_NX_IP_FRAG(00)
391 NXM_OF_ETH_TYPE(0800) NXM_NX_IP_FRAG(01)
392 NXM_OF_ETH_TYPE(0800) NXM_NX_IP_FRAG(02)
393 NXM_OF_ETH_TYPE(0800) NXM_NX_IP_FRAG(03)
394 NXM_OF_ETH_TYPE(0800) NXM_NX_IP_FRAG_W(00/03)
395 NXM_OF_ETH_TYPE(0800) NXM_NX_IP_FRAG_W(00/fd)
396 NXM_OF_ETH_TYPE(0800) NXM_NX_IP_FRAG_W(00/02)
397 NXM_OF_ETH_TYPE(0800) NXM_NX_IP_FRAG_W(01/01)
398 NXM_OF_ETH_TYPE(0800) NXM_NX_IP_FRAG_W(02/02)
399 NXM_OF_ETH_TYPE(0800) NXM_NX_IP_FRAG_W(03/03)
400 NXM_OF_ETH_TYPE(0800) NXM_NX_IP_FRAG(f3)
403 NXM_OF_ETH_TYPE(86dd) NXM_NX_IP_FRAG(00)
404 NXM_OF_ETH_TYPE(86dd) NXM_NX_IP_FRAG(01)
405 NXM_OF_ETH_TYPE(86dd) NXM_NX_IP_FRAG(02)
406 NXM_OF_ETH_TYPE(86dd) NXM_NX_IP_FRAG(03)
407 NXM_OF_ETH_TYPE(86dd) NXM_NX_IP_FRAG_W(00/03)
408 NXM_OF_ETH_TYPE(86dd) NXM_NX_IP_FRAG_W(00/01)
409 NXM_OF_ETH_TYPE(86dd) NXM_NX_IP_FRAG_W(00/02)
410 NXM_OF_ETH_TYPE(86dd) NXM_NX_IP_FRAG_W(01/01)
411 NXM_OF_ETH_TYPE(86dd) NXM_NX_IP_FRAG_W(02/02)
412 NXM_OF_ETH_TYPE(86dd) NXM_NX_IP_FRAG_W(03/03)
413 NXM_OF_ETH_TYPE(86dd) NXM_NX_IP_FRAG(f3)
416 NXM_NX_COOKIE(00000000abcdef01)
417 NXM_NX_COOKIE_W(84200000abcdef01/84200000FFFFFFFF)
420 NXM_NX_TUN_ID(00000000abcdef01)
421 NXM_NX_TUN_ID_W(84200000abcdef01/84200000FFFFFFFF)
424 NXM_NX_REG0(acebdf56)
425 NXM_NX_REG0_W(a0e0d050/f0f0f0f0)
427 # Invalid field number.
430 # Unimplemented registers.
432 # This test assumes that at least two registers, but fewer than 16,
433 # registers are implemented.
435 00010108(12345678/12345678)
437 00011f08(12345678/12345678)
439 AT_CHECK([ovs-ofctl --strict parse-nx-match < nx-match.txt], [0], [dnl
447 NXM_OF_ETH_DST(0002e30f80a4)
448 NXM_OF_ETH_DST_W(010000000000/010000000000)
449 NXM_OF_ETH_DST_W(000000000000/010000000000)
450 NXM_OF_ETH_DST_W(010000000000/010000000000)
451 NXM_OF_ETH_DST(0002e30f80a4)
452 NXM_OF_ETH_DST_W(0002e30f80a4/feffffffffff)
453 NXM_OF_ETH_DST_W(40125218000a/5a5a5a5a5a5a)
456 NXM_OF_ETH_SRC(020898456ddb)
457 NXM_OF_ETH_SRC_W(012345014545/ffffff555555)
458 NXM_OF_ETH_SRC(020898456ddb)
461 NXM_OF_ETH_TYPE(0800)
462 NXM_OF_IN_PORT(0012), NXM_OF_ETH_TYPE(0800)
465 NXM_OF_VLAN_TCI(f009)
466 nx_pull_match() returned error OFPBMC_DUP_FIELD
467 NXM_OF_VLAN_TCI(0000)
468 NXM_OF_VLAN_TCI(3123)
469 NXM_OF_VLAN_TCI(0123)
470 NXM_OF_VLAN_TCI_W(1123/1fff)
471 NXM_OF_VLAN_TCI_W(f000/f000)
472 NXM_OF_VLAN_TCI_W(0000/e000)
475 NXM_OF_ETH_TYPE(0800), NXM_OF_IP_TOS(f0)
476 nx_pull_match() returned error OFPBMC_BAD_VALUE
477 nx_pull_match() returned error OFPBMC_BAD_PREREQ
480 NXM_OF_ETH_TYPE(0800), NXM_NX_IP_ECN(03)
481 nx_pull_match() returned error OFPBMC_BAD_VALUE
482 nx_pull_match() returned error OFPBMC_BAD_PREREQ
485 NXM_OF_ETH_TYPE(0800), NXM_OF_IP_PROTO(01)
486 NXM_OF_ETH_TYPE(0800), NXM_OF_IP_PROTO(05)
487 nx_pull_match() returned error OFPBMC_BAD_PREREQ
490 NXM_OF_ETH_TYPE(0800), NXM_NX_IP_TTL(80)
491 NXM_OF_ETH_TYPE(86dd), NXM_NX_IP_TTL(ff)
492 nx_pull_match() returned error OFPBMC_BAD_PREREQ
495 NXM_OF_ETH_TYPE(0800), NXM_OF_IP_SRC(ac100014)
496 NXM_OF_ETH_TYPE(0800), NXM_OF_IP_SRC_W(c0a80000/ffff0000)
497 NXM_OF_ETH_TYPE(0800), NXM_OF_IP_SRC_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_DST(ac100014)
503 NXM_OF_ETH_TYPE(0800), NXM_OF_IP_DST_W(c0a80000/ffff0000)
504 NXM_OF_ETH_TYPE(0800), NXM_OF_IP_DST_W(40080000/5a5a5a5a)
505 nx_pull_match() returned error OFPBMC_BAD_PREREQ
506 nx_pull_match() returned error OFPBMC_BAD_PREREQ
509 NXM_OF_ETH_TYPE(0800), NXM_OF_IP_PROTO(06), NXM_OF_TCP_SRC(4231)
510 NXM_OF_ETH_TYPE(0800), NXM_OF_IP_PROTO(06), NXM_OF_TCP_SRC_W(5050/f0f0)
511 nx_pull_match() returned error OFPBMC_BAD_PREREQ
513 # TCP destination port
514 NXM_OF_ETH_TYPE(0800), NXM_OF_IP_PROTO(06), NXM_OF_TCP_DST(4231)
515 NXM_OF_ETH_TYPE(0800), NXM_OF_IP_PROTO(06), NXM_OF_TCP_DST_W(fde0/fff0)
516 nx_pull_match() returned error OFPBMC_BAD_PREREQ
519 NXM_OF_ETH_TYPE(0800), NXM_OF_IP_PROTO(11), NXM_OF_UDP_SRC(8732)
520 NXM_OF_ETH_TYPE(0800), NXM_OF_IP_PROTO(11), NXM_OF_UDP_SRC_W(0132/01ff)
521 nx_pull_match() returned error OFPBMC_BAD_PREREQ
523 # UDP destination port
524 NXM_OF_ETH_TYPE(0800), NXM_OF_IP_PROTO(11), NXM_OF_UDP_DST(1782)
525 NXM_OF_ETH_TYPE(0800), NXM_OF_IP_PROTO(11), NXM_OF_UDP_DST_W(5005/f00f)
526 nx_pull_match() returned error OFPBMC_BAD_PREREQ
529 NXM_OF_ETH_TYPE(0800), NXM_OF_IP_PROTO(01), NXM_OF_ICMP_TYPE(12)
530 nx_pull_match() returned error OFPBMC_BAD_PREREQ
533 NXM_OF_ETH_TYPE(0800), NXM_OF_IP_PROTO(01), NXM_OF_ICMP_CODE(12)
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_BAD_PREREQ
539 NXM_OF_ETH_TYPE(0806), NXM_OF_ARP_OP(0001)
540 nx_pull_match() returned error OFPBMC_BAD_VALUE
541 nx_pull_match() returned error OFPBMC_BAD_PREREQ
542 nx_pull_match() returned error OFPBMC_BAD_PREREQ
543 nx_pull_match() returned error OFPBMC_DUP_FIELD
545 # ARP source protocol address
546 NXM_OF_ETH_TYPE(0806), NXM_OF_ARP_SPA(ac100014)
547 NXM_OF_ETH_TYPE(0806), NXM_OF_ARP_SPA_W(c0a81200/ffffff00)
548 NXM_OF_ETH_TYPE(0806), NXM_OF_ARP_SPA_W(80a80200/aaaaaa00)
549 nx_pull_match() returned error OFPBMC_BAD_PREREQ
550 nx_pull_match() returned error OFPBMC_BAD_PREREQ
552 # ARP destination protocol address
553 NXM_OF_ETH_TYPE(0806), NXM_OF_ARP_TPA(ac100014)
554 NXM_OF_ETH_TYPE(0806), NXM_OF_ARP_TPA_W(c0a81200/ffffff00)
555 NXM_OF_ETH_TYPE(0806), NXM_OF_ARP_TPA_W(40201234/77777777)
556 nx_pull_match() returned error OFPBMC_BAD_PREREQ
557 nx_pull_match() returned error OFPBMC_BAD_PREREQ
559 # ARP source hardware address
560 NXM_OF_ETH_TYPE(0806), NXM_NX_ARP_SHA(0002e30f80a4)
561 nx_pull_match() returned error OFPBMC_BAD_PREREQ
562 nx_pull_match() returned error OFPBMC_BAD_PREREQ
564 # ARP destination hardware address
565 NXM_OF_ETH_TYPE(0806), NXM_NX_ARP_THA(0002e30f80a4)
566 nx_pull_match() returned error OFPBMC_BAD_PREREQ
567 nx_pull_match() returned error OFPBMC_BAD_PREREQ
570 NXM_OF_ETH_TYPE(86dd), NXM_NX_IPV6_SRC(20010db83c4d00010002000300040005)
571 nx_pull_match() returned error OFPBMC_BAD_PREREQ
572 NXM_OF_ETH_TYPE(86dd), NXM_NX_IPV6_SRC_W(20010db83c4d00010000000000000000/ffffffffffffffff0000000000000000)
573 NXM_OF_ETH_TYPE(86dd), NXM_NX_IPV6_SRC_W(00000818184800000000000000000000/5a5a5a5a5a5a5a5a0000000000000000)
574 nx_pull_match() returned error OFPBMC_BAD_PREREQ
577 NXM_OF_ETH_TYPE(86dd), NXM_NX_IPV6_DST(20010db83c4d00010002000300040005)
578 nx_pull_match() returned error OFPBMC_BAD_PREREQ
579 NXM_OF_ETH_TYPE(86dd), NXM_NX_IPV6_DST_W(20010530344500010000000000000000/77777777777777777777777777777777)
580 nx_pull_match() returned error OFPBMC_BAD_PREREQ
583 nx_pull_match() returned error OFPBMC_BAD_VALUE
584 nx_pull_match() returned error OFPBMC_BAD_PREREQ
585 NXM_OF_ETH_TYPE(86dd), NXM_NX_IPV6_LABEL(0000000f)
588 NXM_OF_ETH_TYPE(86dd), NXM_OF_IP_PROTO(3a), NXM_NX_ICMPV6_TYPE(87), NXM_NX_ND_TARGET(20010db83c4d00010002000300040005)
589 NXM_OF_ETH_TYPE(86dd), NXM_OF_IP_PROTO(3a), NXM_NX_ICMPV6_TYPE(88), NXM_NX_ND_TARGET(20010db83c4d00010002000300040005)
590 NXM_OF_ETH_TYPE(86dd), NXM_OF_IP_PROTO(3a), NXM_NX_ICMPV6_TYPE(87), NXM_NX_ND_TARGET_W(00010520080900010000000000040000/0123456789abcdeffedcba9876543210)
591 NXM_OF_ETH_TYPE(86dd), NXM_OF_IP_PROTO(3a), NXM_NX_ICMPV6_TYPE(88), NXM_NX_ND_TARGET_W(20000898344400000002000300000005/fedcba98765432100123456789abcdef)
593 # ND source hardware address
594 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)
595 nx_pull_match() returned error OFPBMC_BAD_PREREQ
596 nx_pull_match() returned error OFPBMC_BAD_PREREQ
597 nx_pull_match() returned error OFPBMC_BAD_PREREQ
599 # ND destination hardware address
600 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)
601 nx_pull_match() returned error OFPBMC_BAD_PREREQ
602 nx_pull_match() returned error OFPBMC_BAD_PREREQ
603 nx_pull_match() returned error OFPBMC_BAD_PREREQ
606 NXM_OF_ETH_TYPE(0800), NXM_NX_IP_FRAG(00)
607 NXM_OF_ETH_TYPE(0800), NXM_NX_IP_FRAG(01)
608 NXM_OF_ETH_TYPE(0800), NXM_NX_IP_FRAG(02)
609 NXM_OF_ETH_TYPE(0800), NXM_NX_IP_FRAG(03)
610 NXM_OF_ETH_TYPE(0800), NXM_NX_IP_FRAG(00)
611 NXM_OF_ETH_TYPE(0800), NXM_NX_IP_FRAG_W(00/01)
612 NXM_OF_ETH_TYPE(0800), NXM_NX_IP_FRAG_W(00/02)
613 NXM_OF_ETH_TYPE(0800), NXM_NX_IP_FRAG_W(01/01)
614 NXM_OF_ETH_TYPE(0800), NXM_NX_IP_FRAG_W(02/02)
615 NXM_OF_ETH_TYPE(0800), NXM_NX_IP_FRAG(03)
616 nx_pull_match() returned error OFPBMC_BAD_VALUE
619 NXM_OF_ETH_TYPE(86dd), NXM_NX_IP_FRAG(00)
620 NXM_OF_ETH_TYPE(86dd), NXM_NX_IP_FRAG(01)
621 NXM_OF_ETH_TYPE(86dd), NXM_NX_IP_FRAG(02)
622 NXM_OF_ETH_TYPE(86dd), NXM_NX_IP_FRAG(03)
623 NXM_OF_ETH_TYPE(86dd), NXM_NX_IP_FRAG(00)
624 NXM_OF_ETH_TYPE(86dd), NXM_NX_IP_FRAG_W(00/01)
625 NXM_OF_ETH_TYPE(86dd), NXM_NX_IP_FRAG_W(00/02)
626 NXM_OF_ETH_TYPE(86dd), NXM_NX_IP_FRAG_W(01/01)
627 NXM_OF_ETH_TYPE(86dd), NXM_NX_IP_FRAG_W(02/02)
628 NXM_OF_ETH_TYPE(86dd), NXM_NX_IP_FRAG(03)
629 nx_pull_match() returned error OFPBMC_BAD_VALUE
632 NXM_NX_COOKIE(00000000abcdef01)
633 NXM_NX_COOKIE_W(84200000abcdef01/84200000ffffffff)
636 NXM_NX_TUN_ID(00000000abcdef01)
637 NXM_NX_TUN_ID_W(84200000abcdef01/84200000ffffffff)
640 NXM_NX_REG0(acebdf56)
641 NXM_NX_REG0_W(a0e0d050/f0f0f0f0)
643 # Invalid field number.
644 nx_pull_match() returned error OFPBMC_BAD_FIELD
646 # Unimplemented registers.
648 # This test assumes that at least two registers, but fewer than 16,
649 # registers are implemented.
650 NXM_NX_REG0(12345678)
651 NXM_NX_REG0_W(12345678/12345678)
652 nx_pull_match() returned error OFPBMC_BAD_FIELD
653 nx_pull_match() returned error OFPBMC_BAD_FIELD
657 AT_SETUP([ovs-ofctl parse-ofp11-match])
659 AT_DATA([test-data], [dnl
661 0000 0058 fffffffe 000003fe dnl
662 000000000000ffffffffffff 000000000000ffffffffffff dnl
663 0000 00 00 0000 00 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
664 00000000 00 000000 0000000000000000ffffffffffffffff
666 # bad ofp11_match: OFPBMC_BAD_VALUE
667 & ofp_util|WARN|port 305419896 is outside the supported range 0 through 65279 or 0xffffff00 through 0xffffffff
668 0000 0058 12345678 000003fe dnl
669 000000000000ffffffffffff 000000000000ffffffffffff dnl
670 0000 00 00 0000 00 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
671 00000000 00 000000 0000000000000000ffffffffffffffff
673 # dl_src=00:01:02:03:04:05
674 0000 0058 00000000 000003ff dnl
675 000102030405000000000000 000000000000ffffffffffff dnl
676 0000 00 00 0000 00 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
677 00000000 00 000000 0000000000000000ffffffffffffffff
679 # dl_src=55:55:55:55:55:55/55:55:55:55:55:55
680 0000 0058 00000000 000003ff dnl
681 555555555555aaaaaaaaaaaa 000000000000ffffffffffff 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
686 0000 0058 00000000 000003ff dnl
687 000000000000ffffffffffff 000102030405000000000000 dnl
688 0000 00 00 0000 00 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
689 00000000 00 000000 0000000000000000ffffffffffffffff
691 # dl_dst=01:00:00:00:00:00/01:00:00:00:00:00
692 0000 0058 00000000 000003ff dnl
693 000000000000ffffffffffff 010000000000feffffffffff dnl
694 0000 00 00 0000 00 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
695 00000000 00 000000 0000000000000000ffffffffffffffff
697 # dl_dst=00:01:02:03:04:05/fe:ff:ff:ff:ff:ff
698 0000 0058 00000000 000003ff dnl
699 000000000000ffffffffffff 000102030405010000000000 dnl
700 0000 00 00 0000 00 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
701 00000000 00 000000 0000000000000000ffffffffffffffff
703 # dl_dst=55:55:55:55:55:55/55:55:55:55:55:55
704 0000 0058 00000000 000003ff dnl
705 000000000000ffffffffffff 555555555555aaaaaaaaaaaa dnl
706 0000 00 00 0000 00 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
707 00000000 00 000000 0000000000000000ffffffffffffffff
709 dnl dl_vlan_pcp is ignored if dl_vlan is wildcarded, which causes the
710 dnl the wildcard bit and the dl_vlan_pcp to be dropped for output:
714 0000 0058 00000001 000003fa dnl
715 000000000000ffffffffffff 000000000000ffffffffffff dnl
716 0000 03 00 0000 00 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
717 00000000 00 000000 0000000000000000ffffffffffffffff
720 0000 0058 00000000 000003fd dnl
721 000000000000ffffffffffff 000000000000ffffffffffff dnl
722 0123 00 00 0000 00 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
723 00000000 00 000000 0000000000000000ffffffffffffffff
727 0000 0058 00000000 000003fd dnl
728 000000000000ffffffffffff 000000000000ffffffffffff dnl
729 ffff 00 00 0000 00 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
730 00000000 00 000000 0000000000000000ffffffffffffffff
732 dnl OFPVID_NONE ignores dl_vlan_pcp even if not wildcarded, which causes
733 dnl the wildcard bit and the dl_vlan_pcp to be dropped for output:
737 0000 0058 00000000 000003f9 dnl
738 000000000000ffffffffffff 000000000000ffffffffffff dnl
739 ffff 05 00 0000 00 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
740 00000000 00 000000 0000000000000000ffffffffffffffff
742 # vlan_tci=0x1000/0x1000
743 0000 0058 00000000 000003fd dnl
744 000000000000ffffffffffff 000000000000ffffffffffff dnl
745 fffe 00 00 0000 00 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
746 00000000 00 000000 0000000000000000ffffffffffffffff
749 # bad ofp11_match: OFPBMC_BAD_VALUE
750 0000 0058 00000000 000003fd dnl
751 000000000000ffffffffffff 000000000000ffffffffffff dnl
752 1234 00 00 0000 00 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
753 00000000 00 000000 0000000000000000ffffffffffffffff
756 0000 0058 00000000 000003f9 dnl
757 000000000000ffffffffffff 000000000000ffffffffffff dnl
758 fffe 04 00 0000 00 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
759 00000000 00 000000 0000000000000000ffffffffffffffff
761 # dl_vlan=10,dl_vlan_pcp=6
762 0000 0058 00000000 000003f9 dnl
763 000000000000ffffffffffff 000000000000ffffffffffff dnl
764 000a 06 00 0000 00 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
765 00000000 00 000000 0000000000000000ffffffffffffffff
768 0000 0058 00000000 000003f7 dnl
769 000000000000ffffffffffff 000000000000ffffffffffff dnl
770 0000 00 00 1234 00 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
771 00000000 00 000000 0000000000000000ffffffffffffffff
774 0000 0058 00000000 000003e7 dnl
775 000000000000ffffffffffff 000000000000ffffffffffff dnl
776 0000 00 00 0800 fc 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
777 00000000 00 000000 0000000000000000ffffffffffffffff
780 # bad ofp11_match: OFPBMC_BAD_VALUE
781 0000 0058 00000000 000003e7 dnl
782 000000000000ffffffffffff 000000000000ffffffffffff dnl
783 0000 00 00 0800 01 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
784 00000000 00 000000 0000000000000000ffffffffffffffff
787 0000 0058 00000000 000003d7 dnl
788 000000000000ffffffffffff 000000000000ffffffffffff dnl
789 0000 00 00 0800 00 05 00000000ffffffff 00000000ffffffff 0000 0000 dnl
790 00000000 00 000000 0000000000000000ffffffffffffffff
793 0000 0058 00000000 000003d7 dnl
794 000000000000ffffffffffff 000000000000ffffffffffff dnl
795 0000 00 00 0806 00 02 00000000ffffffff 00000000ffffffff 0000 0000 dnl
796 00000000 00 000000 0000000000000000ffffffffffffffff
798 # ip,nw_src=192.168.128.0/24
799 0000 0058 00000000 000003f7 dnl
800 000000000000ffffffffffff 000000000000ffffffffffff dnl
801 0000 00 00 0800 00 00 c0a88000000000ff 00000000ffffffff 0000 0000 dnl
802 00000000 00 000000 0000000000000000ffffffffffffffff
804 # ip,nw_src=128.160.128.0/165.165.165.165
807 0000 0058 00000000 000003f7 dnl
808 000000000000ffffffffffff 000000000000ffffffffffff dnl
809 0000 00 00 0800 00 00 c0a880005a5a5a5a 00000000ffffffff 0000 0000 dnl
810 00000000 00 000000 0000000000000000ffffffffffffffff
812 # ip,nw_dst=192.168.128.0/24
813 0000 0058 00000000 000003f7 dnl
814 000000000000ffffffffffff 000000000000ffffffffffff dnl
815 0000 00 00 0800 00 00 00000000ffffffff c0a88000000000ff 0000 0000 dnl
816 00000000 00 000000 0000000000000000ffffffffffffffff
818 # ip,nw_dst=128.160.128.0/165.165.165.165
821 0000 0058 00000000 000003f7 dnl
822 000000000000ffffffffffff 000000000000ffffffffffff dnl
823 0000 00 00 0800 00 00 00000000ffffffff c0a880005a5a5a5a 0000 0000 dnl
824 00000000 00 000000 0000000000000000ffffffffffffffff
826 # arp,nw_src=192.168.128.0/24
827 0000 0058 00000000 000003f7 dnl
828 000000000000ffffffffffff 000000000000ffffffffffff dnl
829 0000 00 00 0806 00 00 c0a88000000000ff 00000000ffffffff 0000 0000 dnl
830 00000000 00 000000 0000000000000000ffffffffffffffff
832 # arp,nw_dst=192.168.128.0/24
833 0000 0058 00000000 000003f7 dnl
834 000000000000ffffffffffff 000000000000ffffffffffff dnl
835 0000 00 00 0806 00 00 00000000ffffffff c0a88000000000ff 0000 0000 dnl
836 00000000 00 000000 0000000000000000ffffffffffffffff
839 0000 0058 00000000 00000397 dnl
840 000000000000ffffffffffff 000000000000ffffffffffff dnl
841 0000 00 00 0800 00 06 00000000ffffffff 00000000ffffffff 01bb 0000 dnl
842 00000000 00 000000 0000000000000000ffffffffffffffff
845 0000 0058 00000000 00000357 dnl
846 000000000000ffffffffffff 000000000000ffffffffffff dnl
847 0000 00 00 0800 00 06 00000000ffffffff 00000000ffffffff 0000 01bb dnl
848 00000000 00 000000 0000000000000000ffffffffffffffff
851 0000 0058 00000000 00000397 dnl
852 000000000000ffffffffffff 000000000000ffffffffffff dnl
853 0000 00 00 0800 00 11 00000000ffffffff 00000000ffffffff 01bb 0000 dnl
854 00000000 00 000000 0000000000000000ffffffffffffffff
857 0000 0058 00000000 00000397 dnl
858 000000000000ffffffffffff 000000000000ffffffffffff dnl
859 0000 00 00 0800 00 01 00000000ffffffff 00000000ffffffff 0005 0000 dnl
860 00000000 00 000000 0000000000000000ffffffffffffffff
863 0000 0058 00000000 00000357 dnl
864 000000000000ffffffffffff 000000000000ffffffffffff dnl
865 0000 00 00 0800 00 01 00000000ffffffff 00000000ffffffff 0000 0008 dnl
866 00000000 00 000000 0000000000000000ffffffffffffffff
869 0000 0058 00000000 00000397 dnl
870 000000000000ffffffffffff 000000000000ffffffffffff dnl
871 0000 00 00 0800 00 11 00000000ffffffff 00000000ffffffff 01bb 0000 dnl
872 00000000 00 000000 0000000000000000ffffffffffffffff
875 0000 0058 00000000 00000357 dnl
876 000000000000ffffffffffff 000000000000ffffffffffff dnl
877 0000 00 00 0800 00 11 00000000ffffffff 00000000ffffffff 0000 01bb dnl
878 00000000 00 000000 0000000000000000ffffffffffffffff
882 0000 0058 00000000 000003d7 dnl
883 000000000000ffffffffffff 000000000000ffffffffffff dnl
884 0000 00 00 0800 00 84 00000000ffffffff 00000000ffffffff 0000 0000 dnl
885 00000000 00 000000 0000000000000000ffffffffffffffff
887 dnl SCTP tp_src matching not supported:
888 # bad ofp11_match: OFPBMC_BAD_FIELD
889 0000 0058 00000000 00000397 dnl
890 000000000000ffffffffffff 000000000000ffffffffffff dnl
891 0000 00 00 0800 00 84 00000000ffffffff 00000000ffffffff 01bb 0000 dnl
892 00000000 00 000000 0000000000000000ffffffffffffffff
894 dnl SCTP tp_dst matching not supported:
895 # bad ofp11_match: OFPBMC_BAD_FIELD
896 0000 0058 00000000 00000357 dnl
897 000000000000ffffffffffff 000000000000ffffffffffff dnl
898 0000 00 00 0800 00 84 00000000ffffffff 00000000ffffffff 0000 01bb dnl
899 00000000 00 000000 0000000000000000ffffffffffffffff
901 dnl Ignore tp_src if not TCP or UDP or SCTP:
906 0000 0058 00000000 00000397 dnl
907 000000000000ffffffffffff 000000000000ffffffffffff dnl
908 0000 00 00 0800 00 15 00000000ffffffff 00000000ffffffff 01bb 0000 dnl
909 00000000 00 000000 0000000000000000ffffffffffffffff
911 dnl Ignore tp_dst if not TCP or UDP or SCTP:
916 0000 0058 00000000 00000357 dnl
917 000000000000ffffffffffff 000000000000ffffffffffff dnl
918 0000 00 00 0800 00 16 00000000ffffffff 00000000ffffffff 0000 01bb dnl
919 00000000 00 000000 0000000000000000ffffffffffffffff
921 dnl mpls_label not yet supported:
922 # bad ofp11_match: OFPBMC_BAD_TAG
923 0000 0058 00000000 000002f7 dnl
924 000000000000ffffffffffff 000000000000ffffffffffff dnl
925 0000 00 00 8847 00 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
926 12345678 00 000000 0000000000000000ffffffffffffffff
928 dnl mpls_tc not yet supported:
929 # bad ofp11_match: OFPBMC_BAD_TAG
930 0000 0058 00000000 000001f7 dnl
931 000000000000ffffffffffff 000000000000ffffffffffff dnl
932 0000 00 00 8848 00 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
933 00000000 5a 000000 0000000000000000ffffffffffffffff
935 dnl mpls_label and mpls_tc must be ignored if dl_type is not MPLS:
943 0000 0058 00000000 000000f7 dnl
944 000000000000ffffffffffff 000000000000ffffffffffff dnl
945 0000 00 00 1234 00 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
946 12345678 5a 000000 0000000000000000ffffffffffffffff
949 # metadata=0x1234567890abcdef
950 0000 0058 00000000 000003ff dnl
951 000000000000ffffffffffff 000000000000ffffffffffff dnl
952 0000 00 00 0000 00 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
953 00000000 00 000000 1234567890abcdef0000000000000000
956 # metadata=0x5555555555555555/0x5555555555555555
957 0000 0058 00000000 000003ff dnl
958 000000000000ffffffffffff 000000000000ffffffffffff dnl
959 0000 00 00 0000 00 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
960 00000000 00 000000 5555555555555555aaaaaaaaaaaaaaaa
963 # metadata=0x1234000090ab0000/0xffff0000ffff0000
968 0000 0058 00000000 000003ff dnl
969 000000000000ffffffffffff 000000000000ffffffffffff dnl
970 0000 00 00 0000 00 00 00000000ffffffff 00000000ffffffff 0000 0000 dnl
971 00000000 00 000000 1234567890abcdef0000ffff0000ffff
974 sed '/^[[#&]]/d' < test-data > input.txt
975 sed -n 's/^# //p; /^$/p' < test-data > expout
976 sed -n 's/^& //p' < test-data > experr
977 AT_CAPTURE_FILE([input.txt])
978 AT_CAPTURE_FILE([expout])
979 AT_CAPTURE_FILE([experr])
981 [ovs-ofctl '-vPATTERN:console:%c|%p|%m' parse-ofp11-match < input.txt],
982 [0], [expout], [experr])
985 AT_SETUP([ovs-ofctl parse-nx-match loose])
986 AT_KEYWORDS([nx-match])
987 AT_DATA([nx-match.txt], [dnl
988 NXM_OF_IN_PORT(0001), 01020304(1111/2222), NXM_OF_ETH_TYPE(0800)
991 AT_CHECK([ovs-ofctl --strict parse-nx-match < nx-match.txt], [0], [dnl
992 nx_pull_match() returned error OFPBMC_BAD_FIELD
995 AT_CHECK([ovs-ofctl parse-nx-match < nx-match.txt], [0], [dnl
996 NXM_OF_IN_PORT(0001), NXM_OF_ETH_TYPE(0800)
1000 AT_SETUP([ovs-ofctl parse-oxm])
1002 AT_DATA([oxm.txt], [dnl
1006 OXM_OF_IN_PORT(00000000)
1007 OXM_OF_IN_PORT(fffffffe)
1010 OXM_OF_METADATA(5a5a5a5a5a5a5a5a)
1011 OXM_OF_METADATA_W(0000000000000000/00000000ffffffff)
1012 OXM_OF_METADATA_W(1234567890abcdef/ffff0000ffff0000)
1013 OXM_OF_METADATA_W(1234567890abcdef/ffffffffffffffff)
1016 OXM_OF_ETH_DST(0002e30f80a4)
1017 OXM_OF_ETH_DST_W(010000000000/010000000000)
1018 OXM_OF_ETH_DST_W(000000000000/010000000000)
1019 OXM_OF_ETH_DST_W(ffffffffffff/010000000000)
1020 OXM_OF_ETH_DST_W(0002e30f80a4/ffffffffffff)
1021 OXM_OF_ETH_DST_W(0002e30f80a4/feffffffffff)
1024 OXM_OF_ETH_SRC(020898456ddb)
1027 OXM_OF_ETH_TYPE(0800)
1028 OXM_OF_ETH_TYPE(0800) OXM_OF_IN_PORT(00000012)
1031 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_ECN(03)
1032 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_ECN(06)
1036 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(01)
1037 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(05)
1041 OXM_OF_ETH_TYPE(0800) OXM_OF_IPV4_SRC(ac100014)
1042 OXM_OF_ETH_TYPE(0800) OXM_OF_IPV4_SRC_W(C0a80000/FFFF0000)
1043 OXM_OF_ETH_TYPE(0806) OXM_OF_IPV4_SRC(ac100014)
1044 OXM_OF_IPV4_SRC_W(C0D80000/FFFF0000)
1047 OXM_OF_ETH_TYPE(0800) OXM_OF_IPV4_DST(ac100014)
1048 OXM_OF_ETH_TYPE(0800) OXM_OF_IPV4_DST_W(C0a88012/FFFF0000)
1049 OXM_OF_IPV4_DST(ac100014)
1050 OXM_OF_ETH_TYPE(0806) OXM_OF_IPV4_DST_W(C0D80000/FFFF0000)
1053 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(06) OXM_OF_TCP_SRC(4231)
1054 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(06) OXM_OF_TCP_SRC_W(5050/F0F0)
1055 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(07) OXM_OF_TCP_SRC(4231)
1057 # TCP destination port
1058 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(06) OXM_OF_TCP_DST(4231)
1059 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(06) OXM_OF_TCP_DST_W(FDE0/FFF0)
1060 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(07) OXM_OF_TCP_DST(4231)
1063 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(11) OXM_OF_UDP_SRC(8732)
1064 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(11) OXM_OF_UDP_SRC_W(0132/01FF)
1065 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(06) OXM_OF_UDP_SRC(7823)
1067 # UDP destination port
1068 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(11) OXM_OF_UDP_DST(1782)
1069 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(11) OXM_OF_UDP_DST_W(5005/F00F)
1070 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(02) OXM_OF_UDP_DST(1293)
1073 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(01) OXM_OF_ICMPV4_TYPE(12)
1074 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(00) OXM_OF_ICMPV4_TYPE(10)
1077 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(01) OXM_OF_ICMPV4_CODE(12)
1078 OXM_OF_ETH_TYPE(0800) OXM_OF_IP_PROTO(00) OXM_OF_ICMPV4_CODE(10)
1079 OXM_OF_ETH_TYPE(0800) OXM_OF_ICMPV4_CODE(10)
1080 OXM_OF_ICMPV4_CODE(00)
1083 OXM_OF_ETH_TYPE(0806) OXM_OF_ARP_OP(0001)
1084 OXM_OF_ETH_TYPE(0806) OXM_OF_ARP_OP(1111)
1085 OXM_OF_ETH_TYPE(0000) OXM_OF_ARP_OP(0001)
1087 OXM_OF_ETH_TYPE(0806) OXM_OF_ARP_OP(0001) OXM_OF_ARP_OP(0001)
1089 # ARP source protocol address
1090 OXM_OF_ETH_TYPE(0806) OXM_OF_ARP_SPA(ac100014)
1091 OXM_OF_ETH_TYPE(0806) OXM_OF_ARP_SPA_W(C0a81234/FFFFFF00)
1092 OXM_OF_ETH_TYPE(0800) OXM_OF_ARP_SPA(ac100014)
1093 OXM_OF_ARP_SPA_W(C0D8fedc/FFFF0000)
1095 # ARP destination protocol address
1096 OXM_OF_ETH_TYPE(0806) OXM_OF_ARP_TPA(ac100014)
1097 OXM_OF_ETH_TYPE(0806) OXM_OF_ARP_TPA_W(C0a812fe/FFFFFF00)
1098 OXM_OF_ETH_TYPE(0800) OXM_OF_ARP_TPA(ac100014)
1099 OXM_OF_ARP_TPA_W(C0D80000/FFFF0000)
1101 # ARP source hardware address
1102 OXM_OF_ETH_TYPE(0806) OXM_OF_ARP_SHA(0002e30f80a4)
1103 OXM_OF_ETH_TYPE(0800) OXM_OF_ARP_SHA(0002e30f80a4)
1104 OXM_OF_ARP_SHA(0002e30f80a4)
1106 # ARP destination hardware address
1107 OXM_OF_ETH_TYPE(0806) OXM_OF_ARP_THA(0002e30f80a4)
1108 OXM_OF_ETH_TYPE(0800) OXM_OF_ARP_THA(0002e30f80a4)
1109 OXM_OF_ARP_THA(0002e30f80a4)
1112 OXM_OF_ETH_TYPE(86dd) OXM_OF_IPV6_SRC(20010db83c4d00010002000300040005)
1113 OXM_OF_ETH_TYPE(0800) OXM_OF_IPV6_SRC(20010db83c4d00010002000300040005)
1114 OXM_OF_ETH_TYPE(86dd) OXM_OF_IPV6_SRC_W(20010db83c4d00010000000000000000/ffffffffffffffff0000000000000000)
1115 OXM_OF_ETH_TYPE(0800) OXM_OF_IPV6_SRC_W(20010db83c4d00010000000000000000/ffffffffffffffff0000000000000000)
1118 OXM_OF_ETH_TYPE(86dd) OXM_OF_IPV6_DST(20010db83c4d00010002000300040005)
1119 OXM_OF_ETH_TYPE(0800) OXM_OF_IPV6_DST(20010db83c4d00010002000300040005)
1120 OXM_OF_ETH_TYPE(86dd) OXM_OF_IPV6_DST_W(20010db83c4d00010000000000000000/ffffffffffffffff0000000000000000)
1121 OXM_OF_ETH_TYPE(0800) OXM_OF_IPV6_DST_W(20010db83c4d00010000000000000000/ffffffffffffffff0000000000000000)
1124 OXM_OF_ETH_TYPE(86dd) OXM_OF_IPV6_FLABEL(1000000f)
1125 OXM_OF_IPV6_FLABEL(0000000f)
1126 OXM_OF_ETH_TYPE(86dd) OXM_OF_IPV6_FLABEL(0000000f)
1128 # ND source hardware address
1129 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)
1130 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)
1131 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)
1132 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)
1134 # ND destination hardware address
1135 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)
1136 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)
1137 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)
1138 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)
1140 # Invalid field number.
1143 AT_CHECK([ovs-ofctl --strict parse-oxm < oxm.txt], [0], [dnl
1147 OXM_OF_IN_PORT(00000000)
1148 OXM_OF_IN_PORT(fffffffe)
1151 OXM_OF_METADATA(5a5a5a5a5a5a5a5a)
1152 OXM_OF_METADATA_W(0000000000000000/00000000ffffffff)
1153 OXM_OF_METADATA_W(1234000090ab0000/ffff0000ffff0000)
1154 OXM_OF_METADATA(1234567890abcdef)
1157 OXM_OF_ETH_DST(0002e30f80a4)
1158 OXM_OF_ETH_DST_W(010000000000/010000000000)
1159 OXM_OF_ETH_DST_W(000000000000/010000000000)
1160 OXM_OF_ETH_DST_W(010000000000/010000000000)
1161 OXM_OF_ETH_DST(0002e30f80a4)
1162 OXM_OF_ETH_DST_W(0002e30f80a4/feffffffffff)
1165 OXM_OF_ETH_SRC(020898456ddb)
1168 OXM_OF_ETH_TYPE(0800)
1169 OXM_OF_IN_PORT(00000012), OXM_OF_ETH_TYPE(0800)
1172 OXM_OF_ETH_TYPE(0800), OXM_OF_IP_ECN(03)
1173 nx_pull_match() returned error OFPBMC_BAD_VALUE
1174 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1177 OXM_OF_ETH_TYPE(0800), OXM_OF_IP_PROTO(01)
1178 OXM_OF_ETH_TYPE(0800), OXM_OF_IP_PROTO(05)
1179 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1182 OXM_OF_ETH_TYPE(0800), OXM_OF_IPV4_SRC(ac100014)
1183 OXM_OF_ETH_TYPE(0800), OXM_OF_IPV4_SRC_W(c0a80000/ffff0000)
1184 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1185 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1188 OXM_OF_ETH_TYPE(0800), OXM_OF_IPV4_DST(ac100014)
1189 OXM_OF_ETH_TYPE(0800), OXM_OF_IPV4_DST_W(c0a80000/ffff0000)
1190 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1191 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1194 OXM_OF_ETH_TYPE(0800), OXM_OF_IP_PROTO(06), OXM_OF_TCP_SRC(4231)
1195 OXM_OF_ETH_TYPE(0800), OXM_OF_IP_PROTO(06), OXM_OF_TCP_SRC_W(5050/f0f0)
1196 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1198 # TCP destination port
1199 OXM_OF_ETH_TYPE(0800), OXM_OF_IP_PROTO(06), OXM_OF_TCP_DST(4231)
1200 OXM_OF_ETH_TYPE(0800), OXM_OF_IP_PROTO(06), OXM_OF_TCP_DST_W(fde0/fff0)
1201 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1204 OXM_OF_ETH_TYPE(0800), OXM_OF_IP_PROTO(11), OXM_OF_UDP_SRC(8732)
1205 OXM_OF_ETH_TYPE(0800), OXM_OF_IP_PROTO(11), OXM_OF_UDP_SRC_W(0132/01ff)
1206 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1208 # UDP destination port
1209 OXM_OF_ETH_TYPE(0800), OXM_OF_IP_PROTO(11), OXM_OF_UDP_DST(1782)
1210 OXM_OF_ETH_TYPE(0800), OXM_OF_IP_PROTO(11), OXM_OF_UDP_DST_W(5005/f00f)
1211 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1214 OXM_OF_ETH_TYPE(0800), OXM_OF_IP_PROTO(01), OXM_OF_ICMPV4_TYPE(12)
1215 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1218 OXM_OF_ETH_TYPE(0800), OXM_OF_IP_PROTO(01), OXM_OF_ICMPV4_CODE(12)
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
1224 OXM_OF_ETH_TYPE(0806), OXM_OF_ARP_OP(0001)
1225 nx_pull_match() returned error OFPBMC_BAD_VALUE
1226 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1227 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1228 nx_pull_match() returned error OFPBMC_DUP_FIELD
1230 # ARP source protocol address
1231 OXM_OF_ETH_TYPE(0806), OXM_OF_ARP_SPA(ac100014)
1232 OXM_OF_ETH_TYPE(0806), OXM_OF_ARP_SPA_W(c0a81200/ffffff00)
1233 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1234 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1236 # ARP destination protocol address
1237 OXM_OF_ETH_TYPE(0806), OXM_OF_ARP_TPA(ac100014)
1238 OXM_OF_ETH_TYPE(0806), OXM_OF_ARP_TPA_W(c0a81200/ffffff00)
1239 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1240 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1242 # ARP source hardware address
1243 OXM_OF_ETH_TYPE(0806), OXM_OF_ARP_SHA(0002e30f80a4)
1244 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1245 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1247 # ARP destination hardware address
1248 OXM_OF_ETH_TYPE(0806), OXM_OF_ARP_THA(0002e30f80a4)
1249 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1250 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1253 OXM_OF_ETH_TYPE(86dd), OXM_OF_IPV6_SRC(20010db83c4d00010002000300040005)
1254 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1255 OXM_OF_ETH_TYPE(86dd), OXM_OF_IPV6_SRC_W(20010db83c4d00010000000000000000/ffffffffffffffff0000000000000000)
1256 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1259 OXM_OF_ETH_TYPE(86dd), OXM_OF_IPV6_DST(20010db83c4d00010002000300040005)
1260 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1261 OXM_OF_ETH_TYPE(86dd), OXM_OF_IPV6_DST_W(20010db83c4d00010000000000000000/ffffffffffffffff0000000000000000)
1262 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1265 nx_pull_match() returned error OFPBMC_BAD_VALUE
1266 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1267 OXM_OF_ETH_TYPE(86dd), OXM_OF_IPV6_FLABEL(0000000f)
1269 # ND source hardware address
1270 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)
1271 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1272 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1273 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1275 # ND destination hardware address
1276 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)
1277 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1278 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1279 nx_pull_match() returned error OFPBMC_BAD_PREREQ
1281 # Invalid field number.
1282 nx_pull_match() returned error OFPBMC_BAD_FIELD
1286 AT_SETUP([ovs-ofctl parse-oxm loose])
1288 AT_DATA([oxm.txt], [dnl
1289 OXM_OF_IN_PORT(00000001), 01020304(1111/2222), OXM_OF_ETH_TYPE(0800)
1292 AT_CHECK([ovs-ofctl --strict parse-oxm < oxm.txt], [0], [dnl
1293 nx_pull_match() returned error OFPBMC_BAD_FIELD
1296 AT_CHECK([ovs-ofctl parse-oxm < oxm.txt], [0], [dnl
1297 OXM_OF_IN_PORT(00000001), OXM_OF_ETH_TYPE(0800)
1301 dnl Check that "-F openflow10" rejects a flow_mod with unsupported features,
1302 dnl such as tunnels and metadata.
1303 AT_SETUP([ovs-ofctl -F option and NXM features])
1304 AT_CHECK([ovs-ofctl -F openflow10 add-flow dummy tun_id=123,actions=drop],
1305 [1], [], [ovs-ofctl: none of the usable flow formats (NXM) is among the allowed flow formats (OpenFlow10)
1307 AT_CHECK([ovs-ofctl -F openflow10 add-flow dummy metadata=123,actions=drop],
1308 [1], [], [ovs-ofctl: none of the usable flow formats (NXM) is among the allowed flow formats (OpenFlow10)
1312 dnl Check that "-F nxm" really forces add-flow to use the NXM flow format.
1313 dnl (If it doesn't, then either the tun_id won't show up at all, or it will
1314 dnl additionally show up as the top 32 bits of the cookie.) This checks
1315 dnl for regression against bug #4566.
1316 AT_SETUP([ovs-ofctl -F option with flow_mods])
1318 AT_CHECK([ovs-ofctl -F nxm add-flow br0 tun_id=0x12345678,actions=drop])
1319 AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip], [0], [dnl
1321 tun_id=0x12345678 actions=drop
1326 dnl Check that "-F openflow10" is really honored on dump-flows.
1327 dnl (If it isn't, then dump-flows will show the register match.)
1328 AT_SETUP([ovs-ofctl dump-flows honors -F option])
1330 AT_CHECK([ovs-ofctl add-flow br0 reg0=0x12345,actions=drop])
1331 AT_CHECK([ovs-ofctl -F openflow10 dump-flows br0 | ofctl_strip], [0], [dnl
1338 dnl Check that "-F openflow10" fails on dump-flows if the requested match
1339 dnl can't be represented in OpenFlow 1.0.
1340 AT_SETUP([ovs-ofctl dump-flows rejects bad -F option])
1342 AT_CHECK([ovs-ofctl -F openflow10 dump-flows unix:br0.mgmt reg0=0xabcdef], [1], [],
1343 [ovs-ofctl: none of the usable flow formats (NXM) is among the allowed flow formats (OpenFlow10)
1348 dnl Check that add-flow reports non-normalized flows (feature #5029).
1349 AT_SETUP([ovs-ofctl add-flow reports non-normalized flows])
1351 AT_CHECK([ovs-ofctl TESTABLE_LOG add-flow br0 nw_src=1.2.3.4,actions=5],
1353 ofp_util|INFO|normalization changed ofp_match, details:
1354 ofp_util|INFO| pre: nw_src=1.2.3.4
1355 ofp_util|INFO|post: @&t@
1360 dnl Check that --sort and --rsort works with dump-flows
1361 dnl Default field is 'priority'. Flow entries are displayed based
1362 dnl on field to sort.
1363 AT_SETUP([ovs-ofctl dump-flows with sorting])
1366 AT_DATA([allflows.txt], [[
1367 priority=4,in_port=23213 actions=output:42
1368 priority=5,in_port=1029 actions=output:43
1369 priority=7,in_port=1029 actions=output:43
1370 priority=3,in_port=1028 actions=output:44
1371 priority=1,in_port=1026 actions=output:45
1372 priority=6,in_port=1027 actions=output:64
1373 priority=2,in_port=1025 actions=output:47
1374 priority=8,tcp,tp_src=5 actions=drop
1375 priority=9,tcp,tp_src=6 actions=drop
1378 AT_CHECK([ovs-ofctl add-flows br0 allflows.txt
1380 AT_CHECK([ovs-ofctl --sort dump-flows br0 | ofctl_strip], [0], [dnl
1381 priority=1,in_port=1026 actions=output:45
1382 priority=2,in_port=1025 actions=output:47
1383 priority=3,in_port=1028 actions=output:44
1384 priority=4,in_port=23213 actions=output:42
1385 priority=5,in_port=1029 actions=output:43
1386 priority=6,in_port=1027 actions=output:64
1387 priority=7,in_port=1029 actions=output:43
1388 priority=8,tcp,tp_src=5 actions=drop
1389 priority=9,tcp,tp_src=6 actions=drop
1391 AT_CHECK([ovs-ofctl --rsort dump-flows br0 | ofctl_strip], [0], [dnl
1392 priority=9,tcp,tp_src=6 actions=drop
1393 priority=8,tcp,tp_src=5 actions=drop
1394 priority=7,in_port=1029 actions=output:43
1395 priority=6,in_port=1027 actions=output:64
1396 priority=5,in_port=1029 actions=output:43
1397 priority=4,in_port=23213 actions=output:42
1398 priority=3,in_port=1028 actions=output:44
1399 priority=2,in_port=1025 actions=output:47
1400 priority=1,in_port=1026 actions=output:45
1402 AT_CHECK([ovs-ofctl --sort=in_port dump-flows br0 | ofctl_strip], [0], [dnl
1403 priority=2,in_port=1025 actions=output:47
1404 priority=1,in_port=1026 actions=output:45
1405 priority=6,in_port=1027 actions=output:64
1406 priority=3,in_port=1028 actions=output:44
1407 priority=7,in_port=1029 actions=output:43
1408 priority=5,in_port=1029 actions=output:43
1409 priority=4,in_port=23213 actions=output:42
1410 priority=9,tcp,tp_src=6 actions=drop
1411 priority=8,tcp,tp_src=5 actions=drop
1413 AT_CHECK([ovs-ofctl --rsort=in_port dump-flows br0 | ofctl_strip], [0], [dnl
1414 priority=4,in_port=23213 actions=output:42
1415 priority=7,in_port=1029 actions=output:43
1416 priority=5,in_port=1029 actions=output:43
1417 priority=3,in_port=1028 actions=output:44
1418 priority=6,in_port=1027 actions=output:64
1419 priority=1,in_port=1026 actions=output:45
1420 priority=2,in_port=1025 actions=output:47
1421 priority=9,tcp,tp_src=6 actions=drop
1422 priority=8,tcp,tp_src=5 actions=drop
1424 AT_CHECK([ovs-ofctl --sort=tcp_src dump-flows br0 | ofctl_strip], [0], [dnl
1425 priority=8,tcp,tp_src=5 actions=drop
1426 priority=9,tcp,tp_src=6 actions=drop
1427 priority=7,in_port=1029 actions=output:43
1428 priority=6,in_port=1027 actions=output:64
1429 priority=5,in_port=1029 actions=output:43
1430 priority=4,in_port=23213 actions=output:42
1431 priority=3,in_port=1028 actions=output:44
1432 priority=2,in_port=1025 actions=output:47
1433 priority=1,in_port=1026 actions=output:45
1436 [ovs-ofctl --sort=in_port --sort=tcp_src dump-flows br0 | ofctl_strip], [0],
1437 [ priority=2,in_port=1025 actions=output:47
1438 priority=1,in_port=1026 actions=output:45
1439 priority=6,in_port=1027 actions=output:64
1440 priority=3,in_port=1028 actions=output:44
1441 priority=7,in_port=1029 actions=output:43
1442 priority=5,in_port=1029 actions=output:43
1443 priority=4,in_port=23213 actions=output:42
1444 priority=8,tcp,tp_src=5 actions=drop
1445 priority=9,tcp,tp_src=6 actions=drop