1 AT_BANNER([ofproto-dpif])
3 AT_SETUP([ofproto-dpif - revalidator/wait])
5 AT_CHECK([ovs-appctl revalidator/wait])
9 AT_SETUP([ofproto-dpif, active-backup bonding])
10 # Create br0 with interfaces p1, p2 and p7, creating bond0 with p1 and p2
11 # and br1 with interfaces p3, p4 and p8.
12 # toggle p1,p2 of bond0 up and down to test bonding in active-backup mode.
14 [add-bond br0 bond0 p1 p2 bond_mode=active-backup --\
15 set interface p1 type=dummy options:pstream=punix:$OVS_RUNDIR/p1.sock ofport_request=1 -- \
16 set interface p2 type=dummy options:pstream=punix:$OVS_RUNDIR/p2.sock ofport_request=2 -- \
17 add-port br0 p7 -- set interface p7 ofport_request=7 type=dummy -- \
19 set bridge br1 other-config:hwaddr=aa:66:aa:66:00:00 -- \
20 set bridge br1 datapath-type=dummy other-config:datapath-id=1234 \
22 add-port br1 p3 -- set interface p3 type=dummy options:stream=unix:$OVS_RUNDIR/p1.sock ofport_request=3 -- \
23 add-port br1 p4 -- set interface p4 type=dummy options:stream=unix:$OVS_RUNDIR/p2.sock ofport_request=4 -- \
24 add-port br1 p8 -- set interface p8 ofport_request=8 type=dummy --])
25 WAIT_FOR_DUMMY_PORTS([p3], [p4])
26 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
28 AT_CHECK([ovs-ofctl add-flow br0 action=normal])
29 AT_CHECK([ovs-ofctl add-flow br1 action=normal])
30 ovs-appctl netdev-dummy/set-admin-state up
31 ovs-appctl time/warp 100
32 ovs-appctl netdev-dummy/set-admin-state p2 down
34 ovs-appctl time/warp 100
35 AT_CHECK([ovs-appctl netdev-dummy/receive p7 'in_port(7),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
36 AT_CHECK([ovs-appctl netdev-dummy/receive p7 'in_port(7),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.3,dst=10.0.0.4,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
37 ovs-appctl time/warp 100
38 ovs-appctl netdev-dummy/set-admin-state p2 up
39 ovs-appctl netdev-dummy/set-admin-state p1 down
40 ovs-appctl time/warp 100
41 AT_CHECK([ovs-appctl netdev-dummy/receive p7 'in_port(7),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0d),eth_type(0x0800),ipv4(src=10.0.0.5,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
42 AT_CHECK([ovs-appctl netdev-dummy/receive p7 'in_port(7),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0e),eth_type(0x0800),ipv4(src=10.0.0.6,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
43 ovs-appctl time/warp 200 100
45 AT_CHECK([cat ovs-vswitchd.log | grep 'in_port=[[348]]' | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
46 recirc_id=0,ip,in_port=3,vlan_tci=0x0000/0x1fff,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,nw_frag=no, actions: <del>
47 recirc_id=0,ip,in_port=3,vlan_tci=0x0000/0x1fff,dl_src=50:54:00:00:00:0b,dl_dst=50:54:00:00:00:0c,nw_frag=no, actions: <del>
48 recirc_id=0,ip,in_port=4,vlan_tci=0x0000/0x1fff,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0d,nw_frag=no, actions: <del>
49 recirc_id=0,ip,in_port=4,vlan_tci=0x0000/0x1fff,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0e,nw_frag=no, actions: <del>
50 recirc_id=0,rarp,in_port=4,vlan_tci=0x0000/0x1fff,dl_src=50:54:00:00:00:09,dl_dst=ff:ff:ff:ff:ff:ff, actions: <del>
51 recirc_id=0,rarp,in_port=4,vlan_tci=0x0000/0x1fff,dl_src=50:54:00:00:00:0b,dl_dst=ff:ff:ff:ff:ff:ff, actions: <del>
56 AT_SETUP([ofproto-dpif, balance-slb bonding])
57 # Create br0 with interfaces bond0(p1, p2, p3) and p7,
58 # and br1 with interfaces p4, p5, p6 and p8.
59 # p1 <-> p4, p2 <-> p5, p3 <-> p6
60 # Send some traffic, make sure the traffic are spread based on source mac.
62 [add-bond br0 bond0 p1 p2 p3 bond_mode=balance-slb --\
63 set interface p1 type=dummy options:pstream=punix:$OVS_RUNDIR/p1.sock ofport_request=1 -- \
64 set interface p2 type=dummy options:pstream=punix:$OVS_RUNDIR/p2.sock ofport_request=2 -- \
65 set interface p3 type=dummy options:pstream=punix:$OVS_RUNDIR/p3.sock ofport_request=3 -- \
66 add-port br0 p7 -- set interface p7 ofport_request=7 type=dummy -- \
68 set bridge br1 other-config:hwaddr=aa:66:aa:66:00:00 -- \
69 set bridge br1 datapath-type=dummy other-config:datapath-id=1234 \
71 add-port br1 p4 -- set interface p4 type=dummy options:stream=unix:$OVS_RUNDIR/p1.sock ofport_request=4 -- \
72 add-port br1 p5 -- set interface p5 type=dummy options:stream=unix:$OVS_RUNDIR/p2.sock ofport_request=5 -- \
73 add-port br1 p6 -- set interface p6 type=dummy options:stream=unix:$OVS_RUNDIR/p3.sock ofport_request=6 -- \
74 add-port br1 p8 -- set interface p8 ofport_request=8 type=dummy --])
75 WAIT_FOR_DUMMY_PORTS([p4], [p5], [p6])
76 AT_CHECK([ovs-ofctl add-flow br0 action=normal])
77 AT_CHECK([ovs-ofctl add-flow br1 action=normal])
78 AT_CHECK([ovs-appctl netdev-dummy/set-admin-state up], 0, [OK
81 ovs-appctl time/warp 100
83 for i in `seq 0 100 |xargs printf '%02x\n'`;
85 pkt="in_port(7),eth(src=50:54:00:00:00:$i,dst=50:54:00:00:01:00),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)"
86 AT_CHECK([ovs-appctl netdev-dummy/receive p7 $pkt])
89 ovs-appctl time/warp 100
90 AT_CHECK([ovs-appctl dpif/dump-flows br1 > br1_flows.txt])
91 # Make sure there is resonable distribution to all three ports.
92 # We don't want to make this check precise, in case hash function changes.
93 AT_CHECK([test `egrep 'in_port\(4\)' br1_flows.txt |wc -l` -gt 3])
94 AT_CHECK([test `egrep 'in_port\(5\)' br1_flows.txt |wc -l` -gt 3])
95 AT_CHECK([test `egrep 'in_port\(6\)' br1_flows.txt |wc -l` -gt 3])
99 AT_SETUP([ofproto-dpif, balance-tcp bonding])
100 # Create br0 with interfaces bond0(p1, p2, p3) and p7,
101 # and br1 with interfaces bond1(p4, p5, p6) and p8.
103 # Send some traffic, make sure the traffic are spread based on L4 headers.
105 [add-bond br0 bond0 p1 p2 p3 bond_mode=balance-tcp lacp=active \
106 other-config:lacp-time=fast other-config:bond-rebalance-interval=0 --\
107 set interface p1 type=dummy options:pstream=punix:$OVS_RUNDIR/p1.sock ofport_request=1 -- \
108 set interface p2 type=dummy options:pstream=punix:$OVS_RUNDIR/p2.sock ofport_request=2 -- \
109 set interface p3 type=dummy options:pstream=punix:$OVS_RUNDIR/p3.sock ofport_request=3 -- \
110 add-port br0 p7 -- set interface p7 ofport_request=7 type=dummy -- \
112 set bridge br1 other-config:hwaddr=aa:66:aa:66:00:00 -- \
113 set bridge br1 datapath-type=dummy other-config:datapath-id=1234 \
114 fail-mode=secure -- \
115 add-bond br1 bond1 p4 p5 p6 bond_mode=balance-tcp lacp=active \
116 other-config:lacp-time=fast other-config:bond-rebalance-interval=0 --\
117 set interface p4 type=dummy options:stream=unix:$OVS_RUNDIR/p1.sock ofport_request=4 -- \
118 set interface p5 type=dummy options:stream=unix:$OVS_RUNDIR/p2.sock ofport_request=5 -- \
119 set interface p6 type=dummy options:stream=unix:$OVS_RUNDIR/p3.sock ofport_request=6 -- \
120 add-port br1 p8 -- set interface p8 ofport_request=8 type=dummy --])
121 AT_CHECK([ovs-appctl netdev-dummy/set-admin-state up], 0, [OK
123 AT_CHECK([ovs-ofctl add-flow br0 action=normal])
124 AT_CHECK([ovs-ofctl add-flow br1 action=normal])
125 AT_CHECK([ovs-appctl upcall/disable-megaflows], [0], [megaflows disabled
127 OVS_WAIT_WHILE([ovs-appctl bond/show | grep "may_enable: false"])
129 ovs-appctl time/warp 100
130 ovs-appctl lacp/show > lacp.txt
131 ovs-appctl bond/show > bond.txt
133 for i in `seq 0 255` ;
135 pkt="in_port(7),eth(src=50:54:00:00:00:05,dst=50:54:00:00:01:00),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=$i),tcp_flags(ack)"
136 AT_CHECK([ovs-appctl netdev-dummy/receive p7 $pkt])
139 ovs-appctl time/warp 300 100
140 AT_CHECK([ovs-appctl dpif/dump-flows br0 |grep tcp > br0_flows.txt])
141 AT_CHECK([ovs-appctl dpif/dump-flows br1 |grep tcp > br1_flows.txt])
142 # Make sure there is resonable distribution to all three ports.
143 # We don't want to make this check precise, in case hash function changes.
144 AT_CHECK([test `grep in_port.4 br1_flows.txt |wc -l` -gt 24])
145 AT_CHECK([test `grep in_port.5 br1_flows.txt |wc -l` -gt 24])
146 AT_CHECK([test `grep in_port.6 br1_flows.txt |wc -l` -gt 24])
151 # Makes sure recirculation does not change the way packet is handled.
152 AT_SETUP([ofproto-dpif, balance-tcp bonding, different recirc flow ])
154 [add-bond br0 bond0 p1 p2 bond_mode=balance-tcp lacp=active \
155 other-config:lacp-time=fast other-config:bond-rebalance-interval=0 -- \
156 set interface p1 type=dummy options:pstream=punix:$OVS_RUNDIR/p1.sock ofport_request=1 -- \
157 set interface p2 type=dummy options:pstream=punix:$OVS_RUNDIR/p2.sock ofport_request=2 -- \
159 set bridge br1 other-config:hwaddr=aa:66:aa:66:00:00 -- \
160 set bridge br1 datapath-type=dummy other-config:datapath-id=1234 \
161 fail-mode=standalone -- \
162 add-bond br1 bond1 p3 p4 bond_mode=balance-tcp lacp=active \
163 other-config:lacp-time=fast other-config:bond-rebalance-interval=0 -- \
164 set interface p3 type=dummy options:stream=unix:$OVS_RUNDIR/p1.sock ofport_request=3 -- \
165 set interface p4 type=dummy options:stream=unix:$OVS_RUNDIR/p2.sock ofport_request=4 -- \
166 add-port br1 br1- -- set interface br1- type=patch options:peer=br1+ ofport_request=100 -- \
168 set bridge br-int other-config:hwaddr=aa:77:aa:77:00:00 -- \
169 set bridge br-int datapath-type=dummy other-config:datapath-id=1235 \
170 fail-mode=secure -- \
171 add-port br-int br1+ -- set interface br1+ type=patch options:peer=br1- ofport_request=101 -- \
172 add-port br-int p5 -- set interface p5 ofport_request=5 type=dummy
174 AT_CHECK([ovs-appctl netdev-dummy/set-admin-state up], 0, [OK
177 # The dl_vlan flow should not be ever matched,
178 # since recirculation should not change the flow handling.
179 AT_DATA([flows.txt], [dnl
180 table=0 priority=1 in_port=5 actions=mod_vlan_vid:1,output(101)
181 table=0 priority=2 in_port=5 dl_vlan=1 actions=drop
183 AT_CHECK([ovs-ofctl add-flows br-int flows.txt])
185 # Sends a packet to trigger recirculation.
186 # Should generate recirc_id(0x12d),dp_hash(0xc1261ba2/0xff).
187 AT_CHECK([ovs-appctl netdev-dummy/receive p5 "in_port(5),eth(src=50:54:00:00:00:05,dst=50:54:00:00:01:00),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1)"])
189 # Collects flow stats.
190 AT_CHECK([ovs-appctl revalidator/purge], [0])
192 # Checks the flow stats in br1, should only be one flow with non-zero
193 # 'n_packets' from internal table.
194 AT_CHECK([ovs-appctl bridge/dump-flows br1 | ofctl_strip | grep -- "n_packets" | grep -- "table_id" | sed -e 's/output:[[0-9]]\+/output/'], [0], [dnl
195 table_id=254, n_packets=1, n_bytes=64, priority=20,recirc_id=0x12d,dp_hash=0xa2/0xff,actions=output
198 # Checks the flow stats in br-int, should be only one match.
199 AT_CHECK([ovs-ofctl dump-flows br-int | ofctl_strip | sort], [0], [dnl
200 n_packets=1, n_bytes=60, priority=1,in_port=5 actions=mod_vlan_vid:1,output:101
201 priority=2,in_port=5,dl_vlan=1 actions=drop
208 AT_SETUP([ofproto-dpif - resubmit])
210 ADD_OF_PORTS([br0], [1], [10], [11], [12], [13], [14], [15],
211 [16], [17], [18], [19], [20], [21])
212 AT_DATA([flows.txt], [dnl
213 table=0 in_port=1 priority=1000 icmp actions=output(10),resubmit(2),output(19),resubmit(3),output(21)
214 table=0 in_port=2 priority=1500 icmp actions=output(11),resubmit(,1),output(16),resubmit(2,1),output(18)
215 table=0 in_port=3 priority=2000 icmp actions=output(20)
216 table=1 in_port=1 priority=1000 icmp actions=output(12),resubmit(4,1),output(13),resubmit(3),output(15)
217 table=1 in_port=2 priority=1500 icmp actions=output(17),resubmit(,2)
218 table=1 in_port=3 priority=1500 icmp actions=output(14),resubmit(,2)
220 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
221 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])
222 AT_CHECK([tail -1 stdout], [0],
223 [Datapath actions: 10,11,12,13,14,15,16,17,18,19,20,21
228 AT_SETUP([ofproto-dpif - goto table])
230 ADD_OF_PORTS([br0], [1], [10], [11])
231 echo "table=0 in_port=1 actions=output(10),goto_table(1)" > flows.txt
232 for i in `seq 1 63`; do echo "table=$i actions=goto_table($(($i+1)))"; done >> flows.txt
233 echo "table=64 actions=output(11)" >> flows.txt
234 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flows br0 flows.txt])
235 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])
236 AT_CHECK([tail -1 stdout], [0],
237 [Datapath actions: 10,11
242 AT_SETUP([ofproto-dpif - write actions])
244 ADD_OF_PORTS([br0], [1], [10], [11], [12], [13])
245 AT_DATA([flows.txt], [dnl
246 table=0 in_port=1,ip actions=output(10),write_actions(set_field:192.168.3.90->ip_src,output(12)),goto_table(1)
247 table=1 ip actions=write_actions(output(13)),goto_table(2)
248 table=2 ip actions=set_field:192.168.3.91->ip_src,output(11)
250 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flows br0 flows.txt])
251 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])
252 AT_CHECK([tail -2 stdout], [0],
253 [Megaflow: recirc_id=0,ip,in_port=1,nw_src=192.168.0.1,nw_frag=no
254 Datapath actions: 10,set(ipv4(src=192.168.3.91)),11,set(ipv4(src=192.168.3.90)),13
259 AT_SETUP([ofproto-dpif - clear actions])
261 ADD_OF_PORTS([br0], [1], [10], [11], [12])
262 AT_DATA([flows.txt], [dnl
263 table=0 in_port=1,ip actions=output(10),write_actions(set_field:192.168.3.90->ip_src,output(12)),goto_table(1)
264 table=1 tcp actions=set_field:91->tp_src,output(11),clear_actions
266 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flows br0 flows.txt])
267 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])
268 AT_CHECK([tail -2 stdout], [0],
269 [Megaflow: recirc_id=0,tcp,in_port=1,nw_frag=no,tp_src=8
270 Datapath actions: 10,set(tcp(src=91)),11
275 AT_SETUP([ofproto-dpif - group chaining not supported])
277 ADD_OF_PORTS([br0], [1], [10], [11])
278 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'],
280 AT_CHECK([STRIP_XIDS stderr | sed 1q], [0],
281 [OFPT_ERROR (OF1.2): OFPGMFC_CHAINING_UNSUPPORTED
286 AT_SETUP([ofproto-dpif - all group in action list])
288 ADD_OF_PORTS([br0], [1], [10], [11])
289 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'])
290 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=group:1234'])
291 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])
292 # Must match on the source address to be able to restore it's value for
294 AT_CHECK([tail -2 stdout], [0],
295 [Megaflow: recirc_id=0,ip,in_port=1,nw_src=192.168.0.1,nw_frag=no
296 Datapath actions: set(ipv4(src=192.168.3.90)),10,set(ipv4(src=192.168.0.1)),11
301 AT_SETUP([ofproto-dpif - indirect group in action list])
303 ADD_OF_PORTS([br0], [1], [10])
304 AT_CHECK([ovs-ofctl -O OpenFlow12 add-group br0 group_id=1234,type=indirect,bucket=output:10])
305 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=group:1234'])
306 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])
307 AT_CHECK([tail -1 stdout], [0],
308 [Datapath actions: 10
313 AT_SETUP([ofproto-dpif - all group in action set])
315 ADD_OF_PORTS([br0], [1], [10], [11])
316 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'])
317 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=write_actions(group:1234)'])
318 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])
319 # Must match on the source address to be able to restore it's value for
321 AT_CHECK([tail -2 stdout], [0],
322 [Megaflow: recirc_id=0,ip,in_port=1,nw_src=192.168.0.1,nw_frag=no
323 Datapath actions: set(ipv4(src=192.168.3.90)),10,set(ipv4(src=192.168.0.1)),11
328 AT_SETUP([ofproto-dpif - indirect group in action set])
330 ADD_OF_PORTS([br0], [1], [10])
331 AT_CHECK([ovs-ofctl -O OpenFlow12 add-group br0 group_id=1234,type=indirect,bucket=output:10])
332 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=write_actions(group:1234)'])
333 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])
334 AT_CHECK([tail -1 stdout], [0],
335 [Datapath actions: 10
340 AT_SETUP([ofproto-dpif - select group])
342 ADD_OF_PORTS([br0], [1], [10], [11])
343 AT_CHECK([ovs-ofctl -O OpenFlow12 add-group br0 'group_id=1234,type=select,bucket=output:10,bucket=output:11'])
344 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=write_actions(group:1234)'])
346 # Try a bunch of different flows and make sure that they get distributed
348 for d in 0 1 2 3 4 5 6 7 8 9 a b c d e f; do
349 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])
350 tail -1 stdout >> results
352 sort results | uniq -c
353 AT_CHECK([sort results | uniq], [0],
354 [Datapath actions: 10
360 AT_SETUP([ofproto-dpif - select group with watch port])
362 ADD_OF_PORTS([br0], [1], [10], [11])
363 AT_CHECK([ovs-ofctl -O OpenFlow12 add-group br0 'group_id=1234,type=select,bucket=watch_port:10,output:10,bucket=output:11'])
364 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=write_actions(group:1234)'])
365 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])
366 AT_CHECK([tail -1 stdout], [0],
367 [Datapath actions: 11
372 AT_SETUP([ofproto-dpif - select group with weight])
374 ADD_OF_PORTS([br0], [1], [10], [11], [12])
375 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'])
376 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=write_actions(group:1234)'])
377 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])
378 AT_CHECK([tail -1 stdout], [0],
379 [Datapath actions: 11
384 AT_SETUP([ofproto-dpif - fast failover group])
386 ADD_OF_PORTS([br0], [1], [10], [11])
387 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'])
388 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=write_actions(group:1234)'])
389 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])
390 AT_CHECK([tail -1 stdout], [0],
391 [Datapath actions: drop
396 AT_SETUP([ofproto-dpif - group stats single bucket])
398 ADD_OF_PORTS([br0], [1], [10], [11])
399 AT_CHECK([ovs-ofctl -O OpenFlow12 add-group br0 'group_id=1234,type=select,bucket=output:10,weight=2000,bucket=output:11,weight=0'])
400 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=write_actions(group:1234)'])
404 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)"
405 AT_CHECK([ovs-appctl netdev-dummy/receive p1 $pkt])
408 AT_CHECK([ovs-appctl revalidator/purge], [0])
409 AT_CHECK([ovs-ofctl -O OpenFlow12 -vwarn dump-group-stats br0], [0], [stdout])
410 AT_CHECK([STRIP_XIDS stdout | sort], [0], [dnl
411 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
412 OFPST_GROUP reply (OF1.2):
417 AT_SETUP([ofproto-dpif - group stats all buckets])
419 ADD_OF_PORTS([br0], [1], [10], [11])
420 AT_CHECK([ovs-ofctl -O OpenFlow12 add-group br0 'group_id=1234,type=all,bucket=output:10,bucket=output:11'])
421 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=write_actions(group:1234)'])
425 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)"
426 AT_CHECK([ovs-appctl netdev-dummy/receive p1 $pkt])
429 AT_CHECK([ovs-appctl revalidator/purge], [0])
430 AT_CHECK([ovs-ofctl -O OpenFlow12 -vwarn dump-group-stats br0], [0], [stdout])
431 AT_CHECK([STRIP_XIDS stdout | sort], [0], [dnl
432 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
433 OFPST_GROUP reply (OF1.2):
438 AT_SETUP([ofproto-dpif - registers])
440 ADD_OF_PORTS([br0], [20], [21], [22], [33], [90])
441 AT_DATA([flows.txt], [dnl
442 in_port=90 actions=resubmit:2,resubmit:3,resubmit:4,resubmit:91
443 in_port=91 actions=resubmit:5,resubmit:6,resubmit:7,resubmit:92
444 in_port=92 actions=resubmit:8,resubmit:9,resubmit:10,resubmit:11,resubmit:93
445 in_port=93 actions=resubmit:12,resubmit:13,resubmit:14,resubmit:15
447 in_port=2 actions=load:0x000db000->NXM_NX_REG0[[]]
448 in_port=3 actions=load:0xdea->NXM_NX_REG0[[20..31]]
449 in_port=4 actions=load:0xeef->NXM_NX_REG0[[0..11]]
450 in_port=5 actions=move:NXM_NX_REG0[[]]->NXM_NX_REG1[[]]
451 in_port=6 actions=load:0x22222222->NXM_NX_REG2[[]]
452 in_port=7 actions=move:NXM_NX_REG1[[20..31]]->NXM_NX_REG2[[0..11]]
453 in_port=8 actions=move:NXM_NX_REG1[[0..11]]->NXM_NX_REG2[[20..31]]
454 in_port=9,reg0=0xdeadbeef actions=output:20
455 in_port=10,reg1=0xdeadbeef actions=output:21
456 in_port=11,reg2=0xeef22dea actions=output:22
458 dnl Sanilty check all registers
459 in_port=12 actions=load:0x10->NXM_NX_REG0[[]],load:0x11->NXM_NX_REG1[[]],load:0x12->NXM_NX_REG2[[]]
460 in_port=13 actions=load:0x13->NXM_NX_REG3[[]],load:0x14->NXM_NX_REG4[[]],load:0x15->NXM_NX_REG5[[]]
461 in_port=14 actions=load:0x16->NXM_NX_REG6[[]],load:0x17->NXM_NX_REG7[[]]
462 in_port=15,reg0=0x10,reg1=0x11,reg2=0x12,reg3=0x13,reg4=0x14,reg5=0x15,reg6=0x16,reg7=0x17 actions=output:33
465 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
466 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])
467 AT_CHECK([tail -1 stdout], [0],
468 [Datapath actions: 20,21,22,33
473 dnl Tests that the standardized xregs are mapped onto the legacy OVS registers
474 dnl in the manner documented in ovs-ofctl(8).
475 AT_SETUP([ofproto-dpif - extended registers])
477 ADD_OF_PORTS([br0], [1], [2], [3])
478 AT_DATA([flows.txt], [dnl
479 table=0 actions=load:0xfedcba9876543210->OXM_OF_PKT_REG1[[]],resubmit(,1)
480 table=1,reg2=0xfedcba98,reg3=0x76543210 actions=2
482 # These low-priority rules shouldn't match. They're here only to make really
483 # sure that the test fails if either of the above rules fails to match.
484 table=0,priority=0 actions=3
485 table=1,priority=0 actions=3
487 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
488 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])
489 AT_CHECK([tail -1 stdout], [0], [Datapath actions: 2
494 AT_SETUP([ofproto-dpif - load and move order])
496 ADD_OF_PORTS([br0], [1], [10], [11])
497 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'])
498 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)'])
499 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])
500 AT_CHECK([tail -2 stdout], [0],
501 [Megaflow: recirc_id=0,ip,in_port=1,nw_src=192.168.0.1,nw_frag=no
502 Datapath actions: set(ipv4(src=255.255.255.255)),10,set(ipv4(src=192.168.0.1)),11
507 dnl Tests that 1.5 copy-field can copy into the standardized xregs.
508 AT_SETUP([ofproto-dpif - copy-field into extended registers])
510 ADD_OF_PORTS([br0], [1], [2], [3])
511 AT_DATA([flows.txt], [dnl
512 table=0 actions=move:OXM_OF_ETH_SRC[[0..47]]->OXM_OF_PKT_REG0[[0..47]],goto_table(1)
513 table=1,xreg0=0x0000505400000005 actions=2
515 # These low-priority rules shouldn't match. They're here only to make really
516 # sure that the test fails if either of the above rules fails to match.
517 table=0,priority=0 actions=3
518 table=1,priority=0 actions=3
520 AT_CHECK([ovs-ofctl -O OpenFlow15 add-flows br0 flows.txt])
521 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])
522 AT_CHECK([tail -1 stdout], [0], [Datapath actions: 2
527 dnl Tests that 1.5 set-field with mask in the metadata register.
528 AT_SETUP([ofproto-dpif - masked set-field into metadata])
530 ADD_OF_PORTS([br0], [1], [2], [3])
531 AT_DATA([flows.txt], [dnl
532 table=0 actions=set_field:0xfafafafa5a5a5a5a->metadata,goto_table(1)
533 table=1 actions=set_field:0x6b/0xff->metadata,goto_table(2)
534 table=2,metadata=0xfafafafa5a5a5a6b actions=2
536 # These low-priority rules shouldn't match. They're here only to make really
537 # sure that the test fails if either of the above rules fails to match.
538 table=0,priority=0 actions=3
539 table=1,priority=0 actions=3
540 table=2,priority=0 actions=3
542 AT_CHECK([ovs-ofctl -O OpenFlow15 add-flows br0 flows.txt])
543 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])
544 AT_CHECK([tail -1 stdout], [0], [Datapath actions: 2
550 AT_SETUP([ofproto-dpif - actset_output])
553 [br0], [1], [2], [3], [4], [5], [6], [7], [8], [9], [10], [11], [12], [13])
554 AT_DATA([flows.txt], [dnl
555 table=0,actset_output=unset actions=write_actions(output(2)),goto_table(1)
556 table=1 actions=move:ONFOXM_ET_ACTSET_OUTPUT[[0..31]]->OXM_OF_PKT_REG0[[0..31]],goto_table(2)
558 # Verify that actset_output got set.
559 table=2,priority=20,actset_output=2 actions=4,goto_table(3)
560 table=2,priority=10 actions=5,goto_table(3)
562 # Verify that xreg0 got copied properly from actset_output.
563 table=3,priority=20,xreg0=2 actions=6,goto_table(4)
564 table=3,priority=10 actions=7,goto_table(4)
566 # Verify that adding a group action unsets actset_output.
567 table=4 actions=write_actions(group(5)),goto_table(5)
568 table=5,priority=20,actset_output=unset actions=8,goto_table(6)
569 table=5,priority=10 actions=9,goto_table(6)
571 # Verify that adding another output action doesn't change actset_output
572 # (since there's still a group).
573 table=6 actions=write_actions(output(3)),goto_table(7)
574 table=7,priority=20,actset_output=unset actions=10,goto_table(8)
575 table=7,priority=10 actions=11,goto_table(8)
577 # Verify that clearing the action set, then writing an output action,
578 # causes actset_output to be set again.
579 table=8,actions=clear_actions,write_actions(output(3),output(2)),goto_table(9)
580 table=9,priority=20,actset_output=2 actions=12
581 table=9,priority=10 actions=13
583 AT_CHECK([ovs-ofctl -O OpenFlow13 add-flows br0 flows.txt])
584 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])
585 AT_CHECK([tail -1 stdout], [0], [Datapath actions: 4,6,8,10,12,2
589 AT_SETUP([ofproto-dpif - push-pop])
591 ADD_OF_PORTS([br0], [20], [21], [22], [33], [90])
592 AT_DATA([flows.txt], [dnl
593 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
594 in_port=2 actions=pop:NXM_NX_REG0[[0..7]],output:NXM_NX_REG0[[]]
595 in_port=3 actions=pop:NXM_NX_REG1[[0..7]],output:NXM_NX_REG1[[]]
596 in_port=4 actions=pop:NXM_NX_REG2[[0..15]],output:NXM_NX_REG2[[]]
597 in_port=5 actions=pop:NXM_NX_REG3[[]],output:NXM_NX_REG3[[]]
600 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
601 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])
602 AT_CHECK([tail -1 stdout], [0],
603 [Datapath actions: 33,22,21,20
608 AT_SETUP([ofproto-dpif - output])
610 ADD_OF_PORTS([br0], [1], [9], [10], [11], [55], [66], [77], [88])
611 AT_DATA([flows.txt], [dnl
612 in_port=1 actions=resubmit:2,resubmit:3,resubmit:4,resubmit:5,resubmit:6,resubmit:7,resubmit:8
613 in_port=2 actions=output:9
614 in_port=3 actions=load:55->NXM_NX_REG0[[]],output:NXM_NX_REG0[[]],load:66->NXM_NX_REG1[[]]
615 in_port=4 actions=output:10,output:NXM_NX_REG0[[]],output:NXM_NX_REG1[[]],output:11
616 in_port=5 actions=load:77->NXM_NX_REG0[[0..15]],load:88->NXM_NX_REG0[[16..31]]
617 in_port=6 actions=output:NXM_NX_REG0[[0..15]],output:NXM_NX_REG0[[16..31]]
618 in_port=7 actions=load:0x110000ff->NXM_NX_REG0[[]],output:NXM_NX_REG0[[]]
619 in_port=8 actions=1,9,load:9->NXM_OF_IN_PORT[[]],1,9
621 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
622 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])
623 AT_CHECK([tail -1 stdout], [0],
624 [Datapath actions: 9,55,10,55,66,11,77,88,9,1
629 AT_SETUP([ofproto-dpif - dec_ttl])
631 ADD_OF_PORTS([br0], [1], [2], [3], [4])
632 AT_DATA([flows.txt], [dnl
633 table=0 in_port=1 action=dec_ttl,output:2,resubmit(1,1),output:4
634 table=1 in_port=1 action=dec_ttl,output:3
636 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
637 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])
638 AT_CHECK([tail -4 stdout], [0],
639 [Megaflow: recirc_id=0,ip,in_port=1,nw_ttl=2,nw_frag=no
640 Datapath actions: set(ipv4(ttl=1)),2,4
641 This flow is handled by the userspace slow path because it:
642 - Sends "packet-in" messages to the OpenFlow controller.
644 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])
645 AT_CHECK([tail -2 stdout], [0],
646 [Megaflow: recirc_id=0,ip,in_port=1,nw_ttl=3,nw_frag=no
647 Datapath actions: set(ipv4(ttl=2)),2,set(ipv4(ttl=1)),3,4
649 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])
650 AT_CHECK([tail -2 stdout], [0],
651 [Megaflow: recirc_id=0,ipv6,in_port=1,nw_ttl=128,nw_frag=no
652 Datapath actions: set(ipv6(hlimit=127)),2,set(ipv6(hlimit=126)),3,4
655 AT_CAPTURE_FILE([ofctl_monitor.log])
656 AT_CHECK([ovs-ofctl monitor br0 65534 invalid_ttl --detach --no-chdir --pidfile 2> ofctl_monitor.log])
657 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])
658 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
659 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
660 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=34 in_port=1 (via invalid_ttl) data_len=34 (unbuffered)
661 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
666 dnl A dec_ttl action at offset 32 in ofpacts will cause the ofpacts
667 dnl buffer to be resized just before pushing the id of the dec_ttl action.
668 dnl Thus the implementation must account for this by using the
669 dnl reallocated buffer rather than the original buffer.
671 dnl A number of similar rules are added to try and exercise
672 dnl xrealloc sufficiently that it returns a different base pointer
673 AT_SETUP([ofproto-dpif - dec_ttl without arguments at offset 32 in ofpacts])
675 ADD_OF_PORTS([br0], [1])
676 (for i in `seq 0 255`; do
677 printf "dl_src=10:11:11:11:11:%02x actions=output:1,output:1,output:1,dec_ttl,controller\n" $i
679 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
683 dnl A dec_ttl action at offset 32 in ofpacts will cause the ofpacts
684 dnl buffer to be resized just before pushing the id of the dec_ttl action.
685 dnl Thus the implementation must account for this by using the
686 dnl reallocated buffer rather than the original buffer.
688 dnl A number of similar rules are added to try and exercise
689 dnl xrealloc sufficiently that it returns a different base pointer
690 AT_SETUP([ofproto-dpif - dec_ttl with arguments at offset 32 in ofpacts])
692 ADD_OF_PORTS([br0], [1])
693 (for i in `seq 0 255`; do
694 printf "dl_src=10:11:11:11:11:%02x actions=output:1,output:1,output:1,dec_ttl(1),controller\n" $i
696 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
700 dnl A note action at offset 24 in ofpacts will cause the ofpacts
701 dnl buffer to be resized just before pushing the id of the dec_ttl action.
702 dnl Thus the implementation must account for this by using the
703 dnl reallocated buffer rather than the original buffer.
705 dnl A number of similar rules are added to try and exercise
706 dnl xrealloc sufficiently that it returns a different base pointer
707 AT_SETUP([ofproto-dpif - note at offset 24 in ofpacts])
709 ADD_OF_PORTS([br0], [1])
710 (for i in `seq 0 255`; do
711 printf "dl_src=10:11:11:11:11:%02x actions=output:1,output:1,note:ff,controller\n" $i
713 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
717 AT_SETUP([ofproto-dpif - output, OFPP_NONE ingress port])
719 ADD_OF_PORTS([br0], [1], [2])
721 AT_CHECK([ovs-ofctl add-flow br0 action=normal])
723 # "in_port" defaults to OFPP_NONE if it's not specified.
724 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"
725 AT_CHECK([ovs-appctl ofproto/trace br0 "$flow"], [0], [stdout])
726 AT_CHECK([tail -1 stdout | sed 's/Datapath actions: //' | tr "," "\n" | sort -n], [0], [dnl
735 AT_SETUP([ofproto-dpif - DSCP])
736 OVS_VSWITCHD_START([add-port br0 p1 -- set Interface p1 type=dummy])
737 ADD_OF_PORTS([br0], [9])
738 AT_DATA([flows.txt], [dnl
739 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
741 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
742 AT_CHECK([ovs-vsctl -- \
743 set Port p1 qos=@newqos --\
744 --id=@newqos create QoS type=linux-htb queues=1=@q1,2=@q2 --\
745 --id=@q1 create Queue dscp=1 --\
746 --id=@q2 create Queue dscp=2], [0], [ignore])
747 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])
748 AT_CHECK([tail -2 stdout], [0],
749 [Megaflow: recirc_id=0,skb_priority=0,ip,in_port=9,nw_tos=252,nw_frag=no
750 Datapath actions: dnl
752 set(ipv4(tos=0x4/0xfc)),set(skb_priority(0x1)),1,dnl
753 set(ipv4(tos=0x8/0xfc)),set(skb_priority(0x2)),1,dnl
755 set(ipv4(tos=0x4/0xfc)),set(skb_priority(0x1)),1,dnl
756 set(ipv4(tos=0xfc/0xfc)),set(skb_priority(0)),1,dnl
757 set(ipv4(tos=0/0xfc)),1,100
762 AT_SETUP([ofproto-dpif - output/flood flags])
764 ADD_OF_PORTS([br0], [1], [2], [3], [4], [5], [6], [7])
766 AT_DATA([flows.txt], [dnl
767 in_port=local actions=local,flood
768 in_port=1 actions=flood
769 in_port=2 actions=all
770 in_port=3 actions=output:LOCAL,output:1,output:2,output:3,output:4,output:5,output:6,output:7
771 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
773 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
774 AT_CHECK([ovs-ofctl mod-port br0 5 noforward])
775 AT_CHECK([ovs-ofctl mod-port br0 6 noflood])
777 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])
778 AT_CHECK([tail -1 stdout \
779 | sed -e 's/Datapath actions: //' | tr ',' '\n' | sort], [0], [dnl
787 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])
788 AT_CHECK([tail -1 stdout \
789 | sed -e 's/Datapath actions: //' | tr ',' '\n' | sort], [0], [dnl
797 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])
798 AT_CHECK([tail -1 stdout \
799 | sed -e 's/Datapath actions: //' | tr ',' '\n' | sort], [0], [dnl
808 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])
809 AT_CHECK([tail -1 stdout], [0],
810 [Datapath actions: 100,1,2,4,6,7
813 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])
814 AT_CHECK([tail -1 stdout], [0],
815 [Datapath actions: set(skb_priority(0x1)),100,1,2,set(skb_priority(0x2)),3,set(skb_priority(0x1)),6,7
820 AT_SETUP([ofproto-dpif - Default Table Miss - OF1.0 (OFPTC_TABLE_MISS_CONTROLLER)])
821 OVS_VSWITCHD_START([dnl
822 add-port br0 p1 -- set Interface p1 type=dummy
824 ON_EXIT([kill `cat ovs-ofctl.pid`])
826 AT_CAPTURE_FILE([ofctl_monitor.log])
828 AT_CHECK([ovs-ofctl monitor br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
831 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)'
833 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
834 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
835 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
836 NXT_PACKET_IN (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
837 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
839 NXT_PACKET_IN (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
840 tcp,in_port=0,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=9,tcp_flags=syn tcp_csum:0
842 NXT_PACKET_IN (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
843 tcp,in_port=0,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=9,tcp_flags=syn tcp_csum:0
846 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
847 AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
854 AT_SETUP([ofproto-dpif - Default Table Miss - OF1.3 (OFPTC_TABLE_MISS_DROP)])
855 OVS_VSWITCHD_START([dnl
856 add-port br0 p1 -- set Interface p1 type=dummy
858 ON_EXIT([kill `cat ovs-ofctl.pid`])
860 AT_CAPTURE_FILE([ofctl_monitor.log])
861 AT_CHECK([ovs-ofctl del-flows br0])
863 AT_CHECK([ovs-ofctl monitor -OOpenFlow13 -P openflow10 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
865 dnl Test that missed packets are droped
867 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)'
869 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
871 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
874 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
875 AT_CHECK([ovs-ofctl -OOpenFlow13 dump-flows br0 | ofctl_strip | sort], [0], [dnl
876 OFPST_FLOW reply (OF1.3):
882 AT_SETUP([ofproto-dpif - Table Miss - goto table and OFPTC_TABLE_MISS_CONTROLLER])
883 OVS_VSWITCHD_START([dnl
884 add-port br0 p1 -- set Interface p1 type=dummy
886 ON_EXIT([kill `cat ovs-ofctl.pid`])
888 AT_CAPTURE_FILE([ofctl_monitor.log])
889 AT_CHECK([ovs-ofctl -OOpenFlow12 add-flow br0 'table=0 actions=goto_table(1)'])
891 AT_CHECK([ovs-ofctl monitor -P openflow10 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
894 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)'
896 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
897 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
898 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
899 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
900 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
902 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
903 tcp,in_port=0,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=9,tcp_flags=rst|urg tcp_csum:0
905 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
906 tcp,in_port=0,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=9,tcp_flags=rst|urg tcp_csum:0
909 AT_CHECK([ovs-appctl revalidator/purge], [0])
910 AT_CHECK([ovs-ofctl -OOpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
911 n_packets=3, n_bytes=180, actions=goto_table:1
912 OFPST_FLOW reply (OF1.2):
918 AT_SETUP([ofproto-dpif - Table Miss - resubmit and OFPTC_TABLE_MISS_CONTROLLER])
919 OVS_VSWITCHD_START([dnl
920 add-port br0 p1 -- set Interface p1 type=dummy
922 ON_EXIT([kill `cat ovs-ofctl.pid`])
924 AT_CAPTURE_FILE([ofctl_monitor.log])
925 AT_CHECK([ovs-ofctl -OOpenFlow12 add-flow br0 'table=0 actions=resubmit(1,1)'])
927 AT_CHECK([ovs-ofctl monitor -P openflow10 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
930 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)'
933 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
934 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
937 AT_CHECK([ovs-appctl revalidator/purge], [0])
938 AT_CHECK([ovs-ofctl -OOpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
939 n_packets=3, n_bytes=180, actions=resubmit(1,1)
940 OFPST_FLOW reply (OF1.2):
946 AT_SETUP([ofproto-dpif - Table Miss - OFPTC_TABLE_MISS_CONTINUE])
947 OVS_VSWITCHD_START([dnl
948 add-port br0 p1 -- set Interface p1 type=dummy
950 ON_EXIT([kill `cat ovs-ofctl.pid`])
952 AT_CAPTURE_FILE([ofctl_monitor.log])
953 AT_CHECK([ovs-ofctl add-flow br0 'table=1 dl_src=10:11:11:11:11:11 actions=controller'])
954 AT_CHECK([ovs-ofctl -OOpenFlow11 mod-table br0 all continue])
956 dnl Miss table 0, Hit table 1
957 AT_CHECK([ovs-ofctl monitor br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
960 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)'
962 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
963 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
965 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
966 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
967 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
969 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
970 tcp,in_port=0,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=9,tcp_flags=ack tcp_csum:0
972 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
973 tcp,in_port=0,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=9,tcp_flags=ack tcp_csum:0
976 dnl Hit table 0, Miss all other tables, sent to controller
977 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --no-chdir --pidfile 2> ofctl_monitor.log])
980 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)'
982 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
983 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
985 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
986 NXT_PACKET_IN (xid=0x0): table_id=253 cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
987 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
989 NXT_PACKET_IN (xid=0x0): table_id=253 cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
990 tcp,in_port=0,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=9,tcp_flags=ack tcp_csum:0
992 NXT_PACKET_IN (xid=0x0): table_id=253 cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
993 tcp,in_port=0,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=9,tcp_flags=ack tcp_csum:0
996 AT_CHECK([ovs-appctl revalidator/purge], [0])
997 AT_CHECK([ovs-ofctl -OOpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
998 table=1, n_packets=3, n_bytes=180, dl_src=10:11:11:11:11:11 actions=CONTROLLER:65535
999 OFPST_FLOW reply (OF1.2):
1005 AT_SETUP([ofproto-dpif - Table Miss - goto table and OFPTC_TABLE_MISS_CONTINUE])
1006 OVS_VSWITCHD_START([dnl
1007 add-port br0 p1 -- set Interface p1 type=dummy
1009 ON_EXIT([kill `cat ovs-ofctl.pid`])
1011 AT_CAPTURE_FILE([ofctl_monitor.log])
1012 AT_DATA([flows.txt], [dnl
1013 table=0 actions=goto_table(1)
1014 table=2 dl_src=10:11:11:11:11:11 actions=controller
1016 AT_CHECK([ovs-ofctl -OOpenFlow12 add-flows br0 flows.txt])
1017 AT_CHECK([ovs-ofctl -OOpenFlow11 mod-table br0 all continue])
1019 dnl Hit table 0, Miss table 1, Hit table 2
1020 AT_CHECK([ovs-ofctl monitor br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1023 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)'
1025 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1026 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1028 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1029 NXT_PACKET_IN (xid=0x0): table_id=2 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1030 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
1032 NXT_PACKET_IN (xid=0x0): table_id=2 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1033 tcp,in_port=0,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=9,tcp_flags=ack tcp_csum:0
1035 NXT_PACKET_IN (xid=0x0): table_id=2 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1036 tcp,in_port=0,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=9,tcp_flags=ack tcp_csum:0
1039 dnl Hit table 1, Miss all other tables, sent to controller
1040 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1043 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)'
1045 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1046 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
1048 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1049 NXT_PACKET_IN (xid=0x0): table_id=253 cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
1050 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
1052 NXT_PACKET_IN (xid=0x0): table_id=253 cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
1053 tcp,in_port=0,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=9,tcp_flags=ack tcp_csum:0
1055 NXT_PACKET_IN (xid=0x0): table_id=253 cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
1056 tcp,in_port=0,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=9,tcp_flags=ack tcp_csum:0
1059 AT_CHECK([ovs-appctl revalidator/purge], [0])
1060 AT_CHECK([ovs-ofctl -OOpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
1061 n_packets=6, n_bytes=360, actions=goto_table:1
1062 table=2, n_packets=3, n_bytes=180, dl_src=10:11:11:11:11:11 actions=CONTROLLER:65535
1063 OFPST_FLOW reply (OF1.2):
1069 AT_SETUP([ofproto-dpif - Table Miss - resubmit and OFPTC_TABLE_MISS_CONTINUE])
1070 OVS_VSWITCHD_START([dnl
1071 add-port br0 p1 -- set Interface p1 type=dummy
1073 ON_EXIT([kill `cat ovs-ofctl.pid`])
1075 AT_CAPTURE_FILE([ofctl_monitor.log])
1076 AT_DATA([flows.txt], [dnl
1077 table=0 actions=resubmit(1,1)
1078 table=2 dl_src=10:11:11:11:11:11 actions=controller
1080 AT_CHECK([ovs-ofctl -OOpenFlow12 add-flows br0 flows.txt])
1081 AT_CHECK([ovs-ofctl -OOpenFlow11 mod-table br0 all continue])
1083 dnl Hit table 0, Miss table 1, Dropped
1084 AT_CHECK([ovs-ofctl monitor br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1087 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)'
1089 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1091 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1094 dnl Hit table 1, Dropped
1095 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1098 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)'
1100 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
1102 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1105 AT_CHECK([ovs-appctl revalidator/purge], [0])
1106 AT_CHECK([ovs-ofctl -OOpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
1107 n_packets=6, n_bytes=360, actions=resubmit(1,1)
1108 table=2, dl_src=10:11:11:11:11:11 actions=CONTROLLER:65535
1109 OFPST_FLOW reply (OF1.2):
1115 AT_SETUP([ofproto-dpif - Table Miss - OFPTC_TABLE_MISS_DROP])
1116 OVS_VSWITCHD_START([dnl
1117 add-port br0 p1 -- set Interface p1 type=dummy
1119 ON_EXIT([kill `cat ovs-ofctl.pid`])
1121 AT_CAPTURE_FILE([ofctl_monitor.log])
1122 AT_CHECK([ovs-ofctl -OOpenFlow11 mod-table br0 all drop])
1124 AT_CHECK([ovs-ofctl monitor -P openflow10 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1126 dnl Test that missed packets are droped
1128 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)'
1130 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
1132 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1135 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1136 AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
1143 AT_SETUP([ofproto-dpif - Table Miss - goto table and OFPTC_TABLE_MISS_DROP])
1144 OVS_VSWITCHD_START([dnl
1145 add-port br0 p1 -- set Interface p1 type=dummy
1147 ON_EXIT([kill `cat ovs-ofctl.pid`])
1149 AT_CAPTURE_FILE([ofctl_monitor.log])
1150 AT_CHECK([ovs-ofctl del-flows br0])
1151 AT_CHECK([ovs-ofctl -OOpenFlow12 add-flow br0 'table=0 actions=goto_table(1)'])
1152 AT_CHECK([ovs-ofctl -OOpenFlow11 mod-table br0 all drop])
1154 AT_CHECK([ovs-ofctl monitor -P openflow10 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1156 dnl Test that missed packets are droped
1158 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)'
1160 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
1162 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1165 AT_CHECK([ovs-appctl revalidator/purge], [0])
1166 AT_CHECK([ovs-ofctl -OOpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
1167 n_packets=3, n_bytes=180, actions=goto_table:1
1168 OFPST_FLOW reply (OF1.2):
1174 AT_SETUP([ofproto-dpif - Table Miss - resubmit and OFPTC_TABLE_MISS_DROP])
1175 OVS_VSWITCHD_START([dnl
1176 add-port br0 p1 -- set Interface p1 type=dummy
1178 ON_EXIT([kill `cat ovs-ofctl.pid`])
1180 AT_CAPTURE_FILE([ofctl_monitor.log])
1181 AT_CHECK([ovs-ofctl del-flows br0])
1182 AT_CHECK([ovs-ofctl -OOpenFlow12 add-flow br0 'table=0 actions=resubmit(1,1)'])
1183 AT_CHECK([ovs-ofctl -OOpenFlow11 mod-table br0 all drop])
1185 AT_CHECK([ovs-ofctl monitor -P openflow10 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1187 dnl Test that missed packets are droped
1189 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)'
1191 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
1193 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1196 AT_CHECK([ovs-appctl revalidator/purge], [0])
1197 AT_CHECK([ovs-ofctl -OOpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
1198 n_packets=3, n_bytes=180, actions=resubmit(1,1)
1199 OFPST_FLOW reply (OF1.2):
1205 AT_SETUP([ofproto-dpif - controller])
1206 OVS_VSWITCHD_START([dnl
1207 add-port br0 p1 -- set Interface p1 type=dummy
1209 ON_EXIT([kill `cat ovs-ofctl.pid`])
1211 AT_CAPTURE_FILE([ofctl_monitor.log])
1212 AT_DATA([flows.txt], [dnl
1213 cookie=0x0 dl_src=10:11:11:11:11:11 actions=controller
1214 cookie=0x1 dl_src=20:22:22:22:22:22 actions=controller,resubmit(80,1)
1215 cookie=0x2 dl_src=30:33:33:33:33:33 actions=mod_vlan_vid:15,controller
1217 cookie=0x3 table=1 in_port=80 actions=load:1->NXM_NX_REG0[[]],mod_vlan_vid:80,controller,resubmit(81,2)
1218 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)
1219 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)
1220 cookie=0x6 table=4 in_port=83 actions=load:4->NXM_NX_REG3[[]],mod_nw_src:83.83.83.83,controller,resubmit(84,5)
1221 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)
1222 cookie=0x8 table=6 in_port=85 actions=mod_tp_src:85,controller,resubmit(86,7)
1223 cookie=0x9 table=7 in_port=86 actions=mod_tp_dst:86,controller,controller
1224 cookie=0xa dl_src=40:44:44:44:44:41 actions=mod_vlan_vid:99,mod_vlan_pcp:1,controller
1225 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
1227 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
1230 AT_CHECK([ovs-ofctl monitor -P openflow10 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1233 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)'
1235 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1236 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1238 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1239 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
1240 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
1242 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
1243 tcp,in_port=0,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=9,tcp_flags=ack tcp_csum:0
1245 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
1246 tcp,in_port=0,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=9,tcp_flags=ack tcp_csum:0
1249 dnl Singleton controller action.
1250 AT_CHECK([ovs-ofctl monitor -P openflow10 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1253 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)'
1255 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1256 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1258 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1259 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1260 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
1262 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1263 tcp,in_port=0,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:0
1265 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1266 tcp,in_port=0,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:0
1269 dnl Modified controller action.
1270 AT_CHECK([ovs-ofctl monitor -P openflow10 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1273 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)'
1275 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1276 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1278 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1279 OFPT_PACKET_IN (xid=0x0): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1280 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
1282 OFPT_PACKET_IN (xid=0x0): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1283 tcp,in_port=0,dl_vlan=15,dl_vlan_pcp=0,dl_src=30:33:33:33:33:33,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=fin tcp_csum:0
1285 OFPT_PACKET_IN (xid=0x0): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1286 tcp,in_port=0,dl_vlan=15,dl_vlan_pcp=0,dl_src=30:33:33:33:33:33,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=fin tcp_csum:0
1289 dnl Modified VLAN controller action.
1290 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1293 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)'
1295 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1296 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1298 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1299 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1300 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
1302 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1303 ip,in_port=0,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:44:41,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_proto=16,nw_tos=0,nw_ecn=0,nw_ttl=64
1305 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1306 ip,in_port=0,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:44:41,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_proto=16,nw_tos=0,nw_ecn=0,nw_ttl=64
1310 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1313 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)'
1315 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 18])
1316 ovs-appctl -t ovs-ofctl exit
1318 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1319 NXT_PACKET_IN (xid=0x0): cookie=0x1 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1320 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
1322 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x3 total_len=64 in_port=1 reg0=0x1 (via action) data_len=64 (unbuffered)
1323 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
1325 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)
1326 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
1328 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)
1329 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
1331 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)
1332 tcp,in_port=0,dl_vlan=80,dl_vlan_pcp=0,dl_src=80:81:81:81:81:81,dl_dst=82:82:82:82:82:82,nw_src=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
1334 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)
1335 tcp,in_port=0,dl_vlan=80,dl_vlan_pcp=0,dl_src=80:81:81:81:81:81,dl_dst=82:82:82:82:82:82,nw_src=83.83.83.83,nw_dst=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
1337 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)
1338 tcp,in_port=0,dl_vlan=80,dl_vlan_pcp=0,dl_src=80:81:81:81:81:81,dl_dst=82:82:82:82:82:82,nw_src=83.83.83.83,nw_dst=84.84.84.84,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=85,tp_dst=11,tcp_flags=fin tcp_csum:31b8
1340 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)
1341 tcp,in_port=0,dl_vlan=80,dl_vlan_pcp=0,dl_src=80:81:81:81:81:81,dl_dst=82:82:82:82:82:82,nw_src=83.83.83.83,nw_dst=84.84.84.84,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=85,tp_dst=86,tcp_flags=fin tcp_csum:316d
1343 NXT_PACKET_IN (xid=0x0): table_id=7 cookie=0x9 total_len=64 in_port=1 tun_id=0x6 reg0=0x1 reg1=0x2 reg2=0x3 reg3=0x4 reg4=0x5 (via action) data_len=64 (unbuffered)
1344 tcp,in_port=0,dl_vlan=80,dl_vlan_pcp=0,dl_src=80:81:81:81:81:81,dl_dst=82:82:82:82:82:82,nw_src=83.83.83.83,nw_dst=84.84.84.84,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=85,tp_dst=86,tcp_flags=fin tcp_csum:316d
1348 AT_CHECK([ovs-ofctl monitor br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1351 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'
1353 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 18])
1354 ovs-appctl -t ovs-ofctl exit
1356 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1357 NXT_PACKET_IN (xid=0x0): cookie=0x1 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1358 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
1360 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x3 total_len=64 in_port=1 reg0=0x1 (via action) data_len=64 (unbuffered)
1361 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
1363 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)
1364 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
1366 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)
1367 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
1369 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)
1370 udp,in_port=0,dl_vlan=80,dl_vlan_pcp=0,dl_src=80:81:81:81:81:81,dl_dst=82:82:82:82:82:82,nw_src=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
1372 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)
1373 udp,in_port=0,dl_vlan=80,dl_vlan_pcp=0,dl_src=80:81:81:81:81:81,dl_dst=82:82:82:82:82:82,nw_src=83.83.83.83,nw_dst=84.84.84.84,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=8,tp_dst=11 udp_csum:4439
1375 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)
1376 udp,in_port=0,dl_vlan=80,dl_vlan_pcp=0,dl_src=80:81:81:81:81:81,dl_dst=82:82:82:82:82:82,nw_src=83.83.83.83,nw_dst=84.84.84.84,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=85,tp_dst=11 udp_csum:43ec
1378 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)
1379 udp,in_port=0,dl_vlan=80,dl_vlan_pcp=0,dl_src=80:81:81:81:81:81,dl_dst=82:82:82:82:82:82,nw_src=83.83.83.83,nw_dst=84.84.84.84,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=85,tp_dst=86 udp_csum:43a1
1381 NXT_PACKET_IN (xid=0x0): table_id=7 cookie=0x9 total_len=64 in_port=1 tun_id=0x6 reg0=0x1 reg1=0x2 reg2=0x3 reg3=0x4 reg4=0x5 (via action) data_len=64 (unbuffered)
1382 udp,in_port=0,dl_vlan=80,dl_vlan_pcp=0,dl_src=80:81:81:81:81:81,dl_dst=82:82:82:82:82:82,nw_src=83.83.83.83,nw_dst=84.84.84.84,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=85,tp_dst=86 udp_csum:43a1
1385 dnl Modified ARP controller action.
1386 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1389 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)'
1392 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 18])
1393 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
1394 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1395 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1396 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
1397 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1398 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
1399 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1400 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
1401 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1402 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
1403 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1404 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
1405 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1406 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
1407 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1408 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
1409 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1410 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
1411 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1412 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
1415 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1418 AT_CHECK([ovs-ofctl monitor br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1421 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'
1424 AT_CHECK([ovs-appctl time/warp 1000], [0], [ignore])
1425 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 18])
1426 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
1427 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1428 NXT_PACKET_IN (xid=0x0): cookie=0x1 total_len=98 in_port=1 (via action) data_len=98 (unbuffered)
1429 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
1431 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x3 total_len=102 in_port=1 reg0=0x1 (via action) data_len=102 (unbuffered)
1432 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
1434 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)
1435 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
1437 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)
1438 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
1440 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)
1441 sctp,in_port=0,dl_vlan=80,dl_vlan_pcp=0,dl_src=80:81:81:81:81:81,dl_dst=82:82:82:82:82:82,nw_src=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
1443 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)
1444 sctp,in_port=0,dl_vlan=80,dl_vlan_pcp=0,dl_src=80:81:81:81:81:81,dl_dst=82:82:82:82:82:82,nw_src=83.83.83.83,nw_dst=84.84.84.84,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=1112,tp_dst=2223 sctp_csum:d9d79157
1446 NXT_PACKET_IN (xid=0x0): table_id=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)
1447 sctp,in_port=0,dl_vlan=80,dl_vlan_pcp=0,dl_src=80:81:81:81:81:81,dl_dst=82:82:82:82:82:82,nw_src=83.83.83.83,nw_dst=84.84.84.84,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=85,tp_dst=2223 sctp_csum:7f12662e
1449 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)
1450 sctp,in_port=0,dl_vlan=80,dl_vlan_pcp=0,dl_src=80:81:81:81:81:81,dl_dst=82:82:82:82:82:82,nw_src=83.83.83.83,nw_dst=84.84.84.84,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=85,tp_dst=86 sctp_csum:a7e86f67
1452 NXT_PACKET_IN (xid=0x0): table_id=7 cookie=0x9 total_len=102 in_port=1 tun_id=0x6 reg0=0x1 reg1=0x2 reg2=0x3 reg3=0x4 reg4=0x5 (via action) data_len=102 (unbuffered)
1453 sctp,in_port=0,dl_vlan=80,dl_vlan_pcp=0,dl_src=80:81:81:81:81:81,dl_dst=82:82:82:82:82:82,nw_src=83.83.83.83,nw_dst=84.84.84.84,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=85,tp_dst=86 sctp_csum:a7e86f67
1456 AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
1457 cookie=0x1, n_packets=3, n_bytes=218, dl_src=20:22:22:22:22:22 actions=CONTROLLER:65535,resubmit(80,1)
1458 cookie=0x2, n_packets=3, n_bytes=180, dl_src=30:33:33:33:33:33 actions=mod_vlan_vid:15,CONTROLLER:65535
1459 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)
1460 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)
1461 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)
1462 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)
1463 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)
1464 cookie=0x8, table=6, n_packets=3, n_bytes=218, in_port=85 actions=mod_tp_src:85,CONTROLLER:65535,resubmit(86,7)
1465 cookie=0x9, table=7, n_packets=3, n_bytes=218, in_port=86 actions=mod_tp_dst:86,CONTROLLER:65535,CONTROLLER:65535
1466 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
1467 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
1468 n_packets=3, n_bytes=180, dl_src=10:11:11:11:11:11 actions=CONTROLLER:65535
1475 AT_SETUP([ofproto-dpif - MPLS handling])
1476 OVS_VSWITCHD_START([dnl
1477 add-port br0 p1 -- set Interface p1 type=dummy
1479 ON_EXIT([kill `cat ovs-ofctl.pid`])
1481 AT_CAPTURE_FILE([ofctl_monitor.log])
1482 AT_DATA([flows.txt], [dnl
1483 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
1484 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
1485 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
1486 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
1487 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
1488 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
1489 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
1490 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
1491 cookie=0xa mpls,dl_src=40:44:44:44:44:49 actions=push_mpls:0x8848,load:10->OXM_OF_MPLS_LABEL[[]],CONTROLLER:65535
1492 cookie=0xb dl_src=50:55:55:55:55:55 dl_type=0x8847 actions=load:1000->OXM_OF_MPLS_LABEL[[]],controller
1493 cookie=0xd dl_src=60:66:66:66:66:66 actions=pop_mpls:0x0800,controller
1494 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
1496 cookie=0xd dl_src=60:66:66:66:00:01 actions=pop_mpls:0x0800,dec_ttl,controller
1497 cookie=0xd dl_src=60:66:66:66:00:02 actions=pop_mpls:0x0800,load:0xa000001->OXM_OF_IPV4_DST[[]],controller
1498 cookie=0xd dl_src=60:66:66:66:00:03 actions=pop_mpls:0x0800,move:OXM_OF_IPV4_DST[[]]->OXM_OF_IPV4_SRC[[]],controller
1499 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
1500 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
1501 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
1502 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
1504 cookie=0xd dl_src=60:66:66:66:00:08 actions=pop_mpls:0x0806,resubmit(1,1)
1505 cookie=0xd table=1 arp actions=controller
1507 cookie=0xd dl_src=60:66:66:66:00:09 actions=pop_mpls:0x0800,mod_nw_tos:48,controller
1508 cookie=0xd dl_src=60:66:66:66:00:0a actions=pop_mpls:0x0800,mod_nw_dst:10.0.0.1,controller
1509 cookie=0xd dl_src=60:66:66:66:00:0b actions=pop_mpls:0x0800,mod_nw_src:10.0.0.1,controller
1511 cookie=0xd dl_src=60:66:66:66:01:00 actions=pop_mpls:0x8848,controller
1512 cookie=0xd dl_src=60:66:66:66:01:01 actions=pop_mpls:0x8847,dec_mpls_ttl,controller
1513 cookie=0xd dl_src=60:66:66:66:01:02 actions=pop_mpls:0x8848,load:3->OXM_OF_MPLS_TC[[]],controller
1515 cookie=0xd dl_src=60:66:66:66:02:00 actions=pop_mpls:0x8847,pop_mpls:0x0800,controller
1516 cookie=0xd dl_src=60:66:66:66:02:01 actions=pop_mpls:0x8848,pop_mpls:0x0800,dec_ttl,controller
1517 cookie=0xd dl_src=60:66:66:66:02:10 actions=pop_mpls:0x8847,dec_mpls_ttl,pop_mpls:0x0800,dec_ttl,controller
1519 cookie=0xd dl_src=60:66:66:66:03:00 actions=pop_mpls:0x8848,pop_mpls:0x8848,controller
1520 cookie=0xd dl_src=60:66:66:66:03:01 actions=pop_mpls:0x8847,pop_mpls:0x8847,dec_mpls_ttl,controller
1521 cookie=0xd dl_src=60:66:66:66:03:10 actions=pop_mpls:0x8848,dec_mpls_ttl,pop_mpls:0x8848,dec_mpls_ttl,controller
1523 cookie=0xd dl_src=60:66:66:66:04:00 actions=pop_mpls:0x0800,push_mpls:0x8847,controller
1524 cookie=0xd dl_src=60:66:66:66:04:01 actions=pop_mpls:0x0800,push_mpls:0x8848,dec_mpls_ttl,controller
1525 cookie=0xd dl_src=60:66:66:66:04:10 actions=pop_mpls:0x0800,dec_ttl,push_mpls:0x8848,dec_mpls_ttl,controller
1527 cookie=0xd dl_src=60:66:66:66:05:00 actions=push_mpls:0x8848,pop_mpls:0x8847,controller
1528 cookie=0xd dl_src=60:66:66:66:05:01 actions=push_mpls:0x8847,pop_mpls:0x8848,dec_mpls_ttl,controller
1529 cookie=0xd dl_src=60:66:66:66:05:10 actions=push_mpls:0x8848,dec_mpls_ttl,pop_mpls:0x8847,dec_mpls_ttl,controller
1531 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
1533 dnl Modified MPLS controller action.
1534 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1537 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)'
1539 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1540 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1542 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1543 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1544 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
1546 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1547 mpls,in_port=0,vlan_tci=0x0000,dl_src=40:44:44:44:44:42,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=64,mpls_bos=1
1549 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1550 mpls,in_port=0,vlan_tci=0x0000,dl_src=40:44:44:44:44:42,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=64,mpls_bos=1
1553 dnl Modified MPLS controller action.
1554 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1557 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)'
1559 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1560 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1562 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1563 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1564 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
1566 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1567 ip,in_port=0,vlan_tci=0x0000,dl_src=41:44:44:44:44:42,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_proto=16,nw_tos=0,nw_ecn=0,nw_ttl=64
1569 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1570 ip,in_port=0,vlan_tci=0x0000,dl_src=41:44:44:44:44:42,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_proto=16,nw_tos=0,nw_ecn=0,nw_ttl=64
1573 dnl Modified MPLS controller action.
1574 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1576 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)
1579 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)'
1581 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1582 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1584 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1585 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1586 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
1588 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1589 mpls,in_port=0,vlan_tci=0x0000,dl_src=40:44:44:44:44:43,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=64,mpls_bos=0,mpls_lse1=46912
1591 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1592 mpls,in_port=0,vlan_tci=0x0000,dl_src=40:44:44:44:44:43,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=64,mpls_bos=0,mpls_lse1=46912
1595 dnl Modified MPLS controller action.
1596 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1599 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))'
1601 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1602 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1604 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1605 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1606 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
1608 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1609 mpls,in_port=0,dl_vlan=99,dl_vlan_pcp=7,dl_src=40:44:44:44:44:44,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=64,mpls_bos=1
1611 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1612 mpls,in_port=0,dl_vlan=99,dl_vlan_pcp=7,dl_src=40:44:44:44:44:44,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=64,mpls_bos=1
1615 dnl Modified MPLS controller action.
1616 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1619 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)'
1621 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1622 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1624 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1625 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1626 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
1628 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1629 mpls,in_port=0,vlan_tci=0x0000,dl_src=40:44:44:44:44:45,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=63,mpls_bos=1
1631 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1632 mpls,in_port=0,vlan_tci=0x0000,dl_src=40:44:44:44:44:45,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=63,mpls_bos=1
1635 dnl Modified MPLS controller action.
1636 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1639 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)'
1641 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1642 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1644 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1645 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1646 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
1648 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1649 mpls,in_port=0,vlan_tci=0x0000,dl_src=40:44:44:44:44:46,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=10,mpls_bos=1
1651 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1652 mpls,in_port=0,vlan_tci=0x0000,dl_src=40:44:44:44:44:46,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=10,mpls_bos=1
1655 dnl Modified MPLS controller action.
1656 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1659 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)'
1661 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1662 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1664 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1665 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1666 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
1668 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1669 mpls,in_port=0,vlan_tci=0x0000,dl_src=40:44:44:44:44:47,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=10,mpls_bos=1
1671 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1672 mpls,in_port=0,vlan_tci=0x0000,dl_src=40:44:44:44:44:47,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=10,mpls_bos=1
1675 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1677 dnl Modified MPLS controller action.
1678 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1681 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)'
1683 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1684 ovs-appctl -t ovs-ofctl exit
1686 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1687 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1688 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
1690 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1691 mplsm,in_port=0,vlan_tci=0x0000,dl_src=40:44:44:44:44:49,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=64,mpls_bos=0,mpls_lse1=42816
1693 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1694 mplsm,in_port=0,vlan_tci=0x0000,dl_src=40:44:44:44:44:49,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=64,mpls_bos=0,mpls_lse1=42816
1697 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1699 dnl Modified MPLS controller action.
1700 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1703 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)'
1705 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1706 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1708 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1709 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1710 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
1712 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1713 mpls,in_port=0,vlan_tci=0x0000,dl_src=40:44:44:44:44:48,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=9,mpls_bos=1
1715 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1716 mpls,in_port=0,vlan_tci=0x0000,dl_src=40:44:44:44:44:48,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=9,mpls_bos=1
1719 dnl Modified MPLS actions.
1720 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1723 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)'
1725 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1726 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1728 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1729 NXT_PACKET_IN (xid=0x0): cookie=0xb total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1730 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
1732 NXT_PACKET_IN (xid=0x0): cookie=0xb total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1733 mpls,in_port=0,vlan_tci=0x0000,dl_src=50:55:55:55:55:55,dl_dst=50:54:00:00:00:07,mpls_label=1000,mpls_tc=7,mpls_ttl=64,mpls_bos=1
1735 NXT_PACKET_IN (xid=0x0): cookie=0xb total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1736 mpls,in_port=0,vlan_tci=0x0000,dl_src=50:55:55:55:55:55,dl_dst=50:54:00:00:00:07,mpls_label=1000,mpls_tc=7,mpls_ttl=64,mpls_bos=1
1739 dnl Modified MPLS ipv6 controller action.
1740 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1743 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)'
1745 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1746 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1748 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1749 NXT_PACKET_IN (xid=0x0): cookie=0xc total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1750 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
1752 NXT_PACKET_IN (xid=0x0): cookie=0xc total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1753 mplsm,in_port=0,vlan_tci=0x0000,dl_src=70:77:77:77:77:77,dl_dst=50:54:00:00:00:07,mpls_label=1000,mpls_tc=7,mpls_ttl=128,mpls_bos=1
1755 NXT_PACKET_IN (xid=0x0): cookie=0xc total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1756 mplsm,in_port=0,vlan_tci=0x0000,dl_src=70:77:77:77:77:77,dl_dst=50:54:00:00:00:07,mpls_label=1000,mpls_tc=7,mpls_ttl=128,mpls_bos=1
1760 dnl Modified MPLS pop action.
1761 dnl The input is a frame with two MPLS headers which tcpdump -vve shows as:
1762 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)
1763 dnl (tos 0x0, ttl 64, id 0, offset 0, flags [none], proto TCP (6), length 44)
1765 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1768 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'
1771 # 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)'
1773 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1774 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1776 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1777 NXT_PACKET_IN (xid=0x0): cookie=0xd 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: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
1780 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1781 tcp,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:66:66,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744
1783 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1784 tcp,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:66:66,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744
1787 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1789 dnl Modified MPLS pop action.
1790 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
1791 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)
1792 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
1793 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
1794 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1797 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'
1799 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1800 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1802 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
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: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
1806 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1807 tcp,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:00:01,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=254,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744
1809 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1810 tcp,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:00:01,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=254,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744
1813 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1815 dnl Modified MPLS pop action.
1816 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
1817 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)
1818 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
1819 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
1820 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1823 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'
1825 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1826 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1828 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
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: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
1832 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1833 tcp,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:00:02,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=10.0.0.1,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:2dee
1835 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1836 tcp,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:00:02,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=10.0.0.1,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:2dee
1839 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1841 dnl Modified MPLS pop action.
1842 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
1843 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)
1844 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
1845 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
1846 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1849 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'
1851 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1852 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1854 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
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: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
1858 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1859 tcp,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:00:03,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.2,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7743
1861 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1862 tcp,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:00:03,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.2,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7743
1865 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1867 dnl Modified MPLS pop action.
1868 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
1869 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)
1870 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
1871 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
1872 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1875 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'
1877 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1878 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1880 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
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: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
1884 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1885 tcp,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:00:04,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.2,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7743
1887 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1888 tcp,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:00:04,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.2,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7743
1891 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1893 dnl Modified MPLS pop action.
1894 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
1895 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)
1896 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
1897 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
1898 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1901 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'
1903 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1904 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1906 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
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: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
1910 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1911 tcp,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:00:05,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.106,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:76db
1913 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1914 tcp,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:00:05,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.106,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:76db
1917 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1919 dnl Modified MPLS pop action.
1920 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
1921 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)
1922 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
1923 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
1924 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1927 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'
1929 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1930 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1932 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
1933 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1934 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
1936 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1937 tcp,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:00:06,dl_dst=50:54:00:00:00:07,nw_src=192.168.255.255,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7745
1939 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1940 tcp,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:00:06,dl_dst=50:54:00:00:00:07,nw_src=192.168.255.255,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7745
1943 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1945 dnl Modified MPLS pop action.
1946 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
1947 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)
1948 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
1949 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
1950 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1953 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'
1955 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1956 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1958 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
1959 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1960 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
1962 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1963 tcp,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:00:07,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744
1965 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1966 tcp,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:00:07,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744
1969 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1971 dnl Modified MPLS pop action.
1972 dnl The input is an ARP frame with a single MPLS label stack entry which tcpdump -vve shows as:
1973 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)
1974 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1977 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'
1979 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1980 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1982 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
1983 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0xd total_len=56 in_port=1 (via action) data_len=56 (unbuffered)
1984 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
1986 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0xd total_len=56 in_port=1 (via action) data_len=56 (unbuffered)
1987 arp,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:00:08,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=192.168.0.1,arp_tpa=255.255.255.255,arp_op=2,arp_sha=60:66:66:66:00:08,arp_tha=ff:ff:ff:ff:ff:ff
1989 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0xd total_len=56 in_port=1 (via action) data_len=56 (unbuffered)
1990 arp,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:00:08,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=192.168.0.1,arp_tpa=255.255.255.255,arp_op=2,arp_sha=60:66:66:66:00:08,arp_tha=ff:ff:ff:ff:ff:ff
1993 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1995 dnl Modified MPLS pop action.
1996 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
1997 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)
1998 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
1999 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
2000 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2003 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'
2005 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2006 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2008 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
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: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
2012 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2013 tcp,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:00:09,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=48,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744
2015 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2016 tcp,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:00:09,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=48,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744
2019 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2021 dnl Modified MPLS pop action.
2022 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
2023 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)
2024 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
2025 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
2026 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2029 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'
2031 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2032 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2034 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
2035 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2036 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
2038 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2039 tcp,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:00:0a,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=10.0.0.1,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:2dee
2041 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2042 tcp,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:00:0a,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=10.0.0.1,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:2dee
2045 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2047 dnl Modified MPLS pop action.
2048 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
2049 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)
2050 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
2051 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
2052 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2055 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'
2057 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2058 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2060 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
2061 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2062 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
2064 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2065 tcp,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:00:0b,dl_dst=50:54:00:00:00:07,nw_src=10.0.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:2ded
2067 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2068 tcp,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:00:0b,dl_dst=50:54:00:00:00:07,nw_src=10.0.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:2ded
2071 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2073 dnl Modified MPLS pop action.
2074 dnl The input is a frame with two MPLS label stack entries which tcpdump -vve shows as:
2075 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)
2076 dnl (label 20, exp 0, [S], ttl 31)
2077 dnl (tos 0x0, ttl 254, id 0, offset 0, flags [none], proto TCP (6), length 44)
2078 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
2079 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2082 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'
2084 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2085 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2087 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2088 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2089 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
2091 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2092 mplsm,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:01:00,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=0,mpls_ttl=31,mpls_bos=1
2094 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2095 mplsm,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:01:00,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=0,mpls_ttl=31,mpls_bos=1
2098 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2100 dnl Modified MPLS pop action.
2101 dnl The input is a frame with two MPLS label stack entries which tcpdump -vve shows as:
2102 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)
2103 dnl (label 20, exp 0, [S], ttl 31)
2104 dnl (tos 0x0, ttl 254, id 0, offset 0, flags [none], proto TCP (6), length 44)
2105 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
2106 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2109 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'
2111 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2112 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2114 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2115 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2116 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
2118 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2119 mpls,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:01:01,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=0,mpls_ttl=30,mpls_bos=1
2121 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2122 mpls,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:01:01,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=0,mpls_ttl=30,mpls_bos=1
2125 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2127 dnl Modified MPLS pop action.
2128 dnl The input is a frame with two MPLS label stack entries which tcpdump -vve shows as:
2129 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)
2130 dnl (label 20, exp 0, [S], ttl 31)
2131 dnl (tos 0x0, ttl 254, id 0, offset 0, flags [none], proto TCP (6), length 44)
2132 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
2133 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2136 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'
2138 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2139 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2141 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2142 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2143 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
2145 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2146 mplsm,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:01:02,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=3,mpls_ttl=31,mpls_bos=1
2148 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2149 mplsm,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:01:02,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=3,mpls_ttl=31,mpls_bos=1
2152 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2154 dnl Modified MPLS pop action.
2155 dnl The input is a frame with two MPLS label stack entries which tcpdump -vve shows as:
2156 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)
2157 dnl (label 20, exp 0, [S], ttl 31)
2158 dnl (tos 0x0, ttl 254, id 0, offset 0, flags [none], proto TCP (6), length 44)
2159 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
2160 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2163 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'
2165 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2166 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2168 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2169 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2170 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
2172 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2173 tcp,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:02:00,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744
2175 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2176 tcp,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:02:00,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744
2179 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2181 dnl Modified MPLS pop action.
2182 dnl The input is a frame with two MPLS label stack entries which tcpdump -vve shows as:
2183 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)
2184 dnl (label 20, exp 0, [S], ttl 31)
2185 dnl (tos 0x0, ttl 254, id 0, offset 0, flags [none], proto TCP (6), length 44)
2186 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
2187 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2190 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'
2192 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2193 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2195 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
2196 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2197 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
2199 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2200 tcp,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:02:01,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=254,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744
2202 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2203 tcp,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:02:01,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=254,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744
2206 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2208 dnl Modified MPLS pop action.
2209 dnl The input is a frame with two MPLS label stack entries which tcpdump -vve shows as:
2210 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)
2211 dnl (label 20, exp 0, [S], ttl 31)
2212 dnl (tos 0x0, ttl 254, id 0, offset 0, flags [none], proto TCP (6), length 44)
2213 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
2214 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2217 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'
2219 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2220 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2222 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
2223 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2224 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
2226 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2227 tcp,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:02:10,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=254,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744
2229 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2230 tcp,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:02:10,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=254,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744
2233 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2235 dnl Modified MPLS pop action.
2236 dnl The input is a frame with three MPLS label stack entries which tcpdump -vve shows as:
2237 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)
2238 dnl (label 20, exp 0, ttl 31)
2239 dnl (label 20, exp 0, [S], ttl 30)
2240 dnl (tos 0x0, ttl 254, id 0, offset 0, flags [none], proto TCP (6), length 44)
2241 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
2242 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2245 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'
2247 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2248 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2250 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2251 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2252 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
2254 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2255 mplsm,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:03:00,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=0,mpls_ttl=30,mpls_bos=1
2257 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2258 mplsm,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:03:00,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=0,mpls_ttl=30,mpls_bos=1
2261 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2263 dnl Modified MPLS pop action.
2264 dnl The input is a frame with three MPLS label stack entries which tcpdump -vve shows as:
2265 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)
2266 dnl (label 20, exp 0, ttl 31)
2267 dnl (label 20, exp 0, [S], ttl 30)
2268 dnl (tos 0x0, ttl 254, id 0, offset 0, flags [none], proto TCP (6), length 44)
2269 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
2270 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2273 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'
2275 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2276 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2278 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2279 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2280 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
2282 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2283 mpls,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:03:01,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=0,mpls_ttl=29,mpls_bos=1
2285 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2286 mpls,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:03:01,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=0,mpls_ttl=29,mpls_bos=1
2289 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2291 dnl Modified MPLS pop action.
2292 dnl The input is a frame with three MPLS label stack entries which tcpdump -vve shows as:
2293 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)
2294 dnl (label 20, exp 0, ttl 31)
2295 dnl (label 20, exp 0, [S], ttl 30)
2296 dnl (tos 0x0, ttl 254, id 0, offset 0, flags [none], proto TCP (6), length 44)
2297 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
2298 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2301 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'
2303 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2304 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2306 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
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:03:10,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=0,mpls_ttl=29,mpls_bos=1
2310 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2311 mplsm,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:03:10,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=0,mpls_ttl=29,mpls_bos=1
2313 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2314 mplsm,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:03:10,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=0,mpls_ttl=29,mpls_bos=1
2317 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2319 dnl Modified MPLS pop action.
2320 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
2321 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)
2322 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
2323 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
2324 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2327 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'
2329 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2330 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2332 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
2333 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2334 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
2336 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2337 mpls,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:04:00,dl_dst=50:54:00:00:00:07,mpls_label=0,mpls_tc=0,mpls_ttl=255,mpls_bos=1
2339 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2340 mpls,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:04:00,dl_dst=50:54:00:00:00:07,mpls_label=0,mpls_tc=0,mpls_ttl=255,mpls_bos=1
2343 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2345 dnl Modified MPLS pop action.
2346 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
2347 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)
2348 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
2349 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
2350 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2353 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'
2355 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2356 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2358 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
2359 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2360 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
2362 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2363 mplsm,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:04:01,dl_dst=50:54:00:00:00:07,mpls_label=0,mpls_tc=0,mpls_ttl=254,mpls_bos=1
2365 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2366 mplsm,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:04:01,dl_dst=50:54:00:00:00:07,mpls_label=0,mpls_tc=0,mpls_ttl=254,mpls_bos=1
2369 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2371 dnl Modified MPLS pop action.
2372 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
2373 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)
2374 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
2375 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
2376 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2379 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'
2381 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2382 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2384 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
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:04:10,dl_dst=50:54:00:00:00:07,mpls_label=0,mpls_tc=0,mpls_ttl=253,mpls_bos=1
2388 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2389 mplsm,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:04:10,dl_dst=50:54:00:00:00:07,mpls_label=0,mpls_tc=0,mpls_ttl=253,mpls_bos=1
2391 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2392 mplsm,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:04:10,dl_dst=50:54:00:00:00:07,mpls_label=0,mpls_tc=0,mpls_ttl=253,mpls_bos=1
2395 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2397 dnl Modified MPLS pop action.
2398 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
2399 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)
2400 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
2401 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
2402 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2405 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'
2407 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2408 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2410 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2411 NXT_PACKET_IN (xid=0x0): cookie=0xd 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:00,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=0,mpls_ttl=32,mpls_bos=1
2414 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2415 mpls,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:05:00,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=0,mpls_ttl=32,mpls_bos=1
2417 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2418 mpls,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:05:00,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=0,mpls_ttl=32,mpls_bos=1
2421 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2423 dnl Modified MPLS pop action.
2424 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
2425 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)
2426 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
2427 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
2428 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2431 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'
2433 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2434 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2436 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2437 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2438 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
2440 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2441 mplsm,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:05:01,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=0,mpls_ttl=31,mpls_bos=1
2443 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2444 mplsm,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:05:01,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=0,mpls_ttl=31,mpls_bos=1
2447 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2449 dnl Modified MPLS pop action.
2450 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
2451 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)
2452 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
2453 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
2454 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2457 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'
2459 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2460 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2462 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2463 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2464 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
2466 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2467 mpls,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:05:10,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=0,mpls_ttl=31,mpls_bos=1
2469 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2470 mpls,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:05:10,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=0,mpls_ttl=31,mpls_bos=1
2473 AT_CHECK([ovs-appctl revalidator/purge], [0])
2474 AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
2475 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
2476 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
2477 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
2478 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
2479 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
2480 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
2481 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
2482 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
2483 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
2484 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
2485 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
2486 cookie=0xd, n_packets=3, n_bytes=180, dl_src=60:66:66:66:00:08 actions=pop_mpls:0x0806,resubmit(1,1)
2487 cookie=0xd, n_packets=3, n_bytes=186, dl_src=60:66:66:66:00:01 actions=pop_mpls:0x0800,dec_ttl,CONTROLLER:65535
2488 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
2489 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
2490 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
2491 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
2492 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
2493 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
2494 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
2495 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
2496 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
2497 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
2498 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
2499 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
2500 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
2501 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
2502 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
2503 cookie=0xd, n_packets=3, n_bytes=186, dl_src=60:66:66:66:66:66 actions=pop_mpls:0x0800,CONTROLLER:65535
2504 cookie=0xd, n_packets=3, n_bytes=198, dl_src=60:66:66:66:01:00 actions=pop_mpls:0x8848,CONTROLLER:65535
2505 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
2506 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
2507 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
2508 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
2509 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
2510 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
2511 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
2512 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
2513 cookie=0xd, table=1, n_packets=3, n_bytes=168, arp actions=CONTROLLER:65535
2520 AT_SETUP([ofproto-dpif - MPLS handling with goto_table])
2521 OVS_VSWITCHD_START([dnl
2522 add-port br0 p1 -- set Interface p1 type=dummy
2524 ON_EXIT([kill `cat ovs-ofctl.pid`])
2526 AT_CAPTURE_FILE([ofctl_monitor.log])
2527 AT_DATA([flows.txt], [dnl
2528 table=0 mplsm actions=pop_mpls:0x800,goto_table(1)
2529 table=1 ip,ip_dscp=8 actions=controller
2531 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flows br0 flows.txt])
2534 dnl Modified MPLS pop action.
2535 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
2536 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)
2537 dnl (tos 0x20, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
2538 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
2539 AT_CHECK([ovs-ofctl -O OpenFlow12 monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2542 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'
2544 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2545 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2547 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
2548 OFPT_PACKET_IN (OF1.2) (xid=0x0): table_id=1 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2549 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
2551 OFPT_PACKET_IN (OF1.2) (xid=0x0): table_id=1 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2552 tcp,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:00:08,dl_dst=50:54:00:00:00:01,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=32,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744
2554 OFPT_PACKET_IN (OF1.2) (xid=0x0): table_id=1 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2555 tcp,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:00:08,dl_dst=50:54:00:00:00:01,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=32,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744
2558 AT_CHECK([ovs-appctl revalidator/purge], [0])
2559 AT_CHECK([ovs-ofctl -O OpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
2560 n_packets=3, n_bytes=186, mplsm actions=pop_mpls:0x0800,goto_table:1
2561 table=1, n_packets=3, n_bytes=174, ip,nw_tos=32 actions=CONTROLLER:65535
2562 OFPST_FLOW reply (OF1.2):
2568 AT_SETUP([ofproto-dpif - MPLS handling with write_actions])
2569 OVS_VSWITCHD_START([dnl
2570 add-port br0 p1 -- set Interface p1 type=dummy
2572 ON_EXIT([kill `cat ovs-ofctl.pid`])
2574 dnl N.B: The first (and only) action that accesses L3 data after the
2575 dnl pop_mpls action is present in write_actions. This exercises recirculation
2576 dnl triggered in write_actions due to a previous action not in write actions.
2577 AT_CAPTURE_FILE([ofctl_monitor.log])
2578 AT_DATA([flows.txt], [dnl
2579 mplsm actions=pop_mpls:0x800,write_actions(dec_ttl,controller)
2581 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flows br0 flows.txt])
2583 dnl Modified MPLS pop action.
2584 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
2585 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)
2586 dnl (tos 0x20, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
2587 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
2588 AT_CHECK([ovs-ofctl -O OpenFlow12 monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2591 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'
2593 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2594 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2596 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
2597 OFPT_PACKET_IN (OF1.2) (xid=0x0): table_id=254 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2598 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
2600 OFPT_PACKET_IN (OF1.2) (xid=0x0): table_id=254 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2601 tcp,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:00:08,dl_dst=50:54:00:00:00:01,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=32,nw_ecn=0,nw_ttl=254,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744
2603 OFPT_PACKET_IN (OF1.2) (xid=0x0): table_id=254 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2604 tcp,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:00:08,dl_dst=50:54:00:00:00:01,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=32,nw_ecn=0,nw_ttl=254,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744
2607 AT_CHECK([ovs-appctl revalidator/purge], [0])
2608 AT_CHECK([ovs-ofctl -O OpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
2609 n_packets=3, n_bytes=186, mplsm actions=pop_mpls:0x0800,write_actions(dec_ttl,CONTROLLER:65535)
2610 OFPST_FLOW reply (OF1.2):
2616 AT_SETUP([ofproto-dpif - table-miss flow (OpenFlow 1.0)])
2617 OVS_VSWITCHD_START([dnl
2618 add-port br0 p1 -- set Interface p1 type=dummy
2620 ON_EXIT([kill `cat ovs-ofctl.pid`])
2622 AT_CAPTURE_FILE([ofctl_monitor.log])
2623 # A table-miss flow has priority 0 and no match
2624 AT_CHECK([ovs-ofctl --protocols=OpenFlow10 add-flow br0 'priority=0 actions=output:CONTROLLER'])
2626 dnl Singleton controller action.
2627 AT_CHECK([ovs-ofctl monitor -P openflow10 --protocols=OpenFlow10 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
2630 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)'
2632 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2633 ovs-appctl -t ovs-ofctl exit
2635 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2636 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
2637 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
2639 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
2640 tcp,in_port=0,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:0
2642 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
2643 tcp,in_port=0,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:0
2646 AT_CHECK([ovs-appctl revalidator/purge], [0])
2647 AT_CHECK([ovs-ofctl --protocols=OpenFlow10 dump-flows br0 | ofctl_strip | sort], [0], [dnl
2648 n_packets=3, n_bytes=180, priority=0 actions=CONTROLLER:65535
2656 AT_SETUP([ofproto-dpif - table-miss flow (OpenFlow 1.3)])
2657 OVS_VSWITCHD_START([dnl
2658 add-port br0 p1 -- set Interface p1 type=dummy
2660 ON_EXIT([kill `cat ovs-ofctl.pid`])
2662 AT_CAPTURE_FILE([ofctl_monitor.log])
2663 # A table-miss flow has priority 0 and no match
2664 AT_CHECK([ovs-ofctl --protocols=OpenFlow13 add-flow br0 'priority=0 actions=output:CONTROLLER'])
2666 dnl Singleton controller action.
2667 AT_CHECK([ovs-ofctl monitor -P openflow10 --protocols=OpenFlow13 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
2670 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)'
2672 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2673 ovs-appctl -t ovs-ofctl exit
2675 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2677 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2678 OFPT_PACKET_IN (OF1.3) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
2679 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
2681 OFPT_PACKET_IN (OF1.3) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
2682 tcp,in_port=0,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:0
2684 OFPT_PACKET_IN (OF1.3) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
2685 tcp,in_port=0,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:0
2688 AT_CHECK([ovs-appctl revalidator/purge], [0])
2689 AT_CHECK([ovs-ofctl --protocols=OpenFlow13 dump-flows br0 | ofctl_strip | sort], [0], [dnl
2690 n_packets=3, n_bytes=180, priority=0 actions=CONTROLLER:65535
2691 OFPST_FLOW reply (OF1.3):
2697 AT_SETUP([ofproto-dpif - table-miss flow with async config (OpenFlow 1.3)])
2698 OVS_VSWITCHD_START([dnl
2699 add-port br0 p1 -- set Interface p1 type=dummy
2701 ON_EXIT([kill `cat ovs-ofctl.pid`])
2703 ovs-appctl time/stop
2705 AT_CAPTURE_FILE([ofctl_monitor.log])
2706 # A table-miss flow has priority 0 and no match
2707 AT_CHECK([ovs-ofctl --protocols=OpenFlow13 add-flow br0 'priority=0 actions=output:CONTROLLER'])
2709 dnl Singleton controller action.
2710 AT_CHECK([ovs-ofctl monitor -P openflow10 --protocols=OpenFlow13 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
2712 # Become slave (OF 1.3), which should disable everything except port status.
2713 ovs-appctl -t ovs-ofctl ofctl/send 041800180000000200000003000000000000000000000001
2715 # Ensure that ovs-vswitchd gets a chance to reply before sending another command.
2716 ovs-appctl time/warp 500 100
2718 # Use OF 1.3 OFPT_SET_ASYNC to enable OFPR_NO_MATCH for slave only.
2719 ovs-appctl -t ovs-ofctl ofctl/send 041c002000000002000000000000000100000000000000000000000000000000
2721 ovs-appctl time/warp 500 100
2723 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)'
2725 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2726 ovs-appctl -t ovs-ofctl exit
2728 AT_CHECK([ovs-appctl revalidator/purge], [0])
2729 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2730 send: OFPT_ROLE_REQUEST (OF1.3) (xid=0x2): role=slave generation_id=1
2731 OFPT_ROLE_REPLY (OF1.3) (xid=0x2): role=slave generation_id=1
2733 send: OFPT_SET_ASYNC (OF1.3) (xid=0x2):
2744 OFPT_PACKET_IN (OF1.3) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
2745 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
2747 OFPT_PACKET_IN (OF1.3) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
2748 tcp,in_port=0,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:0
2750 OFPT_PACKET_IN (OF1.3) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
2751 tcp,in_port=0,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:0
2754 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2756 AT_CHECK([ovs-ofctl --protocols=OpenFlow13 dump-flows br0 | ofctl_strip | sort], [0], [dnl
2757 n_packets=3, n_bytes=180, priority=0 actions=CONTROLLER:65535
2758 OFPST_FLOW reply (OF1.3):
2765 AT_SETUP([ofproto-dpif - table-miss flow (OpenFlow 1.4)])
2766 OVS_VSWITCHD_START([dnl
2767 add-port br0 p1 -- set Interface p1 type=dummy
2769 ON_EXIT([kill `cat ovs-ofctl.pid`])
2771 AT_CAPTURE_FILE([ofctl_monitor.log])
2772 # A table-miss flow has priority 0 and no match
2773 AT_CHECK([ovs-ofctl --protocols=OpenFlow14 add-flow br0 'priority=0 actions=output:CONTROLLER'])
2775 dnl Singleton controller action.
2776 AT_CHECK([ovs-ofctl monitor -P openflow10 --protocols=OpenFlow14 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
2779 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)'
2781 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2782 ovs-appctl -t ovs-ofctl exit
2784 AT_CHECK([ovs-appctl revalidator/purge], [0])
2785 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2786 OFPT_PACKET_IN (OF1.4) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
2787 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
2789 OFPT_PACKET_IN (OF1.4) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
2790 tcp,in_port=0,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:0
2792 OFPT_PACKET_IN (OF1.4) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
2793 tcp,in_port=0,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:0
2796 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2798 AT_CHECK([ovs-ofctl --protocols=OpenFlow14 dump-flows br0 | ofctl_strip | sort], [0], [dnl
2799 n_packets=3, n_bytes=180, priority=0 actions=CONTROLLER:65535
2800 OFPST_FLOW reply (OF1.4):
2808 AT_SETUP([ofproto-dpif - packet-in reason in group table (Openflow 1.3)])
2809 OVS_VSWITCHD_START([dnl
2810 add-port br0 p1 -- set Interface p1 type=dummy
2812 ON_EXIT([kill `cat ovs-ofctl.pid`])
2814 AT_CAPTURE_FILE([ofctl_monitor.log])
2815 # A table-miss flow has priority 0 and no match
2816 AT_CHECK([ovs-ofctl --protocols=OpenFlow13 add-group br0 'group_id=1234,type=all,bucket=output:10,bucket=output:CONTROLLER'])
2817 AT_CHECK([ovs-ofctl --protocols=OpenFlow13 add-flow br0 'in_port=1 actions=group:1234'])
2819 dnl Singleton controller action.
2820 AT_CHECK([ovs-ofctl monitor -P openflow10 --protocols=OpenFlow13 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
2823 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)'
2825 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2826 ovs-appctl -t ovs-ofctl exit
2828 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2830 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2831 OFPT_PACKET_IN (OF1.3) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
2832 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
2834 OFPT_PACKET_IN (OF1.3) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
2835 tcp,in_port=0,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:0
2837 OFPT_PACKET_IN (OF1.3) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
2838 tcp,in_port=0,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:0
2841 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2843 AT_CHECK([ovs-ofctl --protocols=OpenFlow13 dump-flows br0 | ofctl_strip | sort], [0], [dnl
2844 n_packets=3, n_bytes=180, in_port=1 actions=group:1234
2845 OFPST_FLOW reply (OF1.3):
2852 AT_SETUP([ofproto-dpif - packet-in reason in group table (Openflow 1.4)])
2853 OVS_VSWITCHD_START([dnl
2854 add-port br0 p1 -- set Interface p1 type=dummy
2856 ON_EXIT([kill `cat ovs-ofctl.pid`])
2858 AT_CAPTURE_FILE([ofctl_monitor.log])
2859 # A table-miss flow has priority 0 and no match
2860 AT_CHECK([ovs-ofctl --protocols=OpenFlow14 add-group br0 'group_id=1234,type=all,bucket=output:10,bucket=output:CONTROLLER'])
2861 AT_CHECK([ovs-ofctl --protocols=OpenFlow14 add-flow br0 'in_port=1 actions=group:1234'])
2863 dnl Singleton controller action.
2864 AT_CHECK([ovs-ofctl monitor -P openflow10 --protocols=OpenFlow14 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
2867 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)'
2869 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2870 ovs-appctl -t ovs-ofctl exit
2872 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2874 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2875 OFPT_PACKET_IN (OF1.4) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via group) data_len=60 (unbuffered)
2876 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
2878 OFPT_PACKET_IN (OF1.4) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via group) data_len=60 (unbuffered)
2879 tcp,in_port=0,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:0
2881 OFPT_PACKET_IN (OF1.4) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via group) data_len=60 (unbuffered)
2882 tcp,in_port=0,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:0
2885 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2887 AT_CHECK([ovs-ofctl --protocols=OpenFlow14 dump-flows br0 | ofctl_strip | sort], [0], [dnl
2888 n_packets=3, n_bytes=180, in_port=1 actions=group:1234
2889 OFPST_FLOW reply (OF1.4):
2895 AT_SETUP([ofproto-dpif - ARP modification slow-path])
2897 ADD_OF_PORTS([br0], [1], [2])
2899 ovs-vsctl -- set Interface p2 type=dummy options:pcap=p2.pcap
2900 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'
2902 # Input some packets that should follow the arp modification slow-path.
2904 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)'
2906 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2908 # Check the packets that were output.
2909 AT_CHECK([ovs-ofctl parse-pcap p2.pcap], [0], [dnl
2910 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
2911 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
2912 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
2913 arp,in_port=ANY,vlan_tci=0x0000,dl_src=80:88:88:88:88:88,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=192.168.0.1,arp_tpa=192.168.0.2,arp_op=2,arp_sha=50:54:00:00:00:05,arp_tha=00:00:00:00:00:00
2914 arp,in_port=ANY,vlan_tci=0x0000,dl_src=80:88:88:88:88:88,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=192.168.128.1,arp_tpa=192.168.0.2,arp_op=2,arp_sha=50:54:00:00:00:05,arp_tha=00:00:00:00:00:00
2915 arp,in_port=ANY,vlan_tci=0x0000,dl_src=80:88:88:88:88:88,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=192.168.128.1,arp_tpa=192.168.0.2,arp_op=2,arp_sha=50:54:00:00:00:05,arp_tha=40:44:44:44:44:41
2916 arp,in_port=ANY,vlan_tci=0x0000,dl_src=80:88:88:88:88:88,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=192.168.0.1,arp_tpa=192.168.0.2,arp_op=2,arp_sha=50:54:00:00:00:05,arp_tha=00:00:00:00:00:00
2917 arp,in_port=ANY,vlan_tci=0x0000,dl_src=80:88:88:88:88:88,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=192.168.128.1,arp_tpa=192.168.0.2,arp_op=2,arp_sha=50:54:00:00:00:05,arp_tha=00:00:00:00:00:00
2918 arp,in_port=ANY,vlan_tci=0x0000,dl_src=80:88:88:88:88:88,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=192.168.128.1,arp_tpa=192.168.0.2,arp_op=2,arp_sha=50:54:00:00:00:05,arp_tha=40:44:44:44:44:41
2924 AT_SETUP([ofproto-dpif - VLAN handling])
2926 [set Bridge br0 fail-mode=standalone -- \
2927 add-port br0 p1 trunks=10,12 -- \
2928 add-port br0 p2 tag=10 -- \
2929 add-port br0 p3 tag=12 \
2930 other-config:priority-tags=true -- \
2931 add-port br0 p4 tag=12 -- \
2932 add-port br0 p5 vlan_mode=native-tagged tag=10 -- \
2933 add-port br0 p6 vlan_mode=native-tagged tag=10 trunks=10,12 -- \
2934 add-port br0 p7 vlan_mode=native-untagged tag=12 -- \
2935 add-port br0 p8 vlan_mode=native-untagged tag=12 trunks=10,12 \
2936 other-config:priority-tags=true -- \
2937 set Interface p1 type=dummy -- \
2938 set Interface p2 type=dummy -- \
2939 set Interface p3 type=dummy -- \
2940 set Interface p4 type=dummy -- \
2941 set Interface p5 type=dummy -- \
2942 set Interface p6 type=dummy -- \
2943 set Interface p7 type=dummy -- \
2944 set Interface p8 type=dummy --])
2946 dnl Each of these specifies an in_port by number, a VLAN VID (or "none"),
2947 dnl a VLAN PCP (used if the VID isn't "none") and the expected set of datapath
2953 "100 10 0 1,5,6,7,8,pop_vlan,2" \
2954 "100 10 1 1,5,6,7,8,pop_vlan,2" \
2957 "100 12 0 1,5,6,pop_vlan,3,4,7,8" \
2958 "100 12 1 1,5,6,pop_vlan,4,7,push_vlan(vid=0,pcp=1),3,8" \
2962 "1 10 0 5,6,7,8,100,pop_vlan,2" \
2963 "1 10 1 5,6,7,8,100,pop_vlan,2" \
2966 "1 12 0 5,6,100,pop_vlan,3,4,7,8" \
2967 "1 12 1 5,6,100,pop_vlan,4,7,push_vlan(vid=0,pcp=1),3,8" \
2968 "2 none 0 push_vlan(vid=10,pcp=0),1,5,6,7,8,100" \
2969 "2 0 0 pop_vlan,push_vlan(vid=10,pcp=0),1,5,6,7,8,100" \
2970 "2 0 1 pop_vlan,push_vlan(vid=10,pcp=1),1,5,6,7,8,100" \
2977 "3 none 0 4,7,8,push_vlan(vid=12,pcp=0),1,5,6,100" \
2978 "3 0 0 pop_vlan,4,7,8,push_vlan(vid=12,pcp=0),1,5,6,100" \
2979 "3 0 1 8,pop_vlan,4,7,push_vlan(vid=12,pcp=1),1,5,6,100" \
2986 "4 none 0 3,7,8,push_vlan(vid=12,pcp=0),1,5,6,100" \
2987 "4 0 0 pop_vlan,3,7,8,push_vlan(vid=12,pcp=0),1,5,6,100" \
2988 "4 0 1 3,8,pop_vlan,7,push_vlan(vid=12,pcp=1),1,5,6,100" \
2995 "5 none 0 2,push_vlan(vid=10,pcp=0),1,6,7,8,100" \
2996 "5 0 0 pop_vlan,2,push_vlan(vid=10,pcp=0),1,6,7,8,100" \
2997 "5 0 1 pop_vlan,2,push_vlan(vid=10,pcp=1),1,6,7,8,100" \
2998 "5 10 0 1,6,7,8,100,pop_vlan,2" \
2999 "5 10 1 1,6,7,8,100,pop_vlan,2" \
3002 "5 12 0 1,6,100,pop_vlan,3,4,7,8" \
3003 "5 12 1 1,6,100,pop_vlan,4,7,push_vlan(vid=0,pcp=1),3,8" \
3004 "6 none 0 2,push_vlan(vid=10,pcp=0),1,5,7,8,100" \
3005 "6 0 0 pop_vlan,2,push_vlan(vid=10,pcp=0),1,5,7,8,100" \
3006 "6 0 1 pop_vlan,2,push_vlan(vid=10,pcp=1),1,5,7,8,100" \
3007 "6 10 0 1,5,7,8,100,pop_vlan,2" \
3008 "6 10 1 1,5,7,8,100,pop_vlan,2" \
3011 "6 12 0 1,5,100,pop_vlan,3,4,7,8" \
3012 "6 12 1 1,5,100,pop_vlan,4,7,push_vlan(vid=0,pcp=1),3,8" \
3013 "7 none 0 3,4,8,push_vlan(vid=12,pcp=0),1,5,6,100" \
3014 "7 0 0 pop_vlan,3,4,8,push_vlan(vid=12,pcp=0),1,5,6,100" \
3015 "7 0 1 3,8,pop_vlan,4,push_vlan(vid=12,pcp=1),1,5,6,100" \
3016 "7 10 0 1,5,6,8,100,pop_vlan,2" \
3017 "7 10 1 1,5,6,8,100,pop_vlan,2" \
3020 "7 12 0 1,5,6,100,pop_vlan,3,4,8" \
3021 "7 12 1 1,5,6,100,pop_vlan,4,push_vlan(vid=0,pcp=1),3,8" \
3022 "8 none 0 3,4,7,push_vlan(vid=12,pcp=0),1,5,6,100" \
3023 "8 0 0 pop_vlan,3,4,7,push_vlan(vid=12,pcp=0),1,5,6,100" \
3024 "8 0 1 3,pop_vlan,4,7,push_vlan(vid=12,pcp=1),1,5,6,100" \
3025 "8 10 0 1,5,6,7,100,pop_vlan,2" \
3026 "8 10 1 1,5,6,7,100,pop_vlan,2" \
3029 "8 12 0 1,5,6,100,pop_vlan,3,4,7" \
3030 "8 12 1 1,5,6,100,pop_vlan,4,7,push_vlan(vid=0,pcp=1),3"
3038 if test $vlan = none; then
3039 flow="in_port($in_port),eth(src=50:54:00:00:00:01,dst=ff:ff:ff:ff:ff:ff),eth_type(0xabcd)"
3041 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))"
3044 echo "----------------------------------------------------------------------"
3045 echo "in_port=$in_port vlan=$vlan pcp=$pcp"
3047 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
3048 actual=`tail -1 stdout | sed 's/Datapath actions: //'`
3050 AT_CHECK([ovs-dpctl normalize-actions "$flow" "$expected"], [0], [stdout])
3052 AT_CHECK([ovs-dpctl normalize-actions "$flow" "$actual"], [0], [expout])
3058 AT_SETUP([ofproto-dpif - MPLS handling])
3059 OVS_VSWITCHD_START([dnl
3060 add-port br0 p1 -- set Interface p1 type=dummy
3062 ON_EXIT([kill `cat ovs-ofctl.pid`])
3064 AT_CAPTURE_FILE([ofctl_monitor.log])
3065 AT_DATA([flows.txt], [dnl
3066 dl_src=40:44:44:44:00:00 actions=push_mpls:0x8847,controller
3067 dl_src=40:44:44:44:00:01,mpls actions=push_mpls:0x8847,controller
3068 dl_src=40:44:44:44:00:02,mpls actions=push_mpls:0x8848,controller
3070 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 add-flows br0 flows.txt])
3072 dnl In this test, we push an MPLS tag to an ethernet packet.
3073 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
3076 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)'
3078 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3079 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
3081 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
3082 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3083 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
3084 00000000 50 54 00 00 00 07 40 44-44 44 00 00 88 47 00 00
3085 00000010 01 40 45 00 00 28 00 00-00 00 40 06 f9 7c c0 a8
3086 00000020 00 01 c0 a8 00 02 00 00-00 00 00 00 00 00 00 00
3087 00000030 00 00 50 00 00 00 00 00-00 00 00 00 00 00 00 00
3089 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3090 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
3091 00000000 50 54 00 00 00 07 40 44-44 44 00 00 88 47 00 00
3092 00000010 01 40 45 00 00 28 00 00-00 00 40 06 f9 7c c0 a8
3093 00000020 00 01 c0 a8 00 02 00 00-00 00 00 00 00 00 00 00
3094 00000030 00 00 50 00 00 00 00 00-00 00 00 00 00 00 00 00
3096 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3097 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
3098 00000000 50 54 00 00 00 07 40 44-44 44 00 00 88 47 00 00
3099 00000010 01 40 45 00 00 28 00 00-00 00 40 06 f9 7c c0 a8
3100 00000020 00 01 c0 a8 00 02 00 00-00 00 00 00 00 00 00 00
3101 00000030 00 00 50 00 00 00 00 00-00 00 00 00 00 00 00 00
3104 dnl In this test, we push an MPLS tag to an MPLS packet. The LSE should be
3105 dnl copied exactly, except for the BOS bit.
3106 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
3109 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)'
3111 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3112 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
3114 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
3115 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3116 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
3117 00000000 50 54 00 00 00 07 40 44-44 44 00 01 88 47 00 00
3118 00000010 a0 40 00 00 a1 40 00 00-00 00 00 00 00 00 00 00
3119 00000020 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
3120 00000030 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
3122 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3123 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
3124 00000000 50 54 00 00 00 07 40 44-44 44 00 01 88 47 00 00
3125 00000010 a0 40 00 00 a1 40 00 00-00 00 00 00 00 00 00 00
3126 00000020 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
3127 00000030 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
3129 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3130 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
3131 00000000 50 54 00 00 00 07 40 44-44 44 00 01 88 47 00 00
3132 00000010 a0 40 00 00 a1 40 00 00-00 00 00 00 00 00 00 00
3133 00000020 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
3134 00000030 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
3137 dnl In this test, we push an MPLS tag to an MPLS packet. The LSE should be
3138 dnl copied exactly, except for the BOS bit. The ethertype should be updated
3139 dnl to the MPLS ethertype of the MPLS push action which differs to that
3140 dnl of the input packet.
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:00:02,dst=50:54:00:00:00:07),eth_type(0x8847),mpls(label=10,tc=0,ttl=64,bos=1)'
3146 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3147 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
3149 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
3150 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3151 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
3152 00000000 50 54 00 00 00 07 40 44-44 44 00 02 88 48 00 00
3153 00000010 a0 40 00 00 a1 40 00 00-00 00 00 00 00 00 00 00
3154 00000020 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
3155 00000030 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
3157 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3158 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
3159 00000000 50 54 00 00 00 07 40 44-44 44 00 02 88 48 00 00
3160 00000010 a0 40 00 00 a1 40 00 00-00 00 00 00 00 00 00 00
3161 00000020 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
3162 00000030 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
3164 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3165 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
3166 00000000 50 54 00 00 00 07 40 44-44 44 00 02 88 48 00 00
3167 00000010 a0 40 00 00 a1 40 00 00-00 00 00 00 00 00 00 00
3168 00000020 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
3169 00000030 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
3175 AT_SETUP([ofproto-dpif - VLAN+MPLS handling])
3176 OVS_VSWITCHD_START([dnl
3177 add-port br0 p1 -- set Interface p1 type=dummy
3179 ON_EXIT([kill `cat ovs-ofctl.pid`])
3181 AT_CAPTURE_FILE([ofctl_monitor.log])
3182 AT_DATA([flows.txt], [dnl
3183 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
3184 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
3185 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
3186 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
3187 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
3188 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
3189 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
3190 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
3191 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
3192 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
3194 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 add-flows br0 flows.txt])
3196 dnl Modified MPLS controller action.
3197 dnl In this test, we push the MPLS tag before pushing a VLAN tag, so we see
3198 dnl both of these in the final flow
3199 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
3202 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)'
3204 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3205 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
3207 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
3208 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3209 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
3210 00000000 50 54 00 00 00 07 40 44-44 44 54 50 81 00 20 63
3211 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3212 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3213 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3214 00000040 00 00 00 00
3216 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3217 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
3218 00000000 50 54 00 00 00 07 40 44-44 44 54 50 81 00 20 63
3219 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3220 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3221 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3222 00000040 00 00 00 00
3224 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3225 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
3226 00000000 50 54 00 00 00 07 40 44-44 44 54 50 81 00 20 63
3227 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3228 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3229 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3230 00000040 00 00 00 00
3233 dnl Modified MPLS controller action.
3234 dnl In this test, the input packet in vlan-tagged, which should be stripped
3235 dnl before we push the MPLS and VLAN tags.
3236 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
3239 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))'
3241 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3242 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
3244 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
3245 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3246 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
3247 00000000 50 54 00 00 00 07 40 44-44 44 54 51 81 00 20 63
3248 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3249 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3250 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3252 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3253 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
3254 00000000 50 54 00 00 00 07 40 44-44 44 54 51 81 00 20 63
3255 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3256 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3257 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3259 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3260 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
3261 00000000 50 54 00 00 00 07 40 44-44 44 54 51 81 00 20 63
3262 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3263 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3264 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3267 dnl Modified MPLS controller action.
3268 dnl In this test, we push the MPLS tag before pushing a VLAN tag, so we see
3269 dnl both of these in the final flow
3270 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
3273 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)'
3275 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3276 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
3278 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
3279 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3280 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
3281 00000000 52 54 00 00 00 07 40 44-44 44 54 52 81 00 20 63
3282 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3283 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3284 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3285 00000040 00 00 00 00
3287 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3288 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
3289 00000000 52 54 00 00 00 07 40 44-44 44 54 52 81 00 20 63
3290 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3291 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3292 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3293 00000040 00 00 00 00
3295 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3296 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
3297 00000000 52 54 00 00 00 07 40 44-44 44 54 52 81 00 20 63
3298 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3299 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3300 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3301 00000040 00 00 00 00
3304 dnl Modified MPLS controller action.
3305 dnl In this test, the input packet in vlan-tagged, which should be stripped
3306 dnl before we push the MPLS and VLAN tags.
3307 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
3310 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))'
3312 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3313 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
3315 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
3316 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3317 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
3318 00000000 50 54 00 00 00 07 40 44-44 44 54 53 81 00 20 63
3319 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3320 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3321 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3323 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3324 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
3325 00000000 50 54 00 00 00 07 40 44-44 44 54 53 81 00 20 63
3326 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3327 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3328 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3330 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3331 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
3332 00000000 50 54 00 00 00 07 40 44-44 44 54 53 81 00 20 63
3333 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3334 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3335 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3338 dnl Modified MPLS controller action.
3339 dnl In this test, we push the VLAN tag before pushing a MPLS tag, but these
3340 dnl actions are reordered, so we see both of these in the final flow.
3341 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
3344 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)'
3346 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3347 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
3349 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
3350 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3351 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
3352 00000000 50 54 00 00 00 07 40 44-44 44 54 54 81 00 20 63
3353 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3354 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3355 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3356 00000040 00 00 00 00
3358 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3359 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
3360 00000000 50 54 00 00 00 07 40 44-44 44 54 54 81 00 20 63
3361 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3362 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3363 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3364 00000040 00 00 00 00
3366 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3367 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
3368 00000000 50 54 00 00 00 07 40 44-44 44 54 54 81 00 20 63
3369 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3370 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3371 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3372 00000040 00 00 00 00
3375 dnl Modified MPLS controller action.
3376 dnl In this test, the input packet in vlan-tagged, which should be stripped
3377 dnl before we push the MPLS and VLAN tags.
3378 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
3381 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))'
3383 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3384 OVS_APP_EXIT_AND_WAIT([ovs-ofctl])
3386 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
3387 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3388 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
3389 00000000 50 54 00 00 00 07 40 44-44 44 54 55 81 00 20 63
3390 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3391 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3392 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3394 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3395 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
3396 00000000 50 54 00 00 00 07 40 44-44 44 54 55 81 00 20 63
3397 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3398 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3399 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3401 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3402 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
3403 00000000 50 54 00 00 00 07 40 44-44 44 54 55 81 00 20 63
3404 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3405 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3406 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3409 dnl Modified MPLS controller action.
3410 dnl In this test, we push the VLAN tag before pushing a MPLS tag, but these
3411 dnl actions are reordered, so we see both of these in the final flow.
3412 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
3415 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)'
3417 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3418 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
3420 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
3421 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3422 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
3423 00000000 50 54 00 00 00 07 40 44-44 44 54 56 81 00 20 63
3424 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3425 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3426 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3427 00000040 00 00 00 00
3429 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3430 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
3431 00000000 50 54 00 00 00 07 40 44-44 44 54 56 81 00 20 63
3432 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3433 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3434 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3435 00000040 00 00 00 00
3437 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3438 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
3439 00000000 50 54 00 00 00 07 40 44-44 44 54 56 81 00 20 63
3440 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3441 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3442 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3443 00000040 00 00 00 00
3446 dnl Modified MPLS controller action.
3447 dnl In this test, the input packet in vlan-tagged, which should be stripped
3448 dnl before we push the MPLS and VLAN tags.
3449 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 -m 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
3452 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))'
3454 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3455 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
3457 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
3458 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3459 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
3460 00000000 50 54 00 00 00 07 40 44-44 44 54 57 81 00 20 63
3461 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3462 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3463 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3465 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3466 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
3467 00000000 50 54 00 00 00 07 40 44-44 44 54 57 81 00 20 63
3468 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3469 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3470 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3472 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3473 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
3474 00000000 50 54 00 00 00 07 40 44-44 44 54 57 81 00 20 63
3475 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3476 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3477 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3480 dnl Modified MPLS controller action.
3481 dnl In this test, the input packet in vlan-tagged, which should be stripped
3482 dnl before we push the MPLS and VLAN tags.
3483 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
3486 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))'
3488 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3489 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
3491 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
3492 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3493 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
3494 00000000 50 54 00 00 00 07 40 44-44 44 54 58 81 00 20 63
3495 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3496 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3497 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3499 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3500 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
3501 00000000 50 54 00 00 00 07 40 44-44 44 54 58 81 00 20 63
3502 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3503 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3504 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3506 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3507 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
3508 00000000 50 54 00 00 00 07 40 44-44 44 54 58 81 00 20 63
3509 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3510 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3511 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3514 dnl Modified MPLS controller action.
3515 dnl In this test, the input packet in vlan-tagged, which should be modified
3516 dnl before we push MPLS and VLAN tags.
3517 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
3520 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))'
3522 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3523 ovs-appctl -t ovs-ofctl exit
3525 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
3526 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3527 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
3528 00000000 50 54 00 00 00 07 40 44-44 44 54 59 81 00 20 63
3529 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3530 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3531 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3533 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3534 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
3535 00000000 50 54 00 00 00 07 40 44-44 44 54 59 81 00 20 63
3536 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3537 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3538 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3540 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3541 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
3542 00000000 50 54 00 00 00 07 40 44-44 44 54 59 81 00 20 63
3543 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3544 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3545 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3548 AT_CHECK([ovs-appctl revalidator/purge], [0])
3549 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
3550 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
3551 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
3552 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
3553 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
3554 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
3555 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
3556 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
3557 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
3558 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
3559 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
3560 OFPST_FLOW reply (OF1.2):
3566 AT_SETUP([ofproto-dpif - fragment handling - trace])
3568 ADD_OF_PORTS([br0], [1], [2], [3], [4], [5], [6], [90])
3569 AT_DATA([flows.txt], [dnl
3570 priority=75 tcp ip_frag=no tp_dst=80 actions=move:OXM_OF_TCP_DST[[]]->OXM_OF_TCP_SRC[[]],output:1
3571 priority=75 tcp ip_frag=first tp_dst=80 actions=move:OXM_OF_TCP_DST[[]]->OXM_OF_TCP_SRC[[]],output:2
3572 priority=50 tcp ip_frag=no actions=move:OXM_OF_TCP_DST[[]]->OXM_OF_TCP_SRC[[]],output:4
3573 priority=50 tcp ip_frag=first actions=move:OXM_OF_TCP_DST[[]]->OXM_OF_TCP_SRC[[]],output:5
3574 priority=50 tcp ip_frag=later actions=output:6
3576 AT_CHECK([ovs-ofctl replace-flows br0 flows.txt])
3578 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"
3579 no_flow="$base_flow,frag=no),tcp(src=12345,dst=80)"
3580 first_flow="$base_flow,frag=first),tcp(src=12345,dst=80)"
3581 later_flow="$base_flow,frag=later)"
3583 # mode no first later
3586 'drop 1 drop drop' \
3595 AT_CHECK([ovs-ofctl set-frags br0 $mode])
3596 for type in no first later; do
3597 eval flow=\$${type}_flow exp_output=\$$type
3598 printf "\n%s\n" "----$mode $type-----"
3599 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
3601 if test $mode = drop && test $type != no; then
3602 echo 'Packets dropped because they are IP fragments and the fragment handling mode is "drop".' >> expout
3603 echo "Datapath actions: $exp_output" >> expout
3604 elif test $type = later; then
3605 echo "Datapath actions: $exp_output" >> expout
3607 echo "Datapath actions: set(tcp(src=80,dst=80)),$exp_output" >> expout
3609 AT_CHECK([grep 'IP fragments' stdout; tail -1 stdout], [0], [expout])
3615 AT_SETUP([ofproto-dpif - fragment handling - upcall])
3617 ADD_OF_PORTS([br0], [1], [2], [3], [4], [5], [6], [90])
3618 AT_DATA([flows.txt], [dnl
3619 priority=75 tcp ip_frag=no tp_dst=80 actions=set_field:81->tcp_dst,output:1
3620 priority=75 tcp ip_frag=first tp_dst=80 actions=set_field:81->tcp_dst,output:2
3621 priority=50 tcp ip_frag=no actions=set_field:81->tcp_dst,output:4
3622 priority=50 tcp ip_frag=first actions=set_field:81->tcp_dst,output:5
3623 priority=50 tcp ip_frag=later actions=output:6
3625 AT_CHECK([ovs-ofctl replace-flows br0 flows.txt])
3627 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"
3628 no_flow="$base_flow,frag=no),tcp(src=12345,dst=80)"
3629 first_flow="$base_flow,frag=first),tcp(src=12345,dst=80)"
3630 later_flow="$base_flow,frag=later)"
3632 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
3636 AT_CHECK([ovs-ofctl set-frags br0 $mode])
3637 for type in no first later; do
3638 eval flow=\$${type}_flow
3639 printf "\n%s\n" "----$mode $type-----"
3641 AT_CHECK([ovs-appctl netdev-dummy/receive p90 "$flow"], [0], [stdout])
3644 AT_CHECK([ovs-appctl dpctl/dump-flows], [0], [dnl
3645 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
3646 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
3647 recirc_id(0),in_port(90),eth_type(0x0800),ipv4(proto=6,frag=later), packets:0, bytes:0, used:never, actions:6
3652 AT_CHECK([ovs-appctl revalidator/purge], [0])
3653 AT_CHECK([ovs-ofctl set-frags br0 $mode])
3654 for type in no first later; do
3655 eval flow=\$${type}_flow
3656 printf "\n%s\n" "----$mode $type-----"
3658 AT_CHECK([ovs-appctl netdev-dummy/receive p90 "$flow"], [0], [stdout])
3661 AT_CHECK([ovs-appctl dpctl/dump-flows], [0], [dnl
3662 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
3663 recirc_id(0),in_port(90),eth_type(0x0800),ipv4(frag=first), packets:0, bytes:0, used:never, actions:drop
3664 recirc_id(0),in_port(90),eth_type(0x0800),ipv4(frag=later), packets:0, bytes:0, used:never, actions:drop
3669 AT_CHECK([ovs-appctl revalidator/purge], [0])
3670 AT_CHECK([ovs-ofctl set-frags br0 $mode])
3671 for type in no first later; do
3672 eval flow=\$${type}_flow
3673 printf "\n%s\n" "----$mode $type-----"
3675 AT_CHECK([ovs-appctl netdev-dummy/receive p90 "$flow"], [0], [stdout])
3678 AT_CHECK([ovs-appctl dpctl/dump-flows], [0], [dnl
3679 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
3680 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
3681 recirc_id(0),in_port(90),eth_type(0x0800),ipv4(proto=6,frag=later), packets:0, bytes:0, used:never, actions:6
3687 AT_SETUP([ofproto-dpif - fragment handling - actions])
3689 ADD_OF_PORTS([br0], [1], [2], [3], [4], [5], [6], [90])
3691 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])
3692 AT_CHECK([tail -2 stderr | sed 's/^.*|WARN|//'], [0], [dnl
3693 source field tcp_dst lacks correct prerequisites
3694 ovs-ofctl: actions are invalid with specified match (OFPBAC_MATCH_INCONSISTENT)
3697 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])
3698 AT_CHECK([tail -2 stderr | sed 's/^.*|WARN|//'], [0], [dnl
3699 destination field tcp_src lacks correct prerequisites
3700 ovs-ofctl: actions are invalid with specified match (OFPBAC_MATCH_INCONSISTENT)
3703 AT_CHECK([ovs-ofctl add-flow br0 "udp,ip_frag=later actions=set_field:8888->udp_src,output:1"], [1], [], [stderr])
3704 AT_CHECK([tail -2 stderr | sed 's/^.*|WARN|//'], [0], [dnl
3705 set_field udp_src lacks correct prerequisities
3706 ovs-ofctl: actions are invalid with specified match (OFPBAC_MATCH_INCONSISTENT)
3709 AT_CHECK([ovs-ofctl add-flow br0 "udp,ip_frag=later actions=load:8888->NXM_OF_UDP_DST[[]],output:1"], [1], [], [stderr])
3710 AT_CHECK([tail -2 stderr | sed 's/^.*|WARN|//'], [0], [dnl
3711 set_field udp_dst lacks correct prerequisities
3712 ovs-ofctl: actions are invalid with specified match (OFPBAC_MATCH_INCONSISTENT)
3715 AT_CHECK([ovs-ofctl add-flow br0 "sctp,ip_frag=later actions=set_field:8888->sctp_src,output:1"], [1], [], [stderr])
3716 AT_CHECK([tail -2 stderr | sed 's/^.*|WARN|//'], [0], [dnl
3717 set_field sctp_src lacks correct prerequisities
3718 ovs-ofctl: actions are invalid with specified match (OFPBAC_MATCH_INCONSISTENT)
3721 AT_CHECK([ovs-ofctl add-flow br0 "sctp,ip_frag=later actions=set_field:8888->sctp_dst,output:1"], [1], [], [stderr])
3722 AT_CHECK([tail -2 stderr | sed 's/^.*|WARN|//'], [0], [dnl
3723 set_field sctp_dst lacks correct prerequisities
3724 ovs-ofctl: actions are invalid with specified match (OFPBAC_MATCH_INCONSISTENT)
3727 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])
3728 AT_CHECK([tail -2 stderr | sed 's/^.*|WARN|//'], [0], [dnl
3729 source field tcp_dst lacks correct prerequisites
3730 ovs-ofctl: actions are invalid with specified match (OFPBAC_MATCH_INCONSISTENT)
3733 AT_DATA([flows.txt], [dnl
3734 priority=75 tcp actions=load:42->OXM_OF_TCP_SRC[[0..7]],output:1
3736 AT_CHECK([ovs-ofctl -O OpenFlow12 replace-flows br0 flows.txt])
3738 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
3742 AT_CHECK([ovs-ofctl set-frags br0 $mode])
3743 for frag in 4000 6000 6008 4010; do
3744 printf "\n%s\n" "----$mode $frag-----"
3746 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"])
3749 AT_CHECK([ovs-appctl dpctl/dump-flows | sed 's/used:[[0-9]].[[0-9]]*s/used:0.001s/'], [0], [dnl
3750 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
3751 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
3752 recirc_id(0),in_port(90),eth_type(0x0800),ipv4(proto=6,frag=later), packets:1, bytes:74, used:0.001s, actions:1
3755 AT_CHECK([ovs-appctl revalidator/purge], [0])
3756 AT_CHECK([ovs-ofctl set-frags br0 $mode])
3757 for frag in 4000 6000 6008 4010; do
3758 printf "\n%s\n" "----$mode $frag truncated transport header -----"
3760 AT_CHECK([ovs-appctl netdev-dummy/receive p90 "0021853763af 0026b98cb0f9 0800 4500 0018 2e24 $frag 40 06 465d ac11370d ac11370b 828b 0016"])
3763 AT_CHECK([ovs-appctl dpctl/dump-flows | sed 's/used:[[0-9]].[[0-9]]*s/used:0.001s/'], [0], [dnl
3764 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
3765 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
3766 recirc_id(0),in_port(90),eth_type(0x0800),ipv4(proto=6,frag=later), packets:1, bytes:60, used:0.001s, actions:1
3769 AT_CHECK([ovs-appctl revalidator/purge], [0])
3770 AT_CHECK([ovs-ofctl set-frags br0 $mode])
3771 for frag in 4000 6000 6001 4002; do
3772 printf "\n%s\n" "----$mode $frag missing transport header-----"
3774 AT_CHECK([ovs-appctl netdev-dummy/receive p90 "0021853763af 0026b98cb0f9 0800 4500 0014 2e24 $frag 40 06 465d ac11370d ac11370b"])
3777 AT_CHECK([ovs-appctl dpctl/dump-flows | sed 's/used:[[0-9]].[[0-9]]*s/used:0.001s/'], [0], [dnl
3778 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
3779 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
3780 recirc_id(0),in_port(90),eth_type(0x0800),ipv4(proto=6,frag=later), packets:1, bytes:60, used:0.001s, actions:1
3786 AT_SETUP([ofproto-dpif - exit])
3788 ADD_OF_PORTS([br0], [1], [2], [3], [10], [11], [12], [13], [14])
3789 AT_DATA([flows.txt], [dnl
3790 in_port=1 actions=output:10,exit,output:11
3791 in_port=2 actions=output:12,resubmit:1,output:12
3792 in_port=3 actions=output:13,resubmit:2,output:14
3794 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
3795 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])
3796 AT_CHECK([tail -1 stdout], [0],
3797 [Datapath actions: 10
3799 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])
3800 AT_CHECK([tail -1 stdout], [0],
3801 [Datapath actions: 12,10
3803 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])
3804 AT_CHECK([tail -1 stdout], [0],
3805 [Datapath actions: 13,12,10
3811 AT_SETUP([ofproto-dpif - mirroring, select_all])
3813 ADD_OF_PORTS([br0], 1, 2, 3)
3815 set Bridge br0 mirrors=@m --\
3816 --id=@p3 get Port p3 --\
3817 --id=@m create Mirror name=mymirror select_all=true output_port=@p3
3819 AT_DATA([flows.txt], [dnl
3820 in_port=1 actions=output:2
3821 in_port=2 actions=output:1
3823 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
3825 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)"
3826 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
3827 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
3828 [Datapath actions: 2,3
3831 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)"
3832 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
3833 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
3834 [Datapath actions: 1,3
3841 AT_SETUP([ofproto-dpif - mirroring, select_src])
3843 ADD_OF_PORTS([br0], 1, 2, 3)
3845 set Bridge br0 mirrors=@m --\
3846 --id=@p1 get Port p1 -- --id=@p3 get Port p3 --\
3847 --id=@m create Mirror name=mymirror select_src_port=@p1 output_port=@p3
3849 AT_DATA([flows.txt], [dnl
3850 in_port=1 actions=output:2
3851 in_port=2 actions=output:1
3853 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
3855 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)"
3856 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
3857 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
3858 [Datapath actions: 2,3
3861 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)"
3862 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
3863 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
3864 [Datapath actions: 1
3869 AT_SETUP([ofproto-dpif - mirroring, OFPP_NONE ingress port])
3871 ADD_OF_PORTS([br0], 1, 2)
3873 set Bridge br0 mirrors=@m --\
3874 --id=@p2 get Port p2 --\
3875 --id=@m create Mirror name=mymirror select_all=true output_port=@p2
3877 AT_CHECK([ovs-ofctl add-flow br0 action=output:1])
3879 # "in_port" defaults to OFPP_NONE if it's not specified.
3880 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"
3881 AT_CHECK([ovs-appctl ofproto/trace br0 "$flow"], [0], [stdout])
3882 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
3883 [Datapath actions: 1,2
3890 AT_SETUP([ofproto-dpif - mirroring, select_dst])
3892 ADD_OF_PORTS([br0], 1, 2, 3)
3894 set Bridge br0 mirrors=@m --\
3895 --id=@p2 get Port p2 -- --id=@p3 get Port p3 --\
3896 --id=@m create Mirror name=mymirror select_dst_port=@p2 output_port=@p3
3898 AT_DATA([flows.txt], [dnl
3899 in_port=1 actions=output:2
3900 in_port=2 actions=output:1
3902 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
3904 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)"
3905 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
3906 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
3907 [Datapath actions: 2,3
3910 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)"
3911 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
3912 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
3913 [Datapath actions: 1
3920 AT_SETUP([ofproto-dpif - mirroring, select_vlan])
3922 ADD_OF_PORTS([br0], 1, 2, 3)
3924 set Bridge br0 mirrors=@m --\
3925 --id=@p2 get Port p2 -- --id=@p3 get Port p3 --\
3926 --id=@m create Mirror name=mymirror select_all=true select_vlan=11 output_port=@p3
3928 AT_DATA([flows.txt], [dnl
3929 in_port=1, actions=output:2
3931 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
3933 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)"
3934 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
3935 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
3936 [Datapath actions: 2
3939 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))"
3940 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
3941 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
3942 [Datapath actions: 2
3945 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))"
3946 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
3947 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
3948 [Datapath actions: 2,3
3955 AT_SETUP([ofproto-dpif - mirroring, output_port])
3957 ADD_OF_PORTS([br0], 1, 2, 3)
3959 set Bridge br0 mirrors=@m --\
3960 --id=@p3 get Port p3 --\
3961 --id=@m create Mirror name=mymirror select_all=true output_port=@p3
3963 AT_DATA([flows.txt], [dnl
3964 in_port=1 actions=mod_vlan_vid:17,output:2
3965 in_port=2 actions=output:1
3967 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
3969 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)"
3970 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
3971 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
3972 [Datapath actions: push_vlan(vid=17,pcp=0),2,pop_vlan,3
3975 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)"
3976 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
3977 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
3978 [Datapath actions: 1,3
3984 AT_SETUP([ofproto-dpif - mirroring, output_vlan])
3986 ADD_OF_PORTS([br0], 1, 2)
3988 set Bridge br0 mirrors=@m --\
3989 --id=@m create Mirror name=mymirror select_all=true output_vlan=12
3991 AT_DATA([flows.txt], [dnl
3992 in_port=1 actions=output:2
3993 in_port=2 actions=mod_vlan_vid:17,output:1
3995 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
3997 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)"
3998 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
3999 actual=`tail -1 stdout | sed 's/Datapath actions: //'`
4001 expected="2,push_vlan(vid=12,pcp=0),1,2,100"
4002 AT_CHECK([ovs-dpctl normalize-actions "$flow" "$expected"], [0], [stdout])
4004 AT_CHECK([ovs-dpctl normalize-actions "$flow" "$actual"], [0], [expout])
4006 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)"
4007 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
4008 actual=`tail -1 stdout | sed 's/Datapath actions: //'`
4010 expected="push_vlan(vid=17,pcp=0),1,pop_vlan,push_vlan(vid=12,pcp=0),1,2,100"
4011 AT_CHECK([ovs-dpctl normalize-actions "$flow" "$expected"], [0], [stdout])
4013 AT_CHECK([ovs-dpctl normalize-actions "$flow" "$actual"], [0], [expout])
4018 # Two testcases below are for the ofproto/trace command
4019 # The first one tests all correct syntax:
4020 # ofproto/trace [dp_name] odp_flow [-generate|packet]
4021 # ofproto/trace br_name br_flow [-generate|packet]
4022 AT_SETUP([ofproto-dpif - ofproto/trace command 1])
4023 OVS_VSWITCHD_START([set bridge br0 fail-mode=standalone])
4024 ADD_OF_PORTS([br0], 1, 2, 3)
4026 AT_DATA([flows.txt], [dnl
4027 in_port=1 actions=output:2
4028 in_port=2 actions=output:1
4030 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
4032 odp_flow="in_port(1)"
4034 # Test command: ofproto/trace odp_flow with in_port as a name.
4035 AT_CHECK([ovs-appctl ofproto/trace "$odp_flow"], [0], [stdout])
4036 AT_CHECK([tail -1 stdout], [0], [dnl
4040 odp_flow="in_port(1)"
4041 # Test command: ofproto/trace odp_flow
4042 AT_CHECK([ovs-appctl ofproto/trace "$odp_flow"], [0], [stdout])
4043 AT_CHECK([tail -1 stdout], [0], [dnl
4047 # Test command: ofproto/trace dp_name odp_flow
4048 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$odp_flow"], [0], [stdout])
4049 AT_CHECK([tail -1 stdout], [0], [dnl
4052 # Test commmand: ofproto/trace br_name br_flow
4053 AT_CHECK([ovs-appctl ofproto/trace br0 "$br_flow"], [0], [stdout])
4054 AT_CHECK([tail -1 stdout], [0], [dnl
4058 # Delete the inserted flows
4059 AT_CHECK([ovs-ofctl del-flows br0 "in_port=1"], [0], [stdout])
4060 AT_CHECK([ovs-ofctl del-flows br0 "in_port=2"], [0], [stdout])
4062 # This section below tests the [-generate] option
4063 odp_flow="in_port(3),eth(src=50:54:00:00:00:05,dst=ff:ff:ff:ff:ff:ff)"
4064 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"
4066 # Test command: ofproto/trace odp_flow
4067 AT_CHECK([ovs-appctl ofproto/trace "$odp_flow"], [0], [stdout])
4068 # Check for no MAC learning entry
4069 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
4073 # Test command: ofproto/trace br_name br_flow
4074 AT_CHECK([ovs-appctl ofproto/trace br0 "$br_flow"], [0], [stdout])
4075 # Check for no MAC learning entry
4076 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
4080 # Test command: ofproto/trace odp_flow -generate
4081 AT_CHECK([ovs-appctl ofproto/trace "$odp_flow" -generate], [0], [stdout])
4082 # Check for the MAC learning entry
4083 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
4085 3 0 50:54:00:00:00:05 ?
4088 # Test command: ofproto/trace dp_name odp_flow -generate
4089 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy \
4090 "in_port(1),eth(src=50:54:00:00:00:06,dst=50:54:00:00:00:05)" \
4091 -generate], [0], [stdout])
4092 # Check for both MAC learning entries
4093 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
4095 3 0 50:54:00:00:00:05 ?
4096 1 0 50:54:00:00:00:06 ?
4099 # Test command: ofproto/trace br_name br_flow -generate
4100 AT_CHECK([ovs-appctl ofproto/trace br0 \
4101 "in_port=2,dl_src=50:54:00:00:00:07,dl_dst=50:54:00:00:00:06" \
4102 -generate], [0], [stdout])
4103 # Check for both MAC learning entries.
4104 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
4106 3 0 50:54:00:00:00:05 ?
4107 1 0 50:54:00:00:00:06 ?
4108 2 0 50:54:00:00:00:07 ?
4111 # This section beflow tests the [packet] option
4112 # The ovs-tcpundump of packets between port1 and port2
4113 pkt1to2="50540000000250540000000108064500001C000100004001F98CC0A80001C0A800020800F7FF00000000"
4114 pkt2to1="50540000000150540000000208064500001C000100004001F98CC0A80002C0A800010800F7FF00000000"
4116 # Construct the MAC learning table
4117 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy \
4118 "in_port(1),eth(src=50:54:00:00:00:01,dst=ff:ff:ff:ff:ff:ff)" \
4119 -generate], [0], [stdout])
4121 # Construct the MAC learning table
4122 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy \
4123 "in_port(2),eth(src=50:54:00:00:00:02,dst=ff:ff:ff:ff:ff:ff)" \
4124 -generate], [0], [stdout])
4126 # Test command: ofproto/trace odp_flow packet
4127 AT_CHECK([ovs-appctl ofproto/trace \
4128 "in_port(1),skb_priority(1),skb_mark(2)" "$pkt1to2"], [0], [stdout])
4129 AT_CHECK([tail -1 stdout], [0], [dnl
4132 AT_CHECK([head -n 2 stdout], [0], [dnl
4134 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
4137 # Test command: ofproto/trace dp_name odp_flow packet
4138 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy \
4139 "in_port(1),skb_priority(1),skb_mark(2)" "$pkt1to2"], [0], [stdout])
4140 AT_CHECK([tail -1 stdout], [0], [dnl
4143 AT_CHECK([head -n 2 stdout], [0], [dnl
4145 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
4148 # Test command: ofproto/trace br_name br_flow packet
4149 AT_CHECK([ovs-appctl ofproto/trace br0 \
4150 "in_port=2,skb_priority=2,pkt_mark=1" "$pkt2to1"], [0], [stdout],[stderr])
4151 AT_CHECK([tail -1 stdout], [0], [dnl
4154 AT_CHECK([head -n 2 stdout], [0], [dnl
4156 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
4162 # The second test tests the corner cases
4163 AT_SETUP([ofproto-dpif - ofproto/trace command 2])
4165 ADD_OF_PORTS([br0], 1, 2)
4168 odp_flow="in_port(1),eth(src=50:54:00:00:00:01,dst=50:54:00:00:00:02)"
4169 br_flow="in_port=1,dl_src=50:54:00:00:00:01,dl_dst=50:54:00:00:00:02"
4171 generate="-generate"
4172 pkt="50540000000250540000000108064500001C000100004001F98CC0A80001C0A800020800F7FF00000000"
4174 # Test incorrect command: ofproto/trace wrong_name odp_flow [-generate|packet]
4180 [AT_CHECK([ovs-appctl ofproto/trace wrong_name "$odp_flow" option],
4182 AT_CHECK([tail -2 stderr], [0], [dnl
4183 Cannot find the datapath
4184 ovs-appctl: ovs-vswitchd: server returned an error
4187 # Test incorrect command: ofproto/trace empty_string odp_flow [-generate|packet]
4193 [AT_CHECK([ovs-appctl ofproto/trace "" "$odp_flow" option],
4195 AT_CHECK([tail -2 stderr], [0], [dnl
4196 Cannot find the datapath
4197 ovs-appctl: ovs-vswitchd: server returned an error
4200 # Test incorrect command: ofproto/trace nonexist_dp_name odp_flow [-generate|packet]
4206 [AT_CHECK([ovs-appctl ofproto/trace ovs-system "$odp_flow" option],
4208 AT_CHECK([tail -2 stderr], [0], [dnl
4209 Cannot find the datapath
4210 ovs-appctl: ovs-vswitchd: server returned an error
4213 # Test incorrect command: ofproto/trace br_name odp_flow [-generate|packet]
4219 [AT_CHECK([ovs-appctl ofproto/trace br0 "$odp_flow" option],
4221 AT_CHECK([tail -2 stderr], [0], [dnl
4222 Cannot find the datapath
4223 ovs-appctl: ovs-vswitchd: server returned an error
4226 # Test incorrect command: ofproto/trace dp_name br_flow [-generate|packet]
4232 [AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$br_flow" option],
4234 AT_CHECK([tail -2 stderr], [0], [dnl
4236 ovs-appctl: ovs-vswitchd: server returned an error
4239 # Test incorrect command: ofproto/trace br_flow [-generate|packet]
4245 [AT_CHECK([ovs-appctl ofproto/trace "$br_flow" option],
4247 AT_CHECK([tail -2 stderr], [0], [dnl
4248 Must specify bridge name
4249 ovs-appctl: ovs-vswitchd: server returned an error
4252 # Test incorrect command: ofproto/trace dp_name odp_flow garbage_option
4253 AT_CHECK([ovs-appctl ofproto/trace \
4254 ovs-dummy "$odp_flow" garbage_option],
4255 [2], [stdout],[stderr])
4256 AT_CHECK([tail -2 stderr], [0], [dnl
4257 Trailing garbage in packet data
4258 ovs-appctl: ovs-vswitchd: server returned an error
4261 # Test incorrect command: ofproto/trace with 4 arguments
4262 AT_CHECK([ovs-appctl ofproto/trace \
4263 arg1, arg2, arg3, arg4], [2], [stdout],[stderr])
4264 AT_CHECK([tail -2 stderr], [0], [dnl
4265 "ofproto/trace" command takes at most 3 arguments
4266 ovs-appctl: ovs-vswitchd: server returned an error
4269 # Test incorrect command: ofproto/trace with 0 argument
4270 AT_CHECK([ovs-appctl ofproto/trace ], [2], [stdout],[stderr])
4271 AT_CHECK([tail -2 stderr], [0], [dnl
4272 "ofproto/trace" command requires at least 1 arguments
4273 ovs-appctl: ovs-vswitchd: server returned an error
4279 AT_SETUP([ofproto-dpif - ofproto/trace-packet-out])
4281 ADD_OF_PORTS([br0], 1, 2, 3)
4283 AT_DATA([flows.txt], [dnl
4284 in_port=1 actions=output:2
4285 in_port=2 actions=output:1
4287 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
4289 AT_CHECK([ovs-appctl ofproto/trace-packet-out br0 in_port=1 'mod_vlan_vid:123,resubmit(,0)'], [0], [stdout])
4290 AT_CHECK([tail -1 stdout], [0], [dnl
4291 Datapath actions: push_vlan(vid=123,pcp=0),2
4298 m4_define([OFPROTO_TRACE],
4300 AT_CHECK([ovs-appctl ofproto/trace $1 "$flow" $3], [0], [stdout])
4301 actual=`tail -1 stdout | sed 's/Datapath actions: //'`
4303 AT_CHECK([ovs-dpctl normalize-actions "$flow" "$expected" $5],
4306 AT_CHECK([ovs-dpctl normalize-actions "$flow" "$actual" $5],
4309 AT_SETUP([ofproto-dpif - MAC learning])
4310 OVS_VSWITCHD_START([set bridge br0 fail-mode=standalone])
4311 ADD_OF_PORTS([br0], 1, 2, 3)
4313 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)'
4315 # Trace an ARP packet arriving on p3, to create a MAC learning entry.
4318 [in_port(3),eth(src=50:54:00:00:00:05,dst=ff:ff:ff:ff:ff:ff),$arp],
4322 # Check for the MAC learning entry.
4323 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
4325 3 0 50:54:00:00:00:05 ?
4328 # Trace a packet arrival destined for the learned MAC.
4329 # (This will also learn a MAC.)
4332 [in_port(1),eth(src=50:54:00:00:00:06,dst=50:54:00:00:00:05),$arp],
4336 # Check for both MAC learning entries.
4337 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
4339 3 0 50:54:00:00:00:05 ?
4340 1 0 50:54:00:00:00:06 ?
4343 # Trace a packet arrival that updates the first learned MAC entry.
4346 [in_port(2),eth(src=50:54:00:00:00:05,dst=ff:ff:ff:ff:ff:ff),$arp],
4350 # Check that the MAC learning entry was updated.
4351 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
4353 1 0 50:54:00:00:00:06 ?
4354 2 0 50:54:00:00:00:05 ?
4357 # Add another bridge.
4361 -- set bridge br1 datapath-type=dummy])
4362 ADD_OF_PORTS([br1], 4, 5)
4364 # Trace some packet arrivals in br1 to create MAC learning entries there too.
4367 [in_port(4),eth(src=50:54:00:00:00:06,dst=ff:ff:ff:ff:ff:ff),$arp],
4372 [in_port(5),eth(src=50:54:00:00:00:07,dst=ff:ff:ff:ff:ff:ff),$arp],
4376 # Check that the MAC learning entries were added.
4377 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br1 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
4379 4 0 50:54:00:00:00:06 ?
4380 5 0 50:54:00:00:00:07 ?
4383 # Delete port p1 and see that its MAC learning entry disappeared, and
4384 # that the MAC learning entry for the same MAC was also deleted from br1.
4385 AT_CHECK([ovs-vsctl del-port p1])
4386 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
4388 2 0 50:54:00:00:00:05 ?
4390 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br1 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
4392 5 0 50:54:00:00:00:07 ?
4398 AT_SETUP([ofproto-dpif - MAC table overflow])
4400 [set bridge br0 fail-mode=standalone other-config:mac-table-size=10])
4401 ADD_OF_PORTS([br0], 1, 2, 3)
4403 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)'
4405 AT_CHECK([ovs-appctl time/stop])
4407 # Trace 10 ARP packets arriving on p3, to create MAC learning entries.
4408 for i in 0 1 2 3 4 5 6 7 8 9; do
4411 [in_port(3),eth(src=50:54:00:00:00:0$i,dst=ff:ff:ff:ff:ff:ff),$arp],
4414 ovs-appctl time/warp 1000
4417 # Check for the MAC learning entries.
4418 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/ *[[0-9]]\{1,\}$//' | sort],
4420 3 0 50:54:00:00:00:00
4421 3 0 50:54:00:00:00:01
4422 3 0 50:54:00:00:00:02
4423 3 0 50:54:00:00:00:03
4424 3 0 50:54:00:00:00:04
4425 3 0 50:54:00:00:00:05
4426 3 0 50:54:00:00:00:06
4427 3 0 50:54:00:00:00:07
4428 3 0 50:54:00:00:00:08
4429 3 0 50:54:00:00:00:09
4433 # Trace another ARP packet on another MAC.
4436 [in_port(3),eth(src=50:54:00:00:00:10,dst=ff:ff:ff:ff:ff:ff),$arp],
4440 # Check that the new one chased the oldest one out of the table.
4441 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/' | sort],
4443 3 0 50:54:00:00:00:01 ?
4444 3 0 50:54:00:00:00:02 ?
4445 3 0 50:54:00:00:00:03 ?
4446 3 0 50:54:00:00:00:04 ?
4447 3 0 50:54:00:00:00:05 ?
4448 3 0 50:54:00:00:00:06 ?
4449 3 0 50:54:00:00:00:07 ?
4450 3 0 50:54:00:00:00:08 ?
4451 3 0 50:54:00:00:00:09 ?
4452 3 0 50:54:00:00:00:10 ?
4458 # CHECK_SFLOW_SAMPLING_PACKET(LOOPBACK_ADDR, ADDR_WITHOUT_BRACKETS)
4460 # Test that sFlow samples packets correctly using IPv4/IPv6 sFlow collector
4462 # IP_VERSION_TYPE is used in AT_SETUP
4463 m4_define([CHECK_SFLOW_SAMPLING_PACKET],
4464 [AT_SETUP([ofproto-dpif - sFlow packet sampling - $2 collector])
4465 AT_XFAIL_IF([test "$IS_WIN32" = "yes"])
4466 OVS_VSWITCHD_START([set Bridge br0 fail-mode=standalone])
4468 ON_EXIT([kill `cat test-sflow.pid`])
4469 AT_CHECK([ovstest test-sflow --log-file --detach --no-chdir --pidfile 0:$1 > sflow.log], [0], [], [ignore])
4470 AT_CAPTURE_FILE([sflow.log])
4471 SFLOW_PORT=`parse_listening_port < test-sflow.log`
4472 ovs-appctl time/stop
4474 ADD_OF_PORTS([br0], 1, 2)
4476 set Interface br0 options:ifindex=1002 -- \
4477 set Interface p1 options:ifindex=1004 -- \
4478 set Interface p2 options:ifindex=1003 -- \
4479 set Bridge br0 sflow=@sf -- \
4480 --id=@sf create sflow targets=\"$1:$SFLOW_PORT\" \
4481 header=128 sampling=1 polling=1 agent=$LOOPBACK_INTERFACE
4483 dnl open with ARP packets to seed the bridge-learning. The output
4484 dnl ifIndex numbers should be reported predictably after that.
4485 dnl Since we set sampling=1 we should see all of these packets
4486 dnl reported. Sorting the output by data-source and seqNo makes
4487 dnl it deterministic. Ensuring that we send at least two packets
4488 dnl into each port means we get to check the seq nos are
4489 dnl incrementing correctly.
4490 dnl because packets from different ports can be handled by separate
4491 dnl threads, put some sleeps
4493 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)'
4495 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)'
4497 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)'
4499 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)'
4500 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)'
4502 dnl sleep long enough to get more than one counter sample
4503 dnl from each datasource so we can check sequence numbers
4504 ovs-appctl time/warp 3000 100
4506 ovs-appctl -t test-sflow exit
4508 AT_CHECK_UNQUOTED([[sort sflow.log | $EGREP 'HEADER|ERROR' | sed 's/ /\
4529 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
4549 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
4569 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
4589 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
4609 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
4612 AT_CHECK_UNQUOTED([[sort sflow.log | $EGREP 'IFCOUNTERS|ERROR|PORTNAME|OPENFLOWPORT' | head -18 | sed 's/ /\
4626 in_broadcasts=4294967295
4629 in_unknownprotos=4294967295
4632 out_multicasts=4294967295
4633 out_broadcasts=4294967295
4649 in_broadcasts=4294967295
4652 in_unknownprotos=4294967295
4655 out_multicasts=4294967295
4656 out_broadcasts=4294967295
4672 in_broadcasts=4294967295
4675 in_unknownprotos=4294967295
4678 out_multicasts=4294967295
4679 out_broadcasts=4294967295
4695 in_broadcasts=4294967295
4698 in_unknownprotos=4294967295
4701 out_multicasts=4294967295
4702 out_broadcasts=4294967295
4718 in_broadcasts=4294967295
4721 in_unknownprotos=4294967295
4724 out_multicasts=4294967295
4725 out_broadcasts=4294967295
4741 in_broadcasts=4294967295
4744 in_unknownprotos=4294967295
4747 out_multicasts=4294967295
4748 out_broadcasts=4294967295
4753 datapath_id=18364758544493064720
4756 datapath_id=18364758544493064720
4759 datapath_id=18364758544493064720
4762 datapath_id=18364758544493064720
4765 datapath_id=18364758544493064720
4768 datapath_id=18364758544493064720
4785 CHECK_SFLOW_SAMPLING_PACKET([127.0.0.1], [IPv4])
4786 CHECK_SFLOW_SAMPLING_PACKET([[[::1]]], [IPv6])
4788 dnl Test sFlow LAG structures
4789 AT_SETUP([ofproto-dpif - sFlow LACP structures])
4790 AT_SKIP_IF([test "$IS_WIN32" = "yes"])
4791 OVS_VSWITCHD_START([dnl
4792 add-bond br0 bond p1 p2 -- \
4793 set Port bond lacp=active bond-mode=active-backup \
4794 other_config:lacp-time="fast" \
4795 other_config:lacp-system-id=11:22:33:44:55:66 \
4796 other_config:lacp-system-priority=54321 -- \
4797 set Interface p1 type=dummy \
4798 other_config:lacp-port-id=11 \
4799 other_config:lacp-port-priority=111 \
4800 other_config:lacp-aggregation-key=3333 -- \
4801 set Interface p2 type=dummy \
4802 other_config:lacp-port-id=22 \
4803 other_config:lacp-port-priority=222 \
4804 other_config:lacp-aggregation-key=3333 ])
4806 ON_EXIT([kill `cat test-sflow.pid`])
4807 AT_CHECK([ovstest test-sflow --log-file --detach --no-chdir --pidfile 0:127.0.0.1 > sflow.log], [0], [], [ignore])
4808 AT_CAPTURE_FILE([sflow.log])
4809 SFLOW_PORT=`parse_listening_port < test-sflow.log`
4811 ovs-appctl time/stop
4814 set Interface p1 options:ifindex=1003 -- \
4815 set Bridge br0 sflow=@sf -- \
4816 --id=@sf create sflow targets=\"127.0.0.1:$SFLOW_PORT\" \
4817 header=128 sampling=1 polling=1
4819 dnl sleep long enough to get the sFlow datagram flushed out (may be delayed for up to 1 second)
4820 AT_CHECK([ovs-appctl time/warp 2000 100], [0], [ignore])
4821 AT_CHECK([ovs-appctl revalidator/purge], [0])
4823 ovs-appctl -t test-sflow exit
4824 AT_CHECK([[sort sflow.log | $EGREP 'LACPCOUNTERS|ERROR' | head -n 1 | sed 's/ /\
4827 sysID=11:22:33:44:55:66
4828 partnerID=00:00:00:00:00:00
4835 markerPDUsRx=4294967295
4836 markerRespPDUsRx=4294967295
4837 unknownRx=4294967295
4840 markerPDUsTx=4294967295
4841 markerRespPDUsTx=4294967295
4846 # CHECK_NETFLOW_EXPIRATION(LOOPBACK_ADDR, IP_VERSION_TYPE)
4848 # Test that basic NetFlow reports flow statistics correctly:
4849 # The initial packet of a flow are correctly accounted.
4850 # Later packets within a flow are correctly accounted.
4851 # Flow actions changing (in this case, due to MAC learning)
4852 # cause a record to be sent.
4854 # IP_VERSION_TYPE is used in AT_SETUP
4855 m4_define([CHECK_NETFLOW_EXPIRATION],
4856 [AT_SETUP([ofproto-dpif - NetFlow flow expiration - $2 collector])
4857 OVS_VSWITCHD_START([set Bridge br0 fail-mode=standalone])
4858 ADD_OF_PORTS([br0], 1, 2)
4860 ovs-appctl time/stop
4861 ON_EXIT([kill `cat test-netflow.pid`])
4862 AT_CHECK([ovstest test-netflow --log-file --detach --no-chdir --pidfile 0:$1 > netflow.log], [0], [], [ignore])
4863 AT_CAPTURE_FILE([netflow.log])
4864 NETFLOW_PORT=`parse_listening_port < test-netflow.log`
4867 set Bridge br0 netflow=@nf -- \
4868 --id=@nf create NetFlow targets=\"$1:$NETFLOW_PORT\" \
4869 engine_id=1 engine_type=2 active_timeout=30 add-id-to-interface=false
4871 for delay in 1000 30000; do
4872 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)'
4873 sleep 1 # ensure the order in which these two packets are processed
4874 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)'
4876 ovs-appctl time/warp $delay
4879 ovs-appctl time/warp 6000
4880 ovs-appctl revalidator/wait
4882 ovs-appctl -t test-netflow exit
4884 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])
4886 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])
4888 combined=`grep "192.168.0.2 > 192.168.0.1, if 2 > 1, 2 pkts, 120 bytes, ICMP 0:0" netflow.log | wc -l`
4889 separate=`grep "192.168.0.2 > 192.168.0.1, if 2 > 1, 1 pkts, 60 bytes, ICMP 0:0" netflow.log | wc -l`
4890 AT_CHECK([test $separate = 2 || test $combined = 1], [0])
4894 CHECK_NETFLOW_EXPIRATION([127.0.0.1], [IPv4])
4895 CHECK_NETFLOW_EXPIRATION([[[::1]]], [IPv6])
4897 # CHECK_NETFLOW_ACTIVE_EXPIRATION(LOOPBACK_ADDR, IP_VERSION_TYPE)
4899 # Test that basic NetFlow reports active expirations correctly.
4901 # IP_VERSION_TYPE is used in AT_SETUP
4902 m4_define([CHECK_NETFLOW_ACTIVE_EXPIRATION],
4903 [AT_SETUP([ofproto-dpif - NetFlow active expiration - $2 collector])
4905 OVS_VSWITCHD_START([set Bridge br0 fail-mode=standalone])
4906 ADD_OF_PORTS([br0], 1, 2)
4908 ON_EXIT([kill `cat test-netflow.pid`])
4909 AT_CHECK([ovstest test-netflow --log-file --detach --no-chdir --pidfile 0:$1 > netflow.log], [0], [], [ignore])
4910 AT_CAPTURE_FILE([netflow.log])
4911 NETFLOW_PORT=`parse_listening_port < test-netflow.log`
4914 set Bridge br0 netflow=@nf -- \
4915 --id=@nf create NetFlow targets=\"$1:$NETFLOW_PORT\" \
4916 engine_id=1 engine_type=2 active_timeout=10 add-id-to-interface=false
4918 AT_CHECK([ovs-appctl time/stop])
4920 while test $n -le 60; do
4923 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)'
4924 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)'
4926 ovs-appctl time/warp 1000
4929 ovs-appctl time/warp 10000
4931 ovs-appctl revalidator/wait
4933 ovs-appctl -t test-netflow exit
4935 # Count the number of reported packets:
4936 # - From source to destination before MAC learning kicks in (just one).
4937 # - From source to destination after that.
4938 # - From destination to source.
4946 pkts=`echo "$line" | sed 's/.*, \([[0-9]]*\) pkts,.*/\1/'`
4953 "seq "*": 192.168.0.1 > 192.168.0.2, if 1 > 65535, "*" pkts, "*" bytes, TCP 1234 > 80, time "*)
4956 "seq "*": 192.168.0.1 > 192.168.0.2, if 1 > 2, "*" pkts, "*" bytes, TCP 1234 > 80, time "*)
4959 "seq "*": 192.168.0.2 > 192.168.0.1, if 2 > 1, "*" pkts, "*" bytes, TCP 80 > 1234, time "*)
4966 eval $counter=\`expr \$$counter + \$pkts\`
4967 n_recs=`expr $n_recs + 1`
4970 # There should be exactly 1 MAC learning packet,
4971 # exactly 59 other packets in that direction,
4972 # and exactly 60 packets in the other direction.
4973 AT_CHECK([echo $n_learn $n_in $n_out $n_other], [0], [1 59 60 0
4978 CHECK_NETFLOW_ACTIVE_EXPIRATION([127.0.0.1], [IPv4])
4979 CHECK_NETFLOW_ACTIVE_EXPIRATION([[[::1]]], [IPv6])
4981 AT_SETUP([ofproto-dpif - flow stats])
4983 AT_CHECK([ovs-ofctl add-flow br0 "ip,actions=NORMAL"])
4984 AT_CHECK([ovs-ofctl add-flow br0 "icmp,actions=NORMAL"])
4986 ovs-appctl time/stop
4988 for i in `seq 1 10`; do
4989 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)'
4992 AT_CHECK([ovs-appctl time/warp 1000], [0], [ignore])
4993 AT_CHECK([ovs-appctl revalidator/purge], [0])
4994 AT_CHECK([ovs-ofctl dump-flows br0], [0], [stdout])
4995 AT_CHECK([STRIP_XIDS stdout | sed -n 's/duration=[[0-9]]*\.[[0-9]]*s/duration=0.0s/p' | sort], [0], [dnl
4996 cookie=0x0, duration=0.0s, table=0, n_packets=0, n_bytes=0, idle_age=1, icmp actions=NORMAL
4997 cookie=0x0, duration=0.0s, table=0, n_packets=10, n_bytes=600, idle_age=1, ip actions=NORMAL
5002 AT_SETUP([ofproto-dpif - flow stats, set-n-threads])
5004 AT_CHECK([ovs-ofctl add-flow br0 "ip,actions=NORMAL"])
5005 AT_CHECK([ovs-ofctl add-flow br0 "icmp,actions=NORMAL"])
5007 ovs-appctl time/stop
5009 for i in `seq 1 10`; do
5010 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)'
5013 ovs-appctl time/warp 100
5014 AT_CHECK([ovs-vsctl set Open_vSwitch . other-config:n-revalidator-threads=2])
5015 ovs-appctl time/warp 1000
5017 AT_CHECK([ovs-ofctl dump-flows br0], [0], [stdout])
5018 AT_CHECK([STRIP_XIDS stdout | sed -n 's/duration=[[0-9]]*\.[[0-9]]*s/duration=0.0s/p' | sort], [0], [dnl
5019 cookie=0x0, duration=0.0s, table=0, n_packets=0, n_bytes=0, idle_age=1, icmp actions=NORMAL
5020 cookie=0x0, duration=0.0s, table=0, n_packets=10, n_bytes=600, idle_age=1, ip actions=NORMAL
5025 AT_SETUP([idle_age and hard_age increase over time])
5028 # get_ages DURATION HARD IDLE
5030 # Fetch the flow duration, hard age, and idle age into the variables
5031 # whose names are given as arguments. Rounds DURATION down to the
5032 # nearest integer. If hard_age doesn't appear in the output, sets
5033 # HARD to "none". If idle_age doesn't appear in the output, sets IDLE
5036 AT_CHECK([ovs-ofctl dump-flows br0], [0], [stdout])
5038 duration=`sed -n 's/.*duration=\([[0-9]]*\)\(\.[[0-9]]*\)\{0,1\}s.*/\1/p' stdout`
5039 AT_CHECK([[expr X"$duration" : 'X[0-9][0-9]*$']], [0], [ignore])
5040 AS_VAR_COPY([$1], [duration])
5042 hard=`sed -n 's/.*hard_age=\([[0-9]]*\),.*/\1/p' stdout`
5043 if test X"$hard" = X; then
5046 AT_CHECK([[expr X"$hard" : 'X[0-9][0-9]*$']], [0], [ignore])
5048 AS_VAR_COPY([$2], [hard])
5050 idle=`sed -n 's/.*idle_age=\([[0-9]]*\),.*/\1/p' stdout`
5051 if test X"$idle" = X; then
5054 AT_CHECK([[expr X"$idle" : 'X[0-9][0-9]*$']], [0], [ignore])
5056 AS_VAR_COPY([$3], [idle])
5059 # Add a flow and get its initial hard and idle age.
5060 AT_CHECK([ovs-ofctl add-flow br0 hard_timeout=199,idle_timeout=188,actions=drop])
5061 get_ages duration1 hard1 idle1
5063 ovs-appctl time/stop
5064 # Warp time forward by 10 seconds, then modify the flow's actions.
5065 ovs-appctl time/warp 10000
5066 get_ages duration2 hard2 idle2
5067 AT_CHECK([ovs-ofctl mod-flows br0 actions=flood])
5069 # Warp time forward by 10 seconds.
5070 ovs-appctl time/warp 10000
5071 get_ages duration3 hard3 idle3
5073 # Warp time forward 10 more seconds, then pass some packets through the flow,
5074 # then warp forward a few more times because idle times are only updated
5076 ovs-appctl time/warp 10000
5077 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)'
5078 ovs-appctl time/warp 3000 1000
5080 get_ages duration4 hard4 idle4
5082 printf "duration: %4s => %4s => %4s => %4s\n" $duration1 $duration2 $duration3 $duration4
5083 printf "hard_age: %4s => %4s => %4s => %4s\n" $hard1 $hard2 $hard3 $hard4
5084 printf "idle_age: %4s => %4s => %4s => %4s\n" $idle1 $idle2 $idle3 $idle4
5086 # Duration should increase steadily over time.
5087 AT_CHECK([test $duration1 -lt $duration2])
5088 AT_CHECK([test $duration2 -lt $duration3])
5089 AT_CHECK([test $duration3 -lt $duration4])
5091 # Hard age should be "none" initially because it's the same as flow_duration,
5092 # then it should increase.
5093 AT_CHECK([test $hard1 = none])
5094 AT_CHECK([test $hard2 = none])
5095 AT_CHECK([test $hard3 != none])
5096 AT_CHECK([test $hard4 != none])
5097 AT_CHECK([test $hard3 -lt $hard4])
5099 # Idle age should increase from 1 to 2 to 3, then decrease.
5100 AT_CHECK([test $idle1 -lt $idle2])
5101 AT_CHECK([test $idle2 -lt $idle3])
5102 AT_CHECK([test $idle3 -gt $idle4])
5104 # Check some invariant relationships.
5105 AT_CHECK([test $duration1 = $idle1])
5106 AT_CHECK([test $duration2 = $idle2])
5107 AT_CHECK([test $duration3 = $idle3])
5108 AT_CHECK([test $idle3 -gt $hard3])
5109 AT_CHECK([test $idle4 -lt $hard4])
5110 AT_CHECK([test $hard4 -lt $duration4])
5115 AT_SETUP([ofproto-dpif - fin_timeout])
5117 ovs-appctl time/stop
5118 AT_CHECK([ovs-ofctl add-flow br0 'idle_timeout=60,actions=fin_timeout(idle_timeout=5)'])
5119 AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip], [0],
5121 idle_timeout=60, actions=fin_timeout(idle_timeout=5)
5124 # Check that a TCP SYN packet does not change the timeout. (Because
5125 # flow stats updates are mainly what implements the fin_timeout
5126 # feature, we warp forward a couple of times to ensure that flow stats
5127 # run before re-checking the flow table.)
5128 AT_CHECK([ovs-appctl netdev-dummy/receive br0 0021853763af0026b98cb0f908004500003c2e2440004006465dac11370dac11370b828b0016751e267b00000000a00216d017360000020405b40402080a2d25085f0000000001030307])
5129 AT_CHECK([ovs-appctl time/warp 1000 && ovs-appctl time/warp 1000], [0], [warped
5132 AT_CHECK([ovs-appctl revalidator/purge], [0])
5133 AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip], [0],
5135 n_packets=1, n_bytes=74, idle_timeout=60, actions=fin_timeout(idle_timeout=5)
5137 # Check that a TCP FIN packet does change the timeout.
5138 AT_CHECK([ovs-appctl netdev-dummy/receive br0 0021853763af0026b98cb0f90800451000342e3e40004006463bac11370dac11370b828b0016751e319dfc96399b801100717ae800000101080a2d250a9408579588])
5139 AT_CHECK([ovs-appctl time/warp 1000 && ovs-appctl time/warp 1000], [0], [warped
5142 AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip], [0],
5144 n_packets=2, n_bytes=140, idle_timeout=5, actions=fin_timeout(idle_timeout=5)
5149 AT_SETUP([ofproto-dpif - ovs-appctl dpif/dump-dps])
5150 OVS_VSWITCHD_START([add-br br1 -- set bridge br1 datapath-type=dummy])
5151 ADD_OF_PORTS([br0], [1], [2])
5152 ADD_OF_PORTS([br1], [3])
5154 AT_CHECK([ovs-appctl dpif/dump-dps], [0], [dnl
5161 AT_SETUP([ofproto-dpif - ovs-appctl dpif/show])
5162 OVS_VSWITCHD_START([add-br br1 -- set bridge br1 datapath-type=dummy])
5163 ADD_OF_PORTS([br0], [1], [2])
5164 ADD_OF_PORTS([br1], [3])
5166 AT_CHECK([ovs-appctl dpif/show], [0], [dnl
5167 dummy@ovs-dummy: hit:0 missed:0
5169 br0 65534/100: (dummy)
5173 br1 65534/101: (dummy)
5179 AT_SETUP([ofproto-dpif - ovs-appctl dpif/dump-flows])
5180 # bump max-idle to avoid the flows being reclaimed behind us
5181 OVS_VSWITCHD_START([add-br br1 -- \
5182 set bridge br1 datapath-type=dummy fail-mode=secure -- \
5183 set Open_vSwitch . other_config:max-idle=10000])
5184 ADD_OF_PORTS([br0], [1], [2])
5185 ADD_OF_PORTS([br1], [3])
5187 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)'])
5188 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)'])
5189 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)'])
5190 ovs-appctl revalidator/wait
5191 AT_CHECK([ovs-appctl dpif/dump-flows br0 | STRIP_UFID | STRIP_USED | sort], [0], [dnl
5192 recirc_id(0),in_port(1),eth_type(0x0800),ipv4(frag=no), packets:0, bytes:0, used:never, actions:drop
5193 recirc_id(0),in_port(2),eth_type(0x0800),ipv4(frag=no), packets:0, bytes:0, used:never, actions:drop
5196 AT_CHECK([ovs-appctl dpif/dump-flows br1 | STRIP_UFID | STRIP_USED | sort], [0], [dnl
5197 recirc_id(0),in_port(3),eth_type(0x0800),ipv4(frag=no), packets:0, bytes:0, used:never, actions:drop
5200 AT_CHECK([ovs-appctl dpif/dump-flows -m br0 | STRIP_UFID | STRIP_USED | sort], [0], [dnl
5201 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
5202 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
5205 AT_CHECK([ovs-appctl dpif/dump-flows -m br1 | STRIP_UFID | STRIP_USED | sort], [0], [dnl
5206 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
5212 AT_SETUP([ofproto-dpif - ovs-appctl dpif/get-flow])
5214 OVS_VSWITCHD_START([add-br br1 -- \
5215 set bridge br1 datapath-type=dummy fail-mode=secure -- \
5216 set Open_vSwitch . other_config:max-idle=10000])
5217 ADD_OF_PORTS([br0], [1], [2])
5219 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)'])
5220 ovs-appctl revalidator/wait
5221 AT_CHECK([ovs-appctl dpif/dump-flows -m br0], [0], [stdout])
5223 UFID=`sed -n 's/\(ufid:[[0-9a-fA-F]]*\).*/\1/p' stdout`
5224 AT_CHECK([ovs-appctl dpctl/get-flow $UFID], [0], [dnl
5225 recirc_id(0),in_port(1),eth_type(0x0800),ipv4(frag=no), packets:0, bytes:0, used:never, actions:drop
5231 AT_SETUP([ofproto-dpif - MPLS actions that result in a userspace action])
5232 OVS_VSWITCHD_START([dnl
5233 add-port br0 p1 -- set Interface p1 type=dummy
5235 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5236 ON_EXIT([kill `cat ovs-ofctl.pid`])
5238 AT_CAPTURE_FILE([ofctl_monitor.log])
5239 AT_DATA([flows.txt], [dnl
5240 dl_src=60:66:66:66:66:00 actions=push_mpls:0x8847,controller
5241 dl_src=60:66:66:66:66:01 actions=pop_mpls:0x8849,controller
5243 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5245 dnl Packet is sent to userspace because a MPLS push or pop action is applied to
5246 dnl a packet with 2 MPLS LSEs but dpif-netdev can't handle any labels.
5248 dnl The input is a frame with two MPLS labels which tcpdump -vve shows as:
5249 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)
5250 dnl (label 20, exp 0, [S], ttl 32)
5251 dnl (tos 0x0, ttl 64, id 0, offset 0, flags [none], proto TCP (6), length 44, bad cksum 3b78 (->f978)!)
5252 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
5254 for dl_src in 00 01; do
5255 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"])
5257 sleep 1 # wait for the datapath flow installed
5258 AT_CHECK_UNQUOTED([cat ovs-vswitchd.log | STRIP_UFID | FILTER_FLOW_INSTALL | STRIP_USED], [0], [dnl
5259 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))
5260 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))
5267 AT_SETUP([ofproto-dpif - MPLS actions that result in a drop])
5268 OVS_VSWITCHD_START([dnl
5269 add-port br0 p1 -- set Interface p1 type=dummy
5271 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5272 ON_EXIT([kill `cat ovs-ofctl.pid`])
5274 AT_CAPTURE_FILE([ofctl_monitor.log])
5275 AT_DATA([flows.txt], [dnl
5276 dl_src=60:66:66:66:66:00 actions=push_mpls:0x8847,controller
5277 dl_src=60:66:66:66:66:01 actions=pop_mpls:0x8849,controller
5279 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5281 dnl Packet is dropped because an MPLS PUSH action is applied to a packet with
5282 dnl 4 MPLS LSEs but ovs-vswtichd can only handle up to 3 MPLS LSEs and thus
5283 dnl can't determine the resulting MPLS label after MPLS push/pop actions.
5285 dnl The input is a frame with two MPLS headers which tcpdump -vve shows as:
5286 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)
5287 dnl (label 20, exp 0, ttl 32)
5288 dnl (label 20, exp 0, ttl 32)
5289 dnl (label 20, exp 0, [S], ttl 32)
5290 dnl (tos 0x0, ttl 64, id 0, offset 0, flags [none], proto TCP (6), length 44, bad cksum 3b78 (->f978)!)
5291 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
5293 for dl_src in 00 01; do
5294 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"])
5296 sleep 1 # wait for the datapath flow installed
5297 AT_CHECK_UNQUOTED([cat ovs-vswitchd.log | STRIP_UFID | FILTER_FLOW_INSTALL | STRIP_USED], [0], [dnl
5298 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))
5299 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))
5305 AT_SETUP([ofproto-dpif - patch ports])
5306 OVS_VSWITCHD_START([add-br br1 \
5307 -- set bridge br1 datapath-type=dummy fail-mode=secure \
5308 -- add-port br1 pbr1 -- set int pbr1 type=patch options:peer=pbr0 \
5309 -- add-port br0 pbr0 -- set int pbr0 type=patch options:peer=pbr1])
5311 ADD_OF_PORTS([br0], [2])
5312 ADD_OF_PORTS([br1], [3])
5314 AT_CHECK([ovs-appctl upcall/disable-ufid], [0], [Datapath dumping tersely using UFID disabled
5316 AT_CHECK([ovs-appctl time/stop])
5317 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5319 AT_CHECK([ovs-ofctl add-flow br0 actions=LOCAL,output:1,output:2])
5320 AT_CHECK([ovs-ofctl add-flow br1 actions=LOCAL,output:1,output:3])
5322 for i in $(seq 1 10); do
5323 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)'
5324 if [[ $i -eq 1 ]]; then
5329 for i in $(seq 1 5); do
5330 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)'
5331 if [[ $i -eq 1 ]]; then
5336 AT_CHECK([ovs-appctl time/warp 500], [0],
5339 sleep 1 # wait for log writer
5341 AT_CHECK([ovs-appctl dpif/show], [0], [dnl
5342 dummy@ovs-dummy: hit:13 missed:2
5344 br0 65534/100: (dummy)
5346 pbr0 1/none: (patch: peer=pbr1)
5348 br1 65534/101: (dummy)
5350 pbr1 1/none: (patch: peer=pbr0)
5353 AT_CHECK([cat ovs-vswitchd.log | STRIP_UFID | FILTER_FLOW_INSTALL | STRIP_USED], [0], [dnl
5354 recirc_id=0,ip,in_port=100,nw_frag=no, actions:101,3,2
5355 recirc_id=0,ip,in_port=101,nw_frag=no, actions:100,2,3
5358 AT_CHECK([cat ovs-vswitchd.log | grep -e 'in_port(100).*packets:9' | STRIP_UFID | FILTER_FLOW_DUMP], [0], [dnl
5359 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
5361 AT_CHECK([cat ovs-vswitchd.log | grep -e 'in_port(101).*packets:4' | STRIP_UFID | FILTER_FLOW_DUMP], [0], [dnl
5362 skb_priority(0/0),skb_mark(0/0),recirc_id(0),dp_hash(0/0),in_port(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
5365 AT_CHECK([ovs-ofctl dump-ports br0 pbr0], [0], [dnl
5366 OFPST_PORT reply (xid=0x4): 1 ports
5367 port 1: rx pkts=5, bytes=300, drop=0, errs=0, frame=0, over=0, crc=0
5368 tx pkts=10, bytes=600, drop=0, errs=0, coll=0
5371 AT_CHECK([ovs-ofctl dump-ports br1 pbr1], [0], [dnl
5372 OFPST_PORT reply (xid=0x4): 1 ports
5373 port 1: rx pkts=10, bytes=600, drop=0, errs=0, frame=0, over=0, crc=0
5374 tx pkts=5, bytes=300, drop=0, errs=0, coll=0
5380 AT_SETUP([ofproto-dpif - port duration])
5381 OVS_VSWITCHD_START([set Bridge br0 protocols=OpenFlow13])
5382 ADD_OF_PORTS([br0], 1, 2)
5384 ovs-appctl time/stop
5385 ovs-appctl time/warp 10000
5387 AT_CHECK([ovs-ofctl -O openflow13 dump-ports br0], [0], [stdout])
5388 AT_CHECK([sed -n 's/=[[0-9]][[0-9]]\(\.[[0-9]][[0-9]]*\)\{0,1\}s/=?s/p' stdout], [0],
5397 dnl ----------------------------------------------------------------------
5398 AT_BANNER([ofproto-dpif -- megaflows])
5400 AT_SETUP([ofproto-dpif megaflow - port classification])
5402 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5403 ADD_OF_PORTS([br0], [1], [2])
5404 AT_DATA([flows.txt], [dnl
5405 table=0 in_port=1 actions=output(2)
5407 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5408 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)'])
5410 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)'])
5412 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5413 recirc_id=0,ip,in_port=1,nw_frag=no, actions: <del>
5418 AT_SETUP([ofproto-dpif megaflow - L2 classification])
5420 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5421 ADD_OF_PORTS([br0], [1], [2])
5422 AT_DATA([flows.txt], [dnl
5423 table=0 in_port=1,dl_src=50:54:00:00:00:09 actions=output(2)
5425 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5426 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)'])
5427 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)'])
5429 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5430 recirc_id=0,ip,in_port=1,dl_src=50:54:00:00:00:09,nw_frag=no, actions: <del>
5431 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>
5436 AT_SETUP([ofproto-dpif megaflow - L3 classification])
5438 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5439 ADD_OF_PORTS([br0], [1], [2])
5440 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], [])
5441 AT_DATA([flows.txt], [dnl
5442 table=0 in_port=1,icmp,nw_src=10.0.0.4 actions=output(2)
5444 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5445 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)'])
5446 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)'])
5448 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5449 recirc_id=0,icmp,in_port=1,nw_src=10.0.0.4,nw_frag=no, actions: <del>
5450 recirc_id=0,ip,in_port=1,nw_src=10.0.0.2/0.0.0.2,nw_frag=no, actions: <del>
5455 AT_SETUP([ofproto-dpif megaflow - IPv6 classification])
5457 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5458 ADD_OF_PORTS([br0], [1], [2])
5459 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], [])
5460 AT_DATA([flows.txt], [dnl
5461 table=0 in_port=1,ipv6,ipv6_src=2001:db8:3c4d:1:2:3:4:5 actions=output(2)
5463 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5464 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)'])
5465 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)'])
5467 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5468 recirc_id=0,ipv6,in_port=1,ipv6_src=2001:db8:3c4d:1:2:3:4:5,nw_frag=no, actions: <del>
5469 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>
5474 AT_SETUP([ofproto-dpif megaflow - L4 classification])
5476 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5477 ADD_OF_PORTS([br0], [1], [2])
5478 AT_DATA([flows.txt], [dnl
5479 table=0 in_port=1,icmp,icmp_type=8 actions=output(2)
5481 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5482 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)'])
5484 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)'])
5486 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5487 recirc_id=0,icmp,in_port=1,nw_frag=no,icmp_type=0x8/0xff, actions: <del>
5492 AT_SETUP([ofproto-dpif megaflow - normal])
5494 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5495 ADD_OF_PORTS([br0], [1], [2])
5496 AT_CHECK([ovs-ofctl add-flow br0 action=normal])
5497 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)'])
5498 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)'])
5500 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5501 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>
5502 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>
5507 AT_SETUP([ofproto-dpif megaflow - mpls])
5509 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5510 ADD_OF_PORTS([br0], [1], [2])
5511 AT_DATA([flows.txt], [dnl
5512 table=0 dl_src=50:54:00:00:00:09 actions=push_mpls:0x8847,2
5513 table=0 dl_src=50:54:00:00:00:0b actions=pop_mpls:0x0800,2
5515 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5516 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)'])
5517 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)'])
5519 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5520 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>
5521 recirc_id=0,mpls,in_port=1,dl_src=50:54:00:00:00:0b,mpls_bos=1, actions: <del>
5526 # CHECK_MEGAFLOW_NETFLOW(LOOPBACK_ADDR, IP_VERSION_TYPE)
5528 # IP_VERSION_TYPE is used in AT_SETUP
5529 m4_define([CHECK_MEGAFLOW_NETFLOW],
5530 [AT_SETUP([ofproto-dpif megaflow - netflow - $2 collector])
5532 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5533 ADD_OF_PORTS([br0], [1], [2])
5535 dnl NetFlow configuration disables wildcarding relevant fields
5536 ON_EXIT([kill `cat test-netflow.pid`])
5537 AT_CHECK([ovstest test-netflow --log-file --detach --no-chdir --pidfile 0:$1 > netflow.log], [0], [], [ignore])
5538 AT_CAPTURE_FILE([netflow.log])
5539 NETFLOW_PORT=`parse_listening_port < test-netflow.log`
5541 set Bridge br0 netflow=@nf -- \
5542 --id=@nf create NetFlow targets=\"$1:$NETFLOW_PORT\" \
5543 engine_id=1 engine_type=2 active_timeout=30 add-id-to-interface=false
5545 AT_CHECK([ovs-ofctl add-flow br0 action=normal])
5546 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)'])
5547 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)'])
5549 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5550 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>
5551 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>
5556 CHECK_MEGAFLOW_NETFLOW([127.0.0.1], [IPv4])
5557 CHECK_MEGAFLOW_NETFLOW([[[::1]]], [IPv6])
5559 AT_SETUP([ofproto-dpif megaflow - normal, active-backup bonding])
5561 [add-port br0 p1 -- set Interface p1 type=dummy ofport_request=1 -- \
5562 add-bond br0 bond0 p2 p3 bond_mode=active-backup -- \
5563 set interface p2 type=dummy ofport_request=2 -- \
5564 set interface p3 type=dummy ofport_request=3])
5565 AT_CHECK([ovs-appctl netdev-dummy/set-admin-state up], 0, [OK
5567 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5569 AT_CHECK([ovs-ofctl add-flow br0 action=normal])
5570 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)'])
5571 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)'])
5573 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5574 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>
5575 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>
5580 AT_SETUP([ofproto-dpif megaflow - normal, balance-slb bonding])
5582 [add-port br0 p1 -- set Interface p1 type=dummy ofport_request=1 -- \
5583 add-bond br0 bond0 p2 p3 bond_mode=balance-slb -- \
5584 set interface p2 type=dummy ofport_request=2 -- \
5585 set interface p3 type=dummy ofport_request=3])
5586 AT_CHECK([ovs-appctl netdev-dummy/set-admin-state up], 0, [OK
5588 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5590 AT_CHECK([ovs-ofctl add-flow br0 action=normal])
5591 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)'])
5592 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)'])
5594 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5595 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>
5596 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>
5601 AT_SETUP([ofproto-dpif megaflow - normal, balance-tcp bonding])
5602 # Create bond0 on br0 with interfaces p0 and p1
5603 # and bond1 on br1 with interfaces p2 and p3
5604 # with p0 patched to p2 and p1 patched to p3.
5606 [add-bond br0 bond0 p0 p1 bond_mode=balance-tcp lacp=active \
5607 other-config:lacp-time=fast \
5608 other-config:bond-rebalance-interval=0 -- \
5609 set interface p0 type=patch options:peer=p2 ofport_request=1 -- \
5610 set interface p1 type=patch options:peer=p3 ofport_request=2 -- \
5612 set bridge br1 other-config:hwaddr=aa:66:aa:66:00:00 -- \
5613 set bridge br1 datapath-type=dummy other-config:datapath-id=1234 \
5614 fail-mode=secure -- \
5615 add-bond br1 bond1 p2 p3 bond_mode=balance-tcp lacp=active \
5616 other-config:lacp-time=fast \
5617 other-config:bond-rebalance-interval=0 -- \
5618 set interface p2 type=patch options:peer=p0 ofport_request=3 -- \
5619 set interface p3 type=patch options:peer=p1 ofport_request=4 --])
5621 AT_CHECK([ovs-appctl netdev-dummy/set-admin-state up], 0, [OK
5623 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5624 ADD_OF_PORTS([br0], [7])
5625 AT_CHECK([ovs-ofctl add-flow br0 action=normal])
5626 AT_CHECK([ovs-ofctl add-flow br1 action=normal])
5627 ovs-appctl time/stop
5628 ovs-appctl time/warp 5000
5629 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)'])
5630 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)'])
5632 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5633 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>
5634 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>
5639 AT_SETUP([ofproto-dpif megaflow - resubmit port action])
5641 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5642 ADD_OF_PORTS([br0], [1], [2])
5643 AT_DATA([flows.txt], [dnl
5644 table=0 in_port=1,ip actions=resubmit(90)
5645 table=0 in_port=90,dl_src=50:54:00:00:00:09 actions=output(2)
5647 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5648 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)'])
5649 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)'])
5651 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5652 recirc_id=0,ip,in_port=1,dl_src=50:54:00:00:00:09,nw_frag=no, actions: <del>
5653 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>
5658 AT_SETUP([ofproto-dpif megaflow - resubmit table action])
5660 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5661 ADD_OF_PORTS([br0], [1], [2])
5662 AT_DATA([flows.txt], [dnl
5663 table=0 in_port=1,ip actions=resubmit(,1)
5664 table=1 dl_src=50:54:00:00:00:09 actions=output(2)
5666 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5667 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)'])
5668 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=
5669 1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
5671 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5672 recirc_id=0,ip,in_port=1,dl_src=50:54:00:00:00:09,nw_frag=no, actions: <del>
5673 recirc_id=0,ip,in_port=1,dl_src=50:54:00:00:00:0b,nw_frag=no, actions: <del>
5678 AT_SETUP([ofproto-dpif megaflow - goto_table action])
5680 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5681 ADD_OF_PORTS([br0], [1], [2])
5682 AT_DATA([flows.txt], [dnl
5683 table=0 in_port=1,ip actions=goto_table(1)
5684 table=1 dl_src=50:54:00:00:00:09 actions=output(2)
5686 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flows br0 flows.txt])
5687 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)'])
5688 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)'])
5690 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5691 recirc_id=0,ip,in_port=1,dl_src=50:54:00:00:00:09,nw_frag=no, actions: <del>
5692 recirc_id=0,ip,in_port=1,dl_src=50:54:00:00:00:0b,nw_frag=no, actions: <del>
5697 AT_SETUP([ofproto-dpif megaflow - mirroring, select_all])
5699 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5700 ADD_OF_PORTS([br0], [1], [2], [3])
5702 set Bridge br0 mirrors=@m --\
5703 --id=@p3 get Port p3 --\
5704 --id=@m create Mirror name=mymirror select_all=true output_port=@p3
5706 AT_DATA([flows.txt], [dnl
5707 in_port=1 actions=output:2
5709 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5710 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)'])
5712 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)'])
5714 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5715 recirc_id=0,ip,in_port=1,nw_frag=no, actions: <del>
5720 AT_SETUP([ofproto-dpif megaflow - mirroring, select_vlan])
5722 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5723 ADD_OF_PORTS([br0], [1], [2], [3])
5725 set Bridge br0 mirrors=@m --\
5726 --id=@p2 get Port p2 -- --id=@p3 get Port p3 --\
5727 --id=@m create Mirror name=mymirror select_all=true select_vlan=11 output_port=@p3
5729 AT_DATA([flows.txt], [dnl
5730 in_port=1 actions=output:2
5732 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5733 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))'])
5734 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)'])
5736 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5737 recirc_id=0,ip,in_port=1,dl_vlan=11,nw_frag=no, actions: <del>
5738 recirc_id=0,ip,in_port=1,vlan_tci=0x0000/0x1fff,nw_frag=no, actions: <del>
5743 AT_SETUP([ofproto-dpif megaflow - move action])
5745 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5746 ADD_OF_PORTS([br0], [1], [2])
5747 AT_DATA([flows.txt], [dnl
5748 table=0 in_port=1 ip,actions=move:NXM_OF_IP_SRC[[]]->NXM_NX_REG0[[]],resubmit(90)
5749 table=0 in_port=90 ip,actions=move:NXM_NX_REG0[[]]->NXM_NX_REG1[[]],resubmit(91)
5750 table=0 in_port=91 reg0=0x0a000002,actions=output(2)
5752 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5753 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)'])
5754 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)'])
5756 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5757 recirc_id=0,ip,in_port=1,nw_src=10.0.0.2,nw_frag=no, actions: <del>
5758 recirc_id=0,ip,in_port=1,nw_src=10.0.0.4,nw_frag=no, actions: <del>
5763 AT_SETUP([ofproto-dpif megaflow - push action])
5765 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5766 ADD_OF_PORTS([br0], [1], [2])
5767 AT_DATA([flows.txt], [dnl
5768 table=0 in_port=1 ip,actions=push:NXM_OF_IP_SRC[[]],output(2)
5770 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5771 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)'])
5772 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)'])
5774 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5775 recirc_id=0,ip,in_port=1,nw_src=10.0.0.2,nw_frag=no, actions: <del>
5776 recirc_id=0,ip,in_port=1,nw_src=10.0.0.4,nw_frag=no, actions: <del>
5781 AT_SETUP([ofproto-dpif megaflow - learning])
5783 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5784 ADD_OF_PORTS([br0], [1], [2])
5785 AT_DATA([flows.txt], [dnl
5786 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
5788 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5789 ovs-appctl time/stop
5790 # We send each packet twice because the first packet in each flow causes the
5791 # flow table to change and thus revalidations, which (depending on timing)
5792 # can keep a megaflow from being installed. The revalidations are done by
5793 # the second iteration, allowing the flows to be installed.
5795 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)'])
5796 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)'])
5797 ovs-appctl time/warp 100
5800 dnl The original flow is missing due to a revalidation.
5801 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5802 recirc_id=0,ip,in_port=1,vlan_tci=0x0000/0x0fff,dl_src=50:54:00:00:00:09,nw_frag=no, actions: <del>
5803 recirc_id=0,ip,in_port=1,vlan_tci=0x0000/0x0fff,dl_src=50:54:00:00:00:0b,nw_frag=no, actions: <del>
5808 AT_SETUP([ofproto-dpif megaflow - tunnels])
5810 [add-port br0 p1 -- set Interface p1 type=dummy ofport_request=1])
5811 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5812 AT_CHECK([ovs-vsctl add-port br0 p2 -- set Interface p2 type=gre \
5813 options:remote_ip=1.1.1.1 ofport_request=2 options:key=flow])
5814 AT_CHECK([ovs-vsctl add-port br0 p3 -- set Interface p3 type=dummy \
5816 AT_CHECK([ovs-vsctl add-port br0 p4 -- set Interface p4 type=gre \
5817 options:remote_ip=1.1.1.2 options:tos=inherit options:ttl=inherit \
5818 ofport_request=4 options:key=flow])
5819 AT_DATA([flows.txt], [dnl
5820 in_port=1,actions=output(2)
5821 in_port=3,actions=output(4)
5823 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5824 dnl ECN bits are always copied out, but don't use 0x3 (CE), since that
5825 dnl will cause the packet to be dropped.
5826 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)'])
5828 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)'])
5829 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)'])
5831 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)'])
5833 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5834 recirc_id=0,ip,in_port=1,nw_ecn=1,nw_frag=no, actions: <del>
5835 recirc_id=0,ip,in_port=3,nw_tos=0,nw_ecn=1,nw_ttl=64,nw_frag=no, actions: <del>
5836 recirc_id=0,ip,in_port=3,nw_tos=252,nw_ecn=1,nw_ttl=128,nw_frag=no, actions: <del>
5841 AT_SETUP([ofproto-dpif megaflow - dec_ttl])
5843 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5844 ADD_OF_PORTS([br0], [1], [2])
5845 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], [])
5846 AT_DATA([flows.txt], [dnl
5847 table=0 in_port=1,icmp,nw_src=10.0.0.4 actions=dec_ttl,output(2)
5849 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5850 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)'])
5851 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)'])
5853 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5854 recirc_id=0,icmp,in_port=1,nw_src=10.0.0.4,nw_ttl=64,nw_frag=no, actions: <del>
5855 recirc_id=0,ip,in_port=1,nw_src=10.0.0.2/0.0.0.2,nw_frag=no, actions: <del>
5860 AT_SETUP([ofproto-dpif megaflow - set dl_dst])
5862 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5863 ADD_OF_PORTS([br0], [1], [2])
5864 AT_DATA([flows.txt], [dnl
5865 table=0 in_port=1 actions=mod_dl_dst(50:54:00:00:00:0a),output(2)
5867 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5868 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)'])
5869 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)'])
5871 dnl The first packet is essentially a no-op, as the new destination MAC is the
5872 dnl same as the original. The second entry actually updates the destination
5874 AT_CHECK([cat ovs-vswitchd.log | STRIP_UFID | FILTER_FLOW_INSTALL | STRIP_USED], [0], [dnl
5875 recirc_id=0,ip,in_port=1,dl_dst=50:54:00:00:00:0a,nw_frag=no, actions:2
5876 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
5881 AT_SETUP([ofproto-dpif megaflow - disabled])
5883 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5884 ADD_OF_PORTS([br0], [1], [2])
5885 AT_DATA([flows.txt], [dnl
5886 table=0 in_port=1,ip,nw_dst=10.0.0.1 actions=output(2)
5887 table=0 in_port=1,ip,nw_dst=10.0.0.3 actions=drop
5889 AT_CHECK([ovs-appctl upcall/disable-megaflows], [0], [megaflows disabled
5891 AT_CHECK([ovs-appctl upcall/disable-ufid], [0], [Datapath dumping tersely using UFID disabled
5893 AT_CHECK([ovs-appctl vlog/set dpif_netdev:dbg], [0], [], [])
5894 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5895 for i in 1 2 3 4; do
5896 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)'])
5897 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)'])
5898 if [[ $i -eq 1 ]]; then
5903 AT_CHECK([cat ovs-vswitchd.log | STRIP_UFID | FILTER_FLOW_INSTALL | STRIP_USED], [0], [dnl
5904 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
5905 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
5907 AT_CHECK([cat ovs-vswitchd.log | STRIP_UFID | FILTER_FLOW_DUMP | grep 'packets:3'], [0], [dnl
5908 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
5909 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
5914 AT_SETUP([ofproto-dpif - datapath port number change])
5915 OVS_VSWITCHD_START([set Bridge br0 fail-mode=standalone])
5916 ADD_OF_PORTS([br0], 1)
5918 # Trace a flow that should output to p1.
5919 AT_CHECK([ovs-appctl ofproto/trace br0 in_port=LOCAL,dl_src=10:20:30:40:50:60],
5921 AT_CHECK([tail -1 stdout], [0], [Datapath actions: 1
5924 # Change p1's port number to 5.
5925 AT_CHECK([ovs-appctl dpif-dummy/change-port-number ovs-dummy p1 5])
5927 # Trace a flow that should output to p1 in its new location.
5928 AT_CHECK([ovs-appctl ofproto/trace br0 in_port=LOCAL,dl_src=10:20:30:40:50:60],
5930 AT_CHECK([tail -1 stdout], [0], [Datapath actions: 5
5935 # Tests the bundling with various bfd and cfm configurations.
5936 AT_SETUP([ofproto - bundle with variable bfd/cfm config])
5937 OVS_VSWITCHD_START([add-br br1 -- set bridge br1 datapath-type=dummy -- \
5938 add-bond br0 br0bond p0 p2 bond-mode=active-backup -- \
5939 add-bond br1 br1bond p1 p3 bond-mode=active-backup -- \
5940 set Interface p1 type=patch options:peer=p0 ofport_request=2 -- \
5941 set Interface p3 type=patch options:peer=p2 ofport_request=4 -- \
5942 set Interface p0 type=patch options:peer=p1 ofport_request=1 -- \
5943 set Interface p2 type=patch options:peer=p3 ofport_request=3 -- \
5944 set Interface p0 bfd:enable=true bfd:min_tx=300 bfd:min_rx=300 -- \
5945 set Interface p0 cfm_mpid=1 -- \
5946 set Interface p1 bfd:enable=true bfd:min_tx=500 bfd:min_rx=500])
5948 ovs-appctl time/stop
5949 # advance the clock to stablize everything.
5950 ovs-appctl time/warp 5000 100
5951 # cfm/show should show 'recv' fault.
5952 AT_CHECK([ovs-appctl cfm/show | sed -n '/^.*fault:.*/p'], [0], [dnl
5955 # bfd/show should show 'up'.
5956 AT_CHECK([ovs-appctl bfd/show | sed -n '/^.*Session State:.*/p'], [0], [dnl
5957 Local Session State: up
5958 Remote Session State: up
5959 Local Session State: up
5960 Remote Session State: up
5962 # bond/show should show 'may-enable: true' for all slaves.
5963 AT_CHECK([ovs-appctl bond/show | sed -n '/^.*may_enable:.*/p'], [0], [dnl
5970 # now disable the bfd on p1.
5971 AT_CHECK([ovs-vsctl set Interface p1 bfd:enable=false])
5972 # advance the clock to stablize everything.
5973 ovs-appctl time/warp 5000 100
5974 # cfm/show should show 'recv' fault.
5975 AT_CHECK([ovs-appctl cfm/show | sed -n '/^.*fault:.*/p'], [0], [dnl
5978 # bfd/show should show 'down'.
5979 AT_CHECK([ovs-appctl bfd/show | sed -n '/^.*Session State:.*/p'], [0], [dnl
5980 Local Session State: down
5981 Remote Session State: down
5983 # bond/show should show 'may-enable: false' for p0.
5984 AT_CHECK([ovs-appctl bond/show br0bond | sed -n '/^.*may_enable:.*/p'], [0], [dnl
5989 # now enable the bfd on p1 and disable bfd on p0.
5990 AT_CHECK([ovs-vsctl set Interface p1 bfd:enable=true])
5991 AT_CHECK([ovs-vsctl set Interface p0 bfd:enable=false])
5992 # advance the clock to stablize everything.
5993 ovs-appctl time/warp 5000 100
5994 # cfm/show should show 'recv' fault.
5995 AT_CHECK([ovs-appctl cfm/show | sed -n '/^.*fault:.*/p'], [0], [dnl
5998 # bfd/show should show 'down'.
5999 AT_CHECK([ovs-appctl bfd/show | sed -n '/^.*Session State:.*/p'], [0], [dnl
6000 Local Session State: down
6001 Remote Session State: down
6003 # bond/show should show 'may-enable: false' for p0 and p1.
6004 AT_CHECK([ovs-appctl bond/show | sed -n '/^.*may_enable:.*/p'], [0], [dnl
6014 AT_SETUP([ofproto-dpif - ofproto-dpif-monitor 1])
6015 OVS_VSWITCHD_START([add-port br0 p0 -- set interface p0 type=gre options:remote_ip=1.2.3.4])
6018 AT_CHECK([ovs-vsctl set interface p0 bfd:enable=true])
6020 OVS_WAIT_UNTIL([grep "monitor thread created" ovs-vswitchd.log])
6021 # disable bfd on p0.
6022 AT_CHECK([ovs-vsctl set interface p0 bfd:enable=false])
6024 OVS_WAIT_UNTIL([grep "monitor thread terminated" ovs-vswitchd.log])
6025 AT_CHECK([cat ovs-vswitchd.log | sed -e '/^.*ofproto_dpif_monitor.*$/d' > ovs-vswitchd.log])
6028 AT_CHECK([ovs-vsctl set interface p0 cfm_mpid=10])
6030 OVS_WAIT_UNTIL([grep "monitor thread created" ovs-vswitchd.log])
6031 # disable cfm on p0.
6032 AT_CHECK([ovs-vsctl remove interface p0 cfm_mpid 10])
6034 OVS_WAIT_UNTIL([grep "monitor thread terminated" ovs-vswitchd.log])
6035 AT_CHECK([cat ovs-vswitchd.log | sed -e '/^.*ofproto_dpif_monitor.*$/d' > ovs-vswitchd.log])
6037 # enable both bfd and cfm on p0.
6038 AT_CHECK([ovs-vsctl set interface p0 bfd:enable=true cfm_mpid=10])
6040 OVS_WAIT_UNTIL([grep "monitor thread created" ovs-vswitchd.log])
6041 # disable bfd on p0.
6042 AT_CHECK([ovs-vsctl set interface p0 bfd:enable=false])
6043 # check log, there should not be the log of thread terminated.
6044 AT_CHECK([sed -n "s/^.*|ofproto_dpif_monitor(monitor[[0-9]]*)|INFO|\(.* terminated\)$/\1/p" ovs-vswitchd.log], [0], [dnl
6046 # reenable bfd on p0.
6047 AT_CHECK([ovs-vsctl set interface p0 bfd:enable=true])
6048 # check log, should still be on log of thread created.
6049 AT_CHECK([sed -n "s/^.*|ofproto_dpif_monitor(monitor[[0-9]]*)|INFO|\(.* created\)$/\1/p" ovs-vswitchd.log], [0], [dnl
6050 monitor thread created
6052 # disable bfd and cfm together.
6053 AT_CHECK([ovs-vsctl set interface p0 bfd:enable=false -- remove interface p0 cfm_mpid 10])
6055 OVS_WAIT_UNTIL([grep "monitor thread terminated" ovs-vswitchd.log])
6060 # this test helps avoid the deadlock between the main thread and monitor thread.
6061 AT_SETUP([ofproto-dpif - ofproto-dpif-monitor 2])
6064 for i in `seq 1 199`
6066 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])
6072 AT_BANNER([ofproto-dpif - flow translation resource limits])
6074 AT_SETUP([ofproto-dpif - infinite resubmit])
6076 AT_CHECK([ovs-ofctl add-flow br0 actions=resubmit:1,resubmit:2,output:3])
6077 AT_CHECK([ovs-appctl -vpoll_loop:off ofproto/trace br0 'eth_dst=ff:ff:ff:ff:ff:ff'],
6079 AT_CHECK([tail -1 stdout], [0], [Datapath actions: drop
6081 AT_CHECK([grep -c 'resubmit actions recursed over 64 times' ovs-vswitchd.log],
6084 OVS_VSWITCHD_STOP(["/resubmit actions recursed/d"])
6087 AT_SETUP([ofproto-dpif - exponential resubmit chain])
6089 ADD_OF_PORTS([br0], 1)
6090 (for i in `seq 1 64`; do
6092 echo "in_port=$i, actions=resubmit:$j, resubmit:$j, local"
6094 echo "in_port=65, actions=local") > flows
6095 AT_CHECK([ovs-ofctl add-flows br0 flows])
6096 AT_CHECK([ovs-appctl -vpoll_loop:off ofproto/trace br0 'in_port=1'], [0], [stdout])
6097 AT_CHECK([grep -c 'over 4096 resubmit actions' ovs-vswitchd.log], [0], [1
6099 OVS_VSWITCHD_STOP(["/over.*resubmit actions/d"])
6102 AT_SETUP([ofproto-dpif - too many output actions])
6104 ADD_OF_PORTS([br0], 1)
6105 (for i in `seq 1 12`; do
6107 echo "in_port=$i, actions=resubmit:$j, resubmit:$j, local"
6109 echo "in_port=13, actions=local,local,local,local,local,local,local,local") > flows
6110 AT_CHECK([ovs-ofctl add-flows br0 flows])
6111 AT_CHECK([ovs-appctl -vpoll_loop:off ofproto/trace br0 'in_port=1'], [0], [stdout])
6112 AT_CHECK([grep -c -e '- Uses action(s) not supported by datapath' stdout],
6115 AT_CHECK([grep -c 'resubmits yielded over 64 kB of actions' ovs-vswitchd.log], [0], [1
6117 OVS_VSWITCHD_STOP(["/resubmits yielded over 64 kB of actions/d"])
6120 AT_SETUP([ofproto-dpif - stack too deep])
6122 ADD_OF_PORTS([br0], 1)
6123 (for i in `seq 1 12`; do
6125 echo "in_port=$i, actions=resubmit:$j, resubmit:$j, local"
6127 push="push:NXM_NX_REG0[[]]"
6128 echo "in_port=13, actions=$push,$push,$push,$push,$push,$push,$push,$push") > flows
6129 AT_CHECK([ovs-ofctl add-flows br0 flows])
6130 AT_CHECK([ovs-appctl -vpoll_loop:off ofproto/trace br0 'in_port=1'], [0], [stdout])
6131 AT_CHECK([grep -c 'resubmits yielded over 64 kB of stack' ovs-vswitchd.log], [0], [1
6133 OVS_VSWITCHD_STOP(["/resubmits yielded over 64 kB of stack/d"])
6137 AT_SETUP([ofproto-dpif packet-out controller])
6139 ADD_OF_PORTS([br0], 1, 2)
6141 AT_CHECK([ovs-ofctl add-flow br0 'dl_dst=50:54:00:00:00:0a actions=controller'])
6143 AT_CAPTURE_FILE([ofctl_monitor.log])
6144 AT_CHECK([ovs-ofctl monitor br0 65534 invalid_ttl --detach --no-chdir --pidfile 2> ofctl_monitor.log])
6147 AT_CHECK([ovs-ofctl -O OpenFlow13 packet-out br0 CONTROLLER controller '50540000000a5054000000091234'])
6150 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
6151 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
6152 NXT_PACKET_IN (xid=0x0): total_len=14 in_port=CONTROLLER (via action) data_len=14 (unbuffered)
6153 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
6155 NXT_PACKET_IN (xid=0x0): total_len=14 in_port=CONTROLLER (via action) data_len=14 (unbuffered)
6156 in_port=0,vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,dl_type=0x1234
6158 NXT_PACKET_IN (xid=0x0): total_len=14 in_port=CONTROLLER (via action) data_len=14 (unbuffered)
6159 in_port=0,vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,dl_type=0x1234
6162 AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
6163 dl_dst=50:54:00:00:00:0a actions=CONTROLLER:65535
6167 (echo "OFPST_TABLE reply (OF1.3) (xid=0x2):
6169 active=1, lookup=0, matched=0"
6171 while test $x -lt 254; do
6174 active=0, lookup=0, matched=0"
6177 AT_CHECK([ovs-ofctl -O OpenFlow13 dump-tables br0 ], [0], [expout])
6182 AT_SETUP([ofproto-dpif packet-out controller (patch port)])
6185 add-port br0 p1 -- \
6186 set interface p1 type=patch options:peer=p2 -- \
6188 set bridge br1 datapath-type=dummy -- \
6189 set bridge br1 fail-mode=secure -- \
6190 set bridge br1 protocols='[OpenFlow10,OpenFlow11,OpenFlow12,OpenFlow13]' -- \
6191 add-port br1 p2 -- \
6192 set interface p2 type=patch options:peer=p1 --])
6194 AT_CAPTURE_FILE([ofctl_monitor.log])
6195 AT_CHECK([ovs-ofctl monitor br1 65534 invalid_ttl --detach --no-chdir --pidfile 2> ofctl_monitor.log])
6198 AT_CHECK([ovs-ofctl -O OpenFlow13 packet-out br0 CONTROLLER output:1 '50540000000a5054000000091234'])
6201 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
6202 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
6203 NXT_PACKET_IN (xid=0x0): cookie=0x0 total_len=14 in_port=1 (via no_match) data_len=14 (unbuffered)
6204 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
6206 NXT_PACKET_IN (xid=0x0): cookie=0x0 total_len=14 in_port=1 (via no_match) data_len=14 (unbuffered)
6207 in_port=0,vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,dl_type=0x1234
6209 NXT_PACKET_IN (xid=0x0): cookie=0x0 total_len=14 in_port=1 (via no_match) data_len=14 (unbuffered)
6210 in_port=0,vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,dl_type=0x1234
6213 (printf "OFPST_TABLE reply (OF1.3) (xid=0x2):"
6215 while test $x -lt 254; do
6218 active=0, lookup=0, matched=0"
6221 AT_CHECK([ovs-ofctl -O OpenFlow13 dump-tables br0 ], [0], [expout])
6223 (echo "OFPST_TABLE reply (OF1.3) (xid=0x2):
6225 active=0, lookup=3, matched=0"
6227 while test $x -lt 254; do
6230 active=0, lookup=0, matched=0"
6233 AT_CHECK([ovs-ofctl -O OpenFlow13 dump-tables br1 ], [0], [expout])
6239 AT_SETUP([ofproto-dpif packet-out goto_table])
6241 ADD_OF_PORTS([br0], 1, 2)
6243 AT_DATA([flows.txt], [dnl
6244 table=0 dl_dst=50:54:00:00:00:0a actions=goto_table(1)
6245 table=1 dl_dst=50:54:00:00:00:0a actions=controller
6247 AT_CHECK([ovs-ofctl -O OpenFlow13 add-flows br0 flows.txt])
6249 AT_CAPTURE_FILE([ofctl_monitor.log])
6250 AT_CHECK([ovs-ofctl monitor br0 65534 invalid_ttl --detach --no-chdir --pidfile 2> ofctl_monitor.log])
6253 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)'
6256 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
6257 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
6258 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
6259 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
6260 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
6262 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
6263 in_port=0,vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,dl_type=0x1234
6265 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
6266 in_port=0,vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,dl_type=0x1234
6269 AT_CHECK([ovs-appctl revalidator/purge], [0])
6270 AT_CHECK([ovs-ofctl -O OpenFlow13 dump-flows br0 | ofctl_strip | sort], [0], [dnl
6271 n_packets=3, n_bytes=180, dl_dst=50:54:00:00:00:0a actions=goto_table:1
6272 table=1, n_packets=3, n_bytes=180, dl_dst=50:54:00:00:00:0a actions=CONTROLLER:65535
6273 OFPST_FLOW reply (OF1.3):
6276 (echo "OFPST_TABLE reply (OF1.3) (xid=0x2):
6278 active=1, lookup=3, matched=3
6281 active=1, lookup=3, matched=3"
6283 while test $x -lt 254; do
6286 active=0, lookup=0, matched=0"
6289 AT_CHECK([ovs-ofctl -O OpenFlow13 dump-tables br0 ], [0], [expout])
6295 AT_SETUP([ofproto-dpif packet-out table-miss (continue)])
6297 ADD_OF_PORTS([br0], 1, 2)
6299 AT_CHECK([ovs-ofctl -O OpenFlow11 add-flow br0 'table=1 dl_dst=50:54:00:00:00:0a actions=controller'])
6300 AT_CHECK([ovs-ofctl -O OpenFlow11 mod-table br0 all continue])
6302 AT_CAPTURE_FILE([ofctl_monitor.log])
6303 AT_CHECK([ovs-ofctl monitor br0 65534 invalid_ttl --detach --no-chdir --pidfile 2> ofctl_monitor.log])
6306 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)'
6309 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
6310 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
6311 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
6312 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
6313 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
6315 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
6316 in_port=0,vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,dl_type=0x1234
6318 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
6319 in_port=0,vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,dl_type=0x1234
6322 AT_CHECK([ovs-appctl revalidator/purge], [0])
6323 AT_CHECK([ovs-ofctl -O OpenFlow11 dump-flows br0 | ofctl_strip | sort], [0], [dnl
6324 table=1, n_packets=3, n_bytes=180, dl_dst=50:54:00:00:00:0a actions=CONTROLLER:65535
6325 OFPST_FLOW reply (OF1.1):
6328 (echo "OFPST_TABLE reply (OF1.3) (xid=0x2):
6330 active=0, lookup=3, matched=0
6333 active=1, lookup=3, matched=3"
6335 while test $x -lt 254; do
6338 active=0, lookup=0, matched=0"
6341 AT_CHECK([ovs-ofctl -O OpenFlow13 dump-tables br0 ], [0], [expout])
6346 AT_SETUP([ofproto-dpif - ICMPv6])
6348 ADD_OF_PORTS([br0], 1)
6350 AT_CAPTURE_FILE([ofctl_monitor.log])
6352 AT_CHECK([ovs-ofctl monitor br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
6354 ovs-appctl netdev-dummy/receive p1 '0060970769ea0000860580da86dd6000000000203afffe80000000000000020086fffe0580dafe80000000000000026097fffe0769ea870068bd00000000fe80000000000000026097fffe0769ea01010000860580da'
6356 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
6358 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
6359 NXT_PACKET_IN (xid=0x0): cookie=0x0 total_len=86 in_port=1 (via no_match) data_len=86 (unbuffered)
6360 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