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])
150 AT_SETUP([ofproto-dpif - resubmit])
152 ADD_OF_PORTS([br0], [1], [10], [11], [12], [13], [14], [15],
153 [16], [17], [18], [19], [20], [21])
154 AT_DATA([flows.txt], [dnl
155 table=0 in_port=1 priority=1000 icmp actions=output(10),resubmit(2),output(19),resubmit(3),output(21)
156 table=0 in_port=2 priority=1500 icmp actions=output(11),resubmit(,1),output(16),resubmit(2,1),output(18)
157 table=0 in_port=3 priority=2000 icmp actions=output(20)
158 table=1 in_port=1 priority=1000 icmp actions=output(12),resubmit(4,1),output(13),resubmit(3),output(15)
159 table=1 in_port=2 priority=1500 icmp actions=output(17),resubmit(,2)
160 table=1 in_port=3 priority=1500 icmp actions=output(14),resubmit(,2)
162 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
163 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])
164 AT_CHECK([tail -1 stdout], [0],
165 [Datapath actions: 10,11,12,13,14,15,16,17,18,19,20,21
170 AT_SETUP([ofproto-dpif - goto table])
172 ADD_OF_PORTS([br0], [1], [10], [11])
173 echo "table=0 in_port=1 actions=output(10),goto_table(1)" > flows.txt
174 for i in `seq 1 63`; do echo "table=$i actions=goto_table($(($i+1)))"; done >> flows.txt
175 echo "table=64 actions=output(11)" >> flows.txt
176 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flows br0 flows.txt])
177 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])
178 AT_CHECK([tail -1 stdout], [0],
179 [Datapath actions: 10,11
184 AT_SETUP([ofproto-dpif - write actions])
186 ADD_OF_PORTS([br0], [1], [10], [11], [12], [13])
187 AT_DATA([flows.txt], [dnl
188 table=0 in_port=1,ip actions=output(10),write_actions(set_field:192.168.3.90->ip_src,output(12)),goto_table(1)
189 table=1 ip actions=write_actions(output(13)),goto_table(2)
190 table=2 ip actions=set_field:192.168.3.91->ip_src,output(11)
192 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flows br0 flows.txt])
193 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])
194 AT_CHECK([tail -2 stdout], [0],
195 [Megaflow: recirc_id=0,ip,in_port=1,nw_src=192.168.0.1,nw_frag=no
196 Datapath actions: 10,set(ipv4(src=192.168.3.91)),11,set(ipv4(src=192.168.3.90)),13
201 AT_SETUP([ofproto-dpif - clear actions])
203 ADD_OF_PORTS([br0], [1], [10], [11], [12])
204 AT_DATA([flows.txt], [dnl
205 table=0 in_port=1,ip actions=output(10),write_actions(set_field:192.168.3.90->ip_src,output(12)),goto_table(1)
206 table=1 tcp actions=set_field:91->tp_src,output(11),clear_actions
208 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flows br0 flows.txt])
209 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])
210 AT_CHECK([tail -2 stdout], [0],
211 [Megaflow: recirc_id=0,tcp,in_port=1,nw_frag=no,tp_src=8
212 Datapath actions: 10,set(tcp(src=91)),11
217 AT_SETUP([ofproto-dpif - group chaining not supported])
219 ADD_OF_PORTS([br0], [1], [10], [11])
220 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'],
222 AT_CHECK([STRIP_XIDS stderr | sed 1q], [0],
223 [OFPT_ERROR (OF1.2): OFPGMFC_CHAINING_UNSUPPORTED
228 AT_SETUP([ofproto-dpif - all group in action list])
230 ADD_OF_PORTS([br0], [1], [10], [11])
231 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'])
232 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=group:1234'])
233 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])
234 # Must match on the source address to be able to restore it's value for
236 AT_CHECK([tail -2 stdout], [0],
237 [Megaflow: recirc_id=0,ip,in_port=1,nw_src=192.168.0.1,nw_frag=no
238 Datapath actions: set(ipv4(src=192.168.3.90)),10,set(ipv4(src=192.168.0.1)),11
243 AT_SETUP([ofproto-dpif - indirect group in action list])
245 ADD_OF_PORTS([br0], [1], [10])
246 AT_CHECK([ovs-ofctl -O OpenFlow12 add-group br0 group_id=1234,type=indirect,bucket=output:10])
247 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=group:1234'])
248 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])
249 AT_CHECK([tail -1 stdout], [0],
250 [Datapath actions: 10
255 AT_SETUP([ofproto-dpif - all group in action set])
257 ADD_OF_PORTS([br0], [1], [10], [11])
258 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'])
259 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=write_actions(group:1234)'])
260 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])
261 # Must match on the source address to be able to restore it's value for
263 AT_CHECK([tail -2 stdout], [0],
264 [Megaflow: recirc_id=0,ip,in_port=1,nw_src=192.168.0.1,nw_frag=no
265 Datapath actions: set(ipv4(src=192.168.3.90)),10,set(ipv4(src=192.168.0.1)),11
270 AT_SETUP([ofproto-dpif - indirect group in action set])
272 ADD_OF_PORTS([br0], [1], [10])
273 AT_CHECK([ovs-ofctl -O OpenFlow12 add-group br0 group_id=1234,type=indirect,bucket=output:10])
274 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=write_actions(group:1234)'])
275 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])
276 AT_CHECK([tail -1 stdout], [0],
277 [Datapath actions: 10
282 AT_SETUP([ofproto-dpif - select group])
284 ADD_OF_PORTS([br0], [1], [10], [11])
285 AT_CHECK([ovs-ofctl -O OpenFlow12 add-group br0 'group_id=1234,type=select,bucket=output:10,bucket=output:11'])
286 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=write_actions(group:1234)'])
288 # Try a bunch of different flows and make sure that they get distributed
290 for d in 0 1 2 3 4 5 6 7 8 9 a b c d e f; do
291 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])
292 tail -1 stdout >> results
294 sort results | uniq -c
295 AT_CHECK([sort results | uniq], [0],
296 [Datapath actions: 10
302 AT_SETUP([ofproto-dpif - select group with watch port])
304 ADD_OF_PORTS([br0], [1], [10], [11])
305 AT_CHECK([ovs-ofctl -O OpenFlow12 add-group br0 'group_id=1234,type=select,bucket=watch_port:10,output:10,bucket=output:11'])
306 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=write_actions(group:1234)'])
307 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])
308 AT_CHECK([tail -1 stdout], [0],
309 [Datapath actions: 11
314 AT_SETUP([ofproto-dpif - select group with weight])
316 ADD_OF_PORTS([br0], [1], [10], [11], [12])
317 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'])
318 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=write_actions(group:1234)'])
319 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])
320 AT_CHECK([tail -1 stdout], [0],
321 [Datapath actions: 11
326 AT_SETUP([ofproto-dpif - fast failover group])
328 ADD_OF_PORTS([br0], [1], [10], [11])
329 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'])
330 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=write_actions(group:1234)'])
331 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])
332 AT_CHECK([tail -1 stdout], [0],
333 [Datapath actions: drop
338 AT_SETUP([ofproto-dpif - group stats single bucket])
340 ADD_OF_PORTS([br0], [1], [10], [11])
341 AT_CHECK([ovs-ofctl -O OpenFlow12 add-group br0 'group_id=1234,type=select,bucket=output:10,weight=2000,bucket=output:11,weight=0'])
342 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=write_actions(group:1234)'])
346 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)"
347 AT_CHECK([ovs-appctl netdev-dummy/receive p1 $pkt])
350 AT_CHECK([ovs-appctl revalidator/purge], [0])
351 AT_CHECK([ovs-ofctl -O OpenFlow12 -vwarn dump-group-stats br0], [0], [stdout])
352 AT_CHECK([STRIP_XIDS stdout | sort], [0], [dnl
353 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
354 OFPST_GROUP reply (OF1.2):
359 AT_SETUP([ofproto-dpif - group stats all buckets])
361 ADD_OF_PORTS([br0], [1], [10], [11])
362 AT_CHECK([ovs-ofctl -O OpenFlow12 add-group br0 'group_id=1234,type=all,bucket=output:10,bucket=output:11'])
363 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=write_actions(group:1234)'])
367 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)"
368 AT_CHECK([ovs-appctl netdev-dummy/receive p1 $pkt])
371 AT_CHECK([ovs-appctl revalidator/purge], [0])
372 AT_CHECK([ovs-ofctl -O OpenFlow12 -vwarn dump-group-stats br0], [0], [stdout])
373 AT_CHECK([STRIP_XIDS stdout | sort], [0], [dnl
374 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
375 OFPST_GROUP reply (OF1.2):
380 AT_SETUP([ofproto-dpif - registers])
382 ADD_OF_PORTS([br0], [20], [21], [22], [33], [90])
383 AT_DATA([flows.txt], [dnl
384 in_port=90 actions=resubmit:2,resubmit:3,resubmit:4,resubmit:91
385 in_port=91 actions=resubmit:5,resubmit:6,resubmit:7,resubmit:92
386 in_port=92 actions=resubmit:8,resubmit:9,resubmit:10,resubmit:11,resubmit:93
387 in_port=93 actions=resubmit:12,resubmit:13,resubmit:14,resubmit:15
389 in_port=2 actions=load:0x000db000->NXM_NX_REG0[[]]
390 in_port=3 actions=load:0xdea->NXM_NX_REG0[[20..31]]
391 in_port=4 actions=load:0xeef->NXM_NX_REG0[[0..11]]
392 in_port=5 actions=move:NXM_NX_REG0[[]]->NXM_NX_REG1[[]]
393 in_port=6 actions=load:0x22222222->NXM_NX_REG2[[]]
394 in_port=7 actions=move:NXM_NX_REG1[[20..31]]->NXM_NX_REG2[[0..11]]
395 in_port=8 actions=move:NXM_NX_REG1[[0..11]]->NXM_NX_REG2[[20..31]]
396 in_port=9,reg0=0xdeadbeef actions=output:20
397 in_port=10,reg1=0xdeadbeef actions=output:21
398 in_port=11,reg2=0xeef22dea actions=output:22
400 dnl Sanilty check all registers
401 in_port=12 actions=load:0x10->NXM_NX_REG0[[]],load:0x11->NXM_NX_REG1[[]],load:0x12->NXM_NX_REG2[[]]
402 in_port=13 actions=load:0x13->NXM_NX_REG3[[]],load:0x14->NXM_NX_REG4[[]],load:0x15->NXM_NX_REG5[[]]
403 in_port=14 actions=load:0x16->NXM_NX_REG6[[]],load:0x17->NXM_NX_REG7[[]]
404 in_port=15,reg0=0x10,reg1=0x11,reg2=0x12,reg3=0x13,reg4=0x14,reg5=0x15,reg6=0x16,reg7=0x17 actions=output:33
407 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
408 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])
409 AT_CHECK([tail -1 stdout], [0],
410 [Datapath actions: 20,21,22,33
415 dnl Tests that the standardized xregs are mapped onto the legacy OVS registers
416 dnl in the manner documented in ovs-ofctl(8).
417 AT_SETUP([ofproto-dpif - extended registers])
419 ADD_OF_PORTS([br0], [1], [2], [3])
420 AT_DATA([flows.txt], [dnl
421 table=0 actions=load:0xfedcba9876543210->OXM_OF_PKT_REG1[[]],resubmit(,1)
422 table=1,reg2=0xfedcba98,reg3=0x76543210 actions=2
424 # These low-priority rules shouldn't match. They're here only to make really
425 # sure that the test fails if either of the above rules fails to match.
426 table=0,priority=0 actions=3
427 table=1,priority=0 actions=3
429 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
430 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])
431 AT_CHECK([tail -1 stdout], [0], [Datapath actions: 2
436 AT_SETUP([ofproto-dpif - load and move order])
438 ADD_OF_PORTS([br0], [1], [10], [11])
439 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'])
440 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)'])
441 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])
442 AT_CHECK([tail -2 stdout], [0],
443 [Megaflow: recirc_id=0,ip,in_port=1,nw_src=192.168.0.1,nw_frag=no
444 Datapath actions: set(ipv4(src=255.255.255.255)),10,set(ipv4(src=192.168.0.1)),11
449 dnl Tests that 1.5 copy-field can copy into the standardized xregs.
450 AT_SETUP([ofproto-dpif - copy-field into extended registers])
452 ADD_OF_PORTS([br0], [1], [2], [3])
453 AT_DATA([flows.txt], [dnl
454 table=0 actions=move:OXM_OF_ETH_SRC[[0..47]]->OXM_OF_PKT_REG0[[0..47]],goto_table(1)
455 table=1,xreg0=0x0000505400000005 actions=2
457 # These low-priority rules shouldn't match. They're here only to make really
458 # sure that the test fails if either of the above rules fails to match.
459 table=0,priority=0 actions=3
460 table=1,priority=0 actions=3
462 AT_CHECK([ovs-ofctl -O OpenFlow15 add-flows br0 flows.txt])
463 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])
464 AT_CHECK([tail -1 stdout], [0], [Datapath actions: 2
469 dnl Tests that 1.5 set-field with mask in the metadata register.
470 AT_SETUP([ofproto-dpif - masked set-field into metadata])
472 ADD_OF_PORTS([br0], [1], [2], [3])
473 AT_DATA([flows.txt], [dnl
474 table=0 actions=set_field:0xfafafafa5a5a5a5a->metadata,goto_table(1)
475 table=1 actions=set_field:0x6b/0xff->metadata,goto_table(2)
476 table=2,metadata=0xfafafafa5a5a5a6b actions=2
478 # These low-priority rules shouldn't match. They're here only to make really
479 # sure that the test fails if either of the above rules fails to match.
480 table=0,priority=0 actions=3
481 table=1,priority=0 actions=3
482 table=2,priority=0 actions=3
484 AT_CHECK([ovs-ofctl -O OpenFlow15 add-flows br0 flows.txt])
485 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])
486 AT_CHECK([tail -1 stdout], [0], [Datapath actions: 2
492 AT_SETUP([ofproto-dpif - actset_output])
495 [br0], [1], [2], [3], [4], [5], [6], [7], [8], [9], [10], [11], [12], [13])
496 AT_DATA([flows.txt], [dnl
497 table=0,actset_output=unset actions=write_actions(output(2)),goto_table(1)
498 table=1 actions=move:ONFOXM_ET_ACTSET_OUTPUT[[0..31]]->OXM_OF_PKT_REG0[[0..31]],goto_table(2)
500 # Verify that actset_output got set.
501 table=2,priority=20,actset_output=2 actions=4,goto_table(3)
502 table=2,priority=10 actions=5,goto_table(3)
504 # Verify that xreg0 got copied properly from actset_output.
505 table=3,priority=20,xreg0=2 actions=6,goto_table(4)
506 table=3,priority=10 actions=7,goto_table(4)
508 # Verify that adding a group action unsets actset_output.
509 table=4 actions=write_actions(group(5)),goto_table(5)
510 table=5,priority=20,actset_output=unset actions=8,goto_table(6)
511 table=5,priority=10 actions=9,goto_table(6)
513 # Verify that adding another output action doesn't change actset_output
514 # (since there's still a group).
515 table=6 actions=write_actions(output(3)),goto_table(7)
516 table=7,priority=20,actset_output=unset actions=10,goto_table(8)
517 table=7,priority=10 actions=11,goto_table(8)
519 # Verify that clearing the action set, then writing an output action,
520 # causes actset_output to be set again.
521 table=8,actions=clear_actions,write_actions(output(3),output(2)),goto_table(9)
522 table=9,priority=20,actset_output=2 actions=12
523 table=9,priority=10 actions=13
525 AT_CHECK([ovs-ofctl -O OpenFlow13 add-flows br0 flows.txt])
526 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])
527 AT_CHECK([tail -1 stdout], [0], [Datapath actions: 4,6,8,10,12,2
531 AT_SETUP([ofproto-dpif - push-pop])
533 ADD_OF_PORTS([br0], [20], [21], [22], [33], [90])
534 AT_DATA([flows.txt], [dnl
535 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
536 in_port=2 actions=pop:NXM_NX_REG0[[0..7]],output:NXM_NX_REG0[[]]
537 in_port=3 actions=pop:NXM_NX_REG1[[0..7]],output:NXM_NX_REG1[[]]
538 in_port=4 actions=pop:NXM_NX_REG2[[0..15]],output:NXM_NX_REG2[[]]
539 in_port=5 actions=pop:NXM_NX_REG3[[]],output:NXM_NX_REG3[[]]
542 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
543 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])
544 AT_CHECK([tail -1 stdout], [0],
545 [Datapath actions: 33,22,21,20
550 AT_SETUP([ofproto-dpif - output])
552 ADD_OF_PORTS([br0], [1], [9], [10], [11], [55], [66], [77], [88])
553 AT_DATA([flows.txt], [dnl
554 in_port=1 actions=resubmit:2,resubmit:3,resubmit:4,resubmit:5,resubmit:6,resubmit:7,resubmit:8
555 in_port=2 actions=output:9
556 in_port=3 actions=load:55->NXM_NX_REG0[[]],output:NXM_NX_REG0[[]],load:66->NXM_NX_REG1[[]]
557 in_port=4 actions=output:10,output:NXM_NX_REG0[[]],output:NXM_NX_REG1[[]],output:11
558 in_port=5 actions=load:77->NXM_NX_REG0[[0..15]],load:88->NXM_NX_REG0[[16..31]]
559 in_port=6 actions=output:NXM_NX_REG0[[0..15]],output:NXM_NX_REG0[[16..31]]
560 in_port=7 actions=load:0x110000ff->NXM_NX_REG0[[]],output:NXM_NX_REG0[[]]
561 in_port=8 actions=1,9,load:9->NXM_OF_IN_PORT[[]],1,9
563 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
564 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])
565 AT_CHECK([tail -1 stdout], [0],
566 [Datapath actions: 9,55,10,55,66,11,77,88,9,1
571 AT_SETUP([ofproto-dpif - dec_ttl])
573 ADD_OF_PORTS([br0], [1], [2], [3], [4])
574 AT_DATA([flows.txt], [dnl
575 table=0 in_port=1 action=dec_ttl,output:2,resubmit(1,1),output:4
576 table=1 in_port=1 action=dec_ttl,output:3
578 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
579 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])
580 AT_CHECK([tail -4 stdout], [0],
581 [Megaflow: recirc_id=0,ip,in_port=1,nw_ttl=2,nw_frag=no
582 Datapath actions: set(ipv4(ttl=1)),2,4
583 This flow is handled by the userspace slow path because it:
584 - Sends "packet-in" messages to the OpenFlow controller.
586 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])
587 AT_CHECK([tail -2 stdout], [0],
588 [Megaflow: recirc_id=0,ip,in_port=1,nw_ttl=3,nw_frag=no
589 Datapath actions: set(ipv4(ttl=2)),2,set(ipv4(ttl=1)),3,4
591 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])
592 AT_CHECK([tail -2 stdout], [0],
593 [Megaflow: recirc_id=0,ipv6,in_port=1,nw_ttl=128,nw_frag=no
594 Datapath actions: set(ipv6(hlimit=127)),2,set(ipv6(hlimit=126)),3,4
597 AT_CAPTURE_FILE([ofctl_monitor.log])
598 AT_CHECK([ovs-ofctl monitor br0 65534 invalid_ttl --detach --no-chdir --pidfile 2> ofctl_monitor.log])
599 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])
600 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
601 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
602 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=34 in_port=1 (via invalid_ttl) data_len=34 (unbuffered)
603 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
608 dnl A dec_ttl action at offset 32 in ofpacts will cause the ofpacts
609 dnl buffer to be resized just before pushing the id of the dec_ttl action.
610 dnl Thus the implementation must account for this by using the
611 dnl reallocated buffer rather than the original buffer.
613 dnl A number of similar rules are added to try and exercise
614 dnl xrealloc sufficiently that it returns a different base pointer
615 AT_SETUP([ofproto-dpif - dec_ttl without arguments at offset 32 in ofpacts])
617 ADD_OF_PORTS([br0], [1])
618 (for i in `seq 0 255`; do
619 printf "dl_src=10:11:11:11:11:%02x actions=output:1,output:1,output:1,dec_ttl,controller\n" $i
621 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
625 dnl A dec_ttl action at offset 32 in ofpacts will cause the ofpacts
626 dnl buffer to be resized just before pushing the id of the dec_ttl action.
627 dnl Thus the implementation must account for this by using the
628 dnl reallocated buffer rather than the original buffer.
630 dnl A number of similar rules are added to try and exercise
631 dnl xrealloc sufficiently that it returns a different base pointer
632 AT_SETUP([ofproto-dpif - dec_ttl with arguments at offset 32 in ofpacts])
634 ADD_OF_PORTS([br0], [1])
635 (for i in `seq 0 255`; do
636 printf "dl_src=10:11:11:11:11:%02x actions=output:1,output:1,output:1,dec_ttl(1),controller\n" $i
638 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
642 dnl A note action at offset 24 in ofpacts will cause the ofpacts
643 dnl buffer to be resized just before pushing the id of the dec_ttl action.
644 dnl Thus the implementation must account for this by using the
645 dnl reallocated buffer rather than the original buffer.
647 dnl A number of similar rules are added to try and exercise
648 dnl xrealloc sufficiently that it returns a different base pointer
649 AT_SETUP([ofproto-dpif - note at offset 24 in ofpacts])
651 ADD_OF_PORTS([br0], [1])
652 (for i in `seq 0 255`; do
653 printf "dl_src=10:11:11:11:11:%02x actions=output:1,output:1,note:ff,controller\n" $i
655 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
659 AT_SETUP([ofproto-dpif - output, OFPP_NONE ingress port])
661 ADD_OF_PORTS([br0], [1], [2])
663 AT_CHECK([ovs-ofctl add-flow br0 action=normal])
665 # "in_port" defaults to OFPP_NONE if it's not specified.
666 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"
667 AT_CHECK([ovs-appctl ofproto/trace br0 "$flow"], [0], [stdout])
668 AT_CHECK([tail -1 stdout | sed 's/Datapath actions: //' | tr "," "\n" | sort -n], [0], [dnl
677 AT_SETUP([ofproto-dpif - DSCP])
678 OVS_VSWITCHD_START([add-port br0 p1 -- set Interface p1 type=dummy])
679 ADD_OF_PORTS([br0], [9])
680 AT_DATA([flows.txt], [dnl
681 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
683 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
684 AT_CHECK([ovs-vsctl -- \
685 set Port p1 qos=@newqos --\
686 --id=@newqos create QoS type=linux-htb queues=1=@q1,2=@q2 --\
687 --id=@q1 create Queue dscp=1 --\
688 --id=@q2 create Queue dscp=2], [0], [ignore])
689 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])
690 AT_CHECK([tail -2 stdout], [0],
691 [Megaflow: recirc_id=0,skb_priority=0,ip,in_port=9,nw_tos=252,nw_frag=no
692 Datapath actions: dnl
694 set(ipv4(tos=0x4/0xfc)),set(skb_priority(0x1)),1,dnl
695 set(ipv4(tos=0x8/0xfc)),set(skb_priority(0x2)),1,dnl
697 set(ipv4(tos=0x4/0xfc)),set(skb_priority(0x1)),1,dnl
698 set(ipv4(tos=0xfc/0xfc)),set(skb_priority(0)),1,dnl
699 set(ipv4(tos=0/0xfc)),1,100
704 AT_SETUP([ofproto-dpif - output/flood flags])
706 ADD_OF_PORTS([br0], [1], [2], [3], [4], [5], [6], [7])
708 AT_DATA([flows.txt], [dnl
709 in_port=local actions=local,flood
710 in_port=1 actions=flood
711 in_port=2 actions=all
712 in_port=3 actions=output:LOCAL,output:1,output:2,output:3,output:4,output:5,output:6,output:7
713 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
715 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
716 AT_CHECK([ovs-ofctl mod-port br0 5 noforward])
717 AT_CHECK([ovs-ofctl mod-port br0 6 noflood])
719 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])
720 AT_CHECK([tail -1 stdout \
721 | sed -e 's/Datapath actions: //' | tr ',' '\n' | sort], [0], [dnl
729 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])
730 AT_CHECK([tail -1 stdout \
731 | sed -e 's/Datapath actions: //' | tr ',' '\n' | sort], [0], [dnl
739 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])
740 AT_CHECK([tail -1 stdout \
741 | sed -e 's/Datapath actions: //' | tr ',' '\n' | sort], [0], [dnl
750 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])
751 AT_CHECK([tail -1 stdout], [0],
752 [Datapath actions: 100,1,2,4,6,7
755 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])
756 AT_CHECK([tail -1 stdout], [0],
757 [Datapath actions: set(skb_priority(0x1)),100,1,2,set(skb_priority(0x2)),3,set(skb_priority(0x1)),6,7
762 AT_SETUP([ofproto-dpif - Default Table Miss - OF1.0 (OFPTC_TABLE_MISS_CONTROLLER)])
763 OVS_VSWITCHD_START([dnl
764 add-port br0 p1 -- set Interface p1 type=dummy
766 ON_EXIT([kill `cat ovs-ofctl.pid`])
768 AT_CAPTURE_FILE([ofctl_monitor.log])
770 AT_CHECK([ovs-ofctl monitor br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
773 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)'
775 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
776 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
777 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
778 NXT_PACKET_IN (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
779 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
781 NXT_PACKET_IN (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
782 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
784 NXT_PACKET_IN (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
785 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
788 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
789 AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
796 AT_SETUP([ofproto-dpif - Default Table Miss - OF1.3 (OFPTC_TABLE_MISS_DROP)])
797 OVS_VSWITCHD_START([dnl
798 add-port br0 p1 -- set Interface p1 type=dummy
800 ON_EXIT([kill `cat ovs-ofctl.pid`])
802 AT_CAPTURE_FILE([ofctl_monitor.log])
803 AT_CHECK([ovs-ofctl del-flows br0])
805 AT_CHECK([ovs-ofctl monitor -OOpenFlow13 -P openflow10 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
807 dnl Test that missed packets are droped
809 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)'
811 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
813 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
816 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
817 AT_CHECK([ovs-ofctl -OOpenFlow13 dump-flows br0 | ofctl_strip | sort], [0], [dnl
818 OFPST_FLOW reply (OF1.3):
824 AT_SETUP([ofproto-dpif - Table Miss - goto table and OFPTC_TABLE_MISS_CONTROLLER])
825 OVS_VSWITCHD_START([dnl
826 add-port br0 p1 -- set Interface p1 type=dummy
828 ON_EXIT([kill `cat ovs-ofctl.pid`])
830 AT_CAPTURE_FILE([ofctl_monitor.log])
831 AT_CHECK([ovs-ofctl -OOpenFlow12 add-flow br0 'table=0 actions=goto_table(1)'])
833 AT_CHECK([ovs-ofctl monitor -P openflow10 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
836 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)'
838 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
839 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
840 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
841 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
842 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
844 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
845 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
847 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
848 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
851 AT_CHECK([ovs-appctl revalidator/purge], [0])
852 AT_CHECK([ovs-ofctl -OOpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
853 n_packets=3, n_bytes=180, actions=goto_table:1
854 OFPST_FLOW reply (OF1.2):
860 AT_SETUP([ofproto-dpif - Table Miss - resubmit and OFPTC_TABLE_MISS_CONTROLLER])
861 OVS_VSWITCHD_START([dnl
862 add-port br0 p1 -- set Interface p1 type=dummy
864 ON_EXIT([kill `cat ovs-ofctl.pid`])
866 AT_CAPTURE_FILE([ofctl_monitor.log])
867 AT_CHECK([ovs-ofctl -OOpenFlow12 add-flow br0 'table=0 actions=resubmit(1,1)'])
869 AT_CHECK([ovs-ofctl monitor -P openflow10 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
872 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)'
875 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
876 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
879 AT_CHECK([ovs-appctl revalidator/purge], [0])
880 AT_CHECK([ovs-ofctl -OOpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
881 n_packets=3, n_bytes=180, actions=resubmit(1,1)
882 OFPST_FLOW reply (OF1.2):
888 AT_SETUP([ofproto-dpif - Table Miss - OFPTC_TABLE_MISS_CONTINUE])
889 OVS_VSWITCHD_START([dnl
890 add-port br0 p1 -- set Interface p1 type=dummy
892 ON_EXIT([kill `cat ovs-ofctl.pid`])
894 AT_CAPTURE_FILE([ofctl_monitor.log])
895 AT_CHECK([ovs-ofctl add-flow br0 'table=1 dl_src=10:11:11:11:11:11 actions=controller'])
896 AT_CHECK([ovs-ofctl -OOpenFlow11 mod-table br0 all continue])
898 dnl Miss table 0, Hit table 1
899 AT_CHECK([ovs-ofctl monitor br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
902 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)'
904 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
905 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
907 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
908 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
909 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
911 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
912 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
914 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
915 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
918 dnl Hit table 0, Miss all other tables, sent to controller
919 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --no-chdir --pidfile 2> ofctl_monitor.log])
922 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)'
924 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
925 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
927 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
928 NXT_PACKET_IN (xid=0x0): table_id=253 cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
929 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
931 NXT_PACKET_IN (xid=0x0): table_id=253 cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
932 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
934 NXT_PACKET_IN (xid=0x0): table_id=253 cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
935 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
938 AT_CHECK([ovs-appctl revalidator/purge], [0])
939 AT_CHECK([ovs-ofctl -OOpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
940 table=1, n_packets=3, n_bytes=180, dl_src=10:11:11:11:11:11 actions=CONTROLLER:65535
941 OFPST_FLOW reply (OF1.2):
947 AT_SETUP([ofproto-dpif - Table Miss - goto table and OFPTC_TABLE_MISS_CONTINUE])
948 OVS_VSWITCHD_START([dnl
949 add-port br0 p1 -- set Interface p1 type=dummy
951 ON_EXIT([kill `cat ovs-ofctl.pid`])
953 AT_CAPTURE_FILE([ofctl_monitor.log])
954 AT_DATA([flows.txt], [dnl
955 table=0 actions=goto_table(1)
956 table=2 dl_src=10:11:11:11:11:11 actions=controller
958 AT_CHECK([ovs-ofctl -OOpenFlow12 add-flows br0 flows.txt])
959 AT_CHECK([ovs-ofctl -OOpenFlow11 mod-table br0 all continue])
961 dnl Hit table 0, Miss table 1, Hit table 2
962 AT_CHECK([ovs-ofctl monitor br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
965 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)'
967 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
968 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
970 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
971 NXT_PACKET_IN (xid=0x0): table_id=2 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
972 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
974 NXT_PACKET_IN (xid=0x0): table_id=2 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
975 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
977 NXT_PACKET_IN (xid=0x0): table_id=2 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
978 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
981 dnl Hit table 1, Miss all other tables, sent to controller
982 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --no-chdir --pidfile 2> ofctl_monitor.log])
985 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)'
987 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
988 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
990 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
991 NXT_PACKET_IN (xid=0x0): table_id=253 cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
992 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
994 NXT_PACKET_IN (xid=0x0): table_id=253 cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
995 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
997 NXT_PACKET_IN (xid=0x0): table_id=253 cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
998 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
1001 AT_CHECK([ovs-appctl revalidator/purge], [0])
1002 AT_CHECK([ovs-ofctl -OOpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
1003 n_packets=6, n_bytes=360, actions=goto_table:1
1004 table=2, n_packets=3, n_bytes=180, dl_src=10:11:11:11:11:11 actions=CONTROLLER:65535
1005 OFPST_FLOW reply (OF1.2):
1011 AT_SETUP([ofproto-dpif - Table Miss - resubmit and OFPTC_TABLE_MISS_CONTINUE])
1012 OVS_VSWITCHD_START([dnl
1013 add-port br0 p1 -- set Interface p1 type=dummy
1015 ON_EXIT([kill `cat ovs-ofctl.pid`])
1017 AT_CAPTURE_FILE([ofctl_monitor.log])
1018 AT_DATA([flows.txt], [dnl
1019 table=0 actions=resubmit(1,1)
1020 table=2 dl_src=10:11:11:11:11:11 actions=controller
1022 AT_CHECK([ovs-ofctl -OOpenFlow12 add-flows br0 flows.txt])
1023 AT_CHECK([ovs-ofctl -OOpenFlow11 mod-table br0 all continue])
1025 dnl Hit table 0, Miss table 1, Dropped
1026 AT_CHECK([ovs-ofctl monitor br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1029 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)'
1031 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1033 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1036 dnl Hit table 1, Dropped
1037 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1040 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)'
1042 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
1044 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1047 AT_CHECK([ovs-appctl revalidator/purge], [0])
1048 AT_CHECK([ovs-ofctl -OOpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
1049 n_packets=6, n_bytes=360, actions=resubmit(1,1)
1050 table=2, dl_src=10:11:11:11:11:11 actions=CONTROLLER:65535
1051 OFPST_FLOW reply (OF1.2):
1057 AT_SETUP([ofproto-dpif - Table Miss - OFPTC_TABLE_MISS_DROP])
1058 OVS_VSWITCHD_START([dnl
1059 add-port br0 p1 -- set Interface p1 type=dummy
1061 ON_EXIT([kill `cat ovs-ofctl.pid`])
1063 AT_CAPTURE_FILE([ofctl_monitor.log])
1064 AT_CHECK([ovs-ofctl -OOpenFlow11 mod-table br0 all drop])
1066 AT_CHECK([ovs-ofctl monitor -P openflow10 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1068 dnl Test that missed packets are droped
1070 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)'
1072 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
1074 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1077 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1078 AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
1085 AT_SETUP([ofproto-dpif - Table Miss - goto table and OFPTC_TABLE_MISS_DROP])
1086 OVS_VSWITCHD_START([dnl
1087 add-port br0 p1 -- set Interface p1 type=dummy
1089 ON_EXIT([kill `cat ovs-ofctl.pid`])
1091 AT_CAPTURE_FILE([ofctl_monitor.log])
1092 AT_CHECK([ovs-ofctl del-flows br0])
1093 AT_CHECK([ovs-ofctl -OOpenFlow12 add-flow br0 'table=0 actions=goto_table(1)'])
1094 AT_CHECK([ovs-ofctl -OOpenFlow11 mod-table br0 all drop])
1096 AT_CHECK([ovs-ofctl monitor -P openflow10 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1098 dnl Test that missed packets are droped
1100 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)'
1102 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
1104 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1107 AT_CHECK([ovs-appctl revalidator/purge], [0])
1108 AT_CHECK([ovs-ofctl -OOpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
1109 n_packets=3, n_bytes=180, actions=goto_table:1
1110 OFPST_FLOW reply (OF1.2):
1116 AT_SETUP([ofproto-dpif - Table Miss - resubmit and OFPTC_TABLE_MISS_DROP])
1117 OVS_VSWITCHD_START([dnl
1118 add-port br0 p1 -- set Interface p1 type=dummy
1120 ON_EXIT([kill `cat ovs-ofctl.pid`])
1122 AT_CAPTURE_FILE([ofctl_monitor.log])
1123 AT_CHECK([ovs-ofctl del-flows br0])
1124 AT_CHECK([ovs-ofctl -OOpenFlow12 add-flow br0 'table=0 actions=resubmit(1,1)'])
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 revalidator/purge], [0])
1139 AT_CHECK([ovs-ofctl -OOpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
1140 n_packets=3, n_bytes=180, actions=resubmit(1,1)
1141 OFPST_FLOW reply (OF1.2):
1147 AT_SETUP([ofproto-dpif - controller])
1148 OVS_VSWITCHD_START([dnl
1149 add-port br0 p1 -- set Interface p1 type=dummy
1151 ON_EXIT([kill `cat ovs-ofctl.pid`])
1153 AT_CAPTURE_FILE([ofctl_monitor.log])
1154 AT_DATA([flows.txt], [dnl
1155 cookie=0x0 dl_src=10:11:11:11:11:11 actions=controller
1156 cookie=0x1 dl_src=20:22:22:22:22:22 actions=controller,resubmit(80,1)
1157 cookie=0x2 dl_src=30:33:33:33:33:33 actions=mod_vlan_vid:15,controller
1159 cookie=0x3 table=1 in_port=80 actions=load:1->NXM_NX_REG0[[]],mod_vlan_vid:80,controller,resubmit(81,2)
1160 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)
1161 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)
1162 cookie=0x6 table=4 in_port=83 actions=load:4->NXM_NX_REG3[[]],mod_nw_src:83.83.83.83,controller,resubmit(84,5)
1163 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)
1164 cookie=0x8 table=6 in_port=85 actions=mod_tp_src:85,controller,resubmit(86,7)
1165 cookie=0x9 table=7 in_port=86 actions=mod_tp_dst:86,controller,controller
1166 cookie=0xa dl_src=40:44:44:44:44:41 actions=mod_vlan_vid:99,mod_vlan_pcp:1,controller
1167 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
1169 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
1172 AT_CHECK([ovs-ofctl monitor -P openflow10 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1175 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)'
1177 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1178 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1180 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1181 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
1182 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
1184 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
1185 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
1187 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
1188 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
1191 dnl Singleton controller action.
1192 AT_CHECK([ovs-ofctl monitor -P openflow10 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1195 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)'
1197 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1198 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1200 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1201 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1202 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
1204 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1205 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
1207 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1208 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
1211 dnl Modified controller action.
1212 AT_CHECK([ovs-ofctl monitor -P openflow10 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1215 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)'
1217 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1218 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1220 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1221 OFPT_PACKET_IN (xid=0x0): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1222 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
1224 OFPT_PACKET_IN (xid=0x0): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1225 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
1227 OFPT_PACKET_IN (xid=0x0): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1228 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
1231 dnl Modified VLAN controller action.
1232 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1235 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)'
1237 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1238 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1240 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1241 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1242 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
1244 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1245 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
1247 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1248 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
1252 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1255 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)'
1257 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 18])
1258 ovs-appctl -t ovs-ofctl exit
1260 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1261 NXT_PACKET_IN (xid=0x0): cookie=0x1 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1262 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
1264 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x3 total_len=64 in_port=1 reg0=0x1 (via action) data_len=64 (unbuffered)
1265 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
1267 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)
1268 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
1270 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)
1271 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
1273 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)
1274 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
1276 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)
1277 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
1279 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)
1280 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
1282 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)
1283 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
1285 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)
1286 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
1290 AT_CHECK([ovs-ofctl monitor br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1293 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'
1295 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 18])
1296 ovs-appctl -t ovs-ofctl exit
1298 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1299 NXT_PACKET_IN (xid=0x0): cookie=0x1 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1300 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
1302 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x3 total_len=64 in_port=1 reg0=0x1 (via action) data_len=64 (unbuffered)
1303 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
1305 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)
1306 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
1308 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)
1309 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
1311 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)
1312 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
1314 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)
1315 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
1317 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)
1318 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
1320 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)
1321 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
1323 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)
1324 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
1327 dnl Modified ARP controller action.
1328 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1331 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)'
1334 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 18])
1335 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
1336 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1337 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1338 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
1339 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1340 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
1341 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1342 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
1343 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1344 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
1345 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1346 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
1347 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1348 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
1349 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1350 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
1351 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1352 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
1353 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1354 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
1357 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1360 AT_CHECK([ovs-ofctl monitor br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1363 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'
1366 AT_CHECK([ovs-appctl time/warp 1000], [0], [ignore])
1367 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 18])
1368 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
1369 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1370 NXT_PACKET_IN (xid=0x0): cookie=0x1 total_len=98 in_port=1 (via action) data_len=98 (unbuffered)
1371 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
1373 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x3 total_len=102 in_port=1 reg0=0x1 (via action) data_len=102 (unbuffered)
1374 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
1376 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)
1377 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
1379 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)
1380 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
1382 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)
1383 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
1385 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)
1386 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
1388 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)
1389 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
1391 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)
1392 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
1394 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)
1395 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
1398 AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
1399 cookie=0x1, n_packets=3, n_bytes=218, dl_src=20:22:22:22:22:22 actions=CONTROLLER:65535,resubmit(80,1)
1400 cookie=0x2, n_packets=3, n_bytes=180, dl_src=30:33:33:33:33:33 actions=mod_vlan_vid:15,CONTROLLER:65535
1401 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)
1402 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)
1403 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)
1404 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)
1405 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)
1406 cookie=0x8, table=6, n_packets=3, n_bytes=218, in_port=85 actions=mod_tp_src:85,CONTROLLER:65535,resubmit(86,7)
1407 cookie=0x9, table=7, n_packets=3, n_bytes=218, in_port=86 actions=mod_tp_dst:86,CONTROLLER:65535,CONTROLLER:65535
1408 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
1409 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
1410 n_packets=3, n_bytes=180, dl_src=10:11:11:11:11:11 actions=CONTROLLER:65535
1417 AT_SETUP([ofproto-dpif - MPLS handling])
1418 OVS_VSWITCHD_START([dnl
1419 add-port br0 p1 -- set Interface p1 type=dummy
1421 ON_EXIT([kill `cat ovs-ofctl.pid`])
1423 AT_CAPTURE_FILE([ofctl_monitor.log])
1424 AT_DATA([flows.txt], [dnl
1425 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
1426 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
1427 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
1428 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
1429 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
1430 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
1431 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
1432 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
1433 cookie=0xa mpls,dl_src=40:44:44:44:44:49 actions=push_mpls:0x8848,load:10->OXM_OF_MPLS_LABEL[[]],CONTROLLER:65535
1434 cookie=0xb dl_src=50:55:55:55:55:55 dl_type=0x8847 actions=load:1000->OXM_OF_MPLS_LABEL[[]],controller
1435 cookie=0xd dl_src=60:66:66:66:66:66 actions=pop_mpls:0x0800,controller
1436 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
1438 cookie=0xd dl_src=60:66:66:66:00:01 actions=pop_mpls:0x0800,dec_ttl,controller
1439 cookie=0xd dl_src=60:66:66:66:00:02 actions=pop_mpls:0x0800,load:0xa000001->OXM_OF_IPV4_DST[[]],controller
1440 cookie=0xd dl_src=60:66:66:66:00:03 actions=pop_mpls:0x0800,move:OXM_OF_IPV4_DST[[]]->OXM_OF_IPV4_SRC[[]],controller
1441 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
1442 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
1443 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
1444 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
1446 cookie=0xd dl_src=60:66:66:66:00:08 actions=pop_mpls:0x0806,resubmit(1,1)
1447 cookie=0xd table=1 arp actions=controller
1449 cookie=0xd dl_src=60:66:66:66:00:09 actions=pop_mpls:0x0800,mod_nw_tos:48,controller
1450 cookie=0xd dl_src=60:66:66:66:00:0a actions=pop_mpls:0x0800,mod_nw_dst:10.0.0.1,controller
1451 cookie=0xd dl_src=60:66:66:66:00:0b actions=pop_mpls:0x0800,mod_nw_src:10.0.0.1,controller
1453 cookie=0xd dl_src=60:66:66:66:01:00 actions=pop_mpls:0x8848,controller
1454 cookie=0xd dl_src=60:66:66:66:01:01 actions=pop_mpls:0x8847,dec_mpls_ttl,controller
1455 cookie=0xd dl_src=60:66:66:66:01:02 actions=pop_mpls:0x8848,load:3->OXM_OF_MPLS_TC[[]],controller
1457 cookie=0xd dl_src=60:66:66:66:02:00 actions=pop_mpls:0x8847,pop_mpls:0x0800,controller
1458 cookie=0xd dl_src=60:66:66:66:02:01 actions=pop_mpls:0x8848,pop_mpls:0x0800,dec_ttl,controller
1459 cookie=0xd dl_src=60:66:66:66:02:10 actions=pop_mpls:0x8847,dec_mpls_ttl,pop_mpls:0x0800,dec_ttl,controller
1461 cookie=0xd dl_src=60:66:66:66:03:00 actions=pop_mpls:0x8848,pop_mpls:0x8848,controller
1462 cookie=0xd dl_src=60:66:66:66:03:01 actions=pop_mpls:0x8847,pop_mpls:0x8847,dec_mpls_ttl,controller
1463 cookie=0xd dl_src=60:66:66:66:03:10 actions=pop_mpls:0x8848,dec_mpls_ttl,pop_mpls:0x8848,dec_mpls_ttl,controller
1465 cookie=0xd dl_src=60:66:66:66:04:00 actions=pop_mpls:0x0800,push_mpls:0x8847,controller
1466 cookie=0xd dl_src=60:66:66:66:04:01 actions=pop_mpls:0x0800,push_mpls:0x8848,dec_mpls_ttl,controller
1467 cookie=0xd dl_src=60:66:66:66:04:10 actions=pop_mpls:0x0800,dec_ttl,push_mpls:0x8848,dec_mpls_ttl,controller
1469 cookie=0xd dl_src=60:66:66:66:05:00 actions=push_mpls:0x8848,pop_mpls:0x8847,controller
1470 cookie=0xd dl_src=60:66:66:66:05:01 actions=push_mpls:0x8847,pop_mpls:0x8848,dec_mpls_ttl,controller
1471 cookie=0xd dl_src=60:66:66:66:05:10 actions=push_mpls:0x8848,dec_mpls_ttl,pop_mpls:0x8847,dec_mpls_ttl,controller
1473 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
1475 dnl Modified MPLS controller action.
1476 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1479 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)'
1481 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1482 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1484 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1485 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1486 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
1488 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1489 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
1491 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1492 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
1495 dnl Modified MPLS controller action.
1496 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1499 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)'
1501 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1502 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1504 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1505 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1506 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
1508 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1509 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
1511 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1512 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
1515 dnl Modified MPLS controller action.
1516 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1518 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)
1521 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)'
1523 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1524 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1526 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1527 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1528 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
1530 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1531 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
1533 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1534 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
1537 dnl Modified MPLS controller action.
1538 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1541 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))'
1543 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1544 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1546 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1547 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1548 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
1550 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1551 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
1553 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1554 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
1557 dnl Modified MPLS controller action.
1558 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1561 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)'
1563 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1564 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1566 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1567 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1568 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
1570 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1571 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
1573 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1574 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
1577 dnl Modified MPLS controller action.
1578 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1581 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)'
1583 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1584 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1586 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1587 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1588 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
1590 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1591 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
1593 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1594 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
1597 dnl Modified MPLS controller action.
1598 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1601 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)'
1603 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1604 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1606 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1607 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1608 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
1610 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1611 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
1613 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1614 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
1617 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1619 dnl Modified MPLS controller action.
1620 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1623 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)'
1625 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1626 ovs-appctl -t ovs-ofctl exit
1628 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1629 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1630 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
1632 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1633 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
1635 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1636 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
1639 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1641 dnl Modified MPLS controller action.
1642 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1645 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)'
1647 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1648 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1650 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
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:48,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=9,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:48,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=9,mpls_bos=1
1657 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1658 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
1661 dnl Modified MPLS actions.
1662 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1665 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)'
1667 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1668 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1670 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1671 NXT_PACKET_IN (xid=0x0): cookie=0xb total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1672 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
1674 NXT_PACKET_IN (xid=0x0): cookie=0xb total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1675 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
1677 NXT_PACKET_IN (xid=0x0): cookie=0xb total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1678 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
1681 dnl Modified MPLS ipv6 controller action.
1682 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1685 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)'
1687 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1688 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1690 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1691 NXT_PACKET_IN (xid=0x0): cookie=0xc total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1692 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
1694 NXT_PACKET_IN (xid=0x0): cookie=0xc total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1695 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
1697 NXT_PACKET_IN (xid=0x0): cookie=0xc total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1698 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
1702 dnl Modified MPLS pop action.
1703 dnl The input is a frame with two MPLS headers which tcpdump -vve shows as:
1704 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)
1705 dnl (tos 0x0, ttl 64, id 0, offset 0, flags [none], proto TCP (6), length 44)
1707 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1710 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'
1713 # 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)'
1715 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1716 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1718 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1719 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1720 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
1722 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1723 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
1725 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1726 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
1729 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1731 dnl Modified MPLS pop action.
1732 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
1733 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)
1734 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
1735 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
1736 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1739 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'
1741 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1742 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1744 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
1745 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1746 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
1748 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1749 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
1751 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1752 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
1755 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1757 dnl Modified MPLS pop action.
1758 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
1759 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)
1760 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
1761 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
1762 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1765 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'
1767 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1768 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1770 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
1771 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1772 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
1774 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1775 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
1777 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1778 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
1781 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1783 dnl Modified MPLS pop action.
1784 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
1785 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)
1786 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
1787 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
1788 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1791 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'
1793 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1794 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1796 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
1797 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1798 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
1800 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1801 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
1803 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1804 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
1807 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1809 dnl Modified MPLS pop action.
1810 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
1811 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)
1812 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
1813 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
1814 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1817 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'
1819 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1820 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1822 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
1823 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1824 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
1826 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1827 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
1829 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1830 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
1833 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1835 dnl Modified MPLS pop action.
1836 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
1837 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)
1838 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
1839 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
1840 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1843 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'
1845 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1846 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1848 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
1849 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1850 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
1852 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1853 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
1855 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1856 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
1859 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1861 dnl Modified MPLS pop action.
1862 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
1863 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)
1864 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
1865 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
1866 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1869 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'
1871 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1872 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1874 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
1875 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1876 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
1878 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1879 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
1881 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1882 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
1885 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1887 dnl Modified MPLS pop action.
1888 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
1889 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)
1890 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
1891 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
1892 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1895 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'
1897 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1898 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1900 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
1901 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1902 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
1904 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1905 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
1907 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1908 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
1911 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1913 dnl Modified MPLS pop action.
1914 dnl The input is an ARP frame with a single MPLS label stack entry which tcpdump -vve shows as:
1915 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)
1916 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1919 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'
1921 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1922 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1924 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
1925 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0xd total_len=56 in_port=1 (via action) data_len=56 (unbuffered)
1926 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
1928 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0xd total_len=56 in_port=1 (via action) data_len=56 (unbuffered)
1929 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
1931 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0xd total_len=56 in_port=1 (via action) data_len=56 (unbuffered)
1932 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
1935 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1937 dnl Modified MPLS pop action.
1938 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
1939 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)
1940 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
1941 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
1942 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1945 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'
1947 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1948 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1950 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
1951 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1952 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
1954 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1955 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
1957 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1958 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
1961 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1963 dnl Modified MPLS pop action.
1964 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
1965 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)
1966 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
1967 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
1968 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1971 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'
1973 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1974 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1976 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
1977 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1978 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
1980 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1981 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
1983 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1984 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
1987 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1989 dnl Modified MPLS pop action.
1990 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
1991 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)
1992 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
1993 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
1994 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1997 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'
1999 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2000 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2002 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
2003 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2004 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
2006 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2007 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
2009 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2010 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
2013 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2015 dnl Modified MPLS pop action.
2016 dnl The input is a frame with two MPLS label stack entries which tcpdump -vve shows as:
2017 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)
2018 dnl (label 20, exp 0, [S], ttl 31)
2019 dnl (tos 0x0, ttl 254, id 0, offset 0, flags [none], proto TCP (6), length 44)
2020 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
2021 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2024 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'
2026 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2027 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2029 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2030 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2031 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
2033 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2034 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
2036 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2037 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
2040 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2042 dnl Modified MPLS pop action.
2043 dnl The input is a frame with two MPLS label stack entries which tcpdump -vve shows as:
2044 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)
2045 dnl (label 20, exp 0, [S], ttl 31)
2046 dnl (tos 0x0, ttl 254, id 0, offset 0, flags [none], proto TCP (6), length 44)
2047 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
2048 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2051 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'
2053 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2054 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2056 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2057 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2058 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
2060 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2061 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
2063 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2064 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
2067 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2069 dnl Modified MPLS pop action.
2070 dnl The input is a frame with two MPLS label stack entries which tcpdump -vve shows as:
2071 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)
2072 dnl (label 20, exp 0, [S], ttl 31)
2073 dnl (tos 0x0, ttl 254, id 0, offset 0, flags [none], proto TCP (6), length 44)
2074 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
2075 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2078 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'
2080 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2081 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2083 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2084 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2085 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
2087 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2088 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
2090 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2091 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
2094 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2096 dnl Modified MPLS pop action.
2097 dnl The input is a frame with two MPLS label stack entries which tcpdump -vve shows as:
2098 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)
2099 dnl (label 20, exp 0, [S], ttl 31)
2100 dnl (tos 0x0, ttl 254, id 0, offset 0, flags [none], proto TCP (6), length 44)
2101 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
2102 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2105 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'
2107 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2108 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2110 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2111 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2112 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
2114 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2115 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
2117 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2118 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
2121 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2123 dnl Modified MPLS pop action.
2124 dnl The input is a frame with two MPLS label stack entries which tcpdump -vve shows as:
2125 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)
2126 dnl (label 20, exp 0, [S], ttl 31)
2127 dnl (tos 0x0, ttl 254, id 0, offset 0, flags [none], proto TCP (6), length 44)
2128 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
2129 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2132 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'
2134 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2135 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2137 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
2138 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2139 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
2141 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2142 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
2144 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2145 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
2148 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2150 dnl Modified MPLS pop action.
2151 dnl The input is a frame with two MPLS label stack entries which tcpdump -vve shows as:
2152 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)
2153 dnl (label 20, exp 0, [S], ttl 31)
2154 dnl (tos 0x0, ttl 254, id 0, offset 0, flags [none], proto TCP (6), length 44)
2155 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
2156 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2159 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'
2161 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2162 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2164 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
2165 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2166 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
2168 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2169 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
2171 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2172 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
2175 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2177 dnl Modified MPLS pop action.
2178 dnl The input is a frame with three MPLS label stack entries which tcpdump -vve shows as:
2179 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)
2180 dnl (label 20, exp 0, ttl 31)
2181 dnl (label 20, exp 0, [S], ttl 30)
2182 dnl (tos 0x0, ttl 254, id 0, offset 0, flags [none], proto TCP (6), length 44)
2183 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
2184 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2187 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'
2189 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2190 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2192 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2193 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2194 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
2196 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2197 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
2199 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2200 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
2203 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2205 dnl Modified MPLS pop action.
2206 dnl The input is a frame with three MPLS label stack entries which tcpdump -vve shows as:
2207 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)
2208 dnl (label 20, exp 0, ttl 31)
2209 dnl (label 20, exp 0, [S], ttl 30)
2210 dnl (tos 0x0, ttl 254, id 0, offset 0, flags [none], proto TCP (6), length 44)
2211 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
2212 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2215 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'
2217 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2218 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2220 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2221 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2222 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
2224 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2225 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
2227 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2228 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
2231 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2233 dnl Modified MPLS pop action.
2234 dnl The input is a frame with three MPLS label stack entries which tcpdump -vve shows as:
2235 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)
2236 dnl (label 20, exp 0, ttl 31)
2237 dnl (label 20, exp 0, [S], ttl 30)
2238 dnl (tos 0x0, ttl 254, id 0, offset 0, flags [none], proto TCP (6), length 44)
2239 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
2240 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2243 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'
2245 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2246 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2248 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2249 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2250 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
2252 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2253 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
2255 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2256 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
2259 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2261 dnl Modified MPLS pop action.
2262 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
2263 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)
2264 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
2265 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
2266 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2269 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'
2271 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2272 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2274 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
2275 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2276 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
2278 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2279 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
2281 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2282 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
2285 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2287 dnl Modified MPLS pop action.
2288 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
2289 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)
2290 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
2291 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
2292 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2295 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'
2297 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2298 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2300 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
2301 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2302 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
2304 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2305 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
2307 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2308 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
2311 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2313 dnl Modified MPLS pop action.
2314 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
2315 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)
2316 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
2317 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
2318 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2321 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'
2323 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2324 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2326 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
2327 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2328 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
2330 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2331 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
2333 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2334 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
2337 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2339 dnl Modified MPLS pop action.
2340 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
2341 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)
2342 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
2343 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
2344 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2347 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'
2349 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2350 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2352 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2353 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2354 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
2356 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2357 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
2359 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2360 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
2363 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2365 dnl Modified MPLS pop action.
2366 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
2367 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)
2368 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
2369 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
2370 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2373 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'
2375 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2376 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2378 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2379 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2380 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
2382 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2383 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
2385 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2386 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
2389 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2391 dnl Modified MPLS pop action.
2392 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
2393 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)
2394 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
2395 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
2396 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2399 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'
2401 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2402 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2404 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2405 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2406 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
2408 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2409 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
2411 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2412 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
2415 AT_CHECK([ovs-appctl revalidator/purge], [0])
2416 AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
2417 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
2418 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
2419 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
2420 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
2421 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
2422 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
2423 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
2424 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
2425 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
2426 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
2427 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
2428 cookie=0xd, n_packets=3, n_bytes=180, dl_src=60:66:66:66:00:08 actions=pop_mpls:0x0806,resubmit(1,1)
2429 cookie=0xd, n_packets=3, n_bytes=186, dl_src=60:66:66:66:00:01 actions=pop_mpls:0x0800,dec_ttl,CONTROLLER:65535
2430 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
2431 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
2432 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
2433 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
2434 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
2435 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
2436 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
2437 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
2438 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
2439 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
2440 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
2441 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
2442 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
2443 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
2444 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
2445 cookie=0xd, n_packets=3, n_bytes=186, dl_src=60:66:66:66:66:66 actions=pop_mpls:0x0800,CONTROLLER:65535
2446 cookie=0xd, n_packets=3, n_bytes=198, dl_src=60:66:66:66:01:00 actions=pop_mpls:0x8848,CONTROLLER:65535
2447 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
2448 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
2449 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
2450 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
2451 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
2452 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
2453 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
2454 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
2455 cookie=0xd, table=1, n_packets=3, n_bytes=168, arp actions=CONTROLLER:65535
2462 AT_SETUP([ofproto-dpif - MPLS handling with goto_table])
2463 OVS_VSWITCHD_START([dnl
2464 add-port br0 p1 -- set Interface p1 type=dummy
2466 ON_EXIT([kill `cat ovs-ofctl.pid`])
2468 AT_CAPTURE_FILE([ofctl_monitor.log])
2469 AT_DATA([flows.txt], [dnl
2470 table=0 mplsm actions=pop_mpls:0x800,goto_table(1)
2471 table=1 ip,ip_dscp=8 actions=controller
2473 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flows br0 flows.txt])
2476 dnl Modified MPLS pop action.
2477 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
2478 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)
2479 dnl (tos 0x20, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
2480 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
2481 AT_CHECK([ovs-ofctl -O OpenFlow12 monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2484 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'
2486 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2487 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2489 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
2490 OFPT_PACKET_IN (OF1.2) (xid=0x0): table_id=1 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2491 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
2493 OFPT_PACKET_IN (OF1.2) (xid=0x0): table_id=1 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2494 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
2496 OFPT_PACKET_IN (OF1.2) (xid=0x0): table_id=1 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2497 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
2500 AT_CHECK([ovs-appctl revalidator/purge], [0])
2501 AT_CHECK([ovs-ofctl -O OpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
2502 n_packets=3, n_bytes=186, mplsm actions=pop_mpls:0x0800,goto_table:1
2503 table=1, n_packets=3, n_bytes=174, ip,nw_tos=32 actions=CONTROLLER:65535
2504 OFPST_FLOW reply (OF1.2):
2510 AT_SETUP([ofproto-dpif - MPLS handling with write_actions])
2511 OVS_VSWITCHD_START([dnl
2512 add-port br0 p1 -- set Interface p1 type=dummy
2514 ON_EXIT([kill `cat ovs-ofctl.pid`])
2516 dnl N.B: The first (and only) action that accesses L3 data after the
2517 dnl pop_mpls action is present in write_actions. This exercises recirculation
2518 dnl triggered in write_actions due to a previous action not in write actions.
2519 AT_CAPTURE_FILE([ofctl_monitor.log])
2520 AT_DATA([flows.txt], [dnl
2521 mplsm actions=pop_mpls:0x800,write_actions(dec_ttl,controller)
2523 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flows br0 flows.txt])
2525 dnl Modified MPLS pop action.
2526 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
2527 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)
2528 dnl (tos 0x20, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
2529 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
2530 AT_CHECK([ovs-ofctl -O OpenFlow12 monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2533 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'
2535 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2536 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2538 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
2539 OFPT_PACKET_IN (OF1.2) (xid=0x0): table_id=254 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2540 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
2542 OFPT_PACKET_IN (OF1.2) (xid=0x0): table_id=254 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2543 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
2545 OFPT_PACKET_IN (OF1.2) (xid=0x0): table_id=254 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2546 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
2549 AT_CHECK([ovs-appctl revalidator/purge], [0])
2550 AT_CHECK([ovs-ofctl -O OpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
2551 n_packets=3, n_bytes=186, mplsm actions=pop_mpls:0x0800,write_actions(dec_ttl,CONTROLLER:65535)
2552 OFPST_FLOW reply (OF1.2):
2558 AT_SETUP([ofproto-dpif - table-miss flow (OpenFlow 1.0)])
2559 OVS_VSWITCHD_START([dnl
2560 add-port br0 p1 -- set Interface p1 type=dummy
2562 ON_EXIT([kill `cat ovs-ofctl.pid`])
2564 AT_CAPTURE_FILE([ofctl_monitor.log])
2565 # A table-miss flow has priority 0 and no match
2566 AT_CHECK([ovs-ofctl --protocols=OpenFlow10 add-flow br0 'priority=0 actions=output:CONTROLLER'])
2568 dnl Singleton controller action.
2569 AT_CHECK([ovs-ofctl monitor -P openflow10 --protocols=OpenFlow10 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
2572 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)'
2574 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2575 ovs-appctl -t ovs-ofctl exit
2577 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2578 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
2579 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
2581 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
2582 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
2584 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
2585 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
2588 AT_CHECK([ovs-appctl revalidator/purge], [0])
2589 AT_CHECK([ovs-ofctl --protocols=OpenFlow10 dump-flows br0 | ofctl_strip | sort], [0], [dnl
2590 n_packets=3, n_bytes=180, priority=0 actions=CONTROLLER:65535
2598 AT_SETUP([ofproto-dpif - table-miss flow (OpenFlow 1.3)])
2599 OVS_VSWITCHD_START([dnl
2600 add-port br0 p1 -- set Interface p1 type=dummy
2602 ON_EXIT([kill `cat ovs-ofctl.pid`])
2604 AT_CAPTURE_FILE([ofctl_monitor.log])
2605 # A table-miss flow has priority 0 and no match
2606 AT_CHECK([ovs-ofctl --protocols=OpenFlow13 add-flow br0 'priority=0 actions=output:CONTROLLER'])
2608 dnl Singleton controller action.
2609 AT_CHECK([ovs-ofctl monitor -P openflow10 --protocols=OpenFlow13 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
2612 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)'
2614 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2615 ovs-appctl -t ovs-ofctl exit
2617 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2619 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2620 OFPT_PACKET_IN (OF1.3) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
2621 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
2623 OFPT_PACKET_IN (OF1.3) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
2624 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
2626 OFPT_PACKET_IN (OF1.3) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
2627 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
2630 AT_CHECK([ovs-appctl revalidator/purge], [0])
2631 AT_CHECK([ovs-ofctl --protocols=OpenFlow13 dump-flows br0 | ofctl_strip | sort], [0], [dnl
2632 n_packets=3, n_bytes=180, priority=0 actions=CONTROLLER:65535
2633 OFPST_FLOW reply (OF1.3):
2639 AT_SETUP([ofproto-dpif - table-miss flow with async config (OpenFlow 1.3)])
2640 OVS_VSWITCHD_START([dnl
2641 add-port br0 p1 -- set Interface p1 type=dummy
2643 ON_EXIT([kill `cat ovs-ofctl.pid`])
2645 ovs-appctl time/stop
2647 AT_CAPTURE_FILE([ofctl_monitor.log])
2648 # A table-miss flow has priority 0 and no match
2649 AT_CHECK([ovs-ofctl --protocols=OpenFlow13 add-flow br0 'priority=0 actions=output:CONTROLLER'])
2651 dnl Singleton controller action.
2652 AT_CHECK([ovs-ofctl monitor -P openflow10 --protocols=OpenFlow13 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
2654 # Become slave (OF 1.3), which should disable everything except port status.
2655 ovs-appctl -t ovs-ofctl ofctl/send 041800180000000200000003000000000000000000000001
2657 # Ensure that ovs-vswitchd gets a chance to reply before sending another command.
2658 ovs-appctl time/warp 500 100
2660 # Use OF 1.3 OFPT_SET_ASYNC to enable OFPR_NO_MATCH for slave only.
2661 ovs-appctl -t ovs-ofctl ofctl/send 041c002000000002000000000000000100000000000000000000000000000000
2663 ovs-appctl time/warp 500 100
2665 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)'
2667 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2668 ovs-appctl -t ovs-ofctl exit
2670 AT_CHECK([ovs-appctl revalidator/purge], [0])
2671 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2672 send: OFPT_ROLE_REQUEST (OF1.3) (xid=0x2): role=slave generation_id=1
2673 OFPT_ROLE_REPLY (OF1.3) (xid=0x2): role=slave generation_id=1
2675 send: OFPT_SET_ASYNC (OF1.3) (xid=0x2):
2686 OFPT_PACKET_IN (OF1.3) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
2687 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
2689 OFPT_PACKET_IN (OF1.3) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
2690 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
2692 OFPT_PACKET_IN (OF1.3) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
2693 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
2696 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2698 AT_CHECK([ovs-ofctl --protocols=OpenFlow13 dump-flows br0 | ofctl_strip | sort], [0], [dnl
2699 n_packets=3, n_bytes=180, priority=0 actions=CONTROLLER:65535
2700 OFPST_FLOW reply (OF1.3):
2707 AT_SETUP([ofproto-dpif - table-miss flow (OpenFlow 1.4)])
2708 OVS_VSWITCHD_START([dnl
2709 add-port br0 p1 -- set Interface p1 type=dummy
2711 ON_EXIT([kill `cat ovs-ofctl.pid`])
2713 AT_CAPTURE_FILE([ofctl_monitor.log])
2714 # A table-miss flow has priority 0 and no match
2715 AT_CHECK([ovs-ofctl --protocols=OpenFlow14 add-flow br0 'priority=0 actions=output:CONTROLLER'])
2717 dnl Singleton controller action.
2718 AT_CHECK([ovs-ofctl monitor -P openflow10 --protocols=OpenFlow14 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
2721 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)'
2723 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2724 ovs-appctl -t ovs-ofctl exit
2726 AT_CHECK([ovs-appctl revalidator/purge], [0])
2727 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2728 OFPT_PACKET_IN (OF1.4) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
2729 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
2731 OFPT_PACKET_IN (OF1.4) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
2732 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
2734 OFPT_PACKET_IN (OF1.4) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
2735 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
2738 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2740 AT_CHECK([ovs-ofctl --protocols=OpenFlow14 dump-flows br0 | ofctl_strip | sort], [0], [dnl
2741 n_packets=3, n_bytes=180, priority=0 actions=CONTROLLER:65535
2742 OFPST_FLOW reply (OF1.4):
2750 AT_SETUP([ofproto-dpif - packet-in reason in group table (Openflow 1.3)])
2751 OVS_VSWITCHD_START([dnl
2752 add-port br0 p1 -- set Interface p1 type=dummy
2754 ON_EXIT([kill `cat ovs-ofctl.pid`])
2756 AT_CAPTURE_FILE([ofctl_monitor.log])
2757 # A table-miss flow has priority 0 and no match
2758 AT_CHECK([ovs-ofctl --protocols=OpenFlow13 add-group br0 'group_id=1234,type=all,bucket=output:10,bucket=output:CONTROLLER'])
2759 AT_CHECK([ovs-ofctl --protocols=OpenFlow13 add-flow br0 'in_port=1 actions=group:1234'])
2761 dnl Singleton controller action.
2762 AT_CHECK([ovs-ofctl monitor -P openflow10 --protocols=OpenFlow13 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
2765 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)'
2767 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2768 ovs-appctl -t ovs-ofctl exit
2770 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2772 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2773 OFPT_PACKET_IN (OF1.3) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
2774 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
2776 OFPT_PACKET_IN (OF1.3) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
2777 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
2779 OFPT_PACKET_IN (OF1.3) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
2780 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
2783 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2785 AT_CHECK([ovs-ofctl --protocols=OpenFlow13 dump-flows br0 | ofctl_strip | sort], [0], [dnl
2786 n_packets=3, n_bytes=180, in_port=1 actions=group:1234
2787 OFPST_FLOW reply (OF1.3):
2794 AT_SETUP([ofproto-dpif - packet-in reason in group table (Openflow 1.4)])
2795 OVS_VSWITCHD_START([dnl
2796 add-port br0 p1 -- set Interface p1 type=dummy
2798 ON_EXIT([kill `cat ovs-ofctl.pid`])
2800 AT_CAPTURE_FILE([ofctl_monitor.log])
2801 # A table-miss flow has priority 0 and no match
2802 AT_CHECK([ovs-ofctl --protocols=OpenFlow14 add-group br0 'group_id=1234,type=all,bucket=output:10,bucket=output:CONTROLLER'])
2803 AT_CHECK([ovs-ofctl --protocols=OpenFlow14 add-flow br0 'in_port=1 actions=group:1234'])
2805 dnl Singleton controller action.
2806 AT_CHECK([ovs-ofctl monitor -P openflow10 --protocols=OpenFlow14 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
2809 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)'
2811 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2812 ovs-appctl -t ovs-ofctl exit
2814 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2816 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2817 OFPT_PACKET_IN (OF1.4) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via group) data_len=60 (unbuffered)
2818 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
2820 OFPT_PACKET_IN (OF1.4) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via group) data_len=60 (unbuffered)
2821 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
2823 OFPT_PACKET_IN (OF1.4) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via group) data_len=60 (unbuffered)
2824 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
2827 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2829 AT_CHECK([ovs-ofctl --protocols=OpenFlow14 dump-flows br0 | ofctl_strip | sort], [0], [dnl
2830 n_packets=3, n_bytes=180, in_port=1 actions=group:1234
2831 OFPST_FLOW reply (OF1.4):
2837 AT_SETUP([ofproto-dpif - ARP modification slow-path])
2839 ADD_OF_PORTS([br0], [1], [2])
2841 ovs-vsctl -- set Interface p2 type=dummy options:pcap=p2.pcap
2842 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'
2844 # Input some packets that should follow the arp modification slow-path.
2846 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)'
2848 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2850 # Check the packets that were output.
2851 AT_CHECK([ovs-ofctl parse-pcap p2.pcap], [0], [dnl
2852 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
2853 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
2854 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
2855 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
2856 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
2857 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
2858 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
2859 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
2860 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
2866 AT_SETUP([ofproto-dpif - VLAN handling])
2868 [set Bridge br0 fail-mode=standalone -- \
2869 add-port br0 p1 trunks=10,12 -- \
2870 add-port br0 p2 tag=10 -- \
2871 add-port br0 p3 tag=12 \
2872 other-config:priority-tags=true -- \
2873 add-port br0 p4 tag=12 -- \
2874 add-port br0 p5 vlan_mode=native-tagged tag=10 -- \
2875 add-port br0 p6 vlan_mode=native-tagged tag=10 trunks=10,12 -- \
2876 add-port br0 p7 vlan_mode=native-untagged tag=12 -- \
2877 add-port br0 p8 vlan_mode=native-untagged tag=12 trunks=10,12 \
2878 other-config:priority-tags=true -- \
2879 set Interface p1 type=dummy -- \
2880 set Interface p2 type=dummy -- \
2881 set Interface p3 type=dummy -- \
2882 set Interface p4 type=dummy -- \
2883 set Interface p5 type=dummy -- \
2884 set Interface p6 type=dummy -- \
2885 set Interface p7 type=dummy -- \
2886 set Interface p8 type=dummy --])
2888 dnl Each of these specifies an in_port by number, a VLAN VID (or "none"),
2889 dnl a VLAN PCP (used if the VID isn't "none") and the expected set of datapath
2895 "100 10 0 1,5,6,7,8,pop_vlan,2" \
2896 "100 10 1 1,5,6,7,8,pop_vlan,2" \
2899 "100 12 0 1,5,6,pop_vlan,3,4,7,8" \
2900 "100 12 1 1,5,6,pop_vlan,4,7,push_vlan(vid=0,pcp=1),3,8" \
2904 "1 10 0 5,6,7,8,100,pop_vlan,2" \
2905 "1 10 1 5,6,7,8,100,pop_vlan,2" \
2908 "1 12 0 5,6,100,pop_vlan,3,4,7,8" \
2909 "1 12 1 5,6,100,pop_vlan,4,7,push_vlan(vid=0,pcp=1),3,8" \
2910 "2 none 0 push_vlan(vid=10,pcp=0),1,5,6,7,8,100" \
2911 "2 0 0 pop_vlan,push_vlan(vid=10,pcp=0),1,5,6,7,8,100" \
2912 "2 0 1 pop_vlan,push_vlan(vid=10,pcp=1),1,5,6,7,8,100" \
2919 "3 none 0 4,7,8,push_vlan(vid=12,pcp=0),1,5,6,100" \
2920 "3 0 0 pop_vlan,4,7,8,push_vlan(vid=12,pcp=0),1,5,6,100" \
2921 "3 0 1 8,pop_vlan,4,7,push_vlan(vid=12,pcp=1),1,5,6,100" \
2928 "4 none 0 3,7,8,push_vlan(vid=12,pcp=0),1,5,6,100" \
2929 "4 0 0 pop_vlan,3,7,8,push_vlan(vid=12,pcp=0),1,5,6,100" \
2930 "4 0 1 3,8,pop_vlan,7,push_vlan(vid=12,pcp=1),1,5,6,100" \
2937 "5 none 0 2,push_vlan(vid=10,pcp=0),1,6,7,8,100" \
2938 "5 0 0 pop_vlan,2,push_vlan(vid=10,pcp=0),1,6,7,8,100" \
2939 "5 0 1 pop_vlan,2,push_vlan(vid=10,pcp=1),1,6,7,8,100" \
2940 "5 10 0 1,6,7,8,100,pop_vlan,2" \
2941 "5 10 1 1,6,7,8,100,pop_vlan,2" \
2944 "5 12 0 1,6,100,pop_vlan,3,4,7,8" \
2945 "5 12 1 1,6,100,pop_vlan,4,7,push_vlan(vid=0,pcp=1),3,8" \
2946 "6 none 0 2,push_vlan(vid=10,pcp=0),1,5,7,8,100" \
2947 "6 0 0 pop_vlan,2,push_vlan(vid=10,pcp=0),1,5,7,8,100" \
2948 "6 0 1 pop_vlan,2,push_vlan(vid=10,pcp=1),1,5,7,8,100" \
2949 "6 10 0 1,5,7,8,100,pop_vlan,2" \
2950 "6 10 1 1,5,7,8,100,pop_vlan,2" \
2953 "6 12 0 1,5,100,pop_vlan,3,4,7,8" \
2954 "6 12 1 1,5,100,pop_vlan,4,7,push_vlan(vid=0,pcp=1),3,8" \
2955 "7 none 0 3,4,8,push_vlan(vid=12,pcp=0),1,5,6,100" \
2956 "7 0 0 pop_vlan,3,4,8,push_vlan(vid=12,pcp=0),1,5,6,100" \
2957 "7 0 1 3,8,pop_vlan,4,push_vlan(vid=12,pcp=1),1,5,6,100" \
2958 "7 10 0 1,5,6,8,100,pop_vlan,2" \
2959 "7 10 1 1,5,6,8,100,pop_vlan,2" \
2962 "7 12 0 1,5,6,100,pop_vlan,3,4,8" \
2963 "7 12 1 1,5,6,100,pop_vlan,4,push_vlan(vid=0,pcp=1),3,8" \
2964 "8 none 0 3,4,7,push_vlan(vid=12,pcp=0),1,5,6,100" \
2965 "8 0 0 pop_vlan,3,4,7,push_vlan(vid=12,pcp=0),1,5,6,100" \
2966 "8 0 1 3,pop_vlan,4,7,push_vlan(vid=12,pcp=1),1,5,6,100" \
2967 "8 10 0 1,5,6,7,100,pop_vlan,2" \
2968 "8 10 1 1,5,6,7,100,pop_vlan,2" \
2971 "8 12 0 1,5,6,100,pop_vlan,3,4,7" \
2972 "8 12 1 1,5,6,100,pop_vlan,4,7,push_vlan(vid=0,pcp=1),3"
2980 if test $vlan = none; then
2981 flow="in_port($in_port),eth(src=50:54:00:00:00:01,dst=ff:ff:ff:ff:ff:ff),eth_type(0xabcd)"
2983 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))"
2986 echo "----------------------------------------------------------------------"
2987 echo "in_port=$in_port vlan=$vlan pcp=$pcp"
2989 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
2990 actual=`tail -1 stdout | sed 's/Datapath actions: //'`
2992 AT_CHECK([ovs-dpctl normalize-actions "$flow" "$expected"], [0], [stdout])
2994 AT_CHECK([ovs-dpctl normalize-actions "$flow" "$actual"], [0], [expout])
3000 AT_SETUP([ofproto-dpif - MPLS handling])
3001 OVS_VSWITCHD_START([dnl
3002 add-port br0 p1 -- set Interface p1 type=dummy
3004 ON_EXIT([kill `cat ovs-ofctl.pid`])
3006 AT_CAPTURE_FILE([ofctl_monitor.log])
3007 AT_DATA([flows.txt], [dnl
3008 dl_src=40:44:44:44:00:00 actions=push_mpls:0x8847,controller
3009 dl_src=40:44:44:44:00:01,mpls actions=push_mpls:0x8847,controller
3010 dl_src=40:44:44:44:00:02,mpls actions=push_mpls:0x8848,controller
3012 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 add-flows br0 flows.txt])
3014 dnl In this test, we push an MPLS tag to an ethernet packet.
3015 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
3018 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)'
3020 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3021 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
3023 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
3024 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3025 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
3026 00000000 50 54 00 00 00 07 40 44-44 44 00 00 88 47 00 00
3027 00000010 01 40 45 00 00 28 00 00-00 00 40 06 f9 7c c0 a8
3028 00000020 00 01 c0 a8 00 02 00 00-00 00 00 00 00 00 00 00
3029 00000030 00 00 50 00 00 00 00 00-00 00 00 00 00 00 00 00
3031 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3032 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
3033 00000000 50 54 00 00 00 07 40 44-44 44 00 00 88 47 00 00
3034 00000010 01 40 45 00 00 28 00 00-00 00 40 06 f9 7c c0 a8
3035 00000020 00 01 c0 a8 00 02 00 00-00 00 00 00 00 00 00 00
3036 00000030 00 00 50 00 00 00 00 00-00 00 00 00 00 00 00 00
3038 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3039 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
3040 00000000 50 54 00 00 00 07 40 44-44 44 00 00 88 47 00 00
3041 00000010 01 40 45 00 00 28 00 00-00 00 40 06 f9 7c c0 a8
3042 00000020 00 01 c0 a8 00 02 00 00-00 00 00 00 00 00 00 00
3043 00000030 00 00 50 00 00 00 00 00-00 00 00 00 00 00 00 00
3046 dnl In this test, we push an MPLS tag to an MPLS packet. The LSE should be
3047 dnl copied exactly, except for the BOS bit.
3048 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
3051 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)'
3053 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3054 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
3056 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
3057 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3058 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
3059 00000000 50 54 00 00 00 07 40 44-44 44 00 01 88 47 00 00
3060 00000010 a0 40 00 00 a1 40 00 00-00 00 00 00 00 00 00 00
3061 00000020 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
3062 00000030 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
3064 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3065 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
3066 00000000 50 54 00 00 00 07 40 44-44 44 00 01 88 47 00 00
3067 00000010 a0 40 00 00 a1 40 00 00-00 00 00 00 00 00 00 00
3068 00000020 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
3069 00000030 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
3071 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3072 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
3073 00000000 50 54 00 00 00 07 40 44-44 44 00 01 88 47 00 00
3074 00000010 a0 40 00 00 a1 40 00 00-00 00 00 00 00 00 00 00
3075 00000020 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
3076 00000030 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
3079 dnl In this test, we push an MPLS tag to an MPLS packet. The LSE should be
3080 dnl copied exactly, except for the BOS bit. The ethertype should be updated
3081 dnl to the MPLS ethertype of the MPLS push action which differs to that
3082 dnl of the input packet.
3083 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
3086 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)'
3088 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3089 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
3091 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
3092 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3093 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
3094 00000000 50 54 00 00 00 07 40 44-44 44 00 02 88 48 00 00
3095 00000010 a0 40 00 00 a1 40 00 00-00 00 00 00 00 00 00 00
3096 00000020 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
3097 00000030 00 00 00 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 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
3101 00000000 50 54 00 00 00 07 40 44-44 44 00 02 88 48 00 00
3102 00000010 a0 40 00 00 a1 40 00 00-00 00 00 00 00 00 00 00
3103 00000020 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
3104 00000030 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
3106 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3107 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
3108 00000000 50 54 00 00 00 07 40 44-44 44 00 02 88 48 00 00
3109 00000010 a0 40 00 00 a1 40 00 00-00 00 00 00 00 00 00 00
3110 00000020 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
3111 00000030 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
3117 AT_SETUP([ofproto-dpif - VLAN+MPLS handling])
3118 OVS_VSWITCHD_START([dnl
3119 add-port br0 p1 -- set Interface p1 type=dummy
3121 ON_EXIT([kill `cat ovs-ofctl.pid`])
3123 AT_CAPTURE_FILE([ofctl_monitor.log])
3124 AT_DATA([flows.txt], [dnl
3125 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
3126 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
3127 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
3128 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
3129 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
3130 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
3131 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
3132 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
3133 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
3134 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
3136 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 add-flows br0 flows.txt])
3138 dnl Modified MPLS controller action.
3139 dnl In this test, we push the MPLS tag before pushing a VLAN tag, so we see
3140 dnl both of these in the final flow
3141 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
3144 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)'
3146 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3147 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
3149 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
3150 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3151 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
3152 00000000 50 54 00 00 00 07 40 44-44 44 54 50 81 00 20 63
3153 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3154 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3155 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3156 00000040 00 00 00 00
3158 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3159 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
3160 00000000 50 54 00 00 00 07 40 44-44 44 54 50 81 00 20 63
3161 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3162 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3163 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3164 00000040 00 00 00 00
3166 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3167 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
3168 00000000 50 54 00 00 00 07 40 44-44 44 54 50 81 00 20 63
3169 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3170 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3171 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3172 00000040 00 00 00 00
3175 dnl Modified MPLS controller action.
3176 dnl In this test, the input packet in vlan-tagged, which should be stripped
3177 dnl before we push the MPLS and VLAN tags.
3178 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
3181 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))'
3183 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3184 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
3186 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
3187 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3188 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
3189 00000000 50 54 00 00 00 07 40 44-44 44 54 51 81 00 20 63
3190 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3191 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3192 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3194 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3195 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
3196 00000000 50 54 00 00 00 07 40 44-44 44 54 51 81 00 20 63
3197 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3198 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3199 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3201 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3202 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
3203 00000000 50 54 00 00 00 07 40 44-44 44 54 51 81 00 20 63
3204 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3205 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3206 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3209 dnl Modified MPLS controller action.
3210 dnl In this test, we push the MPLS tag before pushing a VLAN tag, so we see
3211 dnl both of these in the final flow
3212 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
3215 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)'
3217 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3218 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
3220 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
3221 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3222 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
3223 00000000 52 54 00 00 00 07 40 44-44 44 54 52 81 00 20 63
3224 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3225 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3226 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3227 00000040 00 00 00 00
3229 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3230 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
3231 00000000 52 54 00 00 00 07 40 44-44 44 54 52 81 00 20 63
3232 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3233 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3234 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3235 00000040 00 00 00 00
3237 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3238 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
3239 00000000 52 54 00 00 00 07 40 44-44 44 54 52 81 00 20 63
3240 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3241 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3242 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3243 00000040 00 00 00 00
3246 dnl Modified MPLS controller action.
3247 dnl In this test, the input packet in vlan-tagged, which should be stripped
3248 dnl before we push the MPLS and VLAN tags.
3249 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
3252 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))'
3254 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3255 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
3257 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
3258 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3259 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
3260 00000000 50 54 00 00 00 07 40 44-44 44 54 53 81 00 20 63
3261 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3262 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3263 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3265 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3266 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
3267 00000000 50 54 00 00 00 07 40 44-44 44 54 53 81 00 20 63
3268 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3269 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3270 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3272 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3273 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
3274 00000000 50 54 00 00 00 07 40 44-44 44 54 53 81 00 20 63
3275 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3276 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3277 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3280 dnl Modified MPLS controller action.
3281 dnl In this test, we push the VLAN tag before pushing a MPLS tag, but these
3282 dnl actions are reordered, so we see both of these in the final flow.
3283 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
3286 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)'
3288 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3289 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
3291 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
3292 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3293 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
3294 00000000 50 54 00 00 00 07 40 44-44 44 54 54 81 00 20 63
3295 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3296 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3297 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3298 00000040 00 00 00 00
3300 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3301 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
3302 00000000 50 54 00 00 00 07 40 44-44 44 54 54 81 00 20 63
3303 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3304 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3305 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3306 00000040 00 00 00 00
3308 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3309 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
3310 00000000 50 54 00 00 00 07 40 44-44 44 54 54 81 00 20 63
3311 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3312 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3313 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3314 00000040 00 00 00 00
3317 dnl Modified MPLS controller action.
3318 dnl In this test, the input packet in vlan-tagged, which should be stripped
3319 dnl before we push the MPLS and VLAN tags.
3320 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
3323 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))'
3325 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3326 OVS_APP_EXIT_AND_WAIT([ovs-ofctl])
3328 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
3329 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3330 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
3331 00000000 50 54 00 00 00 07 40 44-44 44 54 55 81 00 20 63
3332 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3333 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3334 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3336 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3337 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
3338 00000000 50 54 00 00 00 07 40 44-44 44 54 55 81 00 20 63
3339 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3340 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3341 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3343 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3344 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
3345 00000000 50 54 00 00 00 07 40 44-44 44 54 55 81 00 20 63
3346 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3347 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3348 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3351 dnl Modified MPLS controller action.
3352 dnl In this test, we push the VLAN tag before pushing a MPLS tag, but these
3353 dnl actions are reordered, so we see both of these in the final flow.
3354 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
3357 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)'
3359 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3360 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
3362 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
3363 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3364 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
3365 00000000 50 54 00 00 00 07 40 44-44 44 54 56 81 00 20 63
3366 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3367 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3368 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3369 00000040 00 00 00 00
3371 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3372 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
3373 00000000 50 54 00 00 00 07 40 44-44 44 54 56 81 00 20 63
3374 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3375 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3376 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3377 00000040 00 00 00 00
3379 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3380 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
3381 00000000 50 54 00 00 00 07 40 44-44 44 54 56 81 00 20 63
3382 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3383 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3384 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3385 00000040 00 00 00 00
3388 dnl Modified MPLS controller action.
3389 dnl In this test, the input packet in vlan-tagged, which should be stripped
3390 dnl before we push the MPLS and VLAN tags.
3391 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 -m 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
3394 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))'
3396 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3397 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
3399 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
3400 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3401 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
3402 00000000 50 54 00 00 00 07 40 44-44 44 54 57 81 00 20 63
3403 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3404 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3405 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3407 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3408 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
3409 00000000 50 54 00 00 00 07 40 44-44 44 54 57 81 00 20 63
3410 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3411 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3412 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3414 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3415 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
3416 00000000 50 54 00 00 00 07 40 44-44 44 54 57 81 00 20 63
3417 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3418 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3419 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3422 dnl Modified MPLS controller action.
3423 dnl In this test, the input packet in vlan-tagged, which should be stripped
3424 dnl before we push the MPLS and VLAN tags.
3425 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
3428 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))'
3430 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3431 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
3433 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
3434 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3435 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
3436 00000000 50 54 00 00 00 07 40 44-44 44 54 58 81 00 20 63
3437 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3438 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3439 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3441 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3442 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
3443 00000000 50 54 00 00 00 07 40 44-44 44 54 58 81 00 20 63
3444 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3445 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3446 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3448 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3449 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
3450 00000000 50 54 00 00 00 07 40 44-44 44 54 58 81 00 20 63
3451 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3452 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3453 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3456 dnl Modified MPLS controller action.
3457 dnl In this test, the input packet in vlan-tagged, which should be modified
3458 dnl before we push MPLS and VLAN tags.
3459 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
3462 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))'
3464 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3465 ovs-appctl -t ovs-ofctl exit
3467 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
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:59,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 59 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:59,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 59 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
3482 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3483 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
3484 00000000 50 54 00 00 00 07 40 44-44 44 54 59 81 00 20 63
3485 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3486 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3487 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3490 AT_CHECK([ovs-appctl revalidator/purge], [0])
3491 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
3492 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
3493 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
3494 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
3495 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
3496 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
3497 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
3498 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
3499 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
3500 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
3501 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
3502 OFPST_FLOW reply (OF1.2):
3508 AT_SETUP([ofproto-dpif - fragment handling - trace])
3510 ADD_OF_PORTS([br0], [1], [2], [3], [4], [5], [6], [90])
3511 AT_DATA([flows.txt], [dnl
3512 priority=75 tcp ip_frag=no tp_dst=80 actions=move:OXM_OF_TCP_DST[[]]->OXM_OF_TCP_SRC[[]],output:1
3513 priority=75 tcp ip_frag=first tp_dst=80 actions=move:OXM_OF_TCP_DST[[]]->OXM_OF_TCP_SRC[[]],output:2
3514 priority=50 tcp ip_frag=no actions=move:OXM_OF_TCP_DST[[]]->OXM_OF_TCP_SRC[[]],output:4
3515 priority=50 tcp ip_frag=first actions=move:OXM_OF_TCP_DST[[]]->OXM_OF_TCP_SRC[[]],output:5
3516 priority=50 tcp ip_frag=later actions=output:6
3518 AT_CHECK([ovs-ofctl replace-flows br0 flows.txt])
3520 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"
3521 no_flow="$base_flow,frag=no),tcp(src=12345,dst=80)"
3522 first_flow="$base_flow,frag=first),tcp(src=12345,dst=80)"
3523 later_flow="$base_flow,frag=later)"
3525 # mode no first later
3528 'drop 1 drop drop' \
3537 AT_CHECK([ovs-ofctl set-frags br0 $mode])
3538 for type in no first later; do
3539 eval flow=\$${type}_flow exp_output=\$$type
3540 printf "\n%s\n" "----$mode $type-----"
3541 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
3543 if test $mode = drop && test $type != no; then
3544 echo 'Packets dropped because they are IP fragments and the fragment handling mode is "drop".' >> expout
3545 echo "Datapath actions: $exp_output" >> expout
3546 elif test $type = later; then
3547 echo "Datapath actions: $exp_output" >> expout
3549 echo "Datapath actions: set(tcp(src=80,dst=80)),$exp_output" >> expout
3551 AT_CHECK([grep 'IP fragments' stdout; tail -1 stdout], [0], [expout])
3557 AT_SETUP([ofproto-dpif - fragment handling - upcall])
3559 ADD_OF_PORTS([br0], [1], [2], [3], [4], [5], [6], [90])
3560 AT_DATA([flows.txt], [dnl
3561 priority=75 tcp ip_frag=no tp_dst=80 actions=set_field:81->tcp_dst,output:1
3562 priority=75 tcp ip_frag=first tp_dst=80 actions=set_field:81->tcp_dst,output:2
3563 priority=50 tcp ip_frag=no actions=set_field:81->tcp_dst,output:4
3564 priority=50 tcp ip_frag=first actions=set_field:81->tcp_dst,output:5
3565 priority=50 tcp ip_frag=later actions=output:6
3567 AT_CHECK([ovs-ofctl replace-flows br0 flows.txt])
3569 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"
3570 no_flow="$base_flow,frag=no),tcp(src=12345,dst=80)"
3571 first_flow="$base_flow,frag=first),tcp(src=12345,dst=80)"
3572 later_flow="$base_flow,frag=later)"
3574 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
3578 AT_CHECK([ovs-ofctl set-frags br0 $mode])
3579 for type in no first later; do
3580 eval flow=\$${type}_flow
3581 printf "\n%s\n" "----$mode $type-----"
3583 AT_CHECK([ovs-appctl netdev-dummy/receive p90 "$flow"], [0], [stdout])
3586 AT_CHECK([ovs-appctl dpctl/dump-flows], [0], [dnl
3587 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
3588 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
3589 recirc_id(0),in_port(90),eth_type(0x0800),ipv4(proto=6,frag=later), packets:0, bytes:0, used:never, actions:6
3594 AT_CHECK([ovs-appctl revalidator/purge], [0])
3595 AT_CHECK([ovs-ofctl set-frags br0 $mode])
3596 for type in no first later; do
3597 eval flow=\$${type}_flow
3598 printf "\n%s\n" "----$mode $type-----"
3600 AT_CHECK([ovs-appctl netdev-dummy/receive p90 "$flow"], [0], [stdout])
3603 AT_CHECK([ovs-appctl dpctl/dump-flows], [0], [dnl
3604 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
3605 recirc_id(0),in_port(90),eth_type(0x0800),ipv4(frag=first), packets:0, bytes:0, used:never, actions:drop
3606 recirc_id(0),in_port(90),eth_type(0x0800),ipv4(frag=later), packets:0, bytes:0, used:never, actions:drop
3611 AT_CHECK([ovs-appctl revalidator/purge], [0])
3612 AT_CHECK([ovs-ofctl set-frags br0 $mode])
3613 for type in no first later; do
3614 eval flow=\$${type}_flow
3615 printf "\n%s\n" "----$mode $type-----"
3617 AT_CHECK([ovs-appctl netdev-dummy/receive p90 "$flow"], [0], [stdout])
3620 AT_CHECK([ovs-appctl dpctl/dump-flows], [0], [dnl
3621 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
3622 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
3623 recirc_id(0),in_port(90),eth_type(0x0800),ipv4(proto=6,frag=later), packets:0, bytes:0, used:never, actions:6
3629 AT_SETUP([ofproto-dpif - fragment handling - actions])
3631 ADD_OF_PORTS([br0], [1], [2], [3], [4], [5], [6], [90])
3633 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])
3634 AT_CHECK([tail -2 stderr | sed 's/^.*|WARN|//'], [0], [dnl
3635 source field tcp_dst lacks correct prerequisites
3636 ovs-ofctl: actions are invalid with specified match (OFPBAC_MATCH_INCONSISTENT)
3639 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])
3640 AT_CHECK([tail -2 stderr | sed 's/^.*|WARN|//'], [0], [dnl
3641 destination field tcp_src lacks correct prerequisites
3642 ovs-ofctl: actions are invalid with specified match (OFPBAC_MATCH_INCONSISTENT)
3645 AT_CHECK([ovs-ofctl add-flow br0 "udp,ip_frag=later actions=set_field:8888->udp_src,output:1"], [1], [], [stderr])
3646 AT_CHECK([tail -2 stderr | sed 's/^.*|WARN|//'], [0], [dnl
3647 set_field udp_src lacks correct prerequisities
3648 ovs-ofctl: actions are invalid with specified match (OFPBAC_MATCH_INCONSISTENT)
3651 AT_CHECK([ovs-ofctl add-flow br0 "udp,ip_frag=later actions=load:8888->NXM_OF_UDP_DST[[]],output:1"], [1], [], [stderr])
3652 AT_CHECK([tail -2 stderr | sed 's/^.*|WARN|//'], [0], [dnl
3653 set_field udp_dst lacks correct prerequisities
3654 ovs-ofctl: actions are invalid with specified match (OFPBAC_MATCH_INCONSISTENT)
3657 AT_CHECK([ovs-ofctl add-flow br0 "sctp,ip_frag=later actions=set_field:8888->sctp_src,output:1"], [1], [], [stderr])
3658 AT_CHECK([tail -2 stderr | sed 's/^.*|WARN|//'], [0], [dnl
3659 set_field sctp_src lacks correct prerequisities
3660 ovs-ofctl: actions are invalid with specified match (OFPBAC_MATCH_INCONSISTENT)
3663 AT_CHECK([ovs-ofctl add-flow br0 "sctp,ip_frag=later actions=set_field:8888->sctp_dst,output:1"], [1], [], [stderr])
3664 AT_CHECK([tail -2 stderr | sed 's/^.*|WARN|//'], [0], [dnl
3665 set_field sctp_dst lacks correct prerequisities
3666 ovs-ofctl: actions are invalid with specified match (OFPBAC_MATCH_INCONSISTENT)
3669 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])
3670 AT_CHECK([tail -2 stderr | sed 's/^.*|WARN|//'], [0], [dnl
3671 source field tcp_dst lacks correct prerequisites
3672 ovs-ofctl: actions are invalid with specified match (OFPBAC_MATCH_INCONSISTENT)
3675 AT_DATA([flows.txt], [dnl
3676 priority=75 tcp actions=load:42->OXM_OF_TCP_SRC[[0..7]],output:1
3678 AT_CHECK([ovs-ofctl -O OpenFlow12 replace-flows br0 flows.txt])
3680 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
3684 AT_CHECK([ovs-ofctl set-frags br0 $mode])
3685 for frag in 4000 6000 6008 4010; do
3686 printf "\n%s\n" "----$mode $frag-----"
3688 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"])
3691 AT_CHECK([ovs-appctl dpctl/dump-flows | sed 's/used:[[0-9]].[[0-9]]*s/used:0.001s/'], [0], [dnl
3692 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
3693 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
3694 recirc_id(0),in_port(90),eth_type(0x0800),ipv4(proto=6,frag=later), packets:1, bytes:74, used:0.001s, actions:1
3697 AT_CHECK([ovs-appctl revalidator/purge], [0])
3698 AT_CHECK([ovs-ofctl set-frags br0 $mode])
3699 for frag in 4000 6000 6008 4010; do
3700 printf "\n%s\n" "----$mode $frag truncated transport header -----"
3702 AT_CHECK([ovs-appctl netdev-dummy/receive p90 "0021853763af 0026b98cb0f9 0800 4500 0018 2e24 $frag 40 06 465d ac11370d ac11370b 828b 0016"])
3705 AT_CHECK([ovs-appctl dpctl/dump-flows | sed 's/used:[[0-9]].[[0-9]]*s/used:0.001s/'], [0], [dnl
3706 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
3707 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
3708 recirc_id(0),in_port(90),eth_type(0x0800),ipv4(proto=6,frag=later), packets:1, bytes:60, used:0.001s, actions:1
3711 AT_CHECK([ovs-appctl revalidator/purge], [0])
3712 AT_CHECK([ovs-ofctl set-frags br0 $mode])
3713 for frag in 4000 6000 6001 4002; do
3714 printf "\n%s\n" "----$mode $frag missing transport header-----"
3716 AT_CHECK([ovs-appctl netdev-dummy/receive p90 "0021853763af 0026b98cb0f9 0800 4500 0014 2e24 $frag 40 06 465d ac11370d ac11370b"])
3719 AT_CHECK([ovs-appctl dpctl/dump-flows | sed 's/used:[[0-9]].[[0-9]]*s/used:0.001s/'], [0], [dnl
3720 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
3721 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
3722 recirc_id(0),in_port(90),eth_type(0x0800),ipv4(proto=6,frag=later), packets:1, bytes:60, used:0.001s, actions:1
3728 AT_SETUP([ofproto-dpif - exit])
3730 ADD_OF_PORTS([br0], [1], [2], [3], [10], [11], [12], [13], [14])
3731 AT_DATA([flows.txt], [dnl
3732 in_port=1 actions=output:10,exit,output:11
3733 in_port=2 actions=output:12,resubmit:1,output:12
3734 in_port=3 actions=output:13,resubmit:2,output:14
3736 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
3737 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])
3738 AT_CHECK([tail -1 stdout], [0],
3739 [Datapath actions: 10
3741 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])
3742 AT_CHECK([tail -1 stdout], [0],
3743 [Datapath actions: 12,10
3745 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])
3746 AT_CHECK([tail -1 stdout], [0],
3747 [Datapath actions: 13,12,10
3753 AT_SETUP([ofproto-dpif - mirroring, select_all])
3755 ADD_OF_PORTS([br0], 1, 2, 3)
3757 set Bridge br0 mirrors=@m --\
3758 --id=@p3 get Port p3 --\
3759 --id=@m create Mirror name=mymirror select_all=true output_port=@p3
3761 AT_DATA([flows.txt], [dnl
3762 in_port=1 actions=output:2
3763 in_port=2 actions=output:1
3765 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
3767 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)"
3768 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
3769 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
3770 [Datapath actions: 2,3
3773 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)"
3774 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
3775 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
3776 [Datapath actions: 1,3
3783 AT_SETUP([ofproto-dpif - mirroring, select_src])
3785 ADD_OF_PORTS([br0], 1, 2, 3)
3787 set Bridge br0 mirrors=@m --\
3788 --id=@p1 get Port p1 -- --id=@p3 get Port p3 --\
3789 --id=@m create Mirror name=mymirror select_src_port=@p1 output_port=@p3
3791 AT_DATA([flows.txt], [dnl
3792 in_port=1 actions=output:2
3793 in_port=2 actions=output:1
3795 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
3797 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)"
3798 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
3799 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
3800 [Datapath actions: 2,3
3803 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)"
3804 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
3805 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
3806 [Datapath actions: 1
3811 AT_SETUP([ofproto-dpif - mirroring, OFPP_NONE ingress port])
3813 ADD_OF_PORTS([br0], 1, 2)
3815 set Bridge br0 mirrors=@m --\
3816 --id=@p2 get Port p2 --\
3817 --id=@m create Mirror name=mymirror select_all=true output_port=@p2
3819 AT_CHECK([ovs-ofctl add-flow br0 action=output:1])
3821 # "in_port" defaults to OFPP_NONE if it's not specified.
3822 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"
3823 AT_CHECK([ovs-appctl ofproto/trace br0 "$flow"], [0], [stdout])
3824 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
3825 [Datapath actions: 1,2
3832 AT_SETUP([ofproto-dpif - mirroring, select_dst])
3834 ADD_OF_PORTS([br0], 1, 2, 3)
3836 set Bridge br0 mirrors=@m --\
3837 --id=@p2 get Port p2 -- --id=@p3 get Port p3 --\
3838 --id=@m create Mirror name=mymirror select_dst_port=@p2 output_port=@p3
3840 AT_DATA([flows.txt], [dnl
3841 in_port=1 actions=output:2
3842 in_port=2 actions=output:1
3844 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
3846 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)"
3847 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
3848 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
3849 [Datapath actions: 2,3
3852 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)"
3853 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
3854 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
3855 [Datapath actions: 1
3862 AT_SETUP([ofproto-dpif - mirroring, select_vlan])
3864 ADD_OF_PORTS([br0], 1, 2, 3)
3866 set Bridge br0 mirrors=@m --\
3867 --id=@p2 get Port p2 -- --id=@p3 get Port p3 --\
3868 --id=@m create Mirror name=mymirror select_all=true select_vlan=11 output_port=@p3
3870 AT_DATA([flows.txt], [dnl
3871 in_port=1, actions=output:2
3873 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
3875 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)"
3876 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
3877 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
3878 [Datapath actions: 2
3881 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))"
3882 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
3883 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
3884 [Datapath actions: 2
3887 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))"
3888 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
3889 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
3890 [Datapath actions: 2,3
3897 AT_SETUP([ofproto-dpif - mirroring, output_port])
3899 ADD_OF_PORTS([br0], 1, 2, 3)
3901 set Bridge br0 mirrors=@m --\
3902 --id=@p3 get Port p3 --\
3903 --id=@m create Mirror name=mymirror select_all=true output_port=@p3
3905 AT_DATA([flows.txt], [dnl
3906 in_port=1 actions=mod_vlan_vid:17,output:2
3907 in_port=2 actions=output:1
3909 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
3911 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)"
3912 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
3913 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
3914 [Datapath actions: push_vlan(vid=17,pcp=0),2,pop_vlan,3
3917 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)"
3918 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
3919 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
3920 [Datapath actions: 1,3
3926 AT_SETUP([ofproto-dpif - mirroring, output_vlan])
3928 ADD_OF_PORTS([br0], 1, 2)
3930 set Bridge br0 mirrors=@m --\
3931 --id=@m create Mirror name=mymirror select_all=true output_vlan=12
3933 AT_DATA([flows.txt], [dnl
3934 in_port=1 actions=output:2
3935 in_port=2 actions=mod_vlan_vid:17,output:1
3937 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
3939 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)"
3940 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
3941 actual=`tail -1 stdout | sed 's/Datapath actions: //'`
3943 expected="2,push_vlan(vid=12,pcp=0),1,2,100"
3944 AT_CHECK([ovs-dpctl normalize-actions "$flow" "$expected"], [0], [stdout])
3946 AT_CHECK([ovs-dpctl normalize-actions "$flow" "$actual"], [0], [expout])
3948 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)"
3949 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
3950 actual=`tail -1 stdout | sed 's/Datapath actions: //'`
3952 expected="push_vlan(vid=17,pcp=0),1,pop_vlan,push_vlan(vid=12,pcp=0),1,2,100"
3953 AT_CHECK([ovs-dpctl normalize-actions "$flow" "$expected"], [0], [stdout])
3955 AT_CHECK([ovs-dpctl normalize-actions "$flow" "$actual"], [0], [expout])
3960 # Two testcases below are for the ofproto/trace command
3961 # The first one tests all correct syntax:
3962 # ofproto/trace [dp_name] odp_flow [-generate|packet]
3963 # ofproto/trace br_name br_flow [-generate|packet]
3964 AT_SETUP([ofproto-dpif - ofproto/trace command 1])
3965 OVS_VSWITCHD_START([set bridge br0 fail-mode=standalone])
3966 ADD_OF_PORTS([br0], 1, 2, 3)
3968 AT_DATA([flows.txt], [dnl
3969 in_port=1 actions=output:2
3970 in_port=2 actions=output:1
3972 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
3974 odp_flow="in_port(1)"
3976 # Test command: ofproto/trace odp_flow with in_port as a name.
3977 AT_CHECK([ovs-appctl ofproto/trace "$odp_flow"], [0], [stdout])
3978 AT_CHECK([tail -1 stdout], [0], [dnl
3982 odp_flow="in_port(1)"
3983 # Test command: ofproto/trace odp_flow
3984 AT_CHECK([ovs-appctl ofproto/trace "$odp_flow"], [0], [stdout])
3985 AT_CHECK([tail -1 stdout], [0], [dnl
3989 # Test command: ofproto/trace dp_name odp_flow
3990 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$odp_flow"], [0], [stdout])
3991 AT_CHECK([tail -1 stdout], [0], [dnl
3994 # Test commmand: ofproto/trace br_name br_flow
3995 AT_CHECK([ovs-appctl ofproto/trace br0 "$br_flow"], [0], [stdout])
3996 AT_CHECK([tail -1 stdout], [0], [dnl
4000 # Delete the inserted flows
4001 AT_CHECK([ovs-ofctl del-flows br0 "in_port=1"], [0], [stdout])
4002 AT_CHECK([ovs-ofctl del-flows br0 "in_port=2"], [0], [stdout])
4004 # This section below tests the [-generate] option
4005 odp_flow="in_port(3),eth(src=50:54:00:00:00:05,dst=ff:ff:ff:ff:ff:ff)"
4006 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"
4008 # Test command: ofproto/trace odp_flow
4009 AT_CHECK([ovs-appctl ofproto/trace "$odp_flow"], [0], [stdout])
4010 # Check for no MAC learning entry
4011 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
4015 # Test command: ofproto/trace br_name br_flow
4016 AT_CHECK([ovs-appctl ofproto/trace br0 "$br_flow"], [0], [stdout])
4017 # Check for no MAC learning entry
4018 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
4022 # Test command: ofproto/trace odp_flow -generate
4023 AT_CHECK([ovs-appctl ofproto/trace "$odp_flow" -generate], [0], [stdout])
4024 # Check for the MAC learning entry
4025 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
4027 3 0 50:54:00:00:00:05 ?
4030 # Test command: ofproto/trace dp_name odp_flow -generate
4031 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy \
4032 "in_port(1),eth(src=50:54:00:00:00:06,dst=50:54:00:00:00:05)" \
4033 -generate], [0], [stdout])
4034 # Check for both MAC learning entries
4035 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
4037 3 0 50:54:00:00:00:05 ?
4038 1 0 50:54:00:00:00:06 ?
4041 # Test command: ofproto/trace br_name br_flow -generate
4042 AT_CHECK([ovs-appctl ofproto/trace br0 \
4043 "in_port=2,dl_src=50:54:00:00:00:07,dl_dst=50:54:00:00:00:06" \
4044 -generate], [0], [stdout])
4045 # Check for both MAC learning entries.
4046 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
4048 3 0 50:54:00:00:00:05 ?
4049 1 0 50:54:00:00:00:06 ?
4050 2 0 50:54:00:00:00:07 ?
4053 # This section beflow tests the [packet] option
4054 # The ovs-tcpundump of packets between port1 and port2
4055 pkt1to2="50540000000250540000000108064500001C000100004001F98CC0A80001C0A800020800F7FF00000000"
4056 pkt2to1="50540000000150540000000208064500001C000100004001F98CC0A80002C0A800010800F7FF00000000"
4058 # Construct the MAC learning table
4059 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy \
4060 "in_port(1),eth(src=50:54:00:00:00:01,dst=ff:ff:ff:ff:ff:ff)" \
4061 -generate], [0], [stdout])
4063 # Construct the MAC learning table
4064 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy \
4065 "in_port(2),eth(src=50:54:00:00:00:02,dst=ff:ff:ff:ff:ff:ff)" \
4066 -generate], [0], [stdout])
4068 # Test command: ofproto/trace odp_flow packet
4069 AT_CHECK([ovs-appctl ofproto/trace \
4070 "in_port(1),skb_priority(1),skb_mark(2)" "$pkt1to2"], [0], [stdout])
4071 AT_CHECK([tail -1 stdout], [0], [dnl
4074 AT_CHECK([head -n 2 stdout], [0], [dnl
4076 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
4079 # Test command: ofproto/trace dp_name odp_flow packet
4080 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy \
4081 "in_port(1),skb_priority(1),skb_mark(2)" "$pkt1to2"], [0], [stdout])
4082 AT_CHECK([tail -1 stdout], [0], [dnl
4085 AT_CHECK([head -n 2 stdout], [0], [dnl
4087 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
4090 # Test command: ofproto/trace br_name br_flow packet
4091 AT_CHECK([ovs-appctl ofproto/trace br0 \
4092 "in_port=2,skb_priority=2,pkt_mark=1" "$pkt2to1"], [0], [stdout],[stderr])
4093 AT_CHECK([tail -1 stdout], [0], [dnl
4096 AT_CHECK([head -n 2 stdout], [0], [dnl
4098 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
4104 # The second test tests the corner cases
4105 AT_SETUP([ofproto-dpif - ofproto/trace command 2])
4107 ADD_OF_PORTS([br0], 1, 2)
4110 odp_flow="in_port(1),eth(src=50:54:00:00:00:01,dst=50:54:00:00:00:02)"
4111 br_flow="in_port=1,dl_src=50:54:00:00:00:01,dl_dst=50:54:00:00:00:02"
4113 generate="-generate"
4114 pkt="50540000000250540000000108064500001C000100004001F98CC0A80001C0A800020800F7FF00000000"
4116 # Test incorrect command: ofproto/trace wrong_name odp_flow [-generate|packet]
4122 [AT_CHECK([ovs-appctl ofproto/trace wrong_name "$odp_flow" option],
4124 AT_CHECK([tail -2 stderr], [0], [dnl
4125 Cannot find the datapath
4126 ovs-appctl: ovs-vswitchd: server returned an error
4129 # Test incorrect command: ofproto/trace empty_string odp_flow [-generate|packet]
4135 [AT_CHECK([ovs-appctl ofproto/trace "" "$odp_flow" option],
4137 AT_CHECK([tail -2 stderr], [0], [dnl
4138 Cannot find the datapath
4139 ovs-appctl: ovs-vswitchd: server returned an error
4142 # Test incorrect command: ofproto/trace nonexist_dp_name odp_flow [-generate|packet]
4148 [AT_CHECK([ovs-appctl ofproto/trace ovs-system "$odp_flow" option],
4150 AT_CHECK([tail -2 stderr], [0], [dnl
4151 Cannot find the datapath
4152 ovs-appctl: ovs-vswitchd: server returned an error
4155 # Test incorrect command: ofproto/trace br_name odp_flow [-generate|packet]
4161 [AT_CHECK([ovs-appctl ofproto/trace br0 "$odp_flow" option],
4163 AT_CHECK([tail -2 stderr], [0], [dnl
4164 Cannot find the datapath
4165 ovs-appctl: ovs-vswitchd: server returned an error
4168 # Test incorrect command: ofproto/trace dp_name br_flow [-generate|packet]
4174 [AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$br_flow" option],
4176 AT_CHECK([tail -2 stderr], [0], [dnl
4178 ovs-appctl: ovs-vswitchd: server returned an error
4181 # Test incorrect command: ofproto/trace br_flow [-generate|packet]
4187 [AT_CHECK([ovs-appctl ofproto/trace "$br_flow" option],
4189 AT_CHECK([tail -2 stderr], [0], [dnl
4190 Must specify bridge name
4191 ovs-appctl: ovs-vswitchd: server returned an error
4194 # Test incorrect command: ofproto/trace dp_name odp_flow garbage_option
4195 AT_CHECK([ovs-appctl ofproto/trace \
4196 ovs-dummy "$odp_flow" garbage_option],
4197 [2], [stdout],[stderr])
4198 AT_CHECK([tail -2 stderr], [0], [dnl
4199 Trailing garbage in packet data
4200 ovs-appctl: ovs-vswitchd: server returned an error
4203 # Test incorrect command: ofproto/trace with 4 arguments
4204 AT_CHECK([ovs-appctl ofproto/trace \
4205 arg1, arg2, arg3, arg4], [2], [stdout],[stderr])
4206 AT_CHECK([tail -2 stderr], [0], [dnl
4207 "ofproto/trace" command takes at most 3 arguments
4208 ovs-appctl: ovs-vswitchd: server returned an error
4211 # Test incorrect command: ofproto/trace with 0 argument
4212 AT_CHECK([ovs-appctl ofproto/trace ], [2], [stdout],[stderr])
4213 AT_CHECK([tail -2 stderr], [0], [dnl
4214 "ofproto/trace" command requires at least 1 arguments
4215 ovs-appctl: ovs-vswitchd: server returned an error
4221 AT_SETUP([ofproto-dpif - ofproto/trace-packet-out])
4223 ADD_OF_PORTS([br0], 1, 2, 3)
4225 AT_DATA([flows.txt], [dnl
4226 in_port=1 actions=output:2
4227 in_port=2 actions=output:1
4229 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
4231 AT_CHECK([ovs-appctl ofproto/trace-packet-out br0 in_port=1 'mod_vlan_vid:123,resubmit(,0)'], [0], [stdout])
4232 AT_CHECK([tail -1 stdout], [0], [dnl
4233 Datapath actions: push_vlan(vid=123,pcp=0),2
4240 m4_define([OFPROTO_TRACE],
4242 AT_CHECK([ovs-appctl ofproto/trace $1 "$flow" $3], [0], [stdout])
4243 actual=`tail -1 stdout | sed 's/Datapath actions: //'`
4245 AT_CHECK([ovs-dpctl normalize-actions "$flow" "$expected" $5],
4248 AT_CHECK([ovs-dpctl normalize-actions "$flow" "$actual" $5],
4251 AT_SETUP([ofproto-dpif - MAC learning])
4252 OVS_VSWITCHD_START([set bridge br0 fail-mode=standalone])
4253 ADD_OF_PORTS([br0], 1, 2, 3)
4255 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)'
4257 # Trace an ARP packet arriving on p3, to create a MAC learning entry.
4260 [in_port(3),eth(src=50:54:00:00:00:05,dst=ff:ff:ff:ff:ff:ff),$arp],
4264 # Check for the MAC learning entry.
4265 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
4267 3 0 50:54:00:00:00:05 ?
4270 # Trace a packet arrival destined for the learned MAC.
4271 # (This will also learn a MAC.)
4274 [in_port(1),eth(src=50:54:00:00:00:06,dst=50:54:00:00:00:05),$arp],
4278 # Check for both MAC learning entries.
4279 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
4281 3 0 50:54:00:00:00:05 ?
4282 1 0 50:54:00:00:00:06 ?
4285 # Trace a packet arrival that updates the first learned MAC entry.
4288 [in_port(2),eth(src=50:54:00:00:00:05,dst=ff:ff:ff:ff:ff:ff),$arp],
4292 # Check that the MAC learning entry was updated.
4293 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
4295 1 0 50:54:00:00:00:06 ?
4296 2 0 50:54:00:00:00:05 ?
4299 # Add another bridge.
4303 -- set bridge br1 datapath-type=dummy])
4304 ADD_OF_PORTS([br1], 4, 5)
4306 # Trace some packet arrivals in br1 to create MAC learning entries there too.
4309 [in_port(4),eth(src=50:54:00:00:00:06,dst=ff:ff:ff:ff:ff:ff),$arp],
4314 [in_port(5),eth(src=50:54:00:00:00:07,dst=ff:ff:ff:ff:ff:ff),$arp],
4318 # Check that the MAC learning entries were added.
4319 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br1 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
4321 4 0 50:54:00:00:00:06 ?
4322 5 0 50:54:00:00:00:07 ?
4325 # Delete port p1 and see that its MAC learning entry disappeared, and
4326 # that the MAC learning entry for the same MAC was also deleted from br1.
4327 AT_CHECK([ovs-vsctl del-port p1])
4328 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
4330 2 0 50:54:00:00:00:05 ?
4332 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br1 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
4334 5 0 50:54:00:00:00:07 ?
4340 AT_SETUP([ofproto-dpif - MAC table overflow])
4342 [set bridge br0 fail-mode=standalone other-config:mac-table-size=10])
4343 ADD_OF_PORTS([br0], 1, 2, 3)
4345 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)'
4347 AT_CHECK([ovs-appctl time/stop])
4349 # Trace 10 ARP packets arriving on p3, to create MAC learning entries.
4350 for i in 0 1 2 3 4 5 6 7 8 9; do
4353 [in_port(3),eth(src=50:54:00:00:00:0$i,dst=ff:ff:ff:ff:ff:ff),$arp],
4356 ovs-appctl time/warp 1000
4359 # Check for the MAC learning entries.
4360 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/ *[[0-9]]\{1,\}$//' | sort],
4362 3 0 50:54:00:00:00:00
4363 3 0 50:54:00:00:00:01
4364 3 0 50:54:00:00:00:02
4365 3 0 50:54:00:00:00:03
4366 3 0 50:54:00:00:00:04
4367 3 0 50:54:00:00:00:05
4368 3 0 50:54:00:00:00:06
4369 3 0 50:54:00:00:00:07
4370 3 0 50:54:00:00:00:08
4371 3 0 50:54:00:00:00:09
4375 # Trace another ARP packet on another MAC.
4378 [in_port(3),eth(src=50:54:00:00:00:10,dst=ff:ff:ff:ff:ff:ff),$arp],
4382 # Check that the new one chased the oldest one out of the table.
4383 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/' | sort],
4385 3 0 50:54:00:00:00:01 ?
4386 3 0 50:54:00:00:00:02 ?
4387 3 0 50:54:00:00:00:03 ?
4388 3 0 50:54:00:00:00:04 ?
4389 3 0 50:54:00:00:00:05 ?
4390 3 0 50:54:00:00:00:06 ?
4391 3 0 50:54:00:00:00:07 ?
4392 3 0 50:54:00:00:00:08 ?
4393 3 0 50:54:00:00:00:09 ?
4394 3 0 50:54:00:00:00:10 ?
4400 # CHECK_SFLOW_SAMPLING_PACKET(LOOPBACK_ADDR, ADDR_WITHOUT_BRACKETS)
4402 # Test that sFlow samples packets correctly using IPv4/IPv6 sFlow collector
4404 # IP_VERSION_TYPE is used in AT_SETUP
4405 m4_define([CHECK_SFLOW_SAMPLING_PACKET],
4406 [AT_SETUP([ofproto-dpif - sFlow packet sampling - $2 collector])
4407 AT_XFAIL_IF([test "$IS_WIN32" = "yes"])
4408 OVS_VSWITCHD_START([set Bridge br0 fail-mode=standalone])
4410 ON_EXIT([kill `cat test-sflow.pid`])
4411 AT_CHECK([ovstest test-sflow --log-file --detach --no-chdir --pidfile 0:$1 > sflow.log], [0], [], [ignore])
4412 AT_CAPTURE_FILE([sflow.log])
4413 SFLOW_PORT=`parse_listening_port < test-sflow.log`
4414 ovs-appctl time/stop
4416 ADD_OF_PORTS([br0], 1, 2)
4418 set Interface br0 options:ifindex=1002 -- \
4419 set Interface p1 options:ifindex=1004 -- \
4420 set Interface p2 options:ifindex=1003 -- \
4421 set Bridge br0 sflow=@sf -- \
4422 --id=@sf create sflow targets=\"$1:$SFLOW_PORT\" \
4423 header=128 sampling=1 polling=1 agent=$LOOPBACK_INTERFACE
4425 dnl open with ARP packets to seed the bridge-learning. The output
4426 dnl ifIndex numbers should be reported predictably after that.
4427 dnl Since we set sampling=1 we should see all of these packets
4428 dnl reported. Sorting the output by data-source and seqNo makes
4429 dnl it deterministic. Ensuring that we send at least two packets
4430 dnl into each port means we get to check the seq nos are
4431 dnl incrementing correctly.
4432 dnl because packets from different ports can be handled by separate
4433 dnl threads, put some sleeps
4435 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)'
4437 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)'
4439 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)'
4441 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)'
4442 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)'
4444 dnl sleep long enough to get more than one counter sample
4445 dnl from each datasource so we can check sequence numbers
4446 ovs-appctl time/warp 3000 100
4448 ovs-appctl -t test-sflow exit
4450 AT_CHECK_UNQUOTED([[sort sflow.log | $EGREP 'HEADER|ERROR' | sed 's/ /\
4471 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
4491 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
4511 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
4531 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
4551 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
4554 AT_CHECK_UNQUOTED([[sort sflow.log | $EGREP 'IFCOUNTERS|ERROR|PORTNAME|OPENFLOWPORT' | head -18 | sed 's/ /\
4568 in_broadcasts=4294967295
4571 in_unknownprotos=4294967295
4574 out_multicasts=4294967295
4575 out_broadcasts=4294967295
4591 in_broadcasts=4294967295
4594 in_unknownprotos=4294967295
4597 out_multicasts=4294967295
4598 out_broadcasts=4294967295
4614 in_broadcasts=4294967295
4617 in_unknownprotos=4294967295
4620 out_multicasts=4294967295
4621 out_broadcasts=4294967295
4637 in_broadcasts=4294967295
4640 in_unknownprotos=4294967295
4643 out_multicasts=4294967295
4644 out_broadcasts=4294967295
4660 in_broadcasts=4294967295
4663 in_unknownprotos=4294967295
4666 out_multicasts=4294967295
4667 out_broadcasts=4294967295
4683 in_broadcasts=4294967295
4686 in_unknownprotos=4294967295
4689 out_multicasts=4294967295
4690 out_broadcasts=4294967295
4695 datapath_id=18364758544493064720
4698 datapath_id=18364758544493064720
4701 datapath_id=18364758544493064720
4704 datapath_id=18364758544493064720
4707 datapath_id=18364758544493064720
4710 datapath_id=18364758544493064720
4727 CHECK_SFLOW_SAMPLING_PACKET([127.0.0.1], [IPv4])
4728 CHECK_SFLOW_SAMPLING_PACKET([[[::1]]], [IPv6])
4730 dnl Test sFlow LAG structures
4731 AT_SETUP([ofproto-dpif - sFlow LACP structures])
4732 AT_SKIP_IF([test "$IS_WIN32" = "yes"])
4733 OVS_VSWITCHD_START([dnl
4734 add-bond br0 bond p1 p2 -- \
4735 set Port bond lacp=active bond-mode=active-backup \
4736 other_config:lacp-time="fast" \
4737 other_config:lacp-system-id=11:22:33:44:55:66 \
4738 other_config:lacp-system-priority=54321 -- \
4739 set Interface p1 type=dummy \
4740 other_config:lacp-port-id=11 \
4741 other_config:lacp-port-priority=111 \
4742 other_config:lacp-aggregation-key=3333 -- \
4743 set Interface p2 type=dummy \
4744 other_config:lacp-port-id=22 \
4745 other_config:lacp-port-priority=222 \
4746 other_config:lacp-aggregation-key=3333 ])
4748 ON_EXIT([kill `cat test-sflow.pid`])
4749 AT_CHECK([ovstest test-sflow --log-file --detach --no-chdir --pidfile 0:127.0.0.1 > sflow.log], [0], [], [ignore])
4750 AT_CAPTURE_FILE([sflow.log])
4751 SFLOW_PORT=`parse_listening_port < test-sflow.log`
4753 ovs-appctl time/stop
4756 set Interface p1 options:ifindex=1003 -- \
4757 set Bridge br0 sflow=@sf -- \
4758 --id=@sf create sflow targets=\"127.0.0.1:$SFLOW_PORT\" \
4759 header=128 sampling=1 polling=1
4761 dnl sleep long enough to get the sFlow datagram flushed out (may be delayed for up to 1 second)
4762 AT_CHECK([ovs-appctl time/warp 2000 100], [0], [ignore])
4763 AT_CHECK([ovs-appctl revalidator/purge], [0])
4765 ovs-appctl -t test-sflow exit
4766 AT_CHECK([[sort sflow.log | $EGREP 'LACPCOUNTERS|ERROR' | head -n 1 | sed 's/ /\
4769 sysID=11:22:33:44:55:66
4770 partnerID=00:00:00:00:00:00
4777 markerPDUsRx=4294967295
4778 markerRespPDUsRx=4294967295
4779 unknownRx=4294967295
4782 markerPDUsTx=4294967295
4783 markerRespPDUsTx=4294967295
4788 # CHECK_NETFLOW_EXPIRATION(LOOPBACK_ADDR, IP_VERSION_TYPE)
4790 # Test that basic NetFlow reports flow statistics correctly:
4791 # The initial packet of a flow are correctly accounted.
4792 # Later packets within a flow are correctly accounted.
4793 # Flow actions changing (in this case, due to MAC learning)
4794 # cause a record to be sent.
4796 # IP_VERSION_TYPE is used in AT_SETUP
4797 m4_define([CHECK_NETFLOW_EXPIRATION],
4798 [AT_SETUP([ofproto-dpif - NetFlow flow expiration - $2 collector])
4799 OVS_VSWITCHD_START([set Bridge br0 fail-mode=standalone])
4800 ADD_OF_PORTS([br0], 1, 2)
4802 ovs-appctl time/stop
4803 ON_EXIT([kill `cat test-netflow.pid`])
4804 AT_CHECK([ovstest test-netflow --log-file --detach --no-chdir --pidfile 0:$1 > netflow.log], [0], [], [ignore])
4805 AT_CAPTURE_FILE([netflow.log])
4806 NETFLOW_PORT=`parse_listening_port < test-netflow.log`
4809 set Bridge br0 netflow=@nf -- \
4810 --id=@nf create NetFlow targets=\"$1:$NETFLOW_PORT\" \
4811 engine_id=1 engine_type=2 active_timeout=30 add-id-to-interface=false
4813 for delay in 1000 30000; do
4814 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)'
4815 sleep 1 # ensure the order in which these two packets are processed
4816 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)'
4818 ovs-appctl time/warp $delay
4821 ovs-appctl time/warp 6000
4822 ovs-appctl revalidator/wait
4824 ovs-appctl -t test-netflow exit
4826 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])
4828 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])
4830 combined=`grep "192.168.0.2 > 192.168.0.1, if 2 > 1, 2 pkts, 120 bytes, ICMP 0:0" netflow.log | wc -l`
4831 separate=`grep "192.168.0.2 > 192.168.0.1, if 2 > 1, 1 pkts, 60 bytes, ICMP 0:0" netflow.log | wc -l`
4832 AT_CHECK([test $separate = 2 || test $combined = 1], [0])
4836 CHECK_NETFLOW_EXPIRATION([127.0.0.1], [IPv4])
4837 CHECK_NETFLOW_EXPIRATION([[[::1]]], [IPv6])
4839 # CHECK_NETFLOW_ACTIVE_EXPIRATION(LOOPBACK_ADDR, IP_VERSION_TYPE)
4841 # Test that basic NetFlow reports active expirations correctly.
4843 # IP_VERSION_TYPE is used in AT_SETUP
4844 m4_define([CHECK_NETFLOW_ACTIVE_EXPIRATION],
4845 [AT_SETUP([ofproto-dpif - NetFlow active expiration - $2 collector])
4847 OVS_VSWITCHD_START([set Bridge br0 fail-mode=standalone])
4848 ADD_OF_PORTS([br0], 1, 2)
4850 ON_EXIT([kill `cat test-netflow.pid`])
4851 AT_CHECK([ovstest test-netflow --log-file --detach --no-chdir --pidfile 0:$1 > netflow.log], [0], [], [ignore])
4852 AT_CAPTURE_FILE([netflow.log])
4853 NETFLOW_PORT=`parse_listening_port < test-netflow.log`
4856 set Bridge br0 netflow=@nf -- \
4857 --id=@nf create NetFlow targets=\"$1:$NETFLOW_PORT\" \
4858 engine_id=1 engine_type=2 active_timeout=10 add-id-to-interface=false
4860 AT_CHECK([ovs-appctl time/stop])
4862 while test $n -le 60; do
4865 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)'
4866 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)'
4868 ovs-appctl time/warp 1000
4871 ovs-appctl time/warp 10000
4873 ovs-appctl revalidator/wait
4875 ovs-appctl -t test-netflow exit
4877 # Count the number of reported packets:
4878 # - From source to destination before MAC learning kicks in (just one).
4879 # - From source to destination after that.
4880 # - From destination to source.
4888 pkts=`echo "$line" | sed 's/.*, \([[0-9]]*\) pkts,.*/\1/'`
4895 "seq "*": 192.168.0.1 > 192.168.0.2, if 1 > 65535, "*" pkts, "*" bytes, TCP 1234 > 80, time "*)
4898 "seq "*": 192.168.0.1 > 192.168.0.2, if 1 > 2, "*" pkts, "*" bytes, TCP 1234 > 80, time "*)
4901 "seq "*": 192.168.0.2 > 192.168.0.1, if 2 > 1, "*" pkts, "*" bytes, TCP 80 > 1234, time "*)
4908 eval $counter=\`expr \$$counter + \$pkts\`
4909 n_recs=`expr $n_recs + 1`
4912 # There should be exactly 1 MAC learning packet,
4913 # exactly 59 other packets in that direction,
4914 # and exactly 60 packets in the other direction.
4915 AT_CHECK([echo $n_learn $n_in $n_out $n_other], [0], [1 59 60 0
4920 CHECK_NETFLOW_ACTIVE_EXPIRATION([127.0.0.1], [IPv4])
4921 CHECK_NETFLOW_ACTIVE_EXPIRATION([[[::1]]], [IPv6])
4923 AT_SETUP([ofproto-dpif - flow stats])
4925 AT_CHECK([ovs-ofctl add-flow br0 "ip,actions=NORMAL"])
4926 AT_CHECK([ovs-ofctl add-flow br0 "icmp,actions=NORMAL"])
4928 ovs-appctl time/stop
4930 for i in `seq 1 10`; do
4931 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)'
4934 AT_CHECK([ovs-appctl time/warp 1000], [0], [ignore])
4935 AT_CHECK([ovs-appctl revalidator/purge], [0])
4936 AT_CHECK([ovs-ofctl dump-flows br0], [0], [stdout])
4937 AT_CHECK([STRIP_XIDS stdout | sed -n 's/duration=[[0-9]]*\.[[0-9]]*s/duration=0.0s/p' | sort], [0], [dnl
4938 cookie=0x0, duration=0.0s, table=0, n_packets=0, n_bytes=0, idle_age=1, icmp actions=NORMAL
4939 cookie=0x0, duration=0.0s, table=0, n_packets=10, n_bytes=600, idle_age=1, ip actions=NORMAL
4944 AT_SETUP([ofproto-dpif - flow stats, set-n-threads])
4946 AT_CHECK([ovs-ofctl add-flow br0 "ip,actions=NORMAL"])
4947 AT_CHECK([ovs-ofctl add-flow br0 "icmp,actions=NORMAL"])
4949 ovs-appctl time/stop
4951 for i in `seq 1 10`; do
4952 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)'
4955 ovs-appctl time/warp 100
4956 AT_CHECK([ovs-vsctl set Open_vSwitch . other-config:n-revalidator-threads=2])
4957 ovs-appctl time/warp 1000
4959 AT_CHECK([ovs-ofctl dump-flows br0], [0], [stdout])
4960 AT_CHECK([STRIP_XIDS stdout | sed -n 's/duration=[[0-9]]*\.[[0-9]]*s/duration=0.0s/p' | sort], [0], [dnl
4961 cookie=0x0, duration=0.0s, table=0, n_packets=0, n_bytes=0, idle_age=1, icmp actions=NORMAL
4962 cookie=0x0, duration=0.0s, table=0, n_packets=10, n_bytes=600, idle_age=1, ip actions=NORMAL
4967 AT_SETUP([idle_age and hard_age increase over time])
4970 # get_ages DURATION HARD IDLE
4972 # Fetch the flow duration, hard age, and idle age into the variables
4973 # whose names are given as arguments. Rounds DURATION down to the
4974 # nearest integer. If hard_age doesn't appear in the output, sets
4975 # HARD to "none". If idle_age doesn't appear in the output, sets IDLE
4978 AT_CHECK([ovs-ofctl dump-flows br0], [0], [stdout])
4980 duration=`sed -n 's/.*duration=\([[0-9]]*\)\(\.[[0-9]]*\)\{0,1\}s.*/\1/p' stdout`
4981 AT_CHECK([[expr X"$duration" : 'X[0-9][0-9]*$']], [0], [ignore])
4982 AS_VAR_COPY([$1], [duration])
4984 hard=`sed -n 's/.*hard_age=\([[0-9]]*\),.*/\1/p' stdout`
4985 if test X"$hard" = X; then
4988 AT_CHECK([[expr X"$hard" : 'X[0-9][0-9]*$']], [0], [ignore])
4990 AS_VAR_COPY([$2], [hard])
4992 idle=`sed -n 's/.*idle_age=\([[0-9]]*\),.*/\1/p' stdout`
4993 if test X"$idle" = X; then
4996 AT_CHECK([[expr X"$idle" : 'X[0-9][0-9]*$']], [0], [ignore])
4998 AS_VAR_COPY([$3], [idle])
5001 # Add a flow and get its initial hard and idle age.
5002 AT_CHECK([ovs-ofctl add-flow br0 hard_timeout=199,idle_timeout=188,actions=drop])
5003 get_ages duration1 hard1 idle1
5005 ovs-appctl time/stop
5006 # Warp time forward by 10 seconds, then modify the flow's actions.
5007 ovs-appctl time/warp 10000
5008 get_ages duration2 hard2 idle2
5009 AT_CHECK([ovs-ofctl mod-flows br0 actions=flood])
5011 # Warp time forward by 10 seconds.
5012 ovs-appctl time/warp 10000
5013 get_ages duration3 hard3 idle3
5015 # Warp time forward 10 more seconds, then pass some packets through the flow,
5016 # then warp forward a few more times because idle times are only updated
5018 ovs-appctl time/warp 10000
5019 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)'
5020 ovs-appctl time/warp 3000 1000
5022 get_ages duration4 hard4 idle4
5024 printf "duration: %4s => %4s => %4s => %4s\n" $duration1 $duration2 $duration3 $duration4
5025 printf "hard_age: %4s => %4s => %4s => %4s\n" $hard1 $hard2 $hard3 $hard4
5026 printf "idle_age: %4s => %4s => %4s => %4s\n" $idle1 $idle2 $idle3 $idle4
5028 # Duration should increase steadily over time.
5029 AT_CHECK([test $duration1 -lt $duration2])
5030 AT_CHECK([test $duration2 -lt $duration3])
5031 AT_CHECK([test $duration3 -lt $duration4])
5033 # Hard age should be "none" initially because it's the same as flow_duration,
5034 # then it should increase.
5035 AT_CHECK([test $hard1 = none])
5036 AT_CHECK([test $hard2 = none])
5037 AT_CHECK([test $hard3 != none])
5038 AT_CHECK([test $hard4 != none])
5039 AT_CHECK([test $hard3 -lt $hard4])
5041 # Idle age should increase from 1 to 2 to 3, then decrease.
5042 AT_CHECK([test $idle1 -lt $idle2])
5043 AT_CHECK([test $idle2 -lt $idle3])
5044 AT_CHECK([test $idle3 -gt $idle4])
5046 # Check some invariant relationships.
5047 AT_CHECK([test $duration1 = $idle1])
5048 AT_CHECK([test $duration2 = $idle2])
5049 AT_CHECK([test $duration3 = $idle3])
5050 AT_CHECK([test $idle3 -gt $hard3])
5051 AT_CHECK([test $idle4 -lt $hard4])
5052 AT_CHECK([test $hard4 -lt $duration4])
5057 AT_SETUP([ofproto-dpif - fin_timeout])
5059 ovs-appctl time/stop
5060 AT_CHECK([ovs-ofctl add-flow br0 'idle_timeout=60,actions=fin_timeout(idle_timeout=5)'])
5061 AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip], [0],
5063 idle_timeout=60, actions=fin_timeout(idle_timeout=5)
5066 # Check that a TCP SYN packet does not change the timeout. (Because
5067 # flow stats updates are mainly what implements the fin_timeout
5068 # feature, we warp forward a couple of times to ensure that flow stats
5069 # run before re-checking the flow table.)
5070 AT_CHECK([ovs-appctl netdev-dummy/receive br0 0021853763af0026b98cb0f908004500003c2e2440004006465dac11370dac11370b828b0016751e267b00000000a00216d017360000020405b40402080a2d25085f0000000001030307])
5071 AT_CHECK([ovs-appctl time/warp 1000 && ovs-appctl time/warp 1000], [0], [warped
5074 AT_CHECK([ovs-appctl revalidator/purge], [0])
5075 AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip], [0],
5077 n_packets=1, n_bytes=74, idle_timeout=60, actions=fin_timeout(idle_timeout=5)
5079 # Check that a TCP FIN packet does change the timeout.
5080 AT_CHECK([ovs-appctl netdev-dummy/receive br0 0021853763af0026b98cb0f90800451000342e3e40004006463bac11370dac11370b828b0016751e319dfc96399b801100717ae800000101080a2d250a9408579588])
5081 AT_CHECK([ovs-appctl time/warp 1000 && ovs-appctl time/warp 1000], [0], [warped
5084 AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip], [0],
5086 n_packets=2, n_bytes=140, idle_timeout=5, actions=fin_timeout(idle_timeout=5)
5091 AT_SETUP([ofproto-dpif - ovs-appctl dpif/dump-dps])
5092 OVS_VSWITCHD_START([add-br br1 -- set bridge br1 datapath-type=dummy])
5093 ADD_OF_PORTS([br0], [1], [2])
5094 ADD_OF_PORTS([br1], [3])
5096 AT_CHECK([ovs-appctl dpif/dump-dps], [0], [dnl
5103 AT_SETUP([ofproto-dpif - ovs-appctl dpif/show])
5104 OVS_VSWITCHD_START([add-br br1 -- set bridge br1 datapath-type=dummy])
5105 ADD_OF_PORTS([br0], [1], [2])
5106 ADD_OF_PORTS([br1], [3])
5108 AT_CHECK([ovs-appctl dpif/show], [0], [dnl
5109 dummy@ovs-dummy: hit:0 missed:0
5111 br0 65534/100: (dummy)
5115 br1 65534/101: (dummy)
5121 AT_SETUP([ofproto-dpif - ovs-appctl dpif/dump-flows])
5122 # bump max-idle to avoid the flows being reclaimed behind us
5123 OVS_VSWITCHD_START([add-br br1 -- \
5124 set bridge br1 datapath-type=dummy fail-mode=secure -- \
5125 set Open_vSwitch . other_config:max-idle=10000])
5126 ADD_OF_PORTS([br0], [1], [2])
5127 ADD_OF_PORTS([br1], [3])
5129 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)'])
5130 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)'])
5131 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)'])
5132 ovs-appctl revalidator/wait
5133 AT_CHECK([ovs-appctl dpif/dump-flows br0 | STRIP_UFID | STRIP_USED | sort], [0], [dnl
5134 recirc_id(0),in_port(1),eth_type(0x0800),ipv4(frag=no), packets:0, bytes:0, used:never, actions:drop
5135 recirc_id(0),in_port(2),eth_type(0x0800),ipv4(frag=no), packets:0, bytes:0, used:never, actions:drop
5138 AT_CHECK([ovs-appctl dpif/dump-flows br1 | STRIP_UFID | STRIP_USED | sort], [0], [dnl
5139 recirc_id(0),in_port(3),eth_type(0x0800),ipv4(frag=no), packets:0, bytes:0, used:never, actions:drop
5142 AT_CHECK([ovs-appctl dpif/dump-flows -m br0 | STRIP_UFID | STRIP_USED | sort], [0], [dnl
5143 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
5144 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
5147 AT_CHECK([ovs-appctl dpif/dump-flows -m br1 | STRIP_UFID | STRIP_USED | sort], [0], [dnl
5148 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
5154 AT_SETUP([ofproto-dpif - MPLS actions that result in a userspace action])
5155 OVS_VSWITCHD_START([dnl
5156 add-port br0 p1 -- set Interface p1 type=dummy
5158 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5159 ON_EXIT([kill `cat ovs-ofctl.pid`])
5161 AT_CAPTURE_FILE([ofctl_monitor.log])
5162 AT_DATA([flows.txt], [dnl
5163 dl_src=60:66:66:66:66:00 actions=push_mpls:0x8847,controller
5164 dl_src=60:66:66:66:66:01 actions=pop_mpls:0x8849,controller
5166 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5168 dnl Packet is sent to userspace because a MPLS push or pop action is applied to
5169 dnl a packet with 2 MPLS LSEs but dpif-netdev can't handle any labels.
5171 dnl The input is a frame with two MPLS labels which tcpdump -vve shows as:
5172 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)
5173 dnl (label 20, exp 0, [S], ttl 32)
5174 dnl (tos 0x0, ttl 64, id 0, offset 0, flags [none], proto TCP (6), length 44, bad cksum 3b78 (->f978)!)
5175 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
5177 for dl_src in 00 01; do
5178 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"])
5180 sleep 1 # wait for the datapath flow installed
5181 AT_CHECK_UNQUOTED([cat ovs-vswitchd.log | STRIP_UFID | FILTER_FLOW_INSTALL | STRIP_USED], [0], [dnl
5182 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))
5183 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))
5190 AT_SETUP([ofproto-dpif - MPLS actions that result in a drop])
5191 OVS_VSWITCHD_START([dnl
5192 add-port br0 p1 -- set Interface p1 type=dummy
5194 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5195 ON_EXIT([kill `cat ovs-ofctl.pid`])
5197 AT_CAPTURE_FILE([ofctl_monitor.log])
5198 AT_DATA([flows.txt], [dnl
5199 dl_src=60:66:66:66:66:00 actions=push_mpls:0x8847,controller
5200 dl_src=60:66:66:66:66:01 actions=pop_mpls:0x8849,controller
5202 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5204 dnl Packet is dropped because an MPLS PUSH action is applied to a packet with
5205 dnl 4 MPLS LSEs but ovs-vswtichd can only handle up to 3 MPLS LSEs and thus
5206 dnl can't determine the resulting MPLS label after MPLS push/pop actions.
5208 dnl The input is a frame with two MPLS headers which tcpdump -vve shows as:
5209 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)
5210 dnl (label 20, exp 0, ttl 32)
5211 dnl (label 20, exp 0, ttl 32)
5212 dnl (label 20, exp 0, [S], ttl 32)
5213 dnl (tos 0x0, ttl 64, id 0, offset 0, flags [none], proto TCP (6), length 44, bad cksum 3b78 (->f978)!)
5214 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
5216 for dl_src in 00 01; do
5217 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"])
5219 sleep 1 # wait for the datapath flow installed
5220 AT_CHECK_UNQUOTED([cat ovs-vswitchd.log | STRIP_UFID | FILTER_FLOW_INSTALL | STRIP_USED], [0], [dnl
5221 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))
5222 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))
5228 AT_SETUP([ofproto-dpif - patch ports])
5229 OVS_VSWITCHD_START([add-br br1 \
5230 -- set bridge br1 datapath-type=dummy fail-mode=secure \
5231 -- add-port br1 pbr1 -- set int pbr1 type=patch options:peer=pbr0 \
5232 -- add-port br0 pbr0 -- set int pbr0 type=patch options:peer=pbr1])
5234 ADD_OF_PORTS([br0], [2])
5235 ADD_OF_PORTS([br1], [3])
5237 AT_CHECK([ovs-appctl upcall/disable-ufid], [0], [Datapath dumping tersely using UFID disabled
5239 AT_CHECK([ovs-appctl time/stop])
5240 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5242 AT_CHECK([ovs-ofctl add-flow br0 actions=LOCAL,output:1,output:2])
5243 AT_CHECK([ovs-ofctl add-flow br1 actions=LOCAL,output:1,output:3])
5245 for i in $(seq 1 10); do
5246 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)'
5247 if [[ $i -eq 1 ]]; then
5252 for i in $(seq 1 5); do
5253 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)'
5254 if [[ $i -eq 1 ]]; then
5259 AT_CHECK([ovs-appctl time/warp 500], [0],
5262 sleep 1 # wait for log writer
5264 AT_CHECK([ovs-appctl dpif/show], [0], [dnl
5265 dummy@ovs-dummy: hit:13 missed:2
5267 br0 65534/100: (dummy)
5269 pbr0 1/none: (patch: peer=pbr1)
5271 br1 65534/101: (dummy)
5273 pbr1 1/none: (patch: peer=pbr0)
5276 AT_CHECK([cat ovs-vswitchd.log | STRIP_UFID | FILTER_FLOW_INSTALL | STRIP_USED], [0], [dnl
5277 recirc_id=0,ip,in_port=100,nw_frag=no, actions:101,3,2
5278 recirc_id=0,ip,in_port=101,nw_frag=no, actions:100,2,3
5281 AT_CHECK([cat ovs-vswitchd.log | grep -e 'in_port(100).*packets:9' | STRIP_UFID | FILTER_FLOW_DUMP], [0], [dnl
5282 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
5284 AT_CHECK([cat ovs-vswitchd.log | grep -e 'in_port(101).*packets:4' | STRIP_UFID | FILTER_FLOW_DUMP], [0], [dnl
5285 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
5288 AT_CHECK([ovs-ofctl dump-ports br0 pbr0], [0], [dnl
5289 OFPST_PORT reply (xid=0x4): 1 ports
5290 port 1: rx pkts=5, bytes=300, drop=0, errs=0, frame=0, over=0, crc=0
5291 tx pkts=10, bytes=600, drop=0, errs=0, coll=0
5294 AT_CHECK([ovs-ofctl dump-ports br1 pbr1], [0], [dnl
5295 OFPST_PORT reply (xid=0x4): 1 ports
5296 port 1: rx pkts=10, bytes=600, drop=0, errs=0, frame=0, over=0, crc=0
5297 tx pkts=5, bytes=300, drop=0, errs=0, coll=0
5303 AT_SETUP([ofproto-dpif - port duration])
5304 OVS_VSWITCHD_START([set Bridge br0 protocols=OpenFlow13])
5305 ADD_OF_PORTS([br0], 1, 2)
5307 ovs-appctl time/stop
5308 ovs-appctl time/warp 10000
5310 AT_CHECK([ovs-ofctl -O openflow13 dump-ports br0], [0], [stdout])
5311 AT_CHECK([sed -n 's/=[[0-9]][[0-9]]\(\.[[0-9]][[0-9]]*\)\{0,1\}s/=?s/p' stdout], [0],
5320 dnl ----------------------------------------------------------------------
5321 AT_BANNER([ofproto-dpif -- megaflows])
5323 AT_SETUP([ofproto-dpif megaflow - port classification])
5325 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5326 ADD_OF_PORTS([br0], [1], [2])
5327 AT_DATA([flows.txt], [dnl
5328 table=0 in_port=1 actions=output(2)
5330 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5331 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)'])
5333 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)'])
5335 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5336 recirc_id=0,ip,in_port=1,nw_frag=no, actions: <del>
5341 AT_SETUP([ofproto-dpif megaflow - L2 classification])
5343 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5344 ADD_OF_PORTS([br0], [1], [2])
5345 AT_DATA([flows.txt], [dnl
5346 table=0 in_port=1,dl_src=50:54:00:00:00:09 actions=output(2)
5348 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5349 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)'])
5350 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)'])
5352 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5353 recirc_id=0,ip,in_port=1,dl_src=50:54:00:00:00:09,nw_frag=no, actions: <del>
5354 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>
5359 AT_SETUP([ofproto-dpif megaflow - L3 classification])
5361 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5362 ADD_OF_PORTS([br0], [1], [2])
5363 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], [])
5364 AT_DATA([flows.txt], [dnl
5365 table=0 in_port=1,icmp,nw_src=10.0.0.4 actions=output(2)
5367 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5368 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)'])
5369 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)'])
5371 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5372 recirc_id=0,icmp,in_port=1,nw_src=10.0.0.4,nw_frag=no, actions: <del>
5373 recirc_id=0,ip,in_port=1,nw_src=10.0.0.2/0.0.0.2,nw_frag=no, actions: <del>
5378 AT_SETUP([ofproto-dpif megaflow - IPv6 classification])
5380 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5381 ADD_OF_PORTS([br0], [1], [2])
5382 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], [])
5383 AT_DATA([flows.txt], [dnl
5384 table=0 in_port=1,ipv6,ipv6_src=2001:db8:3c4d:1:2:3:4:5 actions=output(2)
5386 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5387 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)'])
5388 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)'])
5390 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5391 recirc_id=0,ipv6,in_port=1,ipv6_src=2001:db8:3c4d:1:2:3:4:5,nw_frag=no, actions: <del>
5392 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>
5397 AT_SETUP([ofproto-dpif megaflow - L4 classification])
5399 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5400 ADD_OF_PORTS([br0], [1], [2])
5401 AT_DATA([flows.txt], [dnl
5402 table=0 in_port=1,icmp,icmp_type=8 actions=output(2)
5404 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5405 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)'])
5407 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)'])
5409 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5410 recirc_id=0,icmp,in_port=1,nw_frag=no,icmp_type=0x8/0xff, actions: <del>
5415 AT_SETUP([ofproto-dpif megaflow - normal])
5417 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5418 ADD_OF_PORTS([br0], [1], [2])
5419 AT_CHECK([ovs-ofctl add-flow br0 action=normal])
5420 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)'])
5421 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)'])
5423 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5424 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>
5425 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>
5430 AT_SETUP([ofproto-dpif megaflow - mpls])
5432 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5433 ADD_OF_PORTS([br0], [1], [2])
5434 AT_DATA([flows.txt], [dnl
5435 table=0 dl_src=50:54:00:00:00:09 actions=push_mpls:0x8847,2
5436 table=0 dl_src=50:54:00:00:00:0b actions=pop_mpls:0x0800,2
5438 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5439 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)'])
5440 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)'])
5442 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5443 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>
5444 recirc_id=0,mpls,in_port=1,dl_src=50:54:00:00:00:0b,mpls_bos=1, actions: <del>
5449 # CHECK_MEGAFLOW_NETFLOW(LOOPBACK_ADDR, IP_VERSION_TYPE)
5451 # IP_VERSION_TYPE is used in AT_SETUP
5452 m4_define([CHECK_MEGAFLOW_NETFLOW],
5453 [AT_SETUP([ofproto-dpif megaflow - netflow - $2 collector])
5455 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5456 ADD_OF_PORTS([br0], [1], [2])
5458 dnl NetFlow configuration disables wildcarding relevant fields
5459 ON_EXIT([kill `cat test-netflow.pid`])
5460 AT_CHECK([ovstest test-netflow --log-file --detach --no-chdir --pidfile 0:$1 > netflow.log], [0], [], [ignore])
5461 AT_CAPTURE_FILE([netflow.log])
5462 NETFLOW_PORT=`parse_listening_port < test-netflow.log`
5464 set Bridge br0 netflow=@nf -- \
5465 --id=@nf create NetFlow targets=\"$1:$NETFLOW_PORT\" \
5466 engine_id=1 engine_type=2 active_timeout=30 add-id-to-interface=false
5468 AT_CHECK([ovs-ofctl add-flow br0 action=normal])
5469 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)'])
5470 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)'])
5472 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5473 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>
5474 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>
5479 CHECK_MEGAFLOW_NETFLOW([127.0.0.1], [IPv4])
5480 CHECK_MEGAFLOW_NETFLOW([[[::1]]], [IPv6])
5482 AT_SETUP([ofproto-dpif megaflow - normal, active-backup bonding])
5484 [add-port br0 p1 -- set Interface p1 type=dummy ofport_request=1 -- \
5485 add-bond br0 bond0 p2 p3 bond_mode=active-backup -- \
5486 set interface p2 type=dummy ofport_request=2 -- \
5487 set interface p3 type=dummy ofport_request=3])
5488 AT_CHECK([ovs-appctl netdev-dummy/set-admin-state up], 0, [OK
5490 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5492 AT_CHECK([ovs-ofctl add-flow br0 action=normal])
5493 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)'])
5494 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)'])
5496 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5497 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>
5498 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>
5503 AT_SETUP([ofproto-dpif megaflow - normal, balance-slb bonding])
5505 [add-port br0 p1 -- set Interface p1 type=dummy ofport_request=1 -- \
5506 add-bond br0 bond0 p2 p3 bond_mode=balance-slb -- \
5507 set interface p2 type=dummy ofport_request=2 -- \
5508 set interface p3 type=dummy ofport_request=3])
5509 AT_CHECK([ovs-appctl netdev-dummy/set-admin-state up], 0, [OK
5511 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5513 AT_CHECK([ovs-ofctl add-flow br0 action=normal])
5514 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)'])
5515 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)'])
5517 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5518 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>
5519 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>
5524 AT_SETUP([ofproto-dpif megaflow - normal, balance-tcp bonding])
5525 # Create bond0 on br0 with interfaces p0 and p1
5526 # and bond1 on br1 with interfaces p2 and p3
5527 # with p0 patched to p2 and p1 patched to p3.
5529 [add-bond br0 bond0 p0 p1 bond_mode=balance-tcp lacp=active \
5530 other-config:lacp-time=fast \
5531 other-config:bond-rebalance-interval=0 -- \
5532 set interface p0 type=patch options:peer=p2 ofport_request=1 -- \
5533 set interface p1 type=patch options:peer=p3 ofport_request=2 -- \
5535 set bridge br1 other-config:hwaddr=aa:66:aa:66:00:00 -- \
5536 set bridge br1 datapath-type=dummy other-config:datapath-id=1234 \
5537 fail-mode=secure -- \
5538 add-bond br1 bond1 p2 p3 bond_mode=balance-tcp lacp=active \
5539 other-config:lacp-time=fast \
5540 other-config:bond-rebalance-interval=0 -- \
5541 set interface p2 type=patch options:peer=p0 ofport_request=3 -- \
5542 set interface p3 type=patch options:peer=p1 ofport_request=4 --])
5544 AT_CHECK([ovs-appctl netdev-dummy/set-admin-state up], 0, [OK
5546 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5547 ADD_OF_PORTS([br0], [7])
5548 AT_CHECK([ovs-ofctl add-flow br0 action=normal])
5549 AT_CHECK([ovs-ofctl add-flow br1 action=normal])
5550 ovs-appctl time/stop
5551 ovs-appctl time/warp 5000
5552 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)'])
5553 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)'])
5555 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5556 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>
5557 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>
5562 AT_SETUP([ofproto-dpif megaflow - resubmit port action])
5564 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5565 ADD_OF_PORTS([br0], [1], [2])
5566 AT_DATA([flows.txt], [dnl
5567 table=0 in_port=1,ip actions=resubmit(90)
5568 table=0 in_port=90,dl_src=50:54:00:00:00:09 actions=output(2)
5570 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5571 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)'])
5572 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)'])
5574 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5575 recirc_id=0,ip,in_port=1,dl_src=50:54:00:00:00:09,nw_frag=no, actions: <del>
5576 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>
5581 AT_SETUP([ofproto-dpif megaflow - resubmit table action])
5583 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5584 ADD_OF_PORTS([br0], [1], [2])
5585 AT_DATA([flows.txt], [dnl
5586 table=0 in_port=1,ip actions=resubmit(,1)
5587 table=1 dl_src=50:54:00:00:00:09 actions=output(2)
5589 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5590 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)'])
5591 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=
5592 1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
5594 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5595 recirc_id=0,ip,in_port=1,dl_src=50:54:00:00:00:09,nw_frag=no, actions: <del>
5596 recirc_id=0,ip,in_port=1,dl_src=50:54:00:00:00:0b,nw_frag=no, actions: <del>
5601 AT_SETUP([ofproto-dpif megaflow - goto_table action])
5603 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5604 ADD_OF_PORTS([br0], [1], [2])
5605 AT_DATA([flows.txt], [dnl
5606 table=0 in_port=1,ip actions=goto_table(1)
5607 table=1 dl_src=50:54:00:00:00:09 actions=output(2)
5609 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flows br0 flows.txt])
5610 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)'])
5611 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)'])
5613 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5614 recirc_id=0,ip,in_port=1,dl_src=50:54:00:00:00:09,nw_frag=no, actions: <del>
5615 recirc_id=0,ip,in_port=1,dl_src=50:54:00:00:00:0b,nw_frag=no, actions: <del>
5620 AT_SETUP([ofproto-dpif megaflow - mirroring, select_all])
5622 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5623 ADD_OF_PORTS([br0], [1], [2], [3])
5625 set Bridge br0 mirrors=@m --\
5626 --id=@p3 get Port p3 --\
5627 --id=@m create Mirror name=mymirror select_all=true output_port=@p3
5629 AT_DATA([flows.txt], [dnl
5630 in_port=1 actions=output:2
5632 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5633 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)'])
5635 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)'])
5637 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5638 recirc_id=0,ip,in_port=1,nw_frag=no, actions: <del>
5643 AT_SETUP([ofproto-dpif megaflow - mirroring, select_vlan])
5645 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5646 ADD_OF_PORTS([br0], [1], [2], [3])
5648 set Bridge br0 mirrors=@m --\
5649 --id=@p2 get Port p2 -- --id=@p3 get Port p3 --\
5650 --id=@m create Mirror name=mymirror select_all=true select_vlan=11 output_port=@p3
5652 AT_DATA([flows.txt], [dnl
5653 in_port=1 actions=output:2
5655 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5656 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))'])
5657 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)'])
5659 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5660 recirc_id=0,ip,in_port=1,dl_vlan=11,nw_frag=no, actions: <del>
5661 recirc_id=0,ip,in_port=1,vlan_tci=0x0000/0x1fff,nw_frag=no, actions: <del>
5666 AT_SETUP([ofproto-dpif megaflow - move action])
5668 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5669 ADD_OF_PORTS([br0], [1], [2])
5670 AT_DATA([flows.txt], [dnl
5671 table=0 in_port=1 ip,actions=move:NXM_OF_IP_SRC[[]]->NXM_NX_REG0[[]],resubmit(90)
5672 table=0 in_port=90 ip,actions=move:NXM_NX_REG0[[]]->NXM_NX_REG1[[]],resubmit(91)
5673 table=0 in_port=91 reg0=0x0a000002,actions=output(2)
5675 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5676 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)'])
5677 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)'])
5679 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5680 recirc_id=0,ip,in_port=1,nw_src=10.0.0.2,nw_frag=no, actions: <del>
5681 recirc_id=0,ip,in_port=1,nw_src=10.0.0.4,nw_frag=no, actions: <del>
5686 AT_SETUP([ofproto-dpif megaflow - push action])
5688 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5689 ADD_OF_PORTS([br0], [1], [2])
5690 AT_DATA([flows.txt], [dnl
5691 table=0 in_port=1 ip,actions=push:NXM_OF_IP_SRC[[]],output(2)
5693 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5694 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)'])
5695 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)'])
5697 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5698 recirc_id=0,ip,in_port=1,nw_src=10.0.0.2,nw_frag=no, actions: <del>
5699 recirc_id=0,ip,in_port=1,nw_src=10.0.0.4,nw_frag=no, actions: <del>
5704 AT_SETUP([ofproto-dpif megaflow - learning])
5706 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5707 ADD_OF_PORTS([br0], [1], [2])
5708 AT_DATA([flows.txt], [dnl
5709 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
5711 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5712 ovs-appctl time/stop
5713 # We send each packet twice because the first packet in each flow causes the
5714 # flow table to change and thus revalidations, which (depending on timing)
5715 # can keep a megaflow from being installed. The revalidations are done by
5716 # the second iteration, allowing the flows to be installed.
5718 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)'])
5719 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)'])
5720 ovs-appctl time/warp 100
5723 dnl The original flow is missing due to a revalidation.
5724 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5725 recirc_id=0,ip,in_port=1,vlan_tci=0x0000/0x0fff,dl_src=50:54:00:00:00:09,nw_frag=no, actions: <del>
5726 recirc_id=0,ip,in_port=1,vlan_tci=0x0000/0x0fff,dl_src=50:54:00:00:00:0b,nw_frag=no, actions: <del>
5731 AT_SETUP([ofproto-dpif megaflow - tunnels])
5733 [add-port br0 p1 -- set Interface p1 type=dummy ofport_request=1])
5734 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5735 AT_CHECK([ovs-vsctl add-port br0 p2 -- set Interface p2 type=gre \
5736 options:remote_ip=1.1.1.1 ofport_request=2 options:key=flow])
5737 AT_CHECK([ovs-vsctl add-port br0 p3 -- set Interface p3 type=dummy \
5739 AT_CHECK([ovs-vsctl add-port br0 p4 -- set Interface p4 type=gre \
5740 options:remote_ip=1.1.1.2 options:tos=inherit options:ttl=inherit \
5741 ofport_request=4 options:key=flow])
5742 AT_DATA([flows.txt], [dnl
5743 in_port=1,actions=output(2)
5744 in_port=3,actions=output(4)
5746 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5747 dnl ECN bits are always copied out, but don't use 0x3 (CE), since that
5748 dnl will cause the packet to be dropped.
5749 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)'])
5751 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)'])
5752 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)'])
5754 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)'])
5756 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5757 recirc_id=0,ip,in_port=1,nw_ecn=1,nw_frag=no, actions: <del>
5758 recirc_id=0,ip,in_port=3,nw_tos=0,nw_ecn=1,nw_ttl=64,nw_frag=no, actions: <del>
5759 recirc_id=0,ip,in_port=3,nw_tos=252,nw_ecn=1,nw_ttl=128,nw_frag=no, actions: <del>
5764 AT_SETUP([ofproto-dpif megaflow - dec_ttl])
5766 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5767 ADD_OF_PORTS([br0], [1], [2])
5768 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], [])
5769 AT_DATA([flows.txt], [dnl
5770 table=0 in_port=1,icmp,nw_src=10.0.0.4 actions=dec_ttl,output(2)
5772 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5773 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)'])
5774 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)'])
5776 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5777 recirc_id=0,icmp,in_port=1,nw_src=10.0.0.4,nw_ttl=64,nw_frag=no, actions: <del>
5778 recirc_id=0,ip,in_port=1,nw_src=10.0.0.2/0.0.0.2,nw_frag=no, actions: <del>
5783 AT_SETUP([ofproto-dpif megaflow - set dl_dst])
5785 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5786 ADD_OF_PORTS([br0], [1], [2])
5787 AT_DATA([flows.txt], [dnl
5788 table=0 in_port=1 actions=mod_dl_dst(50:54:00:00:00:0a),output(2)
5790 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5791 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)'])
5792 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)'])
5794 dnl The first packet is essentially a no-op, as the new destination MAC is the
5795 dnl same as the original. The second entry actually updates the destination
5797 AT_CHECK([cat ovs-vswitchd.log | STRIP_UFID | FILTER_FLOW_INSTALL | STRIP_USED], [0], [dnl
5798 recirc_id=0,ip,in_port=1,dl_dst=50:54:00:00:00:0a,nw_frag=no, actions:2
5799 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
5804 AT_SETUP([ofproto-dpif megaflow - disabled])
5806 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5807 ADD_OF_PORTS([br0], [1], [2])
5808 AT_DATA([flows.txt], [dnl
5809 table=0 in_port=1,ip,nw_dst=10.0.0.1 actions=output(2)
5810 table=0 in_port=1,ip,nw_dst=10.0.0.3 actions=drop
5812 AT_CHECK([ovs-appctl upcall/disable-megaflows], [0], [megaflows disabled
5814 AT_CHECK([ovs-appctl upcall/disable-ufid], [0], [Datapath dumping tersely using UFID disabled
5816 AT_CHECK([ovs-appctl vlog/set dpif_netdev:dbg], [0], [], [])
5817 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5818 for i in 1 2 3 4; do
5819 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)'])
5820 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)'])
5821 if [[ $i -eq 1 ]]; then
5826 AT_CHECK([cat ovs-vswitchd.log | STRIP_UFID | FILTER_FLOW_INSTALL | STRIP_USED], [0], [dnl
5827 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
5828 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
5830 AT_CHECK([cat ovs-vswitchd.log | STRIP_UFID | FILTER_FLOW_DUMP | grep 'packets:3'], [0], [dnl
5831 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
5832 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
5837 AT_SETUP([ofproto-dpif - datapath port number change])
5838 OVS_VSWITCHD_START([set Bridge br0 fail-mode=standalone])
5839 ADD_OF_PORTS([br0], 1)
5841 # Trace a flow that should output to p1.
5842 AT_CHECK([ovs-appctl ofproto/trace br0 in_port=LOCAL,dl_src=10:20:30:40:50:60],
5844 AT_CHECK([tail -1 stdout], [0], [Datapath actions: 1
5847 # Change p1's port number to 5.
5848 AT_CHECK([ovs-appctl dpif-dummy/change-port-number ovs-dummy p1 5])
5850 # Trace a flow that should output to p1 in its new location.
5851 AT_CHECK([ovs-appctl ofproto/trace br0 in_port=LOCAL,dl_src=10:20:30:40:50:60],
5853 AT_CHECK([tail -1 stdout], [0], [Datapath actions: 5
5858 # Tests the bundling with various bfd and cfm configurations.
5859 AT_SETUP([ofproto - bundle with variable bfd/cfm config])
5860 OVS_VSWITCHD_START([add-br br1 -- set bridge br1 datapath-type=dummy -- \
5861 add-bond br0 br0bond p0 p2 bond-mode=active-backup -- \
5862 add-bond br1 br1bond p1 p3 bond-mode=active-backup -- \
5863 set Interface p1 type=patch options:peer=p0 ofport_request=2 -- \
5864 set Interface p3 type=patch options:peer=p2 ofport_request=4 -- \
5865 set Interface p0 type=patch options:peer=p1 ofport_request=1 -- \
5866 set Interface p2 type=patch options:peer=p3 ofport_request=3 -- \
5867 set Interface p0 bfd:enable=true bfd:min_tx=300 bfd:min_rx=300 -- \
5868 set Interface p0 cfm_mpid=1 -- \
5869 set Interface p1 bfd:enable=true bfd:min_tx=500 bfd:min_rx=500])
5871 ovs-appctl time/stop
5872 # advance the clock to stablize everything.
5873 ovs-appctl time/warp 5000 100
5874 # cfm/show should show 'recv' fault.
5875 AT_CHECK([ovs-appctl cfm/show | sed -n '/^.*fault:.*/p'], [0], [dnl
5878 # bfd/show should show 'up'.
5879 AT_CHECK([ovs-appctl bfd/show | sed -n '/^.*Session State:.*/p'], [0], [dnl
5880 Local Session State: up
5881 Remote Session State: up
5882 Local Session State: up
5883 Remote Session State: up
5885 # bond/show should show 'may-enable: true' for all slaves.
5886 AT_CHECK([ovs-appctl bond/show | sed -n '/^.*may_enable:.*/p'], [0], [dnl
5893 # now disable the bfd on p1.
5894 AT_CHECK([ovs-vsctl set Interface p1 bfd:enable=false])
5895 # advance the clock to stablize everything.
5896 ovs-appctl time/warp 5000 100
5897 # cfm/show should show 'recv' fault.
5898 AT_CHECK([ovs-appctl cfm/show | sed -n '/^.*fault:.*/p'], [0], [dnl
5901 # bfd/show should show 'down'.
5902 AT_CHECK([ovs-appctl bfd/show | sed -n '/^.*Session State:.*/p'], [0], [dnl
5903 Local Session State: down
5904 Remote Session State: down
5906 # bond/show should show 'may-enable: false' for p0.
5907 AT_CHECK([ovs-appctl bond/show br0bond | sed -n '/^.*may_enable:.*/p'], [0], [dnl
5912 # now enable the bfd on p1 and disable bfd on p0.
5913 AT_CHECK([ovs-vsctl set Interface p1 bfd:enable=true])
5914 AT_CHECK([ovs-vsctl set Interface p0 bfd:enable=false])
5915 # advance the clock to stablize everything.
5916 ovs-appctl time/warp 5000 100
5917 # cfm/show should show 'recv' fault.
5918 AT_CHECK([ovs-appctl cfm/show | sed -n '/^.*fault:.*/p'], [0], [dnl
5921 # bfd/show should show 'down'.
5922 AT_CHECK([ovs-appctl bfd/show | sed -n '/^.*Session State:.*/p'], [0], [dnl
5923 Local Session State: down
5924 Remote Session State: down
5926 # bond/show should show 'may-enable: false' for p0 and p1.
5927 AT_CHECK([ovs-appctl bond/show | sed -n '/^.*may_enable:.*/p'], [0], [dnl
5937 AT_SETUP([ofproto-dpif - ofproto-dpif-monitor 1])
5938 OVS_VSWITCHD_START([add-port br0 p0 -- set interface p0 type=gre options:remote_ip=1.2.3.4])
5941 AT_CHECK([ovs-vsctl set interface p0 bfd:enable=true])
5943 OVS_WAIT_UNTIL([grep "monitor thread created" ovs-vswitchd.log])
5944 # disable bfd on p0.
5945 AT_CHECK([ovs-vsctl set interface p0 bfd:enable=false])
5947 OVS_WAIT_UNTIL([grep "monitor thread terminated" ovs-vswitchd.log])
5948 AT_CHECK([cat ovs-vswitchd.log | sed -e '/^.*ofproto_dpif_monitor.*$/d' > ovs-vswitchd.log])
5951 AT_CHECK([ovs-vsctl set interface p0 cfm_mpid=10])
5953 OVS_WAIT_UNTIL([grep "monitor thread created" ovs-vswitchd.log])
5954 # disable cfm on p0.
5955 AT_CHECK([ovs-vsctl remove interface p0 cfm_mpid 10])
5957 OVS_WAIT_UNTIL([grep "monitor thread terminated" ovs-vswitchd.log])
5958 AT_CHECK([cat ovs-vswitchd.log | sed -e '/^.*ofproto_dpif_monitor.*$/d' > ovs-vswitchd.log])
5960 # enable both bfd and cfm on p0.
5961 AT_CHECK([ovs-vsctl set interface p0 bfd:enable=true cfm_mpid=10])
5963 OVS_WAIT_UNTIL([grep "monitor thread created" ovs-vswitchd.log])
5964 # disable bfd on p0.
5965 AT_CHECK([ovs-vsctl set interface p0 bfd:enable=false])
5966 # check log, there should not be the log of thread terminated.
5967 AT_CHECK([sed -n "s/^.*|ofproto_dpif_monitor(monitor[[0-9]]*)|INFO|\(.* terminated\)$/\1/p" ovs-vswitchd.log], [0], [dnl
5969 # reenable bfd on p0.
5970 AT_CHECK([ovs-vsctl set interface p0 bfd:enable=true])
5971 # check log, should still be on log of thread created.
5972 AT_CHECK([sed -n "s/^.*|ofproto_dpif_monitor(monitor[[0-9]]*)|INFO|\(.* created\)$/\1/p" ovs-vswitchd.log], [0], [dnl
5973 monitor thread created
5975 # disable bfd and cfm together.
5976 AT_CHECK([ovs-vsctl set interface p0 bfd:enable=false -- remove interface p0 cfm_mpid 10])
5978 OVS_WAIT_UNTIL([grep "monitor thread terminated" ovs-vswitchd.log])
5983 # this test helps avoid the deadlock between the main thread and monitor thread.
5984 AT_SETUP([ofproto-dpif - ofproto-dpif-monitor 2])
5987 for i in `seq 1 199`
5989 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])
5995 AT_BANNER([ofproto-dpif - flow translation resource limits])
5997 AT_SETUP([ofproto-dpif - infinite resubmit])
5999 AT_CHECK([ovs-ofctl add-flow br0 actions=resubmit:1,resubmit:2,output:3])
6000 AT_CHECK([ovs-appctl -vpoll_loop:off ofproto/trace br0 'eth_dst=ff:ff:ff:ff:ff:ff'],
6002 AT_CHECK([tail -1 stdout], [0], [Datapath actions: drop
6004 AT_CHECK([grep -c 'resubmit actions recursed over 64 times' ovs-vswitchd.log],
6007 OVS_VSWITCHD_STOP(["/resubmit actions recursed/d"])
6010 AT_SETUP([ofproto-dpif - exponential resubmit chain])
6012 ADD_OF_PORTS([br0], 1)
6013 (for i in `seq 1 64`; do
6015 echo "in_port=$i, actions=resubmit:$j, resubmit:$j, local"
6017 echo "in_port=65, actions=local") > flows
6018 AT_CHECK([ovs-ofctl add-flows br0 flows])
6019 AT_CHECK([ovs-appctl -vpoll_loop:off ofproto/trace br0 'in_port=1'], [0], [stdout])
6020 AT_CHECK([grep -c 'over 4096 resubmit actions' ovs-vswitchd.log], [0], [1
6022 OVS_VSWITCHD_STOP(["/over.*resubmit actions/d"])
6025 AT_SETUP([ofproto-dpif - too many output actions])
6027 ADD_OF_PORTS([br0], 1)
6028 (for i in `seq 1 12`; do
6030 echo "in_port=$i, actions=resubmit:$j, resubmit:$j, local"
6032 echo "in_port=13, actions=local,local,local,local,local,local,local,local") > flows
6033 AT_CHECK([ovs-ofctl add-flows br0 flows])
6034 AT_CHECK([ovs-appctl -vpoll_loop:off ofproto/trace br0 'in_port=1'], [0], [stdout])
6035 AT_CHECK([grep -c -e '- Uses action(s) not supported by datapath' stdout],
6038 AT_CHECK([grep -c 'resubmits yielded over 64 kB of actions' ovs-vswitchd.log], [0], [1
6040 OVS_VSWITCHD_STOP(["/resubmits yielded over 64 kB of actions/d"])
6043 AT_SETUP([ofproto-dpif - stack too deep])
6045 ADD_OF_PORTS([br0], 1)
6046 (for i in `seq 1 12`; do
6048 echo "in_port=$i, actions=resubmit:$j, resubmit:$j, local"
6050 push="push:NXM_NX_REG0[[]]"
6051 echo "in_port=13, actions=$push,$push,$push,$push,$push,$push,$push,$push") > flows
6052 AT_CHECK([ovs-ofctl add-flows br0 flows])
6053 AT_CHECK([ovs-appctl -vpoll_loop:off ofproto/trace br0 'in_port=1'], [0], [stdout])
6054 AT_CHECK([grep -c 'resubmits yielded over 64 kB of stack' ovs-vswitchd.log], [0], [1
6056 OVS_VSWITCHD_STOP(["/resubmits yielded over 64 kB of stack/d"])
6060 AT_SETUP([ofproto-dpif packet-out controller])
6062 ADD_OF_PORTS([br0], 1, 2)
6064 AT_CHECK([ovs-ofctl add-flow br0 'dl_dst=50:54:00:00:00:0a actions=controller'])
6066 AT_CAPTURE_FILE([ofctl_monitor.log])
6067 AT_CHECK([ovs-ofctl monitor br0 65534 invalid_ttl --detach --no-chdir --pidfile 2> ofctl_monitor.log])
6070 AT_CHECK([ovs-ofctl -O OpenFlow13 packet-out br0 CONTROLLER controller '50540000000a5054000000091234'])
6073 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
6074 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
6075 NXT_PACKET_IN (xid=0x0): total_len=14 in_port=CONTROLLER (via action) data_len=14 (unbuffered)
6076 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
6078 NXT_PACKET_IN (xid=0x0): total_len=14 in_port=CONTROLLER (via action) data_len=14 (unbuffered)
6079 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
6081 NXT_PACKET_IN (xid=0x0): total_len=14 in_port=CONTROLLER (via action) data_len=14 (unbuffered)
6082 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
6085 AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
6086 dl_dst=50:54:00:00:00:0a actions=CONTROLLER:65535
6090 (echo "OFPST_TABLE reply (OF1.3) (xid=0x2):
6092 active=1, lookup=0, matched=0"
6094 while test $x -lt 254; do
6097 active=0, lookup=0, matched=0"
6100 AT_CHECK([ovs-ofctl -O OpenFlow13 dump-tables br0 ], [0], [expout])
6105 AT_SETUP([ofproto-dpif packet-out controller (patch port)])
6108 add-port br0 p1 -- \
6109 set interface p1 type=patch options:peer=p2 -- \
6111 set bridge br1 datapath-type=dummy -- \
6112 set bridge br1 fail-mode=secure -- \
6113 set bridge br1 protocols='[OpenFlow10,OpenFlow11,OpenFlow12,OpenFlow13]' -- \
6114 add-port br1 p2 -- \
6115 set interface p2 type=patch options:peer=p1 --])
6117 AT_CAPTURE_FILE([ofctl_monitor.log])
6118 AT_CHECK([ovs-ofctl monitor br1 65534 invalid_ttl --detach --no-chdir --pidfile 2> ofctl_monitor.log])
6121 AT_CHECK([ovs-ofctl -O OpenFlow13 packet-out br0 CONTROLLER output:1 '50540000000a5054000000091234'])
6124 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
6125 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
6126 NXT_PACKET_IN (xid=0x0): cookie=0x0 total_len=14 in_port=1 (via no_match) data_len=14 (unbuffered)
6127 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
6129 NXT_PACKET_IN (xid=0x0): cookie=0x0 total_len=14 in_port=1 (via no_match) data_len=14 (unbuffered)
6130 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
6132 NXT_PACKET_IN (xid=0x0): cookie=0x0 total_len=14 in_port=1 (via no_match) data_len=14 (unbuffered)
6133 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
6136 (printf "OFPST_TABLE reply (OF1.3) (xid=0x2):"
6138 while test $x -lt 254; do
6141 active=0, lookup=0, matched=0"
6144 AT_CHECK([ovs-ofctl -O OpenFlow13 dump-tables br0 ], [0], [expout])
6146 (echo "OFPST_TABLE reply (OF1.3) (xid=0x2):
6148 active=0, lookup=3, matched=0"
6150 while test $x -lt 254; do
6153 active=0, lookup=0, matched=0"
6156 AT_CHECK([ovs-ofctl -O OpenFlow13 dump-tables br1 ], [0], [expout])
6162 AT_SETUP([ofproto-dpif packet-out goto_table])
6164 ADD_OF_PORTS([br0], 1, 2)
6166 AT_DATA([flows.txt], [dnl
6167 table=0 dl_dst=50:54:00:00:00:0a actions=goto_table(1)
6168 table=1 dl_dst=50:54:00:00:00:0a actions=controller
6170 AT_CHECK([ovs-ofctl -O OpenFlow13 add-flows br0 flows.txt])
6172 AT_CAPTURE_FILE([ofctl_monitor.log])
6173 AT_CHECK([ovs-ofctl monitor br0 65534 invalid_ttl --detach --no-chdir --pidfile 2> ofctl_monitor.log])
6176 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)'
6179 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
6180 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
6181 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
6182 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
6183 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
6185 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
6186 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
6188 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
6189 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
6192 AT_CHECK([ovs-appctl revalidator/purge], [0])
6193 AT_CHECK([ovs-ofctl -O OpenFlow13 dump-flows br0 | ofctl_strip | sort], [0], [dnl
6194 n_packets=3, n_bytes=180, dl_dst=50:54:00:00:00:0a actions=goto_table:1
6195 table=1, n_packets=3, n_bytes=180, dl_dst=50:54:00:00:00:0a actions=CONTROLLER:65535
6196 OFPST_FLOW reply (OF1.3):
6199 (echo "OFPST_TABLE reply (OF1.3) (xid=0x2):
6201 active=1, lookup=3, matched=3
6204 active=1, lookup=3, matched=3"
6206 while test $x -lt 254; do
6209 active=0, lookup=0, matched=0"
6212 AT_CHECK([ovs-ofctl -O OpenFlow13 dump-tables br0 ], [0], [expout])
6218 AT_SETUP([ofproto-dpif packet-out table-miss (continue)])
6220 ADD_OF_PORTS([br0], 1, 2)
6222 AT_CHECK([ovs-ofctl -O OpenFlow11 add-flow br0 'table=1 dl_dst=50:54:00:00:00:0a actions=controller'])
6223 AT_CHECK([ovs-ofctl -O OpenFlow11 mod-table br0 all continue])
6225 AT_CAPTURE_FILE([ofctl_monitor.log])
6226 AT_CHECK([ovs-ofctl monitor br0 65534 invalid_ttl --detach --no-chdir --pidfile 2> ofctl_monitor.log])
6229 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)'
6232 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
6233 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
6234 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
6235 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
6236 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
6238 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
6239 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
6241 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
6242 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
6245 AT_CHECK([ovs-appctl revalidator/purge], [0])
6246 AT_CHECK([ovs-ofctl -O OpenFlow11 dump-flows br0 | ofctl_strip | sort], [0], [dnl
6247 table=1, n_packets=3, n_bytes=180, dl_dst=50:54:00:00:00:0a actions=CONTROLLER:65535
6248 OFPST_FLOW reply (OF1.1):
6251 (echo "OFPST_TABLE reply (OF1.3) (xid=0x2):
6253 active=0, lookup=3, matched=0
6256 active=1, lookup=3, matched=3"
6258 while test $x -lt 254; do
6261 active=0, lookup=0, matched=0"
6264 AT_CHECK([ovs-ofctl -O OpenFlow13 dump-tables br0 ], [0], [expout])
6269 AT_SETUP([ofproto-dpif - ICMPv6])
6271 ADD_OF_PORTS([br0], 1)
6273 AT_CAPTURE_FILE([ofctl_monitor.log])
6275 AT_CHECK([ovs-ofctl monitor br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
6277 ovs-appctl netdev-dummy/receive p1 '0060970769ea0000860580da86dd6000000000203afffe80000000000000020086fffe0580dafe80000000000000026097fffe0769ea870068bd00000000fe80000000000000026097fffe0769ea01010000860580da'
6279 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
6281 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
6282 NXT_PACKET_IN (xid=0x0): cookie=0x0 total_len=86 in_port=1 (via no_match) data_len=86 (unbuffered)
6283 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