1 AT_BANNER([ofproto-dpif])
3 AT_SETUP([ofproto-dpif - revalidator/wait])
5 AT_CHECK([ovs-appctl revalidator/wait])
9 AT_SETUP([ofproto-dpif, active-backup bonding])
10 # Create br0 with interfaces p1, p2 and p7, creating bond0 with p1 and p2
11 # and br1 with interfaces p3, p4 and p8.
12 # toggle p1,p2 of bond0 up and down to test bonding in active-backup mode.
14 [add-bond br0 bond0 p1 p2 bond_mode=active-backup --\
15 set interface p1 type=dummy options:pstream=punix:$OVS_RUNDIR/p1.sock ofport_request=1 -- \
16 set interface p2 type=dummy options:pstream=punix:$OVS_RUNDIR/p2.sock ofport_request=2 -- \
17 add-port br0 p7 -- set interface p7 ofport_request=7 type=dummy -- \
19 set bridge br1 other-config:hwaddr=aa:66:aa:66:00:00 -- \
20 set bridge br1 datapath-type=dummy other-config:datapath-id=1234 \
22 add-port br1 p3 -- set interface p3 type=dummy options:stream=unix:$OVS_RUNDIR/p1.sock ofport_request=3 -- \
23 add-port br1 p4 -- set interface p4 type=dummy options:stream=unix:$OVS_RUNDIR/p2.sock ofport_request=4 -- \
24 add-port br1 p8 -- set interface p8 ofport_request=8 type=dummy --])
25 WAIT_FOR_DUMMY_PORTS([p3], [p4])
26 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
28 AT_CHECK([ovs-ofctl add-flow br0 action=normal])
29 AT_CHECK([ovs-ofctl add-flow br1 action=normal])
30 ovs-appctl netdev-dummy/set-admin-state up
31 ovs-appctl time/warp 100
32 ovs-appctl netdev-dummy/set-admin-state p2 down
34 ovs-appctl time/warp 100
35 AT_CHECK([ovs-appctl netdev-dummy/receive p7 'in_port(7),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
36 AT_CHECK([ovs-appctl netdev-dummy/receive p7 'in_port(7),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.3,dst=10.0.0.4,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
37 ovs-appctl time/warp 100
38 ovs-appctl netdev-dummy/set-admin-state p2 up
39 ovs-appctl netdev-dummy/set-admin-state p1 down
40 ovs-appctl time/warp 100
41 AT_CHECK([ovs-appctl netdev-dummy/receive p7 'in_port(7),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0d),eth_type(0x0800),ipv4(src=10.0.0.5,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
42 AT_CHECK([ovs-appctl netdev-dummy/receive p7 'in_port(7),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0e),eth_type(0x0800),ipv4(src=10.0.0.6,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
43 ovs-appctl time/warp 200 100
45 AT_CHECK([cat ovs-vswitchd.log | grep 'in_port=[[348]]' | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
46 recirc_id=0,ip,in_port=3,vlan_tci=0x0000/0x1fff,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,nw_frag=no, actions: <del>
47 recirc_id=0,ip,in_port=3,vlan_tci=0x0000/0x1fff,dl_src=50:54:00:00:00:0b,dl_dst=50:54:00:00:00:0c,nw_frag=no, actions: <del>
48 recirc_id=0,ip,in_port=4,vlan_tci=0x0000/0x1fff,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0d,nw_frag=no, actions: <del>
49 recirc_id=0,ip,in_port=4,vlan_tci=0x0000/0x1fff,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0e,nw_frag=no, actions: <del>
50 recirc_id=0,rarp,in_port=4,vlan_tci=0x0000/0x1fff,dl_src=50:54:00:00:00:09,dl_dst=ff:ff:ff:ff:ff:ff, actions: <del>
51 recirc_id=0,rarp,in_port=4,vlan_tci=0x0000/0x1fff,dl_src=50:54:00:00:00:0b,dl_dst=ff:ff:ff:ff:ff:ff, actions: <del>
56 AT_SETUP([ofproto-dpif, balance-slb bonding])
57 # Create br0 with interfaces bond0(p1, p2, p3) and p7,
58 # and br1 with interfaces p4, p5, p6 and p8.
59 # p1 <-> p4, p2 <-> p5, p3 <-> p6
60 # Send some traffic, make sure the traffic are spread based on source mac.
62 [add-bond br0 bond0 p1 p2 p3 bond_mode=balance-slb --\
63 set interface p1 type=dummy options:pstream=punix:$OVS_RUNDIR/p1.sock ofport_request=1 -- \
64 set interface p2 type=dummy options:pstream=punix:$OVS_RUNDIR/p2.sock ofport_request=2 -- \
65 set interface p3 type=dummy options:pstream=punix:$OVS_RUNDIR/p3.sock ofport_request=3 -- \
66 add-port br0 p7 -- set interface p7 ofport_request=7 type=dummy -- \
68 set bridge br1 other-config:hwaddr=aa:66:aa:66:00:00 -- \
69 set bridge br1 datapath-type=dummy other-config:datapath-id=1234 \
71 add-port br1 p4 -- set interface p4 type=dummy options:stream=unix:$OVS_RUNDIR/p1.sock ofport_request=4 -- \
72 add-port br1 p5 -- set interface p5 type=dummy options:stream=unix:$OVS_RUNDIR/p2.sock ofport_request=5 -- \
73 add-port br1 p6 -- set interface p6 type=dummy options:stream=unix:$OVS_RUNDIR/p3.sock ofport_request=6 -- \
74 add-port br1 p8 -- set interface p8 ofport_request=8 type=dummy --])
75 WAIT_FOR_DUMMY_PORTS([p4], [p5], [p6])
76 AT_CHECK([ovs-ofctl add-flow br0 action=normal])
77 AT_CHECK([ovs-ofctl add-flow br1 action=normal])
78 AT_CHECK([ovs-appctl netdev-dummy/set-admin-state up], 0, [OK
81 ovs-appctl time/warp 100
83 for i in `seq 0 100 |xargs printf '%02x\n'`;
85 pkt="in_port(7),eth(src=50:54:00:00:00:$i,dst=50:54:00:00:01:00),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)"
86 AT_CHECK([ovs-appctl netdev-dummy/receive p7 $pkt])
89 ovs-appctl time/warp 100
90 AT_CHECK([ovs-appctl dpif/dump-flows br1 > br1_flows.txt])
91 # Make sure there is resonable distribution to all three ports.
92 # We don't want to make this check precise, in case hash function changes.
93 AT_CHECK([test `egrep 'in_port\(4\)' br1_flows.txt |wc -l` -gt 3])
94 AT_CHECK([test `egrep 'in_port\(5\)' br1_flows.txt |wc -l` -gt 3])
95 AT_CHECK([test `egrep 'in_port\(6\)' br1_flows.txt |wc -l` -gt 3])
99 AT_SETUP([ofproto-dpif, balance-tcp bonding])
100 # Create br0 with interfaces bond0(p1, p2, p3) and p7,
101 # and br1 with interfaces bond1(p4, p5, p6) and p8.
103 # Send some traffic, make sure the traffic are spread based on L4 headers.
105 [add-bond br0 bond0 p1 p2 p3 bond_mode=balance-tcp lacp=active \
106 other-config:lacp-time=fast other-config:bond-rebalance-interval=0 --\
107 set interface p1 type=dummy options:pstream=punix:$OVS_RUNDIR/p1.sock ofport_request=1 -- \
108 set interface p2 type=dummy options:pstream=punix:$OVS_RUNDIR/p2.sock ofport_request=2 -- \
109 set interface p3 type=dummy options:pstream=punix:$OVS_RUNDIR/p3.sock ofport_request=3 -- \
110 add-port br0 p7 -- set interface p7 ofport_request=7 type=dummy -- \
112 set bridge br1 other-config:hwaddr=aa:66:aa:66:00:00 -- \
113 set bridge br1 datapath-type=dummy other-config:datapath-id=1234 \
114 fail-mode=secure -- \
115 add-bond br1 bond1 p4 p5 p6 bond_mode=balance-tcp lacp=active \
116 other-config:lacp-time=fast other-config:bond-rebalance-interval=0 --\
117 set interface p4 type=dummy options:stream=unix:$OVS_RUNDIR/p1.sock ofport_request=4 -- \
118 set interface p5 type=dummy options:stream=unix:$OVS_RUNDIR/p2.sock ofport_request=5 -- \
119 set interface p6 type=dummy options:stream=unix:$OVS_RUNDIR/p3.sock ofport_request=6 -- \
120 add-port br1 p8 -- set interface p8 ofport_request=8 type=dummy --])
121 AT_CHECK([ovs-appctl netdev-dummy/set-admin-state up], 0, [OK
123 AT_CHECK([ovs-ofctl add-flow br0 action=normal])
124 AT_CHECK([ovs-ofctl add-flow br1 action=normal])
125 AT_CHECK([ovs-appctl upcall/disable-megaflows], [0], [megaflows disabled
127 OVS_WAIT_WHILE([ovs-appctl bond/show | grep "may_enable: false"])
129 ovs-appctl time/warp 100
130 ovs-appctl lacp/show > lacp.txt
131 ovs-appctl bond/show > bond.txt
133 for i in `seq 0 255` ;
135 pkt="in_port(7),eth(src=50:54:00:00:00:05,dst=50:54:00:00:01:00),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=$i),tcp_flags(ack)"
136 AT_CHECK([ovs-appctl netdev-dummy/receive p7 $pkt])
139 ovs-appctl time/warp 300 100
140 AT_CHECK([ovs-appctl dpif/dump-flows br0 |grep tcp > br0_flows.txt])
141 AT_CHECK([ovs-appctl dpif/dump-flows br1 |grep tcp > br1_flows.txt])
142 # Make sure there is resonable distribution to all three ports.
143 # We don't want to make this check precise, in case hash function changes.
144 AT_CHECK([test `grep in_port.4 br1_flows.txt |wc -l` -gt 24])
145 AT_CHECK([test `grep in_port.5 br1_flows.txt |wc -l` -gt 24])
146 AT_CHECK([test `grep in_port.6 br1_flows.txt |wc -l` -gt 24])
151 # Makes sure recirculation does not change the way packet is handled.
152 AT_SETUP([ofproto-dpif, balance-tcp bonding, different recirc flow ])
154 [add-bond br0 bond0 p1 p2 bond_mode=balance-tcp lacp=active \
155 other-config:lacp-time=fast other-config:bond-rebalance-interval=0 -- \
156 set interface p1 type=dummy options:pstream=punix:$OVS_RUNDIR/p1.sock ofport_request=1 -- \
157 set interface p2 type=dummy options:pstream=punix:$OVS_RUNDIR/p2.sock ofport_request=2 -- \
159 set bridge br1 other-config:hwaddr=aa:66:aa:66:00:00 -- \
160 set bridge br1 datapath-type=dummy other-config:datapath-id=1234 \
161 fail-mode=standalone -- \
162 add-bond br1 bond1 p3 p4 bond_mode=balance-tcp lacp=active \
163 other-config:lacp-time=fast other-config:bond-rebalance-interval=0 -- \
164 set interface p3 type=dummy options:stream=unix:$OVS_RUNDIR/p1.sock ofport_request=3 -- \
165 set interface p4 type=dummy options:stream=unix:$OVS_RUNDIR/p2.sock ofport_request=4 -- \
166 add-port br1 br1- -- set interface br1- type=patch options:peer=br1+ ofport_request=100 -- \
168 set bridge br-int other-config:hwaddr=aa:77:aa:77:00:00 -- \
169 set bridge br-int datapath-type=dummy other-config:datapath-id=1235 \
170 fail-mode=secure -- \
171 add-port br-int br1+ -- set interface br1+ type=patch options:peer=br1- ofport_request=101 -- \
172 add-port br-int p5 -- set interface p5 ofport_request=5 type=dummy
174 AT_CHECK([ovs-appctl netdev-dummy/set-admin-state up], 0, [OK
177 # Waits for all ifaces enabled.
178 OVS_WAIT_UNTIL([test `ovs-appctl bond/show | grep -- "may_enable: true" | wc -l` -ge 4])
180 # The dl_vlan flow should not be ever matched,
181 # since recirculation should not change the flow handling.
182 AT_DATA([flows.txt], [dnl
183 table=0 priority=1 in_port=5 actions=mod_vlan_vid:1,output(101)
184 table=0 priority=2 in_port=5 dl_vlan=1 actions=drop
186 AT_CHECK([ovs-ofctl add-flows br-int flows.txt])
188 # Sends a packet to trigger recirculation.
189 # Should generate recirc_id(0x12d),dp_hash(0xc1261ba2/0xff).
190 AT_CHECK([ovs-appctl netdev-dummy/receive p5 "in_port(5),eth(src=50:54:00:00:00:05,dst=50:54:00:00:01:00),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1)"])
192 # Collects flow stats.
193 AT_CHECK([ovs-appctl revalidator/purge], [0])
195 # Checks the flow stats in br1, should only be one flow with non-zero
196 # 'n_packets' from internal table.
197 AT_CHECK([ovs-appctl bridge/dump-flows br1 | ofctl_strip | grep -- "n_packets" | grep -- "table_id" | sed -e 's/output:[[0-9]][[0-9]]*/output/'], [0], [dnl
198 table_id=254, n_packets=1, n_bytes=64, priority=20,recirc_id=0x12d,dp_hash=0xa2/0xff,actions=output
201 # Checks the flow stats in br-int, should be only one match.
202 AT_CHECK([ovs-ofctl dump-flows br-int | ofctl_strip | sort], [0], [dnl
203 n_packets=1, n_bytes=60, priority=1,in_port=5 actions=mod_vlan_vid:1,output:101
204 priority=2,in_port=5,dl_vlan=1 actions=drop
211 AT_SETUP([ofproto-dpif - resubmit])
213 ADD_OF_PORTS([br0], [1], [10], [11], [12], [13], [14], [15],
214 [16], [17], [18], [19], [20], [21])
215 AT_DATA([flows.txt], [dnl
216 table=0 in_port=1 priority=1000 icmp actions=output(10),resubmit(2),output(19),resubmit(3),output(21)
217 table=0 in_port=2 priority=1500 icmp actions=output(11),resubmit(,1),output(16),resubmit(2,1),output(18)
218 table=0 in_port=3 priority=2000 icmp actions=output(20)
219 table=1 in_port=1 priority=1000 icmp actions=output(12),resubmit(4,1),output(13),resubmit(3),output(15)
220 table=1 in_port=2 priority=1500 icmp actions=output(17),resubmit(,2)
221 table=1 in_port=3 priority=1500 icmp actions=output(14),resubmit(,2)
223 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
224 AT_CHECK([ovs-appctl ofproto/trace br0 'in_port=1,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,dl_type=0x0800,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_proto=1,nw_tos=0,nw_ttl=128,icmp_type=8,icmp_code=0'], [0], [stdout])
225 AT_CHECK([tail -1 stdout], [0],
226 [Datapath actions: 10,11,12,13,14,15,16,17,18,19,20,21
231 AT_SETUP([ofproto-dpif - goto table])
233 ADD_OF_PORTS([br0], [1], [10], [11])
234 echo "table=0 in_port=1 actions=output(10),goto_table(1)" > flows.txt
235 for i in `seq 1 63`; do echo "table=$i actions=goto_table($(($i+1)))"; done >> flows.txt
236 echo "table=64 actions=output(11)" >> flows.txt
237 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flows br0 flows.txt])
238 AT_CHECK([ovs-appctl ofproto/trace br0 'in_port=1,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,dl_type=0x0800,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_proto=1,nw_tos=0,nw_ttl=128,icmp_type=8,icmp_code=0'], [0], [stdout])
239 AT_CHECK([tail -1 stdout], [0],
240 [Datapath actions: 10,11
245 AT_SETUP([ofproto-dpif - write actions])
247 ADD_OF_PORTS([br0], [1], [10], [11], [12], [13])
248 AT_DATA([flows.txt], [dnl
249 table=0 in_port=1,ip actions=output(10),write_actions(set_field:192.168.3.90->ip_src,output(12)),goto_table(1)
250 table=1 ip actions=write_actions(output(13)),goto_table(2)
251 table=2 ip actions=set_field:192.168.3.91->ip_src,output(11)
253 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flows br0 flows.txt])
254 AT_CHECK([ovs-appctl ofproto/trace br0 'in_port=1,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,dl_type=0x0800,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_proto=1,nw_tos=0,nw_ttl=128,icmp_type=8,icmp_code=0'], [0], [stdout])
255 AT_CHECK([tail -2 stdout], [0],
256 [Megaflow: recirc_id=0,ip,in_port=1,nw_src=192.168.0.1,nw_frag=no
257 Datapath actions: 10,set(ipv4(src=192.168.3.91)),11,set(ipv4(src=192.168.3.90)),13
262 AT_SETUP([ofproto-dpif - clear actions])
264 ADD_OF_PORTS([br0], [1], [10], [11], [12])
265 AT_DATA([flows.txt], [dnl
266 table=0 in_port=1,ip actions=output(10),write_actions(set_field:192.168.3.90->ip_src,output(12)),goto_table(1)
267 table=1 tcp actions=set_field:91->tp_src,output(11),clear_actions
269 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flows br0 flows.txt])
270 AT_CHECK([ovs-appctl ofproto/trace br0 'in_port=1,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,dl_type=0x0800,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_proto=6,nw_tos=0,nw_ttl=128,tp_src=8,tp_dst=9'], [0], [stdout])
271 AT_CHECK([tail -2 stdout], [0],
272 [Megaflow: recirc_id=0,tcp,in_port=1,nw_frag=no,tp_src=8
273 Datapath actions: 10,set(tcp(src=91)),11
278 AT_SETUP([ofproto-dpif - group chaining not supported])
280 ADD_OF_PORTS([br0], [1], [10], [11])
281 AT_CHECK([ovs-ofctl -O OpenFlow12 add-group br0 'group_id=1234,type=all,bucket=output:10,set_field:192.168.3.90->ip_src,group:123,bucket=output:11'],
283 AT_CHECK([STRIP_XIDS stderr | sed 1q], [0],
284 [OFPT_ERROR (OF1.2): OFPGMFC_CHAINING_UNSUPPORTED
289 AT_SETUP([ofproto-dpif - all group in action list])
291 ADD_OF_PORTS([br0], [1], [10], [11])
292 AT_CHECK([ovs-ofctl -O OpenFlow12 add-group br0 'group_id=1234,type=all,bucket=output:10,set_field:192.168.3.90->ip_src,bucket=output:11'])
293 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=group:1234'])
294 AT_CHECK([ovs-appctl ofproto/trace br0 'in_port=1,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,dl_type=0x0800,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_proto=1,nw_tos=0,nw_ttl=128,icmp_type=8,icmp_code=0'], [0], [stdout])
295 # Must match on the source address to be able to restore it's value for
297 AT_CHECK([tail -2 stdout], [0],
298 [Megaflow: recirc_id=0,ip,in_port=1,nw_src=192.168.0.1,nw_frag=no
299 Datapath actions: set(ipv4(src=192.168.3.90)),10,set(ipv4(src=192.168.0.1)),11
304 AT_SETUP([ofproto-dpif - indirect group in action list])
306 ADD_OF_PORTS([br0], [1], [10])
307 AT_CHECK([ovs-ofctl -O OpenFlow12 add-group br0 group_id=1234,type=indirect,bucket=output:10])
308 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=group:1234'])
309 AT_CHECK([ovs-appctl ofproto/trace br0 'in_port=1,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,dl_type=0x0800,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_proto=1,nw_tos=0,nw_ttl=128,icmp_type=8,icmp_code=0'], [0], [stdout])
310 AT_CHECK([tail -1 stdout], [0],
311 [Datapath actions: 10
316 AT_SETUP([ofproto-dpif - all group in action set])
318 ADD_OF_PORTS([br0], [1], [10], [11])
319 AT_CHECK([ovs-ofctl -O OpenFlow12 add-group br0 'group_id=1234,type=all,bucket=output:10,set_field:192.168.3.90->ip_src,bucket=output:11'])
320 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=write_actions(group:1234)'])
321 AT_CHECK([ovs-appctl ofproto/trace br0 'in_port=1,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,dl_type=0x0800,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_proto=1,nw_tos=0,nw_ttl=128,icmp_type=8,icmp_code=0'], [0], [stdout])
322 # Must match on the source address to be able to restore it's value for
324 AT_CHECK([tail -2 stdout], [0],
325 [Megaflow: recirc_id=0,ip,in_port=1,nw_src=192.168.0.1,nw_frag=no
326 Datapath actions: set(ipv4(src=192.168.3.90)),10,set(ipv4(src=192.168.0.1)),11
331 AT_SETUP([ofproto-dpif - indirect group in action set])
333 ADD_OF_PORTS([br0], [1], [10])
334 AT_CHECK([ovs-ofctl -O OpenFlow12 add-group br0 group_id=1234,type=indirect,bucket=output:10])
335 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=write_actions(group:1234)'])
336 AT_CHECK([ovs-appctl ofproto/trace br0 'in_port=1,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,dl_type=0x0800,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_proto=1,nw_tos=0,nw_ttl=128,icmp_type=8,icmp_code=0'], [0], [stdout])
337 AT_CHECK([tail -1 stdout], [0],
338 [Datapath actions: 10
343 AT_SETUP([ofproto-dpif - select group])
345 ADD_OF_PORTS([br0], [1], [10], [11])
346 AT_CHECK([ovs-ofctl -O OpenFlow12 add-group br0 'group_id=1234,type=select,bucket=output:10,bucket=output:11'])
347 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=write_actions(group:1234)'])
349 # Try a bunch of different flows and make sure that they get distributed
351 for d in 0 1 2 3 4 5 6 7 8 9 a b c d e f; do
352 AT_CHECK([ovs-appctl ofproto/trace br0 "in_port=1,dl_src=50:54:00:00:00:07,dl_dst=50:54:00:00:00:0$d,dl_type=0x0800,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_proto=1,nw_tos=0,nw_ttl=128,icmp_type=8,icmp_code=0"], [0], [stdout])
353 tail -1 stdout >> results
355 sort results | uniq -c
356 AT_CHECK([sort results | uniq], [0],
357 [Datapath actions: 10
363 AT_SETUP([ofproto-dpif - select group with watch port])
365 ADD_OF_PORTS([br0], [1], [10], [11])
366 AT_CHECK([ovs-ofctl -O OpenFlow12 add-group br0 'group_id=1234,type=select,bucket=watch_port:10,output:10,bucket=output:11'])
367 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=write_actions(group:1234)'])
368 AT_CHECK([ovs-appctl ofproto/trace br0 'in_port=1,dl_src=50:54:00:00:00:07,dl_dst=50:54:00:00:00:07,dl_type=0x0800,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_proto=1,nw_tos=0,nw_ttl=128,icmp_type=8,icmp_code=0'], [0], [stdout])
369 AT_CHECK([tail -1 stdout], [0],
370 [Datapath actions: 11
375 AT_SETUP([ofproto-dpif - select group with weight])
377 ADD_OF_PORTS([br0], [1], [10], [11], [12])
378 AT_CHECK([ovs-ofctl -O OpenFlow12 add-group br0 'group_id=1234,type=select,bucket=output:10,bucket=output:11,weight=2000,bucket=output:12,weight=0'])
379 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=write_actions(group:1234)'])
380 AT_CHECK([ovs-appctl ofproto/trace br0 'in_port=1,dl_src=50:54:00:00:00:07,dl_dst=50:54:00:00:00:07,dl_type=0x0800,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_proto=1,nw_tos=0,nw_ttl=128,icmp_type=8,icmp_code=0'], [0], [stdout])
381 AT_CHECK([tail -1 stdout], [0],
382 [Datapath actions: 11
387 AT_SETUP([ofproto-dpif - fast failover group])
389 ADD_OF_PORTS([br0], [1], [10], [11])
390 AT_CHECK([ovs-ofctl -O OpenFlow12 add-group br0 'group_id=1234,type=ff,bucket=watch_port:10,output:10,bucket=watch_port:11,output:11'])
391 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=write_actions(group:1234)'])
392 AT_CHECK([ovs-appctl ofproto/trace br0 'in_port=1,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,dl_type=0x0800,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_proto=1,nw_tos=0,nw_ttl=128,icmp_type=8,icmp_code=0'], [0], [stdout])
393 AT_CHECK([tail -1 stdout], [0],
394 [Datapath actions: drop
399 AT_SETUP([ofproto-dpif - group stats single bucket])
401 ADD_OF_PORTS([br0], [1], [10], [11])
402 AT_CHECK([ovs-ofctl -O OpenFlow12 add-group br0 'group_id=1234,type=select,bucket=output:10,weight=2000,bucket=output:11,weight=0'])
403 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=write_actions(group:1234)'])
407 pkt="in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:01:00),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)"
408 AT_CHECK([ovs-appctl netdev-dummy/receive p1 $pkt])
411 AT_CHECK([ovs-appctl revalidator/purge], [0])
412 AT_CHECK([ovs-ofctl -O OpenFlow12 -vwarn dump-group-stats br0], [0], [stdout])
413 AT_CHECK([STRIP_XIDS stdout | sort], [0], [dnl
414 group_id=1234,ref_count=0,packet_count=3,byte_count=180,bucket0:packet_count=3,byte_count=180,bucket1:packet_count=0,byte_count=0
415 OFPST_GROUP reply (OF1.2):
420 AT_SETUP([ofproto-dpif - group stats all buckets])
422 ADD_OF_PORTS([br0], [1], [10], [11])
423 AT_CHECK([ovs-ofctl -O OpenFlow12 add-group br0 'group_id=1234,type=all,bucket=output:10,bucket=output:11'])
424 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=write_actions(group:1234)'])
428 pkt="in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:01:00),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)"
429 AT_CHECK([ovs-appctl netdev-dummy/receive p1 $pkt])
432 AT_CHECK([ovs-appctl revalidator/purge], [0])
433 AT_CHECK([ovs-ofctl -O OpenFlow12 -vwarn dump-group-stats br0], [0], [stdout])
434 AT_CHECK([STRIP_XIDS stdout | sort], [0], [dnl
435 group_id=1234,ref_count=0,packet_count=3,byte_count=180,bucket0:packet_count=3,byte_count=180,bucket1:packet_count=3,byte_count=180
436 OFPST_GROUP reply (OF1.2):
441 AT_SETUP([ofproto-dpif - registers])
443 ADD_OF_PORTS([br0], [20], [21], [22], [33], [90])
444 AT_DATA([flows.txt], [dnl
445 in_port=90 actions=resubmit:2,resubmit:3,resubmit:4,resubmit:91
446 in_port=91 actions=resubmit:5,resubmit:6,resubmit:7,resubmit:92
447 in_port=92 actions=resubmit:8,resubmit:9,resubmit:10,resubmit:11,resubmit:93
448 in_port=93 actions=resubmit:12,resubmit:13,resubmit:14,resubmit:15
450 in_port=2 actions=load:0x000db000->NXM_NX_REG0[[]]
451 in_port=3 actions=load:0xdea->NXM_NX_REG0[[20..31]]
452 in_port=4 actions=load:0xeef->NXM_NX_REG0[[0..11]]
453 in_port=5 actions=move:NXM_NX_REG0[[]]->NXM_NX_REG1[[]]
454 in_port=6 actions=load:0x22222222->NXM_NX_REG2[[]]
455 in_port=7 actions=move:NXM_NX_REG1[[20..31]]->NXM_NX_REG2[[0..11]]
456 in_port=8 actions=move:NXM_NX_REG1[[0..11]]->NXM_NX_REG2[[20..31]]
457 in_port=9,reg0=0xdeadbeef actions=output:20
458 in_port=10,reg1=0xdeadbeef actions=output:21
459 in_port=11,reg2=0xeef22dea actions=output:22
461 dnl Sanilty check all registers
462 in_port=12 actions=load:0x10->NXM_NX_REG0[[]],load:0x11->NXM_NX_REG1[[]],load:0x12->NXM_NX_REG2[[]]
463 in_port=13 actions=load:0x13->NXM_NX_REG3[[]],load:0x14->NXM_NX_REG4[[]],load:0x15->NXM_NX_REG5[[]]
464 in_port=14 actions=load:0x16->NXM_NX_REG6[[]],load:0x17->NXM_NX_REG7[[]]
465 in_port=15,reg0=0x10,reg1=0x11,reg2=0x12,reg3=0x13,reg4=0x14,reg5=0x15,reg6=0x16,reg7=0x17 actions=output:33
468 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
469 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(90),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)'], [0], [stdout])
470 AT_CHECK([tail -1 stdout], [0],
471 [Datapath actions: 20,21,22,33
476 dnl Tests that the standardized xregs are mapped onto the legacy OVS registers
477 dnl in the manner documented in ovs-ofctl(8).
478 AT_SETUP([ofproto-dpif - extended registers])
480 ADD_OF_PORTS([br0], [1], [2], [3])
481 AT_DATA([flows.txt], [dnl
482 table=0 actions=load:0xfedcba9876543210->OXM_OF_PKT_REG1[[]],resubmit(,1)
483 table=1,reg2=0xfedcba98,reg3=0x76543210 actions=2
485 # These low-priority rules shouldn't match. They're here only to make really
486 # sure that the test fails if either of the above rules fails to match.
487 table=0,priority=0 actions=3
488 table=1,priority=0 actions=3
490 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
491 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)'], [0], [stdout])
492 AT_CHECK([tail -1 stdout], [0], [Datapath actions: 2
497 AT_SETUP([ofproto-dpif - load and move order])
499 ADD_OF_PORTS([br0], [1], [10], [11])
500 AT_CHECK([ovs-ofctl -O OpenFlow12 add-group br0 'group_id=1234,type=all,bucket=output:10,move:NXM_NX_REG1[[]]->NXM_OF_IP_SRC[[]],bucket=output:11'])
501 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=write_actions(load:0xffffffff->NXM_NX_REG1[[]],move:NXM_NX_REG1[[]]->NXM_NX_REG2[[]],group:1234)'])
502 AT_CHECK([ovs-appctl ofproto/trace br0 'in_port=1,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,dl_type=0x0800,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_proto=1,nw_tos=0,nw_ttl=128,icmp_type=8,icmp_code=0'], [0], [stdout])
503 AT_CHECK([tail -2 stdout], [0],
504 [Megaflow: recirc_id=0,ip,in_port=1,nw_src=192.168.0.1,nw_frag=no
505 Datapath actions: set(ipv4(src=255.255.255.255)),10,set(ipv4(src=192.168.0.1)),11
510 dnl Tests that 1.5 copy-field can copy into the standardized xregs.
511 AT_SETUP([ofproto-dpif - copy-field into extended registers])
513 ADD_OF_PORTS([br0], [1], [2], [3])
514 AT_DATA([flows.txt], [dnl
515 table=0 actions=move:OXM_OF_ETH_SRC[[0..47]]->OXM_OF_PKT_REG0[[0..47]],goto_table(1)
516 table=1,xreg0=0x0000505400000005 actions=2
518 # These low-priority rules shouldn't match. They're here only to make really
519 # sure that the test fails if either of the above rules fails to match.
520 table=0,priority=0 actions=3
521 table=1,priority=0 actions=3
523 AT_CHECK([ovs-ofctl -O OpenFlow15 add-flows br0 flows.txt])
524 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)'], [0], [stdout])
525 AT_CHECK([tail -1 stdout], [0], [Datapath actions: 2
530 dnl Tests that 1.5 set-field with mask in the metadata register.
531 AT_SETUP([ofproto-dpif - masked set-field into metadata])
533 ADD_OF_PORTS([br0], [1], [2], [3])
534 AT_DATA([flows.txt], [dnl
535 table=0 actions=set_field:0xfafafafa5a5a5a5a->metadata,goto_table(1)
536 table=1 actions=set_field:0x6b/0xff->metadata,goto_table(2)
537 table=2,metadata=0xfafafafa5a5a5a6b actions=2
539 # These low-priority rules shouldn't match. They're here only to make really
540 # sure that the test fails if either of the above rules fails to match.
541 table=0,priority=0 actions=3
542 table=1,priority=0 actions=3
543 table=2,priority=0 actions=3
545 AT_CHECK([ovs-ofctl -O OpenFlow15 add-flows br0 flows.txt])
546 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)'], [0], [stdout])
547 AT_CHECK([tail -1 stdout], [0], [Datapath actions: 2
553 AT_SETUP([ofproto-dpif - actset_output])
556 [br0], [1], [2], [3], [4], [5], [6], [7], [8], [9], [10], [11], [12], [13])
557 AT_DATA([flows.txt], [dnl
558 table=0,actset_output=unset actions=write_actions(output(2)),goto_table(1)
559 table=1 actions=move:ONFOXM_ET_ACTSET_OUTPUT[[0..31]]->OXM_OF_PKT_REG0[[0..31]],goto_table(2)
561 # Verify that actset_output got set.
562 table=2,priority=20,actset_output=2 actions=4,goto_table(3)
563 table=2,priority=10 actions=5,goto_table(3)
565 # Verify that xreg0 got copied properly from actset_output.
566 table=3,priority=20,xreg0=2 actions=6,goto_table(4)
567 table=3,priority=10 actions=7,goto_table(4)
569 # Verify that adding a group action unsets actset_output.
570 table=4 actions=write_actions(group(5)),goto_table(5)
571 table=5,priority=20,actset_output=unset actions=8,goto_table(6)
572 table=5,priority=10 actions=9,goto_table(6)
574 # Verify that adding another output action doesn't change actset_output
575 # (since there's still a group).
576 table=6 actions=write_actions(output(3)),goto_table(7)
577 table=7,priority=20,actset_output=unset actions=10,goto_table(8)
578 table=7,priority=10 actions=11,goto_table(8)
580 # Verify that clearing the action set, then writing an output action,
581 # causes actset_output to be set again.
582 table=8,actions=clear_actions,write_actions(output(3),output(2)),goto_table(9)
583 table=9,priority=20,actset_output=2 actions=12
584 table=9,priority=10 actions=13
586 AT_CHECK([ovs-ofctl -O OpenFlow13 add-flows br0 flows.txt])
587 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)'], [0], [stdout])
588 AT_CHECK([tail -1 stdout], [0], [Datapath actions: 4,6,8,10,12,2
592 AT_SETUP([ofproto-dpif - push-pop])
594 ADD_OF_PORTS([br0], [20], [21], [22], [33], [90])
595 AT_DATA([flows.txt], [dnl
596 in_port=90 actions=load:20->NXM_NX_REG0[[0..7]],load:21->NXM_NX_REG1[[0..7]],load:22->NXM_NX_REG2[[0..7]], load:33->NXM_NX_REG3[[0..7]], push:NXM_NX_REG0[[]], push:NXM_NX_REG1[[0..7]],push:NXM_NX_REG2[[0..15]], push:NXM_NX_REG3[[]], resubmit:2, resubmit:3, resubmit:4, resubmit:5
597 in_port=2 actions=pop:NXM_NX_REG0[[0..7]],output:NXM_NX_REG0[[]]
598 in_port=3 actions=pop:NXM_NX_REG1[[0..7]],output:NXM_NX_REG1[[]]
599 in_port=4 actions=pop:NXM_NX_REG2[[0..15]],output:NXM_NX_REG2[[]]
600 in_port=5 actions=pop:NXM_NX_REG3[[]],output:NXM_NX_REG3[[]]
603 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
604 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(90),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)'], [0], [stdout])
605 AT_CHECK([tail -1 stdout], [0],
606 [Datapath actions: 33,22,21,20
611 AT_SETUP([ofproto-dpif - output])
613 ADD_OF_PORTS([br0], [1], [9], [10], [11], [55], [66], [77], [88])
614 AT_DATA([flows.txt], [dnl
615 in_port=1 actions=resubmit:2,resubmit:3,resubmit:4,resubmit:5,resubmit:6,resubmit:7,resubmit:8
616 in_port=2 actions=output:9
617 in_port=3 actions=load:55->NXM_NX_REG0[[]],output:NXM_NX_REG0[[]],load:66->NXM_NX_REG1[[]]
618 in_port=4 actions=output:10,output:NXM_NX_REG0[[]],output:NXM_NX_REG1[[]],output:11
619 in_port=5 actions=load:77->NXM_NX_REG0[[0..15]],load:88->NXM_NX_REG0[[16..31]]
620 in_port=6 actions=output:NXM_NX_REG0[[0..15]],output:NXM_NX_REG0[[16..31]]
621 in_port=7 actions=load:0x110000ff->NXM_NX_REG0[[]],output:NXM_NX_REG0[[]]
622 in_port=8 actions=1,9,load:9->NXM_OF_IN_PORT[[]],1,9
624 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
625 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)'], [0], [stdout])
626 AT_CHECK([tail -1 stdout], [0],
627 [Datapath actions: 9,55,10,55,66,11,77,88,9,1
632 AT_SETUP([ofproto-dpif - dec_ttl])
634 ADD_OF_PORTS([br0], [1], [2], [3], [4])
635 AT_DATA([flows.txt], [dnl
636 table=0 in_port=1 action=dec_ttl,output:2,resubmit(1,1),output:4
637 table=1 in_port=1 action=dec_ttl,output:3
639 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
640 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=111,tos=0,ttl=2,frag=no)' -generate], [0], [stdout])
641 AT_CHECK([tail -4 stdout], [0],
642 [Megaflow: recirc_id=0,ip,in_port=1,nw_ttl=2,nw_frag=no
643 Datapath actions: set(ipv4(ttl=1)),2,4
644 This flow is handled by the userspace slow path because it:
645 - Sends "packet-in" messages to the OpenFlow controller.
647 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=111,tos=0,ttl=3,frag=no)'], [0], [stdout])
648 AT_CHECK([tail -2 stdout], [0],
649 [Megaflow: recirc_id=0,ip,in_port=1,nw_ttl=3,nw_frag=no
650 Datapath actions: set(ipv4(ttl=2)),2,set(ipv4(ttl=1)),3,4
652 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x86dd),ipv6(src=::1,dst=::2,label=0,proto=10,tclass=0x70,hlimit=128,frag=no)'], [0], [stdout])
653 AT_CHECK([tail -2 stdout], [0],
654 [Megaflow: recirc_id=0,ipv6,in_port=1,nw_ttl=128,nw_frag=no
655 Datapath actions: set(ipv6(hlimit=127)),2,set(ipv6(hlimit=126)),3,4
658 AT_CAPTURE_FILE([ofctl_monitor.log])
659 AT_CHECK([ovs-ofctl monitor br0 65534 invalid_ttl --detach --no-chdir --pidfile 2> ofctl_monitor.log])
660 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=111,tos=0,ttl=2,frag=no)' -generate], [0], [stdout])
661 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
662 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
663 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=34 in_port=1 (via invalid_ttl) data_len=34 (unbuffered)
664 ip,in_port=0,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_proto=111,nw_tos=0,nw_ecn=0,nw_ttl=1
669 dnl A dec_ttl action at offset 32 in ofpacts will cause the ofpacts
670 dnl buffer to be resized just before pushing the id of the dec_ttl action.
671 dnl Thus the implementation must account for this by using the
672 dnl reallocated buffer rather than the original buffer.
674 dnl A number of similar rules are added to try and exercise
675 dnl xrealloc sufficiently that it returns a different base pointer
676 AT_SETUP([ofproto-dpif - dec_ttl without arguments at offset 32 in ofpacts])
678 ADD_OF_PORTS([br0], [1])
679 (for i in `seq 0 255`; do
680 printf "dl_src=10:11:11:11:11:%02x actions=output:1,output:1,output:1,dec_ttl,controller\n" $i
682 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
686 dnl A dec_ttl action at offset 32 in ofpacts will cause the ofpacts
687 dnl buffer to be resized just before pushing the id of the dec_ttl action.
688 dnl Thus the implementation must account for this by using the
689 dnl reallocated buffer rather than the original buffer.
691 dnl A number of similar rules are added to try and exercise
692 dnl xrealloc sufficiently that it returns a different base pointer
693 AT_SETUP([ofproto-dpif - dec_ttl with arguments at offset 32 in ofpacts])
695 ADD_OF_PORTS([br0], [1])
696 (for i in `seq 0 255`; do
697 printf "dl_src=10:11:11:11:11:%02x actions=output:1,output:1,output:1,dec_ttl(1),controller\n" $i
699 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
703 dnl A note action at offset 24 in ofpacts will cause the ofpacts
704 dnl buffer to be resized just before pushing the id of the dec_ttl action.
705 dnl Thus the implementation must account for this by using the
706 dnl reallocated buffer rather than the original buffer.
708 dnl A number of similar rules are added to try and exercise
709 dnl xrealloc sufficiently that it returns a different base pointer
710 AT_SETUP([ofproto-dpif - note at offset 24 in ofpacts])
712 ADD_OF_PORTS([br0], [1])
713 (for i in `seq 0 255`; do
714 printf "dl_src=10:11:11:11:11:%02x actions=output:1,output:1,note:ff,controller\n" $i
716 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
720 AT_SETUP([ofproto-dpif - output, OFPP_NONE ingress port])
722 ADD_OF_PORTS([br0], [1], [2])
724 AT_CHECK([ovs-ofctl add-flow br0 action=normal])
726 # "in_port" defaults to OFPP_NONE if it's not specified.
727 flow="icmp,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,icmp_type=8,icmp_code=0"
728 AT_CHECK([ovs-appctl ofproto/trace br0 "$flow"], [0], [stdout])
729 AT_CHECK([tail -1 stdout | sed 's/Datapath actions: //' | tr "," "\n" | sort -n], [0], [dnl
738 AT_SETUP([ofproto-dpif - DSCP])
739 OVS_VSWITCHD_START([add-port br0 p1 -- set Interface p1 type=dummy])
740 ADD_OF_PORTS([br0], [9])
741 AT_DATA([flows.txt], [dnl
742 actions=output:LOCAL,enqueue:1:1,enqueue:1:2,enqueue:1:2,enqueue:1:1,output:1,mod_nw_tos:0,output:1,output:LOCAL
744 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
745 AT_CHECK([ovs-vsctl -- \
746 set Port p1 qos=@newqos --\
747 --id=@newqos create QoS type=linux-htb queues=1=@q1,2=@q2 --\
748 --id=@q1 create Queue dscp=1 --\
749 --id=@q2 create Queue dscp=2], [0], [ignore])
750 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(9),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=1.1.1.1,dst=2.2.2.2,proto=1,tos=0xff,ttl=128,frag=no),icmp(type=8,code=0)'], [0], [stdout])
751 AT_CHECK([tail -2 stdout], [0],
752 [Megaflow: recirc_id=0,skb_priority=0,ip,in_port=9,nw_tos=252,nw_frag=no
753 Datapath actions: dnl
755 set(ipv4(tos=0x4/0xfc)),set(skb_priority(0x1)),1,dnl
756 set(ipv4(tos=0x8/0xfc)),set(skb_priority(0x2)),1,dnl
758 set(ipv4(tos=0x4/0xfc)),set(skb_priority(0x1)),1,dnl
759 set(ipv4(tos=0xfc/0xfc)),set(skb_priority(0)),1,dnl
760 set(ipv4(tos=0/0xfc)),1,100
765 AT_SETUP([ofproto-dpif - output/flood flags])
767 ADD_OF_PORTS([br0], [1], [2], [3], [4], [5], [6], [7])
769 AT_DATA([flows.txt], [dnl
770 in_port=local actions=local,flood
771 in_port=1 actions=flood
772 in_port=2 actions=all
773 in_port=3 actions=output:LOCAL,output:1,output:2,output:3,output:4,output:5,output:6,output:7
774 in_port=4 actions=enqueue:LOCAL:1,enqueue:1:1,enqueue:2:1,enqueue:3:2,enqueue:4:1,enqueue:5:1,enqueue:6:1,enqueue:7:1
776 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
777 AT_CHECK([ovs-ofctl mod-port br0 5 noforward])
778 AT_CHECK([ovs-ofctl mod-port br0 6 noflood])
780 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(100),eth(src=00:00:00:00:00:01,dst=00:00:00:00:00:02),eth_type(0x0900)'], [0], [stdout])
781 AT_CHECK([tail -1 stdout \
782 | sed -e 's/Datapath actions: //' | tr ',' '\n' | sort], [0], [dnl
790 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(1),eth(src=00:00:00:00:00:01,dst=00:00:00:00:00:02),eth_type(0x0900)'], [0], [stdout])
791 AT_CHECK([tail -1 stdout \
792 | sed -e 's/Datapath actions: //' | tr ',' '\n' | sort], [0], [dnl
800 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(2),eth(src=00:00:00:00:00:01,dst=00:00:00:00:00:02),eth_type(0x0900)'], [0], [stdout])
801 AT_CHECK([tail -1 stdout \
802 | sed -e 's/Datapath actions: //' | tr ',' '\n' | sort], [0], [dnl
811 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(3),eth(src=00:00:00:00:00:01,dst=00:00:00:00:00:02),eth_type(0x0900)'], [0], [stdout])
812 AT_CHECK([tail -1 stdout], [0],
813 [Datapath actions: 100,1,2,4,6,7
816 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(4),eth(src=00:00:00:00:00:01,dst=00:00:00:00:00:02),eth_type(0x0900)'], [0], [stdout])
817 AT_CHECK([tail -1 stdout], [0],
818 [Datapath actions: set(skb_priority(0x1)),100,1,2,set(skb_priority(0x2)),3,set(skb_priority(0x1)),6,7
823 AT_SETUP([ofproto-dpif - Default Table Miss - OF1.0 (OFPTC_TABLE_MISS_CONTROLLER)])
824 OVS_VSWITCHD_START([dnl
825 add-port br0 p1 -- set Interface p1 type=dummy
827 ON_EXIT([kill `cat ovs-ofctl.pid`])
829 AT_CAPTURE_FILE([ofctl_monitor.log])
831 AT_CHECK([ovs-ofctl monitor br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
834 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=9),tcp_flags(syn)'
836 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
837 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
838 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
839 NXT_PACKET_IN (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
840 tcp,in_port=0,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=9,tcp_flags=syn tcp_csum:0
842 NXT_PACKET_IN (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
843 tcp,in_port=0,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=9,tcp_flags=syn tcp_csum:0
845 NXT_PACKET_IN (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
846 tcp,in_port=0,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=9,tcp_flags=syn tcp_csum:0
849 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
850 AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
857 AT_SETUP([ofproto-dpif - Default Table Miss - OF1.3 (OFPTC_TABLE_MISS_DROP)])
858 OVS_VSWITCHD_START([dnl
859 add-port br0 p1 -- set Interface p1 type=dummy
861 ON_EXIT([kill `cat ovs-ofctl.pid`])
863 AT_CAPTURE_FILE([ofctl_monitor.log])
864 AT_CHECK([ovs-ofctl del-flows br0])
866 AT_CHECK([ovs-ofctl monitor -OOpenFlow13 -P openflow10 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
868 dnl Test that missed packets are droped
870 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=9),tcp_flags(ack,syn)'
872 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
874 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
877 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
878 AT_CHECK([ovs-ofctl -OOpenFlow13 dump-flows br0 | ofctl_strip | sort], [0], [dnl
879 OFPST_FLOW reply (OF1.3):
885 AT_SETUP([ofproto-dpif - Table Miss - goto table and OFPTC_TABLE_MISS_CONTROLLER])
886 OVS_VSWITCHD_START([dnl
887 add-port br0 p1 -- set Interface p1 type=dummy
889 ON_EXIT([kill `cat ovs-ofctl.pid`])
891 AT_CAPTURE_FILE([ofctl_monitor.log])
892 AT_CHECK([ovs-ofctl -OOpenFlow12 add-flow br0 'table=0 actions=goto_table(1)'])
894 AT_CHECK([ovs-ofctl monitor -P openflow10 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
897 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=9),tcp_flags(urg,rst)'
899 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
900 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
901 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
902 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
903 tcp,in_port=0,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=9,tcp_flags=rst|urg tcp_csum:0
905 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
906 tcp,in_port=0,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=9,tcp_flags=rst|urg tcp_csum:0
908 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
909 tcp,in_port=0,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=9,tcp_flags=rst|urg tcp_csum:0
912 AT_CHECK([ovs-appctl revalidator/purge], [0])
913 AT_CHECK([ovs-ofctl -OOpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
914 n_packets=3, n_bytes=180, actions=goto_table:1
915 OFPST_FLOW reply (OF1.2):
921 AT_SETUP([ofproto-dpif - Table Miss - resubmit and OFPTC_TABLE_MISS_CONTROLLER])
922 OVS_VSWITCHD_START([dnl
923 add-port br0 p1 -- set Interface p1 type=dummy
925 ON_EXIT([kill `cat ovs-ofctl.pid`])
927 AT_CAPTURE_FILE([ofctl_monitor.log])
928 AT_CHECK([ovs-ofctl -OOpenFlow12 add-flow br0 'table=0 actions=resubmit(1,1)'])
930 AT_CHECK([ovs-ofctl monitor -P openflow10 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
933 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=9),tcp_flags(0x010)'
936 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
937 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
940 AT_CHECK([ovs-appctl revalidator/purge], [0])
941 AT_CHECK([ovs-ofctl -OOpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
942 n_packets=3, n_bytes=180, actions=resubmit(1,1)
943 OFPST_FLOW reply (OF1.2):
949 AT_SETUP([ofproto-dpif - Table Miss - OFPTC_TABLE_MISS_CONTINUE])
950 OVS_VSWITCHD_START([dnl
951 add-port br0 p1 -- set Interface p1 type=dummy
953 ON_EXIT([kill `cat ovs-ofctl.pid`])
955 AT_CAPTURE_FILE([ofctl_monitor.log])
956 AT_CHECK([ovs-ofctl add-flow br0 'table=1 dl_src=10:11:11:11:11:11 actions=controller'])
957 AT_CHECK([ovs-ofctl -OOpenFlow11 mod-table br0 all continue])
959 dnl Miss table 0, Hit table 1
960 AT_CHECK([ovs-ofctl monitor br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
963 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=10:11:11:11:11:11,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=9),tcp_flags(0x010)'
965 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
966 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
968 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
969 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
970 tcp,in_port=0,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=9,tcp_flags=ack tcp_csum:0
972 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
973 tcp,in_port=0,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=9,tcp_flags=ack tcp_csum:0
975 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
976 tcp,in_port=0,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=9,tcp_flags=ack tcp_csum:0
979 dnl Hit table 0, Miss all other tables, sent to controller
980 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --no-chdir --pidfile 2> ofctl_monitor.log])
983 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=9),tcp_flags(0x010)'
985 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
986 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
988 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
989 NXT_PACKET_IN (xid=0x0): table_id=253 cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
990 tcp,in_port=0,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=9,tcp_flags=ack tcp_csum:0
992 NXT_PACKET_IN (xid=0x0): table_id=253 cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
993 tcp,in_port=0,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=9,tcp_flags=ack tcp_csum:0
995 NXT_PACKET_IN (xid=0x0): table_id=253 cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
996 tcp,in_port=0,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=9,tcp_flags=ack tcp_csum:0
999 AT_CHECK([ovs-appctl revalidator/purge], [0])
1000 AT_CHECK([ovs-ofctl -OOpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
1001 table=1, n_packets=3, n_bytes=180, dl_src=10:11:11:11:11:11 actions=CONTROLLER:65535
1002 OFPST_FLOW reply (OF1.2):
1008 AT_SETUP([ofproto-dpif - Table Miss - goto table and OFPTC_TABLE_MISS_CONTINUE])
1009 OVS_VSWITCHD_START([dnl
1010 add-port br0 p1 -- set Interface p1 type=dummy
1012 ON_EXIT([kill `cat ovs-ofctl.pid`])
1014 AT_CAPTURE_FILE([ofctl_monitor.log])
1015 AT_DATA([flows.txt], [dnl
1016 table=0 actions=goto_table(1)
1017 table=2 dl_src=10:11:11:11:11:11 actions=controller
1019 AT_CHECK([ovs-ofctl -OOpenFlow12 add-flows br0 flows.txt])
1020 AT_CHECK([ovs-ofctl -OOpenFlow11 mod-table br0 all continue])
1022 dnl Hit table 0, Miss table 1, Hit table 2
1023 AT_CHECK([ovs-ofctl monitor br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1026 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=10:11:11:11:11:11,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=9),tcp_flags(0x010)'
1028 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1029 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1031 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1032 NXT_PACKET_IN (xid=0x0): table_id=2 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1033 tcp,in_port=0,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=9,tcp_flags=ack tcp_csum:0
1035 NXT_PACKET_IN (xid=0x0): table_id=2 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1036 tcp,in_port=0,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=9,tcp_flags=ack tcp_csum:0
1038 NXT_PACKET_IN (xid=0x0): table_id=2 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1039 tcp,in_port=0,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=9,tcp_flags=ack tcp_csum:0
1042 dnl Hit table 1, Miss all other tables, sent to controller
1043 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1046 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=9),tcp_flags(0x010)'
1048 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1049 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
1051 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1052 NXT_PACKET_IN (xid=0x0): table_id=253 cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
1053 tcp,in_port=0,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=9,tcp_flags=ack tcp_csum:0
1055 NXT_PACKET_IN (xid=0x0): table_id=253 cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
1056 tcp,in_port=0,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=9,tcp_flags=ack tcp_csum:0
1058 NXT_PACKET_IN (xid=0x0): table_id=253 cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
1059 tcp,in_port=0,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=9,tcp_flags=ack tcp_csum:0
1062 AT_CHECK([ovs-appctl revalidator/purge], [0])
1063 AT_CHECK([ovs-ofctl -OOpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
1064 n_packets=6, n_bytes=360, actions=goto_table:1
1065 table=2, n_packets=3, n_bytes=180, dl_src=10:11:11:11:11:11 actions=CONTROLLER:65535
1066 OFPST_FLOW reply (OF1.2):
1072 AT_SETUP([ofproto-dpif - Table Miss - resubmit and OFPTC_TABLE_MISS_CONTINUE])
1073 OVS_VSWITCHD_START([dnl
1074 add-port br0 p1 -- set Interface p1 type=dummy
1076 ON_EXIT([kill `cat ovs-ofctl.pid`])
1078 AT_CAPTURE_FILE([ofctl_monitor.log])
1079 AT_DATA([flows.txt], [dnl
1080 table=0 actions=resubmit(1,1)
1081 table=2 dl_src=10:11:11:11:11:11 actions=controller
1083 AT_CHECK([ovs-ofctl -OOpenFlow12 add-flows br0 flows.txt])
1084 AT_CHECK([ovs-ofctl -OOpenFlow11 mod-table br0 all continue])
1086 dnl Hit table 0, Miss table 1, Dropped
1087 AT_CHECK([ovs-ofctl monitor br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1090 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=10:11:11:11:11:11,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=9),tcp_flags(0x010)'
1092 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1094 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1097 dnl Hit table 1, Dropped
1098 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1101 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=9),tcp_flags(0x010)'
1103 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
1105 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1108 AT_CHECK([ovs-appctl revalidator/purge], [0])
1109 AT_CHECK([ovs-ofctl -OOpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
1110 n_packets=6, n_bytes=360, actions=resubmit(1,1)
1111 table=2, dl_src=10:11:11:11:11:11 actions=CONTROLLER:65535
1112 OFPST_FLOW reply (OF1.2):
1118 AT_SETUP([ofproto-dpif - Table Miss - OFPTC_TABLE_MISS_DROP])
1119 OVS_VSWITCHD_START([dnl
1120 add-port br0 p1 -- set Interface p1 type=dummy
1122 ON_EXIT([kill `cat ovs-ofctl.pid`])
1124 AT_CAPTURE_FILE([ofctl_monitor.log])
1125 AT_CHECK([ovs-ofctl -OOpenFlow11 mod-table br0 all drop])
1127 AT_CHECK([ovs-ofctl monitor -P openflow10 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1129 dnl Test that missed packets are droped
1131 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=9),tcp_flags(0x010)'
1133 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
1135 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1138 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1139 AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
1146 AT_SETUP([ofproto-dpif - Table Miss - goto table and OFPTC_TABLE_MISS_DROP])
1147 OVS_VSWITCHD_START([dnl
1148 add-port br0 p1 -- set Interface p1 type=dummy
1150 ON_EXIT([kill `cat ovs-ofctl.pid`])
1152 AT_CAPTURE_FILE([ofctl_monitor.log])
1153 AT_CHECK([ovs-ofctl del-flows br0])
1154 AT_CHECK([ovs-ofctl -OOpenFlow12 add-flow br0 'table=0 actions=goto_table(1)'])
1155 AT_CHECK([ovs-ofctl -OOpenFlow11 mod-table br0 all drop])
1157 AT_CHECK([ovs-ofctl monitor -P openflow10 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1159 dnl Test that missed packets are droped
1161 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=9),tcp_flags(0x010)'
1163 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
1165 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1168 AT_CHECK([ovs-appctl revalidator/purge], [0])
1169 AT_CHECK([ovs-ofctl -OOpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
1170 n_packets=3, n_bytes=180, actions=goto_table:1
1171 OFPST_FLOW reply (OF1.2):
1177 AT_SETUP([ofproto-dpif - Table Miss - resubmit and OFPTC_TABLE_MISS_DROP])
1178 OVS_VSWITCHD_START([dnl
1179 add-port br0 p1 -- set Interface p1 type=dummy
1181 ON_EXIT([kill `cat ovs-ofctl.pid`])
1183 AT_CAPTURE_FILE([ofctl_monitor.log])
1184 AT_CHECK([ovs-ofctl del-flows br0])
1185 AT_CHECK([ovs-ofctl -OOpenFlow12 add-flow br0 'table=0 actions=resubmit(1,1)'])
1186 AT_CHECK([ovs-ofctl -OOpenFlow11 mod-table br0 all drop])
1188 AT_CHECK([ovs-ofctl monitor -P openflow10 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1190 dnl Test that missed packets are droped
1192 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=9),tcp_flags(0x010)'
1194 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
1196 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1199 AT_CHECK([ovs-appctl revalidator/purge], [0])
1200 AT_CHECK([ovs-ofctl -OOpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
1201 n_packets=3, n_bytes=180, actions=resubmit(1,1)
1202 OFPST_FLOW reply (OF1.2):
1208 AT_SETUP([ofproto-dpif - controller])
1209 OVS_VSWITCHD_START([dnl
1210 add-port br0 p1 -- set Interface p1 type=dummy
1212 ON_EXIT([kill `cat ovs-ofctl.pid`])
1214 AT_CAPTURE_FILE([ofctl_monitor.log])
1215 AT_DATA([flows.txt], [dnl
1216 cookie=0x0 dl_src=10:11:11:11:11:11 actions=controller
1217 cookie=0x1 dl_src=20:22:22:22:22:22 actions=controller,resubmit(80,1)
1218 cookie=0x2 dl_src=30:33:33:33:33:33 actions=mod_vlan_vid:15,controller
1220 cookie=0x3 table=1 in_port=80 actions=load:1->NXM_NX_REG0[[]],mod_vlan_vid:80,controller,resubmit(81,2)
1221 cookie=0x4 table=2 in_port=81 actions=load:2->NXM_NX_REG1[[]],mod_dl_src:80:81:81:81:81:81,controller,resubmit(82,3)
1222 cookie=0x5 table=3 in_port=82 actions=load:3->NXM_NX_REG2[[]],mod_dl_dst:82:82:82:82:82:82,controller,resubmit(83,4)
1223 cookie=0x6 table=4 in_port=83 actions=load:4->NXM_NX_REG3[[]],mod_nw_src:83.83.83.83,controller,resubmit(84,5)
1224 cookie=0x7 table=5 in_port=84 actions=load:5->NXM_NX_REG4[[]],load:6->NXM_NX_TUN_ID[[]],mod_nw_dst:84.84.84.84,controller,resubmit(85,6)
1225 cookie=0x8 table=6 in_port=85 actions=mod_tp_src:85,controller,resubmit(86,7)
1226 cookie=0x9 table=7 in_port=86 actions=mod_tp_dst:86,controller,controller
1227 cookie=0xa dl_src=40:44:44:44:44:41 actions=mod_vlan_vid:99,mod_vlan_pcp:1,controller
1228 cookie=0xd dl_src=80:88:88:88:88:88 arp actions=load:2->OXM_OF_ARP_OP[[]],controller,load:0xc0a88001->OXM_OF_ARP_SPA[[]],controller,load:0x404444444441->OXM_OF_ARP_THA[[]],load:0x01010101->OXM_OF_ARP_SPA[[]],load:0x02020202->OXM_OF_ARP_TPA[[]],controller
1230 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
1233 AT_CHECK([ovs-ofctl monitor -P openflow10 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1236 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=9),tcp_flags(0x010)'
1238 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1239 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1241 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1242 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
1243 tcp,in_port=0,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=9,tcp_flags=ack tcp_csum:0
1245 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
1246 tcp,in_port=0,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=9,tcp_flags=ack tcp_csum:0
1248 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
1249 tcp,in_port=0,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=9,tcp_flags=ack tcp_csum:0
1252 dnl Singleton controller action.
1253 AT_CHECK([ovs-ofctl monitor -P openflow10 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1256 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=10:11:11:11:11:11,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=10),tcp_flags(0x002)'
1258 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1259 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1261 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1262 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1263 tcp,in_port=0,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:0
1265 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1266 tcp,in_port=0,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:0
1268 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1269 tcp,in_port=0,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:0
1272 dnl Modified controller action.
1273 AT_CHECK([ovs-ofctl monitor -P openflow10 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1276 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=30:33:33:33:33:33,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=10),tcp_flags(0x001)'
1278 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1279 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1281 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1282 OFPT_PACKET_IN (xid=0x0): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1283 tcp,in_port=0,dl_vlan=15,dl_vlan_pcp=0,dl_src=30:33:33:33:33:33,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=fin tcp_csum:0
1285 OFPT_PACKET_IN (xid=0x0): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1286 tcp,in_port=0,dl_vlan=15,dl_vlan_pcp=0,dl_src=30:33:33:33:33:33,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=fin tcp_csum:0
1288 OFPT_PACKET_IN (xid=0x0): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1289 tcp,in_port=0,dl_vlan=15,dl_vlan_pcp=0,dl_src=30:33:33:33:33:33,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=fin tcp_csum:0
1292 dnl Modified VLAN controller action.
1293 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1296 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=40:44:44:44:44:41,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=16,tos=0,ttl=64,frag=no)'
1298 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1299 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1301 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1302 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1303 ip,in_port=0,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:44:41,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_proto=16,nw_tos=0,nw_ecn=0,nw_ttl=64
1305 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1306 ip,in_port=0,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:44:41,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_proto=16,nw_tos=0,nw_ecn=0,nw_ttl=64
1308 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1309 ip,in_port=0,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:44:41,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_proto=16,nw_tos=0,nw_ecn=0,nw_ttl=64
1313 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1316 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=20:22:22:22:22:22,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=11),tcp_flags(0x001)'
1318 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 18])
1319 ovs-appctl -t ovs-ofctl exit
1321 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1322 NXT_PACKET_IN (xid=0x0): cookie=0x1 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1323 tcp,in_port=0,vlan_tci=0x0000,dl_src=20:22:22:22:22:22,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=11,tcp_flags=fin tcp_csum:0
1325 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x3 total_len=64 in_port=1 reg0=0x1 (via action) data_len=64 (unbuffered)
1326 tcp,in_port=0,dl_vlan=80,dl_vlan_pcp=0,dl_src=20:22:22:22:22:22,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=11,tcp_flags=fin tcp_csum:0
1328 NXT_PACKET_IN (xid=0x0): table_id=2 cookie=0x4 total_len=64 in_port=1 reg0=0x1 reg1=0x2 (via action) data_len=64 (unbuffered)
1329 tcp,in_port=0,dl_vlan=80,dl_vlan_pcp=0,dl_src=80:81:81:81:81:81,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=11,tcp_flags=fin tcp_csum:0
1331 NXT_PACKET_IN (xid=0x0): table_id=3 cookie=0x5 total_len=64 in_port=1 reg0=0x1 reg1=0x2 reg2=0x3 (via action) data_len=64 (unbuffered)
1332 tcp,in_port=0,dl_vlan=80,dl_vlan_pcp=0,dl_src=80:81:81:81:81:81,dl_dst=82:82:82:82:82:82,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=11,tcp_flags=fin tcp_csum:0
1334 NXT_PACKET_IN (xid=0x0): table_id=4 cookie=0x6 total_len=64 in_port=1 reg0=0x1 reg1=0x2 reg2=0x3 reg3=0x4 (via action) data_len=64 (unbuffered)
1335 tcp,in_port=0,dl_vlan=80,dl_vlan_pcp=0,dl_src=80:81:81:81:81:81,dl_dst=82:82:82:82:82:82,nw_src=83.83.83.83,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=11,tcp_flags=fin tcp_csum:1a03
1337 NXT_PACKET_IN (xid=0x0): table_id=5 cookie=0x7 total_len=64 in_port=1 tun_id=0x6 reg0=0x1 reg1=0x2 reg2=0x3 reg3=0x4 reg4=0x5 (via action) data_len=64 (unbuffered)
1338 tcp,in_port=0,dl_vlan=80,dl_vlan_pcp=0,dl_src=80:81:81:81:81:81,dl_dst=82:82:82:82:82:82,nw_src=83.83.83.83,nw_dst=84.84.84.84,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=11,tcp_flags=fin tcp_csum:3205
1340 NXT_PACKET_IN (xid=0x0): table_id=6 cookie=0x8 total_len=64 in_port=1 tun_id=0x6 reg0=0x1 reg1=0x2 reg2=0x3 reg3=0x4 reg4=0x5 (via action) data_len=64 (unbuffered)
1341 tcp,in_port=0,dl_vlan=80,dl_vlan_pcp=0,dl_src=80:81:81:81:81:81,dl_dst=82:82:82:82:82:82,nw_src=83.83.83.83,nw_dst=84.84.84.84,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=85,tp_dst=11,tcp_flags=fin tcp_csum:31b8
1343 NXT_PACKET_IN (xid=0x0): table_id=7 cookie=0x9 total_len=64 in_port=1 tun_id=0x6 reg0=0x1 reg1=0x2 reg2=0x3 reg3=0x4 reg4=0x5 (via action) data_len=64 (unbuffered)
1344 tcp,in_port=0,dl_vlan=80,dl_vlan_pcp=0,dl_src=80:81:81:81:81:81,dl_dst=82:82:82:82:82:82,nw_src=83.83.83.83,nw_dst=84.84.84.84,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=85,tp_dst=86,tcp_flags=fin tcp_csum:316d
1346 NXT_PACKET_IN (xid=0x0): table_id=7 cookie=0x9 total_len=64 in_port=1 tun_id=0x6 reg0=0x1 reg1=0x2 reg2=0x3 reg3=0x4 reg4=0x5 (via action) data_len=64 (unbuffered)
1347 tcp,in_port=0,dl_vlan=80,dl_vlan_pcp=0,dl_src=80:81:81:81:81:81,dl_dst=82:82:82:82:82:82,nw_src=83.83.83.83,nw_dst=84.84.84.84,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=85,tp_dst=86,tcp_flags=fin tcp_csum:316d
1351 AT_CHECK([ovs-ofctl monitor br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1354 ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 20 22 22 22 22 22 08 00 45 00 00 1C 00 00 00 00 00 11 00 00 C0 A8 00 01 C0 A8 00 02 00 08 00 0B 00 00 12 34 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00'
1356 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 18])
1357 ovs-appctl -t ovs-ofctl exit
1359 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1360 NXT_PACKET_IN (xid=0x0): cookie=0x1 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1361 udp,in_port=0,vlan_tci=0x0000,dl_src=20:22:22:22:22:22,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=8,tp_dst=11 udp_csum:1234
1363 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x3 total_len=64 in_port=1 reg0=0x1 (via action) data_len=64 (unbuffered)
1364 udp,in_port=0,dl_vlan=80,dl_vlan_pcp=0,dl_src=20:22:22:22:22:22,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=8,tp_dst=11 udp_csum:1234
1366 NXT_PACKET_IN (xid=0x0): table_id=2 cookie=0x4 total_len=64 in_port=1 reg0=0x1 reg1=0x2 (via action) data_len=64 (unbuffered)
1367 udp,in_port=0,dl_vlan=80,dl_vlan_pcp=0,dl_src=80:81:81:81:81:81,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=8,tp_dst=11 udp_csum:1234
1369 NXT_PACKET_IN (xid=0x0): table_id=3 cookie=0x5 total_len=64 in_port=1 reg0=0x1 reg1=0x2 reg2=0x3 (via action) data_len=64 (unbuffered)
1370 udp,in_port=0,dl_vlan=80,dl_vlan_pcp=0,dl_src=80:81:81:81:81:81,dl_dst=82:82:82:82:82:82,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=8,tp_dst=11 udp_csum:1234
1372 NXT_PACKET_IN (xid=0x0): table_id=4 cookie=0x6 total_len=64 in_port=1 reg0=0x1 reg1=0x2 reg2=0x3 reg3=0x4 (via action) data_len=64 (unbuffered)
1373 udp,in_port=0,dl_vlan=80,dl_vlan_pcp=0,dl_src=80:81:81:81:81:81,dl_dst=82:82:82:82:82:82,nw_src=83.83.83.83,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=8,tp_dst=11 udp_csum:2c37
1375 NXT_PACKET_IN (xid=0x0): table_id=5 cookie=0x7 total_len=64 in_port=1 tun_id=0x6 reg0=0x1 reg1=0x2 reg2=0x3 reg3=0x4 reg4=0x5 (via action) data_len=64 (unbuffered)
1376 udp,in_port=0,dl_vlan=80,dl_vlan_pcp=0,dl_src=80:81:81:81:81:81,dl_dst=82:82:82:82:82:82,nw_src=83.83.83.83,nw_dst=84.84.84.84,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=8,tp_dst=11 udp_csum:4439
1378 NXT_PACKET_IN (xid=0x0): table_id=6 cookie=0x8 total_len=64 in_port=1 tun_id=0x6 reg0=0x1 reg1=0x2 reg2=0x3 reg3=0x4 reg4=0x5 (via action) data_len=64 (unbuffered)
1379 udp,in_port=0,dl_vlan=80,dl_vlan_pcp=0,dl_src=80:81:81:81:81:81,dl_dst=82:82:82:82:82:82,nw_src=83.83.83.83,nw_dst=84.84.84.84,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=85,tp_dst=11 udp_csum:43ec
1381 NXT_PACKET_IN (xid=0x0): table_id=7 cookie=0x9 total_len=64 in_port=1 tun_id=0x6 reg0=0x1 reg1=0x2 reg2=0x3 reg3=0x4 reg4=0x5 (via action) data_len=64 (unbuffered)
1382 udp,in_port=0,dl_vlan=80,dl_vlan_pcp=0,dl_src=80:81:81:81:81:81,dl_dst=82:82:82:82:82:82,nw_src=83.83.83.83,nw_dst=84.84.84.84,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=85,tp_dst=86 udp_csum:43a1
1384 NXT_PACKET_IN (xid=0x0): table_id=7 cookie=0x9 total_len=64 in_port=1 tun_id=0x6 reg0=0x1 reg1=0x2 reg2=0x3 reg3=0x4 reg4=0x5 (via action) data_len=64 (unbuffered)
1385 udp,in_port=0,dl_vlan=80,dl_vlan_pcp=0,dl_src=80:81:81:81:81:81,dl_dst=82:82:82:82:82:82,nw_src=83.83.83.83,nw_dst=84.84.84.84,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=85,tp_dst=86 udp_csum:43a1
1388 dnl Modified ARP controller action.
1389 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1392 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=80:88:88:88:88:88,dst=ff:ff:ff:ff:ff:ff),eth_type(0x0806),arp(sip=192.168.0.1,tip=192.168.0.2,op=1,sha=50:54:00:00:00:05,tha=00:00:00:00:00:00)'
1395 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 18])
1396 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
1397 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1398 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1399 arp,in_port=0,vlan_tci=0x0000,dl_src=80:88:88:88:88:88,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=192.168.0.1,arp_tpa=192.168.0.2,arp_op=2,arp_sha=50:54:00:00:00:05,arp_tha=00:00:00:00:00:00
1400 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1401 arp,in_port=0,vlan_tci=0x0000,dl_src=80:88:88:88:88:88,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=192.168.128.1,arp_tpa=192.168.0.2,arp_op=2,arp_sha=50:54:00:00:00:05,arp_tha=00:00:00:00:00:00
1402 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1403 arp,in_port=0,vlan_tci=0x0000,dl_src=80:88:88:88:88:88,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=1.1.1.1,arp_tpa=2.2.2.2,arp_op=2,arp_sha=50:54:00:00:00:05,arp_tha=40:44:44:44:44:41
1404 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1405 arp,in_port=0,vlan_tci=0x0000,dl_src=80:88:88:88:88:88,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=192.168.0.1,arp_tpa=192.168.0.2,arp_op=2,arp_sha=50:54:00:00:00:05,arp_tha=00:00:00:00:00:00
1406 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1407 arp,in_port=0,vlan_tci=0x0000,dl_src=80:88:88:88:88:88,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=192.168.128.1,arp_tpa=192.168.0.2,arp_op=2,arp_sha=50:54:00:00:00:05,arp_tha=00:00:00:00:00:00
1408 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1409 arp,in_port=0,vlan_tci=0x0000,dl_src=80:88:88:88:88:88,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=1.1.1.1,arp_tpa=2.2.2.2,arp_op=2,arp_sha=50:54:00:00:00:05,arp_tha=40:44:44:44:44:41
1410 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1411 arp,in_port=0,vlan_tci=0x0000,dl_src=80:88:88:88:88:88,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=192.168.0.1,arp_tpa=192.168.0.2,arp_op=2,arp_sha=50:54:00:00:00:05,arp_tha=00:00:00:00:00:00
1412 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1413 arp,in_port=0,vlan_tci=0x0000,dl_src=80:88:88:88:88:88,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=192.168.128.1,arp_tpa=192.168.0.2,arp_op=2,arp_sha=50:54:00:00:00:05,arp_tha=00:00:00:00:00:00
1414 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1415 arp,in_port=0,vlan_tci=0x0000,dl_src=80:88:88:88:88:88,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=1.1.1.1,arp_tpa=2.2.2.2,arp_op=2,arp_sha=50:54:00:00:00:05,arp_tha=40:44:44:44:44:41
1418 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1421 AT_CHECK([ovs-ofctl monitor br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1424 ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 20 22 22 22 22 22 08 00 45 00 00 24 00 00 00 00 00 84 00 00 C0 A8 00 01 C0 A8 00 02 04 58 08 af 00 00 00 00 d9 d7 91 57 01 00 00 34 cf 28 ec 4e 00 01 40 00 00 0a ff ff b7 53 24 19 00 05 00 08 7f 00 00 01 00 05 00 08 c0 a8 02 07 00 0c 00 06 00 05 00 00 80 00 00 04 c0 00 00 04'
1427 AT_CHECK([ovs-appctl time/warp 1000], [0], [ignore])
1428 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 18])
1429 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
1430 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1431 NXT_PACKET_IN (xid=0x0): cookie=0x1 total_len=98 in_port=1 (via action) data_len=98 (unbuffered)
1432 sctp,in_port=0,vlan_tci=0x0000,dl_src=20:22:22:22:22:22,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=1112,tp_dst=2223 sctp_csum:d9d79157
1434 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x3 total_len=102 in_port=1 reg0=0x1 (via action) data_len=102 (unbuffered)
1435 sctp,in_port=0,dl_vlan=80,dl_vlan_pcp=0,dl_src=20:22:22:22:22:22,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=1112,tp_dst=2223 sctp_csum:d9d79157
1437 NXT_PACKET_IN (xid=0x0): table_id=2 cookie=0x4 total_len=102 in_port=1 reg0=0x1 reg1=0x2 (via action) data_len=102 (unbuffered)
1438 sctp,in_port=0,dl_vlan=80,dl_vlan_pcp=0,dl_src=80:81:81:81:81:81,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=1112,tp_dst=2223 sctp_csum:d9d79157
1440 NXT_PACKET_IN (xid=0x0): table_id=3 cookie=0x5 total_len=102 in_port=1 reg0=0x1 reg1=0x2 reg2=0x3 (via action) data_len=102 (unbuffered)
1441 sctp,in_port=0,dl_vlan=80,dl_vlan_pcp=0,dl_src=80:81:81:81:81:81,dl_dst=82:82:82:82:82:82,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=1112,tp_dst=2223 sctp_csum:d9d79157
1443 NXT_PACKET_IN (xid=0x0): table_id=4 cookie=0x6 total_len=102 in_port=1 reg0=0x1 reg1=0x2 reg2=0x3 reg3=0x4 (via action) data_len=102 (unbuffered)
1444 sctp,in_port=0,dl_vlan=80,dl_vlan_pcp=0,dl_src=80:81:81:81:81:81,dl_dst=82:82:82:82:82:82,nw_src=83.83.83.83,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=1112,tp_dst=2223 sctp_csum:d9d79157
1446 NXT_PACKET_IN (xid=0x0): table_id=5 cookie=0x7 total_len=102 in_port=1 tun_id=0x6 reg0=0x1 reg1=0x2 reg2=0x3 reg3=0x4 reg4=0x5 (via action) data_len=102 (unbuffered)
1447 sctp,in_port=0,dl_vlan=80,dl_vlan_pcp=0,dl_src=80:81:81:81:81:81,dl_dst=82:82:82:82:82:82,nw_src=83.83.83.83,nw_dst=84.84.84.84,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=1112,tp_dst=2223 sctp_csum:d9d79157
1449 NXT_PACKET_IN (xid=0x0): table_id=6 cookie=0x8 total_len=102 in_port=1 tun_id=0x6 reg0=0x1 reg1=0x2 reg2=0x3 reg3=0x4 reg4=0x5 (via action) data_len=102 (unbuffered)
1450 sctp,in_port=0,dl_vlan=80,dl_vlan_pcp=0,dl_src=80:81:81:81:81:81,dl_dst=82:82:82:82:82:82,nw_src=83.83.83.83,nw_dst=84.84.84.84,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=85,tp_dst=2223 sctp_csum:7f12662e
1452 NXT_PACKET_IN (xid=0x0): table_id=7 cookie=0x9 total_len=102 in_port=1 tun_id=0x6 reg0=0x1 reg1=0x2 reg2=0x3 reg3=0x4 reg4=0x5 (via action) data_len=102 (unbuffered)
1453 sctp,in_port=0,dl_vlan=80,dl_vlan_pcp=0,dl_src=80:81:81:81:81:81,dl_dst=82:82:82:82:82:82,nw_src=83.83.83.83,nw_dst=84.84.84.84,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=85,tp_dst=86 sctp_csum:a7e86f67
1455 NXT_PACKET_IN (xid=0x0): table_id=7 cookie=0x9 total_len=102 in_port=1 tun_id=0x6 reg0=0x1 reg1=0x2 reg2=0x3 reg3=0x4 reg4=0x5 (via action) data_len=102 (unbuffered)
1456 sctp,in_port=0,dl_vlan=80,dl_vlan_pcp=0,dl_src=80:81:81:81:81:81,dl_dst=82:82:82:82:82:82,nw_src=83.83.83.83,nw_dst=84.84.84.84,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=85,tp_dst=86 sctp_csum:a7e86f67
1459 AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
1460 cookie=0x1, n_packets=3, n_bytes=218, dl_src=20:22:22:22:22:22 actions=CONTROLLER:65535,resubmit(80,1)
1461 cookie=0x2, n_packets=3, n_bytes=180, dl_src=30:33:33:33:33:33 actions=mod_vlan_vid:15,CONTROLLER:65535
1462 cookie=0x3, table=1, n_packets=3, n_bytes=218, in_port=80 actions=load:0x1->NXM_NX_REG0[[]],mod_vlan_vid:80,CONTROLLER:65535,resubmit(81,2)
1463 cookie=0x4, table=2, n_packets=3, n_bytes=218, in_port=81 actions=load:0x2->NXM_NX_REG1[[]],mod_dl_src:80:81:81:81:81:81,CONTROLLER:65535,resubmit(82,3)
1464 cookie=0x5, table=3, n_packets=3, n_bytes=218, in_port=82 actions=load:0x3->NXM_NX_REG2[[]],mod_dl_dst:82:82:82:82:82:82,CONTROLLER:65535,resubmit(83,4)
1465 cookie=0x6, table=4, n_packets=3, n_bytes=218, in_port=83 actions=load:0x4->NXM_NX_REG3[[]],mod_nw_src:83.83.83.83,CONTROLLER:65535,resubmit(84,5)
1466 cookie=0x7, table=5, n_packets=3, n_bytes=218, in_port=84 actions=load:0x5->NXM_NX_REG4[[]],load:0x6->NXM_NX_TUN_ID[[]],mod_nw_dst:84.84.84.84,CONTROLLER:65535,resubmit(85,6)
1467 cookie=0x8, table=6, n_packets=3, n_bytes=218, in_port=85 actions=mod_tp_src:85,CONTROLLER:65535,resubmit(86,7)
1468 cookie=0x9, table=7, n_packets=3, n_bytes=218, in_port=86 actions=mod_tp_dst:86,CONTROLLER:65535,CONTROLLER:65535
1469 cookie=0xa, n_packets=3, n_bytes=180, dl_src=40:44:44:44:44:41 actions=mod_vlan_vid:99,mod_vlan_pcp:1,CONTROLLER:65535
1470 cookie=0xd, n_packets=3, n_bytes=180, arp,dl_src=80:88:88:88:88:88 actions=load:0x2->NXM_OF_ARP_OP[[]],CONTROLLER:65535,load:0xc0a88001->NXM_OF_ARP_SPA[[]],CONTROLLER:65535,load:0x404444444441->NXM_NX_ARP_THA[[]],load:0x1010101->NXM_OF_ARP_SPA[[]],load:0x2020202->NXM_OF_ARP_TPA[[]],CONTROLLER:65535
1471 n_packets=3, n_bytes=180, dl_src=10:11:11:11:11:11 actions=CONTROLLER:65535
1478 AT_SETUP([ofproto-dpif - MPLS handling])
1479 OVS_VSWITCHD_START([dnl
1480 add-port br0 p1 -- set Interface p1 type=dummy
1482 ON_EXIT([kill `cat ovs-ofctl.pid`])
1484 AT_CAPTURE_FILE([ofctl_monitor.log])
1485 AT_DATA([flows.txt], [dnl
1486 cookie=0xa dl_src=40:44:44:44:44:42 actions=push_mpls:0x8847,load:10->OXM_OF_MPLS_LABEL[[]],load:3->OXM_OF_MPLS_TC[[]],controller
1487 cookie=0xa dl_src=41:44:44:44:44:42 actions=push_mpls:0x8847,load:10->OXM_OF_MPLS_LABEL[[]],load:3->OXM_OF_MPLS_TC[[]],pop_mpls:0x0800,controller
1488 cookie=0xa dl_src=40:44:44:44:44:43 actions=push_mpls:0x8847,load:10->OXM_OF_MPLS_LABEL[[]],load:3->OXM_OF_MPLS_TC[[]],controller
1489 cookie=0xa dl_src=40:44:44:44:44:44 actions=push_mpls:0x8847,load:10->OXM_OF_MPLS_LABEL[[]],load:3->OXM_OF_MPLS_TC[[]],controller
1490 cookie=0xa dl_src=40:44:44:44:44:45 actions=push_mpls:0x8847,load:10->OXM_OF_MPLS_LABEL[[]],load:3->OXM_OF_MPLS_TC[[]],dec_mpls_ttl,controller
1491 cookie=0xa dl_src=40:44:44:44:44:46 actions=push_mpls:0x8847,load:10->OXM_OF_MPLS_LABEL[[]],load:3->OXM_OF_MPLS_TC[[]],set_mpls_ttl(10),controller
1492 cookie=0xa dl_src=40:44:44:44:44:47 actions=push_mpls:0x8847,load:10->OXM_OF_MPLS_LABEL[[]],load:3->OXM_OF_MPLS_TC[[]],dec_mpls_ttl,set_mpls_ttl(10),controller
1493 cookie=0xa dl_src=40:44:44:44:44:48 actions=push_mpls:0x8847,load:10->OXM_OF_MPLS_LABEL[[]],load:3->OXM_OF_MPLS_TC[[]],set_mpls_ttl(10),dec_mpls_ttl,controller
1494 cookie=0xa mpls,dl_src=40:44:44:44:44:49 actions=push_mpls:0x8848,load:10->OXM_OF_MPLS_LABEL[[]],CONTROLLER:65535
1495 cookie=0xb dl_src=50:55:55:55:55:55 dl_type=0x8847 actions=load:1000->OXM_OF_MPLS_LABEL[[]],controller
1496 cookie=0xd dl_src=60:66:66:66:66:66 actions=pop_mpls:0x0800,controller
1497 cookie=0xc dl_src=70:77:77:77:77:77 actions=push_mpls:0x8848,load:1000->OXM_OF_MPLS_LABEL[[]],load:7->OXM_OF_MPLS_TC[[]],controller
1499 cookie=0xd dl_src=60:66:66:66:00:01 actions=pop_mpls:0x0800,dec_ttl,controller
1500 cookie=0xd dl_src=60:66:66:66:00:02 actions=pop_mpls:0x0800,load:0xa000001->OXM_OF_IPV4_DST[[]],controller
1501 cookie=0xd dl_src=60:66:66:66:00:03 actions=pop_mpls:0x0800,move:OXM_OF_IPV4_DST[[]]->OXM_OF_IPV4_SRC[[]],controller
1502 cookie=0xd dl_src=60:66:66:66:00:04 actions=pop_mpls:0x0800,push:OXM_OF_IPV4_DST[[]],pop:OXM_OF_IPV4_SRC[[]],controller
1503 cookie=0xd dl_src=60:66:66:66:00:05 actions=pop_mpls:0x0800,multipath(eth_src,50,modulo_n,256,0,OXM_OF_IPV4_SRC[[0..7]]),controller
1504 cookie=0xd dl_src=60:66:66:66:00:06 actions=pop_mpls:0x0800,bundle_load(eth_src,50,hrw,ofport,OXM_OF_IPV4_SRC[[0..15]],slaves:1,2),controller
1505 cookie=0xd dl_src=60:66:66:66:00:07 actions=pop_mpls:0x0800,learn(table=1,hard_timeout=60,eth_type=0x800,nw_proto=6,OXM_OF_IPV4_SRC[[]]=OXM_OF_IPV4_DST[[]]),controller
1507 cookie=0xd dl_src=60:66:66:66:00:08 actions=pop_mpls:0x0806,resubmit(1,1)
1508 cookie=0xd table=1 arp actions=controller
1510 cookie=0xd dl_src=60:66:66:66:00:09 actions=pop_mpls:0x0800,mod_nw_tos:48,controller
1511 cookie=0xd dl_src=60:66:66:66:00:0a actions=pop_mpls:0x0800,mod_nw_dst:10.0.0.1,controller
1512 cookie=0xd dl_src=60:66:66:66:00:0b actions=pop_mpls:0x0800,mod_nw_src:10.0.0.1,controller
1514 cookie=0xd dl_src=60:66:66:66:01:00 actions=pop_mpls:0x8848,controller
1515 cookie=0xd dl_src=60:66:66:66:01:01 actions=pop_mpls:0x8847,dec_mpls_ttl,controller
1516 cookie=0xd dl_src=60:66:66:66:01:02 actions=pop_mpls:0x8848,load:3->OXM_OF_MPLS_TC[[]],controller
1518 cookie=0xd dl_src=60:66:66:66:02:00 actions=pop_mpls:0x8847,pop_mpls:0x0800,controller
1519 cookie=0xd dl_src=60:66:66:66:02:01 actions=pop_mpls:0x8848,pop_mpls:0x0800,dec_ttl,controller
1520 cookie=0xd dl_src=60:66:66:66:02:10 actions=pop_mpls:0x8847,dec_mpls_ttl,pop_mpls:0x0800,dec_ttl,controller
1522 cookie=0xd dl_src=60:66:66:66:03:00 actions=pop_mpls:0x8848,pop_mpls:0x8848,controller
1523 cookie=0xd dl_src=60:66:66:66:03:01 actions=pop_mpls:0x8847,pop_mpls:0x8847,dec_mpls_ttl,controller
1524 cookie=0xd dl_src=60:66:66:66:03:10 actions=pop_mpls:0x8848,dec_mpls_ttl,pop_mpls:0x8848,dec_mpls_ttl,controller
1526 cookie=0xd dl_src=60:66:66:66:04:00 actions=pop_mpls:0x0800,push_mpls:0x8847,controller
1527 cookie=0xd dl_src=60:66:66:66:04:01 actions=pop_mpls:0x0800,push_mpls:0x8848,dec_mpls_ttl,controller
1528 cookie=0xd dl_src=60:66:66:66:04:10 actions=pop_mpls:0x0800,dec_ttl,push_mpls:0x8848,dec_mpls_ttl,controller
1530 cookie=0xd dl_src=60:66:66:66:05:00 actions=push_mpls:0x8848,pop_mpls:0x8847,controller
1531 cookie=0xd dl_src=60:66:66:66:05:01 actions=push_mpls:0x8847,pop_mpls:0x8848,dec_mpls_ttl,controller
1532 cookie=0xd dl_src=60:66:66:66:05:10 actions=push_mpls:0x8848,dec_mpls_ttl,pop_mpls:0x8847,dec_mpls_ttl,controller
1534 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
1536 dnl Modified MPLS controller action.
1537 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1540 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=40:44:44:44:44:42,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=17,tos=0,ttl=64,frag=no),udp(src=7777,dst=80)'
1542 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1543 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1545 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1546 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1547 mpls,in_port=0,vlan_tci=0x0000,dl_src=40:44:44:44:44:42,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=64,mpls_bos=1
1549 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1550 mpls,in_port=0,vlan_tci=0x0000,dl_src=40:44:44:44:44:42,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=64,mpls_bos=1
1552 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1553 mpls,in_port=0,vlan_tci=0x0000,dl_src=40:44:44:44:44:42,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=64,mpls_bos=1
1556 dnl Modified MPLS controller action.
1557 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1560 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=41:44:44:44:44:42,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=16,tos=0,ttl=64,frag=no)'
1562 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1563 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1565 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1566 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1567 ip,in_port=0,vlan_tci=0x0000,dl_src=41:44:44:44:44:42,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_proto=16,nw_tos=0,nw_ecn=0,nw_ttl=64
1569 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1570 ip,in_port=0,vlan_tci=0x0000,dl_src=41:44:44:44:44:42,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_proto=16,nw_tos=0,nw_ecn=0,nw_ttl=64
1572 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1573 ip,in_port=0,vlan_tci=0x0000,dl_src=41:44:44:44:44:42,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_proto=16,nw_tos=0,nw_ecn=0,nw_ttl=64
1576 dnl Modified MPLS controller action.
1577 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1579 dnl in_port(1),eth(src=00:01:02:03:04:05,dst=10:11:12:13:14:15),eth_type(0x8847),mpls(label=100,tc=3,ttl=64,bos=1)
1582 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=40:44:44:44:44:43,dst=50:54:00:00:00:07),eth_type(0x8847),mpls(label=11,tc=3,ttl=64,bos=1)'
1584 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1585 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1587 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1588 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1589 mpls,in_port=0,vlan_tci=0x0000,dl_src=40:44:44:44:44:43,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=64,mpls_bos=0,mpls_lse1=46912
1591 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1592 mpls,in_port=0,vlan_tci=0x0000,dl_src=40:44:44:44:44:43,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=64,mpls_bos=0,mpls_lse1=46912
1594 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1595 mpls,in_port=0,vlan_tci=0x0000,dl_src=40:44:44:44:44:43,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=64,mpls_bos=0,mpls_lse1=46912
1598 dnl Modified MPLS controller action.
1599 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1602 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=40:44:44:44:44:44,dst=50:54:00:00:00:07),eth_type(0x8100),vlan(vid=99,pcp=7),encap(eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=16,tos=0,ttl=64,frag=no))'
1604 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1605 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1607 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1608 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1609 mpls,in_port=0,dl_vlan=99,dl_vlan_pcp=7,dl_src=40:44:44:44:44:44,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=64,mpls_bos=1
1611 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1612 mpls,in_port=0,dl_vlan=99,dl_vlan_pcp=7,dl_src=40:44:44:44:44:44,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=64,mpls_bos=1
1614 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1615 mpls,in_port=0,dl_vlan=99,dl_vlan_pcp=7,dl_src=40:44:44:44:44:44,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=64,mpls_bos=1
1618 dnl Modified MPLS controller action.
1619 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1622 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=40:44:44:44:44:45,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=16,tos=0,ttl=64,frag=no)'
1624 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1625 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1627 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1628 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1629 mpls,in_port=0,vlan_tci=0x0000,dl_src=40:44:44:44:44:45,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=63,mpls_bos=1
1631 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1632 mpls,in_port=0,vlan_tci=0x0000,dl_src=40:44:44:44:44:45,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=63,mpls_bos=1
1634 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1635 mpls,in_port=0,vlan_tci=0x0000,dl_src=40:44:44:44:44:45,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=63,mpls_bos=1
1638 dnl Modified MPLS controller action.
1639 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1642 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=40:44:44:44:44:46,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=16,tos=0,ttl=64,frag=no)'
1644 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1645 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1647 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1648 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1649 mpls,in_port=0,vlan_tci=0x0000,dl_src=40:44:44:44:44:46,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=10,mpls_bos=1
1651 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1652 mpls,in_port=0,vlan_tci=0x0000,dl_src=40:44:44:44:44:46,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=10,mpls_bos=1
1654 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1655 mpls,in_port=0,vlan_tci=0x0000,dl_src=40:44:44:44:44:46,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=10,mpls_bos=1
1658 dnl Modified MPLS controller action.
1659 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1662 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=40:44:44:44:44:47,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=16,tos=0,ttl=64,frag=no)'
1664 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1665 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1667 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1668 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1669 mpls,in_port=0,vlan_tci=0x0000,dl_src=40:44:44:44:44:47,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=10,mpls_bos=1
1671 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1672 mpls,in_port=0,vlan_tci=0x0000,dl_src=40:44:44:44:44:47,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=10,mpls_bos=1
1674 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1675 mpls,in_port=0,vlan_tci=0x0000,dl_src=40:44:44:44:44:47,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=10,mpls_bos=1
1678 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1680 dnl Modified MPLS controller action.
1681 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1684 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=40:44:44:44:44:49,dst=50:54:00:00:00:07),eth_type(0x8847),mpls(label=10,tc=3,ttl=64,bos=1)'
1686 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1687 ovs-appctl -t ovs-ofctl exit
1689 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1690 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1691 mplsm,in_port=0,vlan_tci=0x0000,dl_src=40:44:44:44:44:49,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=64,mpls_bos=0,mpls_lse1=42816
1693 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1694 mplsm,in_port=0,vlan_tci=0x0000,dl_src=40:44:44:44:44:49,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=64,mpls_bos=0,mpls_lse1=42816
1696 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1697 mplsm,in_port=0,vlan_tci=0x0000,dl_src=40:44:44:44:44:49,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=64,mpls_bos=0,mpls_lse1=42816
1700 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1702 dnl Modified MPLS controller action.
1703 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1706 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=40:44:44:44:44:48,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=16,tos=0,ttl=64,frag=no)'
1708 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1709 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1711 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1712 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1713 mpls,in_port=0,vlan_tci=0x0000,dl_src=40:44:44:44:44:48,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=9,mpls_bos=1
1715 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1716 mpls,in_port=0,vlan_tci=0x0000,dl_src=40:44:44:44:44:48,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=9,mpls_bos=1
1718 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1719 mpls,in_port=0,vlan_tci=0x0000,dl_src=40:44:44:44:44:48,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=9,mpls_bos=1
1722 dnl Modified MPLS actions.
1723 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1726 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:55:55:55:55:55,dst=50:54:00:00:00:07),eth_type(0x8847),mpls(label=100,tc=7,ttl=64,bos=1)'
1728 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1729 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1731 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1732 NXT_PACKET_IN (xid=0x0): cookie=0xb total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1733 mpls,in_port=0,vlan_tci=0x0000,dl_src=50:55:55:55:55:55,dl_dst=50:54:00:00:00:07,mpls_label=1000,mpls_tc=7,mpls_ttl=64,mpls_bos=1
1735 NXT_PACKET_IN (xid=0x0): cookie=0xb total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1736 mpls,in_port=0,vlan_tci=0x0000,dl_src=50:55:55:55:55:55,dl_dst=50:54:00:00:00:07,mpls_label=1000,mpls_tc=7,mpls_ttl=64,mpls_bos=1
1738 NXT_PACKET_IN (xid=0x0): cookie=0xb total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1739 mpls,in_port=0,vlan_tci=0x0000,dl_src=50:55:55:55:55:55,dl_dst=50:54:00:00:00:07,mpls_label=1000,mpls_tc=7,mpls_ttl=64,mpls_bos=1
1742 dnl Modified MPLS ipv6 controller action.
1743 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1746 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=70:77:77:77:77:77,dst=50:54:00:00:00:07),eth_type(0x86dd),ipv6(src=::1,dst=::2,label=0,proto=10,tclass=0x70,hlimit=128,frag=no)'
1748 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1749 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1751 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1752 NXT_PACKET_IN (xid=0x0): cookie=0xc total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1753 mplsm,in_port=0,vlan_tci=0x0000,dl_src=70:77:77:77:77:77,dl_dst=50:54:00:00:00:07,mpls_label=1000,mpls_tc=7,mpls_ttl=128,mpls_bos=1
1755 NXT_PACKET_IN (xid=0x0): cookie=0xc total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1756 mplsm,in_port=0,vlan_tci=0x0000,dl_src=70:77:77:77:77:77,dl_dst=50:54:00:00:00:07,mpls_label=1000,mpls_tc=7,mpls_ttl=128,mpls_bos=1
1758 NXT_PACKET_IN (xid=0x0): cookie=0xc total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1759 mplsm,in_port=0,vlan_tci=0x0000,dl_src=70:77:77:77:77:77,dl_dst=50:54:00:00:00:07,mpls_label=1000,mpls_tc=7,mpls_ttl=128,mpls_bos=1
1763 dnl Modified MPLS pop action.
1764 dnl The input is a frame with two MPLS headers which tcpdump -vve shows as:
1765 dnl 60:66:66:66:66:66 > 50:54:00:00:00:07, ethertype MPLS multicast (0x8847), length 66: MPLS (label 20, exp 0, ttl 32)
1766 dnl (tos 0x0, ttl 64, id 0, offset 0, flags [none], proto TCP (6), length 44)
1768 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1771 ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 60 66 66 66 66 66 88 47 00 01 41 20 45 00 00 2c 00 00 00 00 40 06 3b 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45'
1774 # ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=60:66:66:66:66:66,dst=50:54:00:00:00:07),eth_type(0x8847),mpls(label=10,tc=3,ttl=100,bos=1)'
1776 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1777 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1779 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1780 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1781 tcp,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:66:66,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744
1783 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1784 tcp,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:66:66,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744
1786 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1787 tcp,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:66:66,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744
1790 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1792 dnl Modified MPLS pop action.
1793 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
1794 dnl 60:66:66:66:00:01 > 50:54:00:00:00:07, ethertype MPLS multicast (0x8848), length 62: MPLS (label 20, exp 0, [S], ttl 32)
1795 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
1796 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
1797 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1800 ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 60 66 66 66 00 01 88 48 00 01 41 20 45 00 00 2c 00 00 00 00 ff 06 3a 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45'
1802 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1803 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1805 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
1806 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1807 tcp,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:00:01,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=254,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744
1809 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1810 tcp,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:00:01,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=254,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744
1812 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1813 tcp,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:00:01,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=254,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744
1816 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1818 dnl Modified MPLS pop action.
1819 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
1820 dnl 60:66:66:66:00:02 > 50:54:00:00:00:07, ethertype MPLS unicast (0x8847), length 62: MPLS (label 20, exp 0, [S], ttl 32)
1821 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
1822 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
1823 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1826 ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 60 66 66 66 00 02 88 47 00 01 41 20 45 00 00 2c 00 00 00 00 ff 06 3a 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45'
1828 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1829 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1831 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
1832 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1833 tcp,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:00:02,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=10.0.0.1,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:2dee
1835 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1836 tcp,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:00:02,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=10.0.0.1,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:2dee
1838 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1839 tcp,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:00:02,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=10.0.0.1,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:2dee
1842 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1844 dnl Modified MPLS pop action.
1845 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
1846 dnl 60:66:66:66:00:03 > 50:54:00:00:00:07, ethertype MPLS multicast (0x8848), length 62: MPLS (label 20, exp 0, [S], ttl 32)
1847 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
1848 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
1849 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1852 ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 60 66 66 66 00 03 88 48 00 01 41 20 45 00 00 2c 00 00 00 00 ff 06 3a 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45'
1854 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1855 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1857 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
1858 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1859 tcp,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:00:03,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.2,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7743
1861 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1862 tcp,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:00:03,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.2,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7743
1864 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1865 tcp,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:00:03,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.2,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7743
1868 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1870 dnl Modified MPLS pop action.
1871 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
1872 dnl 60:66:66:66:00:04 > 50:54:00:00:00:07, ethertype MPLS unicast (0x8847), length 62: MPLS (label 20, exp 0, [S], ttl 32)
1873 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
1874 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
1875 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1878 ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 60 66 66 66 00 04 88 47 00 01 41 20 45 00 00 2c 00 00 00 00 ff 06 3a 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45'
1880 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1881 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1883 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
1884 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1885 tcp,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:00:04,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.2,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7743
1887 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1888 tcp,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:00:04,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.2,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7743
1890 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1891 tcp,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:00:04,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.2,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7743
1894 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1896 dnl Modified MPLS pop action.
1897 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
1898 dnl 60:66:66:66:00:05 > 50:54:00:00:00:07, ethertype MPLS unicast (0x8847), length 62: MPLS (label 20, exp 0, [S], ttl 32)
1899 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
1900 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
1901 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1904 ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 60 66 66 66 00 05 88 48 00 01 41 20 45 00 00 2c 00 00 00 00 ff 06 3a 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45'
1906 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1907 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1909 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
1910 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1911 tcp,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:00:05,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.106,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:76db
1913 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1914 tcp,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:00:05,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.106,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:76db
1916 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1917 tcp,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:00:05,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.106,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:76db
1920 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1922 dnl Modified MPLS pop action.
1923 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
1924 dnl 60:66:66:66:00:06 > 50:54:00:00:00:07, ethertype MPLS multicast (0x8848), length 62: MPLS (label 20, exp 0, [S], ttl 32)
1925 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
1926 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
1927 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1930 ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 60 66 66 66 00 06 88 47 00 01 41 20 45 00 00 2c 00 00 00 00 ff 06 3a 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45'
1932 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1933 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1935 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
1936 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1937 tcp,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:00:06,dl_dst=50:54:00:00:00:07,nw_src=192.168.255.255,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7745
1939 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1940 tcp,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:00:06,dl_dst=50:54:00:00:00:07,nw_src=192.168.255.255,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7745
1942 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1943 tcp,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:00:06,dl_dst=50:54:00:00:00:07,nw_src=192.168.255.255,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7745
1946 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1948 dnl Modified MPLS pop action.
1949 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
1950 dnl 60:66:66:66:00:07 > 50:54:00:00:00:07, ethertype MPLS multicast (0x8848), length 62: MPLS (label 20, exp 0, [S], ttl 32)
1951 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
1952 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
1953 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1956 ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 60 66 66 66 00 07 88 48 00 01 41 20 45 00 00 2c 00 00 00 00 ff 06 3a 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45'
1958 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1959 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1961 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
1962 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1963 tcp,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:00:07,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744
1965 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1966 tcp,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:00:07,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744
1968 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1969 tcp,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:00:07,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744
1972 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1974 dnl Modified MPLS pop action.
1975 dnl The input is an ARP frame with a single MPLS label stack entry which tcpdump -vve shows as:
1976 dnl 60:66:66:66:00:08 > ff:ff:ff:ff:ff:ff, ethertype MPLS unicast (0x8847), length 46: MPLS (label 20, exp 0, [S], ttl 32)
1977 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1980 ovs-appctl netdev-dummy/receive p1 'ff ff ff ff ff ff 60 66 66 66 00 08 88 47 00 01 41 20 00 01 08 00 06 04 00 02 60 66 66 66 00 08 c0 a8 00 01 ff ff ff ff ff ff ff ff ff ff'
1982 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1983 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1985 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
1986 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0xd total_len=56 in_port=1 (via action) data_len=56 (unbuffered)
1987 arp,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:00:08,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=192.168.0.1,arp_tpa=255.255.255.255,arp_op=2,arp_sha=60:66:66:66:00:08,arp_tha=ff:ff:ff:ff:ff:ff
1989 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0xd total_len=56 in_port=1 (via action) data_len=56 (unbuffered)
1990 arp,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:00:08,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=192.168.0.1,arp_tpa=255.255.255.255,arp_op=2,arp_sha=60:66:66:66:00:08,arp_tha=ff:ff:ff:ff:ff:ff
1992 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0xd total_len=56 in_port=1 (via action) data_len=56 (unbuffered)
1993 arp,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:00:08,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=192.168.0.1,arp_tpa=255.255.255.255,arp_op=2,arp_sha=60:66:66:66:00:08,arp_tha=ff:ff:ff:ff:ff:ff
1996 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1998 dnl Modified MPLS pop action.
1999 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
2000 dnl 60:66:66:66:00:09 > 50:54:00:00:00:07, ethertype MPLS multicast (0x8848), length 62: MPLS (label 20, exp 0, [S], ttl 32)
2001 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
2002 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
2003 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2006 ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 60 66 66 66 00 09 88 48 00 01 41 20 45 00 00 2c 00 00 00 00 ff 06 3a 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45'
2008 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2009 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2011 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
2012 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2013 tcp,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:00:09,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=48,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744
2015 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2016 tcp,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:00:09,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=48,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744
2018 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2019 tcp,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:00:09,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=48,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744
2022 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2024 dnl Modified MPLS pop action.
2025 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
2026 dnl 60:66:66:66:00:0a > 50:54:00:00:00:07, ethertype MPLS multicast (0x8848), length 62: MPLS (label 20, exp 0, [S], ttl 32)
2027 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
2028 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
2029 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2032 ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 60 66 66 66 00 0a 88 48 00 01 41 20 45 00 00 2c 00 00 00 00 ff 06 3a 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45'
2034 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2035 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2037 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
2038 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2039 tcp,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:00:0a,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=10.0.0.1,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:2dee
2041 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2042 tcp,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:00:0a,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=10.0.0.1,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:2dee
2044 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2045 tcp,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:00:0a,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=10.0.0.1,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:2dee
2048 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2050 dnl Modified MPLS pop action.
2051 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
2052 dnl 60:66:66:66:00:0b > 50:54:00:00:00:07, ethertype MPLS multicast (0x8848), length 62: MPLS (label 20, exp 0, [S], ttl 32)
2053 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
2054 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
2055 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2058 ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 60 66 66 66 00 0b 88 48 00 01 41 20 45 00 00 2c 00 00 00 00 ff 06 3a 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45'
2060 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2061 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2063 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
2064 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2065 tcp,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:00:0b,dl_dst=50:54:00:00:00:07,nw_src=10.0.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:2ded
2067 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2068 tcp,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:00:0b,dl_dst=50:54:00:00:00:07,nw_src=10.0.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:2ded
2070 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2071 tcp,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:00:0b,dl_dst=50:54:00:00:00:07,nw_src=10.0.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:2ded
2074 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2076 dnl Modified MPLS pop action.
2077 dnl The input is a frame with two MPLS label stack entries which tcpdump -vve shows as:
2078 dnl 60:66:66:66:01:00 > 50:54:00:00:00:07, ethertype MPLS multicast (0x8848), length 66: MPLS (label 20, exp 0, ttl 32)
2079 dnl (label 20, exp 0, [S], ttl 31)
2080 dnl (tos 0x0, ttl 254, id 0, offset 0, flags [none], proto TCP (6), length 44)
2081 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
2082 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2085 ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 60 66 66 66 01 00 88 48 00 01 40 20 00 01 41 1f 45 00 00 2c 00 00 00 00 ff 06 3b 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45'
2087 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2088 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2090 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2091 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2092 mplsm,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:01:00,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=0,mpls_ttl=31,mpls_bos=1
2094 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2095 mplsm,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:01:00,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=0,mpls_ttl=31,mpls_bos=1
2097 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2098 mplsm,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:01:00,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=0,mpls_ttl=31,mpls_bos=1
2101 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2103 dnl Modified MPLS pop action.
2104 dnl The input is a frame with two MPLS label stack entries which tcpdump -vve shows as:
2105 dnl 60:66:66:66:01:01 > 50:54:00:00:00:07, ethertype MPLS unicast (0x8847), length 66: MPLS (label 20, exp 0, ttl 32)
2106 dnl (label 20, exp 0, [S], ttl 31)
2107 dnl (tos 0x0, ttl 254, id 0, offset 0, flags [none], proto TCP (6), length 44)
2108 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
2109 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2112 ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 60 66 66 66 01 01 88 47 00 01 40 20 00 01 41 1f 45 00 00 2c 00 00 00 00 ff 06 3b 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45'
2114 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2115 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2117 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2118 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2119 mpls,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:01:01,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=0,mpls_ttl=30,mpls_bos=1
2121 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2122 mpls,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:01:01,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=0,mpls_ttl=30,mpls_bos=1
2124 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2125 mpls,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:01:01,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=0,mpls_ttl=30,mpls_bos=1
2128 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2130 dnl Modified MPLS pop action.
2131 dnl The input is a frame with two MPLS label stack entries which tcpdump -vve shows as:
2132 dnl 60:66:66:66:01:02 > 50:54:00:00:00:07, ethertype MPLS multicast (0x8848), length 66: MPLS (label 20, exp 0, ttl 32)
2133 dnl (label 20, exp 0, [S], ttl 31)
2134 dnl (tos 0x0, ttl 254, id 0, offset 0, flags [none], proto TCP (6), length 44)
2135 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
2136 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2139 ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 60 66 66 66 01 02 88 48 00 01 40 20 00 01 41 1f 45 00 00 2c 00 00 00 00 ff 06 3b 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45'
2141 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2142 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2144 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2145 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2146 mplsm,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:01:02,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=3,mpls_ttl=31,mpls_bos=1
2148 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2149 mplsm,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:01:02,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=3,mpls_ttl=31,mpls_bos=1
2151 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2152 mplsm,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:01:02,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=3,mpls_ttl=31,mpls_bos=1
2155 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2157 dnl Modified MPLS pop action.
2158 dnl The input is a frame with two MPLS label stack entries which tcpdump -vve shows as:
2159 dnl 60:66:66:66:02:00 > 50:54:00:00:02:00, ethertype MPLS unicast (0x8847), length 66: MPLS (label 20, exp 0, ttl 32)
2160 dnl (label 20, exp 0, [S], ttl 31)
2161 dnl (tos 0x0, ttl 254, id 0, offset 0, flags [none], proto TCP (6), length 44)
2162 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
2163 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2166 ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 60 66 66 66 02 00 88 47 00 01 40 20 00 01 41 1f 45 00 00 2c 00 00 00 00 ff 06 3b 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45'
2168 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2169 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2171 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2172 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2173 tcp,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:02:00,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744
2175 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2176 tcp,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:02:00,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744
2178 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2179 tcp,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:02:00,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744
2182 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2184 dnl Modified MPLS pop action.
2185 dnl The input is a frame with two MPLS label stack entries which tcpdump -vve shows as:
2186 dnl 60:66:66:66:02:01 > 50:54:00:00:02:01, ethertype MPLS multicast (0x8848), length 66: MPLS (label 20, exp 0, ttl 32)
2187 dnl (label 20, exp 0, [S], ttl 31)
2188 dnl (tos 0x0, ttl 254, id 0, offset 0, flags [none], proto TCP (6), length 44)
2189 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
2190 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2193 ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 60 66 66 66 02 01 88 48 00 01 40 20 00 01 41 1f 45 00 00 2c 00 00 00 00 ff 06 3b 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45'
2195 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2196 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2198 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
2199 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2200 tcp,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:02:01,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=254,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744
2202 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2203 tcp,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:02:01,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=254,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744
2205 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2206 tcp,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:02:01,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=254,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744
2209 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2211 dnl Modified MPLS pop action.
2212 dnl The input is a frame with two MPLS label stack entries which tcpdump -vve shows as:
2213 dnl 60:66:66:66:02:10 > 50:54:00:00:02:10, ethertype MPLS unicast (0x8847), length 66: MPLS (label 20, exp 0, ttl 32)
2214 dnl (label 20, exp 0, [S], ttl 31)
2215 dnl (tos 0x0, ttl 254, id 0, offset 0, flags [none], proto TCP (6), length 44)
2216 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
2217 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2220 ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 60 66 66 66 02 10 88 47 00 01 40 20 00 01 41 1f 45 00 00 2c 00 00 00 00 ff 06 3b 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45'
2222 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2223 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2225 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
2226 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2227 tcp,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:02:10,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=254,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744
2229 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2230 tcp,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:02:10,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=254,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744
2232 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2233 tcp,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:02:10,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=254,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744
2236 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2238 dnl Modified MPLS pop action.
2239 dnl The input is a frame with three MPLS label stack entries which tcpdump -vve shows as:
2240 dnl 60:66:66:66:03:00 > 50:54:00:00:00:00, ethertype MPLS unicast (0x8847), length 66: MPLS (label 20, exp 0, ttl 32)
2241 dnl (label 20, exp 0, ttl 31)
2242 dnl (label 20, exp 0, [S], ttl 30)
2243 dnl (tos 0x0, ttl 254, id 0, offset 0, flags [none], proto TCP (6), length 44)
2244 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
2245 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2248 ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 60 66 66 66 03 00 88 47 00 01 40 20 00 01 40 1f 00 01 41 1e 45 00 00 2c 00 00 00 00 ff 06 3b 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45'
2250 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2251 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2253 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2254 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2255 mplsm,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:03:00,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=0,mpls_ttl=30,mpls_bos=1
2257 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2258 mplsm,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:03:00,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=0,mpls_ttl=30,mpls_bos=1
2260 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2261 mplsm,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:03:00,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=0,mpls_ttl=30,mpls_bos=1
2264 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2266 dnl Modified MPLS pop action.
2267 dnl The input is a frame with three MPLS label stack entries which tcpdump -vve shows as:
2268 dnl 60:66:66:66:03:01 > 50:54:00:00:00:00, ethertype MPLS multicast (0x8848), length 66: MPLS (label 20, exp 0, ttl 32)
2269 dnl (label 20, exp 0, ttl 31)
2270 dnl (label 20, exp 0, [S], ttl 30)
2271 dnl (tos 0x0, ttl 254, id 0, offset 0, flags [none], proto TCP (6), length 44)
2272 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
2273 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2276 ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 60 66 66 66 03 01 88 48 00 01 40 20 00 01 40 1f 00 01 41 1e 45 00 00 2c 00 00 00 00 ff 06 3b 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45'
2278 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2279 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2281 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2282 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2283 mpls,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:03:01,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=0,mpls_ttl=29,mpls_bos=1
2285 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2286 mpls,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:03:01,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=0,mpls_ttl=29,mpls_bos=1
2288 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2289 mpls,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:03:01,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=0,mpls_ttl=29,mpls_bos=1
2292 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2294 dnl Modified MPLS pop action.
2295 dnl The input is a frame with three MPLS label stack entries which tcpdump -vve shows as:
2296 dnl 60:66:66:66:03:10 > 50:54:00:00:00:00, ethertype MPLS unicast (0x8847), length 66: MPLS (label 20, exp 0, ttl 32)
2297 dnl (label 20, exp 0, ttl 31)
2298 dnl (label 20, exp 0, [S], ttl 30)
2299 dnl (tos 0x0, ttl 254, id 0, offset 0, flags [none], proto TCP (6), length 44)
2300 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
2301 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2304 ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 60 66 66 66 03 10 88 47 00 01 40 20 00 01 40 1f 00 01 41 1e 45 00 00 2c 00 00 00 00 ff 06 3b 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45'
2306 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2307 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2309 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2310 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2311 mplsm,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:03:10,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=0,mpls_ttl=29,mpls_bos=1
2313 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2314 mplsm,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:03:10,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=0,mpls_ttl=29,mpls_bos=1
2316 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2317 mplsm,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:03:10,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=0,mpls_ttl=29,mpls_bos=1
2320 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2322 dnl Modified MPLS pop action.
2323 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
2324 dnl 60:66:66:66:04:00 > 50:54:00:00:00:07, ethertype MPLS multicast (0x8848), length 62: MPLS (label 20, exp 0, [S], ttl 32)
2325 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
2326 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
2327 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2330 ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 60 66 66 66 04 00 88 48 00 01 41 20 45 00 00 2c 00 00 00 00 ff 06 3a 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45'
2332 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2333 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2335 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
2336 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2337 mpls,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:04:00,dl_dst=50:54:00:00:00:07,mpls_label=0,mpls_tc=0,mpls_ttl=255,mpls_bos=1
2339 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2340 mpls,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:04:00,dl_dst=50:54:00:00:00:07,mpls_label=0,mpls_tc=0,mpls_ttl=255,mpls_bos=1
2342 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2343 mpls,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:04:00,dl_dst=50:54:00:00:00:07,mpls_label=0,mpls_tc=0,mpls_ttl=255,mpls_bos=1
2346 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2348 dnl Modified MPLS pop action.
2349 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
2350 dnl 60:66:66:66:04:01 > 50:54:00:00:00:07, ethertype MPLS unicast (0x8847), length 62: MPLS (label 20, exp 0, [S], ttl 32)
2351 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
2352 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
2353 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2356 ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 60 66 66 66 04 01 88 47 00 01 41 20 45 00 00 2c 00 00 00 00 ff 06 3a 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45'
2358 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2359 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2361 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
2362 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2363 mplsm,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:04:01,dl_dst=50:54:00:00:00:07,mpls_label=0,mpls_tc=0,mpls_ttl=254,mpls_bos=1
2365 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2366 mplsm,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:04:01,dl_dst=50:54:00:00:00:07,mpls_label=0,mpls_tc=0,mpls_ttl=254,mpls_bos=1
2368 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2369 mplsm,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:04:01,dl_dst=50:54:00:00:00:07,mpls_label=0,mpls_tc=0,mpls_ttl=254,mpls_bos=1
2372 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2374 dnl Modified MPLS pop action.
2375 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
2376 dnl 60:66:66:66:04:10 > 50:54:00:00:00:07, ethertype MPLS multicast (0x8848), length 62: MPLS (label 20, exp 0, [S], ttl 32)
2377 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
2378 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
2379 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2382 ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 60 66 66 66 04 10 88 48 00 01 41 20 45 00 00 2c 00 00 00 00 ff 06 3a 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45'
2384 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2385 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2387 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
2388 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2389 mplsm,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:04:10,dl_dst=50:54:00:00:00:07,mpls_label=0,mpls_tc=0,mpls_ttl=253,mpls_bos=1
2391 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2392 mplsm,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:04:10,dl_dst=50:54:00:00:00:07,mpls_label=0,mpls_tc=0,mpls_ttl=253,mpls_bos=1
2394 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2395 mplsm,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:04:10,dl_dst=50:54:00:00:00:07,mpls_label=0,mpls_tc=0,mpls_ttl=253,mpls_bos=1
2398 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2400 dnl Modified MPLS pop action.
2401 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
2402 dnl 60:66:66:66:05:00 > 50:54:00:00:00:07, ethertype MPLS unicast (0x8847), length 62: MPLS (label 20, exp 0, [S], ttl 32)
2403 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
2404 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
2405 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2408 ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 60 66 66 66 05 00 88 47 00 01 41 20 45 00 00 2c 00 00 00 00 ff 06 3a 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45'
2410 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2411 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2413 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2414 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2415 mpls,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:05:00,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=0,mpls_ttl=32,mpls_bos=1
2417 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2418 mpls,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:05:00,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=0,mpls_ttl=32,mpls_bos=1
2420 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2421 mpls,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:05:00,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=0,mpls_ttl=32,mpls_bos=1
2424 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2426 dnl Modified MPLS pop action.
2427 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
2428 dnl 60:66:66:66:05:01 > 50:54:00:00:00:07, ethertype MPLS multicast (0x8848), length 62: MPLS (label 20, exp 0, [S], ttl 32)
2429 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
2430 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
2431 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2434 ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 60 66 66 66 05 01 88 48 00 01 41 20 45 00 00 2c 00 00 00 00 ff 06 3a 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45'
2436 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2437 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2439 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2440 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2441 mplsm,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:05:01,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=0,mpls_ttl=31,mpls_bos=1
2443 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2444 mplsm,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:05:01,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=0,mpls_ttl=31,mpls_bos=1
2446 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2447 mplsm,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:05:01,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=0,mpls_ttl=31,mpls_bos=1
2450 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2452 dnl Modified MPLS pop action.
2453 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
2454 dnl 60:66:66:66:05:10 > 50:54:00:00:00:07, ethertype MPLS unicast (0x8847), length 62: MPLS (label 20, exp 0, [S], ttl 32)
2455 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
2456 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
2457 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2460 ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 60 66 66 66 05 10 88 47 00 01 41 20 45 00 00 2c 00 00 00 00 ff 06 3a 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45'
2462 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2463 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2465 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2466 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2467 mpls,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:05:10,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=0,mpls_ttl=31,mpls_bos=1
2469 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2470 mpls,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:05:10,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=0,mpls_ttl=31,mpls_bos=1
2472 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2473 mpls,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:05:10,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=0,mpls_ttl=31,mpls_bos=1
2476 AT_CHECK([ovs-appctl revalidator/purge], [0])
2477 AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
2478 cookie=0xa, n_packets=3, n_bytes=180, dl_src=40:44:44:44:44:42 actions=push_mpls:0x8847,load:0xa->OXM_OF_MPLS_LABEL[[]],load:0x3->OXM_OF_MPLS_TC[[]],CONTROLLER:65535
2479 cookie=0xa, n_packets=3, n_bytes=180, dl_src=40:44:44:44:44:43 actions=push_mpls:0x8847,load:0xa->OXM_OF_MPLS_LABEL[[]],load:0x3->OXM_OF_MPLS_TC[[]],CONTROLLER:65535
2480 cookie=0xa, n_packets=3, n_bytes=180, dl_src=40:44:44:44:44:44 actions=push_mpls:0x8847,load:0xa->OXM_OF_MPLS_LABEL[[]],load:0x3->OXM_OF_MPLS_TC[[]],CONTROLLER:65535
2481 cookie=0xa, n_packets=3, n_bytes=180, dl_src=40:44:44:44:44:45 actions=push_mpls:0x8847,load:0xa->OXM_OF_MPLS_LABEL[[]],load:0x3->OXM_OF_MPLS_TC[[]],dec_mpls_ttl,CONTROLLER:65535
2482 cookie=0xa, n_packets=3, n_bytes=180, dl_src=40:44:44:44:44:46 actions=push_mpls:0x8847,load:0xa->OXM_OF_MPLS_LABEL[[]],load:0x3->OXM_OF_MPLS_TC[[]],set_mpls_ttl(10),CONTROLLER:65535
2483 cookie=0xa, n_packets=3, n_bytes=180, dl_src=40:44:44:44:44:47 actions=push_mpls:0x8847,load:0xa->OXM_OF_MPLS_LABEL[[]],load:0x3->OXM_OF_MPLS_TC[[]],dec_mpls_ttl,set_mpls_ttl(10),CONTROLLER:65535
2484 cookie=0xa, n_packets=3, n_bytes=180, dl_src=40:44:44:44:44:48 actions=push_mpls:0x8847,load:0xa->OXM_OF_MPLS_LABEL[[]],load:0x3->OXM_OF_MPLS_TC[[]],set_mpls_ttl(10),dec_mpls_ttl,CONTROLLER:65535
2485 cookie=0xa, n_packets=3, n_bytes=180, dl_src=41:44:44:44:44:42 actions=push_mpls:0x8847,load:0xa->OXM_OF_MPLS_LABEL[[]],load:0x3->OXM_OF_MPLS_TC[[]],pop_mpls:0x0800,CONTROLLER:65535
2486 cookie=0xa, n_packets=3, n_bytes=180, mpls,dl_src=40:44:44:44:44:49 actions=push_mpls:0x8848,load:0xa->OXM_OF_MPLS_LABEL[[]],CONTROLLER:65535
2487 cookie=0xb, n_packets=3, n_bytes=180, mpls,dl_src=50:55:55:55:55:55 actions=load:0x3e8->OXM_OF_MPLS_LABEL[[]],CONTROLLER:65535
2488 cookie=0xc, n_packets=3, n_bytes=180, dl_src=70:77:77:77:77:77 actions=push_mpls:0x8848,load:0x3e8->OXM_OF_MPLS_LABEL[[]],load:0x7->OXM_OF_MPLS_TC[[]],CONTROLLER:65535
2489 cookie=0xd, n_packets=3, n_bytes=180, dl_src=60:66:66:66:00:08 actions=pop_mpls:0x0806,resubmit(1,1)
2490 cookie=0xd, n_packets=3, n_bytes=186, dl_src=60:66:66:66:00:01 actions=pop_mpls:0x0800,dec_ttl,CONTROLLER:65535
2491 cookie=0xd, n_packets=3, n_bytes=186, dl_src=60:66:66:66:00:02 actions=pop_mpls:0x0800,load:0xa000001->NXM_OF_IP_DST[[]],CONTROLLER:65535
2492 cookie=0xd, n_packets=3, n_bytes=186, dl_src=60:66:66:66:00:03 actions=pop_mpls:0x0800,move:NXM_OF_IP_DST[[]]->NXM_OF_IP_SRC[[]],CONTROLLER:65535
2493 cookie=0xd, n_packets=3, n_bytes=186, dl_src=60:66:66:66:00:04 actions=pop_mpls:0x0800,push:NXM_OF_IP_DST[[]],pop:NXM_OF_IP_SRC[[]],CONTROLLER:65535
2494 cookie=0xd, n_packets=3, n_bytes=186, dl_src=60:66:66:66:00:05 actions=pop_mpls:0x0800,multipath(eth_src,50,modulo_n,256,0,NXM_OF_IP_SRC[[0..7]]),CONTROLLER:65535
2495 cookie=0xd, n_packets=3, n_bytes=186, dl_src=60:66:66:66:00:06 actions=pop_mpls:0x0800,bundle_load(eth_src,50,hrw,ofport,NXM_OF_IP_SRC[[0..15]],slaves:1,2),CONTROLLER:65535
2496 cookie=0xd, n_packets=3, n_bytes=186, dl_src=60:66:66:66:00:07 actions=pop_mpls:0x0800,learn(table=1,hard_timeout=60,eth_type=0x800,nw_proto=6,NXM_OF_IP_SRC[[]]=NXM_OF_IP_DST[[]]),CONTROLLER:65535
2497 cookie=0xd, n_packets=3, n_bytes=186, dl_src=60:66:66:66:00:09 actions=pop_mpls:0x0800,mod_nw_tos:48,CONTROLLER:65535
2498 cookie=0xd, n_packets=3, n_bytes=186, dl_src=60:66:66:66:00:0a actions=pop_mpls:0x0800,mod_nw_dst:10.0.0.1,CONTROLLER:65535
2499 cookie=0xd, n_packets=3, n_bytes=186, dl_src=60:66:66:66:00:0b actions=pop_mpls:0x0800,mod_nw_src:10.0.0.1,CONTROLLER:65535
2500 cookie=0xd, n_packets=3, n_bytes=186, dl_src=60:66:66:66:04:00 actions=pop_mpls:0x0800,push_mpls:0x8847,CONTROLLER:65535
2501 cookie=0xd, n_packets=3, n_bytes=186, dl_src=60:66:66:66:04:01 actions=pop_mpls:0x0800,push_mpls:0x8848,dec_mpls_ttl,CONTROLLER:65535
2502 cookie=0xd, n_packets=3, n_bytes=186, dl_src=60:66:66:66:04:10 actions=pop_mpls:0x0800,dec_ttl,push_mpls:0x8848,dec_mpls_ttl,CONTROLLER:65535
2503 cookie=0xd, n_packets=3, n_bytes=186, dl_src=60:66:66:66:05:00 actions=push_mpls:0x8848,pop_mpls:0x8847,CONTROLLER:65535
2504 cookie=0xd, n_packets=3, n_bytes=186, dl_src=60:66:66:66:05:01 actions=push_mpls:0x8847,pop_mpls:0x8848,dec_mpls_ttl,CONTROLLER:65535
2505 cookie=0xd, n_packets=3, n_bytes=186, dl_src=60:66:66:66:05:10 actions=push_mpls:0x8848,dec_mpls_ttl,pop_mpls:0x8847,dec_mpls_ttl,CONTROLLER:65535
2506 cookie=0xd, n_packets=3, n_bytes=186, dl_src=60:66:66:66:66:66 actions=pop_mpls:0x0800,CONTROLLER:65535
2507 cookie=0xd, n_packets=3, n_bytes=198, dl_src=60:66:66:66:01:00 actions=pop_mpls:0x8848,CONTROLLER:65535
2508 cookie=0xd, n_packets=3, n_bytes=198, dl_src=60:66:66:66:01:01 actions=pop_mpls:0x8847,dec_mpls_ttl,CONTROLLER:65535
2509 cookie=0xd, n_packets=3, n_bytes=198, dl_src=60:66:66:66:01:02 actions=pop_mpls:0x8848,load:0x3->OXM_OF_MPLS_TC[[]],CONTROLLER:65535
2510 cookie=0xd, n_packets=3, n_bytes=198, dl_src=60:66:66:66:02:00 actions=pop_mpls:0x8847,pop_mpls:0x0800,CONTROLLER:65535
2511 cookie=0xd, n_packets=3, n_bytes=198, dl_src=60:66:66:66:02:01 actions=pop_mpls:0x8848,pop_mpls:0x0800,dec_ttl,CONTROLLER:65535
2512 cookie=0xd, n_packets=3, n_bytes=198, dl_src=60:66:66:66:02:10 actions=pop_mpls:0x8847,dec_mpls_ttl,pop_mpls:0x0800,dec_ttl,CONTROLLER:65535
2513 cookie=0xd, n_packets=3, n_bytes=210, dl_src=60:66:66:66:03:00 actions=pop_mpls:0x8848,pop_mpls:0x8848,CONTROLLER:65535
2514 cookie=0xd, n_packets=3, n_bytes=210, dl_src=60:66:66:66:03:01 actions=pop_mpls:0x8847,pop_mpls:0x8847,dec_mpls_ttl,CONTROLLER:65535
2515 cookie=0xd, n_packets=3, n_bytes=210, dl_src=60:66:66:66:03:10 actions=pop_mpls:0x8848,dec_mpls_ttl,pop_mpls:0x8848,dec_mpls_ttl,CONTROLLER:65535
2516 cookie=0xd, table=1, n_packets=3, n_bytes=168, arp actions=CONTROLLER:65535
2523 AT_SETUP([ofproto-dpif - MPLS handling with goto_table])
2524 OVS_VSWITCHD_START([dnl
2525 add-port br0 p1 -- set Interface p1 type=dummy
2527 ON_EXIT([kill `cat ovs-ofctl.pid`])
2529 AT_CAPTURE_FILE([ofctl_monitor.log])
2530 AT_DATA([flows.txt], [dnl
2531 table=0 mplsm actions=pop_mpls:0x800,goto_table(1)
2532 table=1 ip,ip_dscp=8 actions=controller
2534 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flows br0 flows.txt])
2537 dnl Modified MPLS pop action.
2538 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
2539 dnl 60:66:66:66:00:08 > 50:54:00:00:00:01, ethertype MPLS multicast (0x8848), length 62: MPLS (label 20, exp 0, [S], ttl 32)
2540 dnl (tos 0x20, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
2541 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
2542 AT_CHECK([ovs-ofctl -O OpenFlow12 monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2545 ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 01 60 66 66 66 00 08 88 48 00 01 41 20 45 20 00 2c 00 00 00 00 ff 06 3a 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45'
2547 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2548 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2550 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
2551 OFPT_PACKET_IN (OF1.2) (xid=0x0): table_id=1 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2552 tcp,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:00:08,dl_dst=50:54:00:00:00:01,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=32,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744
2554 OFPT_PACKET_IN (OF1.2) (xid=0x0): table_id=1 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2555 tcp,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:00:08,dl_dst=50:54:00:00:00:01,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=32,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744
2557 OFPT_PACKET_IN (OF1.2) (xid=0x0): table_id=1 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2558 tcp,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:00:08,dl_dst=50:54:00:00:00:01,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=32,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744
2561 AT_CHECK([ovs-appctl revalidator/purge], [0])
2562 AT_CHECK([ovs-ofctl -O OpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
2563 n_packets=3, n_bytes=186, mplsm actions=pop_mpls:0x0800,goto_table:1
2564 table=1, n_packets=3, n_bytes=174, ip,nw_tos=32 actions=CONTROLLER:65535
2565 OFPST_FLOW reply (OF1.2):
2571 AT_SETUP([ofproto-dpif - MPLS handling with write_actions])
2572 OVS_VSWITCHD_START([dnl
2573 add-port br0 p1 -- set Interface p1 type=dummy
2575 ON_EXIT([kill `cat ovs-ofctl.pid`])
2577 dnl N.B: The first (and only) action that accesses L3 data after the
2578 dnl pop_mpls action is present in write_actions. This exercises recirculation
2579 dnl triggered in write_actions due to a previous action not in write actions.
2580 AT_CAPTURE_FILE([ofctl_monitor.log])
2581 AT_DATA([flows.txt], [dnl
2582 mplsm actions=pop_mpls:0x800,write_actions(dec_ttl,controller)
2584 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flows br0 flows.txt])
2586 dnl Modified MPLS pop action.
2587 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
2588 dnl 60:66:66:66:00:08 > 50:54:00:00:00:01, ethertype MPLS multicast (0x8848), length 62: MPLS (label 20, exp 0, [S], ttl 32)
2589 dnl (tos 0x20, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
2590 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
2591 AT_CHECK([ovs-ofctl -O OpenFlow12 monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2594 ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 01 60 66 66 66 00 08 88 48 00 01 41 20 45 20 00 2c 00 00 00 00 ff 06 3a 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45'
2596 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2597 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2599 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
2600 OFPT_PACKET_IN (OF1.2) (xid=0x0): table_id=254 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2601 tcp,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:00:08,dl_dst=50:54:00:00:00:01,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=32,nw_ecn=0,nw_ttl=254,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744
2603 OFPT_PACKET_IN (OF1.2) (xid=0x0): table_id=254 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2604 tcp,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:00:08,dl_dst=50:54:00:00:00:01,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=32,nw_ecn=0,nw_ttl=254,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744
2606 OFPT_PACKET_IN (OF1.2) (xid=0x0): table_id=254 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2607 tcp,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:00:08,dl_dst=50:54:00:00:00:01,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=32,nw_ecn=0,nw_ttl=254,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744
2610 AT_CHECK([ovs-appctl revalidator/purge], [0])
2611 AT_CHECK([ovs-ofctl -O OpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
2612 n_packets=3, n_bytes=186, mplsm actions=pop_mpls:0x0800,write_actions(dec_ttl,CONTROLLER:65535)
2613 OFPST_FLOW reply (OF1.2):
2619 AT_SETUP([ofproto-dpif - table-miss flow (OpenFlow 1.0)])
2620 OVS_VSWITCHD_START([dnl
2621 add-port br0 p1 -- set Interface p1 type=dummy
2623 ON_EXIT([kill `cat ovs-ofctl.pid`])
2625 AT_CAPTURE_FILE([ofctl_monitor.log])
2626 # A table-miss flow has priority 0 and no match
2627 AT_CHECK([ovs-ofctl --protocols=OpenFlow10 add-flow br0 'priority=0 actions=output:CONTROLLER'])
2629 dnl Singleton controller action.
2630 AT_CHECK([ovs-ofctl monitor -P openflow10 --protocols=OpenFlow10 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
2633 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=10:11:11:11:11:11,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=10),tcp_flags(0x002)'
2635 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2636 ovs-appctl -t ovs-ofctl exit
2638 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2639 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
2640 tcp,in_port=0,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:0
2642 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
2643 tcp,in_port=0,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:0
2645 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
2646 tcp,in_port=0,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:0
2649 AT_CHECK([ovs-appctl revalidator/purge], [0])
2650 AT_CHECK([ovs-ofctl --protocols=OpenFlow10 dump-flows br0 | ofctl_strip | sort], [0], [dnl
2651 n_packets=3, n_bytes=180, priority=0 actions=CONTROLLER:65535
2659 AT_SETUP([ofproto-dpif - table-miss flow (OpenFlow 1.3)])
2660 OVS_VSWITCHD_START([dnl
2661 add-port br0 p1 -- set Interface p1 type=dummy
2663 ON_EXIT([kill `cat ovs-ofctl.pid`])
2665 AT_CAPTURE_FILE([ofctl_monitor.log])
2666 # A table-miss flow has priority 0 and no match
2667 AT_CHECK([ovs-ofctl --protocols=OpenFlow13 add-flow br0 'priority=0 actions=output:CONTROLLER'])
2669 dnl Singleton controller action.
2670 AT_CHECK([ovs-ofctl monitor -P openflow10 --protocols=OpenFlow13 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
2673 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=10:11:11:11:11:11,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=10),tcp_flags(0x002)'
2675 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2676 ovs-appctl -t ovs-ofctl exit
2678 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2680 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2681 OFPT_PACKET_IN (OF1.3) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
2682 tcp,in_port=0,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:0
2684 OFPT_PACKET_IN (OF1.3) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
2685 tcp,in_port=0,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:0
2687 OFPT_PACKET_IN (OF1.3) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
2688 tcp,in_port=0,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:0
2691 AT_CHECK([ovs-appctl revalidator/purge], [0])
2692 AT_CHECK([ovs-ofctl --protocols=OpenFlow13 dump-flows br0 | ofctl_strip | sort], [0], [dnl
2693 n_packets=3, n_bytes=180, priority=0 actions=CONTROLLER:65535
2694 OFPST_FLOW reply (OF1.3):
2700 AT_SETUP([ofproto-dpif - table-miss flow with async config (OpenFlow 1.3)])
2701 OVS_VSWITCHD_START([dnl
2702 add-port br0 p1 -- set Interface p1 type=dummy
2704 ON_EXIT([kill `cat ovs-ofctl.pid`])
2706 ovs-appctl time/stop
2708 AT_CAPTURE_FILE([ofctl_monitor.log])
2709 # A table-miss flow has priority 0 and no match
2710 AT_CHECK([ovs-ofctl --protocols=OpenFlow13 add-flow br0 'priority=0 actions=output:CONTROLLER'])
2712 dnl Singleton controller action.
2713 AT_CHECK([ovs-ofctl monitor -P openflow10 --protocols=OpenFlow13 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
2715 # Become slave (OF 1.3), which should disable everything except port status.
2716 ovs-appctl -t ovs-ofctl ofctl/send 041800180000000200000003000000000000000000000001
2718 # Ensure that ovs-vswitchd gets a chance to reply before sending another command.
2719 ovs-appctl time/warp 500 100
2721 # Use OF 1.3 OFPT_SET_ASYNC to enable OFPR_NO_MATCH for slave only.
2722 ovs-appctl -t ovs-ofctl ofctl/send 041c002000000002000000000000000100000000000000000000000000000000
2724 ovs-appctl time/warp 500 100
2726 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=10:11:11:11:11:11,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=10),tcp_flags(0x002)'
2728 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2729 ovs-appctl -t ovs-ofctl exit
2731 AT_CHECK([ovs-appctl revalidator/purge], [0])
2732 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2733 send: OFPT_ROLE_REQUEST (OF1.3) (xid=0x2): role=slave generation_id=1
2734 OFPT_ROLE_REPLY (OF1.3) (xid=0x2): role=slave generation_id=1
2736 send: OFPT_SET_ASYNC (OF1.3) (xid=0x2):
2747 OFPT_PACKET_IN (OF1.3) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
2748 tcp,in_port=0,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:0
2750 OFPT_PACKET_IN (OF1.3) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
2751 tcp,in_port=0,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:0
2753 OFPT_PACKET_IN (OF1.3) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
2754 tcp,in_port=0,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:0
2757 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2759 AT_CHECK([ovs-ofctl --protocols=OpenFlow13 dump-flows br0 | ofctl_strip | sort], [0], [dnl
2760 n_packets=3, n_bytes=180, priority=0 actions=CONTROLLER:65535
2761 OFPST_FLOW reply (OF1.3):
2768 AT_SETUP([ofproto-dpif - table-miss flow (OpenFlow 1.4)])
2769 OVS_VSWITCHD_START([dnl
2770 add-port br0 p1 -- set Interface p1 type=dummy
2772 ON_EXIT([kill `cat ovs-ofctl.pid`])
2774 AT_CAPTURE_FILE([ofctl_monitor.log])
2775 # A table-miss flow has priority 0 and no match
2776 AT_CHECK([ovs-ofctl --protocols=OpenFlow14 add-flow br0 'priority=0 actions=output:CONTROLLER'])
2778 dnl Singleton controller action.
2779 AT_CHECK([ovs-ofctl monitor -P openflow10 --protocols=OpenFlow14 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
2782 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=10:11:11:11:11:11,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=10),tcp_flags(0x002)'
2784 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2785 ovs-appctl -t ovs-ofctl exit
2787 AT_CHECK([ovs-appctl revalidator/purge], [0])
2788 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2789 OFPT_PACKET_IN (OF1.4) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
2790 tcp,in_port=0,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:0
2792 OFPT_PACKET_IN (OF1.4) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
2793 tcp,in_port=0,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:0
2795 OFPT_PACKET_IN (OF1.4) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
2796 tcp,in_port=0,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:0
2799 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2801 AT_CHECK([ovs-ofctl --protocols=OpenFlow14 dump-flows br0 | ofctl_strip | sort], [0], [dnl
2802 n_packets=3, n_bytes=180, priority=0 actions=CONTROLLER:65535
2803 OFPST_FLOW reply (OF1.4):
2811 AT_SETUP([ofproto-dpif - packet-in reason in group table (Openflow 1.3)])
2812 OVS_VSWITCHD_START([dnl
2813 add-port br0 p1 -- set Interface p1 type=dummy
2815 ON_EXIT([kill `cat ovs-ofctl.pid`])
2817 AT_CAPTURE_FILE([ofctl_monitor.log])
2818 # A table-miss flow has priority 0 and no match
2819 AT_CHECK([ovs-ofctl --protocols=OpenFlow13 add-group br0 'group_id=1234,type=all,bucket=output:10,bucket=output:CONTROLLER'])
2820 AT_CHECK([ovs-ofctl --protocols=OpenFlow13 add-flow br0 'in_port=1 actions=group:1234'])
2822 dnl Singleton controller action.
2823 AT_CHECK([ovs-ofctl monitor -P openflow10 --protocols=OpenFlow13 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
2826 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=10:11:11:11:11:11,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=10),tcp_flags(0x002)'
2828 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2829 ovs-appctl -t ovs-ofctl exit
2831 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2833 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2834 OFPT_PACKET_IN (OF1.3) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
2835 tcp,in_port=0,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:0
2837 OFPT_PACKET_IN (OF1.3) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
2838 tcp,in_port=0,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:0
2840 OFPT_PACKET_IN (OF1.3) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
2841 tcp,in_port=0,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:0
2844 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2846 AT_CHECK([ovs-ofctl --protocols=OpenFlow13 dump-flows br0 | ofctl_strip | sort], [0], [dnl
2847 n_packets=3, n_bytes=180, in_port=1 actions=group:1234
2848 OFPST_FLOW reply (OF1.3):
2855 AT_SETUP([ofproto-dpif - packet-in reason in group table (Openflow 1.4)])
2856 OVS_VSWITCHD_START([dnl
2857 add-port br0 p1 -- set Interface p1 type=dummy
2859 ON_EXIT([kill `cat ovs-ofctl.pid`])
2861 AT_CAPTURE_FILE([ofctl_monitor.log])
2862 # A table-miss flow has priority 0 and no match
2863 AT_CHECK([ovs-ofctl --protocols=OpenFlow14 add-group br0 'group_id=1234,type=all,bucket=output:10,bucket=output:CONTROLLER'])
2864 AT_CHECK([ovs-ofctl --protocols=OpenFlow14 add-flow br0 'in_port=1 actions=group:1234'])
2866 dnl Singleton controller action.
2867 AT_CHECK([ovs-ofctl monitor -P openflow10 --protocols=OpenFlow14 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
2870 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=10:11:11:11:11:11,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=10),tcp_flags(0x002)'
2872 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2873 ovs-appctl -t ovs-ofctl exit
2875 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2877 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2878 OFPT_PACKET_IN (OF1.4) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via group) data_len=60 (unbuffered)
2879 tcp,in_port=0,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:0
2881 OFPT_PACKET_IN (OF1.4) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via group) data_len=60 (unbuffered)
2882 tcp,in_port=0,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:0
2884 OFPT_PACKET_IN (OF1.4) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via group) data_len=60 (unbuffered)
2885 tcp,in_port=0,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:0
2888 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2890 AT_CHECK([ovs-ofctl --protocols=OpenFlow14 dump-flows br0 | ofctl_strip | sort], [0], [dnl
2891 n_packets=3, n_bytes=180, in_port=1 actions=group:1234
2892 OFPST_FLOW reply (OF1.4):
2898 AT_SETUP([ofproto-dpif - ARP modification slow-path])
2900 ADD_OF_PORTS([br0], [1], [2])
2902 ovs-vsctl -- set Interface p2 type=dummy options:pcap=p2.pcap
2903 ovs-ofctl add-flow br0 'in_port=1,arp actions=load:2->OXM_OF_ARP_OP[[]],2,load:0xc0a88001->OXM_OF_ARP_SPA[[]],2,load:0x404444444441->OXM_OF_ARP_THA[[]],2'
2905 # Input some packets that should follow the arp modification slow-path.
2907 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=80:88:88:88:88:88,dst=ff:ff:ff:ff:ff:ff),eth_type(0x0806),arp(sip=192.168.0.1,tip=192.168.0.2,op=1,sha=50:54:00:00:00:05,tha=00:00:00:00:00:00)'
2909 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2911 # Check the packets that were output.
2912 AT_CHECK([ovs-ofctl parse-pcap p2.pcap], [0], [dnl
2913 arp,in_port=ANY,vlan_tci=0x0000,dl_src=80:88:88:88:88:88,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=192.168.0.1,arp_tpa=192.168.0.2,arp_op=2,arp_sha=50:54:00:00:00:05,arp_tha=00:00:00:00:00:00
2914 arp,in_port=ANY,vlan_tci=0x0000,dl_src=80:88:88:88:88:88,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=192.168.128.1,arp_tpa=192.168.0.2,arp_op=2,arp_sha=50:54:00:00:00:05,arp_tha=00:00:00:00:00:00
2915 arp,in_port=ANY,vlan_tci=0x0000,dl_src=80:88:88:88:88:88,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=192.168.128.1,arp_tpa=192.168.0.2,arp_op=2,arp_sha=50:54:00:00:00:05,arp_tha=40:44:44:44:44:41
2916 arp,in_port=ANY,vlan_tci=0x0000,dl_src=80:88:88:88:88:88,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=192.168.0.1,arp_tpa=192.168.0.2,arp_op=2,arp_sha=50:54:00:00:00:05,arp_tha=00:00:00:00:00:00
2917 arp,in_port=ANY,vlan_tci=0x0000,dl_src=80:88:88:88:88:88,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=192.168.128.1,arp_tpa=192.168.0.2,arp_op=2,arp_sha=50:54:00:00:00:05,arp_tha=00:00:00:00:00:00
2918 arp,in_port=ANY,vlan_tci=0x0000,dl_src=80:88:88:88:88:88,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=192.168.128.1,arp_tpa=192.168.0.2,arp_op=2,arp_sha=50:54:00:00:00:05,arp_tha=40:44:44:44:44:41
2919 arp,in_port=ANY,vlan_tci=0x0000,dl_src=80:88:88:88:88:88,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=192.168.0.1,arp_tpa=192.168.0.2,arp_op=2,arp_sha=50:54:00:00:00:05,arp_tha=00:00:00:00:00:00
2920 arp,in_port=ANY,vlan_tci=0x0000,dl_src=80:88:88:88:88:88,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=192.168.128.1,arp_tpa=192.168.0.2,arp_op=2,arp_sha=50:54:00:00:00:05,arp_tha=00:00:00:00:00:00
2921 arp,in_port=ANY,vlan_tci=0x0000,dl_src=80:88:88:88:88:88,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=192.168.128.1,arp_tpa=192.168.0.2,arp_op=2,arp_sha=50:54:00:00:00:05,arp_tha=40:44:44:44:44:41
2927 AT_SETUP([ofproto-dpif - VLAN handling])
2929 [set Bridge br0 fail-mode=standalone -- \
2930 add-port br0 p1 trunks=10,12 -- \
2931 add-port br0 p2 tag=10 -- \
2932 add-port br0 p3 tag=12 \
2933 other-config:priority-tags=true -- \
2934 add-port br0 p4 tag=12 -- \
2935 add-port br0 p5 vlan_mode=native-tagged tag=10 -- \
2936 add-port br0 p6 vlan_mode=native-tagged tag=10 trunks=10,12 -- \
2937 add-port br0 p7 vlan_mode=native-untagged tag=12 -- \
2938 add-port br0 p8 vlan_mode=native-untagged tag=12 trunks=10,12 \
2939 other-config:priority-tags=true -- \
2940 set Interface p1 type=dummy -- \
2941 set Interface p2 type=dummy -- \
2942 set Interface p3 type=dummy -- \
2943 set Interface p4 type=dummy -- \
2944 set Interface p5 type=dummy -- \
2945 set Interface p6 type=dummy -- \
2946 set Interface p7 type=dummy -- \
2947 set Interface p8 type=dummy --])
2949 dnl Each of these specifies an in_port by number, a VLAN VID (or "none"),
2950 dnl a VLAN PCP (used if the VID isn't "none") and the expected set of datapath
2956 "100 10 0 1,5,6,7,8,pop_vlan,2" \
2957 "100 10 1 1,5,6,7,8,pop_vlan,2" \
2960 "100 12 0 1,5,6,pop_vlan,3,4,7,8" \
2961 "100 12 1 1,5,6,pop_vlan,4,7,push_vlan(vid=0,pcp=1),3,8" \
2965 "1 10 0 5,6,7,8,100,pop_vlan,2" \
2966 "1 10 1 5,6,7,8,100,pop_vlan,2" \
2969 "1 12 0 5,6,100,pop_vlan,3,4,7,8" \
2970 "1 12 1 5,6,100,pop_vlan,4,7,push_vlan(vid=0,pcp=1),3,8" \
2971 "2 none 0 push_vlan(vid=10,pcp=0),1,5,6,7,8,100" \
2972 "2 0 0 pop_vlan,push_vlan(vid=10,pcp=0),1,5,6,7,8,100" \
2973 "2 0 1 pop_vlan,push_vlan(vid=10,pcp=1),1,5,6,7,8,100" \
2980 "3 none 0 4,7,8,push_vlan(vid=12,pcp=0),1,5,6,100" \
2981 "3 0 0 pop_vlan,4,7,8,push_vlan(vid=12,pcp=0),1,5,6,100" \
2982 "3 0 1 8,pop_vlan,4,7,push_vlan(vid=12,pcp=1),1,5,6,100" \
2989 "4 none 0 3,7,8,push_vlan(vid=12,pcp=0),1,5,6,100" \
2990 "4 0 0 pop_vlan,3,7,8,push_vlan(vid=12,pcp=0),1,5,6,100" \
2991 "4 0 1 3,8,pop_vlan,7,push_vlan(vid=12,pcp=1),1,5,6,100" \
2998 "5 none 0 2,push_vlan(vid=10,pcp=0),1,6,7,8,100" \
2999 "5 0 0 pop_vlan,2,push_vlan(vid=10,pcp=0),1,6,7,8,100" \
3000 "5 0 1 pop_vlan,2,push_vlan(vid=10,pcp=1),1,6,7,8,100" \
3001 "5 10 0 1,6,7,8,100,pop_vlan,2" \
3002 "5 10 1 1,6,7,8,100,pop_vlan,2" \
3005 "5 12 0 1,6,100,pop_vlan,3,4,7,8" \
3006 "5 12 1 1,6,100,pop_vlan,4,7,push_vlan(vid=0,pcp=1),3,8" \
3007 "6 none 0 2,push_vlan(vid=10,pcp=0),1,5,7,8,100" \
3008 "6 0 0 pop_vlan,2,push_vlan(vid=10,pcp=0),1,5,7,8,100" \
3009 "6 0 1 pop_vlan,2,push_vlan(vid=10,pcp=1),1,5,7,8,100" \
3010 "6 10 0 1,5,7,8,100,pop_vlan,2" \
3011 "6 10 1 1,5,7,8,100,pop_vlan,2" \
3014 "6 12 0 1,5,100,pop_vlan,3,4,7,8" \
3015 "6 12 1 1,5,100,pop_vlan,4,7,push_vlan(vid=0,pcp=1),3,8" \
3016 "7 none 0 3,4,8,push_vlan(vid=12,pcp=0),1,5,6,100" \
3017 "7 0 0 pop_vlan,3,4,8,push_vlan(vid=12,pcp=0),1,5,6,100" \
3018 "7 0 1 3,8,pop_vlan,4,push_vlan(vid=12,pcp=1),1,5,6,100" \
3019 "7 10 0 1,5,6,8,100,pop_vlan,2" \
3020 "7 10 1 1,5,6,8,100,pop_vlan,2" \
3023 "7 12 0 1,5,6,100,pop_vlan,3,4,8" \
3024 "7 12 1 1,5,6,100,pop_vlan,4,push_vlan(vid=0,pcp=1),3,8" \
3025 "8 none 0 3,4,7,push_vlan(vid=12,pcp=0),1,5,6,100" \
3026 "8 0 0 pop_vlan,3,4,7,push_vlan(vid=12,pcp=0),1,5,6,100" \
3027 "8 0 1 3,pop_vlan,4,7,push_vlan(vid=12,pcp=1),1,5,6,100" \
3028 "8 10 0 1,5,6,7,100,pop_vlan,2" \
3029 "8 10 1 1,5,6,7,100,pop_vlan,2" \
3032 "8 12 0 1,5,6,100,pop_vlan,3,4,7" \
3033 "8 12 1 1,5,6,100,pop_vlan,4,7,push_vlan(vid=0,pcp=1),3"
3041 if test $vlan = none; then
3042 flow="in_port($in_port),eth(src=50:54:00:00:00:01,dst=ff:ff:ff:ff:ff:ff),eth_type(0xabcd)"
3044 flow="in_port($in_port),eth(src=50:54:00:00:00:01,dst=ff:ff:ff:ff:ff:ff),eth_type(0x8100),vlan(vid=$vlan,pcp=$pcp),encap(eth_type(0xabcd))"
3047 echo "----------------------------------------------------------------------"
3048 echo "in_port=$in_port vlan=$vlan pcp=$pcp"
3050 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
3051 actual=`tail -1 stdout | sed 's/Datapath actions: //'`
3053 AT_CHECK([ovs-dpctl normalize-actions "$flow" "$expected"], [0], [stdout])
3055 AT_CHECK([ovs-dpctl normalize-actions "$flow" "$actual"], [0], [expout])
3061 AT_SETUP([ofproto-dpif - MPLS handling])
3062 OVS_VSWITCHD_START([dnl
3063 add-port br0 p1 -- set Interface p1 type=dummy
3065 ON_EXIT([kill `cat ovs-ofctl.pid`])
3067 AT_CAPTURE_FILE([ofctl_monitor.log])
3068 AT_DATA([flows.txt], [dnl
3069 dl_src=40:44:44:44:00:00 actions=push_mpls:0x8847,controller
3070 dl_src=40:44:44:44:00:01,mpls actions=push_mpls:0x8847,controller
3071 dl_src=40:44:44:44:00:02,mpls actions=push_mpls:0x8848,controller
3073 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 add-flows br0 flows.txt])
3075 dnl In this test, we push an MPLS tag to an ethernet packet.
3076 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
3079 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=40:44:44:44:00:00,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no)'
3081 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3082 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
3084 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
3085 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3086 mpls,in_port=0,vlan_tci=0x0000,dl_src=40:44:44:44:00:00,dl_dst=50:54:00:00:00:07,mpls_label=0,mpls_tc=0,mpls_ttl=64,mpls_bos=1
3087 00000000 50 54 00 00 00 07 40 44-44 44 00 00 88 47 00 00
3088 00000010 01 40 45 00 00 28 00 00-00 00 40 06 f9 7c c0 a8
3089 00000020 00 01 c0 a8 00 02 00 00-00 00 00 00 00 00 00 00
3090 00000030 00 00 50 00 00 00 00 00-00 00 00 00 00 00 00 00
3092 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3093 mpls,in_port=0,vlan_tci=0x0000,dl_src=40:44:44:44:00:00,dl_dst=50:54:00:00:00:07,mpls_label=0,mpls_tc=0,mpls_ttl=64,mpls_bos=1
3094 00000000 50 54 00 00 00 07 40 44-44 44 00 00 88 47 00 00
3095 00000010 01 40 45 00 00 28 00 00-00 00 40 06 f9 7c c0 a8
3096 00000020 00 01 c0 a8 00 02 00 00-00 00 00 00 00 00 00 00
3097 00000030 00 00 50 00 00 00 00 00-00 00 00 00 00 00 00 00
3099 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3100 mpls,in_port=0,vlan_tci=0x0000,dl_src=40:44:44:44:00:00,dl_dst=50:54:00:00:00:07,mpls_label=0,mpls_tc=0,mpls_ttl=64,mpls_bos=1
3101 00000000 50 54 00 00 00 07 40 44-44 44 00 00 88 47 00 00
3102 00000010 01 40 45 00 00 28 00 00-00 00 40 06 f9 7c c0 a8
3103 00000020 00 01 c0 a8 00 02 00 00-00 00 00 00 00 00 00 00
3104 00000030 00 00 50 00 00 00 00 00-00 00 00 00 00 00 00 00
3107 dnl In this test, we push an MPLS tag to an MPLS packet. The LSE should be
3108 dnl copied exactly, except for the BOS bit.
3109 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
3112 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=40:44:44:44:00:01,dst=50:54:00:00:00:07),eth_type(0x8847),mpls(label=10,tc=0,ttl=64,bos=1)'
3114 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3115 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
3117 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
3118 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3119 mpls,in_port=0,vlan_tci=0x0000,dl_src=40:44:44:44:00:01,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=0,mpls_lse1=41280
3120 00000000 50 54 00 00 00 07 40 44-44 44 00 01 88 47 00 00
3121 00000010 a0 40 00 00 a1 40 00 00-00 00 00 00 00 00 00 00
3122 00000020 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
3123 00000030 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
3125 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3126 mpls,in_port=0,vlan_tci=0x0000,dl_src=40:44:44:44:00:01,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=0,mpls_lse1=41280
3127 00000000 50 54 00 00 00 07 40 44-44 44 00 01 88 47 00 00
3128 00000010 a0 40 00 00 a1 40 00 00-00 00 00 00 00 00 00 00
3129 00000020 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
3130 00000030 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
3132 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3133 mpls,in_port=0,vlan_tci=0x0000,dl_src=40:44:44:44:00:01,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=0,mpls_lse1=41280
3134 00000000 50 54 00 00 00 07 40 44-44 44 00 01 88 47 00 00
3135 00000010 a0 40 00 00 a1 40 00 00-00 00 00 00 00 00 00 00
3136 00000020 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
3137 00000030 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
3140 dnl In this test, we push an MPLS tag to an MPLS packet. The LSE should be
3141 dnl copied exactly, except for the BOS bit. The ethertype should be updated
3142 dnl to the MPLS ethertype of the MPLS push action which differs to that
3143 dnl of the input packet.
3144 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
3147 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=40:44:44:44:00:02,dst=50:54:00:00:00:07),eth_type(0x8847),mpls(label=10,tc=0,ttl=64,bos=1)'
3149 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3150 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
3152 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
3153 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3154 mplsm,in_port=0,vlan_tci=0x0000,dl_src=40:44:44:44:00:02,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=0,mpls_lse1=41280
3155 00000000 50 54 00 00 00 07 40 44-44 44 00 02 88 48 00 00
3156 00000010 a0 40 00 00 a1 40 00 00-00 00 00 00 00 00 00 00
3157 00000020 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
3158 00000030 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
3160 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3161 mplsm,in_port=0,vlan_tci=0x0000,dl_src=40:44:44:44:00:02,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=0,mpls_lse1=41280
3162 00000000 50 54 00 00 00 07 40 44-44 44 00 02 88 48 00 00
3163 00000010 a0 40 00 00 a1 40 00 00-00 00 00 00 00 00 00 00
3164 00000020 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
3165 00000030 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
3167 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3168 mplsm,in_port=0,vlan_tci=0x0000,dl_src=40:44:44:44:00:02,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=0,mpls_lse1=41280
3169 00000000 50 54 00 00 00 07 40 44-44 44 00 02 88 48 00 00
3170 00000010 a0 40 00 00 a1 40 00 00-00 00 00 00 00 00 00 00
3171 00000020 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
3172 00000030 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
3178 AT_SETUP([ofproto-dpif - VLAN+MPLS handling])
3179 OVS_VSWITCHD_START([dnl
3180 add-port br0 p1 -- set Interface p1 type=dummy
3182 ON_EXIT([kill `cat ovs-ofctl.pid`])
3184 AT_CAPTURE_FILE([ofctl_monitor.log])
3185 AT_DATA([flows.txt], [dnl
3186 cookie=0xa dl_src=40:44:44:44:54:50 actions=push_mpls:0x8847,load:10->OXM_OF_MPLS_LABEL[[]],push_vlan:0x8100,set_vlan_vid:99,set_vlan_pcp:1,controller
3187 cookie=0xa dl_src=40:44:44:44:54:51 actions=push_mpls:0x8847,load:10->OXM_OF_MPLS_LABEL[[]],push_vlan:0x8100,set_vlan_vid:99,set_vlan_pcp:1,controller
3188 cookie=0xa dl_src=40:44:44:44:54:52 actions=push_mpls:0x8847,load:10->OXM_OF_MPLS_LABEL[[]],push_vlan:0x8100,load:99->OXM_OF_VLAN_VID[[]],set_vlan_pcp:1,controller
3189 cookie=0xa dl_src=40:44:44:44:54:53 actions=push_mpls:0x8847,load:10->OXM_OF_MPLS_LABEL[[]],push_vlan:0x8100,load:99->OXM_OF_VLAN_VID[[]],set_vlan_pcp:1,controller
3190 cookie=0xa dl_src=40:44:44:44:54:54 actions=push_vlan:0x8100,set_vlan_vid:99,set_vlan_pcp:1,push_mpls:0x8847,load:10->OXM_OF_MPLS_LABEL[[]],controller
3191 cookie=0xa dl_src=40:44:44:44:54:55 actions=push_vlan:0x8100,set_vlan_vid:99,set_vlan_pcp:1,push_mpls:0x8847,load:10->OXM_OF_MPLS_LABEL[[]],controller
3192 cookie=0xa dl_src=40:44:44:44:54:56 actions=push_vlan:0x8100,load:99->OXM_OF_VLAN_VID[[]],set_vlan_pcp:1,push_mpls:0x8847,load:10->OXM_OF_MPLS_LABEL[[]],controller
3193 cookie=0xa dl_src=40:44:44:44:54:57 actions=push_vlan:0x8100,load:99->OXM_OF_VLAN_VID[[]],set_vlan_pcp:1,push_mpls:0x8847,load:10->OXM_OF_MPLS_LABEL[[]],controller
3194 cookie=0xa dl_src=40:44:44:44:54:58,vlan_tci=0x1000/0x1000 actions=load:99->OXM_OF_VLAN_VID[[]],set_vlan_pcp:1,push_mpls:0x8847,load:10->OXM_OF_MPLS_LABEL[[]],controller
3195 cookie=0xa dl_src=40:44:44:44:54:59,vlan_tci=0x1000/0x1000 actions=push_mpls:0x8847,load:10->OXM_OF_MPLS_LABEL[[]],set_vlan_pcp:1,load:99->OXM_OF_VLAN_VID[[]],controller
3197 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 add-flows br0 flows.txt])
3199 dnl Modified MPLS controller action.
3200 dnl In this test, we push the MPLS tag before pushing a VLAN tag, so we see
3201 dnl both of these in the final flow
3202 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
3205 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=40:44:44:44:54:50,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no)'
3207 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3208 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
3210 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
3211 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3212 mpls,in_port=0,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:54:50,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1
3213 00000000 50 54 00 00 00 07 40 44-44 44 54 50 81 00 20 63
3214 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3215 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3216 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3217 00000040 00 00 00 00
3219 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3220 mpls,in_port=0,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:54:50,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1
3221 00000000 50 54 00 00 00 07 40 44-44 44 54 50 81 00 20 63
3222 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3223 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3224 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3225 00000040 00 00 00 00
3227 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3228 mpls,in_port=0,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:54:50,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1
3229 00000000 50 54 00 00 00 07 40 44-44 44 54 50 81 00 20 63
3230 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3231 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3232 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3233 00000040 00 00 00 00
3236 dnl Modified MPLS controller action.
3237 dnl In this test, the input packet in vlan-tagged, which should be stripped
3238 dnl before we push the MPLS and VLAN tags.
3239 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
3242 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=40:44:44:44:54:51,dst=50:54:00:00:00:07),eth_type(0x8100),vlan(vid=88,pcp=7),encap(eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no))'
3244 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3245 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
3247 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
3248 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3249 mpls,in_port=0,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:54:51,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1
3250 00000000 50 54 00 00 00 07 40 44-44 44 54 51 81 00 20 63
3251 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3252 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3253 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3255 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3256 mpls,in_port=0,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:54:51,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1
3257 00000000 50 54 00 00 00 07 40 44-44 44 54 51 81 00 20 63
3258 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3259 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3260 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3262 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3263 mpls,in_port=0,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:54:51,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1
3264 00000000 50 54 00 00 00 07 40 44-44 44 54 51 81 00 20 63
3265 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3266 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3267 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3270 dnl Modified MPLS controller action.
3271 dnl In this test, we push the MPLS tag before pushing a VLAN tag, so we see
3272 dnl both of these in the final flow
3273 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
3276 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=40:44:44:44:54:52,dst=52:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no)'
3278 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3279 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
3281 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
3282 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3283 mpls,in_port=0,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:54:52,dl_dst=52:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1
3284 00000000 52 54 00 00 00 07 40 44-44 44 54 52 81 00 20 63
3285 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3286 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3287 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3288 00000040 00 00 00 00
3290 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3291 mpls,in_port=0,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:54:52,dl_dst=52:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1
3292 00000000 52 54 00 00 00 07 40 44-44 44 54 52 81 00 20 63
3293 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3294 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3295 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3296 00000040 00 00 00 00
3298 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3299 mpls,in_port=0,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:54:52,dl_dst=52:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1
3300 00000000 52 54 00 00 00 07 40 44-44 44 54 52 81 00 20 63
3301 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3302 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3303 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3304 00000040 00 00 00 00
3307 dnl Modified MPLS controller action.
3308 dnl In this test, the input packet in vlan-tagged, which should be stripped
3309 dnl before we push the MPLS and VLAN tags.
3310 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
3313 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=40:44:44:44:54:53,dst=50:54:00:00:00:07),eth_type(0x8100),vlan(vid=88,pcp=7),encap(eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no))'
3315 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3316 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
3318 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
3319 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3320 mpls,in_port=0,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:54:53,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1
3321 00000000 50 54 00 00 00 07 40 44-44 44 54 53 81 00 20 63
3322 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3323 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3324 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3326 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3327 mpls,in_port=0,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:54:53,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1
3328 00000000 50 54 00 00 00 07 40 44-44 44 54 53 81 00 20 63
3329 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3330 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3331 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3333 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3334 mpls,in_port=0,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:54:53,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1
3335 00000000 50 54 00 00 00 07 40 44-44 44 54 53 81 00 20 63
3336 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3337 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3338 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3341 dnl Modified MPLS controller action.
3342 dnl In this test, we push the VLAN tag before pushing a MPLS tag, but these
3343 dnl actions are reordered, so we see both of these in the final flow.
3344 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
3347 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=40:44:44:44:54:54,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no)'
3349 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3350 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
3352 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
3353 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3354 mpls,in_port=0,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:54:54,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1
3355 00000000 50 54 00 00 00 07 40 44-44 44 54 54 81 00 20 63
3356 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3357 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3358 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3359 00000040 00 00 00 00
3361 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3362 mpls,in_port=0,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:54:54,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1
3363 00000000 50 54 00 00 00 07 40 44-44 44 54 54 81 00 20 63
3364 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3365 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3366 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3367 00000040 00 00 00 00
3369 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3370 mpls,in_port=0,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:54:54,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1
3371 00000000 50 54 00 00 00 07 40 44-44 44 54 54 81 00 20 63
3372 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3373 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3374 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3375 00000040 00 00 00 00
3378 dnl Modified MPLS controller action.
3379 dnl In this test, the input packet in vlan-tagged, which should be stripped
3380 dnl before we push the MPLS and VLAN tags.
3381 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
3384 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=40:44:44:44:54:55,dst=50:54:00:00:00:07),eth_type(0x8100),vlan(vid=88,pcp=7),encap(eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no))'
3386 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3387 OVS_APP_EXIT_AND_WAIT([ovs-ofctl])
3389 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
3390 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3391 mpls,in_port=0,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:54:55,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1
3392 00000000 50 54 00 00 00 07 40 44-44 44 54 55 81 00 20 63
3393 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3394 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3395 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3397 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3398 mpls,in_port=0,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:54:55,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1
3399 00000000 50 54 00 00 00 07 40 44-44 44 54 55 81 00 20 63
3400 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3401 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3402 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3404 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3405 mpls,in_port=0,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:54:55,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1
3406 00000000 50 54 00 00 00 07 40 44-44 44 54 55 81 00 20 63
3407 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3408 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3409 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3412 dnl Modified MPLS controller action.
3413 dnl In this test, we push the VLAN tag before pushing a MPLS tag, but these
3414 dnl actions are reordered, so we see both of these in the final flow.
3415 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
3418 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=40:44:44:44:54:56,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no)'
3420 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3421 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
3423 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
3424 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3425 mpls,in_port=0,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:54:56,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1
3426 00000000 50 54 00 00 00 07 40 44-44 44 54 56 81 00 20 63
3427 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3428 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3429 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3430 00000040 00 00 00 00
3432 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3433 mpls,in_port=0,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:54:56,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1
3434 00000000 50 54 00 00 00 07 40 44-44 44 54 56 81 00 20 63
3435 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3436 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3437 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3438 00000040 00 00 00 00
3440 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3441 mpls,in_port=0,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:54:56,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1
3442 00000000 50 54 00 00 00 07 40 44-44 44 54 56 81 00 20 63
3443 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3444 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3445 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3446 00000040 00 00 00 00
3449 dnl Modified MPLS controller action.
3450 dnl In this test, the input packet in vlan-tagged, which should be stripped
3451 dnl before we push the MPLS and VLAN tags.
3452 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 -m 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
3455 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=40:44:44:44:54:57,dst=50:54:00:00:00:07),eth_type(0x8100),vlan(vid=88,pcp=7),encap(eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no))'
3457 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3458 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
3460 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
3461 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3462 mpls,in_port=0,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:54:57,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1
3463 00000000 50 54 00 00 00 07 40 44-44 44 54 57 81 00 20 63
3464 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3465 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3466 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3468 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3469 mpls,in_port=0,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:54:57,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1
3470 00000000 50 54 00 00 00 07 40 44-44 44 54 57 81 00 20 63
3471 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3472 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3473 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3475 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3476 mpls,in_port=0,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:54:57,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1
3477 00000000 50 54 00 00 00 07 40 44-44 44 54 57 81 00 20 63
3478 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3479 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3480 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3483 dnl Modified MPLS controller action.
3484 dnl In this test, the input packet in vlan-tagged, which should be stripped
3485 dnl before we push the MPLS and VLAN tags.
3486 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
3489 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=40:44:44:44:54:58,dst=50:54:00:00:00:07),eth_type(0x8100),vlan(vid=88,pcp=7),encap(eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no))'
3491 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3492 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
3494 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
3495 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3496 mpls,in_port=0,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:54:58,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1
3497 00000000 50 54 00 00 00 07 40 44-44 44 54 58 81 00 20 63
3498 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3499 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3500 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3502 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3503 mpls,in_port=0,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:54:58,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1
3504 00000000 50 54 00 00 00 07 40 44-44 44 54 58 81 00 20 63
3505 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3506 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3507 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3509 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3510 mpls,in_port=0,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:54:58,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1
3511 00000000 50 54 00 00 00 07 40 44-44 44 54 58 81 00 20 63
3512 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3513 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3514 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3517 dnl Modified MPLS controller action.
3518 dnl In this test, the input packet in vlan-tagged, which should be modified
3519 dnl before we push MPLS and VLAN tags.
3520 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
3523 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=40:44:44:44:54:59,dst=50:54:00:00:00:07),eth_type(0x8100),vlan(vid=88,pcp=7),encap(eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no))'
3525 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3526 ovs-appctl -t ovs-ofctl exit
3528 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
3529 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3530 mpls,in_port=0,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:54:59,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1
3531 00000000 50 54 00 00 00 07 40 44-44 44 54 59 81 00 20 63
3532 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3533 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3534 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3536 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3537 mpls,in_port=0,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:54:59,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1
3538 00000000 50 54 00 00 00 07 40 44-44 44 54 59 81 00 20 63
3539 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3540 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3541 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3543 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3544 mpls,in_port=0,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:54:59,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1
3545 00000000 50 54 00 00 00 07 40 44-44 44 54 59 81 00 20 63
3546 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3547 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3548 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3551 AT_CHECK([ovs-appctl revalidator/purge], [0])
3552 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
3553 cookie=0xa, n_packets=3, n_bytes=180, dl_src=40:44:44:44:54:50 actions=push_mpls:0x8847,load:0xa->OXM_OF_MPLS_LABEL[[]],push_vlan:0x8100,set_field:4195->vlan_vid,set_field:1->vlan_pcp,CONTROLLER:65535
3554 cookie=0xa, n_packets=3, n_bytes=180, dl_src=40:44:44:44:54:51 actions=push_mpls:0x8847,load:0xa->OXM_OF_MPLS_LABEL[[]],push_vlan:0x8100,set_field:4195->vlan_vid,set_field:1->vlan_pcp,CONTROLLER:65535
3555 cookie=0xa, n_packets=3, n_bytes=180, dl_src=40:44:44:44:54:52 actions=push_mpls:0x8847,load:0xa->OXM_OF_MPLS_LABEL[[]],push_vlan:0x8100,load:0x63->OXM_OF_VLAN_VID[[]],set_field:1->vlan_pcp,CONTROLLER:65535
3556 cookie=0xa, n_packets=3, n_bytes=180, dl_src=40:44:44:44:54:53 actions=push_mpls:0x8847,load:0xa->OXM_OF_MPLS_LABEL[[]],push_vlan:0x8100,load:0x63->OXM_OF_VLAN_VID[[]],set_field:1->vlan_pcp,CONTROLLER:65535
3557 cookie=0xa, n_packets=3, n_bytes=180, dl_src=40:44:44:44:54:54 actions=push_vlan:0x8100,set_field:4195->vlan_vid,set_field:1->vlan_pcp,push_mpls:0x8847,load:0xa->OXM_OF_MPLS_LABEL[[]],CONTROLLER:65535
3558 cookie=0xa, n_packets=3, n_bytes=180, dl_src=40:44:44:44:54:55 actions=push_vlan:0x8100,set_field:4195->vlan_vid,set_field:1->vlan_pcp,push_mpls:0x8847,load:0xa->OXM_OF_MPLS_LABEL[[]],CONTROLLER:65535
3559 cookie=0xa, n_packets=3, n_bytes=180, dl_src=40:44:44:44:54:56 actions=push_vlan:0x8100,load:0x63->OXM_OF_VLAN_VID[[]],set_field:1->vlan_pcp,push_mpls:0x8847,load:0xa->OXM_OF_MPLS_LABEL[[]],CONTROLLER:65535
3560 cookie=0xa, n_packets=3, n_bytes=180, dl_src=40:44:44:44:54:57 actions=push_vlan:0x8100,load:0x63->OXM_OF_VLAN_VID[[]],set_field:1->vlan_pcp,push_mpls:0x8847,load:0xa->OXM_OF_MPLS_LABEL[[]],CONTROLLER:65535
3561 cookie=0xa, n_packets=3, n_bytes=180, vlan_tci=0x1000/0x1000,dl_src=40:44:44:44:54:58 actions=load:0x63->OXM_OF_VLAN_VID[[]],set_field:1->vlan_pcp,push_mpls:0x8847,load:0xa->OXM_OF_MPLS_LABEL[[]],CONTROLLER:65535
3562 cookie=0xa, n_packets=3, n_bytes=180, vlan_tci=0x1000/0x1000,dl_src=40:44:44:44:54:59 actions=push_mpls:0x8847,load:0xa->OXM_OF_MPLS_LABEL[[]],set_field:1->vlan_pcp,load:0x63->OXM_OF_VLAN_VID[[]],CONTROLLER:65535
3563 OFPST_FLOW reply (OF1.2):
3569 AT_SETUP([ofproto-dpif - fragment handling - trace])
3571 ADD_OF_PORTS([br0], [1], [2], [3], [4], [5], [6], [90])
3572 AT_DATA([flows.txt], [dnl
3573 priority=75 tcp ip_frag=no tp_dst=80 actions=move:OXM_OF_TCP_DST[[]]->OXM_OF_TCP_SRC[[]],output:1
3574 priority=75 tcp ip_frag=first tp_dst=80 actions=move:OXM_OF_TCP_DST[[]]->OXM_OF_TCP_SRC[[]],output:2
3575 priority=50 tcp ip_frag=no actions=move:OXM_OF_TCP_DST[[]]->OXM_OF_TCP_SRC[[]],output:4
3576 priority=50 tcp ip_frag=first actions=move:OXM_OF_TCP_DST[[]]->OXM_OF_TCP_SRC[[]],output:5
3577 priority=50 tcp ip_frag=later actions=output:6
3579 AT_CHECK([ovs-ofctl replace-flows br0 flows.txt])
3581 base_flow="in_port(90),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=128"
3582 no_flow="$base_flow,frag=no),tcp(src=12345,dst=80)"
3583 first_flow="$base_flow,frag=first),tcp(src=12345,dst=80)"
3584 later_flow="$base_flow,frag=later)"
3586 # mode no first later
3589 'drop 1 drop drop' \
3598 AT_CHECK([ovs-ofctl set-frags br0 $mode])
3599 for type in no first later; do
3600 eval flow=\$${type}_flow exp_output=\$$type
3601 printf "\n%s\n" "----$mode $type-----"
3602 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
3604 if test $mode = drop && test $type != no; then
3605 echo 'Packets dropped because they are IP fragments and the fragment handling mode is "drop".' >> expout
3606 echo "Datapath actions: $exp_output" >> expout
3607 elif test $type = later; then
3608 echo "Datapath actions: $exp_output" >> expout
3610 echo "Datapath actions: set(tcp(src=80,dst=80)),$exp_output" >> expout
3612 AT_CHECK([grep 'IP fragments' stdout; tail -1 stdout], [0], [expout])
3618 AT_SETUP([ofproto-dpif - fragment handling - upcall])
3620 ADD_OF_PORTS([br0], [1], [2], [3], [4], [5], [6], [90])
3621 AT_DATA([flows.txt], [dnl
3622 priority=75 tcp ip_frag=no tp_dst=80 actions=set_field:81->tcp_dst,output:1
3623 priority=75 tcp ip_frag=first tp_dst=80 actions=set_field:81->tcp_dst,output:2
3624 priority=50 tcp ip_frag=no actions=set_field:81->tcp_dst,output:4
3625 priority=50 tcp ip_frag=first actions=set_field:81->tcp_dst,output:5
3626 priority=50 tcp ip_frag=later actions=output:6
3628 AT_CHECK([ovs-ofctl replace-flows br0 flows.txt])
3630 base_flow="in_port(90),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=128"
3631 no_flow="$base_flow,frag=no),tcp(src=12345,dst=80)"
3632 first_flow="$base_flow,frag=first),tcp(src=12345,dst=80)"
3633 later_flow="$base_flow,frag=later)"
3635 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
3639 AT_CHECK([ovs-ofctl set-frags br0 $mode])
3640 for type in no first later; do
3641 eval flow=\$${type}_flow
3642 printf "\n%s\n" "----$mode $type-----"
3644 AT_CHECK([ovs-appctl netdev-dummy/receive p90 "$flow"], [0], [stdout])
3647 AT_CHECK([ovs-appctl dpctl/dump-flows], [0], [dnl
3648 recirc_id(0),in_port(90),eth_type(0x0800),ipv4(proto=6,frag=no),tcp(dst=80), packets:0, bytes:0, used:never, actions:set(tcp(dst=81)),1
3649 recirc_id(0),in_port(90),eth_type(0x0800),ipv4(proto=6,frag=first),tcp(dst=80), packets:0, bytes:0, used:never, actions:set(tcp(dst=81)),5
3650 recirc_id(0),in_port(90),eth_type(0x0800),ipv4(proto=6,frag=later), packets:0, bytes:0, used:never, actions:6
3655 AT_CHECK([ovs-appctl revalidator/purge], [0])
3656 AT_CHECK([ovs-ofctl set-frags br0 $mode])
3657 for type in no first later; do
3658 eval flow=\$${type}_flow
3659 printf "\n%s\n" "----$mode $type-----"
3661 AT_CHECK([ovs-appctl netdev-dummy/receive p90 "$flow"], [0], [stdout])
3664 AT_CHECK([ovs-appctl dpctl/dump-flows], [0], [dnl
3665 recirc_id(0),in_port(90),eth_type(0x0800),ipv4(proto=6,frag=no),tcp(dst=80), packets:0, bytes:0, used:never, actions:set(tcp(dst=81)),1
3666 recirc_id(0),in_port(90),eth_type(0x0800),ipv4(frag=first), packets:0, bytes:0, used:never, actions:drop
3667 recirc_id(0),in_port(90),eth_type(0x0800),ipv4(frag=later), packets:0, bytes:0, used:never, actions:drop
3672 AT_CHECK([ovs-appctl revalidator/purge], [0])
3673 AT_CHECK([ovs-ofctl set-frags br0 $mode])
3674 for type in no first later; do
3675 eval flow=\$${type}_flow
3676 printf "\n%s\n" "----$mode $type-----"
3678 AT_CHECK([ovs-appctl netdev-dummy/receive p90 "$flow"], [0], [stdout])
3681 AT_CHECK([ovs-appctl dpctl/dump-flows], [0], [dnl
3682 recirc_id(0),in_port(90),eth_type(0x0800),ipv4(proto=6,frag=no),tcp(dst=80), packets:0, bytes:0, used:never, actions:set(tcp(dst=81)),1
3683 recirc_id(0),in_port(90),eth_type(0x0800),ipv4(proto=6,frag=first),tcp(dst=80), packets:0, bytes:0, used:never, actions:set(tcp(dst=81)),2
3684 recirc_id(0),in_port(90),eth_type(0x0800),ipv4(proto=6,frag=later), packets:0, bytes:0, used:never, actions:6
3690 AT_SETUP([ofproto-dpif - fragment handling - actions])
3692 ADD_OF_PORTS([br0], [1], [2], [3], [4], [5], [6], [90])
3694 AT_CHECK([ovs-ofctl add-flow br0 "tcp,ip_frag=later actions=move:OXM_OF_TCP_DST[[0..7]]->OXM_OF_TCP_SRC[[0..7]],output:1"], [1], [], [stderr])
3695 AT_CHECK([tail -2 stderr | sed 's/^.*|WARN|//'], [0], [dnl
3696 source field tcp_dst lacks correct prerequisites
3697 ovs-ofctl: actions are invalid with specified match (OFPBAC_MATCH_INCONSISTENT)
3700 AT_CHECK([ovs-ofctl -O OpenFlow15 add-flow br0 "tcp,ip_frag=later actions=move:OXM_OF_PKT_REG0[[0..7]]->OXM_OF_TCP_SRC[[0..7]],output:1"], [1], [], [stderr])
3701 AT_CHECK([tail -2 stderr | sed 's/^.*|WARN|//'], [0], [dnl
3702 destination field tcp_src lacks correct prerequisites
3703 ovs-ofctl: actions are invalid with specified match (OFPBAC_MATCH_INCONSISTENT)
3706 AT_CHECK([ovs-ofctl add-flow br0 "udp,ip_frag=later actions=set_field:8888->udp_src,output:1"], [1], [], [stderr])
3707 AT_CHECK([tail -2 stderr | sed 's/^.*|WARN|//'], [0], [dnl
3708 set_field udp_src lacks correct prerequisities
3709 ovs-ofctl: actions are invalid with specified match (OFPBAC_MATCH_INCONSISTENT)
3712 AT_CHECK([ovs-ofctl add-flow br0 "udp,ip_frag=later actions=load:8888->NXM_OF_UDP_DST[[]],output:1"], [1], [], [stderr])
3713 AT_CHECK([tail -2 stderr | sed 's/^.*|WARN|//'], [0], [dnl
3714 set_field udp_dst lacks correct prerequisities
3715 ovs-ofctl: actions are invalid with specified match (OFPBAC_MATCH_INCONSISTENT)
3718 AT_CHECK([ovs-ofctl add-flow br0 "sctp,ip_frag=later actions=set_field:8888->sctp_src,output:1"], [1], [], [stderr])
3719 AT_CHECK([tail -2 stderr | sed 's/^.*|WARN|//'], [0], [dnl
3720 set_field sctp_src lacks correct prerequisities
3721 ovs-ofctl: actions are invalid with specified match (OFPBAC_MATCH_INCONSISTENT)
3724 AT_CHECK([ovs-ofctl add-flow br0 "sctp,ip_frag=later actions=set_field:8888->sctp_dst,output:1"], [1], [], [stderr])
3725 AT_CHECK([tail -2 stderr | sed 's/^.*|WARN|//'], [0], [dnl
3726 set_field sctp_dst lacks correct prerequisities
3727 ovs-ofctl: actions are invalid with specified match (OFPBAC_MATCH_INCONSISTENT)
3730 AT_CHECK([ovs-ofctl add-flow br0 "tcp,ip_frag=later actions=learn(table=1,hard_timeout=60,eth_type=0x800,nw_proto=6,NXM_OF_IP_SRC[[]]=NXM_OF_IP_DST[[]],NXM_OF_TCP_SRC[[]]=NXM_OF_TCP_DST[[]],output:NXM_NX_REG0[[0..15]]),output:1"], [1], [], [stderr])
3731 AT_CHECK([tail -2 stderr | sed 's/^.*|WARN|//'], [0], [dnl
3732 source field tcp_dst lacks correct prerequisites
3733 ovs-ofctl: actions are invalid with specified match (OFPBAC_MATCH_INCONSISTENT)
3736 AT_DATA([flows.txt], [dnl
3737 priority=75 tcp actions=load:42->OXM_OF_TCP_SRC[[0..7]],output:1
3739 AT_CHECK([ovs-ofctl -O OpenFlow12 replace-flows br0 flows.txt])
3741 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
3745 AT_CHECK([ovs-ofctl set-frags br0 $mode])
3746 for frag in 4000 6000 6008 4010; do
3747 printf "\n%s\n" "----$mode $frag-----"
3749 AT_CHECK([ovs-appctl netdev-dummy/receive p90 "0021853763af 0026b98cb0f9 0800 4500 003c 2e24 $frag 40 06 465d ac11370d ac11370b 828b 0016 751e267b 00000000 a002 16d0 1736 0000 02 04 05 b4 04 02 08 0a 2d 25 08 5f 00 00 00 00 01 03 03 07"])
3752 AT_CHECK([ovs-appctl dpctl/dump-flows | sed 's/used:[[0-9]].[[0-9]]*s/used:0.001s/'], [0], [dnl
3753 recirc_id(0),in_port(90),eth_type(0x0800),ipv4(proto=6,frag=no),tcp(src=33419), packets:0, bytes:0, used:never, actions:set(tcp(src=33322)),1
3754 recirc_id(0),in_port(90),eth_type(0x0800),ipv4(proto=6,frag=first),tcp(src=33419), packets:0, bytes:0, used:never, actions:set(tcp(src=33322)),1
3755 recirc_id(0),in_port(90),eth_type(0x0800),ipv4(proto=6,frag=later), packets:1, bytes:74, used:0.001s, actions:1
3758 AT_CHECK([ovs-appctl revalidator/purge], [0])
3759 AT_CHECK([ovs-ofctl set-frags br0 $mode])
3760 for frag in 4000 6000 6008 4010; do
3761 printf "\n%s\n" "----$mode $frag truncated transport header -----"
3763 AT_CHECK([ovs-appctl netdev-dummy/receive p90 "0021853763af 0026b98cb0f9 0800 4500 0018 2e24 $frag 40 06 465d ac11370d ac11370b 828b 0016"])
3766 AT_CHECK([ovs-appctl dpctl/dump-flows | sed 's/used:[[0-9]].[[0-9]]*s/used:0.001s/'], [0], [dnl
3767 recirc_id(0),in_port(90),eth_type(0x0800),ipv4(proto=6,frag=no),tcp(src=0), packets:0, bytes:0, used:never, actions:set(tcp(src=42)),1
3768 recirc_id(0),in_port(90),eth_type(0x0800),ipv4(proto=6,frag=first),tcp(src=0), packets:0, bytes:0, used:never, actions:set(tcp(src=42)),1
3769 recirc_id(0),in_port(90),eth_type(0x0800),ipv4(proto=6,frag=later), packets:1, bytes:60, used:0.001s, actions:1
3772 AT_CHECK([ovs-appctl revalidator/purge], [0])
3773 AT_CHECK([ovs-ofctl set-frags br0 $mode])
3774 for frag in 4000 6000 6001 4002; do
3775 printf "\n%s\n" "----$mode $frag missing transport header-----"
3777 AT_CHECK([ovs-appctl netdev-dummy/receive p90 "0021853763af 0026b98cb0f9 0800 4500 0014 2e24 $frag 40 06 465d ac11370d ac11370b"])
3780 AT_CHECK([ovs-appctl dpctl/dump-flows | sed 's/used:[[0-9]].[[0-9]]*s/used:0.001s/'], [0], [dnl
3781 recirc_id(0),in_port(90),eth_type(0x0800),ipv4(proto=6,frag=no),tcp(src=0), packets:0, bytes:0, used:never, actions:set(tcp(src=42)),1
3782 recirc_id(0),in_port(90),eth_type(0x0800),ipv4(proto=6,frag=first),tcp(src=0), packets:0, bytes:0, used:never, actions:set(tcp(src=42)),1
3783 recirc_id(0),in_port(90),eth_type(0x0800),ipv4(proto=6,frag=later), packets:1, bytes:60, used:0.001s, actions:1
3789 AT_SETUP([ofproto-dpif - exit])
3791 ADD_OF_PORTS([br0], [1], [2], [3], [10], [11], [12], [13], [14])
3792 AT_DATA([flows.txt], [dnl
3793 in_port=1 actions=output:10,exit,output:11
3794 in_port=2 actions=output:12,resubmit:1,output:12
3795 in_port=3 actions=output:13,resubmit:2,output:14
3797 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
3798 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)'], [0], [stdout])
3799 AT_CHECK([tail -1 stdout], [0],
3800 [Datapath actions: 10
3802 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(2),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)'], [0], [stdout])
3803 AT_CHECK([tail -1 stdout], [0],
3804 [Datapath actions: 12,10
3806 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(3),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)'], [0], [stdout])
3807 AT_CHECK([tail -1 stdout], [0],
3808 [Datapath actions: 13,12,10
3814 AT_SETUP([ofproto-dpif - mirroring, select_all])
3816 ADD_OF_PORTS([br0], 1, 2, 3)
3818 set Bridge br0 mirrors=@m --\
3819 --id=@p3 get Port p3 --\
3820 --id=@m create Mirror name=mymirror select_all=true output_port=@p3
3822 AT_DATA([flows.txt], [dnl
3823 in_port=1 actions=output:2
3824 in_port=2 actions=output:1
3826 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
3828 flow="in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)"
3829 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
3830 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
3831 [Datapath actions: 2,3
3834 flow="in_port(2),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)"
3835 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
3836 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
3837 [Datapath actions: 1,3
3844 AT_SETUP([ofproto-dpif - mirroring, select_src])
3846 ADD_OF_PORTS([br0], 1, 2, 3)
3848 set Bridge br0 mirrors=@m --\
3849 --id=@p1 get Port p1 -- --id=@p3 get Port p3 --\
3850 --id=@m create Mirror name=mymirror select_src_port=@p1 output_port=@p3
3852 AT_DATA([flows.txt], [dnl
3853 in_port=1 actions=output:2
3854 in_port=2 actions=output:1
3856 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
3858 flow="in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)"
3859 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
3860 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
3861 [Datapath actions: 2,3
3864 flow="in_port(2),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)"
3865 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
3866 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
3867 [Datapath actions: 1
3872 AT_SETUP([ofproto-dpif - mirroring, OFPP_NONE ingress port])
3874 ADD_OF_PORTS([br0], 1, 2)
3876 set Bridge br0 mirrors=@m --\
3877 --id=@p2 get Port p2 --\
3878 --id=@m create Mirror name=mymirror select_all=true output_port=@p2
3880 AT_CHECK([ovs-ofctl add-flow br0 action=output:1])
3882 # "in_port" defaults to OFPP_NONE if it's not specified.
3883 flow="icmp,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_ttl=128,icmp_type=8,icmp_code=0"
3884 AT_CHECK([ovs-appctl ofproto/trace br0 "$flow"], [0], [stdout])
3885 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
3886 [Datapath actions: 1,2
3893 AT_SETUP([ofproto-dpif - mirroring, select_dst])
3895 ADD_OF_PORTS([br0], 1, 2, 3)
3897 set Bridge br0 mirrors=@m --\
3898 --id=@p2 get Port p2 -- --id=@p3 get Port p3 --\
3899 --id=@m create Mirror name=mymirror select_dst_port=@p2 output_port=@p3
3901 AT_DATA([flows.txt], [dnl
3902 in_port=1 actions=output:2
3903 in_port=2 actions=output:1
3905 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
3907 flow="in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)"
3908 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
3909 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
3910 [Datapath actions: 2,3
3913 flow="in_port(2),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)"
3914 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
3915 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
3916 [Datapath actions: 1
3923 AT_SETUP([ofproto-dpif - mirroring, select_vlan])
3925 ADD_OF_PORTS([br0], 1, 2, 3)
3927 set Bridge br0 mirrors=@m --\
3928 --id=@p2 get Port p2 -- --id=@p3 get Port p3 --\
3929 --id=@m create Mirror name=mymirror select_all=true select_vlan=11 output_port=@p3
3931 AT_DATA([flows.txt], [dnl
3932 in_port=1, actions=output:2
3934 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
3936 flow="in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)"
3937 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
3938 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
3939 [Datapath actions: 2
3942 flow="in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x8100),vlan(vid=10,pcp=0),encap(eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0))"
3943 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
3944 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
3945 [Datapath actions: 2
3948 flow="in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x8100),vlan(vid=11,pcp=0),encap(eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0))"
3949 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
3950 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
3951 [Datapath actions: 2,3
3958 AT_SETUP([ofproto-dpif - mirroring, output_port])
3960 ADD_OF_PORTS([br0], 1, 2, 3)
3962 set Bridge br0 mirrors=@m --\
3963 --id=@p3 get Port p3 --\
3964 --id=@m create Mirror name=mymirror select_all=true output_port=@p3
3966 AT_DATA([flows.txt], [dnl
3967 in_port=1 actions=mod_vlan_vid:17,output:2
3968 in_port=2 actions=output:1
3970 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
3972 flow="in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)"
3973 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
3974 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
3975 [Datapath actions: push_vlan(vid=17,pcp=0),2,pop_vlan,3
3978 flow="in_port(2),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)"
3979 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
3980 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
3981 [Datapath actions: 1,3
3987 AT_SETUP([ofproto-dpif - mirroring, output_vlan])
3989 ADD_OF_PORTS([br0], 1, 2)
3991 set Bridge br0 mirrors=@m --\
3992 --id=@m create Mirror name=mymirror select_all=true output_vlan=12
3994 AT_DATA([flows.txt], [dnl
3995 in_port=1 actions=output:2
3996 in_port=2 actions=mod_vlan_vid:17,output:1
3998 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
4000 flow="in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)"
4001 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
4002 actual=`tail -1 stdout | sed 's/Datapath actions: //'`
4004 expected="2,push_vlan(vid=12,pcp=0),1,2,100"
4005 AT_CHECK([ovs-dpctl normalize-actions "$flow" "$expected"], [0], [stdout])
4007 AT_CHECK([ovs-dpctl normalize-actions "$flow" "$actual"], [0], [expout])
4009 flow="in_port(2),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)"
4010 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
4011 actual=`tail -1 stdout | sed 's/Datapath actions: //'`
4013 expected="push_vlan(vid=17,pcp=0),1,pop_vlan,push_vlan(vid=12,pcp=0),1,2,100"
4014 AT_CHECK([ovs-dpctl normalize-actions "$flow" "$expected"], [0], [stdout])
4016 AT_CHECK([ovs-dpctl normalize-actions "$flow" "$actual"], [0], [expout])
4021 # Two testcases below are for the ofproto/trace command
4022 # The first one tests all correct syntax:
4023 # ofproto/trace [dp_name] odp_flow [-generate|packet]
4024 # ofproto/trace br_name br_flow [-generate|packet]
4025 AT_SETUP([ofproto-dpif - ofproto/trace command 1])
4026 OVS_VSWITCHD_START([set bridge br0 fail-mode=standalone])
4027 ADD_OF_PORTS([br0], 1, 2, 3)
4029 AT_DATA([flows.txt], [dnl
4030 in_port=1 actions=output:2
4031 in_port=2 actions=output:1
4033 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
4035 odp_flow="in_port(1)"
4037 # Test command: ofproto/trace odp_flow with in_port as a name.
4038 AT_CHECK([ovs-appctl ofproto/trace "$odp_flow"], [0], [stdout])
4039 AT_CHECK([tail -1 stdout], [0], [dnl
4043 odp_flow="in_port(1)"
4044 # Test command: ofproto/trace odp_flow
4045 AT_CHECK([ovs-appctl ofproto/trace "$odp_flow"], [0], [stdout])
4046 AT_CHECK([tail -1 stdout], [0], [dnl
4050 # Test command: ofproto/trace dp_name odp_flow
4051 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$odp_flow"], [0], [stdout])
4052 AT_CHECK([tail -1 stdout], [0], [dnl
4055 # Test commmand: ofproto/trace br_name br_flow
4056 AT_CHECK([ovs-appctl ofproto/trace br0 "$br_flow"], [0], [stdout])
4057 AT_CHECK([tail -1 stdout], [0], [dnl
4061 # Delete the inserted flows
4062 AT_CHECK([ovs-ofctl del-flows br0 "in_port=1"], [0], [stdout])
4063 AT_CHECK([ovs-ofctl del-flows br0 "in_port=2"], [0], [stdout])
4065 # This section below tests the [-generate] option
4066 odp_flow="in_port(3),eth(src=50:54:00:00:00:05,dst=ff:ff:ff:ff:ff:ff)"
4067 br_flow="arp,in_port=3,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=ff:ff:ff:ff:ff:ff"
4069 # Test command: ofproto/trace odp_flow
4070 AT_CHECK([ovs-appctl ofproto/trace "$odp_flow"], [0], [stdout])
4071 # Check for no MAC learning entry
4072 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
4076 # Test command: ofproto/trace br_name br_flow
4077 AT_CHECK([ovs-appctl ofproto/trace br0 "$br_flow"], [0], [stdout])
4078 # Check for no MAC learning entry
4079 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
4083 # Test command: ofproto/trace odp_flow -generate
4084 AT_CHECK([ovs-appctl ofproto/trace "$odp_flow" -generate], [0], [stdout])
4085 # Check for the MAC learning entry
4086 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
4088 3 0 50:54:00:00:00:05 ?
4091 # Test command: ofproto/trace dp_name odp_flow -generate
4092 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy \
4093 "in_port(1),eth(src=50:54:00:00:00:06,dst=50:54:00:00:00:05)" \
4094 -generate], [0], [stdout])
4095 # Check for both MAC learning entries
4096 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
4098 3 0 50:54:00:00:00:05 ?
4099 1 0 50:54:00:00:00:06 ?
4102 # Test command: ofproto/trace br_name br_flow -generate
4103 AT_CHECK([ovs-appctl ofproto/trace br0 \
4104 "in_port=2,dl_src=50:54:00:00:00:07,dl_dst=50:54:00:00:00:06" \
4105 -generate], [0], [stdout])
4106 # Check for both MAC learning entries.
4107 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
4109 3 0 50:54:00:00:00:05 ?
4110 1 0 50:54:00:00:00:06 ?
4111 2 0 50:54:00:00:00:07 ?
4114 # This section beflow tests the [packet] option
4115 # The ovs-tcpundump of packets between port1 and port2
4116 pkt1to2="50540000000250540000000108064500001C000100004001F98CC0A80001C0A800020800F7FF00000000"
4117 pkt2to1="50540000000150540000000208064500001C000100004001F98CC0A80002C0A800010800F7FF00000000"
4119 # Construct the MAC learning table
4120 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy \
4121 "in_port(1),eth(src=50:54:00:00:00:01,dst=ff:ff:ff:ff:ff:ff)" \
4122 -generate], [0], [stdout])
4124 # Construct the MAC learning table
4125 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy \
4126 "in_port(2),eth(src=50:54:00:00:00:02,dst=ff:ff:ff:ff:ff:ff)" \
4127 -generate], [0], [stdout])
4129 # Test command: ofproto/trace odp_flow packet
4130 AT_CHECK([ovs-appctl ofproto/trace \
4131 "in_port(1),skb_priority(1),skb_mark(2)" "$pkt1to2"], [0], [stdout])
4132 AT_CHECK([tail -1 stdout], [0], [dnl
4135 AT_CHECK([head -n 2 stdout], [0], [dnl
4137 Flow: pkt_mark=0x2,skb_priority=0x1,arp,in_port=1,vlan_tci=0x0000,dl_src=50:54:00:00:00:01,dl_dst=50:54:00:00:00:02,arp_spa=0.0.0.0,arp_tpa=0.0.0.0,arp_op=0,arp_sha=00:00:00:00:00:00,arp_tha=00:00:00:00:00:00
4140 # Test command: ofproto/trace dp_name odp_flow packet
4141 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy \
4142 "in_port(1),skb_priority(1),skb_mark(2)" "$pkt1to2"], [0], [stdout])
4143 AT_CHECK([tail -1 stdout], [0], [dnl
4146 AT_CHECK([head -n 2 stdout], [0], [dnl
4148 Flow: pkt_mark=0x2,skb_priority=0x1,arp,in_port=1,vlan_tci=0x0000,dl_src=50:54:00:00:00:01,dl_dst=50:54:00:00:00:02,arp_spa=0.0.0.0,arp_tpa=0.0.0.0,arp_op=0,arp_sha=00:00:00:00:00:00,arp_tha=00:00:00:00:00:00
4151 # Test command: ofproto/trace br_name br_flow packet
4152 AT_CHECK([ovs-appctl ofproto/trace br0 \
4153 "in_port=2,skb_priority=2,pkt_mark=1" "$pkt2to1"], [0], [stdout],[stderr])
4154 AT_CHECK([tail -1 stdout], [0], [dnl
4157 AT_CHECK([head -n 2 stdout], [0], [dnl
4159 Flow: pkt_mark=0x1,skb_priority=0x2,arp,in_port=2,vlan_tci=0x0000,dl_src=50:54:00:00:00:02,dl_dst=50:54:00:00:00:01,arp_spa=0.0.0.0,arp_tpa=0.0.0.0,arp_op=0,arp_sha=00:00:00:00:00:00,arp_tha=00:00:00:00:00:00
4165 # The second test tests the corner cases
4166 AT_SETUP([ofproto-dpif - ofproto/trace command 2])
4168 ADD_OF_PORTS([br0], 1, 2)
4171 odp_flow="in_port(1),eth(src=50:54:00:00:00:01,dst=50:54:00:00:00:02)"
4172 br_flow="in_port=1,dl_src=50:54:00:00:00:01,dl_dst=50:54:00:00:00:02"
4174 generate="-generate"
4175 pkt="50540000000250540000000108064500001C000100004001F98CC0A80001C0A800020800F7FF00000000"
4177 # Test incorrect command: ofproto/trace wrong_name odp_flow [-generate|packet]
4183 [AT_CHECK([ovs-appctl ofproto/trace wrong_name "$odp_flow" option],
4185 AT_CHECK([tail -2 stderr], [0], [dnl
4186 Cannot find the datapath
4187 ovs-appctl: ovs-vswitchd: server returned an error
4190 # Test incorrect command: ofproto/trace empty_string odp_flow [-generate|packet]
4196 [AT_CHECK([ovs-appctl ofproto/trace "" "$odp_flow" option],
4198 AT_CHECK([tail -2 stderr], [0], [dnl
4199 Cannot find the datapath
4200 ovs-appctl: ovs-vswitchd: server returned an error
4203 # Test incorrect command: ofproto/trace nonexist_dp_name odp_flow [-generate|packet]
4209 [AT_CHECK([ovs-appctl ofproto/trace ovs-system "$odp_flow" option],
4211 AT_CHECK([tail -2 stderr], [0], [dnl
4212 Cannot find the datapath
4213 ovs-appctl: ovs-vswitchd: server returned an error
4216 # Test incorrect command: ofproto/trace br_name odp_flow [-generate|packet]
4222 [AT_CHECK([ovs-appctl ofproto/trace br0 "$odp_flow" option],
4224 AT_CHECK([tail -2 stderr], [0], [dnl
4225 Cannot find the datapath
4226 ovs-appctl: ovs-vswitchd: server returned an error
4229 # Test incorrect command: ofproto/trace dp_name br_flow [-generate|packet]
4235 [AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$br_flow" option],
4237 AT_CHECK([tail -2 stderr], [0], [dnl
4239 ovs-appctl: ovs-vswitchd: server returned an error
4242 # Test incorrect command: ofproto/trace br_flow [-generate|packet]
4248 [AT_CHECK([ovs-appctl ofproto/trace "$br_flow" option],
4250 AT_CHECK([tail -2 stderr], [0], [dnl
4251 Must specify bridge name
4252 ovs-appctl: ovs-vswitchd: server returned an error
4255 # Test incorrect command: ofproto/trace dp_name odp_flow garbage_option
4256 AT_CHECK([ovs-appctl ofproto/trace \
4257 ovs-dummy "$odp_flow" garbage_option],
4258 [2], [stdout],[stderr])
4259 AT_CHECK([tail -2 stderr], [0], [dnl
4260 Trailing garbage in packet data
4261 ovs-appctl: ovs-vswitchd: server returned an error
4264 # Test incorrect command: ofproto/trace with 4 arguments
4265 AT_CHECK([ovs-appctl ofproto/trace \
4266 arg1, arg2, arg3, arg4], [2], [stdout],[stderr])
4267 AT_CHECK([tail -2 stderr], [0], [dnl
4268 "ofproto/trace" command takes at most 3 arguments
4269 ovs-appctl: ovs-vswitchd: server returned an error
4272 # Test incorrect command: ofproto/trace with 0 argument
4273 AT_CHECK([ovs-appctl ofproto/trace ], [2], [stdout],[stderr])
4274 AT_CHECK([tail -2 stderr], [0], [dnl
4275 "ofproto/trace" command requires at least 1 arguments
4276 ovs-appctl: ovs-vswitchd: server returned an error
4282 AT_SETUP([ofproto-dpif - ofproto/trace-packet-out])
4284 ADD_OF_PORTS([br0], 1, 2, 3)
4286 AT_DATA([flows.txt], [dnl
4287 in_port=1 actions=output:2
4288 in_port=2 actions=output:1
4290 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
4292 AT_CHECK([ovs-appctl ofproto/trace-packet-out br0 in_port=1 'mod_vlan_vid:123,resubmit(,0)'], [0], [stdout])
4293 AT_CHECK([tail -1 stdout], [0], [dnl
4294 Datapath actions: push_vlan(vid=123,pcp=0),2
4301 m4_define([OFPROTO_TRACE],
4303 AT_CHECK([ovs-appctl ofproto/trace $1 "$flow" $3], [0], [stdout])
4304 actual=`tail -1 stdout | sed 's/Datapath actions: //'`
4306 AT_CHECK([ovs-dpctl normalize-actions "$flow" "$expected" $5],
4309 AT_CHECK([ovs-dpctl normalize-actions "$flow" "$actual" $5],
4312 AT_SETUP([ofproto-dpif - MAC learning])
4313 OVS_VSWITCHD_START([set bridge br0 fail-mode=standalone])
4314 ADD_OF_PORTS([br0], 1, 2, 3)
4316 arp='eth_type(0x0806),arp(sip=192.168.0.1,tip=192.168.0.2,op=1,sha=50:54:00:00:00:05,tha=00:00:00:00:00:00)'
4318 # Trace an ARP packet arriving on p3, to create a MAC learning entry.
4321 [in_port(3),eth(src=50:54:00:00:00:05,dst=ff:ff:ff:ff:ff:ff),$arp],
4325 # Check for the MAC learning entry.
4326 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
4328 3 0 50:54:00:00:00:05 ?
4331 # Trace a packet arrival destined for the learned MAC.
4332 # (This will also learn a MAC.)
4335 [in_port(1),eth(src=50:54:00:00:00:06,dst=50:54:00:00:00:05),$arp],
4339 # Check for both MAC learning entries.
4340 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
4342 3 0 50:54:00:00:00:05 ?
4343 1 0 50:54:00:00:00:06 ?
4346 # Trace a packet arrival that updates the first learned MAC entry.
4349 [in_port(2),eth(src=50:54:00:00:00:05,dst=ff:ff:ff:ff:ff:ff),$arp],
4353 # Check that the MAC learning entry was updated.
4354 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
4356 1 0 50:54:00:00:00:06 ?
4357 2 0 50:54:00:00:00:05 ?
4360 # Add another bridge.
4364 -- set bridge br1 datapath-type=dummy])
4365 ADD_OF_PORTS([br1], 4, 5)
4367 # Trace some packet arrivals in br1 to create MAC learning entries there too.
4370 [in_port(4),eth(src=50:54:00:00:00:06,dst=ff:ff:ff:ff:ff:ff),$arp],
4375 [in_port(5),eth(src=50:54:00:00:00:07,dst=ff:ff:ff:ff:ff:ff),$arp],
4379 # Check that the MAC learning entries were added.
4380 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br1 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
4382 4 0 50:54:00:00:00:06 ?
4383 5 0 50:54:00:00:00:07 ?
4386 # Delete port p1 and see that its MAC learning entry disappeared, and
4387 # that the MAC learning entry for the same MAC was also deleted from br1.
4388 AT_CHECK([ovs-vsctl del-port p1])
4389 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
4391 2 0 50:54:00:00:00:05 ?
4393 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br1 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
4395 5 0 50:54:00:00:00:07 ?
4401 AT_SETUP([ofproto-dpif - MAC table overflow])
4403 [set bridge br0 fail-mode=standalone other-config:mac-table-size=10])
4404 ADD_OF_PORTS([br0], 1, 2, 3)
4406 arp='eth_type(0x0806),arp(sip=192.168.0.1,tip=192.168.0.2,op=1,sha=50:54:00:00:00:05,tha=00:00:00:00:00:00)'
4408 AT_CHECK([ovs-appctl time/stop])
4410 # Trace 10 ARP packets arriving on p3, to create MAC learning entries.
4411 for i in 0 1 2 3 4 5 6 7 8 9; do
4414 [in_port(3),eth(src=50:54:00:00:00:0$i,dst=ff:ff:ff:ff:ff:ff),$arp],
4417 ovs-appctl time/warp 1000
4420 # Check for the MAC learning entries.
4421 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/ *[[0-9]]\{1,\}$//' | sort],
4423 3 0 50:54:00:00:00:00
4424 3 0 50:54:00:00:00:01
4425 3 0 50:54:00:00:00:02
4426 3 0 50:54:00:00:00:03
4427 3 0 50:54:00:00:00:04
4428 3 0 50:54:00:00:00:05
4429 3 0 50:54:00:00:00:06
4430 3 0 50:54:00:00:00:07
4431 3 0 50:54:00:00:00:08
4432 3 0 50:54:00:00:00:09
4436 # Trace another ARP packet on another MAC.
4439 [in_port(3),eth(src=50:54:00:00:00:10,dst=ff:ff:ff:ff:ff:ff),$arp],
4443 # Check that the new one chased the oldest one out of the table.
4444 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/' | sort],
4446 3 0 50:54:00:00:00:01 ?
4447 3 0 50:54:00:00:00:02 ?
4448 3 0 50:54:00:00:00:03 ?
4449 3 0 50:54:00:00:00:04 ?
4450 3 0 50:54:00:00:00:05 ?
4451 3 0 50:54:00:00:00:06 ?
4452 3 0 50:54:00:00:00:07 ?
4453 3 0 50:54:00:00:00:08 ?
4454 3 0 50:54:00:00:00:09 ?
4455 3 0 50:54:00:00:00:10 ?
4461 # CHECK_SFLOW_SAMPLING_PACKET(LOOPBACK_ADDR, ADDR_WITHOUT_BRACKETS)
4463 # Test that sFlow samples packets correctly using IPv4/IPv6 sFlow collector
4465 # IP_VERSION_TYPE is used in AT_SETUP
4466 m4_define([CHECK_SFLOW_SAMPLING_PACKET],
4467 [AT_SETUP([ofproto-dpif - sFlow packet sampling - $2 collector])
4468 AT_XFAIL_IF([test "$IS_WIN32" = "yes"])
4469 OVS_VSWITCHD_START([set Bridge br0 fail-mode=standalone])
4471 ON_EXIT([kill `cat test-sflow.pid`])
4472 AT_CHECK([ovstest test-sflow --log-file --detach --no-chdir --pidfile 0:$1 > sflow.log], [0], [], [ignore])
4473 AT_CAPTURE_FILE([sflow.log])
4474 SFLOW_PORT=`parse_listening_port < test-sflow.log`
4475 ovs-appctl time/stop
4477 ADD_OF_PORTS([br0], 1, 2)
4479 set Interface br0 options:ifindex=1002 -- \
4480 set Interface p1 options:ifindex=1004 -- \
4481 set Interface p2 options:ifindex=1003 -- \
4482 set Bridge br0 sflow=@sf -- \
4483 --id=@sf create sflow targets=\"$1:$SFLOW_PORT\" \
4484 header=128 sampling=1 polling=1 agent=$LOOPBACK_INTERFACE
4486 dnl open with ARP packets to seed the bridge-learning. The output
4487 dnl ifIndex numbers should be reported predictably after that.
4488 dnl Since we set sampling=1 we should see all of these packets
4489 dnl reported. Sorting the output by data-source and seqNo makes
4490 dnl it deterministic. Ensuring that we send at least two packets
4491 dnl into each port means we get to check the seq nos are
4492 dnl incrementing correctly.
4493 dnl because packets from different ports can be handled by separate
4494 dnl threads, put some sleeps
4496 ovs-appctl netdev-dummy/receive p1 'in_port(2),eth(src=50:54:00:00:00:05,dst=FF:FF:FF:FF:FF:FF),eth_type(0x0806),arp(sip=192.168.0.2,tip=192.168.0.1,op=1,sha=50:54:00:00:00:05,tha=00:00:00:00:00:00)'
4498 ovs-appctl netdev-dummy/receive p2 'in_port(1),eth(src=50:54:00:00:00:07,dst=FF:FF:FF:FF:FF:FF),eth_type(0x0806),arp(sip=192.168.0.1,tip=192.168.0.2,op=1,sha=50:54:00:00:00:07,tha=00:00:00:00:00:00)'
4500 ovs-appctl netdev-dummy/receive p1 'in_port(2),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'
4502 ovs-appctl netdev-dummy/receive p2 'in_port(1),eth(src=50:54:00:00:00:07,dst=50:54:00:00:00:05),eth_type(0x0800),ipv4(src=192.168.0.2,dst=192.168.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=0,code=0)'
4503 ovs-appctl netdev-dummy/receive p2 'in_port(1),eth(src=50:54:00:00:00:07,dst=50:54:00:00:00:05),eth_type(0x86dd),ipv6(src=fe80::1,dst=fe80::2,label=0,proto=10,tclass=0x70,hlimit=128,frag=no)'
4505 dnl sleep long enough to get more than one counter sample
4506 dnl from each datasource so we can check sequence numbers
4507 ovs-appctl time/warp 3000 100
4509 ovs-appctl -t test-sflow exit
4511 AT_CHECK_UNQUOTED([[sort sflow.log | $EGREP 'HEADER|ERROR' | sed 's/ /\
4532 hdr=FF-FF-FF-FF-FF-FF-50-54-00-00-00-05-08-06-00-01-08-00-06-04-00-01-50-54-00-00-00-05-C0-A8-00-02-00-00-00-00-00-00-C0-A8-00-01-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
4552 hdr=FF-FF-FF-FF-FF-FF-50-54-00-00-00-07-08-06-00-01-08-00-06-04-00-01-50-54-00-00-00-07-C0-A8-00-01-00-00-00-00-00-00-C0-A8-00-02-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
4572 hdr=50-54-00-00-00-07-50-54-00-00-00-05-08-00-45-00-00-1C-00-00-00-00-40-01-F9-8D-C0-A8-00-01-C0-A8-00-02-08-00-F7-FF-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
4592 hdr=50-54-00-00-00-05-50-54-00-00-00-07-08-00-45-00-00-1C-00-00-00-00-40-01-F9-8D-C0-A8-00-02-C0-A8-00-01-00-00-FF-FF-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
4612 hdr=50-54-00-00-00-05-50-54-00-00-00-07-86-DD-67-00-00-00-00-00-0A-80-FE-80-00-00-00-00-00-00-00-00-00-00-00-00-00-01-FE-80-00-00-00-00-00-00-00-00-00-00-00-00-00-02-00-00-00-00-00-00
4615 AT_CHECK_UNQUOTED([[sort sflow.log | $EGREP 'IFCOUNTERS|ERROR|PORTNAME|OPENFLOWPORT' | head -18 | sed 's/ /\
4629 in_broadcasts=4294967295
4632 in_unknownprotos=4294967295
4635 out_multicasts=4294967295
4636 out_broadcasts=4294967295
4652 in_broadcasts=4294967295
4655 in_unknownprotos=4294967295
4658 out_multicasts=4294967295
4659 out_broadcasts=4294967295
4675 in_broadcasts=4294967295
4678 in_unknownprotos=4294967295
4681 out_multicasts=4294967295
4682 out_broadcasts=4294967295
4698 in_broadcasts=4294967295
4701 in_unknownprotos=4294967295
4704 out_multicasts=4294967295
4705 out_broadcasts=4294967295
4721 in_broadcasts=4294967295
4724 in_unknownprotos=4294967295
4727 out_multicasts=4294967295
4728 out_broadcasts=4294967295
4744 in_broadcasts=4294967295
4747 in_unknownprotos=4294967295
4750 out_multicasts=4294967295
4751 out_broadcasts=4294967295
4756 datapath_id=18364758544493064720
4759 datapath_id=18364758544493064720
4762 datapath_id=18364758544493064720
4765 datapath_id=18364758544493064720
4768 datapath_id=18364758544493064720
4771 datapath_id=18364758544493064720
4788 CHECK_SFLOW_SAMPLING_PACKET([127.0.0.1], [IPv4])
4789 CHECK_SFLOW_SAMPLING_PACKET([[[::1]]], [IPv6])
4791 dnl Test sFlow LAG structures
4792 AT_SETUP([ofproto-dpif - sFlow LACP structures])
4793 AT_SKIP_IF([test "$IS_WIN32" = "yes"])
4794 OVS_VSWITCHD_START([dnl
4795 add-bond br0 bond p1 p2 -- \
4796 set Port bond lacp=active bond-mode=active-backup \
4797 other_config:lacp-time="fast" \
4798 other_config:lacp-system-id=11:22:33:44:55:66 \
4799 other_config:lacp-system-priority=54321 -- \
4800 set Interface p1 type=dummy \
4801 other_config:lacp-port-id=11 \
4802 other_config:lacp-port-priority=111 \
4803 other_config:lacp-aggregation-key=3333 -- \
4804 set Interface p2 type=dummy \
4805 other_config:lacp-port-id=22 \
4806 other_config:lacp-port-priority=222 \
4807 other_config:lacp-aggregation-key=3333 ])
4809 ON_EXIT([kill `cat test-sflow.pid`])
4810 AT_CHECK([ovstest test-sflow --log-file --detach --no-chdir --pidfile 0:127.0.0.1 > sflow.log], [0], [], [ignore])
4811 AT_CAPTURE_FILE([sflow.log])
4812 SFLOW_PORT=`parse_listening_port < test-sflow.log`
4814 ovs-appctl time/stop
4817 set Interface p1 options:ifindex=1003 -- \
4818 set Bridge br0 sflow=@sf -- \
4819 --id=@sf create sflow targets=\"127.0.0.1:$SFLOW_PORT\" \
4820 header=128 sampling=1 polling=1
4822 dnl sleep long enough to get the sFlow datagram flushed out (may be delayed for up to 1 second)
4823 AT_CHECK([ovs-appctl time/warp 2000 100], [0], [ignore])
4824 AT_CHECK([ovs-appctl revalidator/purge], [0])
4826 ovs-appctl -t test-sflow exit
4827 AT_CHECK([[sort sflow.log | $EGREP 'LACPCOUNTERS|ERROR' | head -n 1 | sed 's/ /\
4830 sysID=11:22:33:44:55:66
4831 partnerID=00:00:00:00:00:00
4838 markerPDUsRx=4294967295
4839 markerRespPDUsRx=4294967295
4840 unknownRx=4294967295
4843 markerPDUsTx=4294967295
4844 markerRespPDUsTx=4294967295
4849 # CHECK_NETFLOW_EXPIRATION(LOOPBACK_ADDR, IP_VERSION_TYPE)
4851 # Test that basic NetFlow reports flow statistics correctly:
4852 # The initial packet of a flow are correctly accounted.
4853 # Later packets within a flow are correctly accounted.
4854 # Flow actions changing (in this case, due to MAC learning)
4855 # cause a record to be sent.
4857 # IP_VERSION_TYPE is used in AT_SETUP
4858 m4_define([CHECK_NETFLOW_EXPIRATION],
4859 [AT_SETUP([ofproto-dpif - NetFlow flow expiration - $2 collector])
4860 OVS_VSWITCHD_START([set Bridge br0 fail-mode=standalone])
4861 ADD_OF_PORTS([br0], 1, 2)
4863 ovs-appctl time/stop
4864 ON_EXIT([kill `cat test-netflow.pid`])
4865 AT_CHECK([ovstest test-netflow --log-file --detach --no-chdir --pidfile 0:$1 > netflow.log], [0], [], [ignore])
4866 AT_CAPTURE_FILE([netflow.log])
4867 NETFLOW_PORT=`parse_listening_port < test-netflow.log`
4870 set Bridge br0 netflow=@nf -- \
4871 --id=@nf create NetFlow targets=\"$1:$NETFLOW_PORT\" \
4872 engine_id=1 engine_type=2 active_timeout=30 add-id-to-interface=false
4874 for delay in 1000 30000; do
4875 ovs-appctl netdev-dummy/receive p1 'in_port(2),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'
4876 sleep 1 # ensure the order in which these two packets are processed
4877 ovs-appctl netdev-dummy/receive p2 'in_port(1),eth(src=50:54:00:00:00:07,dst=50:54:00:00:00:05),eth_type(0x0800),ipv4(src=192.168.0.2,dst=192.168.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=0,code=0)'
4879 ovs-appctl time/warp $delay
4882 ovs-appctl time/warp 6000
4883 ovs-appctl revalidator/wait
4885 ovs-appctl -t test-netflow exit
4887 AT_CHECK([test `grep "192.168.0.1 > 192.168.0.2, if 1 > 65535, 1 pkts, 60 bytes, ICMP 8:0" netflow.log | wc -l` -eq 1])
4889 AT_CHECK([test `grep "192.168.0.1 > 192.168.0.2, if 1 > 2, 1 pkts, 60 bytes, ICMP 8:0" netflow.log | wc -l` -eq 1])
4891 combined=`grep "192.168.0.2 > 192.168.0.1, if 2 > 1, 2 pkts, 120 bytes, ICMP 0:0" netflow.log | wc -l`
4892 separate=`grep "192.168.0.2 > 192.168.0.1, if 2 > 1, 1 pkts, 60 bytes, ICMP 0:0" netflow.log | wc -l`
4893 AT_CHECK([test $separate = 2 || test $combined = 1], [0])
4897 CHECK_NETFLOW_EXPIRATION([127.0.0.1], [IPv4])
4898 CHECK_NETFLOW_EXPIRATION([[[::1]]], [IPv6])
4900 # CHECK_NETFLOW_ACTIVE_EXPIRATION(LOOPBACK_ADDR, IP_VERSION_TYPE)
4902 # Test that basic NetFlow reports active expirations correctly.
4904 # IP_VERSION_TYPE is used in AT_SETUP
4905 m4_define([CHECK_NETFLOW_ACTIVE_EXPIRATION],
4906 [AT_SETUP([ofproto-dpif - NetFlow active expiration - $2 collector])
4908 OVS_VSWITCHD_START([set Bridge br0 fail-mode=standalone])
4909 ADD_OF_PORTS([br0], 1, 2)
4911 ON_EXIT([kill `cat test-netflow.pid`])
4912 AT_CHECK([ovstest test-netflow --log-file --detach --no-chdir --pidfile 0:$1 > netflow.log], [0], [], [ignore])
4913 AT_CAPTURE_FILE([netflow.log])
4914 NETFLOW_PORT=`parse_listening_port < test-netflow.log`
4917 set Bridge br0 netflow=@nf -- \
4918 --id=@nf create NetFlow targets=\"$1:$NETFLOW_PORT\" \
4919 engine_id=1 engine_type=2 active_timeout=10 add-id-to-interface=false
4921 AT_CHECK([ovs-appctl time/stop])
4923 while test $n -le 60; do
4926 ovs-appctl netdev-dummy/receive p1 'in_port(2),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=1234,dst=80)'
4927 ovs-appctl netdev-dummy/receive p2 'in_port(1),eth(src=50:54:00:00:00:07,dst=50:54:00:00:00:05),eth_type(0x0800),ipv4(src=192.168.0.2,dst=192.168.0.1,proto=6,tos=0,ttl=64,frag=no),tcp(src=80,dst=1234)'
4929 ovs-appctl time/warp 1000
4932 ovs-appctl time/warp 10000
4934 ovs-appctl revalidator/wait
4936 ovs-appctl -t test-netflow exit
4938 # Count the number of reported packets:
4939 # - From source to destination before MAC learning kicks in (just one).
4940 # - From source to destination after that.
4941 # - From destination to source.
4949 pkts=`echo "$line" | sed 's/.*, \([[0-9]]*\) pkts,.*/\1/'`
4956 "seq "*": 192.168.0.1 > 192.168.0.2, if 1 > 65535, "*" pkts, "*" bytes, TCP 1234 > 80, time "*)
4959 "seq "*": 192.168.0.1 > 192.168.0.2, if 1 > 2, "*" pkts, "*" bytes, TCP 1234 > 80, time "*)
4962 "seq "*": 192.168.0.2 > 192.168.0.1, if 2 > 1, "*" pkts, "*" bytes, TCP 80 > 1234, time "*)
4969 eval $counter=\`expr \$$counter + \$pkts\`
4970 n_recs=`expr $n_recs + 1`
4973 # There should be exactly 1 MAC learning packet,
4974 # exactly 59 other packets in that direction,
4975 # and exactly 60 packets in the other direction.
4976 AT_CHECK([echo $n_learn $n_in $n_out $n_other], [0], [1 59 60 0
4981 CHECK_NETFLOW_ACTIVE_EXPIRATION([127.0.0.1], [IPv4])
4982 CHECK_NETFLOW_ACTIVE_EXPIRATION([[[::1]]], [IPv6])
4984 AT_SETUP([ofproto-dpif - flow stats])
4986 AT_CHECK([ovs-ofctl add-flow br0 "ip,actions=NORMAL"])
4987 AT_CHECK([ovs-ofctl add-flow br0 "icmp,actions=NORMAL"])
4989 ovs-appctl time/stop
4991 for i in `seq 1 10`; do
4992 ovs-appctl netdev-dummy/receive br0 'in_port(0),eth(src=50:54:00:00:00:07,dst=50:54:00:00:00:05),eth_type(0x0800),ipv4(src=192.168.0.2,dst=192.168.0.1,proto=6,tos=0,ttl=64,frag=no)'
4995 AT_CHECK([ovs-appctl time/warp 1000], [0], [ignore])
4996 AT_CHECK([ovs-appctl revalidator/purge], [0])
4997 AT_CHECK([ovs-ofctl dump-flows br0], [0], [stdout])
4998 AT_CHECK([STRIP_XIDS stdout | sed -n 's/duration=[[0-9]]*\.[[0-9]]*s/duration=0.0s/p' | sort], [0], [dnl
4999 cookie=0x0, duration=0.0s, table=0, n_packets=0, n_bytes=0, idle_age=1, icmp actions=NORMAL
5000 cookie=0x0, duration=0.0s, table=0, n_packets=10, n_bytes=600, idle_age=1, ip actions=NORMAL
5005 AT_SETUP([ofproto-dpif - flow stats, set-n-threads])
5007 AT_CHECK([ovs-ofctl add-flow br0 "ip,actions=NORMAL"])
5008 AT_CHECK([ovs-ofctl add-flow br0 "icmp,actions=NORMAL"])
5010 ovs-appctl time/stop
5012 for i in `seq 1 10`; do
5013 ovs-appctl netdev-dummy/receive br0 'in_port(0),eth(src=50:54:00:00:00:07,dst=50:54:00:00:00:05),eth_type(0x0800),ipv4(src=192.168.0.2,dst=192.168.0.1,proto=6,tos=0,ttl=64,frag=no)'
5016 ovs-appctl time/warp 100
5017 AT_CHECK([ovs-vsctl set Open_vSwitch . other-config:n-revalidator-threads=2])
5018 ovs-appctl time/warp 1000
5020 AT_CHECK([ovs-ofctl dump-flows br0], [0], [stdout])
5021 AT_CHECK([STRIP_XIDS stdout | sed -n 's/duration=[[0-9]]*\.[[0-9]]*s/duration=0.0s/p' | sort], [0], [dnl
5022 cookie=0x0, duration=0.0s, table=0, n_packets=0, n_bytes=0, idle_age=1, icmp actions=NORMAL
5023 cookie=0x0, duration=0.0s, table=0, n_packets=10, n_bytes=600, idle_age=1, ip actions=NORMAL
5028 AT_SETUP([idle_age and hard_age increase over time])
5031 # get_ages DURATION HARD IDLE
5033 # Fetch the flow duration, hard age, and idle age into the variables
5034 # whose names are given as arguments. Rounds DURATION down to the
5035 # nearest integer. If hard_age doesn't appear in the output, sets
5036 # HARD to "none". If idle_age doesn't appear in the output, sets IDLE
5039 AT_CHECK([ovs-ofctl dump-flows br0], [0], [stdout])
5041 duration=`sed -n 's/.*duration=\([[0-9]]*\)\(\.[[0-9]]*\)\{0,1\}s.*/\1/p' stdout`
5042 AT_CHECK([[expr X"$duration" : 'X[0-9][0-9]*$']], [0], [ignore])
5043 AS_VAR_COPY([$1], [duration])
5045 hard=`sed -n 's/.*hard_age=\([[0-9]]*\),.*/\1/p' stdout`
5046 if test X"$hard" = X; then
5049 AT_CHECK([[expr X"$hard" : 'X[0-9][0-9]*$']], [0], [ignore])
5051 AS_VAR_COPY([$2], [hard])
5053 idle=`sed -n 's/.*idle_age=\([[0-9]]*\),.*/\1/p' stdout`
5054 if test X"$idle" = X; then
5057 AT_CHECK([[expr X"$idle" : 'X[0-9][0-9]*$']], [0], [ignore])
5059 AS_VAR_COPY([$3], [idle])
5062 # Add a flow and get its initial hard and idle age.
5063 AT_CHECK([ovs-ofctl add-flow br0 hard_timeout=199,idle_timeout=188,actions=drop])
5064 get_ages duration1 hard1 idle1
5066 ovs-appctl time/stop
5067 # Warp time forward by 10 seconds, then modify the flow's actions.
5068 ovs-appctl time/warp 10000
5069 get_ages duration2 hard2 idle2
5070 AT_CHECK([ovs-ofctl mod-flows br0 actions=flood])
5072 # Warp time forward by 10 seconds.
5073 ovs-appctl time/warp 10000
5074 get_ages duration3 hard3 idle3
5076 # Warp time forward 10 more seconds, then pass some packets through the flow,
5077 # then warp forward a few more times because idle times are only updated
5079 ovs-appctl time/warp 10000
5080 ovs-appctl netdev-dummy/receive br0 'in_port(0),eth(src=50:54:00:00:00:07,dst=50:54:00:00:00:05),eth_type(0x0800),ipv4(src=192.168.0.2,dst=192.168.0.1,proto=6,tos=0,ttl=64,frag=no),tcp(src=80,dst=1234)'
5081 ovs-appctl time/warp 3000 1000
5083 get_ages duration4 hard4 idle4
5085 printf "duration: %4s => %4s => %4s => %4s\n" $duration1 $duration2 $duration3 $duration4
5086 printf "hard_age: %4s => %4s => %4s => %4s\n" $hard1 $hard2 $hard3 $hard4
5087 printf "idle_age: %4s => %4s => %4s => %4s\n" $idle1 $idle2 $idle3 $idle4
5089 # Duration should increase steadily over time.
5090 AT_CHECK([test $duration1 -lt $duration2])
5091 AT_CHECK([test $duration2 -lt $duration3])
5092 AT_CHECK([test $duration3 -lt $duration4])
5094 # Hard age should be "none" initially because it's the same as flow_duration,
5095 # then it should increase.
5096 AT_CHECK([test $hard1 = none])
5097 AT_CHECK([test $hard2 = none])
5098 AT_CHECK([test $hard3 != none])
5099 AT_CHECK([test $hard4 != none])
5100 AT_CHECK([test $hard3 -lt $hard4])
5102 # Idle age should increase from 1 to 2 to 3, then decrease.
5103 AT_CHECK([test $idle1 -lt $idle2])
5104 AT_CHECK([test $idle2 -lt $idle3])
5105 AT_CHECK([test $idle3 -gt $idle4])
5107 # Check some invariant relationships.
5108 AT_CHECK([test $duration1 = $idle1])
5109 AT_CHECK([test $duration2 = $idle2])
5110 AT_CHECK([test $duration3 = $idle3])
5111 AT_CHECK([test $idle3 -gt $hard3])
5112 AT_CHECK([test $idle4 -lt $hard4])
5113 AT_CHECK([test $hard4 -lt $duration4])
5118 AT_SETUP([ofproto-dpif - fin_timeout])
5120 ovs-appctl time/stop
5121 AT_CHECK([ovs-ofctl add-flow br0 'idle_timeout=60,actions=fin_timeout(idle_timeout=5)'])
5122 AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip], [0],
5124 idle_timeout=60, actions=fin_timeout(idle_timeout=5)
5127 # Check that a TCP SYN packet does not change the timeout. (Because
5128 # flow stats updates are mainly what implements the fin_timeout
5129 # feature, we warp forward a couple of times to ensure that flow stats
5130 # run before re-checking the flow table.)
5131 AT_CHECK([ovs-appctl netdev-dummy/receive br0 0021853763af0026b98cb0f908004500003c2e2440004006465dac11370dac11370b828b0016751e267b00000000a00216d017360000020405b40402080a2d25085f0000000001030307])
5132 AT_CHECK([ovs-appctl time/warp 1000 && ovs-appctl time/warp 1000], [0], [warped
5135 AT_CHECK([ovs-appctl revalidator/purge], [0])
5136 AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip], [0],
5138 n_packets=1, n_bytes=74, idle_timeout=60, actions=fin_timeout(idle_timeout=5)
5140 # Check that a TCP FIN packet does change the timeout.
5141 AT_CHECK([ovs-appctl netdev-dummy/receive br0 0021853763af0026b98cb0f90800451000342e3e40004006463bac11370dac11370b828b0016751e319dfc96399b801100717ae800000101080a2d250a9408579588])
5142 AT_CHECK([ovs-appctl time/warp 1000 && ovs-appctl time/warp 1000], [0], [warped
5145 AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip], [0],
5147 n_packets=2, n_bytes=140, idle_timeout=5, actions=fin_timeout(idle_timeout=5)
5152 AT_SETUP([ofproto-dpif - ovs-appctl dpif/dump-dps])
5153 OVS_VSWITCHD_START([add-br br1 -- set bridge br1 datapath-type=dummy])
5154 ADD_OF_PORTS([br0], [1], [2])
5155 ADD_OF_PORTS([br1], [3])
5157 AT_CHECK([ovs-appctl dpif/dump-dps], [0], [dnl
5164 AT_SETUP([ofproto-dpif - ovs-appctl dpif/show])
5165 OVS_VSWITCHD_START([add-br br1 -- set bridge br1 datapath-type=dummy])
5166 ADD_OF_PORTS([br0], [1], [2])
5167 ADD_OF_PORTS([br1], [3])
5169 AT_CHECK([ovs-appctl dpif/show], [0], [dnl
5170 dummy@ovs-dummy: hit:0 missed:0
5172 br0 65534/100: (dummy)
5176 br1 65534/101: (dummy)
5182 AT_SETUP([ofproto-dpif - ovs-appctl dpif/dump-flows])
5183 # bump max-idle to avoid the flows being reclaimed behind us
5184 OVS_VSWITCHD_START([add-br br1 -- \
5185 set bridge br1 datapath-type=dummy fail-mode=secure -- \
5186 set Open_vSwitch . other_config:max-idle=10000])
5187 ADD_OF_PORTS([br0], [1], [2])
5188 ADD_OF_PORTS([br1], [3])
5190 AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
5191 AT_CHECK([ovs-appctl netdev-dummy/receive p2 'in_port(2),eth(src=50:54:00:00:00:07,dst=50:54:00:00:00:05),eth_type(0x0800),ipv4(src=192.168.0.2,dst=192.168.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=0,code=0)'])
5192 AT_CHECK([ovs-appctl netdev-dummy/receive p3 'in_port(3),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
5193 ovs-appctl revalidator/wait
5194 AT_CHECK([ovs-appctl dpif/dump-flows br0 | STRIP_UFID | STRIP_USED | sort], [0], [dnl
5195 recirc_id(0),in_port(1),eth_type(0x0800),ipv4(frag=no), packets:0, bytes:0, used:never, actions:drop
5196 recirc_id(0),in_port(2),eth_type(0x0800),ipv4(frag=no), packets:0, bytes:0, used:never, actions:drop
5199 AT_CHECK([ovs-appctl dpif/dump-flows br1 | STRIP_UFID | STRIP_USED | sort], [0], [dnl
5200 recirc_id(0),in_port(3),eth_type(0x0800),ipv4(frag=no), packets:0, bytes:0, used:never, actions:drop
5203 AT_CHECK([ovs-appctl dpif/dump-flows -m br0 | STRIP_UFID | STRIP_USED | sort], [0], [dnl
5204 skb_priority(0/0),skb_mark(0/0),recirc_id(0),dp_hash(0/0),in_port(p1),eth(src=50:54:00:00:00:05/00:00:00:00:00:00,dst=50:54:00:00:00:07/00:00:00:00:00:00),eth_type(0x0800),ipv4(src=192.168.0.1/0.0.0.0,dst=192.168.0.2/0.0.0.0,proto=1/0,tos=0/0,ttl=64/0,frag=no),icmp(type=8/0,code=0/0), packets:0, bytes:0, used:never, actions:drop
5205 skb_priority(0/0),skb_mark(0/0),recirc_id(0),dp_hash(0/0),in_port(p2),eth(src=50:54:00:00:00:07/00:00:00:00:00:00,dst=50:54:00:00:00:05/00:00:00:00:00:00),eth_type(0x0800),ipv4(src=192.168.0.2/0.0.0.0,dst=192.168.0.1/0.0.0.0,proto=1/0,tos=0/0,ttl=64/0,frag=no),icmp(type=0/0,code=0/0), packets:0, bytes:0, used:never, actions:drop
5208 AT_CHECK([ovs-appctl dpif/dump-flows -m br1 | STRIP_UFID | STRIP_USED | sort], [0], [dnl
5209 skb_priority(0/0),skb_mark(0/0),recirc_id(0),dp_hash(0/0),in_port(p3),eth(src=50:54:00:00:00:09/00:00:00:00:00:00,dst=50:54:00:00:00:0a/00:00:00:00:00:00),eth_type(0x0800),ipv4(src=10.0.0.2/0.0.0.0,dst=10.0.0.1/0.0.0.0,proto=1/0,tos=0/0,ttl=64/0,frag=no),icmp(type=8/0,code=0/0), packets:0, bytes:0, used:never, actions:drop
5215 AT_SETUP([ofproto-dpif - ovs-appctl dpif/get-flow])
5217 OVS_VSWITCHD_START([add-br br1 -- \
5218 set bridge br1 datapath-type=dummy fail-mode=secure -- \
5219 set Open_vSwitch . other_config:max-idle=10000])
5220 ADD_OF_PORTS([br0], [1], [2])
5222 AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
5223 ovs-appctl revalidator/wait
5224 AT_CHECK([ovs-appctl dpif/dump-flows -m br0], [0], [stdout])
5226 UFID=`sed -n 's/\(ufid:[[0-9a-fA-F]]*\).*/\1/p' stdout`
5227 AT_CHECK([ovs-appctl dpctl/get-flow $UFID], [0], [dnl
5228 recirc_id(0),in_port(1),eth_type(0x0800),ipv4(frag=no), packets:0, bytes:0, used:never, actions:drop
5234 AT_SETUP([ofproto-dpif - MPLS actions that result in a userspace action])
5235 OVS_VSWITCHD_START([dnl
5236 add-port br0 p1 -- set Interface p1 type=dummy
5238 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5239 ON_EXIT([kill `cat ovs-ofctl.pid`])
5241 AT_CAPTURE_FILE([ofctl_monitor.log])
5242 AT_DATA([flows.txt], [dnl
5243 dl_src=60:66:66:66:66:00 actions=push_mpls:0x8847,controller
5244 dl_src=60:66:66:66:66:01 actions=pop_mpls:0x8849,controller
5246 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5248 dnl Packet is sent to userspace because a MPLS push or pop action is applied to
5249 dnl a packet with 2 MPLS LSEs but dpif-netdev can't handle any labels.
5251 dnl The input is a frame with two MPLS labels which tcpdump -vve shows as:
5252 dnl 60:66:66:66:66:00 > 50:54:00:00:00:07, ethertype MPLS unicast (0x8847), length 74: MPLS (label 20, exp 0, ttl 32)
5253 dnl (label 20, exp 0, [S], ttl 32)
5254 dnl (tos 0x0, ttl 64, id 0, offset 0, flags [none], proto TCP (6), length 44, bad cksum 3b78 (->f978)!)
5255 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
5257 for dl_src in 00 01; do
5258 AT_CHECK([ovs-appctl netdev-dummy/receive p1 "505400000007 6066666666$dl_src 8847 00014020 00014120 45 00 00 2c 00 00 00 00 40 06 3b 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45"])
5260 sleep 1 # wait for the datapath flow installed
5261 AT_CHECK_UNQUOTED([cat ovs-vswitchd.log | STRIP_UFID | FILTER_FLOW_INSTALL | STRIP_USED], [0], [dnl
5262 recirc_id=0,mpls,in_port=1,dl_src=60:66:66:66:66:00,mpls_label=20,mpls_tc=0,mpls_ttl=32,mpls_bos=0,mpls_lse1=82208, actions:userspace(pid=0,slow_path(controller))
5263 recirc_id=0,mpls,in_port=1,dl_src=60:66:66:66:66:01,mpls_bos=0,mpls_lse1=82208, actions:userspace(pid=0,slow_path(controller))
5270 AT_SETUP([ofproto-dpif - MPLS actions that result in a drop])
5271 OVS_VSWITCHD_START([dnl
5272 add-port br0 p1 -- set Interface p1 type=dummy
5274 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5275 ON_EXIT([kill `cat ovs-ofctl.pid`])
5277 AT_CAPTURE_FILE([ofctl_monitor.log])
5278 AT_DATA([flows.txt], [dnl
5279 dl_src=60:66:66:66:66:00 actions=push_mpls:0x8847,controller
5280 dl_src=60:66:66:66:66:01 actions=pop_mpls:0x8849,controller
5282 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5284 dnl Packet is dropped because an MPLS PUSH action is applied to a packet with
5285 dnl 4 MPLS LSEs but ovs-vswtichd can only handle up to 3 MPLS LSEs and thus
5286 dnl can't determine the resulting MPLS label after MPLS push/pop actions.
5288 dnl The input is a frame with two MPLS headers which tcpdump -vve shows as:
5289 dnl 60:66:66:66:66:01 > 50:54:00:00:00:07, ethertype MPLS unicast (0x8847), length 74: MPLS (label 20, exp 0, ttl 32)
5290 dnl (label 20, exp 0, ttl 32)
5291 dnl (label 20, exp 0, ttl 32)
5292 dnl (label 20, exp 0, [S], ttl 32)
5293 dnl (tos 0x0, ttl 64, id 0, offset 0, flags [none], proto TCP (6), length 44, bad cksum 3b78 (->f978)!)
5294 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
5296 for dl_src in 00 01; do
5297 AT_CHECK([ovs-appctl netdev-dummy/receive p1 "505400000007 6066666666$dl_src 8847 00014020 00014120 45 00 00 2c 00 00 00 00 40 06 3b 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45"])
5299 sleep 1 # wait for the datapath flow installed
5300 AT_CHECK_UNQUOTED([cat ovs-vswitchd.log | STRIP_UFID | FILTER_FLOW_INSTALL | STRIP_USED], [0], [dnl
5301 recirc_id=0,mpls,in_port=1,dl_src=60:66:66:66:66:00,mpls_label=20,mpls_tc=0,mpls_ttl=32,mpls_bos=0,mpls_lse1=82208, actions:userspace(pid=0,slow_path(controller))
5302 recirc_id=0,mpls,in_port=1,dl_src=60:66:66:66:66:01,mpls_bos=0,mpls_lse1=82208, actions:userspace(pid=0,slow_path(controller))
5308 AT_SETUP([ofproto-dpif - patch ports])
5309 OVS_VSWITCHD_START([add-br br1 \
5310 -- set bridge br1 datapath-type=dummy fail-mode=secure \
5311 -- add-port br1 pbr1 -- set int pbr1 type=patch options:peer=pbr0 \
5312 -- add-port br0 pbr0 -- set int pbr0 type=patch options:peer=pbr1])
5314 ADD_OF_PORTS([br0], [2])
5315 ADD_OF_PORTS([br1], [3])
5317 AT_CHECK([ovs-appctl upcall/disable-ufid], [0], [Datapath dumping tersely using UFID disabled
5319 AT_CHECK([ovs-appctl time/stop])
5320 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5322 AT_CHECK([ovs-ofctl add-flow br0 actions=LOCAL,output:1,output:2])
5323 AT_CHECK([ovs-ofctl add-flow br1 actions=LOCAL,output:1,output:3])
5325 for i in $(seq 1 10); do
5326 ovs-appctl netdev-dummy/receive br0 'in_port(100),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'
5327 if [[ $i -eq 1 ]]; then
5332 for i in $(seq 1 5); do
5333 ovs-appctl netdev-dummy/receive br1 'in_port(101),eth(src=50:54:00:00:00:07,dst=50:54:00:00:00:05),eth_type(0x0800),ipv4(src=192.168.0.2,dst=192.168.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'
5334 if [[ $i -eq 1 ]]; then
5339 AT_CHECK([ovs-appctl time/warp 500], [0],
5342 sleep 1 # wait for log writer
5344 AT_CHECK([ovs-appctl dpif/show], [0], [dnl
5345 dummy@ovs-dummy: hit:13 missed:2
5347 br0 65534/100: (dummy)
5349 pbr0 1/none: (patch: peer=pbr1)
5351 br1 65534/101: (dummy)
5353 pbr1 1/none: (patch: peer=pbr0)
5356 AT_CHECK([cat ovs-vswitchd.log | STRIP_UFID | FILTER_FLOW_INSTALL | STRIP_USED], [0], [dnl
5357 recirc_id=0,ip,in_port=100,nw_frag=no, actions:101,3,2
5358 recirc_id=0,ip,in_port=101,nw_frag=no, actions:100,2,3
5361 AT_CHECK([cat ovs-vswitchd.log | grep -e 'in_port(100).*packets:9' | STRIP_UFID | FILTER_FLOW_DUMP], [0], [dnl
5362 skb_priority(0/0),skb_mark(0/0),recirc_id(0),dp_hash(0/0),in_port(100),eth(src=50:54:00:00:00:05/00:00:00:00:00:00,dst=50:54:00:00:00:07/00:00:00:00:00:00),eth_type(0x0800),ipv4(src=192.168.0.1/0.0.0.0,dst=192.168.0.2/0.0.0.0,proto=1/0,tos=0/0,ttl=64/0,frag=no),icmp(type=8/0,code=0/0), packets:9, bytes:540, used:0.0s, actions:101,3,2
5364 AT_CHECK([cat ovs-vswitchd.log | grep -e 'in_port(101).*packets:4' | STRIP_UFID | FILTER_FLOW_DUMP], [0], [dnl
5365 skb_priority(0/0),skb_mark(0/0),recirc_id(0),dp_hash(0/0),in_port(101),eth(src=50:54:00:00:00:07/00:00:00:00:00:00,dst=50:54:00:00:00:05/00:00:00:00:00:00),eth_type(0x0800),ipv4(src=192.168.0.2/0.0.0.0,dst=192.168.0.1/0.0.0.0,proto=1/0,tos=0/0,ttl=64/0,frag=no),icmp(type=8/0,code=0/0), packets:4, bytes:240, used:0.0s, actions:100,2,3
5368 AT_CHECK([ovs-ofctl dump-ports br0 pbr0], [0], [dnl
5369 OFPST_PORT reply (xid=0x4): 1 ports
5370 port 1: rx pkts=5, bytes=300, drop=0, errs=0, frame=0, over=0, crc=0
5371 tx pkts=10, bytes=600, drop=0, errs=0, coll=0
5374 AT_CHECK([ovs-ofctl dump-ports br1 pbr1], [0], [dnl
5375 OFPST_PORT reply (xid=0x4): 1 ports
5376 port 1: rx pkts=10, bytes=600, drop=0, errs=0, frame=0, over=0, crc=0
5377 tx pkts=5, bytes=300, drop=0, errs=0, coll=0
5383 AT_SETUP([ofproto-dpif - port duration])
5384 OVS_VSWITCHD_START([set Bridge br0 protocols=OpenFlow13])
5385 ADD_OF_PORTS([br0], 1, 2)
5387 ovs-appctl time/stop
5388 ovs-appctl time/warp 10000
5390 AT_CHECK([ovs-ofctl -O openflow13 dump-ports br0], [0], [stdout])
5391 AT_CHECK([sed -n 's/=[[0-9]][[0-9]]\(\.[[0-9]][[0-9]]*\)\{0,1\}s/=?s/p' stdout], [0],
5400 dnl ----------------------------------------------------------------------
5401 AT_BANNER([ofproto-dpif -- megaflows])
5403 AT_SETUP([ofproto-dpif megaflow - port classification])
5405 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5406 ADD_OF_PORTS([br0], [1], [2])
5407 AT_DATA([flows.txt], [dnl
5408 table=0 in_port=1 actions=output(2)
5410 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5411 AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
5413 AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4,dst=10.0.0.3,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
5415 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5416 recirc_id=0,ip,in_port=1,nw_frag=no, actions: <del>
5421 AT_SETUP([ofproto-dpif megaflow - L2 classification])
5423 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5424 ADD_OF_PORTS([br0], [1], [2])
5425 AT_DATA([flows.txt], [dnl
5426 table=0 in_port=1,dl_src=50:54:00:00:00:09 actions=output(2)
5428 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5429 AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
5430 AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4,dst=10.0.0.3,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
5432 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5433 recirc_id=0,ip,in_port=1,dl_src=50:54:00:00:00:09,nw_frag=no, actions: <del>
5434 recirc_id=0,ip,in_port=1,dl_src=50:54:00:00:00:0b/ff:ff:00:00:00:02,nw_frag=no, actions: <del>
5439 AT_SETUP([ofproto-dpif megaflow - L3 classification])
5441 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5442 ADD_OF_PORTS([br0], [1], [2])
5443 AT_CHECK([ovs-vsctl set Bridge br0 flow_tables:0=@N1 -- --id=@N1 create Flow_Table name=t0 prefixes=nw_dst,nw_src], [0], [ignore], [])
5444 AT_DATA([flows.txt], [dnl
5445 table=0 in_port=1,icmp,nw_src=10.0.0.4 actions=output(2)
5447 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5448 AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
5449 AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4,dst=10.0.0.3,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
5451 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5452 recirc_id=0,icmp,in_port=1,nw_src=10.0.0.4,nw_frag=no, actions: <del>
5453 recirc_id=0,ip,in_port=1,nw_src=10.0.0.2/0.0.0.2,nw_frag=no, actions: <del>
5458 AT_SETUP([ofproto-dpif megaflow - IPv6 classification])
5460 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5461 ADD_OF_PORTS([br0], [1], [2])
5462 AT_CHECK([ovs-vsctl set Bridge br0 flow_tables:0=@N1 -- --id=@N1 create Flow_Table name=t0 prefixes=ipv6_dst,ipv6_src], [0], [ignore], [])
5463 AT_DATA([flows.txt], [dnl
5464 table=0 in_port=1,ipv6,ipv6_src=2001:db8:3c4d:1:2:3:4:5 actions=output(2)
5466 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5467 AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:07,dst=50:54:00:00:00:05),eth_type(0x86dd),ipv6(src=2001:db8:3c4d:1:2:3:4:5,dst=fe80::2,label=0,proto=10,tclass=0x70,hlimit=128,frag=no)'])
5468 AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x86dd),ipv6(src=2001:db8:3c4d:5:4:3:2:1,dst=2001:db8:3c4d:1:2:3:4:1,label=0,proto=99,tclass=0x70,hlimit=64,frag=no)'])
5470 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5471 recirc_id=0,ipv6,in_port=1,ipv6_src=2001:db8:3c4d:1:2:3:4:5,nw_frag=no, actions: <del>
5472 recirc_id=0,ipv6,in_port=1,ipv6_src=2001:db8:3c4d:5:4:3:2:1/ffff:ffff:0:4::,nw_frag=no, actions: <del>
5477 AT_SETUP([ofproto-dpif megaflow - L4 classification])
5479 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5480 ADD_OF_PORTS([br0], [1], [2])
5481 AT_DATA([flows.txt], [dnl
5482 table=0 in_port=1,icmp,icmp_type=8 actions=output(2)
5484 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5485 AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
5487 AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4,dst=10.0.0.3,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
5489 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5490 recirc_id=0,icmp,in_port=1,nw_frag=no,icmp_type=0x8/0xff, actions: <del>
5495 AT_SETUP([ofproto-dpif megaflow - normal])
5497 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5498 ADD_OF_PORTS([br0], [1], [2])
5499 AT_CHECK([ovs-ofctl add-flow br0 action=normal])
5500 AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
5501 AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4,dst=10.0.0.3,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
5503 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5504 recirc_id=0,ip,in_port=1,vlan_tci=0x0000/0x1fff,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,nw_frag=no, actions: <del>
5505 recirc_id=0,ip,in_port=1,vlan_tci=0x0000/0x1fff,dl_src=50:54:00:00:00:0b,dl_dst=50:54:00:00:00:0c,nw_frag=no, actions: <del>
5510 AT_SETUP([ofproto-dpif megaflow - mpls])
5512 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5513 ADD_OF_PORTS([br0], [1], [2])
5514 AT_DATA([flows.txt], [dnl
5515 table=0 dl_src=50:54:00:00:00:09 actions=push_mpls:0x8847,2
5516 table=0 dl_src=50:54:00:00:00:0b actions=pop_mpls:0x0800,2
5518 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5519 AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x8847),mpls(label=11,tc=3,ttl=64,bos=1)'])
5520 AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0a),eth_type(0x8847),mpls(label=11,tc=3,ttl=64,bos=1)'])
5522 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5523 recirc_id=0,mpls,in_port=1,dl_src=50:54:00:00:00:09,mpls_label=11,mpls_tc=3,mpls_ttl=64,mpls_bos=1, actions: <del>
5524 recirc_id=0,mpls,in_port=1,dl_src=50:54:00:00:00:0b,mpls_bos=1, actions: <del>
5529 # CHECK_MEGAFLOW_NETFLOW(LOOPBACK_ADDR, IP_VERSION_TYPE)
5531 # IP_VERSION_TYPE is used in AT_SETUP
5532 m4_define([CHECK_MEGAFLOW_NETFLOW],
5533 [AT_SETUP([ofproto-dpif megaflow - netflow - $2 collector])
5535 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5536 ADD_OF_PORTS([br0], [1], [2])
5538 dnl NetFlow configuration disables wildcarding relevant fields
5539 ON_EXIT([kill `cat test-netflow.pid`])
5540 AT_CHECK([ovstest test-netflow --log-file --detach --no-chdir --pidfile 0:$1 > netflow.log], [0], [], [ignore])
5541 AT_CAPTURE_FILE([netflow.log])
5542 NETFLOW_PORT=`parse_listening_port < test-netflow.log`
5544 set Bridge br0 netflow=@nf -- \
5545 --id=@nf create NetFlow targets=\"$1:$NETFLOW_PORT\" \
5546 engine_id=1 engine_type=2 active_timeout=30 add-id-to-interface=false
5548 AT_CHECK([ovs-ofctl add-flow br0 action=normal])
5549 AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
5550 AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4,dst=10.0.0.3,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
5552 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5553 recirc_id=0,icmp,in_port=1,vlan_tci=0x0000/0x1fff,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,nw_src=10.0.0.2,nw_dst=10.0.0.1,nw_tos=0,nw_frag=no,icmp_type=0x8/0xff,icmp_code=0x0/0xff, actions: <del>
5554 recirc_id=0,icmp,in_port=1,vlan_tci=0x0000/0x1fff,dl_src=50:54:00:00:00:0b,dl_dst=50:54:00:00:00:0c,nw_src=10.0.0.4,nw_dst=10.0.0.3,nw_tos=0,nw_frag=no,icmp_type=0x8/0xff,icmp_code=0x0/0xff, actions: <del>
5559 CHECK_MEGAFLOW_NETFLOW([127.0.0.1], [IPv4])
5560 CHECK_MEGAFLOW_NETFLOW([[[::1]]], [IPv6])
5562 AT_SETUP([ofproto-dpif megaflow - normal, active-backup bonding])
5564 [add-port br0 p1 -- set Interface p1 type=dummy ofport_request=1 -- \
5565 add-bond br0 bond0 p2 p3 bond_mode=active-backup -- \
5566 set interface p2 type=dummy ofport_request=2 -- \
5567 set interface p3 type=dummy ofport_request=3])
5568 AT_CHECK([ovs-appctl netdev-dummy/set-admin-state up], 0, [OK
5570 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5572 AT_CHECK([ovs-ofctl add-flow br0 action=normal])
5573 AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
5574 AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4,dst=10.0.0.3,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
5576 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5577 recirc_id=0,ip,in_port=1,vlan_tci=0x0000/0x1fff,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,nw_frag=no, actions: <del>
5578 recirc_id=0,ip,in_port=1,vlan_tci=0x0000/0x1fff,dl_src=50:54:00:00:00:0b,dl_dst=50:54:00:00:00:0c,nw_frag=no, actions: <del>
5583 AT_SETUP([ofproto-dpif megaflow - normal, balance-slb bonding])
5585 [add-port br0 p1 -- set Interface p1 type=dummy ofport_request=1 -- \
5586 add-bond br0 bond0 p2 p3 bond_mode=balance-slb -- \
5587 set interface p2 type=dummy ofport_request=2 -- \
5588 set interface p3 type=dummy ofport_request=3])
5589 AT_CHECK([ovs-appctl netdev-dummy/set-admin-state up], 0, [OK
5591 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5593 AT_CHECK([ovs-ofctl add-flow br0 action=normal])
5594 AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
5595 AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4,dst=10.0.0.3,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
5597 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5598 recirc_id=0,ip,in_port=1,vlan_tci=0x0000/0x1fff,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,nw_frag=no, actions: <del>
5599 recirc_id=0,ip,in_port=1,vlan_tci=0x0000/0x1fff,dl_src=50:54:00:00:00:0b,dl_dst=50:54:00:00:00:0c,nw_frag=no, actions: <del>
5604 AT_SETUP([ofproto-dpif megaflow - normal, balance-tcp bonding])
5605 # Create bond0 on br0 with interfaces p0 and p1
5606 # and bond1 on br1 with interfaces p2 and p3
5607 # with p0 patched to p2 and p1 patched to p3.
5609 [add-bond br0 bond0 p0 p1 bond_mode=balance-tcp lacp=active \
5610 other-config:lacp-time=fast \
5611 other-config:bond-rebalance-interval=0 -- \
5612 set interface p0 type=patch options:peer=p2 ofport_request=1 -- \
5613 set interface p1 type=patch options:peer=p3 ofport_request=2 -- \
5615 set bridge br1 other-config:hwaddr=aa:66:aa:66:00:00 -- \
5616 set bridge br1 datapath-type=dummy other-config:datapath-id=1234 \
5617 fail-mode=secure -- \
5618 add-bond br1 bond1 p2 p3 bond_mode=balance-tcp lacp=active \
5619 other-config:lacp-time=fast \
5620 other-config:bond-rebalance-interval=0 -- \
5621 set interface p2 type=patch options:peer=p0 ofport_request=3 -- \
5622 set interface p3 type=patch options:peer=p1 ofport_request=4 --])
5624 AT_CHECK([ovs-appctl netdev-dummy/set-admin-state up], 0, [OK
5626 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5627 ADD_OF_PORTS([br0], [7])
5628 AT_CHECK([ovs-ofctl add-flow br0 action=normal])
5629 AT_CHECK([ovs-ofctl add-flow br1 action=normal])
5630 ovs-appctl time/stop
5631 ovs-appctl time/warp 5000
5632 AT_CHECK([ovs-appctl netdev-dummy/receive p7 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
5633 AT_CHECK([ovs-appctl netdev-dummy/receive p7 'in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4,dst=10.0.0.3,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
5635 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5636 recirc_id=0,ip,in_port=7,vlan_tci=0x0000/0x1fff,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,nw_frag=no, actions: <del>
5637 recirc_id=0,ip,in_port=7,vlan_tci=0x0000/0x1fff,dl_src=50:54:00:00:00:0b,dl_dst=50:54:00:00:00:0c,nw_frag=no, actions: <del>
5642 AT_SETUP([ofproto-dpif megaflow - resubmit port action])
5644 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5645 ADD_OF_PORTS([br0], [1], [2])
5646 AT_DATA([flows.txt], [dnl
5647 table=0 in_port=1,ip actions=resubmit(90)
5648 table=0 in_port=90,dl_src=50:54:00:00:00:09 actions=output(2)
5650 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5651 AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
5652 AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4,dst=10.0.0.3,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
5654 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5655 recirc_id=0,ip,in_port=1,dl_src=50:54:00:00:00:09,nw_frag=no, actions: <del>
5656 recirc_id=0,ip,in_port=1,dl_src=50:54:00:00:00:0b/ff:ff:00:00:00:02,nw_frag=no, actions: <del>
5661 AT_SETUP([ofproto-dpif megaflow - resubmit table action])
5663 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5664 ADD_OF_PORTS([br0], [1], [2])
5665 AT_DATA([flows.txt], [dnl
5666 table=0 in_port=1,ip actions=resubmit(,1)
5667 table=1 dl_src=50:54:00:00:00:09 actions=output(2)
5669 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5670 AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
5671 AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4,dst=10.0.0.3,proto=
5672 1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
5674 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5675 recirc_id=0,ip,in_port=1,dl_src=50:54:00:00:00:09,nw_frag=no, actions: <del>
5676 recirc_id=0,ip,in_port=1,dl_src=50:54:00:00:00:0b,nw_frag=no, actions: <del>
5681 AT_SETUP([ofproto-dpif megaflow - goto_table action])
5683 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5684 ADD_OF_PORTS([br0], [1], [2])
5685 AT_DATA([flows.txt], [dnl
5686 table=0 in_port=1,ip actions=goto_table(1)
5687 table=1 dl_src=50:54:00:00:00:09 actions=output(2)
5689 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flows br0 flows.txt])
5690 AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
5691 AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4,dst=10.0.0.3,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
5693 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5694 recirc_id=0,ip,in_port=1,dl_src=50:54:00:00:00:09,nw_frag=no, actions: <del>
5695 recirc_id=0,ip,in_port=1,dl_src=50:54:00:00:00:0b,nw_frag=no, actions: <del>
5700 AT_SETUP([ofproto-dpif megaflow - mirroring, select_all])
5702 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5703 ADD_OF_PORTS([br0], [1], [2], [3])
5705 set Bridge br0 mirrors=@m --\
5706 --id=@p3 get Port p3 --\
5707 --id=@m create Mirror name=mymirror select_all=true output_port=@p3
5709 AT_DATA([flows.txt], [dnl
5710 in_port=1 actions=output:2
5712 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5713 AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
5715 AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4,dst=10.0.0.3,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
5717 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5718 recirc_id=0,ip,in_port=1,nw_frag=no, actions: <del>
5723 AT_SETUP([ofproto-dpif megaflow - mirroring, select_vlan])
5725 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5726 ADD_OF_PORTS([br0], [1], [2], [3])
5728 set Bridge br0 mirrors=@m --\
5729 --id=@p2 get Port p2 -- --id=@p3 get Port p3 --\
5730 --id=@m create Mirror name=mymirror select_all=true select_vlan=11 output_port=@p3
5732 AT_DATA([flows.txt], [dnl
5733 in_port=1 actions=output:2
5735 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5736 AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x8100),vlan(vid=11,pcp=7),encap(eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0))'])
5737 AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4,dst=10.0.0.3,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
5739 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5740 recirc_id=0,ip,in_port=1,dl_vlan=11,nw_frag=no, actions: <del>
5741 recirc_id=0,ip,in_port=1,vlan_tci=0x0000/0x1fff,nw_frag=no, actions: <del>
5746 AT_SETUP([ofproto-dpif megaflow - move action])
5748 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5749 ADD_OF_PORTS([br0], [1], [2])
5750 AT_DATA([flows.txt], [dnl
5751 table=0 in_port=1 ip,actions=move:NXM_OF_IP_SRC[[]]->NXM_NX_REG0[[]],resubmit(90)
5752 table=0 in_port=90 ip,actions=move:NXM_NX_REG0[[]]->NXM_NX_REG1[[]],resubmit(91)
5753 table=0 in_port=91 reg0=0x0a000002,actions=output(2)
5755 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5756 AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
5757 AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4,dst=10.0.0.3,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
5759 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5760 recirc_id=0,ip,in_port=1,nw_src=10.0.0.2,nw_frag=no, actions: <del>
5761 recirc_id=0,ip,in_port=1,nw_src=10.0.0.4,nw_frag=no, actions: <del>
5766 AT_SETUP([ofproto-dpif megaflow - push action])
5768 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5769 ADD_OF_PORTS([br0], [1], [2])
5770 AT_DATA([flows.txt], [dnl
5771 table=0 in_port=1 ip,actions=push:NXM_OF_IP_SRC[[]],output(2)
5773 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5774 AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
5775 AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4,dst=10.0.0.3,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
5777 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5778 recirc_id=0,ip,in_port=1,nw_src=10.0.0.2,nw_frag=no, actions: <del>
5779 recirc_id=0,ip,in_port=1,nw_src=10.0.0.4,nw_frag=no, actions: <del>
5784 AT_SETUP([ofproto-dpif megaflow - learning])
5786 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5787 ADD_OF_PORTS([br0], [1], [2])
5788 AT_DATA([flows.txt], [dnl
5789 table=0 in_port=1 actions=load:2->NXM_NX_REG0[[0..15]],learn(table=1,priority=65535,NXM_OF_ETH_SRC[[]],NXM_OF_VLAN_TCI[[0..11]],output:NXM_NX_REG0[[0..15]]),output:2
5791 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5792 ovs-appctl time/stop
5793 # We send each packet twice because the first packet in each flow causes the
5794 # flow table to change and thus revalidations, which (depending on timing)
5795 # can keep a megaflow from being installed. The revalidations are done by
5796 # the second iteration, allowing the flows to be installed.
5798 AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
5799 AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4,dst=10.0.0.3,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
5800 ovs-appctl time/warp 100
5803 dnl The original flow is missing due to a revalidation.
5804 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5805 recirc_id=0,ip,in_port=1,vlan_tci=0x0000/0x0fff,dl_src=50:54:00:00:00:09,nw_frag=no, actions: <del>
5806 recirc_id=0,ip,in_port=1,vlan_tci=0x0000/0x0fff,dl_src=50:54:00:00:00:0b,nw_frag=no, actions: <del>
5811 AT_SETUP([ofproto-dpif megaflow - tunnels])
5813 [add-port br0 p1 -- set Interface p1 type=dummy ofport_request=1])
5814 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5815 AT_CHECK([ovs-vsctl add-port br0 p2 -- set Interface p2 type=gre \
5816 options:remote_ip=1.1.1.1 ofport_request=2 options:key=flow])
5817 AT_CHECK([ovs-vsctl add-port br0 p3 -- set Interface p3 type=dummy \
5819 AT_CHECK([ovs-vsctl add-port br0 p4 -- set Interface p4 type=gre \
5820 options:remote_ip=1.1.1.2 options:tos=inherit options:ttl=inherit \
5821 ofport_request=4 options:key=flow])
5822 AT_DATA([flows.txt], [dnl
5823 in_port=1,actions=output(2)
5824 in_port=3,actions=output(4)
5826 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5827 dnl ECN bits are always copied out, but don't use 0x3 (CE), since that
5828 dnl will cause the packet to be dropped.
5829 AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0xfd,ttl=128,frag=no),icmp(type=8,code=0)'])
5831 AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4,dst=10.0.0.3,proto=1,tos=0x1,ttl=64,frag=no),icmp(type=8,code=0)'])
5832 AT_CHECK([ovs-appctl netdev-dummy/receive p3 'in_port(3),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0xfd,ttl=128,frag=no),icmp(type=8,code=0)'])
5834 AT_CHECK([ovs-appctl netdev-dummy/receive p3 'in_port(3),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4,dst=10.0.0.3,proto=1,tos=0x1,ttl=64,frag=no),icmp(type=8,code=0)'])
5836 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5837 recirc_id=0,ip,in_port=1,nw_ecn=1,nw_frag=no, actions: <del>
5838 recirc_id=0,ip,in_port=3,nw_tos=0,nw_ecn=1,nw_ttl=64,nw_frag=no, actions: <del>
5839 recirc_id=0,ip,in_port=3,nw_tos=252,nw_ecn=1,nw_ttl=128,nw_frag=no, actions: <del>
5844 AT_SETUP([ofproto-dpif megaflow - dec_ttl])
5846 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5847 ADD_OF_PORTS([br0], [1], [2])
5848 AT_CHECK([ovs-vsctl set Bridge br0 flow_tables:0=@N1 -- --id=@N1 create Flow_Table name=t0 prefixes=nw_dst,nw_src], [0], [ignore], [])
5849 AT_DATA([flows.txt], [dnl
5850 table=0 in_port=1,icmp,nw_src=10.0.0.4 actions=dec_ttl,output(2)
5852 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5853 AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
5854 AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4,dst=10.0.0.3,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
5856 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5857 recirc_id=0,icmp,in_port=1,nw_src=10.0.0.4,nw_ttl=64,nw_frag=no, actions: <del>
5858 recirc_id=0,ip,in_port=1,nw_src=10.0.0.2/0.0.0.2,nw_frag=no, actions: <del>
5863 AT_SETUP([ofproto-dpif megaflow - set dl_dst])
5865 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5866 ADD_OF_PORTS([br0], [1], [2])
5867 AT_DATA([flows.txt], [dnl
5868 table=0 in_port=1 actions=mod_dl_dst(50:54:00:00:00:0a),output(2)
5870 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5871 AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
5872 AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4,dst=10.0.0.3,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
5874 dnl The first packet is essentially a no-op, as the new destination MAC is the
5875 dnl same as the original. The second entry actually updates the destination
5877 AT_CHECK([cat ovs-vswitchd.log | STRIP_UFID | FILTER_FLOW_INSTALL | STRIP_USED], [0], [dnl
5878 recirc_id=0,ip,in_port=1,dl_dst=50:54:00:00:00:0a,nw_frag=no, actions:2
5879 recirc_id=0,ip,in_port=1,dl_dst=50:54:00:00:00:0c,nw_frag=no, actions:set(eth(dst=50:54:00:00:00:0a)),2
5884 AT_SETUP([ofproto-dpif megaflow - disabled])
5886 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5887 ADD_OF_PORTS([br0], [1], [2])
5888 AT_DATA([flows.txt], [dnl
5889 table=0 in_port=1,ip,nw_dst=10.0.0.1 actions=output(2)
5890 table=0 in_port=1,ip,nw_dst=10.0.0.3 actions=drop
5892 AT_CHECK([ovs-appctl upcall/disable-megaflows], [0], [megaflows disabled
5894 AT_CHECK([ovs-appctl upcall/disable-ufid], [0], [Datapath dumping tersely using UFID disabled
5896 AT_CHECK([ovs-appctl vlog/set dpif_netdev:dbg], [0], [], [])
5897 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5898 for i in 1 2 3 4; do
5899 AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
5900 AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4,dst=10.0.0.3,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
5901 if [[ $i -eq 1 ]]; then
5906 AT_CHECK([cat ovs-vswitchd.log | STRIP_UFID | FILTER_FLOW_INSTALL | STRIP_USED], [0], [dnl
5907 pkt_mark=0,recirc_id=0,skb_priority=0,icmp,in_port=1,vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,nw_src=10.0.0.2,nw_dst=10.0.0.1,nw_tos=0,nw_ecn=0,nw_ttl=64,icmp_type=8,icmp_code=0, actions:2
5908 pkt_mark=0,recirc_id=0,skb_priority=0,icmp,in_port=1,vlan_tci=0x0000,dl_src=50:54:00:00:00:0b,dl_dst=50:54:00:00:00:0c,nw_src=10.0.0.4,nw_dst=10.0.0.3,nw_tos=0,nw_ecn=0,nw_ttl=64,icmp_type=8,icmp_code=0, actions:drop
5910 AT_CHECK([cat ovs-vswitchd.log | STRIP_UFID | FILTER_FLOW_DUMP | grep 'packets:3'], [0], [dnl
5911 skb_priority(0),skb_mark(0),recirc_id(0),dp_hash(0),in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0), packets:3, bytes:180, used:0.0s, actions:2
5912 skb_priority(0),skb_mark(0),recirc_id(0),dp_hash(0),in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4,dst=10.0.0.3,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0), packets:3, bytes:180, used:0.0s, actions:drop
5917 AT_SETUP([ofproto-dpif - datapath port number change])
5918 OVS_VSWITCHD_START([set Bridge br0 fail-mode=standalone])
5919 ADD_OF_PORTS([br0], 1)
5921 # Trace a flow that should output to p1.
5922 AT_CHECK([ovs-appctl ofproto/trace br0 in_port=LOCAL,dl_src=10:20:30:40:50:60],
5924 AT_CHECK([tail -1 stdout], [0], [Datapath actions: 1
5927 # Change p1's port number to 5.
5928 AT_CHECK([ovs-appctl dpif-dummy/change-port-number ovs-dummy p1 5])
5930 # Trace a flow that should output to p1 in its new location.
5931 AT_CHECK([ovs-appctl ofproto/trace br0 in_port=LOCAL,dl_src=10:20:30:40:50:60],
5933 AT_CHECK([tail -1 stdout], [0], [Datapath actions: 5
5938 # Tests the bundling with various bfd and cfm configurations.
5939 AT_SETUP([ofproto - bundle with variable bfd/cfm config])
5940 OVS_VSWITCHD_START([add-br br1 -- set bridge br1 datapath-type=dummy -- \
5941 add-bond br0 br0bond p0 p2 bond-mode=active-backup -- \
5942 add-bond br1 br1bond p1 p3 bond-mode=active-backup -- \
5943 set Interface p1 type=patch options:peer=p0 ofport_request=2 -- \
5944 set Interface p3 type=patch options:peer=p2 ofport_request=4 -- \
5945 set Interface p0 type=patch options:peer=p1 ofport_request=1 -- \
5946 set Interface p2 type=patch options:peer=p3 ofport_request=3 -- \
5947 set Interface p0 bfd:enable=true bfd:min_tx=300 bfd:min_rx=300 -- \
5948 set Interface p0 cfm_mpid=1 -- \
5949 set Interface p1 bfd:enable=true bfd:min_tx=500 bfd:min_rx=500])
5951 ovs-appctl time/stop
5952 # advance the clock to stablize everything.
5953 ovs-appctl time/warp 5000 100
5954 # cfm/show should show 'recv' fault.
5955 AT_CHECK([ovs-appctl cfm/show | sed -n '/^.*fault:.*/p'], [0], [dnl
5958 # bfd/show should show 'up'.
5959 AT_CHECK([ovs-appctl bfd/show | sed -n '/^.*Session State:.*/p'], [0], [dnl
5960 Local Session State: up
5961 Remote Session State: up
5962 Local Session State: up
5963 Remote Session State: up
5965 # bond/show should show 'may-enable: true' for all slaves.
5966 AT_CHECK([ovs-appctl bond/show | sed -n '/^.*may_enable:.*/p'], [0], [dnl
5973 # now disable the bfd on p1.
5974 AT_CHECK([ovs-vsctl set Interface p1 bfd:enable=false])
5975 # advance the clock to stablize everything.
5976 ovs-appctl time/warp 5000 100
5977 # cfm/show should show 'recv' fault.
5978 AT_CHECK([ovs-appctl cfm/show | sed -n '/^.*fault:.*/p'], [0], [dnl
5981 # bfd/show should show 'down'.
5982 AT_CHECK([ovs-appctl bfd/show | sed -n '/^.*Session State:.*/p'], [0], [dnl
5983 Local Session State: down
5984 Remote Session State: down
5986 # bond/show should show 'may-enable: false' for p0.
5987 AT_CHECK([ovs-appctl bond/show br0bond | sed -n '/^.*may_enable:.*/p'], [0], [dnl
5992 # now enable the bfd on p1 and disable bfd on p0.
5993 AT_CHECK([ovs-vsctl set Interface p1 bfd:enable=true])
5994 AT_CHECK([ovs-vsctl set Interface p0 bfd:enable=false])
5995 # advance the clock to stablize everything.
5996 ovs-appctl time/warp 5000 100
5997 # cfm/show should show 'recv' fault.
5998 AT_CHECK([ovs-appctl cfm/show | sed -n '/^.*fault:.*/p'], [0], [dnl
6001 # bfd/show should show 'down'.
6002 AT_CHECK([ovs-appctl bfd/show | sed -n '/^.*Session State:.*/p'], [0], [dnl
6003 Local Session State: down
6004 Remote Session State: down
6006 # bond/show should show 'may-enable: false' for p0 and p1.
6007 AT_CHECK([ovs-appctl bond/show | sed -n '/^.*may_enable:.*/p'], [0], [dnl
6017 AT_SETUP([ofproto-dpif - ofproto-dpif-monitor 1])
6018 OVS_VSWITCHD_START([add-port br0 p0 -- set interface p0 type=gre options:remote_ip=1.2.3.4])
6021 AT_CHECK([ovs-vsctl set interface p0 bfd:enable=true])
6023 OVS_WAIT_UNTIL([grep "monitor thread created" ovs-vswitchd.log])
6024 # disable bfd on p0.
6025 AT_CHECK([ovs-vsctl set interface p0 bfd:enable=false])
6027 OVS_WAIT_UNTIL([grep "monitor thread terminated" ovs-vswitchd.log])
6028 AT_CHECK([cat ovs-vswitchd.log | sed -e '/^.*ofproto_dpif_monitor.*$/d' > ovs-vswitchd.log])
6031 AT_CHECK([ovs-vsctl set interface p0 cfm_mpid=10])
6033 OVS_WAIT_UNTIL([grep "monitor thread created" ovs-vswitchd.log])
6034 # disable cfm on p0.
6035 AT_CHECK([ovs-vsctl remove interface p0 cfm_mpid 10])
6037 OVS_WAIT_UNTIL([grep "monitor thread terminated" ovs-vswitchd.log])
6038 AT_CHECK([cat ovs-vswitchd.log | sed -e '/^.*ofproto_dpif_monitor.*$/d' > ovs-vswitchd.log])
6040 # enable both bfd and cfm on p0.
6041 AT_CHECK([ovs-vsctl set interface p0 bfd:enable=true cfm_mpid=10])
6043 OVS_WAIT_UNTIL([grep "monitor thread created" ovs-vswitchd.log])
6044 # disable bfd on p0.
6045 AT_CHECK([ovs-vsctl set interface p0 bfd:enable=false])
6046 # check log, there should not be the log of thread terminated.
6047 AT_CHECK([sed -n "s/^.*|ofproto_dpif_monitor(monitor[[0-9]]*)|INFO|\(.* terminated\)$/\1/p" ovs-vswitchd.log], [0], [dnl
6049 # reenable bfd on p0.
6050 AT_CHECK([ovs-vsctl set interface p0 bfd:enable=true])
6051 # check log, should still be on log of thread created.
6052 AT_CHECK([sed -n "s/^.*|ofproto_dpif_monitor(monitor[[0-9]]*)|INFO|\(.* created\)$/\1/p" ovs-vswitchd.log], [0], [dnl
6053 monitor thread created
6055 # disable bfd and cfm together.
6056 AT_CHECK([ovs-vsctl set interface p0 bfd:enable=false -- remove interface p0 cfm_mpid 10])
6058 OVS_WAIT_UNTIL([grep "monitor thread terminated" ovs-vswitchd.log])
6063 # this test helps avoid the deadlock between the main thread and monitor thread.
6064 AT_SETUP([ofproto-dpif - ofproto-dpif-monitor 2])
6067 for i in `seq 1 199`
6069 AT_CHECK([ovs-vsctl add-port br0 p$i -- set interface p$i type=gre options:remote_ip=1.2.3.4 options:key=$i bfd:enable=true])
6075 AT_BANNER([ofproto-dpif - flow translation resource limits])
6077 AT_SETUP([ofproto-dpif - infinite resubmit])
6079 AT_CHECK([ovs-ofctl add-flow br0 actions=resubmit:1,resubmit:2,output:3])
6080 AT_CHECK([ovs-appctl -vpoll_loop:off ofproto/trace br0 'eth_dst=ff:ff:ff:ff:ff:ff'],
6082 AT_CHECK([tail -1 stdout], [0], [Datapath actions: drop
6084 AT_CHECK([grep -c 'resubmit actions recursed over 64 times' ovs-vswitchd.log],
6087 OVS_VSWITCHD_STOP(["/resubmit actions recursed/d"])
6090 AT_SETUP([ofproto-dpif - exponential resubmit chain])
6092 ADD_OF_PORTS([br0], 1)
6093 (for i in `seq 1 64`; do
6095 echo "in_port=$i, actions=resubmit:$j, resubmit:$j, local"
6097 echo "in_port=65, actions=local") > flows
6098 AT_CHECK([ovs-ofctl add-flows br0 flows])
6099 AT_CHECK([ovs-appctl -vpoll_loop:off ofproto/trace br0 'in_port=1'], [0], [stdout])
6100 AT_CHECK([grep -c 'over 4096 resubmit actions' ovs-vswitchd.log], [0], [1
6102 OVS_VSWITCHD_STOP(["/over.*resubmit actions/d"])
6105 AT_SETUP([ofproto-dpif - too many output actions])
6107 ADD_OF_PORTS([br0], 1)
6108 (for i in `seq 1 12`; do
6110 echo "in_port=$i, actions=resubmit:$j, resubmit:$j, local"
6112 echo "in_port=13, actions=local,local,local,local,local,local,local,local") > flows
6113 AT_CHECK([ovs-ofctl add-flows br0 flows])
6114 AT_CHECK([ovs-appctl -vpoll_loop:off ofproto/trace br0 'in_port=1'], [0], [stdout])
6115 AT_CHECK([grep -c -e '- Uses action(s) not supported by datapath' stdout],
6118 AT_CHECK([grep -c 'resubmits yielded over 64 kB of actions' ovs-vswitchd.log], [0], [1
6120 OVS_VSWITCHD_STOP(["/resubmits yielded over 64 kB of actions/d"])
6123 AT_SETUP([ofproto-dpif - stack too deep])
6125 ADD_OF_PORTS([br0], 1)
6126 (for i in `seq 1 12`; do
6128 echo "in_port=$i, actions=resubmit:$j, resubmit:$j, local"
6130 push="push:NXM_NX_REG0[[]]"
6131 echo "in_port=13, actions=$push,$push,$push,$push,$push,$push,$push,$push") > flows
6132 AT_CHECK([ovs-ofctl add-flows br0 flows])
6133 AT_CHECK([ovs-appctl -vpoll_loop:off ofproto/trace br0 'in_port=1'], [0], [stdout])
6134 AT_CHECK([grep -c 'resubmits yielded over 64 kB of stack' ovs-vswitchd.log], [0], [1
6136 OVS_VSWITCHD_STOP(["/resubmits yielded over 64 kB of stack/d"])
6140 AT_SETUP([ofproto-dpif packet-out controller])
6142 ADD_OF_PORTS([br0], 1, 2)
6144 AT_CHECK([ovs-ofctl add-flow br0 'dl_dst=50:54:00:00:00:0a actions=controller'])
6146 AT_CAPTURE_FILE([ofctl_monitor.log])
6147 AT_CHECK([ovs-ofctl monitor br0 65534 invalid_ttl --detach --no-chdir --pidfile 2> ofctl_monitor.log])
6150 AT_CHECK([ovs-ofctl -O OpenFlow13 packet-out br0 CONTROLLER controller '50540000000a5054000000091234'])
6153 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
6154 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
6155 NXT_PACKET_IN (xid=0x0): total_len=14 in_port=CONTROLLER (via action) data_len=14 (unbuffered)
6156 in_port=0,vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,dl_type=0x1234
6158 NXT_PACKET_IN (xid=0x0): total_len=14 in_port=CONTROLLER (via action) data_len=14 (unbuffered)
6159 in_port=0,vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,dl_type=0x1234
6161 NXT_PACKET_IN (xid=0x0): total_len=14 in_port=CONTROLLER (via action) data_len=14 (unbuffered)
6162 in_port=0,vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,dl_type=0x1234
6165 AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
6166 dl_dst=50:54:00:00:00:0a actions=CONTROLLER:65535
6170 (echo "OFPST_TABLE reply (OF1.3) (xid=0x2):
6172 active=1, lookup=0, matched=0"
6174 while test $x -lt 254; do
6177 active=0, lookup=0, matched=0"
6180 AT_CHECK([ovs-ofctl -O OpenFlow13 dump-tables br0 ], [0], [expout])
6185 AT_SETUP([ofproto-dpif packet-out controller (patch port)])
6188 add-port br0 p1 -- \
6189 set interface p1 type=patch options:peer=p2 -- \
6191 set bridge br1 datapath-type=dummy -- \
6192 set bridge br1 fail-mode=secure -- \
6193 set bridge br1 protocols='[OpenFlow10,OpenFlow11,OpenFlow12,OpenFlow13]' -- \
6194 add-port br1 p2 -- \
6195 set interface p2 type=patch options:peer=p1 --])
6197 AT_CAPTURE_FILE([ofctl_monitor.log])
6198 AT_CHECK([ovs-ofctl monitor br1 65534 invalid_ttl --detach --no-chdir --pidfile 2> ofctl_monitor.log])
6201 AT_CHECK([ovs-ofctl -O OpenFlow13 packet-out br0 CONTROLLER output:1 '50540000000a5054000000091234'])
6204 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
6205 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
6206 NXT_PACKET_IN (xid=0x0): cookie=0x0 total_len=14 in_port=1 (via no_match) data_len=14 (unbuffered)
6207 in_port=0,vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,dl_type=0x1234
6209 NXT_PACKET_IN (xid=0x0): cookie=0x0 total_len=14 in_port=1 (via no_match) data_len=14 (unbuffered)
6210 in_port=0,vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,dl_type=0x1234
6212 NXT_PACKET_IN (xid=0x0): cookie=0x0 total_len=14 in_port=1 (via no_match) data_len=14 (unbuffered)
6213 in_port=0,vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,dl_type=0x1234
6216 (printf "OFPST_TABLE reply (OF1.3) (xid=0x2):"
6218 while test $x -lt 254; do
6221 active=0, lookup=0, matched=0"
6224 AT_CHECK([ovs-ofctl -O OpenFlow13 dump-tables br0 ], [0], [expout])
6226 (echo "OFPST_TABLE reply (OF1.3) (xid=0x2):
6228 active=0, lookup=3, matched=0"
6230 while test $x -lt 254; do
6233 active=0, lookup=0, matched=0"
6236 AT_CHECK([ovs-ofctl -O OpenFlow13 dump-tables br1 ], [0], [expout])
6242 AT_SETUP([ofproto-dpif packet-out goto_table])
6244 ADD_OF_PORTS([br0], 1, 2)
6246 AT_DATA([flows.txt], [dnl
6247 table=0 dl_dst=50:54:00:00:00:0a actions=goto_table(1)
6248 table=1 dl_dst=50:54:00:00:00:0a actions=controller
6250 AT_CHECK([ovs-ofctl -O OpenFlow13 add-flows br0 flows.txt])
6252 AT_CAPTURE_FILE([ofctl_monitor.log])
6253 AT_CHECK([ovs-ofctl monitor br0 65534 invalid_ttl --detach --no-chdir --pidfile 2> ofctl_monitor.log])
6256 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x1234)'
6259 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
6260 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
6261 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
6262 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
6263 in_port=0,vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,dl_type=0x1234
6265 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
6266 in_port=0,vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,dl_type=0x1234
6268 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
6269 in_port=0,vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,dl_type=0x1234
6272 AT_CHECK([ovs-appctl revalidator/purge], [0])
6273 AT_CHECK([ovs-ofctl -O OpenFlow13 dump-flows br0 | ofctl_strip | sort], [0], [dnl
6274 n_packets=3, n_bytes=180, dl_dst=50:54:00:00:00:0a actions=goto_table:1
6275 table=1, n_packets=3, n_bytes=180, dl_dst=50:54:00:00:00:0a actions=CONTROLLER:65535
6276 OFPST_FLOW reply (OF1.3):
6279 (echo "OFPST_TABLE reply (OF1.3) (xid=0x2):
6281 active=1, lookup=3, matched=3
6284 active=1, lookup=3, matched=3"
6286 while test $x -lt 254; do
6289 active=0, lookup=0, matched=0"
6292 AT_CHECK([ovs-ofctl -O OpenFlow13 dump-tables br0 ], [0], [expout])
6298 AT_SETUP([ofproto-dpif packet-out table-miss (continue)])
6300 ADD_OF_PORTS([br0], 1, 2)
6302 AT_CHECK([ovs-ofctl -O OpenFlow11 add-flow br0 'table=1 dl_dst=50:54:00:00:00:0a actions=controller'])
6303 AT_CHECK([ovs-ofctl -O OpenFlow11 mod-table br0 all continue])
6305 AT_CAPTURE_FILE([ofctl_monitor.log])
6306 AT_CHECK([ovs-ofctl monitor br0 65534 invalid_ttl --detach --no-chdir --pidfile 2> ofctl_monitor.log])
6309 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x1234)'
6312 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
6313 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
6314 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
6315 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
6316 in_port=0,vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,dl_type=0x1234
6318 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
6319 in_port=0,vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,dl_type=0x1234
6321 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
6322 in_port=0,vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,dl_type=0x1234
6325 AT_CHECK([ovs-appctl revalidator/purge], [0])
6326 AT_CHECK([ovs-ofctl -O OpenFlow11 dump-flows br0 | ofctl_strip | sort], [0], [dnl
6327 table=1, n_packets=3, n_bytes=180, dl_dst=50:54:00:00:00:0a actions=CONTROLLER:65535
6328 OFPST_FLOW reply (OF1.1):
6331 (echo "OFPST_TABLE reply (OF1.3) (xid=0x2):
6333 active=0, lookup=3, matched=0
6336 active=1, lookup=3, matched=3"
6338 while test $x -lt 254; do
6341 active=0, lookup=0, matched=0"
6344 AT_CHECK([ovs-ofctl -O OpenFlow13 dump-tables br0 ], [0], [expout])
6349 AT_SETUP([ofproto-dpif - ICMPv6])
6351 ADD_OF_PORTS([br0], 1)
6353 AT_CAPTURE_FILE([ofctl_monitor.log])
6355 AT_CHECK([ovs-ofctl monitor br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
6357 ovs-appctl netdev-dummy/receive p1 '0060970769ea0000860580da86dd6000000000203afffe80000000000000020086fffe0580dafe80000000000000026097fffe0769ea870068bd00000000fe80000000000000026097fffe0769ea01010000860580da'
6359 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
6361 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
6362 NXT_PACKET_IN (xid=0x0): cookie=0x0 total_len=86 in_port=1 (via no_match) data_len=86 (unbuffered)
6363 icmp6,in_port=0,vlan_tci=0x0000,dl_src=00:00:86:05:80:da,dl_dst=00:60:97:07:69:ea,ipv6_src=fe80::200:86ff:fe05:80da,ipv6_dst=fe80::260:97ff:fe07:69ea,ipv6_label=0x00000,nw_tos=0,nw_ecn=0,nw_ttl=255,icmp_type=135,icmp_code=0,nd_target=fe80::260:97ff:fe07:69ea,nd_sll=00:00:86:05:80:da,nd_tll=00:00:00:00:00:00