1 AT_BANNER([ofproto-dpif])
3 AT_SETUP([ofproto-dpif - revalidator/wait])
5 AT_CHECK([ovs-appctl revalidator/wait])
9 AT_SETUP([ofproto-dpif, active-backup bonding])
10 # Create br0 with interfaces p1, p2 and p7, creating bond0 with p1 and p2
11 # and br1 with interfaces p3, p4 and p8.
12 # toggle p1,p2 of bond0 up and down to test bonding in active-backup mode.
14 [add-bond br0 bond0 p1 p2 bond_mode=active-backup --\
15 set interface p1 type=dummy options:pstream=punix:$OVS_RUNDIR/p1.sock ofport_request=1 -- \
16 set interface p2 type=dummy options:pstream=punix:$OVS_RUNDIR/p2.sock ofport_request=2 -- \
17 add-port br0 p7 -- set interface p7 ofport_request=7 type=dummy -- \
19 set bridge br1 other-config:hwaddr=aa:66:aa:66:00:00 -- \
20 set bridge br1 datapath-type=dummy other-config:datapath-id=1234 \
22 add-port br1 p3 -- set interface p3 type=dummy options:stream=unix:$OVS_RUNDIR/p1.sock ofport_request=3 -- \
23 add-port br1 p4 -- set interface p4 type=dummy options:stream=unix:$OVS_RUNDIR/p2.sock ofport_request=4 -- \
24 add-port br1 p8 -- set interface p8 ofport_request=8 type=dummy --])
25 WAIT_FOR_DUMMY_PORTS([p3], [p4])
26 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
28 AT_CHECK([ovs-ofctl add-flow br0 action=normal])
29 AT_CHECK([ovs-ofctl add-flow br1 action=normal])
30 ovs-appctl netdev-dummy/set-admin-state up
31 ovs-appctl time/warp 100
32 ovs-appctl netdev-dummy/set-admin-state p2 down
34 ovs-appctl time/warp 100
35 AT_CHECK([ovs-appctl netdev-dummy/receive p7 'in_port(7),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
36 AT_CHECK([ovs-appctl netdev-dummy/receive p7 'in_port(7),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.3,dst=10.0.0.4,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
37 ovs-appctl time/warp 100
38 ovs-appctl netdev-dummy/set-admin-state p2 up
39 ovs-appctl netdev-dummy/set-admin-state p1 down
40 ovs-appctl time/warp 100
41 AT_CHECK([ovs-appctl netdev-dummy/receive p7 'in_port(7),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0d),eth_type(0x0800),ipv4(src=10.0.0.5,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
42 AT_CHECK([ovs-appctl netdev-dummy/receive p7 'in_port(7),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0e),eth_type(0x0800),ipv4(src=10.0.0.6,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
43 ovs-appctl time/warp 200 100
45 AT_CHECK([cat ovs-vswitchd.log | grep 'in_port=[[348]]' | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
46 recirc_id=0,ip,in_port=3,vlan_tci=0x0000/0x1fff,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,nw_frag=no, actions: <del>
47 recirc_id=0,ip,in_port=3,vlan_tci=0x0000/0x1fff,dl_src=50:54:00:00:00:0b,dl_dst=50:54:00:00:00:0c,nw_frag=no, actions: <del>
48 recirc_id=0,ip,in_port=4,vlan_tci=0x0000/0x1fff,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0d,nw_frag=no, actions: <del>
49 recirc_id=0,ip,in_port=4,vlan_tci=0x0000/0x1fff,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0e,nw_frag=no, actions: <del>
50 recirc_id=0,rarp,in_port=4,vlan_tci=0x0000/0x1fff,dl_src=50:54:00:00:00:09,dl_dst=ff:ff:ff:ff:ff:ff, actions: <del>
51 recirc_id=0,rarp,in_port=4,vlan_tci=0x0000/0x1fff,dl_src=50:54:00:00:00:0b,dl_dst=ff:ff:ff:ff:ff:ff, actions: <del>
56 AT_SETUP([ofproto-dpif, balance-slb bonding])
57 # Create br0 with interfaces bond0(p1, p2, p3) and p7,
58 # and br1 with interfaces p4, p5, p6 and p8.
59 # p1 <-> p4, p2 <-> p5, p3 <-> p6
60 # Send some traffic, make sure the traffic are spread based on source mac.
62 [add-bond br0 bond0 p1 p2 p3 bond_mode=balance-slb --\
63 set interface p1 type=dummy options:pstream=punix:$OVS_RUNDIR/p1.sock ofport_request=1 -- \
64 set interface p2 type=dummy options:pstream=punix:$OVS_RUNDIR/p2.sock ofport_request=2 -- \
65 set interface p3 type=dummy options:pstream=punix:$OVS_RUNDIR/p3.sock ofport_request=3 -- \
66 add-port br0 p7 -- set interface p7 ofport_request=7 type=dummy -- \
68 set bridge br1 other-config:hwaddr=aa:66:aa:66:00:00 -- \
69 set bridge br1 datapath-type=dummy other-config:datapath-id=1234 \
71 add-port br1 p4 -- set interface p4 type=dummy options:stream=unix:$OVS_RUNDIR/p1.sock ofport_request=4 -- \
72 add-port br1 p5 -- set interface p5 type=dummy options:stream=unix:$OVS_RUNDIR/p2.sock ofport_request=5 -- \
73 add-port br1 p6 -- set interface p6 type=dummy options:stream=unix:$OVS_RUNDIR/p3.sock ofport_request=6 -- \
74 add-port br1 p8 -- set interface p8 ofport_request=8 type=dummy --])
75 WAIT_FOR_DUMMY_PORTS([p4], [p5], [p6])
76 AT_CHECK([ovs-ofctl add-flow br0 action=normal])
77 AT_CHECK([ovs-ofctl add-flow br1 action=normal])
78 AT_CHECK([ovs-appctl netdev-dummy/set-admin-state up], 0, [OK
81 ovs-appctl time/warp 100
83 for i in `seq 0 100 |xargs printf '%02x\n'`;
85 pkt="in_port(7),eth(src=50:54:00:00:00:$i,dst=50:54:00:00:01:00),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)"
86 AT_CHECK([ovs-appctl netdev-dummy/receive p7 $pkt])
89 ovs-appctl time/warp 100
90 AT_CHECK([ovs-appctl dpif/dump-flows br1 > br1_flows.txt])
91 # Make sure there is resonable distribution to all three ports.
92 # We don't want to make this check precise, in case hash function changes.
93 AT_CHECK([test `egrep 'in_port\(4\)' br1_flows.txt |wc -l` -gt 3])
94 AT_CHECK([test `egrep 'in_port\(5\)' br1_flows.txt |wc -l` -gt 3])
95 AT_CHECK([test `egrep 'in_port\(6\)' br1_flows.txt |wc -l` -gt 3])
99 AT_SETUP([ofproto-dpif, balance-tcp bonding])
100 # Create br0 with interfaces bond0(p1, p2, p3) and p7,
101 # and br1 with interfaces bond1(p4, p5, p6) and p8.
103 # Send some traffic, make sure the traffic are spread based on L4 headers.
105 [add-bond br0 bond0 p1 p2 p3 bond_mode=balance-tcp lacp=active \
106 other-config:lacp-time=fast other-config:bond-rebalance-interval=0 --\
107 set interface p1 type=dummy options:pstream=punix:$OVS_RUNDIR/p1.sock ofport_request=1 -- \
108 set interface p2 type=dummy options:pstream=punix:$OVS_RUNDIR/p2.sock ofport_request=2 -- \
109 set interface p3 type=dummy options:pstream=punix:$OVS_RUNDIR/p3.sock ofport_request=3 -- \
110 add-port br0 p7 -- set interface p7 ofport_request=7 type=dummy -- \
112 set bridge br1 other-config:hwaddr=aa:66:aa:66:00:00 -- \
113 set bridge br1 datapath-type=dummy other-config:datapath-id=1234 \
114 fail-mode=secure -- \
115 add-bond br1 bond1 p4 p5 p6 bond_mode=balance-tcp lacp=active \
116 other-config:lacp-time=fast other-config:bond-rebalance-interval=0 --\
117 set interface p4 type=dummy options:stream=unix:$OVS_RUNDIR/p1.sock ofport_request=4 -- \
118 set interface p5 type=dummy options:stream=unix:$OVS_RUNDIR/p2.sock ofport_request=5 -- \
119 set interface p6 type=dummy options:stream=unix:$OVS_RUNDIR/p3.sock ofport_request=6 -- \
120 add-port br1 p8 -- set interface p8 ofport_request=8 type=dummy --])
121 AT_CHECK([ovs-appctl netdev-dummy/set-admin-state up], 0, [OK
123 AT_CHECK([ovs-ofctl add-flow br0 action=normal])
124 AT_CHECK([ovs-ofctl add-flow br1 action=normal])
125 AT_CHECK([ovs-appctl upcall/disable-megaflows], [0], [megaflows disabled
127 OVS_WAIT_WHILE([ovs-appctl bond/show | grep "may_enable: false"])
129 ovs-appctl time/warp 100
130 ovs-appctl lacp/show > lacp.txt
131 ovs-appctl bond/show > bond.txt
133 for i in `seq 0 255` ;
135 pkt="in_port(7),eth(src=50:54:00:00:00:05,dst=50:54:00:00:01:00),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=$i),tcp_flags(ack)"
136 AT_CHECK([ovs-appctl netdev-dummy/receive p7 $pkt])
139 ovs-appctl time/warp 300 100
140 AT_CHECK([ovs-appctl dpif/dump-flows br0 |grep tcp > br0_flows.txt])
141 AT_CHECK([ovs-appctl dpif/dump-flows br1 |grep tcp > br1_flows.txt])
142 # Make sure there is resonable distribution to all three ports.
143 # We don't want to make this check precise, in case hash function changes.
144 AT_CHECK([test `grep in_port.4 br1_flows.txt |wc -l` -gt 24])
145 AT_CHECK([test `grep in_port.5 br1_flows.txt |wc -l` -gt 24])
146 AT_CHECK([test `grep in_port.6 br1_flows.txt |wc -l` -gt 24])
151 # Makes sure recirculation does not change the way packet is handled.
152 AT_SETUP([ofproto-dpif, balance-tcp bonding, different recirc flow ])
154 [add-bond br0 bond0 p1 p2 bond_mode=balance-tcp lacp=active \
155 other-config:lacp-time=fast other-config:bond-rebalance-interval=0 -- \
156 set interface p1 type=dummy options:pstream=punix:$OVS_RUNDIR/p1.sock ofport_request=1 -- \
157 set interface p2 type=dummy options:pstream=punix:$OVS_RUNDIR/p2.sock ofport_request=2 -- \
159 set bridge br1 other-config:hwaddr=aa:66:aa:66:00:00 -- \
160 set bridge br1 datapath-type=dummy other-config:datapath-id=1234 \
161 fail-mode=standalone -- \
162 add-bond br1 bond1 p3 p4 bond_mode=balance-tcp lacp=active \
163 other-config:lacp-time=fast other-config:bond-rebalance-interval=0 -- \
164 set interface p3 type=dummy options:stream=unix:$OVS_RUNDIR/p1.sock ofport_request=3 -- \
165 set interface p4 type=dummy options:stream=unix:$OVS_RUNDIR/p2.sock ofport_request=4 -- \
166 add-port br1 br1- -- set interface br1- type=patch options:peer=br1+ ofport_request=100 -- \
168 set bridge br-int other-config:hwaddr=aa:77:aa:77:00:00 -- \
169 set bridge br-int datapath-type=dummy other-config:datapath-id=1235 \
170 fail-mode=secure -- \
171 add-port br-int br1+ -- set interface br1+ type=patch options:peer=br1- ofport_request=101 -- \
172 add-port br-int p5 -- set interface p5 ofport_request=5 type=dummy
174 AT_CHECK([ovs-appctl netdev-dummy/set-admin-state up], 0, [OK
177 # Waits for all ifaces enabled.
178 OVS_WAIT_UNTIL([test `ovs-appctl bond/show | grep -- "may_enable: true" | wc -l` -ge 4])
180 # The dl_vlan flow should not be ever matched,
181 # since recirculation should not change the flow handling.
182 AT_DATA([flows.txt], [dnl
183 table=0 priority=1 in_port=5 actions=mod_vlan_vid:1,output(101)
184 table=0 priority=2 in_port=5 dl_vlan=1 actions=drop
186 AT_CHECK([ovs-ofctl add-flows br-int flows.txt])
188 # Sends a packet to trigger recirculation.
189 # Should generate recirc_id(0x12d),dp_hash(0xc1261ba2/0xff).
190 AT_CHECK([ovs-appctl netdev-dummy/receive p5 "in_port(5),eth(src=50:54:00:00:00:05,dst=50:54:00:00:01:00),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1)"])
192 # Collects flow stats.
193 AT_CHECK([ovs-appctl revalidator/purge], [0])
195 # Checks the flow stats in br1, should only be one flow with non-zero
196 # 'n_packets' from internal table.
197 AT_CHECK([ovs-appctl bridge/dump-flows br1 | ofctl_strip | grep -- "n_packets" | grep -- "table_id" | sed -e 's/output:[[0-9]][[0-9]]*/output/'], [0], [dnl
198 table_id=254, n_packets=1, n_bytes=64, priority=20,recirc_id=0x12d,dp_hash=0xa2/0xff,actions=output
201 # Checks the flow stats in br-int, should be only one match.
202 AT_CHECK([ovs-ofctl dump-flows br-int | ofctl_strip | sort], [0], [dnl
203 n_packets=1, n_bytes=60, priority=1,in_port=5 actions=mod_vlan_vid:1,output:101
204 priority=2,in_port=5,dl_vlan=1 actions=drop
211 AT_SETUP([ofproto-dpif - resubmit])
213 ADD_OF_PORTS([br0], [1], [10], [11], [12], [13], [14], [15],
214 [16], [17], [18], [19], [20], [21])
215 AT_DATA([flows.txt], [dnl
216 table=0 in_port=1 priority=1000 icmp actions=output(10),resubmit(2),output(19),resubmit(3),output(21)
217 table=0 in_port=2 priority=1500 icmp actions=output(11),resubmit(,1),output(16),resubmit(2,1),output(18)
218 table=0 in_port=3 priority=2000 icmp actions=output(20)
219 table=1 in_port=1 priority=1000 icmp actions=output(12),resubmit(4,1),output(13),resubmit(3),output(15)
220 table=1 in_port=2 priority=1500 icmp actions=output(17),resubmit(,2)
221 table=1 in_port=3 priority=1500 icmp actions=output(14),resubmit(,2)
223 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
224 AT_CHECK([ovs-appctl ofproto/trace br0 'in_port=1,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,dl_type=0x0800,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_proto=1,nw_tos=0,nw_ttl=128,icmp_type=8,icmp_code=0'], [0], [stdout])
225 AT_CHECK([tail -1 stdout], [0],
226 [Datapath actions: 10,11,12,13,14,15,16,17,18,19,20,21
231 AT_SETUP([ofproto-dpif - goto table])
233 ADD_OF_PORTS([br0], [1], [10], [11])
234 echo "table=0 in_port=1 actions=output(10),goto_table(1)" > flows.txt
235 for i in `seq 1 63`; do echo "table=$i actions=goto_table($(($i+1)))"; done >> flows.txt
236 echo "table=64 actions=output(11)" >> flows.txt
237 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flows br0 flows.txt])
238 AT_CHECK([ovs-appctl ofproto/trace br0 'in_port=1,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,dl_type=0x0800,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_proto=1,nw_tos=0,nw_ttl=128,icmp_type=8,icmp_code=0'], [0], [stdout])
239 AT_CHECK([tail -1 stdout], [0],
240 [Datapath actions: 10,11
245 AT_SETUP([ofproto-dpif - write actions])
247 ADD_OF_PORTS([br0], [1], [10], [11], [12], [13])
248 AT_DATA([flows.txt], [dnl
249 table=0 in_port=1,ip actions=output(10),write_actions(set_field:192.168.3.90->ip_src,output(12)),goto_table(1)
250 table=1 ip actions=write_actions(output(13)),goto_table(2)
251 table=2 ip actions=set_field:192.168.3.91->ip_src,output(11)
253 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flows br0 flows.txt])
254 AT_CHECK([ovs-appctl ofproto/trace br0 'in_port=1,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,dl_type=0x0800,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_proto=1,nw_tos=0,nw_ttl=128,icmp_type=8,icmp_code=0'], [0], [stdout])
255 AT_CHECK([tail -2 stdout], [0],
256 [Megaflow: recirc_id=0,ip,in_port=1,nw_src=192.168.0.1,nw_frag=no
257 Datapath actions: 10,set(ipv4(src=192.168.3.91)),11,set(ipv4(src=192.168.3.90)),13
262 AT_SETUP([ofproto-dpif - clear actions])
264 ADD_OF_PORTS([br0], [1], [10], [11], [12])
265 AT_DATA([flows.txt], [dnl
266 table=0 in_port=1,ip actions=output(10),write_actions(set_field:192.168.3.90->ip_src,output(12)),goto_table(1)
267 table=1 tcp actions=set_field:91->tp_src,output(11),clear_actions
269 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flows br0 flows.txt])
270 AT_CHECK([ovs-appctl ofproto/trace br0 'in_port=1,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,dl_type=0x0800,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_proto=6,nw_tos=0,nw_ttl=128,tp_src=8,tp_dst=9'], [0], [stdout])
271 AT_CHECK([tail -2 stdout], [0],
272 [Megaflow: recirc_id=0,tcp,in_port=1,nw_frag=no,tp_src=8
273 Datapath actions: 10,set(tcp(src=91)),11
278 AT_SETUP([ofproto-dpif - group chaining not supported])
280 ADD_OF_PORTS([br0], [1], [10], [11])
281 AT_CHECK([ovs-ofctl -O OpenFlow12 add-group br0 'group_id=1234,type=all,bucket=output:10,set_field:192.168.3.90->ip_src,group:123,bucket=output:11'],
283 AT_CHECK([STRIP_XIDS stderr | sed 1q], [0],
284 [OFPT_ERROR (OF1.2): OFPGMFC_CHAINING_UNSUPPORTED
289 AT_SETUP([ofproto-dpif - all group in action list])
291 ADD_OF_PORTS([br0], [1], [10], [11])
292 AT_CHECK([ovs-ofctl -O OpenFlow12 add-group br0 'group_id=1234,type=all,bucket=output:10,set_field:192.168.3.90->ip_src,bucket=output:11'])
293 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=group:1234'])
294 AT_CHECK([ovs-appctl ofproto/trace br0 'in_port=1,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,dl_type=0x0800,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_proto=1,nw_tos=0,nw_ttl=128,icmp_type=8,icmp_code=0'], [0], [stdout])
295 # Must match on the source address to be able to restore it's value for
297 AT_CHECK([tail -2 stdout], [0],
298 [Megaflow: recirc_id=0,ip,in_port=1,nw_src=192.168.0.1,nw_frag=no
299 Datapath actions: set(ipv4(src=192.168.3.90)),10,set(ipv4(src=192.168.0.1)),11
304 AT_SETUP([ofproto-dpif - indirect group in action list])
306 ADD_OF_PORTS([br0], [1], [10])
307 AT_CHECK([ovs-ofctl -O OpenFlow12 add-group br0 group_id=1234,type=indirect,bucket=output:10])
308 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=group:1234'])
309 AT_CHECK([ovs-appctl ofproto/trace br0 'in_port=1,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,dl_type=0x0800,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_proto=1,nw_tos=0,nw_ttl=128,icmp_type=8,icmp_code=0'], [0], [stdout])
310 AT_CHECK([tail -1 stdout], [0],
311 [Datapath actions: 10
316 AT_SETUP([ofproto-dpif - all group in action set])
318 ADD_OF_PORTS([br0], [1], [10], [11])
319 AT_CHECK([ovs-ofctl -O OpenFlow12 add-group br0 'group_id=1234,type=all,bucket=output:10,set_field:192.168.3.90->ip_src,bucket=output:11'])
320 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=write_actions(group:1234)'])
321 AT_CHECK([ovs-appctl ofproto/trace br0 'in_port=1,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,dl_type=0x0800,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_proto=1,nw_tos=0,nw_ttl=128,icmp_type=8,icmp_code=0'], [0], [stdout])
322 # Must match on the source address to be able to restore it's value for
324 AT_CHECK([tail -2 stdout], [0],
325 [Megaflow: recirc_id=0,ip,in_port=1,nw_src=192.168.0.1,nw_frag=no
326 Datapath actions: set(ipv4(src=192.168.3.90)),10,set(ipv4(src=192.168.0.1)),11
331 AT_SETUP([ofproto-dpif - indirect group in action set])
333 ADD_OF_PORTS([br0], [1], [10])
334 AT_CHECK([ovs-ofctl -O OpenFlow12 add-group br0 group_id=1234,type=indirect,bucket=output:10])
335 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=write_actions(group:1234)'])
336 AT_CHECK([ovs-appctl ofproto/trace br0 'in_port=1,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,dl_type=0x0800,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_proto=1,nw_tos=0,nw_ttl=128,icmp_type=8,icmp_code=0'], [0], [stdout])
337 AT_CHECK([tail -1 stdout], [0],
338 [Datapath actions: 10
343 AT_SETUP([ofproto-dpif - select group])
345 ADD_OF_PORTS([br0], [1], [10], [11])
346 AT_CHECK([ovs-ofctl -O OpenFlow12 add-group br0 'group_id=1234,type=select,bucket=output:10,bucket=output:11'])
347 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=write_actions(group:1234)'])
349 # Try a bunch of different flows and make sure that they get distributed
351 for d in 0 1 2 3 4 5 6 7 8 9 a b c d e f; do
352 AT_CHECK([ovs-appctl ofproto/trace br0 "in_port=1,dl_src=50:54:00:00:00:07,dl_dst=50:54:00:00:00:0$d,dl_type=0x0800,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_proto=1,nw_tos=0,nw_ttl=128,icmp_type=8,icmp_code=0"], [0], [stdout])
353 tail -1 stdout >> results
355 sort results | uniq -c
356 AT_CHECK([sort results | uniq], [0],
357 [Datapath actions: 10
363 AT_SETUP([ofproto-dpif - select group with watch port])
365 ADD_OF_PORTS([br0], [1], [10], [11])
366 AT_CHECK([ovs-ofctl -O OpenFlow12 add-group br0 'group_id=1234,type=select,bucket=watch_port:10,output:10,bucket=output:11'])
367 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=write_actions(group:1234)'])
368 AT_CHECK([ovs-appctl ofproto/trace br0 'in_port=1,dl_src=50:54:00:00:00:07,dl_dst=50:54:00:00:00:07,dl_type=0x0800,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_proto=1,nw_tos=0,nw_ttl=128,icmp_type=8,icmp_code=0'], [0], [stdout])
369 AT_CHECK([tail -1 stdout], [0],
370 [Datapath actions: 11
375 AT_SETUP([ofproto-dpif - select group with weight])
377 ADD_OF_PORTS([br0], [1], [10], [11], [12])
378 AT_CHECK([ovs-ofctl -O OpenFlow12 add-group br0 'group_id=1234,type=select,bucket=output:10,bucket=output:11,weight=2000,bucket=output:12,weight=0'])
379 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=write_actions(group:1234)'])
380 AT_CHECK([ovs-appctl ofproto/trace br0 'in_port=1,dl_src=50:54:00:00:00:07,dl_dst=50:54:00:00:00:07,dl_type=0x0800,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_proto=1,nw_tos=0,nw_ttl=128,icmp_type=8,icmp_code=0'], [0], [stdout])
381 AT_CHECK([tail -1 stdout], [0],
382 [Datapath actions: 11
387 AT_SETUP([ofproto-dpif - fast failover group])
389 ADD_OF_PORTS([br0], [1], [10], [11])
390 AT_CHECK([ovs-ofctl -O OpenFlow12 add-group br0 'group_id=1234,type=ff,bucket=watch_port:10,output:10,bucket=watch_port:11,output:11'])
391 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=write_actions(group:1234)'])
392 AT_CHECK([ovs-appctl ofproto/trace br0 'in_port=1,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,dl_type=0x0800,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_proto=1,nw_tos=0,nw_ttl=128,icmp_type=8,icmp_code=0'], [0], [stdout])
393 AT_CHECK([tail -1 stdout], [0],
394 [Datapath actions: drop
399 AT_SETUP([ofproto-dpif - group stats single bucket])
401 ADD_OF_PORTS([br0], [1], [10], [11])
402 AT_CHECK([ovs-ofctl -O OpenFlow12 add-group br0 'group_id=1234,type=select,bucket=output:10,weight=2000,bucket=output:11,weight=0'])
403 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=write_actions(group:1234)'])
407 pkt="in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:01:00),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)"
408 AT_CHECK([ovs-appctl netdev-dummy/receive p1 $pkt])
411 AT_CHECK([ovs-appctl revalidator/purge], [0])
412 AT_CHECK([ovs-ofctl -O OpenFlow12 -vwarn dump-group-stats br0], [0], [stdout])
413 AT_CHECK([STRIP_XIDS stdout | sort], [0], [dnl
414 group_id=1234,ref_count=0,packet_count=3,byte_count=180,bucket0:packet_count=3,byte_count=180,bucket1:packet_count=0,byte_count=0
415 OFPST_GROUP reply (OF1.2):
420 AT_SETUP([ofproto-dpif - group stats all buckets])
422 ADD_OF_PORTS([br0], [1], [10], [11])
423 AT_CHECK([ovs-ofctl -O OpenFlow12 add-group br0 'group_id=1234,type=all,bucket=output:10,bucket=output:11'])
424 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=write_actions(group:1234)'])
428 pkt="in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:01:00),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)"
429 AT_CHECK([ovs-appctl netdev-dummy/receive p1 $pkt])
432 AT_CHECK([ovs-appctl revalidator/purge], [0])
433 AT_CHECK([ovs-ofctl -O OpenFlow12 -vwarn dump-group-stats br0], [0], [stdout])
434 AT_CHECK([STRIP_XIDS stdout | sort], [0], [dnl
435 group_id=1234,ref_count=0,packet_count=3,byte_count=180,bucket0:packet_count=3,byte_count=180,bucket1:packet_count=3,byte_count=180
436 OFPST_GROUP reply (OF1.2):
441 AT_SETUP([ofproto-dpif - registers])
443 ADD_OF_PORTS([br0], [20], [21], [22], [33], [90])
444 AT_DATA([flows.txt], [dnl
445 in_port=90 actions=resubmit:2,resubmit:3,resubmit:4,resubmit:91
446 in_port=91 actions=resubmit:5,resubmit:6,resubmit:7,resubmit:92
447 in_port=92 actions=resubmit:8,resubmit:9,resubmit:10,resubmit:11,resubmit:93
448 in_port=93 actions=resubmit:12,resubmit:13,resubmit:14,resubmit:15
450 in_port=2 actions=load:0x000db000->NXM_NX_REG0[[]]
451 in_port=3 actions=load:0xdea->NXM_NX_REG0[[20..31]]
452 in_port=4 actions=load:0xeef->NXM_NX_REG0[[0..11]]
453 in_port=5 actions=move:NXM_NX_REG0[[]]->NXM_NX_REG1[[]]
454 in_port=6 actions=load:0x22222222->NXM_NX_REG2[[]]
455 in_port=7 actions=move:NXM_NX_REG1[[20..31]]->NXM_NX_REG2[[0..11]]
456 in_port=8 actions=move:NXM_NX_REG1[[0..11]]->NXM_NX_REG2[[20..31]]
457 in_port=9,reg0=0xdeadbeef actions=output:20
458 in_port=10,reg1=0xdeadbeef actions=output:21
459 in_port=11,reg2=0xeef22dea actions=output:22
461 dnl Sanilty check all registers
462 in_port=12 actions=load:0x10->NXM_NX_REG0[[]],load:0x11->NXM_NX_REG1[[]],load:0x12->NXM_NX_REG2[[]]
463 in_port=13 actions=load:0x13->NXM_NX_REG3[[]],load:0x14->NXM_NX_REG4[[]],load:0x15->NXM_NX_REG5[[]]
464 in_port=14 actions=load:0x16->NXM_NX_REG6[[]],load:0x17->NXM_NX_REG7[[]]
465 in_port=15,reg0=0x10,reg1=0x11,reg2=0x12,reg3=0x13,reg4=0x14,reg5=0x15,reg6=0x16,reg7=0x17 actions=output:33
468 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
469 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(90),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)'], [0], [stdout])
470 AT_CHECK([tail -1 stdout], [0],
471 [Datapath actions: 20,21,22,33
476 dnl Tests that the standardized xregs are mapped onto the legacy OVS registers
477 dnl in the manner documented in ovs-ofctl(8).
478 AT_SETUP([ofproto-dpif - extended registers])
480 ADD_OF_PORTS([br0], [1], [2], [3])
481 AT_DATA([flows.txt], [dnl
482 table=0 actions=load:0xfedcba9876543210->OXM_OF_PKT_REG1[[]],resubmit(,1)
483 table=1,reg2=0xfedcba98,reg3=0x76543210 actions=2
485 # These low-priority rules shouldn't match. They're here only to make really
486 # sure that the test fails if either of the above rules fails to match.
487 table=0,priority=0 actions=3
488 table=1,priority=0 actions=3
490 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
491 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)'], [0], [stdout])
492 AT_CHECK([tail -1 stdout], [0], [Datapath actions: 2
497 AT_SETUP([ofproto-dpif - load and move order])
499 ADD_OF_PORTS([br0], [1], [10], [11])
500 AT_CHECK([ovs-ofctl -O OpenFlow12 add-group br0 'group_id=1234,type=all,bucket=output:10,move:NXM_NX_REG1[[]]->NXM_OF_IP_SRC[[]],bucket=output:11'])
501 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=write_actions(load:0xffffffff->NXM_NX_REG1[[]],move:NXM_NX_REG1[[]]->NXM_NX_REG2[[]],group:1234)'])
502 AT_CHECK([ovs-appctl ofproto/trace br0 'in_port=1,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,dl_type=0x0800,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_proto=1,nw_tos=0,nw_ttl=128,icmp_type=8,icmp_code=0'], [0], [stdout])
503 AT_CHECK([tail -2 stdout], [0],
504 [Megaflow: recirc_id=0,ip,in_port=1,nw_src=192.168.0.1,nw_frag=no
505 Datapath actions: set(ipv4(src=255.255.255.255)),10,set(ipv4(src=192.168.0.1)),11
510 dnl Tests that 1.5 copy-field can copy into the standardized xregs.
511 AT_SETUP([ofproto-dpif - copy-field into extended registers])
513 ADD_OF_PORTS([br0], [1], [2], [3])
514 AT_DATA([flows.txt], [dnl
515 table=0 actions=move:OXM_OF_ETH_SRC[[0..47]]->OXM_OF_PKT_REG0[[0..47]],goto_table(1)
516 table=1,xreg0=0x0000505400000005 actions=2
518 # These low-priority rules shouldn't match. They're here only to make really
519 # sure that the test fails if either of the above rules fails to match.
520 table=0,priority=0 actions=3
521 table=1,priority=0 actions=3
523 AT_CHECK([ovs-ofctl -O OpenFlow15 add-flows br0 flows.txt])
524 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)'], [0], [stdout])
525 AT_CHECK([tail -1 stdout], [0], [Datapath actions: 2
530 dnl Tests that 1.5 set-field with mask in the metadata register.
531 AT_SETUP([ofproto-dpif - masked set-field into metadata])
533 ADD_OF_PORTS([br0], [1], [2], [3])
534 AT_DATA([flows.txt], [dnl
535 table=0 actions=set_field:0xfafafafa5a5a5a5a->metadata,goto_table(1)
536 table=1 actions=set_field:0x6b/0xff->metadata,goto_table(2)
537 table=2,metadata=0xfafafafa5a5a5a6b actions=2
539 # These low-priority rules shouldn't match. They're here only to make really
540 # sure that the test fails if either of the above rules fails to match.
541 table=0,priority=0 actions=3
542 table=1,priority=0 actions=3
543 table=2,priority=0 actions=3
545 AT_CHECK([ovs-ofctl -O OpenFlow15 add-flows br0 flows.txt])
546 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)'], [0], [stdout])
547 AT_CHECK([tail -1 stdout], [0], [Datapath actions: 2
553 AT_SETUP([ofproto-dpif - actset_output])
556 [br0], [1], [2], [3], [4], [5], [6], [7], [8], [9], [10], [11], [12], [13])
557 AT_DATA([flows.txt], [dnl
558 table=0,actset_output=unset actions=write_actions(output(2)),goto_table(1)
559 table=1 actions=move:ONFOXM_ET_ACTSET_OUTPUT[[0..31]]->OXM_OF_PKT_REG0[[0..31]],goto_table(2)
561 # Verify that actset_output got set.
562 table=2,priority=20,actset_output=2 actions=4,goto_table(3)
563 table=2,priority=10 actions=5,goto_table(3)
565 # Verify that xreg0 got copied properly from actset_output.
566 table=3,priority=20,xreg0=2 actions=6,goto_table(4)
567 table=3,priority=10 actions=7,goto_table(4)
569 # Verify that adding a group action unsets actset_output.
570 table=4 actions=write_actions(group(5)),goto_table(5)
571 table=5,priority=20,actset_output=unset actions=8,goto_table(6)
572 table=5,priority=10 actions=9,goto_table(6)
574 # Verify that adding another output action doesn't change actset_output
575 # (since there's still a group).
576 table=6 actions=write_actions(output(3)),goto_table(7)
577 table=7,priority=20,actset_output=unset actions=10,goto_table(8)
578 table=7,priority=10 actions=11,goto_table(8)
580 # Verify that clearing the action set, then writing an output action,
581 # causes actset_output to be set again.
582 table=8,actions=clear_actions,write_actions(output(3),output(2)),goto_table(9)
583 table=9,priority=20,actset_output=2 actions=12
584 table=9,priority=10 actions=13
586 AT_CHECK([ovs-ofctl -O OpenFlow13 add-flows br0 flows.txt])
587 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)'], [0], [stdout])
588 AT_CHECK([tail -1 stdout], [0], [Datapath actions: 4,6,8,10,12,2
592 AT_SETUP([ofproto-dpif - push-pop])
594 ADD_OF_PORTS([br0], [20], [21], [22], [33], [90])
595 AT_DATA([flows.txt], [dnl
596 in_port=90 actions=load:20->NXM_NX_REG0[[0..7]],load:21->NXM_NX_REG1[[0..7]],load:22->NXM_NX_REG2[[0..7]], load:33->NXM_NX_REG3[[0..7]], push:NXM_NX_REG0[[]], push:NXM_NX_REG1[[0..7]],push:NXM_NX_REG2[[0..15]], push:NXM_NX_REG3[[]], resubmit:2, resubmit:3, resubmit:4, resubmit:5
597 in_port=2 actions=pop:NXM_NX_REG0[[0..7]],output:NXM_NX_REG0[[]]
598 in_port=3 actions=pop:NXM_NX_REG1[[0..7]],output:NXM_NX_REG1[[]]
599 in_port=4 actions=pop:NXM_NX_REG2[[0..15]],output:NXM_NX_REG2[[]]
600 in_port=5 actions=pop:NXM_NX_REG3[[]],output:NXM_NX_REG3[[]]
603 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
604 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(90),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)'], [0], [stdout])
605 AT_CHECK([tail -1 stdout], [0],
606 [Datapath actions: 33,22,21,20
611 AT_SETUP([ofproto-dpif - output])
613 ADD_OF_PORTS([br0], [1], [9], [10], [11], [55], [66], [77], [88])
614 AT_DATA([flows.txt], [dnl
615 in_port=1 actions=resubmit:2,resubmit:3,resubmit:4,resubmit:5,resubmit:6,resubmit:7,resubmit:8
616 in_port=2 actions=output:9
617 in_port=3 actions=load:55->NXM_NX_REG0[[]],output:NXM_NX_REG0[[]],load:66->NXM_NX_REG1[[]]
618 in_port=4 actions=output:10,output:NXM_NX_REG0[[]],output:NXM_NX_REG1[[]],output:11
619 in_port=5 actions=load:77->NXM_NX_REG0[[0..15]],load:88->NXM_NX_REG0[[16..31]]
620 in_port=6 actions=output:NXM_NX_REG0[[0..15]],output:NXM_NX_REG0[[16..31]]
621 in_port=7 actions=load:0x110000ff->NXM_NX_REG0[[]],output:NXM_NX_REG0[[]]
622 in_port=8 actions=1,9,load:9->NXM_OF_IN_PORT[[]],1,9
624 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
625 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)'], [0], [stdout])
626 AT_CHECK([tail -1 stdout], [0],
627 [Datapath actions: 9,55,10,55,66,11,77,88,9,1
632 AT_SETUP([ofproto-dpif - dec_ttl])
634 ADD_OF_PORTS([br0], [1], [2], [3], [4])
635 AT_DATA([flows.txt], [dnl
636 table=0 in_port=1 action=dec_ttl,output:2,resubmit(1,1),output:4
637 table=1 in_port=1 action=dec_ttl,output:3
639 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
640 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=111,tos=0,ttl=2,frag=no)' -generate], [0], [stdout])
641 AT_CHECK([tail -4 stdout], [0],
642 [Megaflow: recirc_id=0,ip,in_port=1,nw_ttl=2,nw_frag=no
643 Datapath actions: set(ipv4(ttl=1)),2,4
644 This flow is handled by the userspace slow path because it:
645 - Sends "packet-in" messages to the OpenFlow controller.
647 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=111,tos=0,ttl=3,frag=no)'], [0], [stdout])
648 AT_CHECK([tail -2 stdout], [0],
649 [Megaflow: recirc_id=0,ip,in_port=1,nw_ttl=3,nw_frag=no
650 Datapath actions: set(ipv4(ttl=2)),2,set(ipv4(ttl=1)),3,4
652 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x86dd),ipv6(src=::1,dst=::2,label=0,proto=10,tclass=0x70,hlimit=128,frag=no)'], [0], [stdout])
653 AT_CHECK([tail -2 stdout], [0],
654 [Megaflow: recirc_id=0,ipv6,in_port=1,nw_ttl=128,nw_frag=no
655 Datapath actions: set(ipv6(hlimit=127)),2,set(ipv6(hlimit=126)),3,4
658 AT_CAPTURE_FILE([ofctl_monitor.log])
659 AT_CHECK([ovs-ofctl monitor br0 65534 invalid_ttl --detach --no-chdir --pidfile 2> ofctl_monitor.log])
660 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=111,tos=0,ttl=2,frag=no)' -generate], [0], [stdout])
661 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
662 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
663 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=34 in_port=1 (via invalid_ttl) data_len=34 (unbuffered)
664 ip,in_port=0,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_proto=111,nw_tos=0,nw_ecn=0,nw_ttl=1
669 dnl A dec_ttl action at offset 32 in ofpacts will cause the ofpacts
670 dnl buffer to be resized just before pushing the id of the dec_ttl action.
671 dnl Thus the implementation must account for this by using the
672 dnl reallocated buffer rather than the original buffer.
674 dnl A number of similar rules are added to try and exercise
675 dnl xrealloc sufficiently that it returns a different base pointer
676 AT_SETUP([ofproto-dpif - dec_ttl without arguments at offset 32 in ofpacts])
678 ADD_OF_PORTS([br0], [1])
679 (for i in `seq 0 255`; do
680 printf "dl_src=10:11:11:11:11:%02x actions=output:1,output:1,output:1,dec_ttl,controller\n" $i
682 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
686 dnl A dec_ttl action at offset 32 in ofpacts will cause the ofpacts
687 dnl buffer to be resized just before pushing the id of the dec_ttl action.
688 dnl Thus the implementation must account for this by using the
689 dnl reallocated buffer rather than the original buffer.
691 dnl A number of similar rules are added to try and exercise
692 dnl xrealloc sufficiently that it returns a different base pointer
693 AT_SETUP([ofproto-dpif - dec_ttl with arguments at offset 32 in ofpacts])
695 ADD_OF_PORTS([br0], [1])
696 (for i in `seq 0 255`; do
697 printf "dl_src=10:11:11:11:11:%02x actions=output:1,output:1,output:1,dec_ttl(1),controller\n" $i
699 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
703 dnl A note action at offset 24 in ofpacts will cause the ofpacts
704 dnl buffer to be resized just before pushing the id of the dec_ttl action.
705 dnl Thus the implementation must account for this by using the
706 dnl reallocated buffer rather than the original buffer.
708 dnl A number of similar rules are added to try and exercise
709 dnl xrealloc sufficiently that it returns a different base pointer
710 AT_SETUP([ofproto-dpif - note at offset 24 in ofpacts])
712 ADD_OF_PORTS([br0], [1])
713 (for i in `seq 0 255`; do
714 printf "dl_src=10:11:11:11:11:%02x actions=output:1,output:1,note:ff,controller\n" $i
716 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
720 AT_SETUP([ofproto-dpif - output, OFPP_NONE ingress port])
722 ADD_OF_PORTS([br0], [1], [2])
724 AT_CHECK([ovs-ofctl add-flow br0 action=normal])
726 # "in_port" defaults to OFPP_NONE if it's not specified.
727 flow="icmp,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,icmp_type=8,icmp_code=0"
728 AT_CHECK([ovs-appctl ofproto/trace br0 "$flow"], [0], [stdout])
729 AT_CHECK([tail -1 stdout | sed 's/Datapath actions: //' | tr "," "\n" | sort -n], [0], [dnl
738 AT_SETUP([ofproto-dpif - DSCP])
739 OVS_VSWITCHD_START([add-port br0 p1 -- set Interface p1 type=dummy])
740 ADD_OF_PORTS([br0], [9])
741 AT_DATA([flows.txt], [dnl
742 actions=output:LOCAL,enqueue:1:1,enqueue:1:2,enqueue:1:2,enqueue:1:1,output:1,mod_nw_tos:0,output:1,output:LOCAL
744 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
745 AT_CHECK([ovs-vsctl -- \
746 set Port p1 qos=@newqos --\
747 --id=@newqos create QoS type=linux-htb queues=1=@q1,2=@q2 --\
748 --id=@q1 create Queue dscp=1 --\
749 --id=@q2 create Queue dscp=2], [0], [ignore])
750 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(9),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=1.1.1.1,dst=2.2.2.2,proto=1,tos=0xff,ttl=128,frag=no),icmp(type=8,code=0)'], [0], [stdout])
751 AT_CHECK([tail -2 stdout], [0],
752 [Megaflow: recirc_id=0,skb_priority=0,ip,in_port=9,nw_tos=252,nw_frag=no
753 Datapath actions: dnl
755 set(ipv4(tos=0x4/0xfc)),set(skb_priority(0x1)),1,dnl
756 set(ipv4(tos=0x8/0xfc)),set(skb_priority(0x2)),1,dnl
758 set(ipv4(tos=0x4/0xfc)),set(skb_priority(0x1)),1,dnl
759 set(ipv4(tos=0xfc/0xfc)),set(skb_priority(0)),1,dnl
760 set(ipv4(tos=0/0xfc)),1,100
765 AT_SETUP([ofproto-dpif - output/flood flags])
767 ADD_OF_PORTS([br0], [1], [2], [3], [4], [5], [6], [7])
769 AT_DATA([flows.txt], [dnl
770 in_port=local actions=local,flood
771 in_port=1 actions=flood
772 in_port=2 actions=all
773 in_port=3 actions=output:LOCAL,output:1,output:2,output:3,output:4,output:5,output:6,output:7
774 in_port=4 actions=enqueue:LOCAL:1,enqueue:1:1,enqueue:2:1,enqueue:3:2,enqueue:4:1,enqueue:5:1,enqueue:6:1,enqueue:7:1
776 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
777 AT_CHECK([ovs-ofctl mod-port br0 5 noforward])
778 AT_CHECK([ovs-ofctl mod-port br0 6 noflood])
780 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(100),eth(src=00:00:00:00:00:01,dst=00:00:00:00:00:02),eth_type(0x0900)'], [0], [stdout])
781 AT_CHECK([tail -1 stdout \
782 | sed -e 's/Datapath actions: //' | tr ',' '\n' | sort], [0], [dnl
790 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(1),eth(src=00:00:00:00:00:01,dst=00:00:00:00:00:02),eth_type(0x0900)'], [0], [stdout])
791 AT_CHECK([tail -1 stdout \
792 | sed -e 's/Datapath actions: //' | tr ',' '\n' | sort], [0], [dnl
800 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(2),eth(src=00:00:00:00:00:01,dst=00:00:00:00:00:02),eth_type(0x0900)'], [0], [stdout])
801 AT_CHECK([tail -1 stdout \
802 | sed -e 's/Datapath actions: //' | tr ',' '\n' | sort], [0], [dnl
811 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(3),eth(src=00:00:00:00:00:01,dst=00:00:00:00:00:02),eth_type(0x0900)'], [0], [stdout])
812 AT_CHECK([tail -1 stdout], [0],
813 [Datapath actions: 100,1,2,4,6,7
816 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(4),eth(src=00:00:00:00:00:01,dst=00:00:00:00:00:02),eth_type(0x0900)'], [0], [stdout])
817 AT_CHECK([tail -1 stdout], [0],
818 [Datapath actions: set(skb_priority(0x1)),100,1,2,set(skb_priority(0x2)),3,set(skb_priority(0x1)),6,7
823 AT_SETUP([ofproto-dpif - Default Table Miss - OF1.0 (OFPTC_TABLE_MISS_CONTROLLER)])
824 OVS_VSWITCHD_START([dnl
825 add-port br0 p1 -- set Interface p1 type=dummy
827 ON_EXIT([kill `cat ovs-ofctl.pid`])
829 AT_CAPTURE_FILE([ofctl_monitor.log])
831 AT_CHECK([ovs-ofctl monitor br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
834 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=9),tcp_flags(syn)'
836 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
837 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
838 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
839 NXT_PACKET_IN (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
840 tcp,in_port=0,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=9,tcp_flags=syn tcp_csum:0
842 NXT_PACKET_IN (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
843 tcp,in_port=0,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=9,tcp_flags=syn tcp_csum:0
845 NXT_PACKET_IN (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
846 tcp,in_port=0,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=9,tcp_flags=syn tcp_csum:0
849 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
850 AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
857 AT_SETUP([ofproto-dpif - Default Table Miss - OF1.3 (OFPTC_TABLE_MISS_DROP)])
858 OVS_VSWITCHD_START([dnl
859 add-port br0 p1 -- set Interface p1 type=dummy
861 ON_EXIT([kill `cat ovs-ofctl.pid`])
863 AT_CAPTURE_FILE([ofctl_monitor.log])
864 AT_CHECK([ovs-ofctl del-flows br0])
866 AT_CHECK([ovs-ofctl monitor -OOpenFlow13 -P openflow10 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
868 dnl Test that missed packets are droped
870 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=9),tcp_flags(ack,syn)'
872 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
874 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
877 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
878 AT_CHECK([ovs-ofctl -OOpenFlow13 dump-flows br0 | ofctl_strip | sort], [0], [dnl
879 OFPST_FLOW reply (OF1.3):
885 AT_SETUP([ofproto-dpif - Table Miss - goto table and OFPTC_TABLE_MISS_CONTROLLER])
886 OVS_VSWITCHD_START([dnl
887 add-port br0 p1 -- set Interface p1 type=dummy
889 ON_EXIT([kill `cat ovs-ofctl.pid`])
891 AT_CAPTURE_FILE([ofctl_monitor.log])
892 AT_CHECK([ovs-ofctl -OOpenFlow12 add-flow br0 'table=0 actions=goto_table(1)'])
894 AT_CHECK([ovs-ofctl monitor -P openflow10 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
897 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=9),tcp_flags(urg,rst)'
899 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
900 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
901 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
902 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
903 tcp,in_port=0,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=9,tcp_flags=rst|urg tcp_csum:0
905 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
906 tcp,in_port=0,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=9,tcp_flags=rst|urg tcp_csum:0
908 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
909 tcp,in_port=0,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=9,tcp_flags=rst|urg tcp_csum:0
912 AT_CHECK([ovs-appctl revalidator/purge], [0])
913 AT_CHECK([ovs-ofctl -OOpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
914 n_packets=3, n_bytes=180, actions=goto_table:1
915 OFPST_FLOW reply (OF1.2):
921 AT_SETUP([ofproto-dpif - Table Miss - resubmit and OFPTC_TABLE_MISS_CONTROLLER])
922 OVS_VSWITCHD_START([dnl
923 add-port br0 p1 -- set Interface p1 type=dummy
925 ON_EXIT([kill `cat ovs-ofctl.pid`])
927 AT_CAPTURE_FILE([ofctl_monitor.log])
928 AT_CHECK([ovs-ofctl -OOpenFlow12 add-flow br0 'table=0 actions=resubmit(1,1)'])
930 AT_CHECK([ovs-ofctl monitor -P openflow10 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
933 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=9),tcp_flags(0x010)'
936 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
937 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
940 AT_CHECK([ovs-appctl revalidator/purge], [0])
941 AT_CHECK([ovs-ofctl -OOpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
942 n_packets=3, n_bytes=180, actions=resubmit(1,1)
943 OFPST_FLOW reply (OF1.2):
949 AT_SETUP([ofproto-dpif - Table Miss - OFPTC_TABLE_MISS_CONTINUE])
950 OVS_VSWITCHD_START([dnl
951 add-port br0 p1 -- set Interface p1 type=dummy
953 ON_EXIT([kill `cat ovs-ofctl.pid`])
955 AT_CAPTURE_FILE([ofctl_monitor.log])
956 AT_CHECK([ovs-ofctl add-flow br0 'table=1 dl_src=10:11:11:11:11:11 actions=controller'])
957 AT_CHECK([ovs-ofctl -OOpenFlow11 mod-table br0 all continue])
959 dnl Miss table 0, Hit table 1
960 AT_CHECK([ovs-ofctl monitor br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
963 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=10:11:11:11:11:11,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=9),tcp_flags(0x010)'
965 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
966 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
968 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
969 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
970 tcp,in_port=0,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=9,tcp_flags=ack tcp_csum:0
972 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
973 tcp,in_port=0,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=9,tcp_flags=ack tcp_csum:0
975 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
976 tcp,in_port=0,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=9,tcp_flags=ack tcp_csum:0
979 dnl Hit table 0, Miss all other tables, sent to controller
980 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --no-chdir --pidfile 2> ofctl_monitor.log])
983 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=9),tcp_flags(0x010)'
985 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
986 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
988 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
989 NXT_PACKET_IN (xid=0x0): table_id=253 cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
990 tcp,in_port=0,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=9,tcp_flags=ack tcp_csum:0
992 NXT_PACKET_IN (xid=0x0): table_id=253 cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
993 tcp,in_port=0,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=9,tcp_flags=ack tcp_csum:0
995 NXT_PACKET_IN (xid=0x0): table_id=253 cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
996 tcp,in_port=0,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=9,tcp_flags=ack tcp_csum:0
999 AT_CHECK([ovs-appctl revalidator/purge], [0])
1000 AT_CHECK([ovs-ofctl -OOpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
1001 table=1, n_packets=3, n_bytes=180, dl_src=10:11:11:11:11:11 actions=CONTROLLER:65535
1002 OFPST_FLOW reply (OF1.2):
1008 AT_SETUP([ofproto-dpif - Table Miss - goto table and OFPTC_TABLE_MISS_CONTINUE])
1009 OVS_VSWITCHD_START([dnl
1010 add-port br0 p1 -- set Interface p1 type=dummy
1012 ON_EXIT([kill `cat ovs-ofctl.pid`])
1014 AT_CAPTURE_FILE([ofctl_monitor.log])
1015 AT_DATA([flows.txt], [dnl
1016 table=0 actions=goto_table(1)
1017 table=2 dl_src=10:11:11:11:11:11 actions=controller
1019 AT_CHECK([ovs-ofctl -OOpenFlow12 add-flows br0 flows.txt])
1020 AT_CHECK([ovs-ofctl -OOpenFlow11 mod-table br0 all continue])
1022 dnl Hit table 0, Miss table 1, Hit table 2
1023 AT_CHECK([ovs-ofctl monitor br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1026 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=10:11:11:11:11:11,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=9),tcp_flags(0x010)'
1028 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1029 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1031 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1032 NXT_PACKET_IN (xid=0x0): table_id=2 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1033 tcp,in_port=0,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=9,tcp_flags=ack tcp_csum:0
1035 NXT_PACKET_IN (xid=0x0): table_id=2 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1036 tcp,in_port=0,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=9,tcp_flags=ack tcp_csum:0
1038 NXT_PACKET_IN (xid=0x0): table_id=2 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1039 tcp,in_port=0,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=9,tcp_flags=ack tcp_csum:0
1042 dnl Hit table 1, Miss all other tables, sent to controller
1043 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1046 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=9),tcp_flags(0x010)'
1048 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1049 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
1051 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1052 NXT_PACKET_IN (xid=0x0): table_id=253 cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
1053 tcp,in_port=0,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=9,tcp_flags=ack tcp_csum:0
1055 NXT_PACKET_IN (xid=0x0): table_id=253 cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
1056 tcp,in_port=0,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=9,tcp_flags=ack tcp_csum:0
1058 NXT_PACKET_IN (xid=0x0): table_id=253 cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
1059 tcp,in_port=0,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=9,tcp_flags=ack tcp_csum:0
1062 AT_CHECK([ovs-appctl revalidator/purge], [0])
1063 AT_CHECK([ovs-ofctl -OOpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
1064 n_packets=6, n_bytes=360, actions=goto_table:1
1065 table=2, n_packets=3, n_bytes=180, dl_src=10:11:11:11:11:11 actions=CONTROLLER:65535
1066 OFPST_FLOW reply (OF1.2):
1072 AT_SETUP([ofproto-dpif - Table Miss - resubmit and OFPTC_TABLE_MISS_CONTINUE])
1073 OVS_VSWITCHD_START([dnl
1074 add-port br0 p1 -- set Interface p1 type=dummy
1076 ON_EXIT([kill `cat ovs-ofctl.pid`])
1078 AT_CAPTURE_FILE([ofctl_monitor.log])
1079 AT_DATA([flows.txt], [dnl
1080 table=0 actions=resubmit(1,1)
1081 table=2 dl_src=10:11:11:11:11:11 actions=controller
1083 AT_CHECK([ovs-ofctl -OOpenFlow12 add-flows br0 flows.txt])
1084 AT_CHECK([ovs-ofctl -OOpenFlow11 mod-table br0 all continue])
1086 dnl Hit table 0, Miss table 1, Dropped
1087 AT_CHECK([ovs-ofctl monitor br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1090 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=10:11:11:11:11:11,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=9),tcp_flags(0x010)'
1092 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1094 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1097 dnl Hit table 1, Dropped
1098 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1101 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=9),tcp_flags(0x010)'
1103 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
1105 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1108 AT_CHECK([ovs-appctl revalidator/purge], [0])
1109 AT_CHECK([ovs-ofctl -OOpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
1110 n_packets=6, n_bytes=360, actions=resubmit(1,1)
1111 table=2, dl_src=10:11:11:11:11:11 actions=CONTROLLER:65535
1112 OFPST_FLOW reply (OF1.2):
1118 AT_SETUP([ofproto-dpif - Table Miss - OFPTC_TABLE_MISS_DROP])
1119 OVS_VSWITCHD_START([dnl
1120 add-port br0 p1 -- set Interface p1 type=dummy
1122 ON_EXIT([kill `cat ovs-ofctl.pid`])
1124 AT_CAPTURE_FILE([ofctl_monitor.log])
1125 AT_CHECK([ovs-ofctl -OOpenFlow11 mod-table br0 all drop])
1127 AT_CHECK([ovs-ofctl monitor -P openflow10 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1129 dnl Test that missed packets are droped
1131 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=9),tcp_flags(0x010)'
1133 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
1135 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1138 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1139 AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
1146 AT_SETUP([ofproto-dpif - Table Miss - goto table and OFPTC_TABLE_MISS_DROP])
1147 OVS_VSWITCHD_START([dnl
1148 add-port br0 p1 -- set Interface p1 type=dummy
1150 ON_EXIT([kill `cat ovs-ofctl.pid`])
1152 AT_CAPTURE_FILE([ofctl_monitor.log])
1153 AT_CHECK([ovs-ofctl del-flows br0])
1154 AT_CHECK([ovs-ofctl -OOpenFlow12 add-flow br0 'table=0 actions=goto_table(1)'])
1155 AT_CHECK([ovs-ofctl -OOpenFlow11 mod-table br0 all drop])
1157 AT_CHECK([ovs-ofctl monitor -P openflow10 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1159 dnl Test that missed packets are droped
1161 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=9),tcp_flags(0x010)'
1163 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
1165 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1168 AT_CHECK([ovs-appctl revalidator/purge], [0])
1169 AT_CHECK([ovs-ofctl -OOpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
1170 n_packets=3, n_bytes=180, actions=goto_table:1
1171 OFPST_FLOW reply (OF1.2):
1177 AT_SETUP([ofproto-dpif - Table Miss - resubmit and OFPTC_TABLE_MISS_DROP])
1178 OVS_VSWITCHD_START([dnl
1179 add-port br0 p1 -- set Interface p1 type=dummy
1181 ON_EXIT([kill `cat ovs-ofctl.pid`])
1183 AT_CAPTURE_FILE([ofctl_monitor.log])
1184 AT_CHECK([ovs-ofctl del-flows br0])
1185 AT_CHECK([ovs-ofctl -OOpenFlow12 add-flow br0 'table=0 actions=resubmit(1,1)'])
1186 AT_CHECK([ovs-ofctl -OOpenFlow11 mod-table br0 all drop])
1188 AT_CHECK([ovs-ofctl monitor -P openflow10 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1190 dnl Test that missed packets are droped
1192 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=9),tcp_flags(0x010)'
1194 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
1196 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1199 AT_CHECK([ovs-appctl revalidator/purge], [0])
1200 AT_CHECK([ovs-ofctl -OOpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
1201 n_packets=3, n_bytes=180, actions=resubmit(1,1)
1202 OFPST_FLOW reply (OF1.2):
1208 AT_SETUP([ofproto-dpif - controller])
1209 OVS_VSWITCHD_START([dnl
1210 add-port br0 p1 -- set Interface p1 type=dummy
1212 ON_EXIT([kill `cat ovs-ofctl.pid`])
1214 AT_CAPTURE_FILE([ofctl_monitor.log])
1215 AT_DATA([flows.txt], [dnl
1216 cookie=0x0 dl_src=10:11:11:11:11:11 actions=controller
1217 cookie=0x1 dl_src=20:22:22:22:22:22 actions=controller,resubmit(80,1)
1218 cookie=0x2 dl_src=30:33:33:33:33:33 actions=mod_vlan_vid:15,controller
1220 cookie=0x3 table=1 in_port=80 actions=load:1->NXM_NX_REG0[[]],mod_vlan_vid:80,controller,resubmit(81,2)
1221 cookie=0x4 table=2 in_port=81 actions=load:2->NXM_NX_REG1[[]],mod_dl_src:80:81:81:81:81:81,controller,resubmit(82,3)
1222 cookie=0x5 table=3 in_port=82 actions=load:3->NXM_NX_REG2[[]],mod_dl_dst:82:82:82:82:82:82,controller,resubmit(83,4)
1223 cookie=0x6 table=4 in_port=83 actions=load:4->NXM_NX_REG3[[]],mod_nw_src:83.83.83.83,controller,resubmit(84,5)
1224 cookie=0x7 table=5 in_port=84 actions=load:5->NXM_NX_REG4[[]],load:6->NXM_NX_TUN_ID[[]],mod_nw_dst:84.84.84.84,controller,resubmit(85,6)
1225 cookie=0x8 table=6 in_port=85 actions=mod_tp_src:85,controller,resubmit(86,7)
1226 cookie=0x9 table=7 in_port=86 actions=mod_tp_dst:86,controller,controller
1227 cookie=0xa dl_src=40:44:44:44:44:41 actions=mod_vlan_vid:99,mod_vlan_pcp:1,controller
1228 cookie=0xd dl_src=80:88:88:88:88:88 arp actions=load:2->OXM_OF_ARP_OP[[]],controller,load:0xc0a88001->OXM_OF_ARP_SPA[[]],controller,load:0x404444444441->OXM_OF_ARP_THA[[]],load:0x01010101->OXM_OF_ARP_SPA[[]],load:0x02020202->OXM_OF_ARP_TPA[[]],controller
1230 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
1233 AT_CHECK([ovs-ofctl monitor -P openflow10 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1236 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=9),tcp_flags(0x010)'
1238 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1239 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1241 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1242 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
1243 tcp,in_port=0,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=9,tcp_flags=ack tcp_csum:0
1245 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
1246 tcp,in_port=0,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=9,tcp_flags=ack tcp_csum:0
1248 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
1249 tcp,in_port=0,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=9,tcp_flags=ack tcp_csum:0
1252 dnl Singleton controller action.
1253 AT_CHECK([ovs-ofctl monitor -P openflow10 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1256 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=10:11:11:11:11:11,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=10),tcp_flags(0x002)'
1258 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1259 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1261 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1262 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1263 tcp,in_port=0,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:0
1265 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1266 tcp,in_port=0,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:0
1268 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1269 tcp,in_port=0,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:0
1272 dnl Modified controller action.
1273 AT_CHECK([ovs-ofctl monitor -P openflow10 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1276 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=30:33:33:33:33:33,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=10),tcp_flags(0x001)'
1278 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1279 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1281 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1282 OFPT_PACKET_IN (xid=0x0): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1283 tcp,in_port=0,dl_vlan=15,dl_vlan_pcp=0,dl_src=30:33:33:33:33:33,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=fin tcp_csum:0
1285 OFPT_PACKET_IN (xid=0x0): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1286 tcp,in_port=0,dl_vlan=15,dl_vlan_pcp=0,dl_src=30:33:33:33:33:33,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=fin tcp_csum:0
1288 OFPT_PACKET_IN (xid=0x0): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1289 tcp,in_port=0,dl_vlan=15,dl_vlan_pcp=0,dl_src=30:33:33:33:33:33,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=fin tcp_csum:0
1292 dnl Modified VLAN controller action.
1293 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1296 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=40:44:44:44:44:41,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=16,tos=0,ttl=64,frag=no)'
1298 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1299 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1301 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1302 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1303 ip,in_port=0,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:44:41,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_proto=16,nw_tos=0,nw_ecn=0,nw_ttl=64
1305 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1306 ip,in_port=0,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:44:41,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_proto=16,nw_tos=0,nw_ecn=0,nw_ttl=64
1308 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1309 ip,in_port=0,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:44:41,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_proto=16,nw_tos=0,nw_ecn=0,nw_ttl=64
1313 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1316 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=20:22:22:22:22:22,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=11),tcp_flags(0x001)'
1318 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 18])
1319 ovs-appctl -t ovs-ofctl exit
1321 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1322 NXT_PACKET_IN (xid=0x0): cookie=0x1 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1323 tcp,in_port=0,vlan_tci=0x0000,dl_src=20:22:22:22:22:22,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=11,tcp_flags=fin tcp_csum:0
1325 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x3 total_len=64 in_port=1 reg0=0x1 (via action) data_len=64 (unbuffered)
1326 tcp,in_port=0,dl_vlan=80,dl_vlan_pcp=0,dl_src=20:22:22:22:22:22,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=11,tcp_flags=fin tcp_csum:0
1328 NXT_PACKET_IN (xid=0x0): table_id=2 cookie=0x4 total_len=64 in_port=1 reg0=0x1 reg1=0x2 (via action) data_len=64 (unbuffered)
1329 tcp,in_port=0,dl_vlan=80,dl_vlan_pcp=0,dl_src=80:81:81:81:81:81,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=11,tcp_flags=fin tcp_csum:0
1331 NXT_PACKET_IN (xid=0x0): table_id=3 cookie=0x5 total_len=64 in_port=1 reg0=0x1 reg1=0x2 reg2=0x3 (via action) data_len=64 (unbuffered)
1332 tcp,in_port=0,dl_vlan=80,dl_vlan_pcp=0,dl_src=80:81:81:81:81:81,dl_dst=82:82:82:82:82:82,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=11,tcp_flags=fin tcp_csum:0
1334 NXT_PACKET_IN (xid=0x0): table_id=4 cookie=0x6 total_len=64 in_port=1 reg0=0x1 reg1=0x2 reg2=0x3 reg3=0x4 (via action) data_len=64 (unbuffered)
1335 tcp,in_port=0,dl_vlan=80,dl_vlan_pcp=0,dl_src=80:81:81:81:81:81,dl_dst=82:82:82:82:82:82,nw_src=83.83.83.83,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=11,tcp_flags=fin tcp_csum:1a03
1337 NXT_PACKET_IN (xid=0x0): table_id=5 cookie=0x7 total_len=64 in_port=1 tun_id=0x6 reg0=0x1 reg1=0x2 reg2=0x3 reg3=0x4 reg4=0x5 (via action) data_len=64 (unbuffered)
1338 tcp,in_port=0,dl_vlan=80,dl_vlan_pcp=0,dl_src=80:81:81:81:81:81,dl_dst=82:82:82:82:82:82,nw_src=83.83.83.83,nw_dst=84.84.84.84,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=11,tcp_flags=fin tcp_csum:3205
1340 NXT_PACKET_IN (xid=0x0): table_id=6 cookie=0x8 total_len=64 in_port=1 tun_id=0x6 reg0=0x1 reg1=0x2 reg2=0x3 reg3=0x4 reg4=0x5 (via action) data_len=64 (unbuffered)
1341 tcp,in_port=0,dl_vlan=80,dl_vlan_pcp=0,dl_src=80:81:81:81:81:81,dl_dst=82:82:82:82:82:82,nw_src=83.83.83.83,nw_dst=84.84.84.84,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=85,tp_dst=11,tcp_flags=fin tcp_csum:31b8
1343 NXT_PACKET_IN (xid=0x0): table_id=7 cookie=0x9 total_len=64 in_port=1 tun_id=0x6 reg0=0x1 reg1=0x2 reg2=0x3 reg3=0x4 reg4=0x5 (via action) data_len=64 (unbuffered)
1344 tcp,in_port=0,dl_vlan=80,dl_vlan_pcp=0,dl_src=80:81:81:81:81:81,dl_dst=82:82:82:82:82:82,nw_src=83.83.83.83,nw_dst=84.84.84.84,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=85,tp_dst=86,tcp_flags=fin tcp_csum:316d
1346 NXT_PACKET_IN (xid=0x0): table_id=7 cookie=0x9 total_len=64 in_port=1 tun_id=0x6 reg0=0x1 reg1=0x2 reg2=0x3 reg3=0x4 reg4=0x5 (via action) data_len=64 (unbuffered)
1347 tcp,in_port=0,dl_vlan=80,dl_vlan_pcp=0,dl_src=80:81:81:81:81:81,dl_dst=82:82:82:82:82:82,nw_src=83.83.83.83,nw_dst=84.84.84.84,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=85,tp_dst=86,tcp_flags=fin tcp_csum:316d
1351 AT_CHECK([ovs-ofctl monitor br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1354 ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 20 22 22 22 22 22 08 00 45 00 00 1C 00 00 00 00 00 11 00 00 C0 A8 00 01 C0 A8 00 02 00 08 00 0B 00 00 12 34 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00'
1356 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 18])
1357 ovs-appctl -t ovs-ofctl exit
1359 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1360 NXT_PACKET_IN (xid=0x0): cookie=0x1 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1361 udp,in_port=0,vlan_tci=0x0000,dl_src=20:22:22:22:22:22,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=8,tp_dst=11 udp_csum:1234
1363 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x3 total_len=64 in_port=1 reg0=0x1 (via action) data_len=64 (unbuffered)
1364 udp,in_port=0,dl_vlan=80,dl_vlan_pcp=0,dl_src=20:22:22:22:22:22,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=8,tp_dst=11 udp_csum:1234
1366 NXT_PACKET_IN (xid=0x0): table_id=2 cookie=0x4 total_len=64 in_port=1 reg0=0x1 reg1=0x2 (via action) data_len=64 (unbuffered)
1367 udp,in_port=0,dl_vlan=80,dl_vlan_pcp=0,dl_src=80:81:81:81:81:81,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=8,tp_dst=11 udp_csum:1234
1369 NXT_PACKET_IN (xid=0x0): table_id=3 cookie=0x5 total_len=64 in_port=1 reg0=0x1 reg1=0x2 reg2=0x3 (via action) data_len=64 (unbuffered)
1370 udp,in_port=0,dl_vlan=80,dl_vlan_pcp=0,dl_src=80:81:81:81:81:81,dl_dst=82:82:82:82:82:82,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=8,tp_dst=11 udp_csum:1234
1372 NXT_PACKET_IN (xid=0x0): table_id=4 cookie=0x6 total_len=64 in_port=1 reg0=0x1 reg1=0x2 reg2=0x3 reg3=0x4 (via action) data_len=64 (unbuffered)
1373 udp,in_port=0,dl_vlan=80,dl_vlan_pcp=0,dl_src=80:81:81:81:81:81,dl_dst=82:82:82:82:82:82,nw_src=83.83.83.83,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=8,tp_dst=11 udp_csum:2c37
1375 NXT_PACKET_IN (xid=0x0): table_id=5 cookie=0x7 total_len=64 in_port=1 tun_id=0x6 reg0=0x1 reg1=0x2 reg2=0x3 reg3=0x4 reg4=0x5 (via action) data_len=64 (unbuffered)
1376 udp,in_port=0,dl_vlan=80,dl_vlan_pcp=0,dl_src=80:81:81:81:81:81,dl_dst=82:82:82:82:82:82,nw_src=83.83.83.83,nw_dst=84.84.84.84,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=8,tp_dst=11 udp_csum:4439
1378 NXT_PACKET_IN (xid=0x0): table_id=6 cookie=0x8 total_len=64 in_port=1 tun_id=0x6 reg0=0x1 reg1=0x2 reg2=0x3 reg3=0x4 reg4=0x5 (via action) data_len=64 (unbuffered)
1379 udp,in_port=0,dl_vlan=80,dl_vlan_pcp=0,dl_src=80:81:81:81:81:81,dl_dst=82:82:82:82:82:82,nw_src=83.83.83.83,nw_dst=84.84.84.84,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=85,tp_dst=11 udp_csum:43ec
1381 NXT_PACKET_IN (xid=0x0): table_id=7 cookie=0x9 total_len=64 in_port=1 tun_id=0x6 reg0=0x1 reg1=0x2 reg2=0x3 reg3=0x4 reg4=0x5 (via action) data_len=64 (unbuffered)
1382 udp,in_port=0,dl_vlan=80,dl_vlan_pcp=0,dl_src=80:81:81:81:81:81,dl_dst=82:82:82:82:82:82,nw_src=83.83.83.83,nw_dst=84.84.84.84,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=85,tp_dst=86 udp_csum:43a1
1384 NXT_PACKET_IN (xid=0x0): table_id=7 cookie=0x9 total_len=64 in_port=1 tun_id=0x6 reg0=0x1 reg1=0x2 reg2=0x3 reg3=0x4 reg4=0x5 (via action) data_len=64 (unbuffered)
1385 udp,in_port=0,dl_vlan=80,dl_vlan_pcp=0,dl_src=80:81:81:81:81:81,dl_dst=82:82:82:82:82:82,nw_src=83.83.83.83,nw_dst=84.84.84.84,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=85,tp_dst=86 udp_csum:43a1
1388 dnl Modified ARP controller action.
1389 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1392 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=80:88:88:88:88:88,dst=ff:ff:ff:ff:ff:ff),eth_type(0x0806),arp(sip=192.168.0.1,tip=192.168.0.2,op=1,sha=50:54:00:00:00:05,tha=00:00:00:00:00:00)'
1395 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 18])
1396 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
1397 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1398 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1399 arp,in_port=0,vlan_tci=0x0000,dl_src=80:88:88:88:88:88,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=192.168.0.1,arp_tpa=192.168.0.2,arp_op=2,arp_sha=50:54:00:00:00:05,arp_tha=00:00:00:00:00:00
1400 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1401 arp,in_port=0,vlan_tci=0x0000,dl_src=80:88:88:88:88:88,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=192.168.128.1,arp_tpa=192.168.0.2,arp_op=2,arp_sha=50:54:00:00:00:05,arp_tha=00:00:00:00:00:00
1402 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1403 arp,in_port=0,vlan_tci=0x0000,dl_src=80:88:88:88:88:88,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=1.1.1.1,arp_tpa=2.2.2.2,arp_op=2,arp_sha=50:54:00:00:00:05,arp_tha=40:44:44:44:44:41
1404 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1405 arp,in_port=0,vlan_tci=0x0000,dl_src=80:88:88:88:88:88,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=192.168.0.1,arp_tpa=192.168.0.2,arp_op=2,arp_sha=50:54:00:00:00:05,arp_tha=00:00:00:00:00:00
1406 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1407 arp,in_port=0,vlan_tci=0x0000,dl_src=80:88:88:88:88:88,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=192.168.128.1,arp_tpa=192.168.0.2,arp_op=2,arp_sha=50:54:00:00:00:05,arp_tha=00:00:00:00:00:00
1408 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1409 arp,in_port=0,vlan_tci=0x0000,dl_src=80:88:88:88:88:88,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=1.1.1.1,arp_tpa=2.2.2.2,arp_op=2,arp_sha=50:54:00:00:00:05,arp_tha=40:44:44:44:44:41
1410 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1411 arp,in_port=0,vlan_tci=0x0000,dl_src=80:88:88:88:88:88,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=192.168.0.1,arp_tpa=192.168.0.2,arp_op=2,arp_sha=50:54:00:00:00:05,arp_tha=00:00:00:00:00:00
1412 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1413 arp,in_port=0,vlan_tci=0x0000,dl_src=80:88:88:88:88:88,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=192.168.128.1,arp_tpa=192.168.0.2,arp_op=2,arp_sha=50:54:00:00:00:05,arp_tha=00:00:00:00:00:00
1414 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1415 arp,in_port=0,vlan_tci=0x0000,dl_src=80:88:88:88:88:88,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=1.1.1.1,arp_tpa=2.2.2.2,arp_op=2,arp_sha=50:54:00:00:00:05,arp_tha=40:44:44:44:44:41
1418 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1421 AT_CHECK([ovs-ofctl monitor br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1424 ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 20 22 22 22 22 22 08 00 45 00 00 24 00 00 00 00 00 84 00 00 C0 A8 00 01 C0 A8 00 02 04 58 08 af 00 00 00 00 d9 d7 91 57 01 00 00 34 cf 28 ec 4e 00 01 40 00 00 0a ff ff b7 53 24 19 00 05 00 08 7f 00 00 01 00 05 00 08 c0 a8 02 07 00 0c 00 06 00 05 00 00 80 00 00 04 c0 00 00 04'
1427 AT_CHECK([ovs-appctl time/warp 1000], [0], [ignore])
1428 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 18])
1429 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
1430 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1431 NXT_PACKET_IN (xid=0x0): cookie=0x1 total_len=98 in_port=1 (via action) data_len=98 (unbuffered)
1432 sctp,in_port=0,vlan_tci=0x0000,dl_src=20:22:22:22:22:22,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=1112,tp_dst=2223 sctp_csum:d9d79157
1434 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x3 total_len=102 in_port=1 reg0=0x1 (via action) data_len=102 (unbuffered)
1435 sctp,in_port=0,dl_vlan=80,dl_vlan_pcp=0,dl_src=20:22:22:22:22:22,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=1112,tp_dst=2223 sctp_csum:d9d79157
1437 NXT_PACKET_IN (xid=0x0): table_id=2 cookie=0x4 total_len=102 in_port=1 reg0=0x1 reg1=0x2 (via action) data_len=102 (unbuffered)
1438 sctp,in_port=0,dl_vlan=80,dl_vlan_pcp=0,dl_src=80:81:81:81:81:81,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=1112,tp_dst=2223 sctp_csum:d9d79157
1440 NXT_PACKET_IN (xid=0x0): table_id=3 cookie=0x5 total_len=102 in_port=1 reg0=0x1 reg1=0x2 reg2=0x3 (via action) data_len=102 (unbuffered)
1441 sctp,in_port=0,dl_vlan=80,dl_vlan_pcp=0,dl_src=80:81:81:81:81:81,dl_dst=82:82:82:82:82:82,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=1112,tp_dst=2223 sctp_csum:d9d79157
1443 NXT_PACKET_IN (xid=0x0): table_id=4 cookie=0x6 total_len=102 in_port=1 reg0=0x1 reg1=0x2 reg2=0x3 reg3=0x4 (via action) data_len=102 (unbuffered)
1444 sctp,in_port=0,dl_vlan=80,dl_vlan_pcp=0,dl_src=80:81:81:81:81:81,dl_dst=82:82:82:82:82:82,nw_src=83.83.83.83,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=1112,tp_dst=2223 sctp_csum:d9d79157
1446 NXT_PACKET_IN (xid=0x0): table_id=5 cookie=0x7 total_len=102 in_port=1 tun_id=0x6 reg0=0x1 reg1=0x2 reg2=0x3 reg3=0x4 reg4=0x5 (via action) data_len=102 (unbuffered)
1447 sctp,in_port=0,dl_vlan=80,dl_vlan_pcp=0,dl_src=80:81:81:81:81:81,dl_dst=82:82:82:82:82:82,nw_src=83.83.83.83,nw_dst=84.84.84.84,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=1112,tp_dst=2223 sctp_csum:d9d79157
1449 NXT_PACKET_IN (xid=0x0): table_id=6 cookie=0x8 total_len=102 in_port=1 tun_id=0x6 reg0=0x1 reg1=0x2 reg2=0x3 reg3=0x4 reg4=0x5 (via action) data_len=102 (unbuffered)
1450 sctp,in_port=0,dl_vlan=80,dl_vlan_pcp=0,dl_src=80:81:81:81:81:81,dl_dst=82:82:82:82:82:82,nw_src=83.83.83.83,nw_dst=84.84.84.84,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=85,tp_dst=2223 sctp_csum:7f12662e
1452 NXT_PACKET_IN (xid=0x0): table_id=7 cookie=0x9 total_len=102 in_port=1 tun_id=0x6 reg0=0x1 reg1=0x2 reg2=0x3 reg3=0x4 reg4=0x5 (via action) data_len=102 (unbuffered)
1453 sctp,in_port=0,dl_vlan=80,dl_vlan_pcp=0,dl_src=80:81:81:81:81:81,dl_dst=82:82:82:82:82:82,nw_src=83.83.83.83,nw_dst=84.84.84.84,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=85,tp_dst=86 sctp_csum:a7e86f67
1455 NXT_PACKET_IN (xid=0x0): table_id=7 cookie=0x9 total_len=102 in_port=1 tun_id=0x6 reg0=0x1 reg1=0x2 reg2=0x3 reg3=0x4 reg4=0x5 (via action) data_len=102 (unbuffered)
1456 sctp,in_port=0,dl_vlan=80,dl_vlan_pcp=0,dl_src=80:81:81:81:81:81,dl_dst=82:82:82:82:82:82,nw_src=83.83.83.83,nw_dst=84.84.84.84,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=85,tp_dst=86 sctp_csum:a7e86f67
1459 AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
1460 cookie=0x1, n_packets=3, n_bytes=218, dl_src=20:22:22:22:22:22 actions=CONTROLLER:65535,resubmit(80,1)
1461 cookie=0x2, n_packets=3, n_bytes=180, dl_src=30:33:33:33:33:33 actions=mod_vlan_vid:15,CONTROLLER:65535
1462 cookie=0x3, table=1, n_packets=3, n_bytes=218, in_port=80 actions=load:0x1->NXM_NX_REG0[[]],mod_vlan_vid:80,CONTROLLER:65535,resubmit(81,2)
1463 cookie=0x4, table=2, n_packets=3, n_bytes=218, in_port=81 actions=load:0x2->NXM_NX_REG1[[]],mod_dl_src:80:81:81:81:81:81,CONTROLLER:65535,resubmit(82,3)
1464 cookie=0x5, table=3, n_packets=3, n_bytes=218, in_port=82 actions=load:0x3->NXM_NX_REG2[[]],mod_dl_dst:82:82:82:82:82:82,CONTROLLER:65535,resubmit(83,4)
1465 cookie=0x6, table=4, n_packets=3, n_bytes=218, in_port=83 actions=load:0x4->NXM_NX_REG3[[]],mod_nw_src:83.83.83.83,CONTROLLER:65535,resubmit(84,5)
1466 cookie=0x7, table=5, n_packets=3, n_bytes=218, in_port=84 actions=load:0x5->NXM_NX_REG4[[]],load:0x6->NXM_NX_TUN_ID[[]],mod_nw_dst:84.84.84.84,CONTROLLER:65535,resubmit(85,6)
1467 cookie=0x8, table=6, n_packets=3, n_bytes=218, in_port=85 actions=mod_tp_src:85,CONTROLLER:65535,resubmit(86,7)
1468 cookie=0x9, table=7, n_packets=3, n_bytes=218, in_port=86 actions=mod_tp_dst:86,CONTROLLER:65535,CONTROLLER:65535
1469 cookie=0xa, n_packets=3, n_bytes=180, dl_src=40:44:44:44:44:41 actions=mod_vlan_vid:99,mod_vlan_pcp:1,CONTROLLER:65535
1470 cookie=0xd, n_packets=3, n_bytes=180, arp,dl_src=80:88:88:88:88:88 actions=load:0x2->NXM_OF_ARP_OP[[]],CONTROLLER:65535,load:0xc0a88001->NXM_OF_ARP_SPA[[]],CONTROLLER:65535,load:0x404444444441->NXM_NX_ARP_THA[[]],load:0x1010101->NXM_OF_ARP_SPA[[]],load:0x2020202->NXM_OF_ARP_TPA[[]],CONTROLLER:65535
1471 n_packets=3, n_bytes=180, dl_src=10:11:11:11:11:11 actions=CONTROLLER:65535
1478 AT_SETUP([ofproto-dpif - MPLS handling])
1479 OVS_VSWITCHD_START([dnl
1480 add-port br0 p1 -- set Interface p1 type=dummy
1482 ON_EXIT([kill `cat ovs-ofctl.pid`])
1484 AT_CAPTURE_FILE([ofctl_monitor.log])
1485 AT_DATA([flows.txt], [dnl
1486 cookie=0xa dl_src=40:44:44:44:44:42 actions=push_mpls:0x8847,load:10->OXM_OF_MPLS_LABEL[[]],load:3->OXM_OF_MPLS_TC[[]],controller
1487 cookie=0xa dl_src=41:44:44:44:44:42 actions=push_mpls:0x8847,load:10->OXM_OF_MPLS_LABEL[[]],load:3->OXM_OF_MPLS_TC[[]],pop_mpls:0x0800,controller
1488 cookie=0xa dl_src=40:44:44:44:44:43 actions=push_mpls:0x8847,load:10->OXM_OF_MPLS_LABEL[[]],load:3->OXM_OF_MPLS_TC[[]],controller
1489 cookie=0xa dl_src=40:44:44:44:44:44 actions=push_mpls:0x8847,load:10->OXM_OF_MPLS_LABEL[[]],load:3->OXM_OF_MPLS_TC[[]],controller
1490 cookie=0xa dl_src=40:44:44:44:44:45 actions=push_mpls:0x8847,load:10->OXM_OF_MPLS_LABEL[[]],load:3->OXM_OF_MPLS_TC[[]],dec_mpls_ttl,controller
1491 cookie=0xa dl_src=40:44:44:44:44:46 actions=push_mpls:0x8847,load:10->OXM_OF_MPLS_LABEL[[]],load:3->OXM_OF_MPLS_TC[[]],set_mpls_ttl(10),controller
1492 cookie=0xa dl_src=40:44:44:44:44:47 actions=push_mpls:0x8847,load:10->OXM_OF_MPLS_LABEL[[]],load:3->OXM_OF_MPLS_TC[[]],dec_mpls_ttl,set_mpls_ttl(10),controller
1493 cookie=0xa dl_src=40:44:44:44:44:48 actions=push_mpls:0x8847,load:10->OXM_OF_MPLS_LABEL[[]],load:3->OXM_OF_MPLS_TC[[]],set_mpls_ttl(10),dec_mpls_ttl,controller
1494 cookie=0xa mpls,dl_src=40:44:44:44:44:49 actions=push_mpls:0x8848,load:10->OXM_OF_MPLS_LABEL[[]],CONTROLLER:65535
1495 cookie=0xb dl_src=50:55:55:55:55:55 dl_type=0x8847 actions=load:1000->OXM_OF_MPLS_LABEL[[]],controller
1496 cookie=0xd dl_src=60:66:66:66:66:66 actions=pop_mpls:0x0800,controller
1497 cookie=0xc dl_src=70:77:77:77:77:77 actions=push_mpls:0x8848,load:1000->OXM_OF_MPLS_LABEL[[]],load:7->OXM_OF_MPLS_TC[[]],controller
1499 cookie=0xd dl_src=60:66:66:66:00:01 actions=pop_mpls:0x0800,dec_ttl,controller
1500 cookie=0xd dl_src=60:66:66:66:00:02 actions=pop_mpls:0x0800,load:0xa000001->OXM_OF_IPV4_DST[[]],controller
1501 cookie=0xd dl_src=60:66:66:66:00:03 actions=pop_mpls:0x0800,move:OXM_OF_IPV4_DST[[]]->OXM_OF_IPV4_SRC[[]],controller
1502 cookie=0xd dl_src=60:66:66:66:00:04 actions=pop_mpls:0x0800,push:OXM_OF_IPV4_DST[[]],pop:OXM_OF_IPV4_SRC[[]],controller
1503 cookie=0xd dl_src=60:66:66:66:00:05 actions=pop_mpls:0x0800,multipath(eth_src,50,modulo_n,256,0,OXM_OF_IPV4_SRC[[0..7]]),controller
1504 cookie=0xd dl_src=60:66:66:66:00:06 actions=pop_mpls:0x0800,bundle_load(eth_src,50,hrw,ofport,OXM_OF_IPV4_SRC[[0..15]],slaves:1,2),controller
1505 cookie=0xd dl_src=60:66:66:66:00:07 actions=pop_mpls:0x0800,learn(table=1,hard_timeout=60,eth_type=0x800,nw_proto=6,OXM_OF_IPV4_SRC[[]]=OXM_OF_IPV4_DST[[]]),controller
1507 cookie=0xd dl_src=60:66:66:66:00:08 actions=pop_mpls:0x0806,resubmit(1,1)
1508 cookie=0xd table=1 arp actions=controller
1510 cookie=0xd dl_src=60:66:66:66:00:09 actions=pop_mpls:0x0800,mod_nw_tos:48,controller
1511 cookie=0xd dl_src=60:66:66:66:00:0a actions=pop_mpls:0x0800,mod_nw_dst:10.0.0.1,controller
1512 cookie=0xd dl_src=60:66:66:66:00:0b actions=pop_mpls:0x0800,mod_nw_src:10.0.0.1,controller
1514 cookie=0xd dl_src=60:66:66:66:01:00 actions=pop_mpls:0x8848,controller
1515 cookie=0xd dl_src=60:66:66:66:01:01 actions=pop_mpls:0x8847,dec_mpls_ttl,controller
1516 cookie=0xd dl_src=60:66:66:66:01:02 actions=pop_mpls:0x8848,load:3->OXM_OF_MPLS_TC[[]],controller
1518 cookie=0xd dl_src=60:66:66:66:02:00 actions=pop_mpls:0x8847,pop_mpls:0x0800,controller
1519 cookie=0xd dl_src=60:66:66:66:02:01 actions=pop_mpls:0x8848,pop_mpls:0x0800,dec_ttl,controller
1520 cookie=0xd dl_src=60:66:66:66:02:10 actions=pop_mpls:0x8847,dec_mpls_ttl,pop_mpls:0x0800,dec_ttl,controller
1522 cookie=0xd dl_src=60:66:66:66:03:00 actions=pop_mpls:0x8848,pop_mpls:0x8848,controller
1523 cookie=0xd dl_src=60:66:66:66:03:01 actions=pop_mpls:0x8847,pop_mpls:0x8847,dec_mpls_ttl,controller
1524 cookie=0xd dl_src=60:66:66:66:03:10 actions=pop_mpls:0x8848,dec_mpls_ttl,pop_mpls:0x8848,dec_mpls_ttl,controller
1526 cookie=0xd dl_src=60:66:66:66:04:00 actions=pop_mpls:0x0800,push_mpls:0x8847,controller
1527 cookie=0xd dl_src=60:66:66:66:04:01 actions=pop_mpls:0x0800,push_mpls:0x8848,dec_mpls_ttl,controller
1528 cookie=0xd dl_src=60:66:66:66:04:10 actions=pop_mpls:0x0800,dec_ttl,push_mpls:0x8848,dec_mpls_ttl,controller
1530 cookie=0xd dl_src=60:66:66:66:05:00 actions=push_mpls:0x8848,pop_mpls:0x8847,controller
1531 cookie=0xd dl_src=60:66:66:66:05:01 actions=push_mpls:0x8847,pop_mpls:0x8848,dec_mpls_ttl,controller
1532 cookie=0xd dl_src=60:66:66:66:05:10 actions=push_mpls:0x8848,dec_mpls_ttl,pop_mpls:0x8847,dec_mpls_ttl,controller
1534 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
1536 dnl Modified MPLS controller action.
1537 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1540 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=40:44:44:44:44:42,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=17,tos=0,ttl=64,frag=no),udp(src=7777,dst=80)'
1542 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1543 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1545 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1546 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1547 mpls,in_port=0,vlan_tci=0x0000,dl_src=40:44:44:44:44:42,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=64,mpls_bos=1
1549 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1550 mpls,in_port=0,vlan_tci=0x0000,dl_src=40:44:44:44:44:42,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=64,mpls_bos=1
1552 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1553 mpls,in_port=0,vlan_tci=0x0000,dl_src=40:44:44:44:44:42,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=64,mpls_bos=1
1556 dnl Modified MPLS controller action.
1557 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1560 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=41:44:44:44:44:42,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=16,tos=0,ttl=64,frag=no)'
1562 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1563 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1565 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1566 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1567 ip,in_port=0,vlan_tci=0x0000,dl_src=41:44:44:44:44:42,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_proto=16,nw_tos=0,nw_ecn=0,nw_ttl=64
1569 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1570 ip,in_port=0,vlan_tci=0x0000,dl_src=41:44:44:44:44:42,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_proto=16,nw_tos=0,nw_ecn=0,nw_ttl=64
1572 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1573 ip,in_port=0,vlan_tci=0x0000,dl_src=41:44:44:44:44:42,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_proto=16,nw_tos=0,nw_ecn=0,nw_ttl=64
1576 dnl Modified MPLS controller action.
1577 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1579 dnl in_port(1),eth(src=00:01:02:03:04:05,dst=10:11:12:13:14:15),eth_type(0x8847),mpls(label=100,tc=3,ttl=64,bos=1)
1582 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=40:44:44:44:44:43,dst=50:54:00:00:00:07),eth_type(0x8847),mpls(label=11,tc=3,ttl=64,bos=1)'
1584 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1585 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1587 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1588 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1589 mpls,in_port=0,vlan_tci=0x0000,dl_src=40:44:44:44:44:43,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=64,mpls_bos=0,mpls_lse1=46912
1591 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1592 mpls,in_port=0,vlan_tci=0x0000,dl_src=40:44:44:44:44:43,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=64,mpls_bos=0,mpls_lse1=46912
1594 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1595 mpls,in_port=0,vlan_tci=0x0000,dl_src=40:44:44:44:44:43,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=64,mpls_bos=0,mpls_lse1=46912
1598 dnl Modified MPLS controller action.
1599 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1602 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=40:44:44:44:44:44,dst=50:54:00:00:00:07),eth_type(0x8100),vlan(vid=99,pcp=7),encap(eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=16,tos=0,ttl=64,frag=no))'
1604 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1605 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1607 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1608 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1609 mpls,in_port=0,dl_vlan=99,dl_vlan_pcp=7,dl_src=40:44:44:44:44:44,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=64,mpls_bos=1
1611 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1612 mpls,in_port=0,dl_vlan=99,dl_vlan_pcp=7,dl_src=40:44:44:44:44:44,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=64,mpls_bos=1
1614 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1615 mpls,in_port=0,dl_vlan=99,dl_vlan_pcp=7,dl_src=40:44:44:44:44:44,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=64,mpls_bos=1
1618 dnl Modified MPLS controller action.
1619 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1622 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=40:44:44:44:44:45,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=16,tos=0,ttl=64,frag=no)'
1624 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1625 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1627 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1628 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1629 mpls,in_port=0,vlan_tci=0x0000,dl_src=40:44:44:44:44:45,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=63,mpls_bos=1
1631 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1632 mpls,in_port=0,vlan_tci=0x0000,dl_src=40:44:44:44:44:45,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=63,mpls_bos=1
1634 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1635 mpls,in_port=0,vlan_tci=0x0000,dl_src=40:44:44:44:44:45,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=63,mpls_bos=1
1638 dnl Modified MPLS controller action.
1639 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1642 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=40:44:44:44:44:46,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=16,tos=0,ttl=64,frag=no)'
1644 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1645 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1647 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1648 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1649 mpls,in_port=0,vlan_tci=0x0000,dl_src=40:44:44:44:44:46,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=10,mpls_bos=1
1651 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1652 mpls,in_port=0,vlan_tci=0x0000,dl_src=40:44:44:44:44:46,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=10,mpls_bos=1
1654 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1655 mpls,in_port=0,vlan_tci=0x0000,dl_src=40:44:44:44:44:46,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=10,mpls_bos=1
1658 dnl Modified MPLS controller action.
1659 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1662 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=40:44:44:44:44:47,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=16,tos=0,ttl=64,frag=no)'
1664 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1665 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1667 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1668 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1669 mpls,in_port=0,vlan_tci=0x0000,dl_src=40:44:44:44:44:47,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=10,mpls_bos=1
1671 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1672 mpls,in_port=0,vlan_tci=0x0000,dl_src=40:44:44:44:44:47,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=10,mpls_bos=1
1674 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1675 mpls,in_port=0,vlan_tci=0x0000,dl_src=40:44:44:44:44:47,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=10,mpls_bos=1
1678 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1680 dnl Modified MPLS controller action.
1681 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1684 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=40:44:44:44:44:49,dst=50:54:00:00:00:07),eth_type(0x8847),mpls(label=10,tc=3,ttl=64,bos=1)'
1686 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1687 ovs-appctl -t ovs-ofctl exit
1689 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1690 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1691 mplsm,in_port=0,vlan_tci=0x0000,dl_src=40:44:44:44:44:49,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=64,mpls_bos=0,mpls_lse1=42816
1693 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1694 mplsm,in_port=0,vlan_tci=0x0000,dl_src=40:44:44:44:44:49,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=64,mpls_bos=0,mpls_lse1=42816
1696 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1697 mplsm,in_port=0,vlan_tci=0x0000,dl_src=40:44:44:44:44:49,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=64,mpls_bos=0,mpls_lse1=42816
1700 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1702 dnl Modified MPLS controller action.
1703 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1706 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=40:44:44:44:44:48,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=16,tos=0,ttl=64,frag=no)'
1708 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1709 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1711 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1712 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1713 mpls,in_port=0,vlan_tci=0x0000,dl_src=40:44:44:44:44:48,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=9,mpls_bos=1
1715 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1716 mpls,in_port=0,vlan_tci=0x0000,dl_src=40:44:44:44:44:48,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=9,mpls_bos=1
1718 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1719 mpls,in_port=0,vlan_tci=0x0000,dl_src=40:44:44:44:44:48,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=9,mpls_bos=1
1722 dnl Modified MPLS actions.
1723 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1726 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:55:55:55:55:55,dst=50:54:00:00:00:07),eth_type(0x8847),mpls(label=100,tc=7,ttl=64,bos=1)'
1728 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1729 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1731 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1732 NXT_PACKET_IN (xid=0x0): cookie=0xb total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1733 mpls,in_port=0,vlan_tci=0x0000,dl_src=50:55:55:55:55:55,dl_dst=50:54:00:00:00:07,mpls_label=1000,mpls_tc=7,mpls_ttl=64,mpls_bos=1
1735 NXT_PACKET_IN (xid=0x0): cookie=0xb total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1736 mpls,in_port=0,vlan_tci=0x0000,dl_src=50:55:55:55:55:55,dl_dst=50:54:00:00:00:07,mpls_label=1000,mpls_tc=7,mpls_ttl=64,mpls_bos=1
1738 NXT_PACKET_IN (xid=0x0): cookie=0xb total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1739 mpls,in_port=0,vlan_tci=0x0000,dl_src=50:55:55:55:55:55,dl_dst=50:54:00:00:00:07,mpls_label=1000,mpls_tc=7,mpls_ttl=64,mpls_bos=1
1742 dnl Modified MPLS ipv6 controller action.
1743 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1746 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=70:77:77:77:77:77,dst=50:54:00:00:00:07),eth_type(0x86dd),ipv6(src=::1,dst=::2,label=0,proto=10,tclass=0x70,hlimit=128,frag=no)'
1748 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1749 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1751 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1752 NXT_PACKET_IN (xid=0x0): cookie=0xc total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1753 mplsm,in_port=0,vlan_tci=0x0000,dl_src=70:77:77:77:77:77,dl_dst=50:54:00:00:00:07,mpls_label=1000,mpls_tc=7,mpls_ttl=128,mpls_bos=1
1755 NXT_PACKET_IN (xid=0x0): cookie=0xc total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1756 mplsm,in_port=0,vlan_tci=0x0000,dl_src=70:77:77:77:77:77,dl_dst=50:54:00:00:00:07,mpls_label=1000,mpls_tc=7,mpls_ttl=128,mpls_bos=1
1758 NXT_PACKET_IN (xid=0x0): cookie=0xc total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1759 mplsm,in_port=0,vlan_tci=0x0000,dl_src=70:77:77:77:77:77,dl_dst=50:54:00:00:00:07,mpls_label=1000,mpls_tc=7,mpls_ttl=128,mpls_bos=1
1763 dnl Modified MPLS pop action.
1764 dnl The input is a frame with two MPLS headers which tcpdump -vve shows as:
1765 dnl 60:66:66:66:66:66 > 50:54:00:00:00:07, ethertype MPLS multicast (0x8847), length 66: MPLS (label 20, exp 0, ttl 32)
1766 dnl (tos 0x0, ttl 64, id 0, offset 0, flags [none], proto TCP (6), length 44)
1768 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1771 ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 60 66 66 66 66 66 88 47 00 01 41 20 45 00 00 2c 00 00 00 00 40 06 3b 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45'
1774 # ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=60:66:66:66:66:66,dst=50:54:00:00:00:07),eth_type(0x8847),mpls(label=10,tc=3,ttl=100,bos=1)'
1776 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1777 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1779 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1780 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1781 tcp,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:66:66,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744
1783 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1784 tcp,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:66:66,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744
1786 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1787 tcp,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:66:66,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744
1790 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1792 dnl Modified MPLS pop action.
1793 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
1794 dnl 60:66:66:66:00:01 > 50:54:00:00:00:07, ethertype MPLS multicast (0x8848), length 62: MPLS (label 20, exp 0, [S], ttl 32)
1795 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
1796 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
1797 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1800 ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 60 66 66 66 00 01 88 48 00 01 41 20 45 00 00 2c 00 00 00 00 ff 06 3a 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45'
1802 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1803 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1805 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
1806 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1807 tcp,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:00:01,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=254,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744
1809 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1810 tcp,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:00:01,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=254,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744
1812 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1813 tcp,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:00:01,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=254,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744
1816 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1818 dnl Modified MPLS pop action.
1819 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
1820 dnl 60:66:66:66:00:02 > 50:54:00:00:00:07, ethertype MPLS unicast (0x8847), length 62: MPLS (label 20, exp 0, [S], ttl 32)
1821 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
1822 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
1823 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1826 ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 60 66 66 66 00 02 88 47 00 01 41 20 45 00 00 2c 00 00 00 00 ff 06 3a 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45'
1828 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1829 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1831 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
1832 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1833 tcp,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:00:02,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=10.0.0.1,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:2dee
1835 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1836 tcp,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:00:02,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=10.0.0.1,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:2dee
1838 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1839 tcp,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:00:02,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=10.0.0.1,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:2dee
1842 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1844 dnl Modified MPLS pop action.
1845 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
1846 dnl 60:66:66:66:00:03 > 50:54:00:00:00:07, ethertype MPLS multicast (0x8848), length 62: MPLS (label 20, exp 0, [S], ttl 32)
1847 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
1848 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
1849 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1852 ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 60 66 66 66 00 03 88 48 00 01 41 20 45 00 00 2c 00 00 00 00 ff 06 3a 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45'
1854 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1855 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1857 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
1858 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1859 tcp,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:00:03,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.2,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7743
1861 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1862 tcp,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:00:03,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.2,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7743
1864 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1865 tcp,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:00:03,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.2,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7743
1868 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1870 dnl Modified MPLS pop action.
1871 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
1872 dnl 60:66:66:66:00:04 > 50:54:00:00:00:07, ethertype MPLS unicast (0x8847), length 62: MPLS (label 20, exp 0, [S], ttl 32)
1873 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
1874 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
1875 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1878 ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 60 66 66 66 00 04 88 47 00 01 41 20 45 00 00 2c 00 00 00 00 ff 06 3a 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45'
1880 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1881 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1883 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
1884 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1885 tcp,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:00:04,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.2,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7743
1887 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1888 tcp,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:00:04,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.2,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7743
1890 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1891 tcp,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:00:04,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.2,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7743
1894 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1896 dnl Modified MPLS pop action.
1897 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
1898 dnl 60:66:66:66:00:05 > 50:54:00:00:00:07, ethertype MPLS unicast (0x8847), length 62: MPLS (label 20, exp 0, [S], ttl 32)
1899 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
1900 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
1901 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1904 ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 60 66 66 66 00 05 88 48 00 01 41 20 45 00 00 2c 00 00 00 00 ff 06 3a 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45'
1906 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1907 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1909 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
1910 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1911 tcp,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:00:05,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.106,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:76db
1913 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1914 tcp,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:00:05,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.106,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:76db
1916 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1917 tcp,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:00:05,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.106,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:76db
1920 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1922 dnl Modified MPLS pop action.
1923 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
1924 dnl 60:66:66:66:00:06 > 50:54:00:00:00:07, ethertype MPLS multicast (0x8848), length 62: MPLS (label 20, exp 0, [S], ttl 32)
1925 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
1926 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
1927 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1930 ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 60 66 66 66 00 06 88 47 00 01 41 20 45 00 00 2c 00 00 00 00 ff 06 3a 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45'
1932 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1933 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1935 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
1936 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1937 tcp,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:00:06,dl_dst=50:54:00:00:00:07,nw_src=192.168.255.255,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7745
1939 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1940 tcp,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:00:06,dl_dst=50:54:00:00:00:07,nw_src=192.168.255.255,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7745
1942 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1943 tcp,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:00:06,dl_dst=50:54:00:00:00:07,nw_src=192.168.255.255,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7745
1946 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1948 dnl Modified MPLS pop action.
1949 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
1950 dnl 60:66:66:66:00:07 > 50:54:00:00:00:07, ethertype MPLS multicast (0x8848), length 62: MPLS (label 20, exp 0, [S], ttl 32)
1951 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
1952 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
1953 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1956 ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 60 66 66 66 00 07 88 48 00 01 41 20 45 00 00 2c 00 00 00 00 ff 06 3a 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45'
1958 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1959 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1961 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
1962 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1963 tcp,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:00:07,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744
1965 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1966 tcp,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:00:07,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744
1968 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1969 tcp,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:00:07,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744
1972 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1974 dnl Modified MPLS pop action.
1975 dnl The input is an ARP frame with a single MPLS label stack entry which tcpdump -vve shows as:
1976 dnl 60:66:66:66:00:08 > ff:ff:ff:ff:ff:ff, ethertype MPLS unicast (0x8847), length 46: MPLS (label 20, exp 0, [S], ttl 32)
1977 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1980 ovs-appctl netdev-dummy/receive p1 'ff ff ff ff ff ff 60 66 66 66 00 08 88 47 00 01 41 20 00 01 08 00 06 04 00 02 60 66 66 66 00 08 c0 a8 00 01 ff ff ff ff ff ff ff ff ff ff'
1982 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1983 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1985 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
1986 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0xd total_len=56 in_port=1 (via action) data_len=56 (unbuffered)
1987 arp,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:00:08,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=192.168.0.1,arp_tpa=255.255.255.255,arp_op=2,arp_sha=60:66:66:66:00:08,arp_tha=ff:ff:ff:ff:ff:ff
1989 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0xd total_len=56 in_port=1 (via action) data_len=56 (unbuffered)
1990 arp,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:00:08,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=192.168.0.1,arp_tpa=255.255.255.255,arp_op=2,arp_sha=60:66:66:66:00:08,arp_tha=ff:ff:ff:ff:ff:ff
1992 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0xd total_len=56 in_port=1 (via action) data_len=56 (unbuffered)
1993 arp,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:00:08,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=192.168.0.1,arp_tpa=255.255.255.255,arp_op=2,arp_sha=60:66:66:66:00:08,arp_tha=ff:ff:ff:ff:ff:ff
1996 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1998 dnl Modified MPLS pop action.
1999 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
2000 dnl 60:66:66:66:00:09 > 50:54:00:00:00:07, ethertype MPLS multicast (0x8848), length 62: MPLS (label 20, exp 0, [S], ttl 32)
2001 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
2002 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
2003 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2006 ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 60 66 66 66 00 09 88 48 00 01 41 20 45 00 00 2c 00 00 00 00 ff 06 3a 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45'
2008 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2009 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2011 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
2012 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2013 tcp,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:00:09,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=48,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744
2015 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2016 tcp,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:00:09,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=48,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744
2018 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2019 tcp,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:00:09,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=48,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744
2022 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2024 dnl Modified MPLS pop action.
2025 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
2026 dnl 60:66:66:66:00:0a > 50:54:00:00:00:07, ethertype MPLS multicast (0x8848), length 62: MPLS (label 20, exp 0, [S], ttl 32)
2027 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
2028 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
2029 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2032 ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 60 66 66 66 00 0a 88 48 00 01 41 20 45 00 00 2c 00 00 00 00 ff 06 3a 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45'
2034 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2035 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2037 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
2038 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2039 tcp,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:00:0a,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=10.0.0.1,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:2dee
2041 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2042 tcp,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:00:0a,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=10.0.0.1,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:2dee
2044 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2045 tcp,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:00:0a,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=10.0.0.1,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:2dee
2048 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2050 dnl Modified MPLS pop action.
2051 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
2052 dnl 60:66:66:66:00:0b > 50:54:00:00:00:07, ethertype MPLS multicast (0x8848), length 62: MPLS (label 20, exp 0, [S], ttl 32)
2053 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
2054 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
2055 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2058 ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 60 66 66 66 00 0b 88 48 00 01 41 20 45 00 00 2c 00 00 00 00 ff 06 3a 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45'
2060 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2061 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2063 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
2064 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2065 tcp,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:00:0b,dl_dst=50:54:00:00:00:07,nw_src=10.0.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:2ded
2067 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2068 tcp,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:00:0b,dl_dst=50:54:00:00:00:07,nw_src=10.0.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:2ded
2070 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2071 tcp,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:00:0b,dl_dst=50:54:00:00:00:07,nw_src=10.0.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:2ded
2074 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2076 dnl Modified MPLS pop action.
2077 dnl The input is a frame with two MPLS label stack entries which tcpdump -vve shows as:
2078 dnl 60:66:66:66:01:00 > 50:54:00:00:00:07, ethertype MPLS multicast (0x8848), length 66: MPLS (label 20, exp 0, ttl 32)
2079 dnl (label 20, exp 0, [S], ttl 31)
2080 dnl (tos 0x0, ttl 254, id 0, offset 0, flags [none], proto TCP (6), length 44)
2081 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
2082 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2085 ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 60 66 66 66 01 00 88 48 00 01 40 20 00 01 41 1f 45 00 00 2c 00 00 00 00 ff 06 3b 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45'
2087 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2088 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2090 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2091 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2092 mplsm,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:01:00,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=0,mpls_ttl=31,mpls_bos=1
2094 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2095 mplsm,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:01:00,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=0,mpls_ttl=31,mpls_bos=1
2097 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2098 mplsm,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:01:00,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=0,mpls_ttl=31,mpls_bos=1
2101 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2103 dnl Modified MPLS pop action.
2104 dnl The input is a frame with two MPLS label stack entries which tcpdump -vve shows as:
2105 dnl 60:66:66:66:01:01 > 50:54:00:00:00:07, ethertype MPLS unicast (0x8847), length 66: MPLS (label 20, exp 0, ttl 32)
2106 dnl (label 20, exp 0, [S], ttl 31)
2107 dnl (tos 0x0, ttl 254, id 0, offset 0, flags [none], proto TCP (6), length 44)
2108 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
2109 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2112 ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 60 66 66 66 01 01 88 47 00 01 40 20 00 01 41 1f 45 00 00 2c 00 00 00 00 ff 06 3b 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45'
2114 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2115 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2117 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2118 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2119 mpls,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:01:01,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=0,mpls_ttl=30,mpls_bos=1
2121 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2122 mpls,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:01:01,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=0,mpls_ttl=30,mpls_bos=1
2124 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2125 mpls,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:01:01,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=0,mpls_ttl=30,mpls_bos=1
2128 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2130 dnl Modified MPLS pop action.
2131 dnl The input is a frame with two MPLS label stack entries which tcpdump -vve shows as:
2132 dnl 60:66:66:66:01:02 > 50:54:00:00:00:07, ethertype MPLS multicast (0x8848), length 66: MPLS (label 20, exp 0, ttl 32)
2133 dnl (label 20, exp 0, [S], ttl 31)
2134 dnl (tos 0x0, ttl 254, id 0, offset 0, flags [none], proto TCP (6), length 44)
2135 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
2136 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2139 ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 60 66 66 66 01 02 88 48 00 01 40 20 00 01 41 1f 45 00 00 2c 00 00 00 00 ff 06 3b 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45'
2141 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2142 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2144 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2145 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2146 mplsm,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:01:02,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=3,mpls_ttl=31,mpls_bos=1
2148 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2149 mplsm,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:01:02,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=3,mpls_ttl=31,mpls_bos=1
2151 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2152 mplsm,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:01:02,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=3,mpls_ttl=31,mpls_bos=1
2155 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2157 dnl Modified MPLS pop action.
2158 dnl The input is a frame with two MPLS label stack entries which tcpdump -vve shows as:
2159 dnl 60:66:66:66:02:00 > 50:54:00:00:02:00, ethertype MPLS unicast (0x8847), length 66: MPLS (label 20, exp 0, ttl 32)
2160 dnl (label 20, exp 0, [S], ttl 31)
2161 dnl (tos 0x0, ttl 254, id 0, offset 0, flags [none], proto TCP (6), length 44)
2162 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
2163 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2166 ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 60 66 66 66 02 00 88 47 00 01 40 20 00 01 41 1f 45 00 00 2c 00 00 00 00 ff 06 3b 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45'
2168 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2169 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2171 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2172 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2173 tcp,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:02:00,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744
2175 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2176 tcp,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:02:00,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744
2178 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2179 tcp,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:02:00,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744
2182 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2184 dnl Modified MPLS pop action.
2185 dnl The input is a frame with two MPLS label stack entries which tcpdump -vve shows as:
2186 dnl 60:66:66:66:02:01 > 50:54:00:00:02:01, ethertype MPLS multicast (0x8848), length 66: MPLS (label 20, exp 0, ttl 32)
2187 dnl (label 20, exp 0, [S], ttl 31)
2188 dnl (tos 0x0, ttl 254, id 0, offset 0, flags [none], proto TCP (6), length 44)
2189 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
2190 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2193 ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 60 66 66 66 02 01 88 48 00 01 40 20 00 01 41 1f 45 00 00 2c 00 00 00 00 ff 06 3b 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45'
2195 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2196 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2198 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
2199 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2200 tcp,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:02:01,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=254,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744
2202 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2203 tcp,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:02:01,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=254,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744
2205 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2206 tcp,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:02:01,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=254,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744
2209 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2211 dnl Modified MPLS pop action.
2212 dnl The input is a frame with two MPLS label stack entries which tcpdump -vve shows as:
2213 dnl 60:66:66:66:02:10 > 50:54:00:00:02:10, ethertype MPLS unicast (0x8847), length 66: MPLS (label 20, exp 0, ttl 32)
2214 dnl (label 20, exp 0, [S], ttl 31)
2215 dnl (tos 0x0, ttl 254, id 0, offset 0, flags [none], proto TCP (6), length 44)
2216 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
2217 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2220 ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 60 66 66 66 02 10 88 47 00 01 40 20 00 01 41 1f 45 00 00 2c 00 00 00 00 ff 06 3b 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45'
2222 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2223 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2225 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
2226 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2227 tcp,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:02:10,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=254,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744
2229 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2230 tcp,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:02:10,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=254,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744
2232 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2233 tcp,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:02:10,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=254,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744
2236 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2238 dnl Modified MPLS pop action.
2239 dnl The input is a frame with three MPLS label stack entries which tcpdump -vve shows as:
2240 dnl 60:66:66:66:03:00 > 50:54:00:00:00:00, ethertype MPLS unicast (0x8847), length 66: MPLS (label 20, exp 0, ttl 32)
2241 dnl (label 20, exp 0, ttl 31)
2242 dnl (label 20, exp 0, [S], ttl 30)
2243 dnl (tos 0x0, ttl 254, id 0, offset 0, flags [none], proto TCP (6), length 44)
2244 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
2245 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2248 ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 60 66 66 66 03 00 88 47 00 01 40 20 00 01 40 1f 00 01 41 1e 45 00 00 2c 00 00 00 00 ff 06 3b 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45'
2250 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2251 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2253 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2254 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2255 mplsm,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:03:00,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=0,mpls_ttl=30,mpls_bos=1
2257 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2258 mplsm,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:03:00,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=0,mpls_ttl=30,mpls_bos=1
2260 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2261 mplsm,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:03:00,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=0,mpls_ttl=30,mpls_bos=1
2264 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2266 dnl Modified MPLS pop action.
2267 dnl The input is a frame with three MPLS label stack entries which tcpdump -vve shows as:
2268 dnl 60:66:66:66:03:01 > 50:54:00:00:00:00, ethertype MPLS multicast (0x8848), length 66: MPLS (label 20, exp 0, ttl 32)
2269 dnl (label 20, exp 0, ttl 31)
2270 dnl (label 20, exp 0, [S], ttl 30)
2271 dnl (tos 0x0, ttl 254, id 0, offset 0, flags [none], proto TCP (6), length 44)
2272 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
2273 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2276 ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 60 66 66 66 03 01 88 48 00 01 40 20 00 01 40 1f 00 01 41 1e 45 00 00 2c 00 00 00 00 ff 06 3b 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45'
2278 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2279 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2281 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2282 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2283 mpls,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:03:01,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=0,mpls_ttl=29,mpls_bos=1
2285 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2286 mpls,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:03:01,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=0,mpls_ttl=29,mpls_bos=1
2288 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2289 mpls,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:03:01,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=0,mpls_ttl=29,mpls_bos=1
2292 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2294 dnl Modified MPLS pop action.
2295 dnl The input is a frame with three MPLS label stack entries which tcpdump -vve shows as:
2296 dnl 60:66:66:66:03:10 > 50:54:00:00:00:00, ethertype MPLS unicast (0x8847), length 66: MPLS (label 20, exp 0, ttl 32)
2297 dnl (label 20, exp 0, ttl 31)
2298 dnl (label 20, exp 0, [S], ttl 30)
2299 dnl (tos 0x0, ttl 254, id 0, offset 0, flags [none], proto TCP (6), length 44)
2300 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
2301 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2304 ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 60 66 66 66 03 10 88 47 00 01 40 20 00 01 40 1f 00 01 41 1e 45 00 00 2c 00 00 00 00 ff 06 3b 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45'
2306 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2307 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2309 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2310 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2311 mplsm,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:03:10,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=0,mpls_ttl=29,mpls_bos=1
2313 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2314 mplsm,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:03:10,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=0,mpls_ttl=29,mpls_bos=1
2316 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2317 mplsm,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:03:10,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=0,mpls_ttl=29,mpls_bos=1
2320 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2322 dnl Modified MPLS pop action.
2323 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
2324 dnl 60:66:66:66:04:00 > 50:54:00:00:00:07, ethertype MPLS multicast (0x8848), length 62: MPLS (label 20, exp 0, [S], ttl 32)
2325 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
2326 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
2327 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2330 ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 60 66 66 66 04 00 88 48 00 01 41 20 45 00 00 2c 00 00 00 00 ff 06 3a 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45'
2332 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2333 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2335 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
2336 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2337 mpls,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:04:00,dl_dst=50:54:00:00:00:07,mpls_label=0,mpls_tc=0,mpls_ttl=255,mpls_bos=1
2339 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2340 mpls,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:04:00,dl_dst=50:54:00:00:00:07,mpls_label=0,mpls_tc=0,mpls_ttl=255,mpls_bos=1
2342 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2343 mpls,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:04:00,dl_dst=50:54:00:00:00:07,mpls_label=0,mpls_tc=0,mpls_ttl=255,mpls_bos=1
2346 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2348 dnl Modified MPLS pop action.
2349 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
2350 dnl 60:66:66:66:04:01 > 50:54:00:00:00:07, ethertype MPLS unicast (0x8847), length 62: MPLS (label 20, exp 0, [S], ttl 32)
2351 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
2352 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
2353 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2356 ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 60 66 66 66 04 01 88 47 00 01 41 20 45 00 00 2c 00 00 00 00 ff 06 3a 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45'
2358 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2359 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2361 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
2362 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2363 mplsm,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:04:01,dl_dst=50:54:00:00:00:07,mpls_label=0,mpls_tc=0,mpls_ttl=254,mpls_bos=1
2365 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2366 mplsm,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:04:01,dl_dst=50:54:00:00:00:07,mpls_label=0,mpls_tc=0,mpls_ttl=254,mpls_bos=1
2368 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2369 mplsm,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:04:01,dl_dst=50:54:00:00:00:07,mpls_label=0,mpls_tc=0,mpls_ttl=254,mpls_bos=1
2372 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2374 dnl Modified MPLS pop action.
2375 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
2376 dnl 60:66:66:66:04:10 > 50:54:00:00:00:07, ethertype MPLS multicast (0x8848), length 62: MPLS (label 20, exp 0, [S], ttl 32)
2377 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
2378 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
2379 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2382 ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 60 66 66 66 04 10 88 48 00 01 41 20 45 00 00 2c 00 00 00 00 ff 06 3a 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45'
2384 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2385 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2387 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
2388 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2389 mplsm,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:04:10,dl_dst=50:54:00:00:00:07,mpls_label=0,mpls_tc=0,mpls_ttl=253,mpls_bos=1
2391 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2392 mplsm,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:04:10,dl_dst=50:54:00:00:00:07,mpls_label=0,mpls_tc=0,mpls_ttl=253,mpls_bos=1
2394 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2395 mplsm,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:04:10,dl_dst=50:54:00:00:00:07,mpls_label=0,mpls_tc=0,mpls_ttl=253,mpls_bos=1
2398 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2400 dnl Modified MPLS pop action.
2401 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
2402 dnl 60:66:66:66:05:00 > 50:54:00:00:00:07, ethertype MPLS unicast (0x8847), length 62: MPLS (label 20, exp 0, [S], ttl 32)
2403 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
2404 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
2405 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2408 ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 60 66 66 66 05 00 88 47 00 01 41 20 45 00 00 2c 00 00 00 00 ff 06 3a 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45'
2410 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2411 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2413 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2414 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2415 mpls,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:05:00,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=0,mpls_ttl=32,mpls_bos=1
2417 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2418 mpls,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:05:00,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=0,mpls_ttl=32,mpls_bos=1
2420 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2421 mpls,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:05:00,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=0,mpls_ttl=32,mpls_bos=1
2424 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2426 dnl Modified MPLS pop action.
2427 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
2428 dnl 60:66:66:66:05:01 > 50:54:00:00:00:07, ethertype MPLS multicast (0x8848), length 62: MPLS (label 20, exp 0, [S], ttl 32)
2429 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
2430 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
2431 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2434 ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 60 66 66 66 05 01 88 48 00 01 41 20 45 00 00 2c 00 00 00 00 ff 06 3a 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45'
2436 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2437 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2439 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2440 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2441 mplsm,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:05:01,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=0,mpls_ttl=31,mpls_bos=1
2443 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2444 mplsm,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:05:01,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=0,mpls_ttl=31,mpls_bos=1
2446 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2447 mplsm,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:05:01,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=0,mpls_ttl=31,mpls_bos=1
2450 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2452 dnl Modified MPLS pop action.
2453 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
2454 dnl 60:66:66:66:05:10 > 50:54:00:00:00:07, ethertype MPLS unicast (0x8847), length 62: MPLS (label 20, exp 0, [S], ttl 32)
2455 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
2456 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
2457 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2460 ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 60 66 66 66 05 10 88 47 00 01 41 20 45 00 00 2c 00 00 00 00 ff 06 3a 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45'
2462 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2463 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2465 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2466 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2467 mpls,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:05:10,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=0,mpls_ttl=31,mpls_bos=1
2469 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2470 mpls,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:05:10,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=0,mpls_ttl=31,mpls_bos=1
2472 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2473 mpls,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:05:10,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=0,mpls_ttl=31,mpls_bos=1
2476 AT_CHECK([ovs-appctl revalidator/purge], [0])
2477 AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
2478 cookie=0xa, n_packets=3, n_bytes=180, dl_src=40:44:44:44:44:42 actions=push_mpls:0x8847,load:0xa->OXM_OF_MPLS_LABEL[[]],load:0x3->OXM_OF_MPLS_TC[[]],CONTROLLER:65535
2479 cookie=0xa, n_packets=3, n_bytes=180, dl_src=40:44:44:44:44:43 actions=push_mpls:0x8847,load:0xa->OXM_OF_MPLS_LABEL[[]],load:0x3->OXM_OF_MPLS_TC[[]],CONTROLLER:65535
2480 cookie=0xa, n_packets=3, n_bytes=180, dl_src=40:44:44:44:44:44 actions=push_mpls:0x8847,load:0xa->OXM_OF_MPLS_LABEL[[]],load:0x3->OXM_OF_MPLS_TC[[]],CONTROLLER:65535
2481 cookie=0xa, n_packets=3, n_bytes=180, dl_src=40:44:44:44:44:45 actions=push_mpls:0x8847,load:0xa->OXM_OF_MPLS_LABEL[[]],load:0x3->OXM_OF_MPLS_TC[[]],dec_mpls_ttl,CONTROLLER:65535
2482 cookie=0xa, n_packets=3, n_bytes=180, dl_src=40:44:44:44:44:46 actions=push_mpls:0x8847,load:0xa->OXM_OF_MPLS_LABEL[[]],load:0x3->OXM_OF_MPLS_TC[[]],set_mpls_ttl(10),CONTROLLER:65535
2483 cookie=0xa, n_packets=3, n_bytes=180, dl_src=40:44:44:44:44:47 actions=push_mpls:0x8847,load:0xa->OXM_OF_MPLS_LABEL[[]],load:0x3->OXM_OF_MPLS_TC[[]],dec_mpls_ttl,set_mpls_ttl(10),CONTROLLER:65535
2484 cookie=0xa, n_packets=3, n_bytes=180, dl_src=40:44:44:44:44:48 actions=push_mpls:0x8847,load:0xa->OXM_OF_MPLS_LABEL[[]],load:0x3->OXM_OF_MPLS_TC[[]],set_mpls_ttl(10),dec_mpls_ttl,CONTROLLER:65535
2485 cookie=0xa, n_packets=3, n_bytes=180, dl_src=41:44:44:44:44:42 actions=push_mpls:0x8847,load:0xa->OXM_OF_MPLS_LABEL[[]],load:0x3->OXM_OF_MPLS_TC[[]],pop_mpls:0x0800,CONTROLLER:65535
2486 cookie=0xa, n_packets=3, n_bytes=180, mpls,dl_src=40:44:44:44:44:49 actions=push_mpls:0x8848,load:0xa->OXM_OF_MPLS_LABEL[[]],CONTROLLER:65535
2487 cookie=0xb, n_packets=3, n_bytes=180, mpls,dl_src=50:55:55:55:55:55 actions=load:0x3e8->OXM_OF_MPLS_LABEL[[]],CONTROLLER:65535
2488 cookie=0xc, n_packets=3, n_bytes=180, dl_src=70:77:77:77:77:77 actions=push_mpls:0x8848,load:0x3e8->OXM_OF_MPLS_LABEL[[]],load:0x7->OXM_OF_MPLS_TC[[]],CONTROLLER:65535
2489 cookie=0xd, n_packets=3, n_bytes=180, dl_src=60:66:66:66:00:08 actions=pop_mpls:0x0806,resubmit(1,1)
2490 cookie=0xd, n_packets=3, n_bytes=186, dl_src=60:66:66:66:00:01 actions=pop_mpls:0x0800,dec_ttl,CONTROLLER:65535
2491 cookie=0xd, n_packets=3, n_bytes=186, dl_src=60:66:66:66:00:02 actions=pop_mpls:0x0800,load:0xa000001->NXM_OF_IP_DST[[]],CONTROLLER:65535
2492 cookie=0xd, n_packets=3, n_bytes=186, dl_src=60:66:66:66:00:03 actions=pop_mpls:0x0800,move:NXM_OF_IP_DST[[]]->NXM_OF_IP_SRC[[]],CONTROLLER:65535
2493 cookie=0xd, n_packets=3, n_bytes=186, dl_src=60:66:66:66:00:04 actions=pop_mpls:0x0800,push:NXM_OF_IP_DST[[]],pop:NXM_OF_IP_SRC[[]],CONTROLLER:65535
2494 cookie=0xd, n_packets=3, n_bytes=186, dl_src=60:66:66:66:00:05 actions=pop_mpls:0x0800,multipath(eth_src,50,modulo_n,256,0,NXM_OF_IP_SRC[[0..7]]),CONTROLLER:65535
2495 cookie=0xd, n_packets=3, n_bytes=186, dl_src=60:66:66:66:00:06 actions=pop_mpls:0x0800,bundle_load(eth_src,50,hrw,ofport,NXM_OF_IP_SRC[[0..15]],slaves:1,2),CONTROLLER:65535
2496 cookie=0xd, n_packets=3, n_bytes=186, dl_src=60:66:66:66:00:07 actions=pop_mpls:0x0800,learn(table=1,hard_timeout=60,eth_type=0x800,nw_proto=6,NXM_OF_IP_SRC[[]]=NXM_OF_IP_DST[[]]),CONTROLLER:65535
2497 cookie=0xd, n_packets=3, n_bytes=186, dl_src=60:66:66:66:00:09 actions=pop_mpls:0x0800,mod_nw_tos:48,CONTROLLER:65535
2498 cookie=0xd, n_packets=3, n_bytes=186, dl_src=60:66:66:66:00:0a actions=pop_mpls:0x0800,mod_nw_dst:10.0.0.1,CONTROLLER:65535
2499 cookie=0xd, n_packets=3, n_bytes=186, dl_src=60:66:66:66:00:0b actions=pop_mpls:0x0800,mod_nw_src:10.0.0.1,CONTROLLER:65535
2500 cookie=0xd, n_packets=3, n_bytes=186, dl_src=60:66:66:66:04:00 actions=pop_mpls:0x0800,push_mpls:0x8847,CONTROLLER:65535
2501 cookie=0xd, n_packets=3, n_bytes=186, dl_src=60:66:66:66:04:01 actions=pop_mpls:0x0800,push_mpls:0x8848,dec_mpls_ttl,CONTROLLER:65535
2502 cookie=0xd, n_packets=3, n_bytes=186, dl_src=60:66:66:66:04:10 actions=pop_mpls:0x0800,dec_ttl,push_mpls:0x8848,dec_mpls_ttl,CONTROLLER:65535
2503 cookie=0xd, n_packets=3, n_bytes=186, dl_src=60:66:66:66:05:00 actions=push_mpls:0x8848,pop_mpls:0x8847,CONTROLLER:65535
2504 cookie=0xd, n_packets=3, n_bytes=186, dl_src=60:66:66:66:05:01 actions=push_mpls:0x8847,pop_mpls:0x8848,dec_mpls_ttl,CONTROLLER:65535
2505 cookie=0xd, n_packets=3, n_bytes=186, dl_src=60:66:66:66:05:10 actions=push_mpls:0x8848,dec_mpls_ttl,pop_mpls:0x8847,dec_mpls_ttl,CONTROLLER:65535
2506 cookie=0xd, n_packets=3, n_bytes=186, dl_src=60:66:66:66:66:66 actions=pop_mpls:0x0800,CONTROLLER:65535
2507 cookie=0xd, n_packets=3, n_bytes=198, dl_src=60:66:66:66:01:00 actions=pop_mpls:0x8848,CONTROLLER:65535
2508 cookie=0xd, n_packets=3, n_bytes=198, dl_src=60:66:66:66:01:01 actions=pop_mpls:0x8847,dec_mpls_ttl,CONTROLLER:65535
2509 cookie=0xd, n_packets=3, n_bytes=198, dl_src=60:66:66:66:01:02 actions=pop_mpls:0x8848,load:0x3->OXM_OF_MPLS_TC[[]],CONTROLLER:65535
2510 cookie=0xd, n_packets=3, n_bytes=198, dl_src=60:66:66:66:02:00 actions=pop_mpls:0x8847,pop_mpls:0x0800,CONTROLLER:65535
2511 cookie=0xd, n_packets=3, n_bytes=198, dl_src=60:66:66:66:02:01 actions=pop_mpls:0x8848,pop_mpls:0x0800,dec_ttl,CONTROLLER:65535
2512 cookie=0xd, n_packets=3, n_bytes=198, dl_src=60:66:66:66:02:10 actions=pop_mpls:0x8847,dec_mpls_ttl,pop_mpls:0x0800,dec_ttl,CONTROLLER:65535
2513 cookie=0xd, n_packets=3, n_bytes=210, dl_src=60:66:66:66:03:00 actions=pop_mpls:0x8848,pop_mpls:0x8848,CONTROLLER:65535
2514 cookie=0xd, n_packets=3, n_bytes=210, dl_src=60:66:66:66:03:01 actions=pop_mpls:0x8847,pop_mpls:0x8847,dec_mpls_ttl,CONTROLLER:65535
2515 cookie=0xd, n_packets=3, n_bytes=210, dl_src=60:66:66:66:03:10 actions=pop_mpls:0x8848,dec_mpls_ttl,pop_mpls:0x8848,dec_mpls_ttl,CONTROLLER:65535
2516 cookie=0xd, table=1, n_packets=3, n_bytes=168, arp actions=CONTROLLER:65535
2523 AT_SETUP([ofproto-dpif - MPLS handling with goto_table])
2524 OVS_VSWITCHD_START([dnl
2525 add-port br0 p1 -- set Interface p1 type=dummy
2527 ON_EXIT([kill `cat ovs-ofctl.pid`])
2529 AT_CAPTURE_FILE([ofctl_monitor.log])
2530 AT_DATA([flows.txt], [dnl
2531 table=0 mplsm actions=pop_mpls:0x800,goto_table(1)
2532 table=1 ip,ip_dscp=8 actions=controller
2534 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flows br0 flows.txt])
2537 dnl Modified MPLS pop action.
2538 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
2539 dnl 60:66:66:66:00:08 > 50:54:00:00:00:01, ethertype MPLS multicast (0x8848), length 62: MPLS (label 20, exp 0, [S], ttl 32)
2540 dnl (tos 0x20, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
2541 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
2542 AT_CHECK([ovs-ofctl -O OpenFlow12 monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2545 ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 01 60 66 66 66 00 08 88 48 00 01 41 20 45 20 00 2c 00 00 00 00 ff 06 3a 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45'
2547 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2548 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2550 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
2551 OFPT_PACKET_IN (OF1.2) (xid=0x0): table_id=1 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2552 tcp,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:00:08,dl_dst=50:54:00:00:00:01,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=32,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744
2554 OFPT_PACKET_IN (OF1.2) (xid=0x0): table_id=1 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2555 tcp,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:00:08,dl_dst=50:54:00:00:00:01,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=32,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744
2557 OFPT_PACKET_IN (OF1.2) (xid=0x0): table_id=1 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2558 tcp,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:00:08,dl_dst=50:54:00:00:00:01,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=32,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744
2561 AT_CHECK([ovs-appctl revalidator/purge], [0])
2562 AT_CHECK([ovs-ofctl -O OpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
2563 n_packets=3, n_bytes=186, mplsm actions=pop_mpls:0x0800,goto_table:1
2564 table=1, n_packets=3, n_bytes=174, ip,nw_tos=32 actions=CONTROLLER:65535
2565 OFPST_FLOW reply (OF1.2):
2571 AT_SETUP([ofproto-dpif - MPLS handling with write_actions])
2572 OVS_VSWITCHD_START([dnl
2573 add-port br0 p1 -- set Interface p1 type=dummy
2575 ON_EXIT([kill `cat ovs-ofctl.pid`])
2577 dnl N.B: The first (and only) action that accesses L3 data after the
2578 dnl pop_mpls action is present in write_actions. This exercises recirculation
2579 dnl triggered in write_actions due to a previous action not in write actions.
2580 AT_CAPTURE_FILE([ofctl_monitor.log])
2581 AT_DATA([flows.txt], [dnl
2582 mplsm actions=pop_mpls:0x800,write_actions(dec_ttl,controller)
2584 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flows br0 flows.txt])
2586 dnl Modified MPLS pop action.
2587 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
2588 dnl 60:66:66:66:00:08 > 50:54:00:00:00:01, ethertype MPLS multicast (0x8848), length 62: MPLS (label 20, exp 0, [S], ttl 32)
2589 dnl (tos 0x20, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
2590 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
2591 AT_CHECK([ovs-ofctl -O OpenFlow12 monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2594 ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 01 60 66 66 66 00 08 88 48 00 01 41 20 45 20 00 2c 00 00 00 00 ff 06 3a 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45'
2596 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2597 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2599 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
2600 OFPT_PACKET_IN (OF1.2) (xid=0x0): table_id=254 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2601 tcp,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:00:08,dl_dst=50:54:00:00:00:01,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=32,nw_ecn=0,nw_ttl=254,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744
2603 OFPT_PACKET_IN (OF1.2) (xid=0x0): table_id=254 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2604 tcp,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:00:08,dl_dst=50:54:00:00:00:01,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=32,nw_ecn=0,nw_ttl=254,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744
2606 OFPT_PACKET_IN (OF1.2) (xid=0x0): table_id=254 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2607 tcp,in_port=0,vlan_tci=0x0000,dl_src=60:66:66:66:00:08,dl_dst=50:54:00:00:00:01,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=32,nw_ecn=0,nw_ttl=254,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744
2610 AT_CHECK([ovs-appctl revalidator/purge], [0])
2611 AT_CHECK([ovs-ofctl -O OpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
2612 n_packets=3, n_bytes=186, mplsm actions=pop_mpls:0x0800,write_actions(dec_ttl,CONTROLLER:65535)
2613 OFPST_FLOW reply (OF1.2):
2619 AT_SETUP([ofproto-dpif - table-miss flow (OpenFlow 1.0)])
2620 OVS_VSWITCHD_START([dnl
2621 add-port br0 p1 -- set Interface p1 type=dummy
2623 ON_EXIT([kill `cat ovs-ofctl.pid`])
2625 AT_CAPTURE_FILE([ofctl_monitor.log])
2626 # A table-miss flow has priority 0 and no match
2627 AT_CHECK([ovs-ofctl --protocols=OpenFlow10 add-flow br0 'priority=0 actions=output:CONTROLLER'])
2629 dnl Singleton controller action.
2630 AT_CHECK([ovs-ofctl monitor -P openflow10 --protocols=OpenFlow10 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
2633 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=10:11:11:11:11:11,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=10),tcp_flags(0x002)'
2635 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2636 ovs-appctl -t ovs-ofctl exit
2638 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2639 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
2640 tcp,in_port=0,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:0
2642 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
2643 tcp,in_port=0,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:0
2645 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
2646 tcp,in_port=0,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:0
2649 AT_CHECK([ovs-appctl revalidator/purge], [0])
2650 AT_CHECK([ovs-ofctl --protocols=OpenFlow10 dump-flows br0 | ofctl_strip | sort], [0], [dnl
2651 n_packets=3, n_bytes=180, priority=0 actions=CONTROLLER:65535
2659 AT_SETUP([ofproto-dpif - table-miss flow (OpenFlow 1.3)])
2660 OVS_VSWITCHD_START([dnl
2661 add-port br0 p1 -- set Interface p1 type=dummy
2663 ON_EXIT([kill `cat ovs-ofctl.pid`])
2665 AT_CAPTURE_FILE([ofctl_monitor.log])
2666 # A table-miss flow has priority 0 and no match
2667 AT_CHECK([ovs-ofctl --protocols=OpenFlow13 add-flow br0 'priority=0 actions=output:CONTROLLER'])
2669 dnl Singleton controller action.
2670 AT_CHECK([ovs-ofctl monitor -P openflow10 --protocols=OpenFlow13 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
2673 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=10:11:11:11:11:11,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=10),tcp_flags(0x002)'
2675 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2676 ovs-appctl -t ovs-ofctl exit
2678 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2680 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2681 OFPT_PACKET_IN (OF1.3) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
2682 tcp,in_port=0,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:0
2684 OFPT_PACKET_IN (OF1.3) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
2685 tcp,in_port=0,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:0
2687 OFPT_PACKET_IN (OF1.3) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
2688 tcp,in_port=0,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:0
2691 AT_CHECK([ovs-appctl revalidator/purge], [0])
2692 AT_CHECK([ovs-ofctl --protocols=OpenFlow13 dump-flows br0 | ofctl_strip | sort], [0], [dnl
2693 n_packets=3, n_bytes=180, priority=0 actions=CONTROLLER:65535
2694 OFPST_FLOW reply (OF1.3):
2700 AT_SETUP([ofproto-dpif - table-miss flow with async config (OpenFlow 1.3)])
2701 OVS_VSWITCHD_START([dnl
2702 add-port br0 p1 -- set Interface p1 type=dummy
2704 ON_EXIT([kill `cat ovs-ofctl.pid`])
2706 ovs-appctl time/stop
2708 AT_CAPTURE_FILE([ofctl_monitor.log])
2709 # A table-miss flow has priority 0 and no match
2710 AT_CHECK([ovs-ofctl --protocols=OpenFlow13 add-flow br0 'priority=0 actions=output:CONTROLLER'])
2712 dnl Singleton controller action.
2713 AT_CHECK([ovs-ofctl monitor -P openflow10 --protocols=OpenFlow13 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
2715 # Become slave (OF 1.3), which should disable everything except port status.
2716 ovs-appctl -t ovs-ofctl ofctl/send 041800180000000200000003000000000000000000000001
2718 # Ensure that ovs-vswitchd gets a chance to reply before sending another command.
2719 ovs-appctl time/warp 500 100
2721 # Use OF 1.3 OFPT_SET_ASYNC to enable OFPR_NO_MATCH for slave only.
2722 ovs-appctl -t ovs-ofctl ofctl/send 041c002000000002000000000000000100000000000000000000000000000000
2724 ovs-appctl time/warp 500 100
2726 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=10:11:11:11:11:11,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=10),tcp_flags(0x002)'
2728 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2729 ovs-appctl -t ovs-ofctl exit
2731 AT_CHECK([ovs-appctl revalidator/purge], [0])
2732 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2733 send: OFPT_ROLE_REQUEST (OF1.3) (xid=0x2): role=slave generation_id=1
2734 OFPT_ROLE_REPLY (OF1.3) (xid=0x2): role=slave generation_id=1
2736 send: OFPT_SET_ASYNC (OF1.3) (xid=0x2):
2747 OFPT_PACKET_IN (OF1.3) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
2748 tcp,in_port=0,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:0
2750 OFPT_PACKET_IN (OF1.3) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
2751 tcp,in_port=0,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:0
2753 OFPT_PACKET_IN (OF1.3) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
2754 tcp,in_port=0,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:0
2757 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2759 AT_CHECK([ovs-ofctl --protocols=OpenFlow13 dump-flows br0 | ofctl_strip | sort], [0], [dnl
2760 n_packets=3, n_bytes=180, priority=0 actions=CONTROLLER:65535
2761 OFPST_FLOW reply (OF1.3):
2768 AT_SETUP([ofproto-dpif - table-miss flow (OpenFlow 1.4)])
2769 OVS_VSWITCHD_START([dnl
2770 add-port br0 p1 -- set Interface p1 type=dummy
2772 ON_EXIT([kill `cat ovs-ofctl.pid`])
2774 AT_CAPTURE_FILE([ofctl_monitor.log])
2775 # A table-miss flow has priority 0 and no match
2776 AT_CHECK([ovs-ofctl --protocols=OpenFlow14 add-flow br0 'priority=0 actions=output:CONTROLLER'])
2778 dnl Singleton controller action.
2779 AT_CHECK([ovs-ofctl monitor -P openflow10 --protocols=OpenFlow14 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
2782 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=10:11:11:11:11:11,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=10),tcp_flags(0x002)'
2784 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2785 ovs-appctl -t ovs-ofctl exit
2787 AT_CHECK([ovs-appctl revalidator/purge], [0])
2788 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2789 OFPT_PACKET_IN (OF1.4) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
2790 tcp,in_port=0,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:0
2792 OFPT_PACKET_IN (OF1.4) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
2793 tcp,in_port=0,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:0
2795 OFPT_PACKET_IN (OF1.4) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
2796 tcp,in_port=0,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:0
2799 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2801 AT_CHECK([ovs-ofctl --protocols=OpenFlow14 dump-flows br0 | ofctl_strip | sort], [0], [dnl
2802 n_packets=3, n_bytes=180, priority=0 actions=CONTROLLER:65535
2803 OFPST_FLOW reply (OF1.4):
2811 AT_SETUP([ofproto-dpif - packet-in reason in group table (Openflow 1.3)])
2812 OVS_VSWITCHD_START([dnl
2813 add-port br0 p1 -- set Interface p1 type=dummy
2815 ON_EXIT([kill `cat ovs-ofctl.pid`])
2817 AT_CAPTURE_FILE([ofctl_monitor.log])
2818 # A table-miss flow has priority 0 and no match
2819 AT_CHECK([ovs-ofctl --protocols=OpenFlow13 add-group br0 'group_id=1234,type=all,bucket=output:10,bucket=output:CONTROLLER'])
2820 AT_CHECK([ovs-ofctl --protocols=OpenFlow13 add-flow br0 'in_port=1 actions=group:1234'])
2822 dnl Singleton controller action.
2823 AT_CHECK([ovs-ofctl monitor -P openflow10 --protocols=OpenFlow13 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
2826 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=10:11:11:11:11:11,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=10),tcp_flags(0x002)'
2828 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2829 ovs-appctl -t ovs-ofctl exit
2831 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2833 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2834 OFPT_PACKET_IN (OF1.3) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
2835 tcp,in_port=0,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:0
2837 OFPT_PACKET_IN (OF1.3) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
2838 tcp,in_port=0,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:0
2840 OFPT_PACKET_IN (OF1.3) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
2841 tcp,in_port=0,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:0
2844 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2846 AT_CHECK([ovs-ofctl --protocols=OpenFlow13 dump-flows br0 | ofctl_strip | sort], [0], [dnl
2847 n_packets=3, n_bytes=180, in_port=1 actions=group:1234
2848 OFPST_FLOW reply (OF1.3):
2855 AT_SETUP([ofproto-dpif - packet-in reason in group table (Openflow 1.4)])
2856 OVS_VSWITCHD_START([dnl
2857 add-port br0 p1 -- set Interface p1 type=dummy
2859 ON_EXIT([kill `cat ovs-ofctl.pid`])
2861 AT_CAPTURE_FILE([ofctl_monitor.log])
2862 # A table-miss flow has priority 0 and no match
2863 AT_CHECK([ovs-ofctl --protocols=OpenFlow14 add-group br0 'group_id=1234,type=all,bucket=output:10,bucket=output:CONTROLLER'])
2864 AT_CHECK([ovs-ofctl --protocols=OpenFlow14 add-flow br0 'in_port=1 actions=group:1234'])
2866 dnl Singleton controller action.
2867 AT_CHECK([ovs-ofctl monitor -P openflow10 --protocols=OpenFlow14 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
2870 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=10:11:11:11:11:11,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=10),tcp_flags(0x002)'
2872 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2873 ovs-appctl -t ovs-ofctl exit
2875 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2877 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2878 OFPT_PACKET_IN (OF1.4) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via group) data_len=60 (unbuffered)
2879 tcp,in_port=0,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:0
2881 OFPT_PACKET_IN (OF1.4) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via group) data_len=60 (unbuffered)
2882 tcp,in_port=0,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:0
2884 OFPT_PACKET_IN (OF1.4) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via group) data_len=60 (unbuffered)
2885 tcp,in_port=0,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:0
2888 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2890 AT_CHECK([ovs-ofctl --protocols=OpenFlow14 dump-flows br0 | ofctl_strip | sort], [0], [dnl
2891 n_packets=3, n_bytes=180, in_port=1 actions=group:1234
2892 OFPST_FLOW reply (OF1.4):
2898 AT_SETUP([ofproto-dpif - ARP modification slow-path])
2900 ADD_OF_PORTS([br0], [1], [2])
2902 ovs-vsctl -- set Interface p2 type=dummy options:pcap=p2.pcap
2903 ovs-ofctl add-flow br0 'in_port=1,arp actions=load:2->OXM_OF_ARP_OP[[]],2,load:0xc0a88001->OXM_OF_ARP_SPA[[]],2,load:0x404444444441->OXM_OF_ARP_THA[[]],2'
2905 # Input some packets that should follow the arp modification slow-path.
2907 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=80:88:88:88:88:88,dst=ff:ff:ff:ff:ff:ff),eth_type(0x0806),arp(sip=192.168.0.1,tip=192.168.0.2,op=1,sha=50:54:00:00:00:05,tha=00:00:00:00:00:00)'
2909 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2911 # Check the packets that were output.
2912 AT_CHECK([ovs-ofctl parse-pcap p2.pcap], [0], [dnl
2913 arp,in_port=ANY,vlan_tci=0x0000,dl_src=80:88:88:88:88:88,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=192.168.0.1,arp_tpa=192.168.0.2,arp_op=2,arp_sha=50:54:00:00:00:05,arp_tha=00:00:00:00:00:00
2914 arp,in_port=ANY,vlan_tci=0x0000,dl_src=80:88:88:88:88:88,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=192.168.128.1,arp_tpa=192.168.0.2,arp_op=2,arp_sha=50:54:00:00:00:05,arp_tha=00:00:00:00:00:00
2915 arp,in_port=ANY,vlan_tci=0x0000,dl_src=80:88:88:88:88:88,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=192.168.128.1,arp_tpa=192.168.0.2,arp_op=2,arp_sha=50:54:00:00:00:05,arp_tha=40:44:44:44:44:41
2916 arp,in_port=ANY,vlan_tci=0x0000,dl_src=80:88:88:88:88:88,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=192.168.0.1,arp_tpa=192.168.0.2,arp_op=2,arp_sha=50:54:00:00:00:05,arp_tha=00:00:00:00:00:00
2917 arp,in_port=ANY,vlan_tci=0x0000,dl_src=80:88:88:88:88:88,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=192.168.128.1,arp_tpa=192.168.0.2,arp_op=2,arp_sha=50:54:00:00:00:05,arp_tha=00:00:00:00:00:00
2918 arp,in_port=ANY,vlan_tci=0x0000,dl_src=80:88:88:88:88:88,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=192.168.128.1,arp_tpa=192.168.0.2,arp_op=2,arp_sha=50:54:00:00:00:05,arp_tha=40:44:44:44:44:41
2919 arp,in_port=ANY,vlan_tci=0x0000,dl_src=80:88:88:88:88:88,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=192.168.0.1,arp_tpa=192.168.0.2,arp_op=2,arp_sha=50:54:00:00:00:05,arp_tha=00:00:00:00:00:00
2920 arp,in_port=ANY,vlan_tci=0x0000,dl_src=80:88:88:88:88:88,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=192.168.128.1,arp_tpa=192.168.0.2,arp_op=2,arp_sha=50:54:00:00:00:05,arp_tha=00:00:00:00:00:00
2921 arp,in_port=ANY,vlan_tci=0x0000,dl_src=80:88:88:88:88:88,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=192.168.128.1,arp_tpa=192.168.0.2,arp_op=2,arp_sha=50:54:00:00:00:05,arp_tha=40:44:44:44:44:41
2927 AT_SETUP([ofproto-dpif - VLAN handling])
2929 [set Bridge br0 fail-mode=standalone -- \
2930 add-port br0 p1 trunks=10,12 -- \
2931 add-port br0 p2 tag=10 -- \
2932 add-port br0 p3 tag=12 \
2933 other-config:priority-tags=true -- \
2934 add-port br0 p4 tag=12 -- \
2935 add-port br0 p5 vlan_mode=native-tagged tag=10 -- \
2936 add-port br0 p6 vlan_mode=native-tagged tag=10 trunks=10,12 -- \
2937 add-port br0 p7 vlan_mode=native-untagged tag=12 -- \
2938 add-port br0 p8 vlan_mode=native-untagged tag=12 trunks=10,12 \
2939 other-config:priority-tags=true -- \
2940 set Interface p1 type=dummy -- \
2941 set Interface p2 type=dummy -- \
2942 set Interface p3 type=dummy -- \
2943 set Interface p4 type=dummy -- \
2944 set Interface p5 type=dummy -- \
2945 set Interface p6 type=dummy -- \
2946 set Interface p7 type=dummy -- \
2947 set Interface p8 type=dummy --])
2949 dnl Each of these specifies an in_port by number, a VLAN VID (or "none"),
2950 dnl a VLAN PCP (used if the VID isn't "none") and the expected set of datapath
2956 "100 10 0 1,5,6,7,8,pop_vlan,2" \
2957 "100 10 1 1,5,6,7,8,pop_vlan,2" \
2960 "100 12 0 1,5,6,pop_vlan,3,4,7,8" \
2961 "100 12 1 1,5,6,pop_vlan,4,7,push_vlan(vid=0,pcp=1),3,8" \
2965 "1 10 0 5,6,7,8,100,pop_vlan,2" \
2966 "1 10 1 5,6,7,8,100,pop_vlan,2" \
2969 "1 12 0 5,6,100,pop_vlan,3,4,7,8" \
2970 "1 12 1 5,6,100,pop_vlan,4,7,push_vlan(vid=0,pcp=1),3,8" \
2971 "2 none 0 push_vlan(vid=10,pcp=0),1,5,6,7,8,100" \
2972 "2 0 0 pop_vlan,push_vlan(vid=10,pcp=0),1,5,6,7,8,100" \
2973 "2 0 1 pop_vlan,push_vlan(vid=10,pcp=1),1,5,6,7,8,100" \
2980 "3 none 0 4,7,8,push_vlan(vid=12,pcp=0),1,5,6,100" \
2981 "3 0 0 pop_vlan,4,7,8,push_vlan(vid=12,pcp=0),1,5,6,100" \
2982 "3 0 1 8,pop_vlan,4,7,push_vlan(vid=12,pcp=1),1,5,6,100" \
2989 "4 none 0 3,7,8,push_vlan(vid=12,pcp=0),1,5,6,100" \
2990 "4 0 0 pop_vlan,3,7,8,push_vlan(vid=12,pcp=0),1,5,6,100" \
2991 "4 0 1 3,8,pop_vlan,7,push_vlan(vid=12,pcp=1),1,5,6,100" \
2998 "5 none 0 2,push_vlan(vid=10,pcp=0),1,6,7,8,100" \
2999 "5 0 0 pop_vlan,2,push_vlan(vid=10,pcp=0),1,6,7,8,100" \
3000 "5 0 1 pop_vlan,2,push_vlan(vid=10,pcp=1),1,6,7,8,100" \
3001 "5 10 0 1,6,7,8,100,pop_vlan,2" \
3002 "5 10 1 1,6,7,8,100,pop_vlan,2" \
3005 "5 12 0 1,6,100,pop_vlan,3,4,7,8" \
3006 "5 12 1 1,6,100,pop_vlan,4,7,push_vlan(vid=0,pcp=1),3,8" \
3007 "6 none 0 2,push_vlan(vid=10,pcp=0),1,5,7,8,100" \
3008 "6 0 0 pop_vlan,2,push_vlan(vid=10,pcp=0),1,5,7,8,100" \
3009 "6 0 1 pop_vlan,2,push_vlan(vid=10,pcp=1),1,5,7,8,100" \
3010 "6 10 0 1,5,7,8,100,pop_vlan,2" \
3011 "6 10 1 1,5,7,8,100,pop_vlan,2" \
3014 "6 12 0 1,5,100,pop_vlan,3,4,7,8" \
3015 "6 12 1 1,5,100,pop_vlan,4,7,push_vlan(vid=0,pcp=1),3,8" \
3016 "7 none 0 3,4,8,push_vlan(vid=12,pcp=0),1,5,6,100" \
3017 "7 0 0 pop_vlan,3,4,8,push_vlan(vid=12,pcp=0),1,5,6,100" \
3018 "7 0 1 3,8,pop_vlan,4,push_vlan(vid=12,pcp=1),1,5,6,100" \
3019 "7 10 0 1,5,6,8,100,pop_vlan,2" \
3020 "7 10 1 1,5,6,8,100,pop_vlan,2" \
3023 "7 12 0 1,5,6,100,pop_vlan,3,4,8" \
3024 "7 12 1 1,5,6,100,pop_vlan,4,push_vlan(vid=0,pcp=1),3,8" \
3025 "8 none 0 3,4,7,push_vlan(vid=12,pcp=0),1,5,6,100" \
3026 "8 0 0 pop_vlan,3,4,7,push_vlan(vid=12,pcp=0),1,5,6,100" \
3027 "8 0 1 3,pop_vlan,4,7,push_vlan(vid=12,pcp=1),1,5,6,100" \
3028 "8 10 0 1,5,6,7,100,pop_vlan,2" \
3029 "8 10 1 1,5,6,7,100,pop_vlan,2" \
3032 "8 12 0 1,5,6,100,pop_vlan,3,4,7" \
3033 "8 12 1 1,5,6,100,pop_vlan,4,7,push_vlan(vid=0,pcp=1),3"
3041 if test $vlan = none; then
3042 flow="in_port($in_port),eth(src=50:54:00:00:00:01,dst=ff:ff:ff:ff:ff:ff),eth_type(0xabcd)"
3044 flow="in_port($in_port),eth(src=50:54:00:00:00:01,dst=ff:ff:ff:ff:ff:ff),eth_type(0x8100),vlan(vid=$vlan,pcp=$pcp),encap(eth_type(0xabcd))"
3047 echo "----------------------------------------------------------------------"
3048 echo "in_port=$in_port vlan=$vlan pcp=$pcp"
3050 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
3051 actual=`tail -1 stdout | sed 's/Datapath actions: //'`
3053 AT_CHECK([ovs-dpctl normalize-actions "$flow" "$expected"], [0], [stdout])
3055 AT_CHECK([ovs-dpctl normalize-actions "$flow" "$actual"], [0], [expout])
3061 AT_SETUP([ofproto-dpif - MPLS handling])
3062 OVS_VSWITCHD_START([dnl
3063 add-port br0 p1 -- set Interface p1 type=dummy
3065 ON_EXIT([kill `cat ovs-ofctl.pid`])
3067 AT_CAPTURE_FILE([ofctl_monitor.log])
3068 AT_DATA([flows.txt], [dnl
3069 dl_src=40:44:44:44:00:00 actions=push_mpls:0x8847,controller
3070 dl_src=40:44:44:44:00:01,mpls actions=push_mpls:0x8847,controller
3071 dl_src=40:44:44:44:00:02,mpls actions=push_mpls:0x8848,controller
3073 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 add-flows br0 flows.txt])
3075 dnl In this test, we push an MPLS tag to an ethernet packet.
3076 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
3079 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=40:44:44:44:00:00,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no)'
3081 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3082 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
3084 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
3085 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3086 mpls,in_port=0,vlan_tci=0x0000,dl_src=40:44:44:44:00:00,dl_dst=50:54:00:00:00:07,mpls_label=0,mpls_tc=0,mpls_ttl=64,mpls_bos=1
3087 00000000 50 54 00 00 00 07 40 44-44 44 00 00 88 47 00 00
3088 00000010 01 40 45 00 00 28 00 00-00 00 40 06 f9 7c c0 a8
3089 00000020 00 01 c0 a8 00 02 00 00-00 00 00 00 00 00 00 00
3090 00000030 00 00 50 00 00 00 00 00-00 00 00 00 00 00 00 00
3092 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3093 mpls,in_port=0,vlan_tci=0x0000,dl_src=40:44:44:44:00:00,dl_dst=50:54:00:00:00:07,mpls_label=0,mpls_tc=0,mpls_ttl=64,mpls_bos=1
3094 00000000 50 54 00 00 00 07 40 44-44 44 00 00 88 47 00 00
3095 00000010 01 40 45 00 00 28 00 00-00 00 40 06 f9 7c c0 a8
3096 00000020 00 01 c0 a8 00 02 00 00-00 00 00 00 00 00 00 00
3097 00000030 00 00 50 00 00 00 00 00-00 00 00 00 00 00 00 00
3099 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3100 mpls,in_port=0,vlan_tci=0x0000,dl_src=40:44:44:44:00:00,dl_dst=50:54:00:00:00:07,mpls_label=0,mpls_tc=0,mpls_ttl=64,mpls_bos=1
3101 00000000 50 54 00 00 00 07 40 44-44 44 00 00 88 47 00 00
3102 00000010 01 40 45 00 00 28 00 00-00 00 40 06 f9 7c c0 a8
3103 00000020 00 01 c0 a8 00 02 00 00-00 00 00 00 00 00 00 00
3104 00000030 00 00 50 00 00 00 00 00-00 00 00 00 00 00 00 00
3107 dnl In this test, we push an MPLS tag to an MPLS packet. The LSE should be
3108 dnl copied exactly, except for the BOS bit.
3109 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
3112 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=40:44:44:44:00:01,dst=50:54:00:00:00:07),eth_type(0x8847),mpls(label=10,tc=0,ttl=64,bos=1)'
3114 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3115 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
3117 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
3118 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3119 mpls,in_port=0,vlan_tci=0x0000,dl_src=40:44:44:44:00:01,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=0,mpls_lse1=41280
3120 00000000 50 54 00 00 00 07 40 44-44 44 00 01 88 47 00 00
3121 00000010 a0 40 00 00 a1 40 00 00-00 00 00 00 00 00 00 00
3122 00000020 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
3123 00000030 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
3125 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3126 mpls,in_port=0,vlan_tci=0x0000,dl_src=40:44:44:44:00:01,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=0,mpls_lse1=41280
3127 00000000 50 54 00 00 00 07 40 44-44 44 00 01 88 47 00 00
3128 00000010 a0 40 00 00 a1 40 00 00-00 00 00 00 00 00 00 00
3129 00000020 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
3130 00000030 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
3132 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3133 mpls,in_port=0,vlan_tci=0x0000,dl_src=40:44:44:44:00:01,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=0,mpls_lse1=41280
3134 00000000 50 54 00 00 00 07 40 44-44 44 00 01 88 47 00 00
3135 00000010 a0 40 00 00 a1 40 00 00-00 00 00 00 00 00 00 00
3136 00000020 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
3137 00000030 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
3140 dnl In this test, we push an MPLS tag to an MPLS packet. The LSE should be
3141 dnl copied exactly, except for the BOS bit. The ethertype should be updated
3142 dnl to the MPLS ethertype of the MPLS push action which differs to that
3143 dnl of the input packet.
3144 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
3147 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=40:44:44:44:00:02,dst=50:54:00:00:00:07),eth_type(0x8847),mpls(label=10,tc=0,ttl=64,bos=1)'
3149 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3150 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
3152 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
3153 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3154 mplsm,in_port=0,vlan_tci=0x0000,dl_src=40:44:44:44:00:02,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=0,mpls_lse1=41280
3155 00000000 50 54 00 00 00 07 40 44-44 44 00 02 88 48 00 00
3156 00000010 a0 40 00 00 a1 40 00 00-00 00 00 00 00 00 00 00
3157 00000020 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
3158 00000030 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
3160 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3161 mplsm,in_port=0,vlan_tci=0x0000,dl_src=40:44:44:44:00:02,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=0,mpls_lse1=41280
3162 00000000 50 54 00 00 00 07 40 44-44 44 00 02 88 48 00 00
3163 00000010 a0 40 00 00 a1 40 00 00-00 00 00 00 00 00 00 00
3164 00000020 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
3165 00000030 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
3167 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3168 mplsm,in_port=0,vlan_tci=0x0000,dl_src=40:44:44:44:00:02,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=0,mpls_lse1=41280
3169 00000000 50 54 00 00 00 07 40 44-44 44 00 02 88 48 00 00
3170 00000010 a0 40 00 00 a1 40 00 00-00 00 00 00 00 00 00 00
3171 00000020 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
3172 00000030 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
3178 AT_SETUP([ofproto-dpif - VLAN+MPLS handling])
3179 OVS_VSWITCHD_START([dnl
3180 add-port br0 p1 -- set Interface p1 type=dummy
3182 ON_EXIT([kill `cat ovs-ofctl.pid`])
3184 AT_CAPTURE_FILE([ofctl_monitor.log])
3185 AT_DATA([flows.txt], [dnl
3186 cookie=0xa dl_src=40:44:44:44:54:50 actions=push_mpls:0x8847,load:10->OXM_OF_MPLS_LABEL[[]],push_vlan:0x8100,set_vlan_vid:99,set_vlan_pcp:1,controller
3187 cookie=0xa dl_src=40:44:44:44:54:51 actions=push_mpls:0x8847,load:10->OXM_OF_MPLS_LABEL[[]],push_vlan:0x8100,set_vlan_vid:99,set_vlan_pcp:1,controller
3188 cookie=0xa dl_src=40:44:44:44:54:52 actions=push_mpls:0x8847,load:10->OXM_OF_MPLS_LABEL[[]],push_vlan:0x8100,load:99->OXM_OF_VLAN_VID[[]],set_vlan_pcp:1,controller
3189 cookie=0xa dl_src=40:44:44:44:54:53 actions=push_mpls:0x8847,load:10->OXM_OF_MPLS_LABEL[[]],push_vlan:0x8100,load:99->OXM_OF_VLAN_VID[[]],set_vlan_pcp:1,controller
3190 cookie=0xa dl_src=40:44:44:44:54:54 actions=push_vlan:0x8100,set_vlan_vid:99,set_vlan_pcp:1,push_mpls:0x8847,load:10->OXM_OF_MPLS_LABEL[[]],controller
3191 cookie=0xa dl_src=40:44:44:44:54:55 actions=push_vlan:0x8100,set_vlan_vid:99,set_vlan_pcp:1,push_mpls:0x8847,load:10->OXM_OF_MPLS_LABEL[[]],controller
3192 cookie=0xa dl_src=40:44:44:44:54:56 actions=push_vlan:0x8100,load:99->OXM_OF_VLAN_VID[[]],set_vlan_pcp:1,push_mpls:0x8847,load:10->OXM_OF_MPLS_LABEL[[]],controller
3193 cookie=0xa dl_src=40:44:44:44:54:57 actions=push_vlan:0x8100,load:99->OXM_OF_VLAN_VID[[]],set_vlan_pcp:1,push_mpls:0x8847,load:10->OXM_OF_MPLS_LABEL[[]],controller
3194 cookie=0xa dl_src=40:44:44:44:54:58,vlan_tci=0x1000/0x1000 actions=load:99->OXM_OF_VLAN_VID[[]],set_vlan_pcp:1,push_mpls:0x8847,load:10->OXM_OF_MPLS_LABEL[[]],controller
3195 cookie=0xa dl_src=40:44:44:44:54:59,vlan_tci=0x1000/0x1000 actions=push_mpls:0x8847,load:10->OXM_OF_MPLS_LABEL[[]],set_vlan_pcp:1,load:99->OXM_OF_VLAN_VID[[]],controller
3197 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 add-flows br0 flows.txt])
3199 dnl Modified MPLS controller action.
3200 dnl In this test, we push the MPLS tag before pushing a VLAN tag, so we see
3201 dnl both of these in the final flow
3202 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
3205 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=40:44:44:44:54:50,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no)'
3207 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3208 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
3210 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
3211 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3212 mpls,in_port=0,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:54:50,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1
3213 00000000 50 54 00 00 00 07 40 44-44 44 54 50 81 00 20 63
3214 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3215 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3216 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3217 00000040 00 00 00 00
3219 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3220 mpls,in_port=0,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:54:50,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1
3221 00000000 50 54 00 00 00 07 40 44-44 44 54 50 81 00 20 63
3222 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3223 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3224 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3225 00000040 00 00 00 00
3227 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3228 mpls,in_port=0,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:54:50,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1
3229 00000000 50 54 00 00 00 07 40 44-44 44 54 50 81 00 20 63
3230 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3231 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3232 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3233 00000040 00 00 00 00
3236 dnl Modified MPLS controller action.
3237 dnl In this test, the input packet in vlan-tagged, which should be stripped
3238 dnl before we push the MPLS and VLAN tags.
3239 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
3242 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=40:44:44:44:54:51,dst=50:54:00:00:00:07),eth_type(0x8100),vlan(vid=88,pcp=7),encap(eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no))'
3244 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3245 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
3247 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
3248 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3249 mpls,in_port=0,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:54:51,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1
3250 00000000 50 54 00 00 00 07 40 44-44 44 54 51 81 00 20 63
3251 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3252 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3253 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3255 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3256 mpls,in_port=0,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:54:51,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1
3257 00000000 50 54 00 00 00 07 40 44-44 44 54 51 81 00 20 63
3258 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3259 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3260 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3262 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3263 mpls,in_port=0,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:54:51,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1
3264 00000000 50 54 00 00 00 07 40 44-44 44 54 51 81 00 20 63
3265 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3266 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3267 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3270 dnl Modified MPLS controller action.
3271 dnl In this test, we push the MPLS tag before pushing a VLAN tag, so we see
3272 dnl both of these in the final flow
3273 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
3276 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=40:44:44:44:54:52,dst=52:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no)'
3278 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3279 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
3281 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
3282 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3283 mpls,in_port=0,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:54:52,dl_dst=52:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1
3284 00000000 52 54 00 00 00 07 40 44-44 44 54 52 81 00 20 63
3285 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3286 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3287 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3288 00000040 00 00 00 00
3290 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3291 mpls,in_port=0,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:54:52,dl_dst=52:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1
3292 00000000 52 54 00 00 00 07 40 44-44 44 54 52 81 00 20 63
3293 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3294 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3295 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3296 00000040 00 00 00 00
3298 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3299 mpls,in_port=0,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:54:52,dl_dst=52:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1
3300 00000000 52 54 00 00 00 07 40 44-44 44 54 52 81 00 20 63
3301 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3302 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3303 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3304 00000040 00 00 00 00
3307 dnl Modified MPLS controller action.
3308 dnl In this test, the input packet in vlan-tagged, which should be stripped
3309 dnl before we push the MPLS and VLAN tags.
3310 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
3313 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=40:44:44:44:54:53,dst=50:54:00:00:00:07),eth_type(0x8100),vlan(vid=88,pcp=7),encap(eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no))'
3315 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3316 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
3318 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
3319 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3320 mpls,in_port=0,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:54:53,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1
3321 00000000 50 54 00 00 00 07 40 44-44 44 54 53 81 00 20 63
3322 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3323 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3324 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3326 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3327 mpls,in_port=0,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:54:53,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1
3328 00000000 50 54 00 00 00 07 40 44-44 44 54 53 81 00 20 63
3329 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3330 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3331 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3333 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3334 mpls,in_port=0,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:54:53,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1
3335 00000000 50 54 00 00 00 07 40 44-44 44 54 53 81 00 20 63
3336 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3337 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3338 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3341 dnl Modified MPLS controller action.
3342 dnl In this test, we push the VLAN tag before pushing a MPLS tag, but these
3343 dnl actions are reordered, so we see both of these in the final flow.
3344 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
3347 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=40:44:44:44:54:54,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no)'
3349 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3350 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
3352 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
3353 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3354 mpls,in_port=0,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:54:54,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1
3355 00000000 50 54 00 00 00 07 40 44-44 44 54 54 81 00 20 63
3356 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3357 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3358 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3359 00000040 00 00 00 00
3361 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3362 mpls,in_port=0,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:54:54,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1
3363 00000000 50 54 00 00 00 07 40 44-44 44 54 54 81 00 20 63
3364 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3365 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3366 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3367 00000040 00 00 00 00
3369 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3370 mpls,in_port=0,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:54:54,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1
3371 00000000 50 54 00 00 00 07 40 44-44 44 54 54 81 00 20 63
3372 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3373 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3374 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3375 00000040 00 00 00 00
3378 dnl Modified MPLS controller action.
3379 dnl In this test, the input packet in vlan-tagged, which should be stripped
3380 dnl before we push the MPLS and VLAN tags.
3381 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
3384 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=40:44:44:44:54:55,dst=50:54:00:00:00:07),eth_type(0x8100),vlan(vid=88,pcp=7),encap(eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no))'
3386 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3387 OVS_APP_EXIT_AND_WAIT([ovs-ofctl])
3389 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
3390 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3391 mpls,in_port=0,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:54:55,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1
3392 00000000 50 54 00 00 00 07 40 44-44 44 54 55 81 00 20 63
3393 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3394 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3395 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3397 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3398 mpls,in_port=0,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:54:55,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1
3399 00000000 50 54 00 00 00 07 40 44-44 44 54 55 81 00 20 63
3400 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3401 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3402 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3404 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3405 mpls,in_port=0,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:54:55,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1
3406 00000000 50 54 00 00 00 07 40 44-44 44 54 55 81 00 20 63
3407 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3408 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3409 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3412 dnl Modified MPLS controller action.
3413 dnl In this test, we push the VLAN tag before pushing a MPLS tag, but these
3414 dnl actions are reordered, so we see both of these in the final flow.
3415 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
3418 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=40:44:44:44:54:56,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no)'
3420 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3421 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
3423 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
3424 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3425 mpls,in_port=0,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:54:56,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1
3426 00000000 50 54 00 00 00 07 40 44-44 44 54 56 81 00 20 63
3427 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3428 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3429 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3430 00000040 00 00 00 00
3432 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3433 mpls,in_port=0,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:54:56,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1
3434 00000000 50 54 00 00 00 07 40 44-44 44 54 56 81 00 20 63
3435 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3436 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3437 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3438 00000040 00 00 00 00
3440 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3441 mpls,in_port=0,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:54:56,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1
3442 00000000 50 54 00 00 00 07 40 44-44 44 54 56 81 00 20 63
3443 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3444 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3445 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3446 00000040 00 00 00 00
3449 dnl Modified MPLS controller action.
3450 dnl In this test, the input packet in vlan-tagged, which should be stripped
3451 dnl before we push the MPLS and VLAN tags.
3452 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 -m 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
3455 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=40:44:44:44:54:57,dst=50:54:00:00:00:07),eth_type(0x8100),vlan(vid=88,pcp=7),encap(eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no))'
3457 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3458 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
3460 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
3461 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3462 mpls,in_port=0,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:54:57,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1
3463 00000000 50 54 00 00 00 07 40 44-44 44 54 57 81 00 20 63
3464 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3465 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3466 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3468 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3469 mpls,in_port=0,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:54:57,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1
3470 00000000 50 54 00 00 00 07 40 44-44 44 54 57 81 00 20 63
3471 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3472 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3473 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3475 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3476 mpls,in_port=0,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:54:57,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1
3477 00000000 50 54 00 00 00 07 40 44-44 44 54 57 81 00 20 63
3478 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3479 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3480 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3483 dnl Modified MPLS controller action.
3484 dnl In this test, the input packet in vlan-tagged, which should be stripped
3485 dnl before we push the MPLS and VLAN tags.
3486 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
3489 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=40:44:44:44:54:58,dst=50:54:00:00:00:07),eth_type(0x8100),vlan(vid=88,pcp=7),encap(eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no))'
3491 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3492 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
3494 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
3495 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3496 mpls,in_port=0,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:54:58,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1
3497 00000000 50 54 00 00 00 07 40 44-44 44 54 58 81 00 20 63
3498 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3499 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3500 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3502 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3503 mpls,in_port=0,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:54:58,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1
3504 00000000 50 54 00 00 00 07 40 44-44 44 54 58 81 00 20 63
3505 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3506 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3507 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3509 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3510 mpls,in_port=0,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:54:58,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1
3511 00000000 50 54 00 00 00 07 40 44-44 44 54 58 81 00 20 63
3512 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3513 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3514 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3517 dnl Modified MPLS controller action.
3518 dnl In this test, the input packet in vlan-tagged, which should be modified
3519 dnl before we push MPLS and VLAN tags.
3520 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
3523 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=40:44:44:44:54:59,dst=50:54:00:00:00:07),eth_type(0x8100),vlan(vid=88,pcp=7),encap(eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no))'
3525 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3526 ovs-appctl -t ovs-ofctl exit
3528 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
3529 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3530 mpls,in_port=0,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:54:59,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1
3531 00000000 50 54 00 00 00 07 40 44-44 44 54 59 81 00 20 63
3532 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3533 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3534 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3536 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3537 mpls,in_port=0,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:54:59,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1
3538 00000000 50 54 00 00 00 07 40 44-44 44 54 59 81 00 20 63
3539 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3540 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3541 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3543 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3544 mpls,in_port=0,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:54:59,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1
3545 00000000 50 54 00 00 00 07 40 44-44 44 54 59 81 00 20 63
3546 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3547 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3548 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3551 AT_CHECK([ovs-appctl revalidator/purge], [0])
3552 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
3553 cookie=0xa, n_packets=3, n_bytes=180, dl_src=40:44:44:44:54:50 actions=push_mpls:0x8847,load:0xa->OXM_OF_MPLS_LABEL[[]],push_vlan:0x8100,set_field:4195->vlan_vid,set_field:1->vlan_pcp,CONTROLLER:65535
3554 cookie=0xa, n_packets=3, n_bytes=180, dl_src=40:44:44:44:54:51 actions=push_mpls:0x8847,load:0xa->OXM_OF_MPLS_LABEL[[]],push_vlan:0x8100,set_field:4195->vlan_vid,set_field:1->vlan_pcp,CONTROLLER:65535
3555 cookie=0xa, n_packets=3, n_bytes=180, dl_src=40:44:44:44:54:52 actions=push_mpls:0x8847,load:0xa->OXM_OF_MPLS_LABEL[[]],push_vlan:0x8100,load:0x63->OXM_OF_VLAN_VID[[]],set_field:1->vlan_pcp,CONTROLLER:65535
3556 cookie=0xa, n_packets=3, n_bytes=180, dl_src=40:44:44:44:54:53 actions=push_mpls:0x8847,load:0xa->OXM_OF_MPLS_LABEL[[]],push_vlan:0x8100,load:0x63->OXM_OF_VLAN_VID[[]],set_field:1->vlan_pcp,CONTROLLER:65535
3557 cookie=0xa, n_packets=3, n_bytes=180, dl_src=40:44:44:44:54:54 actions=push_vlan:0x8100,set_field:4195->vlan_vid,set_field:1->vlan_pcp,push_mpls:0x8847,load:0xa->OXM_OF_MPLS_LABEL[[]],CONTROLLER:65535
3558 cookie=0xa, n_packets=3, n_bytes=180, dl_src=40:44:44:44:54:55 actions=push_vlan:0x8100,set_field:4195->vlan_vid,set_field:1->vlan_pcp,push_mpls:0x8847,load:0xa->OXM_OF_MPLS_LABEL[[]],CONTROLLER:65535
3559 cookie=0xa, n_packets=3, n_bytes=180, dl_src=40:44:44:44:54:56 actions=push_vlan:0x8100,load:0x63->OXM_OF_VLAN_VID[[]],set_field:1->vlan_pcp,push_mpls:0x8847,load:0xa->OXM_OF_MPLS_LABEL[[]],CONTROLLER:65535
3560 cookie=0xa, n_packets=3, n_bytes=180, dl_src=40:44:44:44:54:57 actions=push_vlan:0x8100,load:0x63->OXM_OF_VLAN_VID[[]],set_field:1->vlan_pcp,push_mpls:0x8847,load:0xa->OXM_OF_MPLS_LABEL[[]],CONTROLLER:65535
3561 cookie=0xa, n_packets=3, n_bytes=180, vlan_tci=0x1000/0x1000,dl_src=40:44:44:44:54:58 actions=load:0x63->OXM_OF_VLAN_VID[[]],set_field:1->vlan_pcp,push_mpls:0x8847,load:0xa->OXM_OF_MPLS_LABEL[[]],CONTROLLER:65535
3562 cookie=0xa, n_packets=3, n_bytes=180, vlan_tci=0x1000/0x1000,dl_src=40:44:44:44:54:59 actions=push_mpls:0x8847,load:0xa->OXM_OF_MPLS_LABEL[[]],set_field:1->vlan_pcp,load:0x63->OXM_OF_VLAN_VID[[]],CONTROLLER:65535
3563 OFPST_FLOW reply (OF1.2):
3569 AT_SETUP([ofproto-dpif - fragment handling - trace])
3571 ADD_OF_PORTS([br0], [1], [2], [3], [4], [5], [6], [90])
3572 AT_DATA([flows.txt], [dnl
3573 priority=75 tcp ip_frag=no tp_dst=80 actions=move:OXM_OF_TCP_DST[[]]->OXM_OF_TCP_SRC[[]],output:1
3574 priority=75 tcp ip_frag=first tp_dst=80 actions=move:OXM_OF_TCP_DST[[]]->OXM_OF_TCP_SRC[[]],output:2
3575 priority=50 tcp ip_frag=no actions=move:OXM_OF_TCP_DST[[]]->OXM_OF_TCP_SRC[[]],output:4
3576 priority=50 tcp ip_frag=first actions=move:OXM_OF_TCP_DST[[]]->OXM_OF_TCP_SRC[[]],output:5
3577 priority=50 tcp ip_frag=later actions=output:6
3579 AT_CHECK([ovs-ofctl replace-flows br0 flows.txt])
3581 base_flow="in_port(90),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=128"
3582 no_flow="$base_flow,frag=no),tcp(src=12345,dst=80)"
3583 first_flow="$base_flow,frag=first),tcp(src=12345,dst=80)"
3584 later_flow="$base_flow,frag=later)"
3586 # mode no first later
3589 'drop 1 drop drop' \
3598 AT_CHECK([ovs-ofctl set-frags br0 $mode])
3599 for type in no first later; do
3600 eval flow=\$${type}_flow exp_output=\$$type
3601 printf "\n%s\n" "----$mode $type-----"
3602 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
3604 if test $mode = drop && test $type != no; then
3605 echo 'Packets dropped because they are IP fragments and the fragment handling mode is "drop".' >> expout
3606 echo "Datapath actions: $exp_output" >> expout
3607 elif test $type = later; then
3608 echo "Datapath actions: $exp_output" >> expout
3610 echo "Datapath actions: set(tcp(src=80,dst=80)),$exp_output" >> expout
3612 AT_CHECK([grep 'IP fragments' stdout; tail -1 stdout], [0], [expout])
3618 AT_SETUP([ofproto-dpif - fragment handling - upcall])
3620 ADD_OF_PORTS([br0], [1], [2], [3], [4], [5], [6], [90])
3621 AT_DATA([flows.txt], [dnl
3622 priority=75 tcp ip_frag=no tp_dst=80 actions=set_field:81->tcp_dst,output:1
3623 priority=75 tcp ip_frag=first tp_dst=80 actions=set_field:81->tcp_dst,output:2
3624 priority=50 tcp ip_frag=no actions=set_field:81->tcp_dst,output:4
3625 priority=50 tcp ip_frag=first actions=set_field:81->tcp_dst,output:5
3626 priority=50 tcp ip_frag=later actions=output:6
3628 AT_CHECK([ovs-ofctl replace-flows br0 flows.txt])
3630 base_flow="in_port(90),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=128"
3631 no_flow="$base_flow,frag=no),tcp(src=12345,dst=80)"
3632 first_flow="$base_flow,frag=first),tcp(src=12345,dst=80)"
3633 later_flow="$base_flow,frag=later)"
3635 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
3639 AT_CHECK([ovs-ofctl set-frags br0 $mode])
3640 for type in no first later; do
3641 eval flow=\$${type}_flow
3642 printf "\n%s\n" "----$mode $type-----"
3644 AT_CHECK([ovs-appctl netdev-dummy/receive p90 "$flow"], [0], [stdout])
3647 AT_CHECK([ovs-appctl dpctl/dump-flows], [0], [dnl
3648 flow-dump from non-dpdk interfaces:
3649 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
3650 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
3651 recirc_id(0),in_port(90),eth_type(0x0800),ipv4(proto=6,frag=later), packets:0, bytes:0, used:never, actions:6
3656 AT_CHECK([ovs-appctl revalidator/purge], [0])
3657 AT_CHECK([ovs-ofctl set-frags br0 $mode])
3658 for type in no first later; do
3659 eval flow=\$${type}_flow
3660 printf "\n%s\n" "----$mode $type-----"
3662 AT_CHECK([ovs-appctl netdev-dummy/receive p90 "$flow"], [0], [stdout])
3665 AT_CHECK([ovs-appctl dpctl/dump-flows], [0], [dnl
3666 flow-dump from non-dpdk interfaces:
3667 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
3668 recirc_id(0),in_port(90),eth_type(0x0800),ipv4(frag=first), packets:0, bytes:0, used:never, actions:drop
3669 recirc_id(0),in_port(90),eth_type(0x0800),ipv4(frag=later), packets:0, bytes:0, used:never, actions:drop
3674 AT_CHECK([ovs-appctl revalidator/purge], [0])
3675 AT_CHECK([ovs-ofctl set-frags br0 $mode])
3676 for type in no first later; do
3677 eval flow=\$${type}_flow
3678 printf "\n%s\n" "----$mode $type-----"
3680 AT_CHECK([ovs-appctl netdev-dummy/receive p90 "$flow"], [0], [stdout])
3683 AT_CHECK([ovs-appctl dpctl/dump-flows], [0], [dnl
3684 flow-dump from non-dpdk interfaces:
3685 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
3686 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
3687 recirc_id(0),in_port(90),eth_type(0x0800),ipv4(proto=6,frag=later), packets:0, bytes:0, used:never, actions:6
3693 AT_SETUP([ofproto-dpif - fragment handling - actions])
3695 ADD_OF_PORTS([br0], [1], [2], [3], [4], [5], [6], [90])
3697 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])
3698 AT_CHECK([tail -2 stderr | sed 's/^.*|WARN|//'], [0], [dnl
3699 source field tcp_dst lacks correct prerequisites
3700 ovs-ofctl: actions are invalid with specified match (OFPBAC_MATCH_INCONSISTENT)
3703 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])
3704 AT_CHECK([tail -2 stderr | sed 's/^.*|WARN|//'], [0], [dnl
3705 destination field tcp_src lacks correct prerequisites
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=set_field:8888->udp_src,output:1"], [1], [], [stderr])
3710 AT_CHECK([tail -2 stderr | sed 's/^.*|WARN|//'], [0], [dnl
3711 set_field udp_src lacks correct prerequisities
3712 ovs-ofctl: actions are invalid with specified match (OFPBAC_MATCH_INCONSISTENT)
3715 AT_CHECK([ovs-ofctl add-flow br0 "udp,ip_frag=later actions=load:8888->NXM_OF_UDP_DST[[]],output:1"], [1], [], [stderr])
3716 AT_CHECK([tail -2 stderr | sed 's/^.*|WARN|//'], [0], [dnl
3717 set_field udp_dst 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_src,output:1"], [1], [], [stderr])
3722 AT_CHECK([tail -2 stderr | sed 's/^.*|WARN|//'], [0], [dnl
3723 set_field sctp_src lacks correct prerequisities
3724 ovs-ofctl: actions are invalid with specified match (OFPBAC_MATCH_INCONSISTENT)
3727 AT_CHECK([ovs-ofctl add-flow br0 "sctp,ip_frag=later actions=set_field:8888->sctp_dst,output:1"], [1], [], [stderr])
3728 AT_CHECK([tail -2 stderr | sed 's/^.*|WARN|//'], [0], [dnl
3729 set_field sctp_dst lacks correct prerequisities
3730 ovs-ofctl: actions are invalid with specified match (OFPBAC_MATCH_INCONSISTENT)
3733 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])
3734 AT_CHECK([tail -2 stderr | sed 's/^.*|WARN|//'], [0], [dnl
3735 source field tcp_dst lacks correct prerequisites
3736 ovs-ofctl: actions are invalid with specified match (OFPBAC_MATCH_INCONSISTENT)
3739 AT_DATA([flows.txt], [dnl
3740 priority=75 tcp actions=load:42->OXM_OF_TCP_SRC[[0..7]],output:1
3742 AT_CHECK([ovs-ofctl -O OpenFlow12 replace-flows br0 flows.txt])
3744 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
3748 AT_CHECK([ovs-ofctl set-frags br0 $mode])
3749 for frag in 4000 6000 6008 4010; do
3750 printf "\n%s\n" "----$mode $frag-----"
3752 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"])
3755 AT_CHECK([ovs-appctl dpctl/dump-flows | sed 's/used:[[0-9]].[[0-9]]*s/used:0.001s/'], [0], [dnl
3756 flow-dump from non-dpdk interfaces:
3757 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
3758 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
3759 recirc_id(0),in_port(90),eth_type(0x0800),ipv4(proto=6,frag=later), packets:1, bytes:74, used:0.001s, actions:1
3762 AT_CHECK([ovs-appctl revalidator/purge], [0])
3763 AT_CHECK([ovs-ofctl set-frags br0 $mode])
3764 for frag in 4000 6000 6008 4010; do
3765 printf "\n%s\n" "----$mode $frag truncated transport header -----"
3767 AT_CHECK([ovs-appctl netdev-dummy/receive p90 "0021853763af 0026b98cb0f9 0800 4500 0018 2e24 $frag 40 06 465d ac11370d ac11370b 828b 0016"])
3770 AT_CHECK([ovs-appctl dpctl/dump-flows | sed 's/used:[[0-9]].[[0-9]]*s/used:0.001s/'], [0], [dnl
3771 flow-dump from non-dpdk interfaces:
3772 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
3773 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
3774 recirc_id(0),in_port(90),eth_type(0x0800),ipv4(proto=6,frag=later), packets:1, bytes:60, used:0.001s, actions:1
3777 AT_CHECK([ovs-appctl revalidator/purge], [0])
3778 AT_CHECK([ovs-ofctl set-frags br0 $mode])
3779 for frag in 4000 6000 6001 4002; do
3780 printf "\n%s\n" "----$mode $frag missing transport header-----"
3782 AT_CHECK([ovs-appctl netdev-dummy/receive p90 "0021853763af 0026b98cb0f9 0800 4500 0014 2e24 $frag 40 06 465d ac11370d ac11370b"])
3785 AT_CHECK([ovs-appctl dpctl/dump-flows | sed 's/used:[[0-9]].[[0-9]]*s/used:0.001s/'], [0], [dnl
3786 flow-dump from non-dpdk interfaces:
3787 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
3788 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
3789 recirc_id(0),in_port(90),eth_type(0x0800),ipv4(proto=6,frag=later), packets:1, bytes:60, used:0.001s, actions:1
3795 AT_SETUP([ofproto-dpif - exit])
3797 ADD_OF_PORTS([br0], [1], [2], [3], [10], [11], [12], [13], [14])
3798 AT_DATA([flows.txt], [dnl
3799 in_port=1 actions=output:10,exit,output:11
3800 in_port=2 actions=output:12,resubmit:1,output:12
3801 in_port=3 actions=output:13,resubmit:2,output:14
3803 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
3804 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])
3805 AT_CHECK([tail -1 stdout], [0],
3806 [Datapath actions: 10
3808 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])
3809 AT_CHECK([tail -1 stdout], [0],
3810 [Datapath actions: 12,10
3812 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])
3813 AT_CHECK([tail -1 stdout], [0],
3814 [Datapath actions: 13,12,10
3820 AT_SETUP([ofproto-dpif - mirroring, select_all])
3822 ADD_OF_PORTS([br0], 1, 2, 3)
3824 set Bridge br0 mirrors=@m --\
3825 --id=@p3 get Port p3 --\
3826 --id=@m create Mirror name=mymirror select_all=true output_port=@p3
3828 AT_DATA([flows.txt], [dnl
3829 in_port=1 actions=output:2
3830 in_port=2 actions=output:1
3832 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
3834 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)"
3835 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
3836 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
3837 [Datapath actions: 2,3
3840 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)"
3841 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
3842 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
3843 [Datapath actions: 1,3
3850 AT_SETUP([ofproto-dpif - mirroring, select_src])
3852 ADD_OF_PORTS([br0], 1, 2, 3)
3854 set Bridge br0 mirrors=@m --\
3855 --id=@p1 get Port p1 -- --id=@p3 get Port p3 --\
3856 --id=@m create Mirror name=mymirror select_src_port=@p1 output_port=@p3
3858 AT_DATA([flows.txt], [dnl
3859 in_port=1 actions=output:2
3860 in_port=2 actions=output:1
3862 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
3864 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)"
3865 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
3866 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
3867 [Datapath actions: 2,3
3870 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)"
3871 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
3872 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
3873 [Datapath actions: 1
3878 AT_SETUP([ofproto-dpif - mirroring, OFPP_NONE ingress port])
3880 ADD_OF_PORTS([br0], 1, 2)
3882 set Bridge br0 mirrors=@m --\
3883 --id=@p2 get Port p2 --\
3884 --id=@m create Mirror name=mymirror select_all=true output_port=@p2
3886 AT_CHECK([ovs-ofctl add-flow br0 action=output:1])
3888 # "in_port" defaults to OFPP_NONE if it's not specified.
3889 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"
3890 AT_CHECK([ovs-appctl ofproto/trace br0 "$flow"], [0], [stdout])
3891 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
3892 [Datapath actions: 1,2
3899 AT_SETUP([ofproto-dpif - mirroring, select_dst])
3901 ADD_OF_PORTS([br0], 1, 2, 3)
3903 set Bridge br0 mirrors=@m --\
3904 --id=@p2 get Port p2 -- --id=@p3 get Port p3 --\
3905 --id=@m create Mirror name=mymirror select_dst_port=@p2 output_port=@p3
3907 AT_DATA([flows.txt], [dnl
3908 in_port=1 actions=output:2
3909 in_port=2 actions=output:1
3911 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
3913 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)"
3914 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
3915 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
3916 [Datapath actions: 2,3
3919 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)"
3920 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
3921 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
3922 [Datapath actions: 1
3929 AT_SETUP([ofproto-dpif - mirroring, select_vlan])
3931 ADD_OF_PORTS([br0], 1, 2, 3)
3933 set Bridge br0 mirrors=@m --\
3934 --id=@p2 get Port p2 -- --id=@p3 get Port p3 --\
3935 --id=@m create Mirror name=mymirror select_all=true select_vlan=11 output_port=@p3
3937 AT_DATA([flows.txt], [dnl
3938 in_port=1, actions=output:2
3940 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
3942 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)"
3943 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
3944 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
3945 [Datapath actions: 2
3948 flow="in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x8100),vlan(vid=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))"
3949 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
3950 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
3951 [Datapath actions: 2
3954 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))"
3955 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
3956 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
3957 [Datapath actions: 2,3
3964 AT_SETUP([ofproto-dpif - mirroring, output_port])
3966 ADD_OF_PORTS([br0], 1, 2, 3)
3968 set Bridge br0 mirrors=@m --\
3969 --id=@p3 get Port p3 --\
3970 --id=@m create Mirror name=mymirror select_all=true output_port=@p3
3972 AT_DATA([flows.txt], [dnl
3973 in_port=1 actions=mod_vlan_vid:17,output:2
3974 in_port=2 actions=output:1
3976 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
3978 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)"
3979 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
3980 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
3981 [Datapath actions: push_vlan(vid=17,pcp=0),2,pop_vlan,3
3984 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)"
3985 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
3986 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
3987 [Datapath actions: 1,3
3993 AT_SETUP([ofproto-dpif - mirroring, output_vlan])
3995 ADD_OF_PORTS([br0], 1, 2)
3997 set Bridge br0 mirrors=@m --\
3998 --id=@m create Mirror name=mymirror select_all=true output_vlan=12
4000 AT_DATA([flows.txt], [dnl
4001 in_port=1 actions=output:2
4002 in_port=2 actions=mod_vlan_vid:17,output:1
4004 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
4006 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)"
4007 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
4008 actual=`tail -1 stdout | sed 's/Datapath actions: //'`
4010 expected="2,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])
4015 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)"
4016 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
4017 actual=`tail -1 stdout | sed 's/Datapath actions: //'`
4019 expected="push_vlan(vid=17,pcp=0),1,pop_vlan,push_vlan(vid=12,pcp=0),1,2,100"
4020 AT_CHECK([ovs-dpctl normalize-actions "$flow" "$expected"], [0], [stdout])
4022 AT_CHECK([ovs-dpctl normalize-actions "$flow" "$actual"], [0], [expout])
4027 # Two testcases below are for the ofproto/trace command
4028 # The first one tests all correct syntax:
4029 # ofproto/trace [dp_name] odp_flow [-generate|packet]
4030 # ofproto/trace br_name br_flow [-generate|packet]
4031 AT_SETUP([ofproto-dpif - ofproto/trace command 1])
4032 OVS_VSWITCHD_START([set bridge br0 fail-mode=standalone])
4033 ADD_OF_PORTS([br0], 1, 2, 3)
4035 AT_DATA([flows.txt], [dnl
4036 in_port=1 actions=output:2
4037 in_port=2 actions=output:1
4039 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
4041 odp_flow="in_port(1)"
4043 # Test command: ofproto/trace odp_flow with in_port as a name.
4044 AT_CHECK([ovs-appctl ofproto/trace "$odp_flow"], [0], [stdout])
4045 AT_CHECK([tail -1 stdout], [0], [dnl
4049 odp_flow="in_port(1)"
4050 # Test command: ofproto/trace odp_flow
4051 AT_CHECK([ovs-appctl ofproto/trace "$odp_flow"], [0], [stdout])
4052 AT_CHECK([tail -1 stdout], [0], [dnl
4056 # Test command: ofproto/trace dp_name odp_flow
4057 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$odp_flow"], [0], [stdout])
4058 AT_CHECK([tail -1 stdout], [0], [dnl
4061 # Test commmand: ofproto/trace br_name br_flow
4062 AT_CHECK([ovs-appctl ofproto/trace br0 "$br_flow"], [0], [stdout])
4063 AT_CHECK([tail -1 stdout], [0], [dnl
4067 # Delete the inserted flows
4068 AT_CHECK([ovs-ofctl del-flows br0 "in_port=1"], [0], [stdout])
4069 AT_CHECK([ovs-ofctl del-flows br0 "in_port=2"], [0], [stdout])
4071 # This section below tests the [-generate] option
4072 odp_flow="in_port(3),eth(src=50:54:00:00:00:05,dst=ff:ff:ff:ff:ff:ff)"
4073 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"
4075 # Test command: ofproto/trace odp_flow
4076 AT_CHECK([ovs-appctl ofproto/trace "$odp_flow"], [0], [stdout])
4077 # Check for no MAC learning entry
4078 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
4082 # Test command: ofproto/trace br_name br_flow
4083 AT_CHECK([ovs-appctl ofproto/trace br0 "$br_flow"], [0], [stdout])
4084 # Check for no MAC learning entry
4085 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
4089 # Test command: ofproto/trace odp_flow -generate
4090 AT_CHECK([ovs-appctl ofproto/trace "$odp_flow" -generate], [0], [stdout])
4091 # Check for the MAC learning entry
4092 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
4094 3 0 50:54:00:00:00:05 ?
4097 # Test command: ofproto/trace dp_name odp_flow -generate
4098 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy \
4099 "in_port(1),eth(src=50:54:00:00:00:06,dst=50:54:00:00:00:05)" \
4100 -generate], [0], [stdout])
4101 # Check for both MAC learning entries
4102 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
4104 3 0 50:54:00:00:00:05 ?
4105 1 0 50:54:00:00:00:06 ?
4108 # Test command: ofproto/trace br_name br_flow -generate
4109 AT_CHECK([ovs-appctl ofproto/trace br0 \
4110 "in_port=2,dl_src=50:54:00:00:00:07,dl_dst=50:54:00:00:00:06" \
4111 -generate], [0], [stdout])
4112 # Check for both MAC learning entries.
4113 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
4115 3 0 50:54:00:00:00:05 ?
4116 1 0 50:54:00:00:00:06 ?
4117 2 0 50:54:00:00:00:07 ?
4120 # This section beflow tests the [packet] option
4121 # The ovs-tcpundump of packets between port1 and port2
4122 pkt1to2="50540000000250540000000108064500001C000100004001F98CC0A80001C0A800020800F7FF00000000"
4123 pkt2to1="50540000000150540000000208064500001C000100004001F98CC0A80002C0A800010800F7FF00000000"
4125 # Construct the MAC learning table
4126 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy \
4127 "in_port(1),eth(src=50:54:00:00:00:01,dst=ff:ff:ff:ff:ff:ff)" \
4128 -generate], [0], [stdout])
4130 # Construct the MAC learning table
4131 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy \
4132 "in_port(2),eth(src=50:54:00:00:00:02,dst=ff:ff:ff:ff:ff:ff)" \
4133 -generate], [0], [stdout])
4135 # Test command: ofproto/trace odp_flow packet
4136 AT_CHECK([ovs-appctl ofproto/trace \
4137 "in_port(1),skb_priority(1),skb_mark(2)" "$pkt1to2"], [0], [stdout])
4138 AT_CHECK([tail -1 stdout], [0], [dnl
4141 AT_CHECK([head -n 2 stdout], [0], [dnl
4143 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
4146 # Test command: ofproto/trace dp_name odp_flow packet
4147 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy \
4148 "in_port(1),skb_priority(1),skb_mark(2)" "$pkt1to2"], [0], [stdout])
4149 AT_CHECK([tail -1 stdout], [0], [dnl
4152 AT_CHECK([head -n 2 stdout], [0], [dnl
4154 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
4157 # Test command: ofproto/trace br_name br_flow packet
4158 AT_CHECK([ovs-appctl ofproto/trace br0 \
4159 "in_port=2,skb_priority=2,pkt_mark=1" "$pkt2to1"], [0], [stdout],[stderr])
4160 AT_CHECK([tail -1 stdout], [0], [dnl
4163 AT_CHECK([head -n 2 stdout], [0], [dnl
4165 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
4171 # The second test tests the corner cases
4172 AT_SETUP([ofproto-dpif - ofproto/trace command 2])
4174 ADD_OF_PORTS([br0], 1, 2)
4177 odp_flow="in_port(1),eth(src=50:54:00:00:00:01,dst=50:54:00:00:00:02)"
4178 br_flow="in_port=1,dl_src=50:54:00:00:00:01,dl_dst=50:54:00:00:00:02"
4180 generate="-generate"
4181 pkt="50540000000250540000000108064500001C000100004001F98CC0A80001C0A800020800F7FF00000000"
4183 # Test incorrect command: ofproto/trace wrong_name odp_flow [-generate|packet]
4189 [AT_CHECK([ovs-appctl ofproto/trace wrong_name "$odp_flow" option],
4191 AT_CHECK([tail -2 stderr], [0], [dnl
4192 Cannot find the datapath
4193 ovs-appctl: ovs-vswitchd: server returned an error
4196 # Test incorrect command: ofproto/trace empty_string odp_flow [-generate|packet]
4202 [AT_CHECK([ovs-appctl ofproto/trace "" "$odp_flow" option],
4204 AT_CHECK([tail -2 stderr], [0], [dnl
4205 Cannot find the datapath
4206 ovs-appctl: ovs-vswitchd: server returned an error
4209 # Test incorrect command: ofproto/trace nonexist_dp_name odp_flow [-generate|packet]
4215 [AT_CHECK([ovs-appctl ofproto/trace ovs-system "$odp_flow" option],
4217 AT_CHECK([tail -2 stderr], [0], [dnl
4218 Cannot find the datapath
4219 ovs-appctl: ovs-vswitchd: server returned an error
4222 # Test incorrect command: ofproto/trace br_name odp_flow [-generate|packet]
4228 [AT_CHECK([ovs-appctl ofproto/trace br0 "$odp_flow" option],
4230 AT_CHECK([tail -2 stderr], [0], [dnl
4231 Cannot find the datapath
4232 ovs-appctl: ovs-vswitchd: server returned an error
4235 # Test incorrect command: ofproto/trace dp_name br_flow [-generate|packet]
4241 [AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$br_flow" option],
4243 AT_CHECK([tail -2 stderr], [0], [dnl
4245 ovs-appctl: ovs-vswitchd: server returned an error
4248 # Test incorrect command: ofproto/trace br_flow [-generate|packet]
4254 [AT_CHECK([ovs-appctl ofproto/trace "$br_flow" option],
4256 AT_CHECK([tail -2 stderr], [0], [dnl
4257 Must specify bridge name
4258 ovs-appctl: ovs-vswitchd: server returned an error
4261 # Test incorrect command: ofproto/trace dp_name odp_flow garbage_option
4262 AT_CHECK([ovs-appctl ofproto/trace \
4263 ovs-dummy "$odp_flow" garbage_option],
4264 [2], [stdout],[stderr])
4265 AT_CHECK([tail -2 stderr], [0], [dnl
4266 Trailing garbage in packet data
4267 ovs-appctl: ovs-vswitchd: server returned an error
4270 # Test incorrect command: ofproto/trace with 4 arguments
4271 AT_CHECK([ovs-appctl ofproto/trace \
4272 arg1, arg2, arg3, arg4], [2], [stdout],[stderr])
4273 AT_CHECK([tail -2 stderr], [0], [dnl
4274 "ofproto/trace" command takes at most 3 arguments
4275 ovs-appctl: ovs-vswitchd: server returned an error
4278 # Test incorrect command: ofproto/trace with 0 argument
4279 AT_CHECK([ovs-appctl ofproto/trace ], [2], [stdout],[stderr])
4280 AT_CHECK([tail -2 stderr], [0], [dnl
4281 "ofproto/trace" command requires at least 1 arguments
4282 ovs-appctl: ovs-vswitchd: server returned an error
4288 AT_SETUP([ofproto-dpif - ofproto/trace-packet-out])
4290 ADD_OF_PORTS([br0], 1, 2, 3)
4292 AT_DATA([flows.txt], [dnl
4293 in_port=1 actions=output:2
4294 in_port=2 actions=output:1
4296 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
4298 AT_CHECK([ovs-appctl ofproto/trace-packet-out br0 in_port=1 'mod_vlan_vid:123,resubmit(,0)'], [0], [stdout])
4299 AT_CHECK([tail -1 stdout], [0], [dnl
4300 Datapath actions: push_vlan(vid=123,pcp=0),2
4307 m4_define([OFPROTO_TRACE],
4309 AT_CHECK([ovs-appctl ofproto/trace $1 "$flow" $3], [0], [stdout])
4310 actual=`tail -1 stdout | sed 's/Datapath actions: //'`
4312 AT_CHECK([ovs-dpctl normalize-actions "$flow" "$expected" $5],
4315 AT_CHECK([ovs-dpctl normalize-actions "$flow" "$actual" $5],
4318 AT_SETUP([ofproto-dpif - MAC learning])
4319 OVS_VSWITCHD_START([set bridge br0 fail-mode=standalone])
4320 ADD_OF_PORTS([br0], 1, 2, 3)
4322 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)'
4324 # Trace an ARP packet arriving on p3, to create a MAC learning entry.
4327 [in_port(3),eth(src=50:54:00:00:00:05,dst=ff:ff:ff:ff:ff:ff),$arp],
4331 # Check for the MAC learning entry.
4332 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
4334 3 0 50:54:00:00:00:05 ?
4337 # Trace a packet arrival destined for the learned MAC.
4338 # (This will also learn a MAC.)
4341 [in_port(1),eth(src=50:54:00:00:00:06,dst=50:54:00:00:00:05),$arp],
4345 # Check for both MAC learning entries.
4346 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
4348 3 0 50:54:00:00:00:05 ?
4349 1 0 50:54:00:00:00:06 ?
4352 # Trace a packet arrival that updates the first learned MAC entry.
4355 [in_port(2),eth(src=50:54:00:00:00:05,dst=ff:ff:ff:ff:ff:ff),$arp],
4359 # Check that the MAC learning entry was updated.
4360 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
4362 1 0 50:54:00:00:00:06 ?
4363 2 0 50:54:00:00:00:05 ?
4366 # Add another bridge.
4370 -- set bridge br1 datapath-type=dummy])
4371 ADD_OF_PORTS([br1], 4, 5)
4373 # Trace some packet arrivals in br1 to create MAC learning entries there too.
4376 [in_port(4),eth(src=50:54:00:00:00:06,dst=ff:ff:ff:ff:ff:ff),$arp],
4381 [in_port(5),eth(src=50:54:00:00:00:07,dst=ff:ff:ff:ff:ff:ff),$arp],
4385 # Check that the MAC learning entries were added.
4386 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br1 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
4388 4 0 50:54:00:00:00:06 ?
4389 5 0 50:54:00:00:00:07 ?
4392 # Delete port p1 and see that its MAC learning entry disappeared, and
4393 # that the MAC learning entry for the same MAC was also deleted from br1.
4394 AT_CHECK([ovs-vsctl del-port p1])
4395 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
4397 2 0 50:54:00:00:00:05 ?
4399 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br1 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
4401 5 0 50:54:00:00:00:07 ?
4407 AT_SETUP([ofproto-dpif - MAC table overflow])
4409 [set bridge br0 fail-mode=standalone other-config:mac-table-size=10])
4410 ADD_OF_PORTS([br0], 1, 2, 3)
4412 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)'
4414 AT_CHECK([ovs-appctl time/stop])
4416 # Trace 10 ARP packets arriving on p3, to create MAC learning entries.
4417 for i in 0 1 2 3 4 5 6 7 8 9; do
4420 [in_port(3),eth(src=50:54:00:00:00:0$i,dst=ff:ff:ff:ff:ff:ff),$arp],
4423 ovs-appctl time/warp 1000
4426 # Check for the MAC learning entries.
4427 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/ *[[0-9]]\{1,\}$//' | sort],
4429 3 0 50:54:00:00:00:00
4430 3 0 50:54:00:00:00:01
4431 3 0 50:54:00:00:00:02
4432 3 0 50:54:00:00:00:03
4433 3 0 50:54:00:00:00:04
4434 3 0 50:54:00:00:00:05
4435 3 0 50:54:00:00:00:06
4436 3 0 50:54:00:00:00:07
4437 3 0 50:54:00:00:00:08
4438 3 0 50:54:00:00:00:09
4442 # Trace another ARP packet on another MAC.
4445 [in_port(3),eth(src=50:54:00:00:00:10,dst=ff:ff:ff:ff:ff:ff),$arp],
4449 # Check that the new one chased the oldest one out of the table.
4450 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/' | sort],
4452 3 0 50:54:00:00:00:01 ?
4453 3 0 50:54:00:00:00:02 ?
4454 3 0 50:54:00:00:00:03 ?
4455 3 0 50:54:00:00:00:04 ?
4456 3 0 50:54:00:00:00:05 ?
4457 3 0 50:54:00:00:00:06 ?
4458 3 0 50:54:00:00:00:07 ?
4459 3 0 50:54:00:00:00:08 ?
4460 3 0 50:54:00:00:00:09 ?
4461 3 0 50:54:00:00:00:10 ?
4467 # CHECK_SFLOW_SAMPLING_PACKET(LOOPBACK_ADDR, ADDR_WITHOUT_BRACKETS)
4469 # Test that sFlow samples packets correctly using IPv4/IPv6 sFlow collector
4471 # IP_VERSION_TYPE is used in AT_SETUP
4472 m4_define([CHECK_SFLOW_SAMPLING_PACKET],
4473 [AT_SETUP([ofproto-dpif - sFlow packet sampling - $2 collector])
4474 AT_XFAIL_IF([test "$IS_WIN32" = "yes"])
4475 OVS_VSWITCHD_START([set Bridge br0 fail-mode=standalone])
4477 ON_EXIT([kill `cat test-sflow.pid`])
4478 AT_CHECK([ovstest test-sflow --log-file --detach --no-chdir --pidfile 0:$1 > sflow.log], [0], [], [ignore])
4479 AT_CAPTURE_FILE([sflow.log])
4480 SFLOW_PORT=`parse_listening_port < test-sflow.log`
4481 ovs-appctl time/stop
4483 ADD_OF_PORTS([br0], 1, 2)
4485 set Interface br0 options:ifindex=1002 -- \
4486 set Interface p1 options:ifindex=1004 -- \
4487 set Interface p2 options:ifindex=1003 -- \
4488 set Bridge br0 sflow=@sf -- \
4489 --id=@sf create sflow targets=\"$1:$SFLOW_PORT\" \
4490 header=128 sampling=1 polling=1 agent=$LOOPBACK_INTERFACE
4492 dnl open with ARP packets to seed the bridge-learning. The output
4493 dnl ifIndex numbers should be reported predictably after that.
4494 dnl Since we set sampling=1 we should see all of these packets
4495 dnl reported. Sorting the output by data-source and seqNo makes
4496 dnl it deterministic. Ensuring that we send at least two packets
4497 dnl into each port means we get to check the seq nos are
4498 dnl incrementing correctly.
4499 dnl because packets from different ports can be handled by separate
4500 dnl threads, put some sleeps
4502 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)'
4504 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)'
4506 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)'
4508 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)'
4509 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)'
4511 dnl sleep long enough to get more than one counter sample
4512 dnl from each datasource so we can check sequence numbers
4513 ovs-appctl time/warp 3000 100
4515 ovs-appctl -t test-sflow exit
4517 AT_CHECK_UNQUOTED([[sort sflow.log | $EGREP 'HEADER|ERROR' | sed 's/ /\
4538 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
4558 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
4578 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
4598 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
4618 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
4621 AT_CHECK_UNQUOTED([[sort sflow.log | $EGREP 'IFCOUNTERS|ERROR|PORTNAME|OPENFLOWPORT' | head -18 | sed 's/ /\
4635 in_broadcasts=4294967295
4638 in_unknownprotos=4294967295
4641 out_multicasts=4294967295
4642 out_broadcasts=4294967295
4658 in_broadcasts=4294967295
4661 in_unknownprotos=4294967295
4664 out_multicasts=4294967295
4665 out_broadcasts=4294967295
4681 in_broadcasts=4294967295
4684 in_unknownprotos=4294967295
4687 out_multicasts=4294967295
4688 out_broadcasts=4294967295
4704 in_broadcasts=4294967295
4707 in_unknownprotos=4294967295
4710 out_multicasts=4294967295
4711 out_broadcasts=4294967295
4727 in_broadcasts=4294967295
4730 in_unknownprotos=4294967295
4733 out_multicasts=4294967295
4734 out_broadcasts=4294967295
4750 in_broadcasts=4294967295
4753 in_unknownprotos=4294967295
4756 out_multicasts=4294967295
4757 out_broadcasts=4294967295
4762 datapath_id=18364758544493064720
4765 datapath_id=18364758544493064720
4768 datapath_id=18364758544493064720
4771 datapath_id=18364758544493064720
4774 datapath_id=18364758544493064720
4777 datapath_id=18364758544493064720
4794 CHECK_SFLOW_SAMPLING_PACKET([127.0.0.1], [IPv4])
4795 CHECK_SFLOW_SAMPLING_PACKET([[[::1]]], [IPv6])
4797 dnl Test sFlow LAG structures
4798 AT_SETUP([ofproto-dpif - sFlow LACP structures])
4799 AT_SKIP_IF([test "$IS_WIN32" = "yes"])
4800 OVS_VSWITCHD_START([dnl
4801 add-bond br0 bond p1 p2 -- \
4802 set Port bond lacp=active bond-mode=active-backup \
4803 other_config:lacp-time="fast" \
4804 other_config:lacp-system-id=11:22:33:44:55:66 \
4805 other_config:lacp-system-priority=54321 -- \
4806 set Interface p1 type=dummy \
4807 other_config:lacp-port-id=11 \
4808 other_config:lacp-port-priority=111 \
4809 other_config:lacp-aggregation-key=3333 -- \
4810 set Interface p2 type=dummy \
4811 other_config:lacp-port-id=22 \
4812 other_config:lacp-port-priority=222 \
4813 other_config:lacp-aggregation-key=3333 ])
4815 ON_EXIT([kill `cat test-sflow.pid`])
4816 AT_CHECK([ovstest test-sflow --log-file --detach --no-chdir --pidfile 0:127.0.0.1 > sflow.log], [0], [], [ignore])
4817 AT_CAPTURE_FILE([sflow.log])
4818 SFLOW_PORT=`parse_listening_port < test-sflow.log`
4820 ovs-appctl time/stop
4823 set Interface p1 options:ifindex=1003 -- \
4824 set Bridge br0 sflow=@sf -- \
4825 --id=@sf create sflow targets=\"127.0.0.1:$SFLOW_PORT\" \
4826 header=128 sampling=1 polling=1
4828 dnl sleep long enough to get the sFlow datagram flushed out (may be delayed for up to 1 second)
4829 AT_CHECK([ovs-appctl time/warp 2000 100], [0], [ignore])
4830 AT_CHECK([ovs-appctl revalidator/purge], [0])
4832 ovs-appctl -t test-sflow exit
4833 AT_CHECK([[sort sflow.log | $EGREP 'LACPCOUNTERS|ERROR' | head -n 1 | sed 's/ /\
4836 sysID=11:22:33:44:55:66
4837 partnerID=00:00:00:00:00:00
4844 markerPDUsRx=4294967295
4845 markerRespPDUsRx=4294967295
4846 unknownRx=4294967295
4849 markerPDUsTx=4294967295
4850 markerRespPDUsTx=4294967295
4855 # CHECK_NETFLOW_EXPIRATION(LOOPBACK_ADDR, IP_VERSION_TYPE)
4857 # Test that basic NetFlow reports flow statistics correctly:
4858 # The initial packet of a flow are correctly accounted.
4859 # Later packets within a flow are correctly accounted.
4860 # Flow actions changing (in this case, due to MAC learning)
4861 # cause a record to be sent.
4863 # IP_VERSION_TYPE is used in AT_SETUP
4864 m4_define([CHECK_NETFLOW_EXPIRATION],
4865 [AT_SETUP([ofproto-dpif - NetFlow flow expiration - $2 collector])
4866 OVS_VSWITCHD_START([set Bridge br0 fail-mode=standalone])
4867 ADD_OF_PORTS([br0], 1, 2)
4869 ovs-appctl time/stop
4870 ON_EXIT([kill `cat test-netflow.pid`])
4871 AT_CHECK([ovstest test-netflow --log-file --detach --no-chdir --pidfile 0:$1 > netflow.log], [0], [], [ignore])
4872 AT_CAPTURE_FILE([netflow.log])
4873 NETFLOW_PORT=`parse_listening_port < test-netflow.log`
4876 set Bridge br0 netflow=@nf -- \
4877 --id=@nf create NetFlow targets=\"$1:$NETFLOW_PORT\" \
4878 engine_id=1 engine_type=2 active_timeout=30 add-id-to-interface=false
4880 for delay in 1000 30000; do
4881 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)'
4882 sleep 1 # ensure the order in which these two packets are processed
4883 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)'
4885 ovs-appctl time/warp $delay
4888 ovs-appctl time/warp 6000
4889 ovs-appctl revalidator/wait
4891 ovs-appctl -t test-netflow exit
4893 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])
4895 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])
4897 combined=`grep "192.168.0.2 > 192.168.0.1, if 2 > 1, 2 pkts, 120 bytes, ICMP 0:0" netflow.log | wc -l`
4898 separate=`grep "192.168.0.2 > 192.168.0.1, if 2 > 1, 1 pkts, 60 bytes, ICMP 0:0" netflow.log | wc -l`
4899 AT_CHECK([test $separate = 2 || test $combined = 1], [0])
4903 CHECK_NETFLOW_EXPIRATION([127.0.0.1], [IPv4])
4904 CHECK_NETFLOW_EXPIRATION([[[::1]]], [IPv6])
4906 # CHECK_NETFLOW_ACTIVE_EXPIRATION(LOOPBACK_ADDR, IP_VERSION_TYPE)
4908 # Test that basic NetFlow reports active expirations correctly.
4910 # IP_VERSION_TYPE is used in AT_SETUP
4911 m4_define([CHECK_NETFLOW_ACTIVE_EXPIRATION],
4912 [AT_SETUP([ofproto-dpif - NetFlow active expiration - $2 collector])
4914 OVS_VSWITCHD_START([set Bridge br0 fail-mode=standalone])
4915 ADD_OF_PORTS([br0], 1, 2)
4917 ON_EXIT([kill `cat test-netflow.pid`])
4918 AT_CHECK([ovstest test-netflow --log-file --detach --no-chdir --pidfile 0:$1 > netflow.log], [0], [], [ignore])
4919 AT_CAPTURE_FILE([netflow.log])
4920 NETFLOW_PORT=`parse_listening_port < test-netflow.log`
4923 set Bridge br0 netflow=@nf -- \
4924 --id=@nf create NetFlow targets=\"$1:$NETFLOW_PORT\" \
4925 engine_id=1 engine_type=2 active_timeout=10 add-id-to-interface=false
4927 AT_CHECK([ovs-appctl time/stop])
4929 while test $n -le 60; do
4932 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)'
4933 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)'
4935 ovs-appctl time/warp 1000
4938 ovs-appctl time/warp 10000
4940 ovs-appctl revalidator/wait
4942 ovs-appctl -t test-netflow exit
4944 # Count the number of reported packets:
4945 # - From source to destination before MAC learning kicks in (just one).
4946 # - From source to destination after that.
4947 # - From destination to source.
4955 pkts=`echo "$line" | sed 's/.*, \([[0-9]]*\) pkts,.*/\1/'`
4962 "seq "*": 192.168.0.1 > 192.168.0.2, if 1 > 65535, "*" pkts, "*" bytes, TCP 1234 > 80, time "*)
4965 "seq "*": 192.168.0.1 > 192.168.0.2, if 1 > 2, "*" pkts, "*" bytes, TCP 1234 > 80, time "*)
4968 "seq "*": 192.168.0.2 > 192.168.0.1, if 2 > 1, "*" pkts, "*" bytes, TCP 80 > 1234, time "*)
4975 eval $counter=\`expr \$$counter + \$pkts\`
4976 n_recs=`expr $n_recs + 1`
4979 # There should be exactly 1 MAC learning packet,
4980 # exactly 59 other packets in that direction,
4981 # and exactly 60 packets in the other direction.
4982 AT_CHECK([echo $n_learn $n_in $n_out $n_other], [0], [1 59 60 0
4987 CHECK_NETFLOW_ACTIVE_EXPIRATION([127.0.0.1], [IPv4])
4988 CHECK_NETFLOW_ACTIVE_EXPIRATION([[[::1]]], [IPv6])
4990 AT_SETUP([ofproto-dpif - flow stats])
4992 AT_CHECK([ovs-ofctl add-flow br0 "ip,actions=NORMAL"])
4993 AT_CHECK([ovs-ofctl add-flow br0 "icmp,actions=NORMAL"])
4995 ovs-appctl time/stop
4997 for i in `seq 1 10`; do
4998 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)'
5001 AT_CHECK([ovs-appctl time/warp 1000], [0], [ignore])
5002 AT_CHECK([ovs-appctl revalidator/purge], [0])
5003 AT_CHECK([ovs-ofctl dump-flows br0], [0], [stdout])
5004 AT_CHECK([STRIP_XIDS stdout | sed -n 's/duration=[[0-9]]*\.[[0-9]]*s/duration=0.0s/p' | sort], [0], [dnl
5005 cookie=0x0, duration=0.0s, table=0, n_packets=0, n_bytes=0, idle_age=1, icmp actions=NORMAL
5006 cookie=0x0, duration=0.0s, table=0, n_packets=10, n_bytes=600, idle_age=1, ip actions=NORMAL
5011 AT_SETUP([ofproto-dpif - flow stats, set-n-threads])
5013 AT_CHECK([ovs-ofctl add-flow br0 "ip,actions=NORMAL"])
5014 AT_CHECK([ovs-ofctl add-flow br0 "icmp,actions=NORMAL"])
5016 ovs-appctl time/stop
5018 for i in `seq 1 10`; do
5019 ovs-appctl netdev-dummy/receive br0 'in_port(0),eth(src=50:54:00:00:00:07,dst=50:54:00:00:00:05),eth_type(0x0800),ipv4(src=192.168.0.2,dst=192.168.0.1,proto=6,tos=0,ttl=64,frag=no)'
5022 ovs-appctl time/warp 100
5023 AT_CHECK([ovs-vsctl set Open_vSwitch . other-config:n-revalidator-threads=2])
5024 ovs-appctl time/warp 1000
5026 AT_CHECK([ovs-ofctl dump-flows br0], [0], [stdout])
5027 AT_CHECK([STRIP_XIDS stdout | sed -n 's/duration=[[0-9]]*\.[[0-9]]*s/duration=0.0s/p' | sort], [0], [dnl
5028 cookie=0x0, duration=0.0s, table=0, n_packets=0, n_bytes=0, idle_age=1, icmp actions=NORMAL
5029 cookie=0x0, duration=0.0s, table=0, n_packets=10, n_bytes=600, idle_age=1, ip actions=NORMAL
5034 AT_SETUP([idle_age and hard_age increase over time])
5037 # get_ages DURATION HARD IDLE
5039 # Fetch the flow duration, hard age, and idle age into the variables
5040 # whose names are given as arguments. Rounds DURATION down to the
5041 # nearest integer. If hard_age doesn't appear in the output, sets
5042 # HARD to "none". If idle_age doesn't appear in the output, sets IDLE
5045 AT_CHECK([ovs-ofctl dump-flows br0], [0], [stdout])
5047 duration=`sed -n 's/.*duration=\([[0-9]]*\)\(\.[[0-9]]*\)\{0,1\}s.*/\1/p' stdout`
5048 AT_CHECK([[expr X"$duration" : 'X[0-9][0-9]*$']], [0], [ignore])
5049 AS_VAR_COPY([$1], [duration])
5051 hard=`sed -n 's/.*hard_age=\([[0-9]]*\),.*/\1/p' stdout`
5052 if test X"$hard" = X; then
5055 AT_CHECK([[expr X"$hard" : 'X[0-9][0-9]*$']], [0], [ignore])
5057 AS_VAR_COPY([$2], [hard])
5059 idle=`sed -n 's/.*idle_age=\([[0-9]]*\),.*/\1/p' stdout`
5060 if test X"$idle" = X; then
5063 AT_CHECK([[expr X"$idle" : 'X[0-9][0-9]*$']], [0], [ignore])
5065 AS_VAR_COPY([$3], [idle])
5068 # Add a flow and get its initial hard and idle age.
5069 AT_CHECK([ovs-ofctl add-flow br0 hard_timeout=199,idle_timeout=188,actions=drop])
5070 get_ages duration1 hard1 idle1
5072 ovs-appctl time/stop
5073 # Warp time forward by 10 seconds, then modify the flow's actions.
5074 ovs-appctl time/warp 10000
5075 get_ages duration2 hard2 idle2
5076 AT_CHECK([ovs-ofctl mod-flows br0 actions=flood])
5078 # Warp time forward by 10 seconds.
5079 ovs-appctl time/warp 10000
5080 get_ages duration3 hard3 idle3
5082 # Warp time forward 10 more seconds, then pass some packets through the flow,
5083 # then warp forward a few more times because idle times are only updated
5085 ovs-appctl time/warp 10000
5086 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)'
5087 ovs-appctl time/warp 3000 1000
5089 get_ages duration4 hard4 idle4
5091 printf "duration: %4s => %4s => %4s => %4s\n" $duration1 $duration2 $duration3 $duration4
5092 printf "hard_age: %4s => %4s => %4s => %4s\n" $hard1 $hard2 $hard3 $hard4
5093 printf "idle_age: %4s => %4s => %4s => %4s\n" $idle1 $idle2 $idle3 $idle4
5095 # Duration should increase steadily over time.
5096 AT_CHECK([test $duration1 -lt $duration2])
5097 AT_CHECK([test $duration2 -lt $duration3])
5098 AT_CHECK([test $duration3 -lt $duration4])
5100 # Hard age should be "none" initially because it's the same as flow_duration,
5101 # then it should increase.
5102 AT_CHECK([test $hard1 = none])
5103 AT_CHECK([test $hard2 = none])
5104 AT_CHECK([test $hard3 != none])
5105 AT_CHECK([test $hard4 != none])
5106 AT_CHECK([test $hard3 -lt $hard4])
5108 # Idle age should increase from 1 to 2 to 3, then decrease.
5109 AT_CHECK([test $idle1 -lt $idle2])
5110 AT_CHECK([test $idle2 -lt $idle3])
5111 AT_CHECK([test $idle3 -gt $idle4])
5113 # Check some invariant relationships.
5114 AT_CHECK([test $duration1 = $idle1])
5115 AT_CHECK([test $duration2 = $idle2])
5116 AT_CHECK([test $duration3 = $idle3])
5117 AT_CHECK([test $idle3 -gt $hard3])
5118 AT_CHECK([test $idle4 -lt $hard4])
5119 AT_CHECK([test $hard4 -lt $duration4])
5124 AT_SETUP([ofproto-dpif - fin_timeout])
5126 ovs-appctl time/stop
5127 AT_CHECK([ovs-ofctl add-flow br0 'idle_timeout=60,actions=fin_timeout(idle_timeout=5)'])
5128 AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip], [0],
5130 idle_timeout=60, actions=fin_timeout(idle_timeout=5)
5133 # Check that a TCP SYN packet does not change the timeout. (Because
5134 # flow stats updates are mainly what implements the fin_timeout
5135 # feature, we warp forward a couple of times to ensure that flow stats
5136 # run before re-checking the flow table.)
5137 AT_CHECK([ovs-appctl netdev-dummy/receive br0 0021853763af0026b98cb0f908004500003c2e2440004006465dac11370dac11370b828b0016751e267b00000000a00216d017360000020405b40402080a2d25085f0000000001030307])
5138 AT_CHECK([ovs-appctl time/warp 1000 && ovs-appctl time/warp 1000], [0], [warped
5141 AT_CHECK([ovs-appctl revalidator/purge], [0])
5142 AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip], [0],
5144 n_packets=1, n_bytes=74, idle_timeout=60, actions=fin_timeout(idle_timeout=5)
5146 # Check that a TCP FIN packet does change the timeout.
5147 AT_CHECK([ovs-appctl netdev-dummy/receive br0 0021853763af0026b98cb0f90800451000342e3e40004006463bac11370dac11370b828b0016751e319dfc96399b801100717ae800000101080a2d250a9408579588])
5148 AT_CHECK([ovs-appctl time/warp 1000 && ovs-appctl time/warp 1000], [0], [warped
5151 AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip], [0],
5153 n_packets=2, n_bytes=140, idle_timeout=5, actions=fin_timeout(idle_timeout=5)
5158 AT_SETUP([ofproto-dpif - ovs-appctl dpif/dump-dps])
5159 OVS_VSWITCHD_START([add-br br1 -- set bridge br1 datapath-type=dummy])
5160 ADD_OF_PORTS([br0], [1], [2])
5161 ADD_OF_PORTS([br1], [3])
5163 AT_CHECK([ovs-appctl dpif/dump-dps], [0], [dnl
5170 AT_SETUP([ofproto-dpif - ovs-appctl dpif/show])
5171 OVS_VSWITCHD_START([add-br br1 -- set bridge br1 datapath-type=dummy])
5172 ADD_OF_PORTS([br0], [1], [2])
5173 ADD_OF_PORTS([br1], [3])
5175 AT_CHECK([ovs-appctl dpif/show], [0], [dnl
5176 dummy@ovs-dummy: hit:0 missed:0
5178 br0 65534/100: (dummy)
5182 br1 65534/101: (dummy)
5188 AT_SETUP([ofproto-dpif - ovs-appctl dpif/dump-flows])
5189 # bump max-idle to avoid the flows being reclaimed behind us
5190 OVS_VSWITCHD_START([add-br br1 -- \
5191 set bridge br1 datapath-type=dummy fail-mode=secure -- \
5192 set Open_vSwitch . other_config:max-idle=10000])
5193 ADD_OF_PORTS([br0], [1], [2])
5194 ADD_OF_PORTS([br1], [3])
5196 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)'])
5197 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)'])
5198 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)'])
5199 ovs-appctl revalidator/wait
5200 AT_CHECK([ovs-appctl dpif/dump-flows br0 | STRIP_UFID | STRIP_USED | sort], [0], [dnl
5201 recirc_id(0),in_port(1),eth_type(0x0800),ipv4(frag=no), packets:0, bytes:0, used:never, actions:drop
5202 recirc_id(0),in_port(2),eth_type(0x0800),ipv4(frag=no), packets:0, bytes:0, used:never, actions:drop
5205 AT_CHECK([ovs-appctl dpif/dump-flows br1 | STRIP_UFID | STRIP_USED | sort], [0], [dnl
5206 recirc_id(0),in_port(3),eth_type(0x0800),ipv4(frag=no), packets:0, bytes:0, used:never, actions:drop
5209 AT_CHECK([ovs-appctl dpif/dump-flows -m br0 | STRIP_UFID | STRIP_USED | sort], [0], [dnl
5210 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
5211 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
5214 AT_CHECK([ovs-appctl dpif/dump-flows -m br1 | STRIP_UFID | STRIP_USED | sort], [0], [dnl
5215 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
5221 AT_SETUP([ofproto-dpif - ovs-appctl dpif/get-flow])
5223 OVS_VSWITCHD_START([add-br br1 -- \
5224 set bridge br1 datapath-type=dummy fail-mode=secure -- \
5225 set Open_vSwitch . other_config:max-idle=10000])
5226 ADD_OF_PORTS([br0], [1], [2])
5228 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)'])
5229 ovs-appctl revalidator/wait
5230 AT_CHECK([ovs-appctl dpif/dump-flows -m br0], [0], [stdout])
5232 UFID=`sed -n 's/\(ufid:[[0-9a-fA-F]]*\).*/\1/p' stdout`
5233 AT_CHECK([ovs-appctl dpctl/get-flow $UFID], [0], [dnl
5234 recirc_id(0),in_port(1),eth_type(0x0800),ipv4(frag=no), packets:0, bytes:0, used:never, actions:drop
5240 AT_SETUP([ofproto-dpif - MPLS actions that result in a userspace action])
5241 OVS_VSWITCHD_START([dnl
5242 add-port br0 p1 -- set Interface p1 type=dummy
5244 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5245 ON_EXIT([kill `cat ovs-ofctl.pid`])
5247 AT_CAPTURE_FILE([ofctl_monitor.log])
5248 AT_DATA([flows.txt], [dnl
5249 dl_src=60:66:66:66:66:00 actions=push_mpls:0x8847,controller
5250 dl_src=60:66:66:66:66:01 actions=pop_mpls:0x8849,controller
5252 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5254 dnl Packet is sent to userspace because a MPLS push or pop action is applied to
5255 dnl a packet with 2 MPLS LSEs but dpif-netdev can't handle any labels.
5257 dnl The input is a frame with two MPLS labels which tcpdump -vve shows as:
5258 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)
5259 dnl (label 20, exp 0, [S], ttl 32)
5260 dnl (tos 0x0, ttl 64, id 0, offset 0, flags [none], proto TCP (6), length 44, bad cksum 3b78 (->f978)!)
5261 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
5263 for dl_src in 00 01; do
5264 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"])
5266 sleep 1 # wait for the datapath flow installed
5267 AT_CHECK_UNQUOTED([cat ovs-vswitchd.log | STRIP_UFID | FILTER_FLOW_INSTALL | STRIP_USED], [0], [dnl
5268 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))
5269 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))
5276 AT_SETUP([ofproto-dpif - MPLS actions that result in a drop])
5277 OVS_VSWITCHD_START([dnl
5278 add-port br0 p1 -- set Interface p1 type=dummy
5280 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5281 ON_EXIT([kill `cat ovs-ofctl.pid`])
5283 AT_CAPTURE_FILE([ofctl_monitor.log])
5284 AT_DATA([flows.txt], [dnl
5285 dl_src=60:66:66:66:66:00 actions=push_mpls:0x8847,controller
5286 dl_src=60:66:66:66:66:01 actions=pop_mpls:0x8849,controller
5288 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5290 dnl Packet is dropped because an MPLS PUSH action is applied to a packet with
5291 dnl 4 MPLS LSEs but ovs-vswtichd can only handle up to 3 MPLS LSEs and thus
5292 dnl can't determine the resulting MPLS label after MPLS push/pop actions.
5294 dnl The input is a frame with two MPLS headers which tcpdump -vve shows as:
5295 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)
5296 dnl (label 20, exp 0, ttl 32)
5297 dnl (label 20, exp 0, ttl 32)
5298 dnl (label 20, exp 0, [S], ttl 32)
5299 dnl (tos 0x0, ttl 64, id 0, offset 0, flags [none], proto TCP (6), length 44, bad cksum 3b78 (->f978)!)
5300 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
5302 for dl_src in 00 01; do
5303 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"])
5305 sleep 1 # wait for the datapath flow installed
5306 AT_CHECK_UNQUOTED([cat ovs-vswitchd.log | STRIP_UFID | FILTER_FLOW_INSTALL | STRIP_USED], [0], [dnl
5307 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))
5308 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))
5314 AT_SETUP([ofproto-dpif - patch ports])
5315 OVS_VSWITCHD_START([add-br br1 \
5316 -- set bridge br1 datapath-type=dummy fail-mode=secure \
5317 -- add-port br1 pbr1 -- set int pbr1 type=patch options:peer=pbr0 \
5318 -- add-port br0 pbr0 -- set int pbr0 type=patch options:peer=pbr1])
5320 ADD_OF_PORTS([br0], [2])
5321 ADD_OF_PORTS([br1], [3])
5323 AT_CHECK([ovs-appctl upcall/disable-ufid], [0], [Datapath dumping tersely using UFID disabled
5325 AT_CHECK([ovs-appctl time/stop])
5326 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5328 AT_CHECK([ovs-ofctl add-flow br0 actions=LOCAL,output:1,output:2])
5329 AT_CHECK([ovs-ofctl add-flow br1 actions=LOCAL,output:1,output:3])
5331 for i in $(seq 1 10); do
5332 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)'
5333 if [[ $i -eq 1 ]]; then
5338 for i in $(seq 1 5); do
5339 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)'
5340 if [[ $i -eq 1 ]]; then
5345 AT_CHECK([ovs-appctl time/warp 500], [0],
5348 sleep 1 # wait for log writer
5350 AT_CHECK([ovs-appctl dpif/show], [0], [dnl
5351 dummy@ovs-dummy: hit:13 missed:2
5353 br0 65534/100: (dummy)
5355 pbr0 1/none: (patch: peer=pbr1)
5357 br1 65534/101: (dummy)
5359 pbr1 1/none: (patch: peer=pbr0)
5362 AT_CHECK([cat ovs-vswitchd.log | STRIP_UFID | FILTER_FLOW_INSTALL | STRIP_USED], [0], [dnl
5363 recirc_id=0,ip,in_port=100,nw_frag=no, actions:101,3,2
5364 recirc_id=0,ip,in_port=101,nw_frag=no, actions:100,2,3
5367 AT_CHECK([cat ovs-vswitchd.log | grep -e 'in_port(100).*packets:9' | STRIP_UFID | FILTER_FLOW_DUMP], [0], [dnl
5368 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
5370 AT_CHECK([cat ovs-vswitchd.log | grep -e 'in_port(101).*packets:4' | STRIP_UFID | FILTER_FLOW_DUMP], [0], [dnl
5371 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
5374 AT_CHECK([ovs-ofctl dump-ports br0 pbr0], [0], [dnl
5375 OFPST_PORT reply (xid=0x4): 1 ports
5376 port 1: rx pkts=5, bytes=300, drop=0, errs=0, frame=0, over=0, crc=0
5377 tx pkts=10, bytes=600, drop=0, errs=0, coll=0
5380 AT_CHECK([ovs-ofctl dump-ports br1 pbr1], [0], [dnl
5381 OFPST_PORT reply (xid=0x4): 1 ports
5382 port 1: rx pkts=10, bytes=600, drop=0, errs=0, frame=0, over=0, crc=0
5383 tx pkts=5, bytes=300, drop=0, errs=0, coll=0
5389 AT_SETUP([ofproto-dpif - port duration])
5390 OVS_VSWITCHD_START([set Bridge br0 protocols=OpenFlow13])
5391 ADD_OF_PORTS([br0], 1, 2)
5393 ovs-appctl time/stop
5394 ovs-appctl time/warp 10000
5396 AT_CHECK([ovs-ofctl -O openflow13 dump-ports br0], [0], [stdout])
5397 AT_CHECK([sed -n 's/=[[0-9]][[0-9]]\(\.[[0-9]][[0-9]]*\)\{0,1\}s/=?s/p' stdout], [0],
5406 dnl ----------------------------------------------------------------------
5407 AT_BANNER([ofproto-dpif -- megaflows])
5409 AT_SETUP([ofproto-dpif megaflow - port classification])
5411 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5412 ADD_OF_PORTS([br0], [1], [2])
5413 AT_DATA([flows.txt], [dnl
5414 table=0 in_port=1 actions=output(2)
5416 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5417 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)'])
5419 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)'])
5421 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5422 recirc_id=0,ip,in_port=1,nw_frag=no, actions: <del>
5427 AT_SETUP([ofproto-dpif megaflow - L2 classification])
5429 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5430 ADD_OF_PORTS([br0], [1], [2])
5431 AT_DATA([flows.txt], [dnl
5432 table=0 in_port=1,dl_src=50:54:00:00:00:09 actions=output(2)
5434 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5435 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)'])
5436 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)'])
5438 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5439 recirc_id=0,ip,in_port=1,dl_src=50:54:00:00:00:09,nw_frag=no, actions: <del>
5440 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>
5445 AT_SETUP([ofproto-dpif megaflow - L3 classification])
5447 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5448 ADD_OF_PORTS([br0], [1], [2])
5449 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], [])
5450 AT_DATA([flows.txt], [dnl
5451 table=0 in_port=1,icmp,nw_src=10.0.0.4 actions=output(2)
5453 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5454 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)'])
5455 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)'])
5457 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5458 recirc_id=0,icmp,in_port=1,nw_src=10.0.0.4,nw_frag=no, actions: <del>
5459 recirc_id=0,ip,in_port=1,nw_src=10.0.0.2/0.0.0.2,nw_frag=no, actions: <del>
5464 AT_SETUP([ofproto-dpif megaflow - IPv6 classification])
5466 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5467 ADD_OF_PORTS([br0], [1], [2])
5468 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], [])
5469 AT_DATA([flows.txt], [dnl
5470 table=0 in_port=1,ipv6,ipv6_src=2001:db8:3c4d:1:2:3:4:5 actions=output(2)
5472 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5473 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)'])
5474 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)'])
5476 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5477 recirc_id=0,ipv6,in_port=1,ipv6_src=2001:db8:3c4d:1:2:3:4:5,nw_frag=no, actions: <del>
5478 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>
5483 AT_SETUP([ofproto-dpif megaflow - L4 classification])
5485 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5486 ADD_OF_PORTS([br0], [1], [2])
5487 AT_DATA([flows.txt], [dnl
5488 table=0 in_port=1,icmp,icmp_type=8 actions=output(2)
5490 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5491 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)'])
5493 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)'])
5495 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5496 recirc_id=0,icmp,in_port=1,nw_frag=no,icmp_type=0x8/0xff, actions: <del>
5501 AT_SETUP([ofproto-dpif megaflow - normal])
5503 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5504 ADD_OF_PORTS([br0], [1], [2])
5505 AT_CHECK([ovs-ofctl add-flow br0 action=normal])
5506 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)'])
5507 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)'])
5509 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5510 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>
5511 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>
5516 AT_SETUP([ofproto-dpif megaflow - mpls])
5518 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5519 ADD_OF_PORTS([br0], [1], [2])
5520 AT_DATA([flows.txt], [dnl
5521 table=0 dl_src=50:54:00:00:00:09 actions=push_mpls:0x8847,2
5522 table=0 dl_src=50:54:00:00:00:0b actions=pop_mpls:0x0800,2
5524 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5525 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)'])
5526 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)'])
5528 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5529 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>
5530 recirc_id=0,mpls,in_port=1,dl_src=50:54:00:00:00:0b,mpls_bos=1, actions: <del>
5535 # CHECK_MEGAFLOW_NETFLOW(LOOPBACK_ADDR, IP_VERSION_TYPE)
5537 # IP_VERSION_TYPE is used in AT_SETUP
5538 m4_define([CHECK_MEGAFLOW_NETFLOW],
5539 [AT_SETUP([ofproto-dpif megaflow - netflow - $2 collector])
5541 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5542 ADD_OF_PORTS([br0], [1], [2])
5544 dnl NetFlow configuration disables wildcarding relevant fields
5545 ON_EXIT([kill `cat test-netflow.pid`])
5546 AT_CHECK([ovstest test-netflow --log-file --detach --no-chdir --pidfile 0:$1 > netflow.log], [0], [], [ignore])
5547 AT_CAPTURE_FILE([netflow.log])
5548 NETFLOW_PORT=`parse_listening_port < test-netflow.log`
5550 set Bridge br0 netflow=@nf -- \
5551 --id=@nf create NetFlow targets=\"$1:$NETFLOW_PORT\" \
5552 engine_id=1 engine_type=2 active_timeout=30 add-id-to-interface=false
5554 AT_CHECK([ovs-ofctl add-flow br0 action=normal])
5555 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)'])
5556 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)'])
5558 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5559 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>
5560 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>
5565 CHECK_MEGAFLOW_NETFLOW([127.0.0.1], [IPv4])
5566 CHECK_MEGAFLOW_NETFLOW([[[::1]]], [IPv6])
5568 AT_SETUP([ofproto-dpif megaflow - normal, active-backup bonding])
5570 [add-port br0 p1 -- set Interface p1 type=dummy ofport_request=1 -- \
5571 add-bond br0 bond0 p2 p3 bond_mode=active-backup -- \
5572 set interface p2 type=dummy ofport_request=2 -- \
5573 set interface p3 type=dummy ofport_request=3])
5574 AT_CHECK([ovs-appctl netdev-dummy/set-admin-state up], 0, [OK
5576 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5578 AT_CHECK([ovs-ofctl add-flow br0 action=normal])
5579 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)'])
5580 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)'])
5582 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5583 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>
5584 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>
5589 AT_SETUP([ofproto-dpif megaflow - normal, balance-slb bonding])
5591 [add-port br0 p1 -- set Interface p1 type=dummy ofport_request=1 -- \
5592 add-bond br0 bond0 p2 p3 bond_mode=balance-slb -- \
5593 set interface p2 type=dummy ofport_request=2 -- \
5594 set interface p3 type=dummy ofport_request=3])
5595 AT_CHECK([ovs-appctl netdev-dummy/set-admin-state up], 0, [OK
5597 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5599 AT_CHECK([ovs-ofctl add-flow br0 action=normal])
5600 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)'])
5601 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)'])
5603 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5604 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>
5605 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>
5610 AT_SETUP([ofproto-dpif megaflow - normal, balance-tcp bonding])
5611 # Create bond0 on br0 with interfaces p0 and p1
5612 # and bond1 on br1 with interfaces p2 and p3
5613 # with p0 patched to p2 and p1 patched to p3.
5615 [add-bond br0 bond0 p0 p1 bond_mode=balance-tcp lacp=active \
5616 other-config:lacp-time=fast \
5617 other-config:bond-rebalance-interval=0 -- \
5618 set interface p0 type=patch options:peer=p2 ofport_request=1 -- \
5619 set interface p1 type=patch options:peer=p3 ofport_request=2 -- \
5621 set bridge br1 other-config:hwaddr=aa:66:aa:66:00:00 -- \
5622 set bridge br1 datapath-type=dummy other-config:datapath-id=1234 \
5623 fail-mode=secure -- \
5624 add-bond br1 bond1 p2 p3 bond_mode=balance-tcp lacp=active \
5625 other-config:lacp-time=fast \
5626 other-config:bond-rebalance-interval=0 -- \
5627 set interface p2 type=patch options:peer=p0 ofport_request=3 -- \
5628 set interface p3 type=patch options:peer=p1 ofport_request=4 --])
5630 AT_CHECK([ovs-appctl netdev-dummy/set-admin-state up], 0, [OK
5632 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5633 ADD_OF_PORTS([br0], [7])
5634 AT_CHECK([ovs-ofctl add-flow br0 action=normal])
5635 AT_CHECK([ovs-ofctl add-flow br1 action=normal])
5636 ovs-appctl time/stop
5637 ovs-appctl time/warp 5000
5638 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)'])
5639 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)'])
5641 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5642 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>
5643 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>
5648 AT_SETUP([ofproto-dpif megaflow - resubmit port action])
5650 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5651 ADD_OF_PORTS([br0], [1], [2])
5652 AT_DATA([flows.txt], [dnl
5653 table=0 in_port=1,ip actions=resubmit(90)
5654 table=0 in_port=90,dl_src=50:54:00:00:00:09 actions=output(2)
5656 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5657 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)'])
5658 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)'])
5660 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5661 recirc_id=0,ip,in_port=1,dl_src=50:54:00:00:00:09,nw_frag=no, actions: <del>
5662 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>
5667 AT_SETUP([ofproto-dpif megaflow - resubmit table action])
5669 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5670 ADD_OF_PORTS([br0], [1], [2])
5671 AT_DATA([flows.txt], [dnl
5672 table=0 in_port=1,ip actions=resubmit(,1)
5673 table=1 dl_src=50:54:00:00:00:09 actions=output(2)
5675 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5676 AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
5677 AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4,dst=10.0.0.3,proto=
5678 1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
5680 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5681 recirc_id=0,ip,in_port=1,dl_src=50:54:00:00:00:09,nw_frag=no, actions: <del>
5682 recirc_id=0,ip,in_port=1,dl_src=50:54:00:00:00:0b,nw_frag=no, actions: <del>
5687 AT_SETUP([ofproto-dpif megaflow - goto_table action])
5689 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5690 ADD_OF_PORTS([br0], [1], [2])
5691 AT_DATA([flows.txt], [dnl
5692 table=0 in_port=1,ip actions=goto_table(1)
5693 table=1 dl_src=50:54:00:00:00:09 actions=output(2)
5695 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flows br0 flows.txt])
5696 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)'])
5697 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)'])
5699 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5700 recirc_id=0,ip,in_port=1,dl_src=50:54:00:00:00:09,nw_frag=no, actions: <del>
5701 recirc_id=0,ip,in_port=1,dl_src=50:54:00:00:00:0b,nw_frag=no, actions: <del>
5706 AT_SETUP([ofproto-dpif megaflow - mirroring, select_all])
5708 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5709 ADD_OF_PORTS([br0], [1], [2], [3])
5711 set Bridge br0 mirrors=@m --\
5712 --id=@p3 get Port p3 --\
5713 --id=@m create Mirror name=mymirror select_all=true output_port=@p3
5715 AT_DATA([flows.txt], [dnl
5716 in_port=1 actions=output:2
5718 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5719 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)'])
5721 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)'])
5723 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5724 recirc_id=0,ip,in_port=1,nw_frag=no, actions: <del>
5729 AT_SETUP([ofproto-dpif megaflow - mirroring, select_vlan])
5731 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5732 ADD_OF_PORTS([br0], [1], [2], [3])
5734 set Bridge br0 mirrors=@m --\
5735 --id=@p2 get Port p2 -- --id=@p3 get Port p3 --\
5736 --id=@m create Mirror name=mymirror select_all=true select_vlan=11 output_port=@p3
5738 AT_DATA([flows.txt], [dnl
5739 in_port=1 actions=output:2
5741 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5742 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))'])
5743 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)'])
5745 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5746 recirc_id=0,ip,in_port=1,dl_vlan=11,nw_frag=no, actions: <del>
5747 recirc_id=0,ip,in_port=1,vlan_tci=0x0000/0x1fff,nw_frag=no, actions: <del>
5752 AT_SETUP([ofproto-dpif megaflow - move action])
5754 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5755 ADD_OF_PORTS([br0], [1], [2])
5756 AT_DATA([flows.txt], [dnl
5757 table=0 in_port=1 ip,actions=move:NXM_OF_IP_SRC[[]]->NXM_NX_REG0[[]],resubmit(90)
5758 table=0 in_port=90 ip,actions=move:NXM_NX_REG0[[]]->NXM_NX_REG1[[]],resubmit(91)
5759 table=0 in_port=91 reg0=0x0a000002,actions=output(2)
5761 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5762 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)'])
5763 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)'])
5765 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5766 recirc_id=0,ip,in_port=1,nw_src=10.0.0.2,nw_frag=no, actions: <del>
5767 recirc_id=0,ip,in_port=1,nw_src=10.0.0.4,nw_frag=no, actions: <del>
5772 AT_SETUP([ofproto-dpif megaflow - push action])
5774 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5775 ADD_OF_PORTS([br0], [1], [2])
5776 AT_DATA([flows.txt], [dnl
5777 table=0 in_port=1 ip,actions=push:NXM_OF_IP_SRC[[]],output(2)
5779 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5780 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)'])
5781 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)'])
5783 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5784 recirc_id=0,ip,in_port=1,nw_src=10.0.0.2,nw_frag=no, actions: <del>
5785 recirc_id=0,ip,in_port=1,nw_src=10.0.0.4,nw_frag=no, actions: <del>
5790 AT_SETUP([ofproto-dpif megaflow - learning])
5792 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5793 ADD_OF_PORTS([br0], [1], [2])
5794 AT_DATA([flows.txt], [dnl
5795 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
5797 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5798 ovs-appctl time/stop
5799 # We send each packet twice because the first packet in each flow causes the
5800 # flow table to change and thus revalidations, which (depending on timing)
5801 # can keep a megaflow from being installed. The revalidations are done by
5802 # the second iteration, allowing the flows to be installed.
5804 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)'])
5805 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)'])
5806 ovs-appctl time/warp 100
5809 dnl The original flow is missing due to a revalidation.
5810 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5811 recirc_id=0,ip,in_port=1,vlan_tci=0x0000/0x0fff,dl_src=50:54:00:00:00:09,nw_frag=no, actions: <del>
5812 recirc_id=0,ip,in_port=1,vlan_tci=0x0000/0x0fff,dl_src=50:54:00:00:00:0b,nw_frag=no, actions: <del>
5817 AT_SETUP([ofproto-dpif megaflow - tunnels])
5819 [add-port br0 p1 -- set Interface p1 type=dummy ofport_request=1])
5820 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5821 AT_CHECK([ovs-vsctl add-port br0 p2 -- set Interface p2 type=gre \
5822 options:remote_ip=1.1.1.1 ofport_request=2 options:key=flow])
5823 AT_CHECK([ovs-vsctl add-port br0 p3 -- set Interface p3 type=dummy \
5825 AT_CHECK([ovs-vsctl add-port br0 p4 -- set Interface p4 type=gre \
5826 options:remote_ip=1.1.1.2 options:tos=inherit options:ttl=inherit \
5827 ofport_request=4 options:key=flow])
5828 AT_DATA([flows.txt], [dnl
5829 in_port=1,actions=output(2)
5830 in_port=3,actions=output(4)
5832 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5833 dnl ECN bits are always copied out, but don't use 0x3 (CE), since that
5834 dnl will cause the packet to be dropped.
5835 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)'])
5837 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)'])
5838 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)'])
5840 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)'])
5842 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5843 recirc_id=0,ip,in_port=1,nw_ecn=1,nw_frag=no, actions: <del>
5844 recirc_id=0,ip,in_port=3,nw_tos=0,nw_ecn=1,nw_ttl=64,nw_frag=no, actions: <del>
5845 recirc_id=0,ip,in_port=3,nw_tos=252,nw_ecn=1,nw_ttl=128,nw_frag=no, actions: <del>
5850 AT_SETUP([ofproto-dpif megaflow - dec_ttl])
5852 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5853 ADD_OF_PORTS([br0], [1], [2])
5854 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], [])
5855 AT_DATA([flows.txt], [dnl
5856 table=0 in_port=1,icmp,nw_src=10.0.0.4 actions=dec_ttl,output(2)
5858 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5859 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)'])
5860 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)'])
5862 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5863 recirc_id=0,icmp,in_port=1,nw_src=10.0.0.4,nw_ttl=64,nw_frag=no, actions: <del>
5864 recirc_id=0,ip,in_port=1,nw_src=10.0.0.2/0.0.0.2,nw_frag=no, actions: <del>
5869 AT_SETUP([ofproto-dpif megaflow - set dl_dst])
5871 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5872 ADD_OF_PORTS([br0], [1], [2])
5873 AT_DATA([flows.txt], [dnl
5874 table=0 in_port=1 actions=mod_dl_dst(50:54:00:00:00:0a),output(2)
5876 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5877 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)'])
5878 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)'])
5880 dnl The first packet is essentially a no-op, as the new destination MAC is the
5881 dnl same as the original. The second entry actually updates the destination
5883 AT_CHECK([cat ovs-vswitchd.log | STRIP_UFID | FILTER_FLOW_INSTALL | STRIP_USED], [0], [dnl
5884 recirc_id=0,ip,in_port=1,dl_dst=50:54:00:00:00:0a,nw_frag=no, actions:2
5885 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
5890 AT_SETUP([ofproto-dpif megaflow - disabled])
5892 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5893 ADD_OF_PORTS([br0], [1], [2])
5894 AT_DATA([flows.txt], [dnl
5895 table=0 in_port=1,ip,nw_dst=10.0.0.1 actions=output(2)
5896 table=0 in_port=1,ip,nw_dst=10.0.0.3 actions=drop
5898 AT_CHECK([ovs-appctl upcall/disable-megaflows], [0], [megaflows disabled
5900 AT_CHECK([ovs-appctl upcall/disable-ufid], [0], [Datapath dumping tersely using UFID disabled
5902 AT_CHECK([ovs-appctl vlog/set dpif_netdev:dbg], [0], [], [])
5903 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5904 for i in 1 2 3 4; do
5905 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)'])
5906 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)'])
5907 if [[ $i -eq 1 ]]; then
5912 AT_CHECK([cat ovs-vswitchd.log | STRIP_UFID | FILTER_FLOW_INSTALL | STRIP_USED], [0], [dnl
5913 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
5914 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
5916 AT_CHECK([cat ovs-vswitchd.log | STRIP_UFID | FILTER_FLOW_DUMP | grep 'packets:3'], [0], [dnl
5917 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
5918 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
5923 AT_SETUP([ofproto-dpif - datapath port number change])
5924 OVS_VSWITCHD_START([set Bridge br0 fail-mode=standalone])
5925 ADD_OF_PORTS([br0], 1)
5927 # Trace a flow that should output to p1.
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: 1
5933 # Change p1's port number to 5.
5934 AT_CHECK([ovs-appctl dpif-dummy/change-port-number ovs-dummy p1 5])
5936 # Trace a flow that should output to p1 in its new location.
5937 AT_CHECK([ovs-appctl ofproto/trace br0 in_port=LOCAL,dl_src=10:20:30:40:50:60],
5939 AT_CHECK([tail -1 stdout], [0], [Datapath actions: 5
5944 # Tests the bundling with various bfd and cfm configurations.
5945 AT_SETUP([ofproto - bundle with variable bfd/cfm config])
5946 OVS_VSWITCHD_START([add-br br1 -- set bridge br1 datapath-type=dummy -- \
5947 add-bond br0 br0bond p0 p2 bond-mode=active-backup -- \
5948 add-bond br1 br1bond p1 p3 bond-mode=active-backup -- \
5949 set Interface p1 type=patch options:peer=p0 ofport_request=2 -- \
5950 set Interface p3 type=patch options:peer=p2 ofport_request=4 -- \
5951 set Interface p0 type=patch options:peer=p1 ofport_request=1 -- \
5952 set Interface p2 type=patch options:peer=p3 ofport_request=3 -- \
5953 set Interface p0 bfd:enable=true bfd:min_tx=300 bfd:min_rx=300 -- \
5954 set Interface p0 cfm_mpid=1 -- \
5955 set Interface p1 bfd:enable=true bfd:min_tx=500 bfd:min_rx=500])
5957 ovs-appctl time/stop
5958 # advance the clock to stablize everything.
5959 ovs-appctl time/warp 5000 100
5960 # cfm/show should show 'recv' fault.
5961 AT_CHECK([ovs-appctl cfm/show | sed -n '/^.*fault:.*/p'], [0], [dnl
5964 # bfd/show should show 'up'.
5965 AT_CHECK([ovs-appctl bfd/show | sed -n '/^.*Session State:.*/p'], [0], [dnl
5966 Local Session State: up
5967 Remote Session State: up
5968 Local Session State: up
5969 Remote Session State: up
5971 # bond/show should show 'may-enable: true' for all slaves.
5972 AT_CHECK([ovs-appctl bond/show | sed -n '/^.*may_enable:.*/p'], [0], [dnl
5979 # now disable the bfd on p1.
5980 AT_CHECK([ovs-vsctl set Interface p1 bfd:enable=false])
5981 # advance the clock to stablize everything.
5982 ovs-appctl time/warp 5000 100
5983 # cfm/show should show 'recv' fault.
5984 AT_CHECK([ovs-appctl cfm/show | sed -n '/^.*fault:.*/p'], [0], [dnl
5987 # bfd/show should show 'down'.
5988 AT_CHECK([ovs-appctl bfd/show | sed -n '/^.*Session State:.*/p'], [0], [dnl
5989 Local Session State: down
5990 Remote Session State: down
5992 # bond/show should show 'may-enable: false' for p0.
5993 AT_CHECK([ovs-appctl bond/show br0bond | sed -n '/^.*may_enable:.*/p'], [0], [dnl
5998 # now enable the bfd on p1 and disable bfd on p0.
5999 AT_CHECK([ovs-vsctl set Interface p1 bfd:enable=true])
6000 AT_CHECK([ovs-vsctl set Interface p0 bfd:enable=false])
6001 # advance the clock to stablize everything.
6002 ovs-appctl time/warp 5000 100
6003 # cfm/show should show 'recv' fault.
6004 AT_CHECK([ovs-appctl cfm/show | sed -n '/^.*fault:.*/p'], [0], [dnl
6007 # bfd/show should show 'down'.
6008 AT_CHECK([ovs-appctl bfd/show | sed -n '/^.*Session State:.*/p'], [0], [dnl
6009 Local Session State: down
6010 Remote Session State: down
6012 # bond/show should show 'may-enable: false' for p0 and p1.
6013 AT_CHECK([ovs-appctl bond/show | sed -n '/^.*may_enable:.*/p'], [0], [dnl
6023 AT_SETUP([ofproto-dpif - ofproto-dpif-monitor 1])
6024 OVS_VSWITCHD_START([add-port br0 p0 -- set interface p0 type=gre options:remote_ip=1.2.3.4])
6027 AT_CHECK([ovs-vsctl set interface p0 bfd:enable=true])
6029 OVS_WAIT_UNTIL([grep "monitor thread created" ovs-vswitchd.log])
6030 # disable bfd on p0.
6031 AT_CHECK([ovs-vsctl set interface p0 bfd:enable=false])
6033 OVS_WAIT_UNTIL([grep "monitor thread terminated" ovs-vswitchd.log])
6034 AT_CHECK([cat ovs-vswitchd.log | sed -e '/^.*ofproto_dpif_monitor.*$/d' > ovs-vswitchd.log])
6037 AT_CHECK([ovs-vsctl set interface p0 cfm_mpid=10])
6039 OVS_WAIT_UNTIL([grep "monitor thread created" ovs-vswitchd.log])
6040 # disable cfm on p0.
6041 AT_CHECK([ovs-vsctl remove interface p0 cfm_mpid 10])
6043 OVS_WAIT_UNTIL([grep "monitor thread terminated" ovs-vswitchd.log])
6044 AT_CHECK([cat ovs-vswitchd.log | sed -e '/^.*ofproto_dpif_monitor.*$/d' > ovs-vswitchd.log])
6046 # enable both bfd and cfm on p0.
6047 AT_CHECK([ovs-vsctl set interface p0 bfd:enable=true cfm_mpid=10])
6049 OVS_WAIT_UNTIL([grep "monitor thread created" ovs-vswitchd.log])
6050 # disable bfd on p0.
6051 AT_CHECK([ovs-vsctl set interface p0 bfd:enable=false])
6052 # check log, there should not be the log of thread terminated.
6053 AT_CHECK([sed -n "s/^.*|ofproto_dpif_monitor(monitor[[0-9]]*)|INFO|\(.* terminated\)$/\1/p" ovs-vswitchd.log], [0], [dnl
6055 # reenable bfd on p0.
6056 AT_CHECK([ovs-vsctl set interface p0 bfd:enable=true])
6057 # check log, should still be on log of thread created.
6058 AT_CHECK([sed -n "s/^.*|ofproto_dpif_monitor(monitor[[0-9]]*)|INFO|\(.* created\)$/\1/p" ovs-vswitchd.log], [0], [dnl
6059 monitor thread created
6061 # disable bfd and cfm together.
6062 AT_CHECK([ovs-vsctl set interface p0 bfd:enable=false -- remove interface p0 cfm_mpid 10])
6064 OVS_WAIT_UNTIL([grep "monitor thread terminated" ovs-vswitchd.log])
6069 # this test helps avoid the deadlock between the main thread and monitor thread.
6070 AT_SETUP([ofproto-dpif - ofproto-dpif-monitor 2])
6073 for i in `seq 1 199`
6075 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])
6081 AT_BANNER([ofproto-dpif - flow translation resource limits])
6083 AT_SETUP([ofproto-dpif - infinite resubmit])
6085 AT_CHECK([ovs-ofctl add-flow br0 actions=resubmit:1,resubmit:2,output:3])
6086 AT_CHECK([ovs-appctl -vpoll_loop:off ofproto/trace br0 'eth_dst=ff:ff:ff:ff:ff:ff'],
6088 AT_CHECK([tail -1 stdout], [0], [Datapath actions: drop
6090 AT_CHECK([grep -c 'resubmit actions recursed over 64 times' ovs-vswitchd.log],
6093 OVS_VSWITCHD_STOP(["/resubmit actions recursed/d"])
6096 AT_SETUP([ofproto-dpif - exponential resubmit chain])
6098 ADD_OF_PORTS([br0], 1)
6099 (for i in `seq 1 64`; do
6101 echo "in_port=$i, actions=resubmit:$j, resubmit:$j, local"
6103 echo "in_port=65, actions=local") > flows
6104 AT_CHECK([ovs-ofctl add-flows br0 flows])
6105 AT_CHECK([ovs-appctl -vpoll_loop:off ofproto/trace br0 'in_port=1'], [0], [stdout])
6106 AT_CHECK([grep -c 'over 4096 resubmit actions' ovs-vswitchd.log], [0], [1
6108 OVS_VSWITCHD_STOP(["/over.*resubmit actions/d"])
6111 AT_SETUP([ofproto-dpif - too many output actions])
6113 ADD_OF_PORTS([br0], 1)
6114 (for i in `seq 1 12`; do
6116 echo "in_port=$i, actions=resubmit:$j, resubmit:$j, local"
6118 echo "in_port=13, actions=local,local,local,local,local,local,local,local") > flows
6119 AT_CHECK([ovs-ofctl add-flows br0 flows])
6120 AT_CHECK([ovs-appctl -vpoll_loop:off ofproto/trace br0 'in_port=1'], [0], [stdout])
6121 AT_CHECK([grep -c -e '- Uses action(s) not supported by datapath' stdout],
6124 AT_CHECK([grep -c 'resubmits yielded over 64 kB of actions' ovs-vswitchd.log], [0], [1
6126 OVS_VSWITCHD_STOP(["/resubmits yielded over 64 kB of actions/d"])
6129 AT_SETUP([ofproto-dpif - stack too deep])
6131 ADD_OF_PORTS([br0], 1)
6132 (for i in `seq 1 12`; do
6134 echo "in_port=$i, actions=resubmit:$j, resubmit:$j, local"
6136 push="push:NXM_NX_REG0[[]]"
6137 echo "in_port=13, actions=$push,$push,$push,$push,$push,$push,$push,$push") > flows
6138 AT_CHECK([ovs-ofctl add-flows br0 flows])
6139 AT_CHECK([ovs-appctl -vpoll_loop:off ofproto/trace br0 'in_port=1'], [0], [stdout])
6140 AT_CHECK([grep -c 'resubmits yielded over 64 kB of stack' ovs-vswitchd.log], [0], [1
6142 OVS_VSWITCHD_STOP(["/resubmits yielded over 64 kB of stack/d"])
6146 AT_SETUP([ofproto-dpif packet-out controller])
6148 ADD_OF_PORTS([br0], 1, 2)
6150 AT_CHECK([ovs-ofctl add-flow br0 'dl_dst=50:54:00:00:00:0a actions=controller'])
6152 AT_CAPTURE_FILE([ofctl_monitor.log])
6153 AT_CHECK([ovs-ofctl monitor br0 65534 invalid_ttl --detach --no-chdir --pidfile 2> ofctl_monitor.log])
6156 AT_CHECK([ovs-ofctl -O OpenFlow13 packet-out br0 CONTROLLER controller '50540000000a5054000000091234'])
6159 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
6160 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
6161 NXT_PACKET_IN (xid=0x0): total_len=14 in_port=CONTROLLER (via action) data_len=14 (unbuffered)
6162 in_port=0,vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,dl_type=0x1234
6164 NXT_PACKET_IN (xid=0x0): total_len=14 in_port=CONTROLLER (via action) data_len=14 (unbuffered)
6165 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
6167 NXT_PACKET_IN (xid=0x0): total_len=14 in_port=CONTROLLER (via action) data_len=14 (unbuffered)
6168 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
6171 AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
6172 dl_dst=50:54:00:00:00:0a actions=CONTROLLER:65535
6176 (echo "OFPST_TABLE reply (OF1.3) (xid=0x2):
6178 active=1, lookup=0, matched=0"
6180 while test $x -lt 254; do
6183 active=0, lookup=0, matched=0"
6186 AT_CHECK([ovs-ofctl -O OpenFlow13 dump-tables br0 ], [0], [expout])
6191 AT_SETUP([ofproto-dpif packet-out controller (patch port)])
6194 add-port br0 p1 -- \
6195 set interface p1 type=patch options:peer=p2 -- \
6197 set bridge br1 datapath-type=dummy -- \
6198 set bridge br1 fail-mode=secure -- \
6199 set bridge br1 protocols='[OpenFlow10,OpenFlow11,OpenFlow12,OpenFlow13]' -- \
6200 add-port br1 p2 -- \
6201 set interface p2 type=patch options:peer=p1 --])
6203 AT_CAPTURE_FILE([ofctl_monitor.log])
6204 AT_CHECK([ovs-ofctl monitor br1 65534 invalid_ttl --detach --no-chdir --pidfile 2> ofctl_monitor.log])
6207 AT_CHECK([ovs-ofctl -O OpenFlow13 packet-out br0 CONTROLLER output:1 '50540000000a5054000000091234'])
6210 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
6211 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
6212 NXT_PACKET_IN (xid=0x0): cookie=0x0 total_len=14 in_port=1 (via no_match) data_len=14 (unbuffered)
6213 in_port=0,vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,dl_type=0x1234
6215 NXT_PACKET_IN (xid=0x0): cookie=0x0 total_len=14 in_port=1 (via no_match) data_len=14 (unbuffered)
6216 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
6218 NXT_PACKET_IN (xid=0x0): cookie=0x0 total_len=14 in_port=1 (via no_match) data_len=14 (unbuffered)
6219 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
6222 (printf "OFPST_TABLE reply (OF1.3) (xid=0x2):"
6224 while test $x -lt 254; do
6227 active=0, lookup=0, matched=0"
6230 AT_CHECK([ovs-ofctl -O OpenFlow13 dump-tables br0 ], [0], [expout])
6232 (echo "OFPST_TABLE reply (OF1.3) (xid=0x2):
6234 active=0, lookup=3, matched=0"
6236 while test $x -lt 254; do
6239 active=0, lookup=0, matched=0"
6242 AT_CHECK([ovs-ofctl -O OpenFlow13 dump-tables br1 ], [0], [expout])
6248 AT_SETUP([ofproto-dpif packet-out goto_table])
6250 ADD_OF_PORTS([br0], 1, 2)
6252 AT_DATA([flows.txt], [dnl
6253 table=0 dl_dst=50:54:00:00:00:0a actions=goto_table(1)
6254 table=1 dl_dst=50:54:00:00:00:0a actions=controller
6256 AT_CHECK([ovs-ofctl -O OpenFlow13 add-flows br0 flows.txt])
6258 AT_CAPTURE_FILE([ofctl_monitor.log])
6259 AT_CHECK([ovs-ofctl monitor br0 65534 invalid_ttl --detach --no-chdir --pidfile 2> ofctl_monitor.log])
6262 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)'
6265 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
6266 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
6267 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
6268 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
6269 in_port=0,vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,dl_type=0x1234
6271 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
6272 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
6274 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
6275 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
6278 AT_CHECK([ovs-appctl revalidator/purge], [0])
6279 AT_CHECK([ovs-ofctl -O OpenFlow13 dump-flows br0 | ofctl_strip | sort], [0], [dnl
6280 n_packets=3, n_bytes=180, dl_dst=50:54:00:00:00:0a actions=goto_table:1
6281 table=1, n_packets=3, n_bytes=180, dl_dst=50:54:00:00:00:0a actions=CONTROLLER:65535
6282 OFPST_FLOW reply (OF1.3):
6285 (echo "OFPST_TABLE reply (OF1.3) (xid=0x2):
6287 active=1, lookup=3, matched=3
6290 active=1, lookup=3, matched=3"
6292 while test $x -lt 254; do
6295 active=0, lookup=0, matched=0"
6298 AT_CHECK([ovs-ofctl -O OpenFlow13 dump-tables br0 ], [0], [expout])
6304 AT_SETUP([ofproto-dpif packet-out table-miss (continue)])
6306 ADD_OF_PORTS([br0], 1, 2)
6308 AT_CHECK([ovs-ofctl -O OpenFlow11 add-flow br0 'table=1 dl_dst=50:54:00:00:00:0a actions=controller'])
6309 AT_CHECK([ovs-ofctl -O OpenFlow11 mod-table br0 all continue])
6311 AT_CAPTURE_FILE([ofctl_monitor.log])
6312 AT_CHECK([ovs-ofctl monitor br0 65534 invalid_ttl --detach --no-chdir --pidfile 2> ofctl_monitor.log])
6315 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)'
6318 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
6319 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
6320 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
6321 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
6322 in_port=0,vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,dl_type=0x1234
6324 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
6325 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
6327 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
6328 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
6331 AT_CHECK([ovs-appctl revalidator/purge], [0])
6332 AT_CHECK([ovs-ofctl -O OpenFlow11 dump-flows br0 | ofctl_strip | sort], [0], [dnl
6333 table=1, n_packets=3, n_bytes=180, dl_dst=50:54:00:00:00:0a actions=CONTROLLER:65535
6334 OFPST_FLOW reply (OF1.1):
6337 (echo "OFPST_TABLE reply (OF1.3) (xid=0x2):
6339 active=0, lookup=3, matched=0
6342 active=1, lookup=3, matched=3"
6344 while test $x -lt 254; do
6347 active=0, lookup=0, matched=0"
6350 AT_CHECK([ovs-ofctl -O OpenFlow13 dump-tables br0 ], [0], [expout])
6355 AT_SETUP([ofproto-dpif - ICMPv6])
6357 ADD_OF_PORTS([br0], 1)
6359 AT_CAPTURE_FILE([ofctl_monitor.log])
6361 AT_CHECK([ovs-ofctl monitor br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
6363 ovs-appctl netdev-dummy/receive p1 '0060970769ea0000860580da86dd6000000000203afffe80000000000000020086fffe0580dafe80000000000000026097fffe0769ea870068bd00000000fe80000000000000026097fffe0769ea01010000860580da'
6365 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
6367 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
6368 NXT_PACKET_IN (xid=0x0): cookie=0x0 total_len=86 in_port=1 (via no_match) data_len=86 (unbuffered)
6369 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