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/dp_hash=0x[[0-9a-f]][[0-9a-f]]*/dp_hash=0x0/' -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=0x0/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 - modify IPv6 Neighbor Solitication (ND)])
264 ADD_OF_PORTS([br0], [1], [10], [11], [12], [13])
265 AT_DATA([flows.txt], [dnl
266 table=0 in_port=1,icmp6,icmpv6_type=135 actions=output(10),write_actions(set_field:fe80::3->nd_target,set_field:aa:aa:aa:aa:aa:aa->nd_sll,output(12)),goto_table(1)
267 table=1 icmp6 actions=write_actions(output(13)),goto_table(2)
268 table=2 in_port=1,icmp6,icmpv6_type=135 actions=set_field:fe80::4->nd_target,set_field:cc:cc:cc:cc:cc:cc->nd_sll,output(11)
270 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flows br0 flows.txt])
271 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,icmp6,ipv6_src=fe80::1,ipv6_dst=fe80::2,nw_tos=0,nw_ttl=128,icmpv6_type=135,nd_target=fe80::2020,nd_sll=66:55:44:33:22:11'], [0], [stdout])
272 AT_CHECK([tail -4 stdout], [0],
273 [Megaflow: recirc_id=0,icmp6,in_port=1,nw_frag=no,icmp_type=135,icmp_code=0x0/0xff,nd_target=fe80::2020,nd_sll=66:55:44:33:22:11
274 Datapath actions: 10,set(nd(target=fe80::4,sll=cc:cc:cc:cc:cc:cc)),11,set(nd(target=fe80::3,sll=aa:aa:aa:aa:aa:aa)),13
275 This flow is handled by the userspace slow path because it:
276 - Uses action(s) not supported by datapath.
281 AT_SETUP([ofproto-dpif - clear actions])
283 ADD_OF_PORTS([br0], [1], [10], [11], [12])
284 AT_DATA([flows.txt], [dnl
285 table=0 in_port=1,ip actions=output(10),write_actions(set_field:192.168.3.90->ip_src,output(12)),goto_table(1)
286 table=1 tcp actions=set_field:91->tp_src,output(11),clear_actions
288 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flows br0 flows.txt])
289 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])
290 AT_CHECK([tail -2 stdout], [0],
291 [Megaflow: recirc_id=0,tcp,in_port=1,nw_frag=no,tp_src=8
292 Datapath actions: 10,set(tcp(src=91)),11
297 AT_SETUP([ofproto-dpif - group chaining not supported])
299 ADD_OF_PORTS([br0], [1], [10], [11])
300 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'],
302 AT_CHECK([STRIP_XIDS stderr | sed 1q], [0],
303 [OFPT_ERROR (OF1.2): OFPGMFC_CHAINING_UNSUPPORTED
308 AT_SETUP([ofproto-dpif - all group in action list])
310 ADD_OF_PORTS([br0], [1], [10], [11])
311 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'])
312 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=group:1234'])
313 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])
314 # Must match on the source address to be able to restore it's value for
316 AT_CHECK([tail -2 stdout], [0],
317 [Megaflow: recirc_id=0,ip,in_port=1,nw_src=192.168.0.1,nw_frag=no
318 Datapath actions: set(ipv4(src=192.168.3.90)),10,set(ipv4(src=192.168.0.1)),11
323 AT_SETUP([ofproto-dpif - indirect group in action list])
325 ADD_OF_PORTS([br0], [1], [10])
326 AT_CHECK([ovs-ofctl -O OpenFlow12 add-group br0 group_id=1234,type=indirect,bucket=output:10])
327 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=group:1234'])
328 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])
329 AT_CHECK([tail -1 stdout], [0],
330 [Datapath actions: 10
335 AT_SETUP([ofproto-dpif - all group in action set])
337 ADD_OF_PORTS([br0], [1], [10], [11])
338 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'])
339 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=write_actions(group:1234)'])
340 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])
341 # Must match on the source address to be able to restore it's value for
343 AT_CHECK([tail -2 stdout], [0],
344 [Megaflow: recirc_id=0,ip,in_port=1,nw_src=192.168.0.1,nw_frag=no
345 Datapath actions: set(ipv4(src=192.168.3.90)),10,set(ipv4(src=192.168.0.1)),11
350 AT_SETUP([ofproto-dpif - indirect group in action set])
352 ADD_OF_PORTS([br0], [1], [10])
353 AT_CHECK([ovs-ofctl -O OpenFlow12 add-group br0 group_id=1234,type=indirect,bucket=output:10])
354 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=write_actions(group:1234)'])
355 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])
356 AT_CHECK([tail -1 stdout], [0],
357 [Datapath actions: 10
362 AT_SETUP([ofproto-dpif - select group])
364 ADD_OF_PORTS([br0], [1], [10], [11])
365 AT_CHECK([ovs-ofctl -O OpenFlow12 add-group br0 'group_id=1234,type=select,bucket=output:10,bucket=output:11'])
366 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=write_actions(group:1234)'])
368 # Try a bunch of different flows and make sure that they get distributed
370 for d in 0 1 2 3 4 5 6 7 8 9 a b c d e f; do
371 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])
372 tail -1 stdout >> results
374 sort results | uniq -c
375 AT_CHECK([sort results | uniq], [0],
376 [Datapath actions: 10
382 AT_SETUP([ofproto-dpif - select group with watch port])
384 ADD_OF_PORTS([br0], [1], [10], [11])
385 AT_CHECK([ovs-ofctl -O OpenFlow12 add-group br0 'group_id=1234,type=select,bucket=watch_port:10,output:10,bucket=output:11'])
386 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=write_actions(group:1234)'])
387 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])
388 AT_CHECK([tail -1 stdout], [0],
389 [Datapath actions: 11
394 AT_SETUP([ofproto-dpif - select group with weight])
396 ADD_OF_PORTS([br0], [1], [10], [11], [12])
397 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'])
398 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=write_actions(group:1234)'])
399 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])
400 AT_CHECK([tail -1 stdout], [0],
401 [Datapath actions: 11
406 AT_SETUP([ofproto-dpif - fast failover group])
408 ADD_OF_PORTS([br0], [1], [10], [11])
409 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'])
410 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=write_actions(group:1234)'])
411 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])
412 AT_CHECK([tail -1 stdout], [0],
413 [Datapath actions: drop
418 AT_SETUP([ofproto-dpif - group stats single bucket])
420 ADD_OF_PORTS([br0], [1], [10], [11])
421 AT_CHECK([ovs-ofctl -O OpenFlow12 add-group br0 'group_id=1234,type=select,bucket=output:10,weight=2000,bucket=output:11,weight=0'])
422 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=write_actions(group:1234)'])
426 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)"
427 AT_CHECK([ovs-appctl netdev-dummy/receive p1 $pkt])
430 AT_CHECK([ovs-appctl revalidator/purge], [0])
431 AT_CHECK([ovs-ofctl -O OpenFlow12 -vwarn dump-group-stats br0], [0], [stdout])
432 AT_CHECK([STRIP_XIDS stdout | sort], [0], [dnl
433 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
434 OFPST_GROUP reply (OF1.2):
439 AT_SETUP([ofproto-dpif - group stats all buckets])
441 ADD_OF_PORTS([br0], [1], [10], [11])
442 AT_CHECK([ovs-ofctl -O OpenFlow12 add-group br0 'group_id=1234,type=all,bucket=output:10,bucket=output:11'])
443 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=write_actions(group:1234)'])
447 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)"
448 AT_CHECK([ovs-appctl netdev-dummy/receive p1 $pkt])
451 AT_CHECK([ovs-appctl revalidator/purge], [0])
452 AT_CHECK([ovs-ofctl -O OpenFlow12 -vwarn dump-group-stats br0], [0], [stdout])
453 AT_CHECK([STRIP_XIDS stdout | sort], [0], [dnl
454 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
455 OFPST_GROUP reply (OF1.2):
460 AT_SETUP([ofproto-dpif - registers])
462 ADD_OF_PORTS([br0], [20], [21], [22], [33], [90])
463 AT_DATA([flows.txt], [dnl
464 in_port=90 actions=resubmit:2,resubmit:3,resubmit:4,resubmit:91
465 in_port=91 actions=resubmit:5,resubmit:6,resubmit:7,resubmit:92
466 in_port=92 actions=resubmit:8,resubmit:9,resubmit:10,resubmit:11,resubmit:93
467 in_port=93 actions=resubmit:12,resubmit:13,resubmit:14,resubmit:15
469 in_port=2 actions=load:0x000db000->NXM_NX_REG0[[]]
470 in_port=3 actions=load:0xdea->NXM_NX_REG0[[20..31]]
471 in_port=4 actions=load:0xeef->NXM_NX_REG0[[0..11]]
472 in_port=5 actions=move:NXM_NX_REG0[[]]->NXM_NX_REG1[[]]
473 in_port=6 actions=load:0x22222222->NXM_NX_REG2[[]]
474 in_port=7 actions=move:NXM_NX_REG1[[20..31]]->NXM_NX_REG2[[0..11]]
475 in_port=8 actions=move:NXM_NX_REG1[[0..11]]->NXM_NX_REG2[[20..31]]
476 in_port=9,reg0=0xdeadbeef actions=output:20
477 in_port=10,reg1=0xdeadbeef actions=output:21
478 in_port=11,reg2=0xeef22dea actions=output:22
480 dnl Sanilty check all registers
481 in_port=12 actions=load:0x10->NXM_NX_REG0[[]],load:0x11->NXM_NX_REG1[[]],load:0x12->NXM_NX_REG2[[]]
482 in_port=13 actions=load:0x13->NXM_NX_REG3[[]],load:0x14->NXM_NX_REG4[[]],load:0x15->NXM_NX_REG5[[]]
483 in_port=14 actions=load:0x16->NXM_NX_REG6[[]],load:0x17->NXM_NX_REG7[[]]
484 in_port=15,reg0=0x10,reg1=0x11,reg2=0x12,reg3=0x13,reg4=0x14,reg5=0x15,reg6=0x16,reg7=0x17 actions=output:33
487 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
488 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])
489 AT_CHECK([tail -1 stdout], [0],
490 [Datapath actions: 20,21,22,33
495 dnl Tests that the standardized xregs are mapped onto the legacy OVS registers
496 dnl in the manner documented in ovs-ofctl(8).
497 AT_SETUP([ofproto-dpif - extended registers])
499 ADD_OF_PORTS([br0], [1], [2], [3])
500 AT_DATA([flows.txt], [dnl
501 table=0 actions=load:0xfedcba9876543210->OXM_OF_PKT_REG1[[]],resubmit(,1)
502 table=1,reg2=0xfedcba98,reg3=0x76543210 actions=2
504 # These low-priority rules shouldn't match. They're here only to make really
505 # sure that the test fails if either of the above rules fails to match.
506 table=0,priority=0 actions=3
507 table=1,priority=0 actions=3
509 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
510 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])
511 AT_CHECK([tail -1 stdout], [0], [Datapath actions: 2
516 AT_SETUP([ofproto-dpif - load and move order])
518 ADD_OF_PORTS([br0], [1], [10], [11])
519 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'])
520 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)'])
521 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])
522 AT_CHECK([tail -2 stdout], [0],
523 [Megaflow: recirc_id=0,ip,in_port=1,nw_src=192.168.0.1,nw_frag=no
524 Datapath actions: set(ipv4(src=255.255.255.255)),10,set(ipv4(src=192.168.0.1)),11
529 dnl Tests that 1.5 copy-field can copy into the standardized xregs.
530 AT_SETUP([ofproto-dpif - copy-field into extended registers])
532 ADD_OF_PORTS([br0], [1], [2], [3])
533 AT_DATA([flows.txt], [dnl
534 table=0 actions=move:OXM_OF_ETH_SRC[[0..47]]->OXM_OF_PKT_REG0[[0..47]],goto_table(1)
535 table=1,xreg0=0x0000505400000005 actions=2
537 # These low-priority rules shouldn't match. They're here only to make really
538 # sure that the test fails if either of the above rules fails to match.
539 table=0,priority=0 actions=3
540 table=1,priority=0 actions=3
542 AT_CHECK([ovs-ofctl -O OpenFlow15 add-flows br0 flows.txt])
543 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)'], [0], [stdout])
544 AT_CHECK([tail -1 stdout], [0], [Datapath actions: 2
549 dnl Tests that 1.5 set-field with mask in the metadata register.
550 AT_SETUP([ofproto-dpif - masked set-field into metadata])
552 ADD_OF_PORTS([br0], [1], [2], [3])
553 AT_DATA([flows.txt], [dnl
554 table=0 actions=set_field:0xfafafafa5a5a5a5a->metadata,goto_table(1)
555 table=1 actions=set_field:0x6b/0xff->metadata,goto_table(2)
556 table=2,metadata=0xfafafafa5a5a5a6b actions=2
558 # These low-priority rules shouldn't match. They're here only to make really
559 # sure that the test fails if either of the above rules fails to match.
560 table=0,priority=0 actions=3
561 table=1,priority=0 actions=3
562 table=2,priority=0 actions=3
564 AT_CHECK([ovs-ofctl -O OpenFlow15 add-flows br0 flows.txt])
565 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])
566 AT_CHECK([tail -1 stdout], [0], [Datapath actions: 2
572 AT_SETUP([ofproto-dpif - actset_output])
575 [br0], [1], [2], [3], [4], [5], [6], [7], [8], [9], [10], [11], [12], [13])
576 AT_DATA([flows.txt], [dnl
577 table=0,actset_output=unset actions=write_actions(output(2)),goto_table(1)
578 table=1 actions=move:ONFOXM_ET_ACTSET_OUTPUT[[0..31]]->OXM_OF_PKT_REG0[[0..31]],goto_table(2)
580 # Verify that actset_output got set.
581 table=2,priority=20,actset_output=2 actions=4,goto_table(3)
582 table=2,priority=10 actions=5,goto_table(3)
584 # Verify that xreg0 got copied properly from actset_output.
585 table=3,priority=20,xreg0=2 actions=6,goto_table(4)
586 table=3,priority=10 actions=7,goto_table(4)
588 # Verify that adding a group action unsets actset_output.
589 table=4 actions=write_actions(group(5)),goto_table(5)
590 table=5,priority=20,actset_output=unset actions=8,goto_table(6)
591 table=5,priority=10 actions=9,goto_table(6)
593 # Verify that adding another output action doesn't change actset_output
594 # (since there's still a group).
595 table=6 actions=write_actions(output(3)),goto_table(7)
596 table=7,priority=20,actset_output=unset actions=10,goto_table(8)
597 table=7,priority=10 actions=11,goto_table(8)
599 # Verify that clearing the action set, then writing an output action,
600 # causes actset_output to be set again.
601 table=8,actions=clear_actions,write_actions(output(3),output(2)),goto_table(9)
602 table=9,priority=20,actset_output=2 actions=12
603 table=9,priority=10 actions=13
605 AT_CHECK([ovs-ofctl -O OpenFlow13 add-flows br0 flows.txt])
606 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])
607 AT_CHECK([tail -1 stdout], [0], [Datapath actions: 4,6,8,10,12,2
611 AT_SETUP([ofproto-dpif - push-pop])
613 ADD_OF_PORTS([br0], [20], [21], [22], [33], [90])
614 AT_DATA([flows.txt], [dnl
615 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
616 in_port=2 actions=pop:NXM_NX_REG0[[0..7]],output:NXM_NX_REG0[[]]
617 in_port=3 actions=pop:NXM_NX_REG1[[0..7]],output:NXM_NX_REG1[[]]
618 in_port=4 actions=pop:NXM_NX_REG2[[0..15]],output:NXM_NX_REG2[[]]
619 in_port=5 actions=pop:NXM_NX_REG3[[]],output:NXM_NX_REG3[[]]
622 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
623 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])
624 AT_CHECK([tail -1 stdout], [0],
625 [Datapath actions: 33,22,21,20
630 AT_SETUP([ofproto-dpif - output])
632 ADD_OF_PORTS([br0], [1], [9], [10], [11], [55], [66], [77], [88])
633 AT_DATA([flows.txt], [dnl
634 in_port=1 actions=resubmit:2,resubmit:3,resubmit:4,resubmit:5,resubmit:6,resubmit:7,resubmit:8
635 in_port=2 actions=output:9
636 in_port=3 actions=load:55->NXM_NX_REG0[[]],output:NXM_NX_REG0[[]],load:66->NXM_NX_REG1[[]]
637 in_port=4 actions=output:10,output:NXM_NX_REG0[[]],output:NXM_NX_REG1[[]],output:11
638 in_port=5 actions=load:77->NXM_NX_REG0[[0..15]],load:88->NXM_NX_REG0[[16..31]]
639 in_port=6 actions=output:NXM_NX_REG0[[0..15]],output:NXM_NX_REG0[[16..31]]
640 in_port=7 actions=load:0x110000ff->NXM_NX_REG0[[]],output:NXM_NX_REG0[[]]
641 in_port=8 actions=1,9,load:9->NXM_OF_IN_PORT[[]],1,9
643 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
644 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)'], [0], [stdout])
645 AT_CHECK([tail -1 stdout], [0],
646 [Datapath actions: 9,55,10,55,66,11,77,88,9,1
651 AT_SETUP([ofproto-dpif - dec_ttl])
653 ADD_OF_PORTS([br0], [1], [2], [3], [4])
654 AT_DATA([flows.txt], [dnl
655 table=0 in_port=1 action=dec_ttl,output:2,resubmit(1,1),output:4
656 table=1 in_port=1 action=dec_ttl,output:3
658 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
659 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])
660 AT_CHECK([tail -4 stdout], [0],
661 [Megaflow: recirc_id=0,ip,in_port=1,nw_ttl=2,nw_frag=no
662 Datapath actions: set(ipv4(ttl=1)),2,4
663 This flow is handled by the userspace slow path because it:
664 - Sends "packet-in" messages to the OpenFlow controller.
666 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])
667 AT_CHECK([tail -2 stdout], [0],
668 [Megaflow: recirc_id=0,ip,in_port=1,nw_ttl=3,nw_frag=no
669 Datapath actions: set(ipv4(ttl=2)),2,set(ipv4(ttl=1)),3,4
671 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])
672 AT_CHECK([tail -2 stdout], [0],
673 [Megaflow: recirc_id=0,ipv6,in_port=1,nw_ttl=128,nw_frag=no
674 Datapath actions: set(ipv6(hlimit=127)),2,set(ipv6(hlimit=126)),3,4
677 AT_CAPTURE_FILE([ofctl_monitor.log])
678 AT_CHECK([ovs-ofctl monitor br0 65534 invalid_ttl --detach --no-chdir --pidfile 2> ofctl_monitor.log])
679 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])
680 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
681 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
682 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=34 in_port=1 (via invalid_ttl) data_len=34 (unbuffered)
683 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
688 dnl A dec_ttl action at offset 32 in ofpacts will cause the ofpacts
689 dnl buffer to be resized just before pushing the id of the dec_ttl action.
690 dnl Thus the implementation must account for this by using the
691 dnl reallocated buffer rather than the original buffer.
693 dnl A number of similar rules are added to try and exercise
694 dnl xrealloc sufficiently that it returns a different base pointer
695 AT_SETUP([ofproto-dpif - dec_ttl without arguments at offset 32 in ofpacts])
697 ADD_OF_PORTS([br0], [1])
698 (for i in `seq 0 255`; do
699 printf "dl_src=10:11:11:11:11:%02x actions=output:1,output:1,output:1,dec_ttl,controller\n" $i
701 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
705 dnl A dec_ttl action at offset 32 in ofpacts will cause the ofpacts
706 dnl buffer to be resized just before pushing the id of the dec_ttl action.
707 dnl Thus the implementation must account for this by using the
708 dnl reallocated buffer rather than the original buffer.
710 dnl A number of similar rules are added to try and exercise
711 dnl xrealloc sufficiently that it returns a different base pointer
712 AT_SETUP([ofproto-dpif - dec_ttl with arguments at offset 32 in ofpacts])
714 ADD_OF_PORTS([br0], [1])
715 (for i in `seq 0 255`; do
716 printf "dl_src=10:11:11:11:11:%02x actions=output:1,output:1,output:1,dec_ttl(1),controller\n" $i
718 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
722 dnl A note action at offset 24 in ofpacts will cause the ofpacts
723 dnl buffer to be resized just before pushing the id of the dec_ttl action.
724 dnl Thus the implementation must account for this by using the
725 dnl reallocated buffer rather than the original buffer.
727 dnl A number of similar rules are added to try and exercise
728 dnl xrealloc sufficiently that it returns a different base pointer
729 AT_SETUP([ofproto-dpif - note at offset 24 in ofpacts])
731 ADD_OF_PORTS([br0], [1])
732 (for i in `seq 0 255`; do
733 printf "dl_src=10:11:11:11:11:%02x actions=output:1,output:1,note:ff,controller\n" $i
735 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
739 AT_SETUP([ofproto-dpif - output, OFPP_NONE ingress port])
741 ADD_OF_PORTS([br0], [1], [2])
743 AT_CHECK([ovs-ofctl add-flow br0 action=normal])
745 # "in_port" defaults to OFPP_NONE if it's not specified.
746 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"
747 AT_CHECK([ovs-appctl ofproto/trace br0 "$flow"], [0], [stdout])
748 AT_CHECK([tail -1 stdout | sed 's/Datapath actions: //' | tr "," "\n" | sort -n], [0], [dnl
757 AT_SETUP([ofproto-dpif - DSCP])
758 OVS_VSWITCHD_START([add-port br0 p1 -- set Interface p1 type=dummy])
759 ADD_OF_PORTS([br0], [9])
760 AT_DATA([flows.txt], [dnl
761 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
763 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
764 AT_CHECK([ovs-vsctl -- \
765 set Port p1 qos=@newqos --\
766 --id=@newqos create QoS type=linux-htb queues=1=@q1,2=@q2 --\
767 --id=@q1 create Queue dscp=1 --\
768 --id=@q2 create Queue dscp=2], [0], [ignore])
769 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])
770 AT_CHECK([tail -2 stdout], [0],
771 [Megaflow: recirc_id=0,skb_priority=0,ip,in_port=9,nw_tos=252,nw_frag=no
772 Datapath actions: dnl
774 set(ipv4(tos=0x4/0xfc)),set(skb_priority(0x1)),1,dnl
775 set(ipv4(tos=0x8/0xfc)),set(skb_priority(0x2)),1,dnl
777 set(ipv4(tos=0x4/0xfc)),set(skb_priority(0x1)),1,dnl
778 set(ipv4(tos=0xfc/0xfc)),set(skb_priority(0)),1,dnl
779 set(ipv4(tos=0/0xfc)),1,100
784 AT_SETUP([ofproto-dpif - output/flood flags])
786 ADD_OF_PORTS([br0], [1], [2], [3], [4], [5], [6], [7])
788 AT_DATA([flows.txt], [dnl
789 in_port=local actions=local,flood
790 in_port=1 actions=flood
791 in_port=2 actions=all
792 in_port=3 actions=output:LOCAL,output:1,output:2,output:3,output:4,output:5,output:6,output:7
793 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
795 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
796 AT_CHECK([ovs-ofctl mod-port br0 5 noforward])
797 AT_CHECK([ovs-ofctl mod-port br0 6 noflood])
799 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])
800 AT_CHECK([tail -1 stdout \
801 | sed -e 's/Datapath actions: //' | tr ',' '\n' | sort], [0], [dnl
809 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])
810 AT_CHECK([tail -1 stdout \
811 | sed -e 's/Datapath actions: //' | tr ',' '\n' | sort], [0], [dnl
819 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])
820 AT_CHECK([tail -1 stdout \
821 | sed -e 's/Datapath actions: //' | tr ',' '\n' | sort], [0], [dnl
830 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])
831 AT_CHECK([tail -1 stdout], [0],
832 [Datapath actions: 100,1,2,4,6,7
835 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])
836 AT_CHECK([tail -1 stdout], [0],
837 [Datapath actions: set(skb_priority(0x1)),100,1,2,set(skb_priority(0x2)),3,set(skb_priority(0x1)),6,7
842 AT_SETUP([ofproto-dpif - Default Table Miss - OF1.0 (OFPTC_TABLE_MISS_CONTROLLER)])
843 OVS_VSWITCHD_START([dnl
844 add-port br0 p1 -- set Interface p1 type=dummy
846 ON_EXIT([kill `cat ovs-ofctl.pid`])
848 AT_CAPTURE_FILE([ofctl_monitor.log])
850 AT_CHECK([ovs-ofctl monitor br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
853 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)'
855 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
856 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
857 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
858 NXT_PACKET_IN (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
859 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
861 NXT_PACKET_IN (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
862 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
864 NXT_PACKET_IN (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
865 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
868 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
869 AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
876 AT_SETUP([ofproto-dpif - Default Table Miss - OF1.3 (OFPTC_TABLE_MISS_DROP)])
877 OVS_VSWITCHD_START([dnl
878 add-port br0 p1 -- set Interface p1 type=dummy
880 ON_EXIT([kill `cat ovs-ofctl.pid`])
882 AT_CAPTURE_FILE([ofctl_monitor.log])
883 AT_CHECK([ovs-ofctl del-flows br0])
885 AT_CHECK([ovs-ofctl monitor -OOpenFlow13 -P openflow10 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
887 dnl Test that missed packets are droped
889 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)'
891 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
893 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
896 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
897 AT_CHECK([ovs-ofctl -OOpenFlow13 dump-flows br0 | ofctl_strip | sort], [0], [dnl
898 OFPST_FLOW reply (OF1.3):
904 AT_SETUP([ofproto-dpif - Table Miss - goto table and OFPTC_TABLE_MISS_CONTROLLER])
905 OVS_VSWITCHD_START([dnl
906 add-port br0 p1 -- set Interface p1 type=dummy
908 ON_EXIT([kill `cat ovs-ofctl.pid`])
910 AT_CAPTURE_FILE([ofctl_monitor.log])
911 AT_CHECK([ovs-ofctl -OOpenFlow12 add-flow br0 'table=0 actions=goto_table(1)'])
913 AT_CHECK([ovs-ofctl monitor -P openflow10 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
916 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)'
918 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
919 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
920 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
921 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
922 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
924 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
925 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
927 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
928 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
931 AT_CHECK([ovs-appctl revalidator/purge], [0])
932 AT_CHECK([ovs-ofctl -OOpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
933 n_packets=3, n_bytes=180, actions=goto_table:1
934 OFPST_FLOW reply (OF1.2):
940 AT_SETUP([ofproto-dpif - Table Miss - resubmit and OFPTC_TABLE_MISS_CONTROLLER])
941 OVS_VSWITCHD_START([dnl
942 add-port br0 p1 -- set Interface p1 type=dummy
944 ON_EXIT([kill `cat ovs-ofctl.pid`])
946 AT_CAPTURE_FILE([ofctl_monitor.log])
947 AT_CHECK([ovs-ofctl -OOpenFlow12 add-flow br0 'table=0 actions=resubmit(1,1)'])
949 AT_CHECK([ovs-ofctl monitor -P openflow10 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
952 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)'
955 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
956 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
959 AT_CHECK([ovs-appctl revalidator/purge], [0])
960 AT_CHECK([ovs-ofctl -OOpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
961 n_packets=3, n_bytes=180, actions=resubmit(1,1)
962 OFPST_FLOW reply (OF1.2):
968 AT_SETUP([ofproto-dpif - Table Miss - OFPTC_TABLE_MISS_CONTINUE])
969 OVS_VSWITCHD_START([dnl
970 add-port br0 p1 -- set Interface p1 type=dummy
972 ON_EXIT([kill `cat ovs-ofctl.pid`])
974 AT_CAPTURE_FILE([ofctl_monitor.log])
975 AT_CHECK([ovs-ofctl add-flow br0 'table=1 dl_src=10:11:11:11:11:11 actions=controller'])
976 AT_CHECK([ovs-ofctl -OOpenFlow11 mod-table br0 all continue])
978 dnl Miss table 0, Hit table 1
979 AT_CHECK([ovs-ofctl monitor br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
982 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)'
984 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
985 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
987 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
988 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
989 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
991 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
992 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
994 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
995 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
998 dnl Hit table 0, Miss all other tables, sent to controller
999 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1002 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)'
1004 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1005 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
1007 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1008 NXT_PACKET_IN (xid=0x0): table_id=253 cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
1009 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
1011 NXT_PACKET_IN (xid=0x0): table_id=253 cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
1012 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
1014 NXT_PACKET_IN (xid=0x0): table_id=253 cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
1015 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
1018 AT_CHECK([ovs-appctl revalidator/purge], [0])
1019 AT_CHECK([ovs-ofctl -OOpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
1020 table=1, n_packets=3, n_bytes=180, dl_src=10:11:11:11:11:11 actions=CONTROLLER:65535
1021 OFPST_FLOW reply (OF1.2):
1027 AT_SETUP([ofproto-dpif - Table Miss - goto table and OFPTC_TABLE_MISS_CONTINUE])
1028 OVS_VSWITCHD_START([dnl
1029 add-port br0 p1 -- set Interface p1 type=dummy
1031 ON_EXIT([kill `cat ovs-ofctl.pid`])
1033 AT_CAPTURE_FILE([ofctl_monitor.log])
1034 AT_DATA([flows.txt], [dnl
1035 table=0 actions=goto_table(1)
1036 table=2 dl_src=10:11:11:11:11:11 actions=controller
1038 AT_CHECK([ovs-ofctl -OOpenFlow12 add-flows br0 flows.txt])
1039 AT_CHECK([ovs-ofctl -OOpenFlow11 mod-table br0 all continue])
1041 dnl Hit table 0, Miss table 1, Hit table 2
1042 AT_CHECK([ovs-ofctl monitor br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1045 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)'
1047 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1048 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1050 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1051 NXT_PACKET_IN (xid=0x0): table_id=2 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1052 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
1054 NXT_PACKET_IN (xid=0x0): table_id=2 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1055 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
1057 NXT_PACKET_IN (xid=0x0): table_id=2 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1058 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
1061 dnl Hit table 1, Miss all other tables, sent to controller
1062 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1065 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)'
1067 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1068 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
1070 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1071 NXT_PACKET_IN (xid=0x0): table_id=253 cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
1072 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
1074 NXT_PACKET_IN (xid=0x0): table_id=253 cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
1075 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
1077 NXT_PACKET_IN (xid=0x0): table_id=253 cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
1078 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
1081 AT_CHECK([ovs-appctl revalidator/purge], [0])
1082 AT_CHECK([ovs-ofctl -OOpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
1083 n_packets=6, n_bytes=360, actions=goto_table:1
1084 table=2, n_packets=3, n_bytes=180, dl_src=10:11:11:11:11:11 actions=CONTROLLER:65535
1085 OFPST_FLOW reply (OF1.2):
1091 AT_SETUP([ofproto-dpif - Table Miss - resubmit and OFPTC_TABLE_MISS_CONTINUE])
1092 OVS_VSWITCHD_START([dnl
1093 add-port br0 p1 -- set Interface p1 type=dummy
1095 ON_EXIT([kill `cat ovs-ofctl.pid`])
1097 AT_CAPTURE_FILE([ofctl_monitor.log])
1098 AT_DATA([flows.txt], [dnl
1099 table=0 actions=resubmit(1,1)
1100 table=2 dl_src=10:11:11:11:11:11 actions=controller
1102 AT_CHECK([ovs-ofctl -OOpenFlow12 add-flows br0 flows.txt])
1103 AT_CHECK([ovs-ofctl -OOpenFlow11 mod-table br0 all continue])
1105 dnl Hit table 0, Miss table 1, Dropped
1106 AT_CHECK([ovs-ofctl monitor br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1109 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)'
1111 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1113 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1116 dnl Hit table 1, Dropped
1117 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1120 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)'
1122 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
1124 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1127 AT_CHECK([ovs-appctl revalidator/purge], [0])
1128 AT_CHECK([ovs-ofctl -OOpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
1129 n_packets=6, n_bytes=360, actions=resubmit(1,1)
1130 table=2, dl_src=10:11:11:11:11:11 actions=CONTROLLER:65535
1131 OFPST_FLOW reply (OF1.2):
1137 AT_SETUP([ofproto-dpif - Table Miss - OFPTC_TABLE_MISS_DROP])
1138 OVS_VSWITCHD_START([dnl
1139 add-port br0 p1 -- set Interface p1 type=dummy
1141 ON_EXIT([kill `cat ovs-ofctl.pid`])
1143 AT_CAPTURE_FILE([ofctl_monitor.log])
1144 AT_CHECK([ovs-ofctl -OOpenFlow11 mod-table br0 all drop])
1146 AT_CHECK([ovs-ofctl monitor -P openflow10 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1148 dnl Test that missed packets are droped
1150 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)'
1152 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
1154 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1157 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1158 AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
1165 AT_SETUP([ofproto-dpif - Table Miss - goto table and OFPTC_TABLE_MISS_DROP])
1166 OVS_VSWITCHD_START([dnl
1167 add-port br0 p1 -- set Interface p1 type=dummy
1169 ON_EXIT([kill `cat ovs-ofctl.pid`])
1171 AT_CAPTURE_FILE([ofctl_monitor.log])
1172 AT_CHECK([ovs-ofctl del-flows br0])
1173 AT_CHECK([ovs-ofctl -OOpenFlow12 add-flow br0 'table=0 actions=goto_table(1)'])
1174 AT_CHECK([ovs-ofctl -OOpenFlow11 mod-table br0 all drop])
1176 AT_CHECK([ovs-ofctl monitor -P openflow10 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1178 dnl Test that missed packets are droped
1180 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)'
1182 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
1184 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1187 AT_CHECK([ovs-appctl revalidator/purge], [0])
1188 AT_CHECK([ovs-ofctl -OOpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
1189 n_packets=3, n_bytes=180, actions=goto_table:1
1190 OFPST_FLOW reply (OF1.2):
1196 AT_SETUP([ofproto-dpif - Table Miss - resubmit and OFPTC_TABLE_MISS_DROP])
1197 OVS_VSWITCHD_START([dnl
1198 add-port br0 p1 -- set Interface p1 type=dummy
1200 ON_EXIT([kill `cat ovs-ofctl.pid`])
1202 AT_CAPTURE_FILE([ofctl_monitor.log])
1203 AT_CHECK([ovs-ofctl del-flows br0])
1204 AT_CHECK([ovs-ofctl -OOpenFlow12 add-flow br0 'table=0 actions=resubmit(1,1)'])
1205 AT_CHECK([ovs-ofctl -OOpenFlow11 mod-table br0 all drop])
1207 AT_CHECK([ovs-ofctl monitor -P openflow10 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1209 dnl Test that missed packets are droped
1211 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)'
1213 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
1215 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1218 AT_CHECK([ovs-appctl revalidator/purge], [0])
1219 AT_CHECK([ovs-ofctl -OOpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
1220 n_packets=3, n_bytes=180, actions=resubmit(1,1)
1221 OFPST_FLOW reply (OF1.2):
1227 AT_SETUP([ofproto-dpif - controller])
1228 OVS_VSWITCHD_START([dnl
1229 add-port br0 p1 -- set Interface p1 type=dummy
1231 ON_EXIT([kill `cat ovs-ofctl.pid`])
1233 AT_CAPTURE_FILE([ofctl_monitor.log])
1234 AT_DATA([flows.txt], [dnl
1235 cookie=0x0 dl_src=10:11:11:11:11:11 actions=controller
1236 cookie=0x1 dl_src=20:22:22:22:22:22 actions=controller,resubmit(80,1)
1237 cookie=0x2 dl_src=30:33:33:33:33:33 actions=mod_vlan_vid:15,controller
1239 cookie=0x3 table=1 in_port=80 actions=load:1->NXM_NX_REG0[[]],mod_vlan_vid:80,controller,resubmit(81,2)
1240 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)
1241 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)
1242 cookie=0x6 table=4 in_port=83 actions=load:4->NXM_NX_REG3[[]],mod_nw_src:83.83.83.83,controller,resubmit(84,5)
1243 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)
1244 cookie=0x8 table=6 in_port=85 actions=mod_tp_src:85,controller,resubmit(86,7)
1245 cookie=0x9 table=7 in_port=86 actions=mod_tp_dst:86,controller,controller
1246 cookie=0xa dl_src=40:44:44:44:44:41 actions=mod_vlan_vid:99,mod_vlan_pcp:1,controller
1247 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
1249 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
1252 AT_CHECK([ovs-ofctl monitor -P openflow10 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1255 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)'
1257 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1258 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1260 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1261 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
1262 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
1264 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
1265 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
1267 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
1268 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
1271 dnl Singleton controller action.
1272 AT_CHECK([ovs-ofctl monitor -P openflow10 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1275 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)'
1277 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1278 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1280 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1281 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1282 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
1284 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1285 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
1287 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1288 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
1291 dnl Modified controller action.
1292 AT_CHECK([ovs-ofctl monitor -P openflow10 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1295 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)'
1297 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1298 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1300 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1301 OFPT_PACKET_IN (xid=0x0): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1302 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
1304 OFPT_PACKET_IN (xid=0x0): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1305 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
1307 OFPT_PACKET_IN (xid=0x0): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1308 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
1311 dnl Modified VLAN controller action.
1312 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1315 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)'
1317 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1318 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1320 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1321 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1322 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
1324 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1325 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
1327 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1328 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
1332 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1335 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)'
1337 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 18])
1338 ovs-appctl -t ovs-ofctl exit
1340 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1341 NXT_PACKET_IN (xid=0x0): cookie=0x1 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1342 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
1344 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x3 total_len=64 in_port=1 reg0=0x1 (via action) data_len=64 (unbuffered)
1345 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
1347 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)
1348 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
1350 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)
1351 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
1353 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)
1354 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
1356 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)
1357 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
1359 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)
1360 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
1362 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)
1363 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
1365 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)
1366 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
1370 AT_CHECK([ovs-ofctl monitor br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1373 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'
1375 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 18])
1376 ovs-appctl -t ovs-ofctl exit
1378 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1379 NXT_PACKET_IN (xid=0x0): cookie=0x1 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1380 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
1382 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x3 total_len=64 in_port=1 reg0=0x1 (via action) data_len=64 (unbuffered)
1383 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
1385 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)
1386 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
1388 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)
1389 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
1391 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)
1392 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
1394 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)
1395 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
1397 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)
1398 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
1400 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)
1401 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
1403 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)
1404 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
1407 dnl Modified ARP controller action.
1408 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1411 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)'
1414 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 18])
1415 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
1416 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1417 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1418 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
1419 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1420 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
1421 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1422 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
1423 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1424 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
1425 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1426 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
1427 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1428 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
1429 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1430 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
1431 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1432 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
1433 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1434 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
1437 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1440 AT_CHECK([ovs-ofctl monitor br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1443 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'
1446 AT_CHECK([ovs-appctl time/warp 1000], [0], [ignore])
1447 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 18])
1448 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
1449 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1450 NXT_PACKET_IN (xid=0x0): cookie=0x1 total_len=98 in_port=1 (via action) data_len=98 (unbuffered)
1451 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
1453 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x3 total_len=102 in_port=1 reg0=0x1 (via action) data_len=102 (unbuffered)
1454 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
1456 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)
1457 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
1459 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)
1460 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
1462 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)
1463 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
1465 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)
1466 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
1468 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)
1469 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
1471 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)
1472 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
1474 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)
1475 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
1478 AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
1479 cookie=0x1, n_packets=3, n_bytes=218, dl_src=20:22:22:22:22:22 actions=CONTROLLER:65535,resubmit(80,1)
1480 cookie=0x2, n_packets=3, n_bytes=180, dl_src=30:33:33:33:33:33 actions=mod_vlan_vid:15,CONTROLLER:65535
1481 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)
1482 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)
1483 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)
1484 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)
1485 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)
1486 cookie=0x8, table=6, n_packets=3, n_bytes=218, in_port=85 actions=mod_tp_src:85,CONTROLLER:65535,resubmit(86,7)
1487 cookie=0x9, table=7, n_packets=3, n_bytes=218, in_port=86 actions=mod_tp_dst:86,CONTROLLER:65535,CONTROLLER:65535
1488 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
1489 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
1490 n_packets=3, n_bytes=180, dl_src=10:11:11:11:11:11 actions=CONTROLLER:65535
1497 AT_SETUP([ofproto-dpif - MPLS handling])
1498 OVS_VSWITCHD_START([dnl
1499 add-port br0 p1 -- set Interface p1 type=dummy
1501 ON_EXIT([kill `cat ovs-ofctl.pid`])
1503 AT_CAPTURE_FILE([ofctl_monitor.log])
1504 AT_DATA([flows.txt], [dnl
1505 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
1506 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
1507 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
1508 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
1509 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
1510 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
1511 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
1512 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
1513 cookie=0xa mpls,dl_src=40:44:44:44:44:49 actions=push_mpls:0x8848,load:10->OXM_OF_MPLS_LABEL[[]],CONTROLLER:65535
1514 cookie=0xb dl_src=50:55:55:55:55:55 dl_type=0x8847 actions=load:1000->OXM_OF_MPLS_LABEL[[]],controller
1515 cookie=0xd dl_src=60:66:66:66:66:66 actions=pop_mpls:0x0800,controller
1516 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
1518 cookie=0xd dl_src=60:66:66:66:00:01 actions=pop_mpls:0x0800,dec_ttl,controller
1519 cookie=0xd dl_src=60:66:66:66:00:02 actions=pop_mpls:0x0800,load:0xa000001->OXM_OF_IPV4_DST[[]],controller
1520 cookie=0xd dl_src=60:66:66:66:00:03 actions=pop_mpls:0x0800,move:OXM_OF_IPV4_DST[[]]->OXM_OF_IPV4_SRC[[]],controller
1521 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
1522 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
1523 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
1524 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
1526 cookie=0xd dl_src=60:66:66:66:00:08 actions=pop_mpls:0x0806,resubmit(1,1)
1527 cookie=0xd table=1 arp actions=controller
1529 cookie=0xd dl_src=60:66:66:66:00:09 actions=pop_mpls:0x0800,mod_nw_tos:48,controller
1530 cookie=0xd dl_src=60:66:66:66:00:0a actions=pop_mpls:0x0800,mod_nw_dst:10.0.0.1,controller
1531 cookie=0xd dl_src=60:66:66:66:00:0b actions=pop_mpls:0x0800,mod_nw_src:10.0.0.1,controller
1533 cookie=0xd dl_src=60:66:66:66:01:00 actions=pop_mpls:0x8848,controller
1534 cookie=0xd dl_src=60:66:66:66:01:01 actions=pop_mpls:0x8847,dec_mpls_ttl,controller
1535 cookie=0xd dl_src=60:66:66:66:01:02 actions=pop_mpls:0x8848,load:3->OXM_OF_MPLS_TC[[]],controller
1537 cookie=0xd dl_src=60:66:66:66:02:00 actions=pop_mpls:0x8847,pop_mpls:0x0800,controller
1538 cookie=0xd dl_src=60:66:66:66:02:01 actions=pop_mpls:0x8848,pop_mpls:0x0800,dec_ttl,controller
1539 cookie=0xd dl_src=60:66:66:66:02:10 actions=pop_mpls:0x8847,dec_mpls_ttl,pop_mpls:0x0800,dec_ttl,controller
1541 cookie=0xd dl_src=60:66:66:66:03:00 actions=pop_mpls:0x8848,pop_mpls:0x8848,controller
1542 cookie=0xd dl_src=60:66:66:66:03:01 actions=pop_mpls:0x8847,pop_mpls:0x8847,dec_mpls_ttl,controller
1543 cookie=0xd dl_src=60:66:66:66:03:10 actions=pop_mpls:0x8848,dec_mpls_ttl,pop_mpls:0x8848,dec_mpls_ttl,controller
1545 cookie=0xd dl_src=60:66:66:66:04:00 actions=pop_mpls:0x0800,push_mpls:0x8847,controller
1546 cookie=0xd dl_src=60:66:66:66:04:01 actions=pop_mpls:0x0800,push_mpls:0x8848,dec_mpls_ttl,controller
1547 cookie=0xd dl_src=60:66:66:66:04:10 actions=pop_mpls:0x0800,dec_ttl,push_mpls:0x8848,dec_mpls_ttl,controller
1549 cookie=0xd dl_src=60:66:66:66:05:00 actions=push_mpls:0x8848,pop_mpls:0x8847,controller
1550 cookie=0xd dl_src=60:66:66:66:05:01 actions=push_mpls:0x8847,pop_mpls:0x8848,dec_mpls_ttl,controller
1551 cookie=0xd dl_src=60:66:66:66:05:10 actions=push_mpls:0x8848,dec_mpls_ttl,pop_mpls:0x8847,dec_mpls_ttl,controller
1553 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
1555 dnl Modified MPLS controller action.
1556 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1559 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)'
1561 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1562 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1564 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1565 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1566 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
1568 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1569 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
1571 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1572 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
1575 dnl Modified MPLS controller action.
1576 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1579 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)'
1581 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1582 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1584 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1585 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1586 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
1588 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1589 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
1591 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1592 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
1595 dnl Modified MPLS controller action.
1596 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1598 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)
1601 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)'
1603 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1604 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1606 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1607 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1608 mpls,in_port=0,vlan_tci=0x0000,dl_src=40:44:44:44:44:43,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=64,mpls_bos=0,mpls_lse1=46912
1610 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1611 mpls,in_port=0,vlan_tci=0x0000,dl_src=40:44:44:44:44:43,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=64,mpls_bos=0,mpls_lse1=46912
1613 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1614 mpls,in_port=0,vlan_tci=0x0000,dl_src=40:44:44:44:44:43,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=64,mpls_bos=0,mpls_lse1=46912
1617 dnl Modified MPLS controller action.
1618 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1621 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))'
1623 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1624 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1626 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1627 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1628 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
1630 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1631 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
1633 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1634 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
1637 dnl Modified MPLS controller action.
1638 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1641 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)'
1643 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1644 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1646 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1647 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1648 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
1650 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1651 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
1653 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1654 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
1657 dnl Modified MPLS controller action.
1658 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1661 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)'
1663 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1664 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1666 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1667 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1668 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
1670 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1671 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
1673 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1674 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
1677 dnl Modified MPLS controller action.
1678 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1681 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=40:44:44:44:44: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)'
1683 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1684 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1686 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1687 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1688 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
1690 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1691 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
1693 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1694 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
1697 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1699 dnl Modified MPLS controller action.
1700 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1703 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=40:44:44:44:44:49,dst=50:54:00:00:00:07),eth_type(0x8847),mpls(label=10,tc=3,ttl=64,bos=1)'
1705 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1706 ovs-appctl -t ovs-ofctl exit
1708 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1709 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1710 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
1712 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1713 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
1715 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1716 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
1719 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1721 dnl Modified MPLS controller action.
1722 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1725 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)'
1727 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1728 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1730 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1731 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1732 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
1734 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1735 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
1737 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1738 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
1741 dnl Modified MPLS actions.
1742 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1745 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)'
1747 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1748 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1750 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1751 NXT_PACKET_IN (xid=0x0): cookie=0xb total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1752 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
1754 NXT_PACKET_IN (xid=0x0): cookie=0xb total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1755 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
1757 NXT_PACKET_IN (xid=0x0): cookie=0xb total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1758 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
1761 dnl Modified MPLS ipv6 controller action.
1762 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1765 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)'
1767 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1768 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1770 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1771 NXT_PACKET_IN (xid=0x0): cookie=0xc total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1772 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
1774 NXT_PACKET_IN (xid=0x0): cookie=0xc total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1775 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
1777 NXT_PACKET_IN (xid=0x0): cookie=0xc total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1778 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
1782 dnl Modified MPLS pop action.
1783 dnl The input is a frame with two MPLS headers which tcpdump -vve shows as:
1784 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)
1785 dnl (tos 0x0, ttl 64, id 0, offset 0, flags [none], proto TCP (6), length 44)
1787 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1790 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'
1793 # 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)'
1795 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1796 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1798 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1799 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1800 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
1802 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1803 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
1805 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1806 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
1809 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1811 dnl Modified MPLS pop action.
1812 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
1813 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)
1814 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
1815 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
1816 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1819 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'
1821 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1822 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1824 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
1825 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1826 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
1828 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1829 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
1831 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1832 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
1835 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1837 dnl Modified MPLS pop action.
1838 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
1839 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)
1840 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
1841 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
1842 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1845 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'
1847 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1848 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1850 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
1851 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1852 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
1854 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1855 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
1857 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1858 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
1861 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1863 dnl Modified MPLS pop action.
1864 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
1865 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)
1866 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
1867 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
1868 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1871 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'
1873 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1874 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1876 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
1877 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1878 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
1880 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1881 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
1883 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1884 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
1887 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1889 dnl Modified MPLS pop action.
1890 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
1891 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)
1892 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
1893 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
1894 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1897 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'
1899 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1900 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1902 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
1903 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1904 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
1906 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1907 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
1909 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1910 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
1913 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1915 dnl Modified MPLS pop action.
1916 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
1917 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)
1918 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
1919 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
1920 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1923 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'
1925 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1926 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1928 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
1929 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1930 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
1932 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1933 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
1935 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1936 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
1939 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1941 dnl Modified MPLS pop action.
1942 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
1943 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)
1944 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
1945 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
1946 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1949 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'
1951 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1952 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1954 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
1955 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1956 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
1958 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1959 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
1961 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1962 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
1965 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1967 dnl Modified MPLS pop action.
1968 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
1969 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)
1970 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
1971 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
1972 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1975 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'
1977 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1978 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1980 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
1981 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1982 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
1984 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1985 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
1987 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1988 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
1991 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1993 dnl Modified MPLS pop action.
1994 dnl The input is an ARP frame with a single MPLS label stack entry which tcpdump -vve shows as:
1995 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)
1996 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1999 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'
2001 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2002 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2004 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
2005 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0xd total_len=56 in_port=1 (via action) data_len=56 (unbuffered)
2006 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
2008 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0xd total_len=56 in_port=1 (via action) data_len=56 (unbuffered)
2009 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
2011 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0xd total_len=56 in_port=1 (via action) data_len=56 (unbuffered)
2012 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
2015 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2017 dnl Modified MPLS pop action.
2018 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
2019 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)
2020 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
2021 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
2022 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2025 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'
2027 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2028 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2030 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
2031 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2032 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
2034 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2035 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
2037 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2038 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
2041 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2043 dnl Modified MPLS pop action.
2044 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
2045 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)
2046 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
2047 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
2048 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2051 ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 60 66 66 66 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'
2053 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2054 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2056 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
2057 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2058 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
2060 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2061 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
2063 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2064 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
2067 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2069 dnl Modified MPLS pop action.
2070 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
2071 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)
2072 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
2073 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
2074 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2077 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'
2079 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2080 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2082 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
2083 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2084 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
2086 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2087 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
2089 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2090 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
2093 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2095 dnl Modified MPLS pop action.
2096 dnl The input is a frame with two MPLS label stack entries which tcpdump -vve shows as:
2097 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)
2098 dnl (label 20, exp 0, [S], ttl 31)
2099 dnl (tos 0x0, ttl 254, id 0, offset 0, flags [none], proto TCP (6), length 44)
2100 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
2101 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2104 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'
2106 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2107 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2109 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2110 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2111 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
2113 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2114 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
2116 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2117 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
2120 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2122 dnl Modified MPLS pop action.
2123 dnl The input is a frame with two MPLS label stack entries which tcpdump -vve shows as:
2124 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)
2125 dnl (label 20, exp 0, [S], ttl 31)
2126 dnl (tos 0x0, ttl 254, id 0, offset 0, flags [none], proto TCP (6), length 44)
2127 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
2128 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2131 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'
2133 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2134 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2136 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2137 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2138 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
2140 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2141 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
2143 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2144 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
2147 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2149 dnl Modified MPLS pop action.
2150 dnl The input is a frame with two MPLS label stack entries which tcpdump -vve shows as:
2151 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)
2152 dnl (label 20, exp 0, [S], ttl 31)
2153 dnl (tos 0x0, ttl 254, id 0, offset 0, flags [none], proto TCP (6), length 44)
2154 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
2155 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2158 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'
2160 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2161 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2163 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2164 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2165 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
2167 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2168 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
2170 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2171 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
2174 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2176 dnl Modified MPLS pop action.
2177 dnl The input is a frame with two MPLS label stack entries which tcpdump -vve shows as:
2178 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)
2179 dnl (label 20, exp 0, [S], ttl 31)
2180 dnl (tos 0x0, ttl 254, id 0, offset 0, flags [none], proto TCP (6), length 44)
2181 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
2182 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2185 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'
2187 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2188 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2190 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2191 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2192 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
2194 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2195 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
2197 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2198 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
2201 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2203 dnl Modified MPLS pop action.
2204 dnl The input is a frame with two MPLS label stack entries which tcpdump -vve shows as:
2205 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)
2206 dnl (label 20, exp 0, [S], ttl 31)
2207 dnl (tos 0x0, ttl 254, id 0, offset 0, flags [none], proto TCP (6), length 44)
2208 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
2209 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2212 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'
2214 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2215 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2217 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
2218 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2219 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
2221 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2222 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
2224 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2225 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
2228 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2230 dnl Modified MPLS pop action.
2231 dnl The input is a frame with two MPLS label stack entries which tcpdump -vve shows as:
2232 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)
2233 dnl (label 20, exp 0, [S], ttl 31)
2234 dnl (tos 0x0, ttl 254, id 0, offset 0, flags [none], proto TCP (6), length 44)
2235 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
2236 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2239 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'
2241 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2242 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2244 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
2245 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2246 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
2248 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2249 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
2251 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2252 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
2255 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2257 dnl Modified MPLS pop action.
2258 dnl The input is a frame with three MPLS label stack entries which tcpdump -vve shows as:
2259 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)
2260 dnl (label 20, exp 0, ttl 31)
2261 dnl (label 20, exp 0, [S], ttl 30)
2262 dnl (tos 0x0, ttl 254, id 0, offset 0, flags [none], proto TCP (6), length 44)
2263 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
2264 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2267 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'
2269 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2270 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2272 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2273 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2274 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
2276 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2277 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
2279 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2280 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
2283 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2285 dnl Modified MPLS pop action.
2286 dnl The input is a frame with three MPLS label stack entries which tcpdump -vve shows as:
2287 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)
2288 dnl (label 20, exp 0, ttl 31)
2289 dnl (label 20, exp 0, [S], ttl 30)
2290 dnl (tos 0x0, ttl 254, id 0, offset 0, flags [none], proto TCP (6), length 44)
2291 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
2292 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2295 ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 60 66 66 66 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'
2297 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2298 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2300 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2301 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2302 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
2304 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2305 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
2307 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2308 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
2311 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2313 dnl Modified MPLS pop action.
2314 dnl The input is a frame with three MPLS label stack entries which tcpdump -vve shows as:
2315 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)
2316 dnl (label 20, exp 0, ttl 31)
2317 dnl (label 20, exp 0, [S], ttl 30)
2318 dnl (tos 0x0, ttl 254, id 0, offset 0, flags [none], proto TCP (6), length 44)
2319 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
2320 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2323 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'
2325 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2326 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2328 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2329 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2330 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
2332 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2333 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
2335 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2336 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
2339 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2341 dnl Modified MPLS pop action.
2342 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
2343 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)
2344 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
2345 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
2346 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2349 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'
2351 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2352 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2354 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
2355 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2356 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
2358 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2359 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
2361 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2362 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
2365 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2367 dnl Modified MPLS pop action.
2368 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
2369 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)
2370 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
2371 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
2372 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2375 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'
2377 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2378 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2380 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
2381 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2382 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
2384 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2385 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
2387 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2388 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
2391 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2393 dnl Modified MPLS pop action.
2394 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
2395 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)
2396 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
2397 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
2398 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2401 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'
2403 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2404 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2406 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
2407 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2408 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
2410 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2411 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
2413 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2414 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
2417 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2419 dnl Modified MPLS pop action.
2420 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
2421 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)
2422 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
2423 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
2424 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2427 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'
2429 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2430 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2432 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2433 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2434 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
2436 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2437 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
2439 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2440 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
2443 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2445 dnl Modified MPLS pop action.
2446 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
2447 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)
2448 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
2449 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
2450 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2453 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'
2455 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2456 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2458 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2459 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2460 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
2462 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2463 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
2465 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2466 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
2469 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2471 dnl Modified MPLS pop action.
2472 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
2473 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)
2474 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
2475 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
2476 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2479 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'
2481 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2482 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2484 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2485 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2486 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
2488 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2489 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
2491 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2492 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
2495 AT_CHECK([ovs-appctl revalidator/purge], [0])
2496 AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
2497 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
2498 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
2499 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
2500 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
2501 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
2502 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
2503 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
2504 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
2505 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
2506 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
2507 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
2508 cookie=0xd, n_packets=3, n_bytes=180, dl_src=60:66:66:66:00:08 actions=pop_mpls:0x0806,resubmit(1,1)
2509 cookie=0xd, n_packets=3, n_bytes=186, dl_src=60:66:66:66:00:01 actions=pop_mpls:0x0800,dec_ttl,CONTROLLER:65535
2510 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
2511 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
2512 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
2513 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
2514 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
2515 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
2516 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
2517 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
2518 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
2519 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
2520 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
2521 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
2522 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
2523 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
2524 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
2525 cookie=0xd, n_packets=3, n_bytes=186, dl_src=60:66:66:66:66:66 actions=pop_mpls:0x0800,CONTROLLER:65535
2526 cookie=0xd, n_packets=3, n_bytes=198, dl_src=60:66:66:66:01:00 actions=pop_mpls:0x8848,CONTROLLER:65535
2527 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
2528 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
2529 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
2530 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
2531 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
2532 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
2533 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
2534 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
2535 cookie=0xd, table=1, n_packets=3, n_bytes=168, arp actions=CONTROLLER:65535
2542 AT_SETUP([ofproto-dpif - MPLS handling with goto_table])
2543 OVS_VSWITCHD_START([dnl
2544 add-port br0 p1 -- set Interface p1 type=dummy
2546 ON_EXIT([kill `cat ovs-ofctl.pid`])
2548 AT_CAPTURE_FILE([ofctl_monitor.log])
2549 AT_DATA([flows.txt], [dnl
2550 table=0 mplsm actions=pop_mpls:0x800,goto_table(1)
2551 table=1 ip,ip_dscp=8 actions=controller
2553 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flows br0 flows.txt])
2556 dnl Modified MPLS pop action.
2557 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
2558 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)
2559 dnl (tos 0x20, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
2560 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
2561 AT_CHECK([ovs-ofctl -O OpenFlow12 monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2564 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'
2566 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2567 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2569 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
2570 OFPT_PACKET_IN (OF1.2) (xid=0x0): table_id=1 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2571 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
2573 OFPT_PACKET_IN (OF1.2) (xid=0x0): table_id=1 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2574 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
2576 OFPT_PACKET_IN (OF1.2) (xid=0x0): table_id=1 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2577 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
2580 AT_CHECK([ovs-appctl revalidator/purge], [0])
2581 AT_CHECK([ovs-ofctl -O OpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
2582 n_packets=3, n_bytes=186, mplsm actions=pop_mpls:0x0800,goto_table:1
2583 table=1, n_packets=3, n_bytes=174, ip,nw_tos=32 actions=CONTROLLER:65535
2584 OFPST_FLOW reply (OF1.2):
2590 AT_SETUP([ofproto-dpif - MPLS handling with write_actions])
2591 OVS_VSWITCHD_START([dnl
2592 add-port br0 p1 -- set Interface p1 type=dummy
2594 ON_EXIT([kill `cat ovs-ofctl.pid`])
2596 dnl N.B: The first (and only) action that accesses L3 data after the
2597 dnl pop_mpls action is present in write_actions. This exercises recirculation
2598 dnl triggered in write_actions due to a previous action not in write actions.
2599 AT_CAPTURE_FILE([ofctl_monitor.log])
2600 AT_DATA([flows.txt], [dnl
2601 mplsm actions=pop_mpls:0x800,write_actions(dec_ttl,controller)
2603 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flows br0 flows.txt])
2605 dnl Modified MPLS pop action.
2606 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
2607 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)
2608 dnl (tos 0x20, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
2609 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
2610 AT_CHECK([ovs-ofctl -O OpenFlow12 monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2613 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'
2615 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2616 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2618 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
2619 OFPT_PACKET_IN (OF1.2) (xid=0x0): table_id=254 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2620 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
2622 OFPT_PACKET_IN (OF1.2) (xid=0x0): table_id=254 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2623 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
2625 OFPT_PACKET_IN (OF1.2) (xid=0x0): table_id=254 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2626 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
2629 AT_CHECK([ovs-appctl revalidator/purge], [0])
2630 AT_CHECK([ovs-ofctl -O OpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
2631 n_packets=3, n_bytes=186, mplsm actions=pop_mpls:0x0800,write_actions(dec_ttl,CONTROLLER:65535)
2632 OFPST_FLOW reply (OF1.2):
2638 AT_SETUP([ofproto-dpif - table-miss flow (OpenFlow 1.0)])
2639 OVS_VSWITCHD_START([dnl
2640 add-port br0 p1 -- set Interface p1 type=dummy
2642 ON_EXIT([kill `cat ovs-ofctl.pid`])
2644 AT_CAPTURE_FILE([ofctl_monitor.log])
2645 # A table-miss flow has priority 0 and no match
2646 AT_CHECK([ovs-ofctl --protocols=OpenFlow10 add-flow br0 'priority=0 actions=output:CONTROLLER'])
2648 dnl Singleton controller action.
2649 AT_CHECK([ovs-ofctl monitor -P openflow10 --protocols=OpenFlow10 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
2652 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)'
2654 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2655 ovs-appctl -t ovs-ofctl exit
2657 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2658 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
2659 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
2661 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
2662 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
2664 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
2665 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
2668 AT_CHECK([ovs-appctl revalidator/purge], [0])
2669 AT_CHECK([ovs-ofctl --protocols=OpenFlow10 dump-flows br0 | ofctl_strip | sort], [0], [dnl
2670 n_packets=3, n_bytes=180, priority=0 actions=CONTROLLER:65535
2678 AT_SETUP([ofproto-dpif - table-miss flow (OpenFlow 1.3)])
2679 OVS_VSWITCHD_START([dnl
2680 add-port br0 p1 -- set Interface p1 type=dummy
2682 ON_EXIT([kill `cat ovs-ofctl.pid`])
2684 AT_CAPTURE_FILE([ofctl_monitor.log])
2685 # A table-miss flow has priority 0 and no match
2686 AT_CHECK([ovs-ofctl --protocols=OpenFlow13 add-flow br0 'priority=0 actions=output:CONTROLLER'])
2688 dnl Singleton controller action.
2689 AT_CHECK([ovs-ofctl monitor -P openflow10 --protocols=OpenFlow13 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
2692 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)'
2694 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2695 ovs-appctl -t ovs-ofctl exit
2697 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2699 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2700 OFPT_PACKET_IN (OF1.3) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
2701 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
2703 OFPT_PACKET_IN (OF1.3) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
2704 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
2706 OFPT_PACKET_IN (OF1.3) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
2707 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
2710 AT_CHECK([ovs-appctl revalidator/purge], [0])
2711 AT_CHECK([ovs-ofctl --protocols=OpenFlow13 dump-flows br0 | ofctl_strip | sort], [0], [dnl
2712 n_packets=3, n_bytes=180, priority=0 actions=CONTROLLER:65535
2713 OFPST_FLOW reply (OF1.3):
2719 AT_SETUP([ofproto-dpif - table-miss flow with async config (OpenFlow 1.3)])
2720 OVS_VSWITCHD_START([dnl
2721 add-port br0 p1 -- set Interface p1 type=dummy
2723 ON_EXIT([kill `cat ovs-ofctl.pid`])
2725 ovs-appctl time/stop
2727 AT_CAPTURE_FILE([ofctl_monitor.log])
2728 # A table-miss flow has priority 0 and no match
2729 AT_CHECK([ovs-ofctl --protocols=OpenFlow13 add-flow br0 'priority=0 actions=output:CONTROLLER'])
2731 dnl Singleton controller action.
2732 AT_CHECK([ovs-ofctl monitor -P openflow10 --protocols=OpenFlow13 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
2734 # Become slave (OF 1.3), which should disable everything except port status.
2735 ovs-appctl -t ovs-ofctl ofctl/send 041800180000000200000003000000000000000000000001
2737 # Ensure that ovs-vswitchd gets a chance to reply before sending another command.
2738 ovs-appctl time/warp 500 100
2740 # Use OF 1.3 OFPT_SET_ASYNC to enable OFPR_NO_MATCH for slave only.
2741 ovs-appctl -t ovs-ofctl ofctl/send 041c002000000002000000000000000100000000000000000000000000000000
2743 ovs-appctl time/warp 500 100
2745 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)'
2747 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2748 ovs-appctl -t ovs-ofctl exit
2750 AT_CHECK([ovs-appctl revalidator/purge], [0])
2751 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2752 send: OFPT_ROLE_REQUEST (OF1.3) (xid=0x2): role=slave generation_id=1
2753 OFPT_ROLE_REPLY (OF1.3) (xid=0x2): role=slave generation_id=1
2755 send: OFPT_SET_ASYNC (OF1.3) (xid=0x2):
2766 OFPT_PACKET_IN (OF1.3) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
2767 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
2769 OFPT_PACKET_IN (OF1.3) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
2770 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
2772 OFPT_PACKET_IN (OF1.3) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
2773 tcp,in_port=0,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:0
2776 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2778 AT_CHECK([ovs-ofctl --protocols=OpenFlow13 dump-flows br0 | ofctl_strip | sort], [0], [dnl
2779 n_packets=3, n_bytes=180, priority=0 actions=CONTROLLER:65535
2780 OFPST_FLOW reply (OF1.3):
2787 AT_SETUP([ofproto-dpif - table-miss flow (OpenFlow 1.4)])
2788 OVS_VSWITCHD_START([dnl
2789 add-port br0 p1 -- set Interface p1 type=dummy
2791 ON_EXIT([kill `cat ovs-ofctl.pid`])
2793 AT_CAPTURE_FILE([ofctl_monitor.log])
2794 # A table-miss flow has priority 0 and no match
2795 AT_CHECK([ovs-ofctl --protocols=OpenFlow14 add-flow br0 'priority=0 actions=output:CONTROLLER'])
2797 dnl Singleton controller action.
2798 AT_CHECK([ovs-ofctl monitor -P openflow10 --protocols=OpenFlow14 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
2801 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)'
2803 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2804 ovs-appctl -t ovs-ofctl exit
2806 AT_CHECK([ovs-appctl revalidator/purge], [0])
2807 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2808 OFPT_PACKET_IN (OF1.4) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
2809 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
2811 OFPT_PACKET_IN (OF1.4) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
2812 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
2814 OFPT_PACKET_IN (OF1.4) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
2815 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
2818 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2820 AT_CHECK([ovs-ofctl --protocols=OpenFlow14 dump-flows br0 | ofctl_strip | sort], [0], [dnl
2821 n_packets=3, n_bytes=180, priority=0 actions=CONTROLLER:65535
2822 OFPST_FLOW reply (OF1.4):
2830 AT_SETUP([ofproto-dpif - packet-in reason in group table (Openflow 1.3)])
2831 OVS_VSWITCHD_START([dnl
2832 add-port br0 p1 -- set Interface p1 type=dummy
2834 ON_EXIT([kill `cat ovs-ofctl.pid`])
2836 AT_CAPTURE_FILE([ofctl_monitor.log])
2837 # A table-miss flow has priority 0 and no match
2838 AT_CHECK([ovs-ofctl --protocols=OpenFlow13 add-group br0 'group_id=1234,type=all,bucket=output:10,bucket=output:CONTROLLER'])
2839 AT_CHECK([ovs-ofctl --protocols=OpenFlow13 add-flow br0 'in_port=1 actions=group:1234'])
2841 dnl Singleton controller action.
2842 AT_CHECK([ovs-ofctl monitor -P openflow10 --protocols=OpenFlow13 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
2845 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)'
2847 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2848 ovs-appctl -t ovs-ofctl exit
2850 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2852 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2853 OFPT_PACKET_IN (OF1.3) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
2854 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
2856 OFPT_PACKET_IN (OF1.3) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
2857 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
2859 OFPT_PACKET_IN (OF1.3) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
2860 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
2863 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2865 AT_CHECK([ovs-ofctl --protocols=OpenFlow13 dump-flows br0 | ofctl_strip | sort], [0], [dnl
2866 n_packets=3, n_bytes=180, in_port=1 actions=group:1234
2867 OFPST_FLOW reply (OF1.3):
2874 AT_SETUP([ofproto-dpif - packet-in reason in group table (Openflow 1.4)])
2875 OVS_VSWITCHD_START([dnl
2876 add-port br0 p1 -- set Interface p1 type=dummy
2878 ON_EXIT([kill `cat ovs-ofctl.pid`])
2880 AT_CAPTURE_FILE([ofctl_monitor.log])
2881 # A table-miss flow has priority 0 and no match
2882 AT_CHECK([ovs-ofctl --protocols=OpenFlow14 add-group br0 'group_id=1234,type=all,bucket=output:10,bucket=output:CONTROLLER'])
2883 AT_CHECK([ovs-ofctl --protocols=OpenFlow14 add-flow br0 'in_port=1 actions=group:1234'])
2885 dnl Singleton controller action.
2886 AT_CHECK([ovs-ofctl monitor -P openflow10 --protocols=OpenFlow14 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
2889 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)'
2891 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2892 ovs-appctl -t ovs-ofctl exit
2894 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2896 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2897 OFPT_PACKET_IN (OF1.4) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via group) data_len=60 (unbuffered)
2898 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
2900 OFPT_PACKET_IN (OF1.4) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via group) data_len=60 (unbuffered)
2901 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
2903 OFPT_PACKET_IN (OF1.4) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via group) data_len=60 (unbuffered)
2904 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
2907 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2909 AT_CHECK([ovs-ofctl --protocols=OpenFlow14 dump-flows br0 | ofctl_strip | sort], [0], [dnl
2910 n_packets=3, n_bytes=180, in_port=1 actions=group:1234
2911 OFPST_FLOW reply (OF1.4):
2917 AT_SETUP([ofproto-dpif - ARP modification slow-path])
2919 ADD_OF_PORTS([br0], [1], [2])
2921 ovs-vsctl -- set Interface p2 type=dummy options:pcap=p2.pcap
2922 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'
2924 # Input some packets that should follow the arp modification slow-path.
2926 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)'
2928 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2930 # Check the packets that were output.
2931 AT_CHECK([ovs-ofctl parse-pcap p2.pcap], [0], [dnl
2932 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
2933 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
2934 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
2935 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
2936 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
2937 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
2938 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
2939 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
2940 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
2946 AT_SETUP([ofproto-dpif - VLAN handling])
2948 [set Bridge br0 fail-mode=standalone -- \
2949 add-port br0 p1 trunks=10,12 -- \
2950 add-port br0 p2 tag=10 -- \
2951 add-port br0 p3 tag=12 \
2952 other-config:priority-tags=true -- \
2953 add-port br0 p4 tag=12 -- \
2954 add-port br0 p5 vlan_mode=native-tagged tag=10 -- \
2955 add-port br0 p6 vlan_mode=native-tagged tag=10 trunks=10,12 -- \
2956 add-port br0 p7 vlan_mode=native-untagged tag=12 -- \
2957 add-port br0 p8 vlan_mode=native-untagged tag=12 trunks=10,12 \
2958 other-config:priority-tags=true -- \
2959 set Interface p1 type=dummy -- \
2960 set Interface p2 type=dummy -- \
2961 set Interface p3 type=dummy -- \
2962 set Interface p4 type=dummy -- \
2963 set Interface p5 type=dummy -- \
2964 set Interface p6 type=dummy -- \
2965 set Interface p7 type=dummy -- \
2966 set Interface p8 type=dummy --])
2968 dnl Each of these specifies an in_port by number, a VLAN VID (or "none"),
2969 dnl a VLAN PCP (used if the VID isn't "none") and the expected set of datapath
2975 "100 10 0 1,5,6,7,8,pop_vlan,2" \
2976 "100 10 1 1,5,6,7,8,pop_vlan,2" \
2979 "100 12 0 1,5,6,pop_vlan,3,4,7,8" \
2980 "100 12 1 1,5,6,pop_vlan,4,7,push_vlan(vid=0,pcp=1),3,8" \
2984 "1 10 0 5,6,7,8,100,pop_vlan,2" \
2985 "1 10 1 5,6,7,8,100,pop_vlan,2" \
2988 "1 12 0 5,6,100,pop_vlan,3,4,7,8" \
2989 "1 12 1 5,6,100,pop_vlan,4,7,push_vlan(vid=0,pcp=1),3,8" \
2990 "2 none 0 push_vlan(vid=10,pcp=0),1,5,6,7,8,100" \
2991 "2 0 0 pop_vlan,push_vlan(vid=10,pcp=0),1,5,6,7,8,100" \
2992 "2 0 1 pop_vlan,push_vlan(vid=10,pcp=1),1,5,6,7,8,100" \
2999 "3 none 0 4,7,8,push_vlan(vid=12,pcp=0),1,5,6,100" \
3000 "3 0 0 pop_vlan,4,7,8,push_vlan(vid=12,pcp=0),1,5,6,100" \
3001 "3 0 1 8,pop_vlan,4,7,push_vlan(vid=12,pcp=1),1,5,6,100" \
3008 "4 none 0 3,7,8,push_vlan(vid=12,pcp=0),1,5,6,100" \
3009 "4 0 0 pop_vlan,3,7,8,push_vlan(vid=12,pcp=0),1,5,6,100" \
3010 "4 0 1 3,8,pop_vlan,7,push_vlan(vid=12,pcp=1),1,5,6,100" \
3017 "5 none 0 2,push_vlan(vid=10,pcp=0),1,6,7,8,100" \
3018 "5 0 0 pop_vlan,2,push_vlan(vid=10,pcp=0),1,6,7,8,100" \
3019 "5 0 1 pop_vlan,2,push_vlan(vid=10,pcp=1),1,6,7,8,100" \
3020 "5 10 0 1,6,7,8,100,pop_vlan,2" \
3021 "5 10 1 1,6,7,8,100,pop_vlan,2" \
3024 "5 12 0 1,6,100,pop_vlan,3,4,7,8" \
3025 "5 12 1 1,6,100,pop_vlan,4,7,push_vlan(vid=0,pcp=1),3,8" \
3026 "6 none 0 2,push_vlan(vid=10,pcp=0),1,5,7,8,100" \
3027 "6 0 0 pop_vlan,2,push_vlan(vid=10,pcp=0),1,5,7,8,100" \
3028 "6 0 1 pop_vlan,2,push_vlan(vid=10,pcp=1),1,5,7,8,100" \
3029 "6 10 0 1,5,7,8,100,pop_vlan,2" \
3030 "6 10 1 1,5,7,8,100,pop_vlan,2" \
3033 "6 12 0 1,5,100,pop_vlan,3,4,7,8" \
3034 "6 12 1 1,5,100,pop_vlan,4,7,push_vlan(vid=0,pcp=1),3,8" \
3035 "7 none 0 3,4,8,push_vlan(vid=12,pcp=0),1,5,6,100" \
3036 "7 0 0 pop_vlan,3,4,8,push_vlan(vid=12,pcp=0),1,5,6,100" \
3037 "7 0 1 3,8,pop_vlan,4,push_vlan(vid=12,pcp=1),1,5,6,100" \
3038 "7 10 0 1,5,6,8,100,pop_vlan,2" \
3039 "7 10 1 1,5,6,8,100,pop_vlan,2" \
3042 "7 12 0 1,5,6,100,pop_vlan,3,4,8" \
3043 "7 12 1 1,5,6,100,pop_vlan,4,push_vlan(vid=0,pcp=1),3,8" \
3044 "8 none 0 3,4,7,push_vlan(vid=12,pcp=0),1,5,6,100" \
3045 "8 0 0 pop_vlan,3,4,7,push_vlan(vid=12,pcp=0),1,5,6,100" \
3046 "8 0 1 3,pop_vlan,4,7,push_vlan(vid=12,pcp=1),1,5,6,100" \
3047 "8 10 0 1,5,6,7,100,pop_vlan,2" \
3048 "8 10 1 1,5,6,7,100,pop_vlan,2" \
3051 "8 12 0 1,5,6,100,pop_vlan,3,4,7" \
3052 "8 12 1 1,5,6,100,pop_vlan,4,7,push_vlan(vid=0,pcp=1),3"
3060 if test $vlan = none; then
3061 flow="in_port($in_port),eth(src=50:54:00:00:00:01,dst=ff:ff:ff:ff:ff:ff),eth_type(0xabcd)"
3063 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))"
3066 echo "----------------------------------------------------------------------"
3067 echo "in_port=$in_port vlan=$vlan pcp=$pcp"
3069 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
3070 actual=`tail -1 stdout | sed 's/Datapath actions: //'`
3072 AT_CHECK([ovs-dpctl normalize-actions "$flow" "$expected"], [0], [stdout])
3074 AT_CHECK([ovs-dpctl normalize-actions "$flow" "$actual"], [0], [expout])
3080 AT_SETUP([ofproto-dpif - MPLS handling])
3081 OVS_VSWITCHD_START([dnl
3082 add-port br0 p1 -- set Interface p1 type=dummy
3084 ON_EXIT([kill `cat ovs-ofctl.pid`])
3086 AT_CAPTURE_FILE([ofctl_monitor.log])
3087 AT_DATA([flows.txt], [dnl
3088 dl_src=40:44:44:44:00:00 actions=push_mpls:0x8847,controller
3089 dl_src=40:44:44:44:00:01,mpls actions=push_mpls:0x8847,controller
3090 dl_src=40:44:44:44:00:02,mpls actions=push_mpls:0x8848,controller
3092 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 add-flows br0 flows.txt])
3094 dnl In this test, we push an MPLS tag to an ethernet packet.
3095 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
3098 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)'
3100 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3101 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
3103 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
3104 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3105 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
3106 00000000 50 54 00 00 00 07 40 44-44 44 00 00 88 47 00 00
3107 00000010 01 40 45 00 00 28 00 00-00 00 40 06 f9 7c c0 a8
3108 00000020 00 01 c0 a8 00 02 00 00-00 00 00 00 00 00 00 00
3109 00000030 00 00 50 00 00 00 00 00-00 00 00 00 00 00 00 00
3111 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3112 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
3113 00000000 50 54 00 00 00 07 40 44-44 44 00 00 88 47 00 00
3114 00000010 01 40 45 00 00 28 00 00-00 00 40 06 f9 7c c0 a8
3115 00000020 00 01 c0 a8 00 02 00 00-00 00 00 00 00 00 00 00
3116 00000030 00 00 50 00 00 00 00 00-00 00 00 00 00 00 00 00
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:00,dl_dst=50:54:00:00:00:07,mpls_label=0,mpls_tc=0,mpls_ttl=64,mpls_bos=1
3120 00000000 50 54 00 00 00 07 40 44-44 44 00 00 88 47 00 00
3121 00000010 01 40 45 00 00 28 00 00-00 00 40 06 f9 7c c0 a8
3122 00000020 00 01 c0 a8 00 02 00 00-00 00 00 00 00 00 00 00
3123 00000030 00 00 50 00 00 00 00 00-00 00 00 00 00 00 00 00
3126 dnl In this test, we push an MPLS tag to an MPLS packet. The LSE should be
3127 dnl copied exactly, except for the BOS bit.
3128 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
3131 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)'
3133 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3134 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
3136 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
3137 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3138 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
3139 00000000 50 54 00 00 00 07 40 44-44 44 00 01 88 47 00 00
3140 00000010 a0 40 00 00 a1 40 00 00-00 00 00 00 00 00 00 00
3141 00000020 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
3142 00000030 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
3144 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3145 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
3146 00000000 50 54 00 00 00 07 40 44-44 44 00 01 88 47 00 00
3147 00000010 a0 40 00 00 a1 40 00 00-00 00 00 00 00 00 00 00
3148 00000020 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
3149 00000030 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
3151 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3152 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
3153 00000000 50 54 00 00 00 07 40 44-44 44 00 01 88 47 00 00
3154 00000010 a0 40 00 00 a1 40 00 00-00 00 00 00 00 00 00 00
3155 00000020 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
3156 00000030 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
3159 dnl In this test, we push an MPLS tag to an MPLS packet. The LSE should be
3160 dnl copied exactly, except for the BOS bit. The ethertype should be updated
3161 dnl to the MPLS ethertype of the MPLS push action which differs to that
3162 dnl of the input packet.
3163 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
3166 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)'
3168 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3169 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
3171 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
3172 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3173 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
3174 00000000 50 54 00 00 00 07 40 44-44 44 00 02 88 48 00 00
3175 00000010 a0 40 00 00 a1 40 00 00-00 00 00 00 00 00 00 00
3176 00000020 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
3177 00000030 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
3179 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3180 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
3181 00000000 50 54 00 00 00 07 40 44-44 44 00 02 88 48 00 00
3182 00000010 a0 40 00 00 a1 40 00 00-00 00 00 00 00 00 00 00
3183 00000020 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
3184 00000030 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
3186 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3187 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
3188 00000000 50 54 00 00 00 07 40 44-44 44 00 02 88 48 00 00
3189 00000010 a0 40 00 00 a1 40 00 00-00 00 00 00 00 00 00 00
3190 00000020 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
3191 00000030 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
3197 AT_SETUP([ofproto-dpif - VLAN+MPLS handling])
3198 OVS_VSWITCHD_START([dnl
3199 add-port br0 p1 -- set Interface p1 type=dummy
3201 ON_EXIT([kill `cat ovs-ofctl.pid`])
3203 AT_CAPTURE_FILE([ofctl_monitor.log])
3204 AT_DATA([flows.txt], [dnl
3205 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
3206 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
3207 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
3208 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
3209 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
3210 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
3211 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
3212 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
3213 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
3214 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
3216 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 add-flows br0 flows.txt])
3218 dnl Modified MPLS controller action.
3219 dnl In this test, we push the MPLS tag before pushing a VLAN tag, so we see
3220 dnl both of these in the final flow
3221 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
3224 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)'
3226 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3227 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
3229 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
3230 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3231 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
3232 00000000 50 54 00 00 00 07 40 44-44 44 54 50 81 00 20 63
3233 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3234 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3235 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3236 00000040 00 00 00 00
3238 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3239 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
3240 00000000 50 54 00 00 00 07 40 44-44 44 54 50 81 00 20 63
3241 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3242 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3243 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3244 00000040 00 00 00 00
3246 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3247 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
3248 00000000 50 54 00 00 00 07 40 44-44 44 54 50 81 00 20 63
3249 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3250 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3251 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3252 00000040 00 00 00 00
3255 dnl Modified MPLS controller action.
3256 dnl In this test, the input packet in vlan-tagged, which should be stripped
3257 dnl before we push the MPLS and VLAN tags.
3258 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
3261 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))'
3263 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3264 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
3266 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
3267 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3268 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
3269 00000000 50 54 00 00 00 07 40 44-44 44 54 51 81 00 20 63
3270 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3271 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3272 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3274 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3275 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
3276 00000000 50 54 00 00 00 07 40 44-44 44 54 51 81 00 20 63
3277 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3278 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3279 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3281 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3282 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
3283 00000000 50 54 00 00 00 07 40 44-44 44 54 51 81 00 20 63
3284 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3285 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3286 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3289 dnl Modified MPLS controller action.
3290 dnl In this test, we push the MPLS tag before pushing a VLAN tag, so we see
3291 dnl both of these in the final flow
3292 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
3295 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)'
3297 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3298 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
3300 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
3301 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3302 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
3303 00000000 52 54 00 00 00 07 40 44-44 44 54 52 81 00 20 63
3304 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3305 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3306 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3307 00000040 00 00 00 00
3309 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3310 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
3311 00000000 52 54 00 00 00 07 40 44-44 44 54 52 81 00 20 63
3312 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3313 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3314 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3315 00000040 00 00 00 00
3317 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3318 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
3319 00000000 52 54 00 00 00 07 40 44-44 44 54 52 81 00 20 63
3320 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3321 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3322 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3323 00000040 00 00 00 00
3326 dnl Modified MPLS controller action.
3327 dnl In this test, the input packet in vlan-tagged, which should be stripped
3328 dnl before we push the MPLS and VLAN tags.
3329 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
3332 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))'
3334 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3335 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
3337 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
3338 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3339 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
3340 00000000 50 54 00 00 00 07 40 44-44 44 54 53 81 00 20 63
3341 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3342 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3343 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3345 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3346 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
3347 00000000 50 54 00 00 00 07 40 44-44 44 54 53 81 00 20 63
3348 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3349 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3350 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3352 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3353 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
3354 00000000 50 54 00 00 00 07 40 44-44 44 54 53 81 00 20 63
3355 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3356 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3357 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3360 dnl Modified MPLS controller action.
3361 dnl In this test, we push the VLAN tag before pushing a MPLS tag, but these
3362 dnl actions are reordered, so we see both of these in the final flow.
3363 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
3366 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)'
3368 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3369 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
3371 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
3372 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3373 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
3374 00000000 50 54 00 00 00 07 40 44-44 44 54 54 81 00 20 63
3375 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3376 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3377 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3378 00000040 00 00 00 00
3380 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3381 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
3382 00000000 50 54 00 00 00 07 40 44-44 44 54 54 81 00 20 63
3383 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3384 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3385 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3386 00000040 00 00 00 00
3388 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3389 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
3390 00000000 50 54 00 00 00 07 40 44-44 44 54 54 81 00 20 63
3391 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3392 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3393 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3394 00000040 00 00 00 00
3397 dnl Modified MPLS controller action.
3398 dnl In this test, the input packet in vlan-tagged, which should be stripped
3399 dnl before we push the MPLS and VLAN tags.
3400 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
3403 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))'
3405 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3406 OVS_APP_EXIT_AND_WAIT([ovs-ofctl])
3408 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
3409 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3410 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
3411 00000000 50 54 00 00 00 07 40 44-44 44 54 55 81 00 20 63
3412 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3413 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3414 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3416 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3417 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
3418 00000000 50 54 00 00 00 07 40 44-44 44 54 55 81 00 20 63
3419 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3420 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3421 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3423 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3424 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
3425 00000000 50 54 00 00 00 07 40 44-44 44 54 55 81 00 20 63
3426 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3427 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3428 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3431 dnl Modified MPLS controller action.
3432 dnl In this test, we push the VLAN tag before pushing a MPLS tag, but these
3433 dnl actions are reordered, so we see both of these in the final flow.
3434 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
3437 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)'
3439 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3440 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
3442 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
3443 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3444 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
3445 00000000 50 54 00 00 00 07 40 44-44 44 54 56 81 00 20 63
3446 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3447 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3448 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3449 00000040 00 00 00 00
3451 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3452 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
3453 00000000 50 54 00 00 00 07 40 44-44 44 54 56 81 00 20 63
3454 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3455 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3456 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3457 00000040 00 00 00 00
3459 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3460 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
3461 00000000 50 54 00 00 00 07 40 44-44 44 54 56 81 00 20 63
3462 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3463 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3464 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3465 00000040 00 00 00 00
3468 dnl Modified MPLS controller action.
3469 dnl In this test, the input packet in vlan-tagged, which should be stripped
3470 dnl before we push the MPLS and VLAN tags.
3471 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 -m 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
3474 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))'
3476 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3477 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
3479 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
3480 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3481 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
3482 00000000 50 54 00 00 00 07 40 44-44 44 54 57 81 00 20 63
3483 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3484 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3485 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3487 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3488 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
3489 00000000 50 54 00 00 00 07 40 44-44 44 54 57 81 00 20 63
3490 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3491 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3492 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3494 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3495 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
3496 00000000 50 54 00 00 00 07 40 44-44 44 54 57 81 00 20 63
3497 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3498 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3499 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3502 dnl Modified MPLS controller action.
3503 dnl In this test, the input packet in vlan-tagged, which should be stripped
3504 dnl before we push the MPLS and VLAN tags.
3505 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
3508 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))'
3510 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3511 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
3513 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
3514 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3515 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
3516 00000000 50 54 00 00 00 07 40 44-44 44 54 58 81 00 20 63
3517 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3518 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3519 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3521 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3522 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
3523 00000000 50 54 00 00 00 07 40 44-44 44 54 58 81 00 20 63
3524 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3525 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3526 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3528 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3529 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
3530 00000000 50 54 00 00 00 07 40 44-44 44 54 58 81 00 20 63
3531 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3532 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3533 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3536 dnl Modified MPLS controller action.
3537 dnl In this test, the input packet in vlan-tagged, which should be modified
3538 dnl before we push MPLS and VLAN tags.
3539 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
3542 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))'
3544 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3545 ovs-appctl -t ovs-ofctl exit
3547 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
3548 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3549 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
3550 00000000 50 54 00 00 00 07 40 44-44 44 54 59 81 00 20 63
3551 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3552 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3553 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3555 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3556 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
3557 00000000 50 54 00 00 00 07 40 44-44 44 54 59 81 00 20 63
3558 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3559 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3560 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3562 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3563 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
3564 00000000 50 54 00 00 00 07 40 44-44 44 54 59 81 00 20 63
3565 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3566 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3567 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3570 AT_CHECK([ovs-appctl revalidator/purge], [0])
3571 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
3572 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
3573 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
3574 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
3575 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
3576 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
3577 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
3578 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
3579 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
3580 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
3581 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
3582 OFPST_FLOW reply (OF1.2):
3588 AT_SETUP([ofproto-dpif - fragment handling - trace])
3590 ADD_OF_PORTS([br0], [1], [2], [3], [4], [5], [6], [90])
3591 AT_DATA([flows.txt], [dnl
3592 priority=75 tcp ip_frag=no tp_dst=80 actions=move:OXM_OF_TCP_DST[[]]->OXM_OF_TCP_SRC[[]],output:1
3593 priority=75 tcp ip_frag=first tp_dst=80 actions=move:OXM_OF_TCP_DST[[]]->OXM_OF_TCP_SRC[[]],output:2
3594 priority=50 tcp ip_frag=no actions=move:OXM_OF_TCP_DST[[]]->OXM_OF_TCP_SRC[[]],output:4
3595 priority=50 tcp ip_frag=first actions=move:OXM_OF_TCP_DST[[]]->OXM_OF_TCP_SRC[[]],output:5
3596 priority=50 tcp ip_frag=later actions=output:6
3598 AT_CHECK([ovs-ofctl replace-flows br0 flows.txt])
3600 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"
3601 no_flow="$base_flow,frag=no),tcp(src=12345,dst=80)"
3602 first_flow="$base_flow,frag=first),tcp(src=12345,dst=80)"
3603 later_flow="$base_flow,frag=later)"
3605 # mode no first later
3608 'drop 1 drop drop' \
3617 AT_CHECK([ovs-ofctl set-frags br0 $mode])
3618 for type in no first later; do
3619 eval flow=\$${type}_flow exp_output=\$$type
3620 printf "\n%s\n" "----$mode $type-----"
3621 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
3623 if test $mode = drop && test $type != no; then
3624 echo 'Packets dropped because they are IP fragments and the fragment handling mode is "drop".' >> expout
3625 echo "Datapath actions: $exp_output" >> expout
3626 elif test $type = later; then
3627 echo "Datapath actions: $exp_output" >> expout
3629 echo "Datapath actions: set(tcp(src=80,dst=80)),$exp_output" >> expout
3631 AT_CHECK([grep 'IP fragments' stdout; tail -1 stdout], [0], [expout])
3637 AT_SETUP([ofproto-dpif - fragment handling - upcall])
3639 ADD_OF_PORTS([br0], [1], [2], [3], [4], [5], [6], [90])
3640 AT_DATA([flows.txt], [dnl
3641 priority=75 tcp ip_frag=no tp_dst=80 actions=set_field:81->tcp_dst,output:1
3642 priority=75 tcp ip_frag=first tp_dst=80 actions=set_field:81->tcp_dst,output:2
3643 priority=50 tcp ip_frag=no actions=set_field:81->tcp_dst,output:4
3644 priority=50 tcp ip_frag=first actions=set_field:81->tcp_dst,output:5
3645 priority=50 tcp ip_frag=later actions=output:6
3647 AT_CHECK([ovs-ofctl replace-flows br0 flows.txt])
3649 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"
3650 no_flow="$base_flow,frag=no),tcp(src=12345,dst=80)"
3651 first_flow="$base_flow,frag=first),tcp(src=12345,dst=80)"
3652 later_flow="$base_flow,frag=later)"
3654 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
3658 AT_CHECK([ovs-ofctl set-frags br0 $mode])
3659 for type in no first later; do
3660 eval flow=\$${type}_flow
3661 printf "\n%s\n" "----$mode $type-----"
3663 AT_CHECK([ovs-appctl netdev-dummy/receive p90 "$flow"], [0], [stdout])
3666 AT_CHECK([ovs-appctl dpctl/dump-flows], [0], [dnl
3667 flow-dump from non-dpdk interfaces:
3668 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
3669 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
3670 recirc_id(0),in_port(90),eth_type(0x0800),ipv4(proto=6,frag=later), packets:0, bytes:0, used:never, actions:6
3675 AT_CHECK([ovs-appctl revalidator/purge], [0])
3676 AT_CHECK([ovs-ofctl set-frags br0 $mode])
3677 for type in no first later; do
3678 eval flow=\$${type}_flow
3679 printf "\n%s\n" "----$mode $type-----"
3681 AT_CHECK([ovs-appctl netdev-dummy/receive p90 "$flow"], [0], [stdout])
3684 AT_CHECK([ovs-appctl dpctl/dump-flows], [0], [dnl
3685 flow-dump from non-dpdk interfaces:
3686 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
3687 recirc_id(0),in_port(90),eth_type(0x0800),ipv4(frag=first), packets:0, bytes:0, used:never, actions:drop
3688 recirc_id(0),in_port(90),eth_type(0x0800),ipv4(frag=later), packets:0, bytes:0, used:never, actions:drop
3693 AT_CHECK([ovs-appctl revalidator/purge], [0])
3694 AT_CHECK([ovs-ofctl set-frags br0 $mode])
3695 for type in no first later; do
3696 eval flow=\$${type}_flow
3697 printf "\n%s\n" "----$mode $type-----"
3699 AT_CHECK([ovs-appctl netdev-dummy/receive p90 "$flow"], [0], [stdout])
3702 AT_CHECK([ovs-appctl dpctl/dump-flows], [0], [dnl
3703 flow-dump from non-dpdk interfaces:
3704 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
3705 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
3706 recirc_id(0),in_port(90),eth_type(0x0800),ipv4(proto=6,frag=later), packets:0, bytes:0, used:never, actions:6
3712 AT_SETUP([ofproto-dpif - fragment handling - actions])
3714 ADD_OF_PORTS([br0], [1], [2], [3], [4], [5], [6], [90])
3716 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])
3717 AT_CHECK([tail -2 stderr | sed 's/^.*|WARN|//'], [0], [dnl
3718 source field tcp_dst lacks correct prerequisites
3719 ovs-ofctl: actions are invalid with specified match (OFPBAC_MATCH_INCONSISTENT)
3722 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])
3723 AT_CHECK([tail -2 stderr | sed 's/^.*|WARN|//'], [0], [dnl
3724 destination field tcp_src lacks correct prerequisites
3725 ovs-ofctl: actions are invalid with specified match (OFPBAC_MATCH_INCONSISTENT)
3728 AT_CHECK([ovs-ofctl add-flow br0 "udp,ip_frag=later actions=set_field:8888->udp_src,output:1"], [1], [], [stderr])
3729 AT_CHECK([tail -2 stderr | sed 's/^.*|WARN|//'], [0], [dnl
3730 set_field udp_src lacks correct prerequisities
3731 ovs-ofctl: actions are invalid with specified match (OFPBAC_MATCH_INCONSISTENT)
3734 AT_CHECK([ovs-ofctl add-flow br0 "udp,ip_frag=later actions=load:8888->NXM_OF_UDP_DST[[]],output:1"], [1], [], [stderr])
3735 AT_CHECK([tail -2 stderr | sed 's/^.*|WARN|//'], [0], [dnl
3736 set_field udp_dst lacks correct prerequisities
3737 ovs-ofctl: actions are invalid with specified match (OFPBAC_MATCH_INCONSISTENT)
3740 AT_CHECK([ovs-ofctl add-flow br0 "sctp,ip_frag=later actions=set_field:8888->sctp_src,output:1"], [1], [], [stderr])
3741 AT_CHECK([tail -2 stderr | sed 's/^.*|WARN|//'], [0], [dnl
3742 set_field sctp_src lacks correct prerequisities
3743 ovs-ofctl: actions are invalid with specified match (OFPBAC_MATCH_INCONSISTENT)
3746 AT_CHECK([ovs-ofctl add-flow br0 "sctp,ip_frag=later actions=set_field:8888->sctp_dst,output:1"], [1], [], [stderr])
3747 AT_CHECK([tail -2 stderr | sed 's/^.*|WARN|//'], [0], [dnl
3748 set_field sctp_dst lacks correct prerequisities
3749 ovs-ofctl: actions are invalid with specified match (OFPBAC_MATCH_INCONSISTENT)
3752 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])
3753 AT_CHECK([tail -2 stderr | sed 's/^.*|WARN|//'], [0], [dnl
3754 source field tcp_dst lacks correct prerequisites
3755 ovs-ofctl: actions are invalid with specified match (OFPBAC_MATCH_INCONSISTENT)
3758 AT_DATA([flows.txt], [dnl
3759 priority=75 tcp actions=load:42->OXM_OF_TCP_SRC[[0..7]],output:1
3761 AT_CHECK([ovs-ofctl -O OpenFlow12 replace-flows br0 flows.txt])
3763 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
3767 AT_CHECK([ovs-ofctl set-frags br0 $mode])
3768 for frag in 4000 6000 6008 4010; do
3769 printf "\n%s\n" "----$mode $frag-----"
3771 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"])
3774 AT_CHECK([ovs-appctl dpctl/dump-flows | sed 's/used:[[0-9]].[[0-9]]*s/used:0.001s/'], [0], [dnl
3775 flow-dump from non-dpdk interfaces:
3776 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
3777 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
3778 recirc_id(0),in_port(90),eth_type(0x0800),ipv4(proto=6,frag=later), packets:1, bytes:74, used:0.001s, actions:1
3781 AT_CHECK([ovs-appctl revalidator/purge], [0])
3782 AT_CHECK([ovs-ofctl set-frags br0 $mode])
3783 for frag in 4000 6000 6008 4010; do
3784 printf "\n%s\n" "----$mode $frag truncated transport header -----"
3786 AT_CHECK([ovs-appctl netdev-dummy/receive p90 "0021853763af 0026b98cb0f9 0800 4500 0018 2e24 $frag 40 06 465d ac11370d ac11370b 828b 0016"])
3789 AT_CHECK([ovs-appctl dpctl/dump-flows | sed 's/used:[[0-9]].[[0-9]]*s/used:0.001s/'], [0], [dnl
3790 flow-dump from non-dpdk interfaces:
3791 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
3792 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
3793 recirc_id(0),in_port(90),eth_type(0x0800),ipv4(proto=6,frag=later), packets:1, bytes:60, used:0.001s, actions:1
3796 AT_CHECK([ovs-appctl revalidator/purge], [0])
3797 AT_CHECK([ovs-ofctl set-frags br0 $mode])
3798 for frag in 4000 6000 6001 4002; do
3799 printf "\n%s\n" "----$mode $frag missing transport header-----"
3801 AT_CHECK([ovs-appctl netdev-dummy/receive p90 "0021853763af 0026b98cb0f9 0800 4500 0014 2e24 $frag 40 06 465d ac11370d ac11370b"])
3804 AT_CHECK([ovs-appctl dpctl/dump-flows | sed 's/used:[[0-9]].[[0-9]]*s/used:0.001s/'], [0], [dnl
3805 flow-dump from non-dpdk interfaces:
3806 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
3807 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
3808 recirc_id(0),in_port(90),eth_type(0x0800),ipv4(proto=6,frag=later), packets:1, bytes:60, used:0.001s, actions:1
3814 AT_SETUP([ofproto-dpif - exit])
3816 ADD_OF_PORTS([br0], [1], [2], [3], [10], [11], [12], [13], [14])
3817 AT_DATA([flows.txt], [dnl
3818 in_port=1 actions=output:10,exit,output:11
3819 in_port=2 actions=output:12,resubmit:1,output:12
3820 in_port=3 actions=output:13,resubmit:2,output:14
3822 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
3823 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])
3824 AT_CHECK([tail -1 stdout], [0],
3825 [Datapath actions: 10
3827 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])
3828 AT_CHECK([tail -1 stdout], [0],
3829 [Datapath actions: 12,10
3831 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])
3832 AT_CHECK([tail -1 stdout], [0],
3833 [Datapath actions: 13,12,10
3839 AT_SETUP([ofproto-dpif - mirroring, select_all])
3841 ADD_OF_PORTS([br0], 1, 2, 3)
3843 set Bridge br0 mirrors=@m --\
3844 --id=@p3 get Port p3 --\
3845 --id=@m create Mirror name=mymirror select_all=true output_port=@p3
3847 AT_DATA([flows.txt], [dnl
3848 in_port=1 actions=output:2
3849 in_port=2 actions=output:1
3851 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
3853 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)"
3854 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
3855 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
3856 [Datapath actions: 2,3
3859 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)"
3860 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
3861 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
3862 [Datapath actions: 1,3
3869 AT_SETUP([ofproto-dpif - mirroring, select_src])
3871 ADD_OF_PORTS([br0], 1, 2, 3)
3873 set Bridge br0 mirrors=@m --\
3874 --id=@p1 get Port p1 -- --id=@p3 get Port p3 --\
3875 --id=@m create Mirror name=mymirror select_src_port=@p1 output_port=@p3
3877 AT_DATA([flows.txt], [dnl
3878 in_port=1 actions=output:2
3879 in_port=2 actions=output:1
3881 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
3883 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)"
3884 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
3885 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
3886 [Datapath actions: 2,3
3889 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)"
3890 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
3891 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
3892 [Datapath actions: 1
3897 AT_SETUP([ofproto-dpif - mirroring, OFPP_NONE ingress port])
3899 ADD_OF_PORTS([br0], 1, 2)
3901 set Bridge br0 mirrors=@m --\
3902 --id=@p2 get Port p2 --\
3903 --id=@m create Mirror name=mymirror select_all=true output_port=@p2
3905 AT_CHECK([ovs-ofctl add-flow br0 action=output:1])
3907 # "in_port" defaults to OFPP_NONE if it's not specified.
3908 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"
3909 AT_CHECK([ovs-appctl ofproto/trace br0 "$flow"], [0], [stdout])
3910 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
3911 [Datapath actions: 1,2
3918 AT_SETUP([ofproto-dpif - mirroring, select_dst])
3920 ADD_OF_PORTS([br0], 1, 2, 3)
3922 set Bridge br0 mirrors=@m --\
3923 --id=@p2 get Port p2 -- --id=@p3 get Port p3 --\
3924 --id=@m create Mirror name=mymirror select_dst_port=@p2 output_port=@p3
3926 AT_DATA([flows.txt], [dnl
3927 in_port=1 actions=output:2
3928 in_port=2 actions=output:1
3930 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
3932 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)"
3933 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
3934 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
3935 [Datapath actions: 2,3
3938 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)"
3939 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
3940 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
3941 [Datapath actions: 1
3948 AT_SETUP([ofproto-dpif - mirroring, select_vlan])
3950 ADD_OF_PORTS([br0], 1, 2, 3)
3952 set Bridge br0 mirrors=@m --\
3953 --id=@p2 get Port p2 -- --id=@p3 get Port p3 --\
3954 --id=@m create Mirror name=mymirror select_all=true select_vlan=11 output_port=@p3
3956 AT_DATA([flows.txt], [dnl
3957 in_port=1, actions=output:2
3959 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
3961 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)"
3962 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
3963 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
3964 [Datapath actions: 2
3967 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))"
3968 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
3969 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
3970 [Datapath actions: 2
3973 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))"
3974 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
3975 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
3976 [Datapath actions: 2,3
3983 AT_SETUP([ofproto-dpif - mirroring, output_port])
3985 ADD_OF_PORTS([br0], 1, 2, 3)
3987 set Bridge br0 mirrors=@m --\
3988 --id=@p3 get Port p3 --\
3989 --id=@m create Mirror name=mymirror select_all=true output_port=@p3
3991 AT_DATA([flows.txt], [dnl
3992 in_port=1 actions=mod_vlan_vid:17,output:2
3993 in_port=2 actions=output:1
3995 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
3997 flow="in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)"
3998 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
3999 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
4000 [Datapath actions: push_vlan(vid=17,pcp=0),2,pop_vlan,3
4003 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)"
4004 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
4005 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
4006 [Datapath actions: 1,3
4012 AT_SETUP([ofproto-dpif - mirroring, output_vlan])
4014 ADD_OF_PORTS([br0], 1, 2)
4016 set Bridge br0 mirrors=@m --\
4017 --id=@m create Mirror name=mymirror select_all=true output_vlan=12
4019 AT_DATA([flows.txt], [dnl
4020 in_port=1 actions=output:2
4021 in_port=2 actions=mod_vlan_vid:17,output:1
4023 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
4025 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)"
4026 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
4027 actual=`tail -1 stdout | sed 's/Datapath actions: //'`
4029 expected="2,push_vlan(vid=12,pcp=0),1,2,100"
4030 AT_CHECK([ovs-dpctl normalize-actions "$flow" "$expected"], [0], [stdout])
4032 AT_CHECK([ovs-dpctl normalize-actions "$flow" "$actual"], [0], [expout])
4034 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)"
4035 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
4036 actual=`tail -1 stdout | sed 's/Datapath actions: //'`
4038 expected="push_vlan(vid=17,pcp=0),1,pop_vlan,push_vlan(vid=12,pcp=0),1,2,100"
4039 AT_CHECK([ovs-dpctl normalize-actions "$flow" "$expected"], [0], [stdout])
4041 AT_CHECK([ovs-dpctl normalize-actions "$flow" "$actual"], [0], [expout])
4046 # Two testcases below are for the ofproto/trace command
4047 # The first one tests all correct syntax:
4048 # ofproto/trace [dp_name] odp_flow [-generate|packet]
4049 # ofproto/trace br_name br_flow [-generate|packet]
4050 AT_SETUP([ofproto-dpif - ofproto/trace command 1])
4051 OVS_VSWITCHD_START([set bridge br0 fail-mode=standalone])
4052 ADD_OF_PORTS([br0], 1, 2, 3)
4054 AT_DATA([flows.txt], [dnl
4055 in_port=1 actions=output:2
4056 in_port=2 actions=output:1
4058 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
4060 odp_flow="in_port(1)"
4062 # Test command: ofproto/trace odp_flow with in_port as a name.
4063 AT_CHECK([ovs-appctl ofproto/trace "$odp_flow"], [0], [stdout])
4064 AT_CHECK([tail -1 stdout], [0], [dnl
4068 odp_flow="in_port(1)"
4069 # Test command: ofproto/trace odp_flow
4070 AT_CHECK([ovs-appctl ofproto/trace "$odp_flow"], [0], [stdout])
4071 AT_CHECK([tail -1 stdout], [0], [dnl
4075 # Test command: ofproto/trace dp_name odp_flow
4076 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$odp_flow"], [0], [stdout])
4077 AT_CHECK([tail -1 stdout], [0], [dnl
4080 # Test commmand: ofproto/trace br_name br_flow
4081 AT_CHECK([ovs-appctl ofproto/trace br0 "$br_flow"], [0], [stdout])
4082 AT_CHECK([tail -1 stdout], [0], [dnl
4086 # Delete the inserted flows
4087 AT_CHECK([ovs-ofctl del-flows br0 "in_port=1"], [0], [stdout])
4088 AT_CHECK([ovs-ofctl del-flows br0 "in_port=2"], [0], [stdout])
4090 # This section below tests the [-generate] option
4091 odp_flow="in_port(3),eth(src=50:54:00:00:00:05,dst=ff:ff:ff:ff:ff:ff)"
4092 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"
4094 # Test command: ofproto/trace odp_flow
4095 AT_CHECK([ovs-appctl ofproto/trace "$odp_flow"], [0], [stdout])
4096 # Check for no MAC learning entry
4097 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
4101 # Test command: ofproto/trace br_name br_flow
4102 AT_CHECK([ovs-appctl ofproto/trace br0 "$br_flow"], [0], [stdout])
4103 # Check for no MAC learning entry
4104 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
4108 # Test command: ofproto/trace odp_flow -generate
4109 AT_CHECK([ovs-appctl ofproto/trace "$odp_flow" -generate], [0], [stdout])
4110 # Check for the MAC learning entry
4111 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
4113 3 0 50:54:00:00:00:05 ?
4116 # Test command: ofproto/trace dp_name odp_flow -generate
4117 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy \
4118 "in_port(1),eth(src=50:54:00:00:00:06,dst=50:54:00:00:00:05)" \
4119 -generate], [0], [stdout])
4120 # Check for both MAC learning entries
4121 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
4123 3 0 50:54:00:00:00:05 ?
4124 1 0 50:54:00:00:00:06 ?
4127 # Test command: ofproto/trace br_name br_flow -generate
4128 AT_CHECK([ovs-appctl ofproto/trace br0 \
4129 "in_port=2,dl_src=50:54:00:00:00:07,dl_dst=50:54:00:00:00:06" \
4130 -generate], [0], [stdout])
4131 # Check for both MAC learning entries.
4132 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
4134 3 0 50:54:00:00:00:05 ?
4135 1 0 50:54:00:00:00:06 ?
4136 2 0 50:54:00:00:00:07 ?
4139 # This section beflow tests the [packet] option
4140 # The ovs-tcpundump of packets between port1 and port2
4141 pkt1to2="50540000000250540000000108064500001C000100004001F98CC0A80001C0A800020800F7FF00000000"
4142 pkt2to1="50540000000150540000000208064500001C000100004001F98CC0A80002C0A800010800F7FF00000000"
4144 # Construct the MAC learning table
4145 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy \
4146 "in_port(1),eth(src=50:54:00:00:00:01,dst=ff:ff:ff:ff:ff:ff)" \
4147 -generate], [0], [stdout])
4149 # Construct the MAC learning table
4150 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy \
4151 "in_port(2),eth(src=50:54:00:00:00:02,dst=ff:ff:ff:ff:ff:ff)" \
4152 -generate], [0], [stdout])
4154 # Test command: ofproto/trace odp_flow packet
4155 AT_CHECK([ovs-appctl ofproto/trace \
4156 "in_port(1),skb_priority(1),skb_mark(2)" "$pkt1to2"], [0], [stdout])
4157 AT_CHECK([tail -1 stdout], [0], [dnl
4160 AT_CHECK([head -n 2 stdout], [0], [dnl
4162 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
4165 # Test command: ofproto/trace dp_name odp_flow packet
4166 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy \
4167 "in_port(1),skb_priority(1),skb_mark(2)" "$pkt1to2"], [0], [stdout])
4168 AT_CHECK([tail -1 stdout], [0], [dnl
4171 AT_CHECK([head -n 2 stdout], [0], [dnl
4173 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
4176 # Test command: ofproto/trace br_name br_flow packet
4177 AT_CHECK([ovs-appctl ofproto/trace br0 \
4178 "in_port=2,skb_priority=2,pkt_mark=1" "$pkt2to1"], [0], [stdout],[stderr])
4179 AT_CHECK([tail -1 stdout], [0], [dnl
4182 AT_CHECK([head -n 2 stdout], [0], [dnl
4184 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
4190 # The second test tests the corner cases
4191 AT_SETUP([ofproto-dpif - ofproto/trace command 2])
4193 ADD_OF_PORTS([br0], 1, 2)
4196 odp_flow="in_port(1),eth(src=50:54:00:00:00:01,dst=50:54:00:00:00:02)"
4197 br_flow="in_port=1,dl_src=50:54:00:00:00:01,dl_dst=50:54:00:00:00:02"
4199 generate="-generate"
4200 pkt="50540000000250540000000108064500001C000100004001F98CC0A80001C0A800020800F7FF00000000"
4202 # Test incorrect command: ofproto/trace wrong_name odp_flow [-generate|packet]
4208 [AT_CHECK([ovs-appctl ofproto/trace wrong_name "$odp_flow" option],
4210 AT_CHECK([tail -2 stderr], [0], [dnl
4211 Cannot find the datapath
4212 ovs-appctl: ovs-vswitchd: server returned an error
4215 # Test incorrect command: ofproto/trace empty_string odp_flow [-generate|packet]
4221 [AT_CHECK([ovs-appctl ofproto/trace "" "$odp_flow" option],
4223 AT_CHECK([tail -2 stderr], [0], [dnl
4224 Cannot find the datapath
4225 ovs-appctl: ovs-vswitchd: server returned an error
4228 # Test incorrect command: ofproto/trace nonexist_dp_name odp_flow [-generate|packet]
4234 [AT_CHECK([ovs-appctl ofproto/trace ovs-system "$odp_flow" option],
4236 AT_CHECK([tail -2 stderr], [0], [dnl
4237 Cannot find the datapath
4238 ovs-appctl: ovs-vswitchd: server returned an error
4241 # Test incorrect command: ofproto/trace br_name odp_flow [-generate|packet]
4247 [AT_CHECK([ovs-appctl ofproto/trace br0 "$odp_flow" option],
4249 AT_CHECK([tail -2 stderr], [0], [dnl
4250 Cannot find the datapath
4251 ovs-appctl: ovs-vswitchd: server returned an error
4254 # Test incorrect command: ofproto/trace dp_name br_flow [-generate|packet]
4260 [AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$br_flow" option],
4262 AT_CHECK([tail -2 stderr], [0], [dnl
4264 ovs-appctl: ovs-vswitchd: server returned an error
4267 # Test incorrect command: ofproto/trace br_flow [-generate|packet]
4273 [AT_CHECK([ovs-appctl ofproto/trace "$br_flow" option],
4275 AT_CHECK([tail -2 stderr], [0], [dnl
4276 Must specify bridge name
4277 ovs-appctl: ovs-vswitchd: server returned an error
4280 # Test incorrect command: ofproto/trace dp_name odp_flow garbage_option
4281 AT_CHECK([ovs-appctl ofproto/trace \
4282 ovs-dummy "$odp_flow" garbage_option],
4283 [2], [stdout],[stderr])
4284 AT_CHECK([tail -2 stderr], [0], [dnl
4285 Trailing garbage in packet data
4286 ovs-appctl: ovs-vswitchd: server returned an error
4289 # Test incorrect command: ofproto/trace with 4 arguments
4290 AT_CHECK([ovs-appctl ofproto/trace \
4291 arg1, arg2, arg3, arg4], [2], [stdout],[stderr])
4292 AT_CHECK([tail -2 stderr], [0], [dnl
4293 "ofproto/trace" command takes at most 3 arguments
4294 ovs-appctl: ovs-vswitchd: server returned an error
4297 # Test incorrect command: ofproto/trace with 0 argument
4298 AT_CHECK([ovs-appctl ofproto/trace ], [2], [stdout],[stderr])
4299 AT_CHECK([tail -2 stderr], [0], [dnl
4300 "ofproto/trace" command requires at least 1 arguments
4301 ovs-appctl: ovs-vswitchd: server returned an error
4307 AT_SETUP([ofproto-dpif - ofproto/trace-packet-out])
4309 ADD_OF_PORTS([br0], 1, 2, 3)
4311 AT_DATA([flows.txt], [dnl
4312 in_port=1 actions=output:2
4313 in_port=2 actions=output:1
4315 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
4317 AT_CHECK([ovs-appctl ofproto/trace-packet-out br0 in_port=1 'mod_vlan_vid:123,resubmit(,0)'], [0], [stdout])
4318 AT_CHECK([tail -1 stdout], [0], [dnl
4319 Datapath actions: push_vlan(vid=123,pcp=0),2
4326 m4_define([OFPROTO_TRACE],
4328 AT_CHECK([ovs-appctl ofproto/trace $1 "$flow" $3], [0], [stdout])
4329 actual=`tail -1 stdout | sed 's/Datapath actions: //'`
4331 AT_CHECK([ovs-dpctl normalize-actions "$flow" "$expected" $5],
4334 AT_CHECK([ovs-dpctl normalize-actions "$flow" "$actual" $5],
4337 AT_SETUP([ofproto-dpif - MAC learning])
4338 OVS_VSWITCHD_START([set bridge br0 fail-mode=standalone])
4339 ADD_OF_PORTS([br0], 1, 2, 3)
4341 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)'
4343 # Trace an ARP packet arriving on p3, to create a MAC learning entry.
4346 [in_port(3),eth(src=50:54:00:00:00:05,dst=ff:ff:ff:ff:ff:ff),$arp],
4350 # Check for the MAC learning entry.
4351 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
4353 3 0 50:54:00:00:00:05 ?
4356 # Trace a packet arrival destined for the learned MAC.
4357 # (This will also learn a MAC.)
4360 [in_port(1),eth(src=50:54:00:00:00:06,dst=50:54:00:00:00:05),$arp],
4364 # Check for both MAC learning entries.
4365 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
4367 3 0 50:54:00:00:00:05 ?
4368 1 0 50:54:00:00:00:06 ?
4371 # Trace a packet arrival that updates the first learned MAC entry.
4374 [in_port(2),eth(src=50:54:00:00:00:05,dst=ff:ff:ff:ff:ff:ff),$arp],
4378 # Check that the MAC learning entry was updated.
4379 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
4381 1 0 50:54:00:00:00:06 ?
4382 2 0 50:54:00:00:00:05 ?
4385 # Add another bridge.
4389 -- set bridge br1 datapath-type=dummy])
4390 ADD_OF_PORTS([br1], 4, 5)
4392 # Trace some packet arrivals in br1 to create MAC learning entries there too.
4395 [in_port(4),eth(src=50:54:00:00:00:06,dst=ff:ff:ff:ff:ff:ff),$arp],
4400 [in_port(5),eth(src=50:54:00:00:00:07,dst=ff:ff:ff:ff:ff:ff),$arp],
4404 # Check that the MAC learning entries were added.
4405 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br1 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
4407 4 0 50:54:00:00:00:06 ?
4408 5 0 50:54:00:00:00:07 ?
4411 # Delete port p1 and see that its MAC learning entry disappeared, and
4412 # that the MAC learning entry for the same MAC was also deleted from br1.
4413 AT_CHECK([ovs-vsctl del-port p1])
4414 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
4416 2 0 50:54:00:00:00:05 ?
4418 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br1 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
4420 5 0 50:54:00:00:00:07 ?
4426 AT_SETUP([ofproto-dpif - MAC table overflow])
4428 [set bridge br0 fail-mode=standalone other-config:mac-table-size=10])
4429 ADD_OF_PORTS([br0], 1, 2, 3)
4431 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)'
4433 AT_CHECK([ovs-appctl time/stop])
4435 # Trace 10 ARP packets arriving on p3, to create MAC learning entries.
4436 for i in 0 1 2 3 4 5 6 7 8 9; do
4439 [in_port(3),eth(src=50:54:00:00:00:0$i,dst=ff:ff:ff:ff:ff:ff),$arp],
4442 ovs-appctl time/warp 1000
4445 # Check for the MAC learning entries.
4446 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/ *[[0-9]]\{1,\}$//' | sort],
4448 3 0 50:54:00:00:00:00
4449 3 0 50:54:00:00:00:01
4450 3 0 50:54:00:00:00:02
4451 3 0 50:54:00:00:00:03
4452 3 0 50:54:00:00:00:04
4453 3 0 50:54:00:00:00:05
4454 3 0 50:54:00:00:00:06
4455 3 0 50:54:00:00:00:07
4456 3 0 50:54:00:00:00:08
4457 3 0 50:54:00:00:00:09
4461 # Trace another ARP packet on another MAC.
4464 [in_port(3),eth(src=50:54:00:00:00:10,dst=ff:ff:ff:ff:ff:ff),$arp],
4468 # Check that the new one chased the oldest one out of the table.
4469 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/' | sort],
4471 3 0 50:54:00:00:00:01 ?
4472 3 0 50:54:00:00:00:02 ?
4473 3 0 50:54:00:00:00:03 ?
4474 3 0 50:54:00:00:00:04 ?
4475 3 0 50:54:00:00:00:05 ?
4476 3 0 50:54:00:00:00:06 ?
4477 3 0 50:54:00:00:00:07 ?
4478 3 0 50:54:00:00:00:08 ?
4479 3 0 50:54:00:00:00:09 ?
4480 3 0 50:54:00:00:00:10 ?
4486 # CHECK_SFLOW_SAMPLING_PACKET(LOOPBACK_ADDR, ADDR_WITHOUT_BRACKETS)
4488 # Test that sFlow samples packets correctly using IPv4/IPv6 sFlow collector
4490 # IP_VERSION_TYPE is used in AT_SETUP
4491 m4_define([CHECK_SFLOW_SAMPLING_PACKET],
4492 [AT_SETUP([ofproto-dpif - sFlow packet sampling - $2 collector])
4493 AT_XFAIL_IF([test "$IS_WIN32" = "yes"])
4494 OVS_VSWITCHD_START([set Bridge br0 fail-mode=standalone])
4496 ON_EXIT([kill `cat test-sflow.pid`])
4497 AT_CHECK([ovstest test-sflow --log-file --detach --no-chdir --pidfile 0:$1 > sflow.log], [0], [], [ignore])
4498 AT_CAPTURE_FILE([sflow.log])
4499 SFLOW_PORT=`parse_listening_port < test-sflow.log`
4500 ovs-appctl time/stop
4502 ADD_OF_PORTS([br0], 1, 2)
4504 set Interface br0 options:ifindex=1002 -- \
4505 set Interface p1 options:ifindex=1004 -- \
4506 set Interface p2 options:ifindex=1003 -- \
4507 set Bridge br0 sflow=@sf -- \
4508 --id=@sf create sflow targets=\"$1:$SFLOW_PORT\" \
4509 header=128 sampling=1 polling=1 agent=$LOOPBACK_INTERFACE
4511 dnl open with ARP packets to seed the bridge-learning. The output
4512 dnl ifIndex numbers should be reported predictably after that.
4513 dnl Since we set sampling=1 we should see all of these packets
4514 dnl reported. Sorting the output by data-source and seqNo makes
4515 dnl it deterministic. Ensuring that we send at least two packets
4516 dnl into each port means we get to check the seq nos are
4517 dnl incrementing correctly.
4518 dnl because packets from different ports can be handled by separate
4519 dnl threads, put some sleeps
4521 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)'
4523 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)'
4525 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)'
4527 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)'
4528 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)'
4530 dnl sleep long enough to get more than one counter sample
4531 dnl from each datasource so we can check sequence numbers
4532 ovs-appctl time/warp 3000 100
4534 ovs-appctl -t test-sflow exit
4536 AT_CHECK_UNQUOTED([[sort sflow.log | $EGREP 'HEADER|ERROR' | sed 's/ /\
4557 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
4577 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
4597 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
4617 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
4637 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
4640 AT_CHECK_UNQUOTED([[sort sflow.log | $EGREP 'IFCOUNTERS|ERROR|PORTNAME|OPENFLOWPORT' | head -18 | sed 's/ /\
4654 in_broadcasts=4294967295
4657 in_unknownprotos=4294967295
4660 out_multicasts=4294967295
4661 out_broadcasts=4294967295
4677 in_broadcasts=4294967295
4680 in_unknownprotos=4294967295
4683 out_multicasts=4294967295
4684 out_broadcasts=4294967295
4700 in_broadcasts=4294967295
4703 in_unknownprotos=4294967295
4706 out_multicasts=4294967295
4707 out_broadcasts=4294967295
4723 in_broadcasts=4294967295
4726 in_unknownprotos=4294967295
4729 out_multicasts=4294967295
4730 out_broadcasts=4294967295
4746 in_broadcasts=4294967295
4749 in_unknownprotos=4294967295
4752 out_multicasts=4294967295
4753 out_broadcasts=4294967295
4769 in_broadcasts=4294967295
4772 in_unknownprotos=4294967295
4775 out_multicasts=4294967295
4776 out_broadcasts=4294967295
4781 datapath_id=18364758544493064720
4784 datapath_id=18364758544493064720
4787 datapath_id=18364758544493064720
4790 datapath_id=18364758544493064720
4793 datapath_id=18364758544493064720
4796 datapath_id=18364758544493064720
4813 CHECK_SFLOW_SAMPLING_PACKET([127.0.0.1], [IPv4])
4814 CHECK_SFLOW_SAMPLING_PACKET([[[::1]]], [IPv6])
4816 dnl Test sFlow LAG structures
4817 AT_SETUP([ofproto-dpif - sFlow LACP structures])
4818 AT_SKIP_IF([test "$IS_WIN32" = "yes"])
4819 OVS_VSWITCHD_START([dnl
4820 add-bond br0 bond p1 p2 -- \
4821 set Port bond lacp=active bond-mode=active-backup \
4822 other_config:lacp-time="fast" \
4823 other_config:lacp-system-id=11:22:33:44:55:66 \
4824 other_config:lacp-system-priority=54321 -- \
4825 set Interface p1 type=dummy \
4826 other_config:lacp-port-id=11 \
4827 other_config:lacp-port-priority=111 \
4828 other_config:lacp-aggregation-key=3333 -- \
4829 set Interface p2 type=dummy \
4830 other_config:lacp-port-id=22 \
4831 other_config:lacp-port-priority=222 \
4832 other_config:lacp-aggregation-key=3333 ])
4834 ON_EXIT([kill `cat test-sflow.pid`])
4835 AT_CHECK([ovstest test-sflow --log-file --detach --no-chdir --pidfile 0:127.0.0.1 > sflow.log], [0], [], [ignore])
4836 AT_CAPTURE_FILE([sflow.log])
4837 SFLOW_PORT=`parse_listening_port < test-sflow.log`
4839 ovs-appctl time/stop
4842 set Interface p1 options:ifindex=1003 -- \
4843 set Bridge br0 sflow=@sf -- \
4844 --id=@sf create sflow targets=\"127.0.0.1:$SFLOW_PORT\" \
4845 header=128 sampling=1 polling=1
4847 dnl sleep long enough to get the sFlow datagram flushed out (may be delayed for up to 1 second)
4848 AT_CHECK([ovs-appctl time/warp 2000 100], [0], [ignore])
4849 AT_CHECK([ovs-appctl revalidator/purge], [0])
4851 ovs-appctl -t test-sflow exit
4852 AT_CHECK([[sort sflow.log | $EGREP 'LACPCOUNTERS|ERROR' | head -n 1 | sed 's/ /\
4855 sysID=11:22:33:44:55:66
4856 partnerID=00:00:00:00:00:00
4863 markerPDUsRx=4294967295
4864 markerRespPDUsRx=4294967295
4865 unknownRx=4294967295
4868 markerPDUsTx=4294967295
4869 markerRespPDUsTx=4294967295
4874 # CHECK_NETFLOW_EXPIRATION(LOOPBACK_ADDR, IP_VERSION_TYPE)
4876 # Test that basic NetFlow reports flow statistics correctly:
4877 # The initial packet of a flow are correctly accounted.
4878 # Later packets within a flow are correctly accounted.
4879 # Flow actions changing (in this case, due to MAC learning)
4880 # cause a record to be sent.
4882 # IP_VERSION_TYPE is used in AT_SETUP
4883 m4_define([CHECK_NETFLOW_EXPIRATION],
4884 [AT_SETUP([ofproto-dpif - NetFlow flow expiration - $2 collector])
4885 OVS_VSWITCHD_START([set Bridge br0 fail-mode=standalone])
4886 ADD_OF_PORTS([br0], 1, 2)
4888 ovs-appctl time/stop
4889 ON_EXIT([kill `cat test-netflow.pid`])
4890 AT_CHECK([ovstest test-netflow --log-file --detach --no-chdir --pidfile 0:$1 > netflow.log], [0], [], [ignore])
4891 AT_CAPTURE_FILE([netflow.log])
4892 NETFLOW_PORT=`parse_listening_port < test-netflow.log`
4895 set Bridge br0 netflow=@nf -- \
4896 --id=@nf create NetFlow targets=\"$1:$NETFLOW_PORT\" \
4897 engine_id=1 engine_type=2 active_timeout=30 add-id-to-interface=false
4899 for delay in 1000 30000; do
4900 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)'
4901 sleep 1 # ensure the order in which these two packets are processed
4902 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)'
4904 ovs-appctl time/warp $delay
4907 ovs-appctl time/warp 6000
4908 ovs-appctl revalidator/wait
4910 ovs-appctl -t test-netflow exit
4912 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])
4914 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])
4916 combined=`grep "192.168.0.2 > 192.168.0.1, if 2 > 1, 2 pkts, 120 bytes, ICMP 0:0" netflow.log | wc -l`
4917 separate=`grep "192.168.0.2 > 192.168.0.1, if 2 > 1, 1 pkts, 60 bytes, ICMP 0:0" netflow.log | wc -l`
4918 AT_CHECK([test $separate = 2 || test $combined = 1], [0])
4922 CHECK_NETFLOW_EXPIRATION([127.0.0.1], [IPv4])
4923 CHECK_NETFLOW_EXPIRATION([[[::1]]], [IPv6])
4925 # CHECK_NETFLOW_ACTIVE_EXPIRATION(LOOPBACK_ADDR, IP_VERSION_TYPE)
4927 # Test that basic NetFlow reports active expirations correctly.
4929 # IP_VERSION_TYPE is used in AT_SETUP
4930 m4_define([CHECK_NETFLOW_ACTIVE_EXPIRATION],
4931 [AT_SETUP([ofproto-dpif - NetFlow active expiration - $2 collector])
4933 OVS_VSWITCHD_START([set Bridge br0 fail-mode=standalone])
4934 ADD_OF_PORTS([br0], 1, 2)
4936 ON_EXIT([kill `cat test-netflow.pid`])
4937 AT_CHECK([ovstest test-netflow --log-file --detach --no-chdir --pidfile 0:$1 > netflow.log], [0], [], [ignore])
4938 AT_CAPTURE_FILE([netflow.log])
4939 NETFLOW_PORT=`parse_listening_port < test-netflow.log`
4942 set Bridge br0 netflow=@nf -- \
4943 --id=@nf create NetFlow targets=\"$1:$NETFLOW_PORT\" \
4944 engine_id=1 engine_type=2 active_timeout=10 add-id-to-interface=false
4946 AT_CHECK([ovs-appctl time/stop])
4948 while test $n -le 60; do
4951 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)'
4952 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)'
4954 ovs-appctl time/warp 1000
4957 ovs-appctl time/warp 10000
4959 ovs-appctl revalidator/wait
4961 ovs-appctl -t test-netflow exit
4963 # Count the number of reported packets:
4964 # - From source to destination before MAC learning kicks in (just one).
4965 # - From source to destination after that.
4966 # - From destination to source.
4974 pkts=`echo "$line" | sed 's/.*, \([[0-9]]*\) pkts,.*/\1/'`
4981 "seq "*": 192.168.0.1 > 192.168.0.2, if 1 > 65535, "*" pkts, "*" bytes, TCP 1234 > 80, time "*)
4984 "seq "*": 192.168.0.1 > 192.168.0.2, if 1 > 2, "*" pkts, "*" bytes, TCP 1234 > 80, time "*)
4987 "seq "*": 192.168.0.2 > 192.168.0.1, if 2 > 1, "*" pkts, "*" bytes, TCP 80 > 1234, time "*)
4994 eval $counter=\`expr \$$counter + \$pkts\`
4995 n_recs=`expr $n_recs + 1`
4998 # There should be exactly 1 MAC learning packet,
4999 # exactly 59 other packets in that direction,
5000 # and exactly 60 packets in the other direction.
5001 AT_CHECK([echo $n_learn $n_in $n_out $n_other], [0], [1 59 60 0
5006 CHECK_NETFLOW_ACTIVE_EXPIRATION([127.0.0.1], [IPv4])
5007 CHECK_NETFLOW_ACTIVE_EXPIRATION([[[::1]]], [IPv6])
5009 AT_SETUP([ofproto-dpif - flow stats])
5011 AT_CHECK([ovs-ofctl add-flow br0 "ip,actions=NORMAL"])
5012 AT_CHECK([ovs-ofctl add-flow br0 "icmp,actions=NORMAL"])
5014 ovs-appctl time/stop
5016 for i in `seq 1 10`; do
5017 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)'
5020 AT_CHECK([ovs-appctl time/warp 1000], [0], [ignore])
5021 AT_CHECK([ovs-appctl revalidator/purge], [0])
5022 AT_CHECK([ovs-ofctl dump-flows br0], [0], [stdout])
5023 AT_CHECK([STRIP_XIDS stdout | sed -n 's/duration=[[0-9]]*\.[[0-9]]*s/duration=0.0s/p' | sort], [0], [dnl
5024 cookie=0x0, duration=0.0s, table=0, n_packets=0, n_bytes=0, idle_age=1, icmp actions=NORMAL
5025 cookie=0x0, duration=0.0s, table=0, n_packets=10, n_bytes=600, idle_age=1, ip actions=NORMAL
5030 AT_SETUP([ofproto-dpif - flow stats, set-n-threads])
5032 AT_CHECK([ovs-ofctl add-flow br0 "ip,actions=NORMAL"])
5033 AT_CHECK([ovs-ofctl add-flow br0 "icmp,actions=NORMAL"])
5035 ovs-appctl time/stop
5037 for i in `seq 1 10`; do
5038 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)'
5041 ovs-appctl time/warp 100
5042 AT_CHECK([ovs-vsctl set Open_vSwitch . other-config:n-revalidator-threads=2])
5043 ovs-appctl time/warp 1000
5045 AT_CHECK([ovs-ofctl dump-flows br0], [0], [stdout])
5046 AT_CHECK([STRIP_XIDS stdout | sed -n 's/duration=[[0-9]]*\.[[0-9]]*s/duration=0.0s/p' | sort], [0], [dnl
5047 cookie=0x0, duration=0.0s, table=0, n_packets=0, n_bytes=0, idle_age=1, icmp actions=NORMAL
5048 cookie=0x0, duration=0.0s, table=0, n_packets=10, n_bytes=600, idle_age=1, ip actions=NORMAL
5053 AT_SETUP([idle_age and hard_age increase over time])
5056 # get_ages DURATION HARD IDLE
5058 # Fetch the flow duration, hard age, and idle age into the variables
5059 # whose names are given as arguments. Rounds DURATION down to the
5060 # nearest integer. If hard_age doesn't appear in the output, sets
5061 # HARD to "none". If idle_age doesn't appear in the output, sets IDLE
5064 AT_CHECK([ovs-ofctl dump-flows br0], [0], [stdout])
5066 duration=`sed -n 's/.*duration=\([[0-9]]*\)\(\.[[0-9]]*\)\{0,1\}s.*/\1/p' stdout`
5067 AT_CHECK([[expr X"$duration" : 'X[0-9][0-9]*$']], [0], [ignore])
5068 AS_VAR_COPY([$1], [duration])
5070 hard=`sed -n 's/.*hard_age=\([[0-9]]*\),.*/\1/p' stdout`
5071 if test X"$hard" = X; then
5074 AT_CHECK([[expr X"$hard" : 'X[0-9][0-9]*$']], [0], [ignore])
5076 AS_VAR_COPY([$2], [hard])
5078 idle=`sed -n 's/.*idle_age=\([[0-9]]*\),.*/\1/p' stdout`
5079 if test X"$idle" = X; then
5082 AT_CHECK([[expr X"$idle" : 'X[0-9][0-9]*$']], [0], [ignore])
5084 AS_VAR_COPY([$3], [idle])
5087 # Add a flow and get its initial hard and idle age.
5088 AT_CHECK([ovs-ofctl add-flow br0 hard_timeout=199,idle_timeout=188,actions=drop])
5089 get_ages duration1 hard1 idle1
5091 ovs-appctl time/stop
5092 # Warp time forward by 10 seconds, then modify the flow's actions.
5093 ovs-appctl time/warp 10000
5094 get_ages duration2 hard2 idle2
5095 AT_CHECK([ovs-ofctl mod-flows br0 actions=flood])
5097 # Warp time forward by 10 seconds.
5098 ovs-appctl time/warp 10000
5099 get_ages duration3 hard3 idle3
5101 # Warp time forward 10 more seconds, then pass some packets through the flow,
5102 # then warp forward a few more times because idle times are only updated
5104 ovs-appctl time/warp 10000
5105 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)'
5106 ovs-appctl time/warp 3000 1000
5108 get_ages duration4 hard4 idle4
5110 printf "duration: %4s => %4s => %4s => %4s\n" $duration1 $duration2 $duration3 $duration4
5111 printf "hard_age: %4s => %4s => %4s => %4s\n" $hard1 $hard2 $hard3 $hard4
5112 printf "idle_age: %4s => %4s => %4s => %4s\n" $idle1 $idle2 $idle3 $idle4
5114 # Duration should increase steadily over time.
5115 AT_CHECK([test $duration1 -lt $duration2])
5116 AT_CHECK([test $duration2 -lt $duration3])
5117 AT_CHECK([test $duration3 -lt $duration4])
5119 # Hard age should be "none" initially because it's the same as flow_duration,
5120 # then it should increase.
5121 AT_CHECK([test $hard1 = none])
5122 AT_CHECK([test $hard2 = none])
5123 AT_CHECK([test $hard3 != none])
5124 AT_CHECK([test $hard4 != none])
5125 AT_CHECK([test $hard3 -lt $hard4])
5127 # Idle age should increase from 1 to 2 to 3, then decrease.
5128 AT_CHECK([test $idle1 -lt $idle2])
5129 AT_CHECK([test $idle2 -lt $idle3])
5130 AT_CHECK([test $idle3 -gt $idle4])
5132 # Check some invariant relationships.
5133 AT_CHECK([test $duration1 = $idle1])
5134 AT_CHECK([test $duration2 = $idle2])
5135 AT_CHECK([test $duration3 = $idle3])
5136 AT_CHECK([test $idle3 -gt $hard3])
5137 AT_CHECK([test $idle4 -lt $hard4])
5138 AT_CHECK([test $hard4 -lt $duration4])
5143 AT_SETUP([ofproto-dpif - fin_timeout])
5145 ovs-appctl time/stop
5146 AT_CHECK([ovs-ofctl add-flow br0 'idle_timeout=60,actions=fin_timeout(idle_timeout=5)'])
5147 AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip], [0],
5149 idle_timeout=60, actions=fin_timeout(idle_timeout=5)
5152 # Check that a TCP SYN packet does not change the timeout. (Because
5153 # flow stats updates are mainly what implements the fin_timeout
5154 # feature, we warp forward a couple of times to ensure that flow stats
5155 # run before re-checking the flow table.)
5156 AT_CHECK([ovs-appctl netdev-dummy/receive br0 0021853763af0026b98cb0f908004500003c2e2440004006465dac11370dac11370b828b0016751e267b00000000a00216d017360000020405b40402080a2d25085f0000000001030307])
5157 AT_CHECK([ovs-appctl time/warp 1000 && ovs-appctl time/warp 1000], [0], [warped
5160 AT_CHECK([ovs-appctl revalidator/purge], [0])
5161 AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip], [0],
5163 n_packets=1, n_bytes=74, idle_timeout=60, actions=fin_timeout(idle_timeout=5)
5165 # Check that a TCP FIN packet does change the timeout.
5166 AT_CHECK([ovs-appctl netdev-dummy/receive br0 0021853763af0026b98cb0f90800451000342e3e40004006463bac11370dac11370b828b0016751e319dfc96399b801100717ae800000101080a2d250a9408579588])
5167 AT_CHECK([ovs-appctl time/warp 1000 && ovs-appctl time/warp 1000], [0], [warped
5170 AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip], [0],
5172 n_packets=2, n_bytes=140, idle_timeout=5, actions=fin_timeout(idle_timeout=5)
5177 AT_SETUP([ofproto-dpif - ovs-appctl dpif/dump-dps])
5178 OVS_VSWITCHD_START([add-br br1 -- set bridge br1 datapath-type=dummy])
5179 ADD_OF_PORTS([br0], [1], [2])
5180 ADD_OF_PORTS([br1], [3])
5182 AT_CHECK([ovs-appctl dpif/dump-dps], [0], [dnl
5189 AT_SETUP([ofproto-dpif - ovs-appctl dpif/show])
5190 OVS_VSWITCHD_START([add-br br1 -- set bridge br1 datapath-type=dummy])
5191 ADD_OF_PORTS([br0], [1], [2])
5192 ADD_OF_PORTS([br1], [3])
5194 AT_CHECK([ovs-appctl dpif/show], [0], [dnl
5195 dummy@ovs-dummy: hit:0 missed:0
5197 br0 65534/100: (dummy)
5201 br1 65534/101: (dummy)
5207 AT_SETUP([ofproto-dpif - ovs-appctl dpif/dump-flows])
5208 # bump max-idle to avoid the flows being reclaimed behind us
5209 OVS_VSWITCHD_START([add-br br1 -- \
5210 set bridge br1 datapath-type=dummy fail-mode=secure -- \
5211 set Open_vSwitch . other_config:max-idle=10000])
5212 ADD_OF_PORTS([br0], [1], [2])
5213 ADD_OF_PORTS([br1], [3])
5215 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)'])
5216 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)'])
5217 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)'])
5218 ovs-appctl revalidator/wait
5219 AT_CHECK([ovs-appctl dpif/dump-flows br0 | STRIP_UFID | STRIP_USED | sort], [0], [dnl
5220 recirc_id(0),in_port(1),eth_type(0x0800),ipv4(frag=no), packets:0, bytes:0, used:never, actions:drop
5221 recirc_id(0),in_port(2),eth_type(0x0800),ipv4(frag=no), packets:0, bytes:0, used:never, actions:drop
5224 AT_CHECK([ovs-appctl dpif/dump-flows br1 | STRIP_UFID | STRIP_USED | sort], [0], [dnl
5225 recirc_id(0),in_port(3),eth_type(0x0800),ipv4(frag=no), packets:0, bytes:0, used:never, actions:drop
5228 AT_CHECK([ovs-appctl dpif/dump-flows -m br0 | STRIP_UFID | STRIP_USED | sort], [0], [dnl
5229 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
5230 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
5233 AT_CHECK([ovs-appctl dpif/dump-flows -m br1 | STRIP_UFID | STRIP_USED | sort], [0], [dnl
5234 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
5240 AT_SETUP([ofproto-dpif - ovs-appctl dpif/get-flow])
5242 OVS_VSWITCHD_START([add-br br1 -- \
5243 set bridge br1 datapath-type=dummy fail-mode=secure -- \
5244 set Open_vSwitch . other_config:max-idle=10000])
5245 ADD_OF_PORTS([br0], [1], [2])
5247 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)'])
5248 ovs-appctl revalidator/wait
5249 AT_CHECK([ovs-appctl dpif/dump-flows -m br0], [0], [stdout])
5251 UFID=`sed -n 's/\(ufid:[[0-9a-fA-F]]*\).*/\1/p' stdout`
5252 AT_CHECK([ovs-appctl dpctl/get-flow $UFID], [0], [dnl
5253 recirc_id(0),in_port(1),eth_type(0x0800),ipv4(frag=no), packets:0, bytes:0, used:never, actions:drop
5259 AT_SETUP([ofproto-dpif - MPLS actions that result in a userspace action])
5260 OVS_VSWITCHD_START([dnl
5261 add-port br0 p1 -- set Interface p1 type=dummy
5263 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5264 ON_EXIT([kill `cat ovs-ofctl.pid`])
5266 AT_CAPTURE_FILE([ofctl_monitor.log])
5267 AT_DATA([flows.txt], [dnl
5268 dl_src=60:66:66:66:66:00 actions=push_mpls:0x8847,controller
5269 dl_src=60:66:66:66:66:01 actions=pop_mpls:0x8849,controller
5271 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5273 dnl Packet is sent to userspace because a MPLS push or pop action is applied to
5274 dnl a packet with 2 MPLS LSEs but dpif-netdev can't handle any labels.
5276 dnl The input is a frame with two MPLS labels which tcpdump -vve shows as:
5277 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)
5278 dnl (label 20, exp 0, [S], ttl 32)
5279 dnl (tos 0x0, ttl 64, id 0, offset 0, flags [none], proto TCP (6), length 44, bad cksum 3b78 (->f978)!)
5280 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
5282 for dl_src in 00 01; do
5283 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"])
5285 sleep 1 # wait for the datapath flow installed
5286 AT_CHECK_UNQUOTED([cat ovs-vswitchd.log | STRIP_UFID | FILTER_FLOW_INSTALL | STRIP_USED], [0], [dnl
5287 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))
5288 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))
5295 AT_SETUP([ofproto-dpif - MPLS actions that result in a drop])
5296 OVS_VSWITCHD_START([dnl
5297 add-port br0 p1 -- set Interface p1 type=dummy
5299 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5300 ON_EXIT([kill `cat ovs-ofctl.pid`])
5302 AT_CAPTURE_FILE([ofctl_monitor.log])
5303 AT_DATA([flows.txt], [dnl
5304 dl_src=60:66:66:66:66:00 actions=push_mpls:0x8847,controller
5305 dl_src=60:66:66:66:66:01 actions=pop_mpls:0x8849,controller
5307 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5309 dnl Packet is dropped because an MPLS PUSH action is applied to a packet with
5310 dnl 4 MPLS LSEs but ovs-vswtichd can only handle up to 3 MPLS LSEs and thus
5311 dnl can't determine the resulting MPLS label after MPLS push/pop actions.
5313 dnl The input is a frame with two MPLS headers which tcpdump -vve shows as:
5314 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)
5315 dnl (label 20, exp 0, ttl 32)
5316 dnl (label 20, exp 0, ttl 32)
5317 dnl (label 20, exp 0, [S], ttl 32)
5318 dnl (tos 0x0, ttl 64, id 0, offset 0, flags [none], proto TCP (6), length 44, bad cksum 3b78 (->f978)!)
5319 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
5321 for dl_src in 00 01; do
5322 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"])
5324 sleep 1 # wait for the datapath flow installed
5325 AT_CHECK_UNQUOTED([cat ovs-vswitchd.log | STRIP_UFID | FILTER_FLOW_INSTALL | STRIP_USED], [0], [dnl
5326 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))
5327 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))
5333 AT_SETUP([ofproto-dpif - patch ports])
5334 OVS_VSWITCHD_START([add-br br1 \
5335 -- set bridge br1 datapath-type=dummy fail-mode=secure \
5336 -- add-port br1 pbr1 -- set int pbr1 type=patch options:peer=pbr0 \
5337 -- add-port br0 pbr0 -- set int pbr0 type=patch options:peer=pbr1])
5339 ADD_OF_PORTS([br0], [2])
5340 ADD_OF_PORTS([br1], [3])
5342 AT_CHECK([ovs-appctl upcall/disable-ufid], [0], [Datapath dumping tersely using UFID disabled
5344 AT_CHECK([ovs-appctl time/stop])
5345 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5347 AT_CHECK([ovs-ofctl add-flow br0 actions=LOCAL,output:1,output:2])
5348 AT_CHECK([ovs-ofctl add-flow br1 actions=LOCAL,output:1,output:3])
5350 for i in $(seq 1 10); do
5351 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)'
5352 if [[ $i -eq 1 ]]; then
5357 for i in $(seq 1 5); do
5358 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)'
5359 if [[ $i -eq 1 ]]; then
5364 AT_CHECK([ovs-appctl time/warp 500], [0],
5367 sleep 1 # wait for log writer
5369 AT_CHECK([ovs-appctl dpif/show], [0], [dnl
5370 dummy@ovs-dummy: hit:13 missed:2
5372 br0 65534/100: (dummy)
5374 pbr0 1/none: (patch: peer=pbr1)
5376 br1 65534/101: (dummy)
5378 pbr1 1/none: (patch: peer=pbr0)
5381 AT_CHECK([cat ovs-vswitchd.log | STRIP_UFID | FILTER_FLOW_INSTALL | STRIP_USED], [0], [dnl
5382 recirc_id=0,ip,in_port=100,nw_frag=no, actions:101,3,2
5383 recirc_id=0,ip,in_port=101,nw_frag=no, actions:100,2,3
5386 AT_CHECK([cat ovs-vswitchd.log | grep -e 'in_port(100).*packets:9' | STRIP_UFID | FILTER_FLOW_DUMP], [0], [dnl
5387 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
5389 AT_CHECK([cat ovs-vswitchd.log | grep -e 'in_port(101).*packets:4' | STRIP_UFID | FILTER_FLOW_DUMP], [0], [dnl
5390 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
5393 AT_CHECK([ovs-ofctl dump-ports br0 pbr0], [0], [dnl
5394 OFPST_PORT reply (xid=0x4): 1 ports
5395 port 1: rx pkts=5, bytes=300, drop=0, errs=0, frame=0, over=0, crc=0
5396 tx pkts=10, bytes=600, drop=0, errs=0, coll=0
5399 AT_CHECK([ovs-ofctl dump-ports br1 pbr1], [0], [dnl
5400 OFPST_PORT reply (xid=0x4): 1 ports
5401 port 1: rx pkts=10, bytes=600, drop=0, errs=0, frame=0, over=0, crc=0
5402 tx pkts=5, bytes=300, drop=0, errs=0, coll=0
5408 AT_SETUP([ofproto-dpif - port duration])
5409 OVS_VSWITCHD_START([set Bridge br0 protocols=OpenFlow13])
5410 ADD_OF_PORTS([br0], 1, 2)
5412 ovs-appctl time/stop
5413 ovs-appctl time/warp 10000
5415 AT_CHECK([ovs-ofctl -O openflow13 dump-ports br0], [0], [stdout])
5416 AT_CHECK([sed -n 's/=[[0-9]][[0-9]]\(\.[[0-9]][[0-9]]*\)\{0,1\}s/=?s/p' stdout], [0],
5425 dnl ----------------------------------------------------------------------
5426 AT_BANNER([ofproto-dpif -- megaflows])
5428 AT_SETUP([ofproto-dpif megaflow - port classification])
5430 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5431 ADD_OF_PORTS([br0], [1], [2])
5432 AT_DATA([flows.txt], [dnl
5433 table=0 in_port=1 actions=output(2)
5435 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5436 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)'])
5438 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)'])
5440 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5441 recirc_id=0,ip,in_port=1,nw_frag=no, actions: <del>
5446 AT_SETUP([ofproto-dpif megaflow - L2 classification])
5448 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5449 ADD_OF_PORTS([br0], [1], [2])
5450 AT_DATA([flows.txt], [dnl
5451 table=0 in_port=1,dl_src=50:54:00:00:00:09 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,ip,in_port=1,dl_src=50:54:00:00:00:09,nw_frag=no, actions: <del>
5459 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>
5464 AT_SETUP([ofproto-dpif megaflow - L3 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=nw_dst,nw_src], [0], [ignore], [])
5469 AT_DATA([flows.txt], [dnl
5470 table=0 in_port=1,icmp,nw_src=10.0.0.4 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: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)'])
5474 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)'])
5476 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5477 recirc_id=0,icmp,in_port=1,nw_src=10.0.0.4,nw_frag=no, actions: <del>
5478 recirc_id=0,ip,in_port=1,nw_src=10.0.0.2/0.0.0.2,nw_frag=no, actions: <del>
5483 AT_SETUP([ofproto-dpif megaflow - IPv6 classification])
5485 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5486 ADD_OF_PORTS([br0], [1], [2])
5487 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], [])
5488 AT_DATA([flows.txt], [dnl
5489 table=0 in_port=1,ipv6,ipv6_src=2001:db8:3c4d:1:2:3:4:5 actions=output(2)
5491 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5492 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)'])
5493 AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(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)'])
5495 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5496 recirc_id=0,ipv6,in_port=1,ipv6_src=2001:db8:3c4d:1:2:3:4:5,nw_frag=no, actions: <del>
5497 recirc_id=0,ipv6,in_port=1,ipv6_src=2001:db8:3c4d:5:4:3:2:1/0:0:0:4::,nw_frag=no, actions: <del>
5502 AT_SETUP([ofproto-dpif megaflow - L4 classification])
5504 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5505 ADD_OF_PORTS([br0], [1], [2])
5506 AT_DATA([flows.txt], [dnl
5507 table=0 in_port=1,icmp,icmp_type=8 actions=output(2)
5509 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5510 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)'])
5512 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)'])
5514 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5515 recirc_id=0,icmp,in_port=1,nw_frag=no,icmp_type=0x8/0xff, actions: <del>
5520 AT_SETUP([ofproto-dpif megaflow - normal])
5522 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5523 ADD_OF_PORTS([br0], [1], [2])
5524 AT_CHECK([ovs-ofctl add-flow br0 action=normal])
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(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)'])
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: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)'])
5528 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5529 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>
5530 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>
5535 AT_SETUP([ofproto-dpif megaflow - mpls])
5537 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5538 ADD_OF_PORTS([br0], [1], [2])
5539 AT_DATA([flows.txt], [dnl
5540 table=0 dl_src=50:54:00:00:00:09 actions=push_mpls:0x8847,2
5541 table=0 dl_src=50:54:00:00:00:0b actions=pop_mpls:0x0800,2
5543 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5544 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)'])
5545 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)'])
5547 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5548 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>
5549 recirc_id=0,mpls,in_port=1,dl_src=50:54:00:00:00:0b,mpls_bos=1, actions: <del>
5554 # CHECK_MEGAFLOW_NETFLOW(LOOPBACK_ADDR, IP_VERSION_TYPE)
5556 # IP_VERSION_TYPE is used in AT_SETUP
5557 m4_define([CHECK_MEGAFLOW_NETFLOW],
5558 [AT_SETUP([ofproto-dpif megaflow - netflow - $2 collector])
5560 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5561 ADD_OF_PORTS([br0], [1], [2])
5563 dnl NetFlow configuration disables wildcarding relevant fields
5564 ON_EXIT([kill `cat test-netflow.pid`])
5565 AT_CHECK([ovstest test-netflow --log-file --detach --no-chdir --pidfile 0:$1 > netflow.log], [0], [], [ignore])
5566 AT_CAPTURE_FILE([netflow.log])
5567 NETFLOW_PORT=`parse_listening_port < test-netflow.log`
5569 set Bridge br0 netflow=@nf -- \
5570 --id=@nf create NetFlow targets=\"$1:$NETFLOW_PORT\" \
5571 engine_id=1 engine_type=2 active_timeout=30 add-id-to-interface=false
5573 AT_CHECK([ovs-ofctl add-flow br0 action=normal])
5574 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)'])
5575 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)'])
5577 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5578 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>
5579 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>
5584 CHECK_MEGAFLOW_NETFLOW([127.0.0.1], [IPv4])
5585 CHECK_MEGAFLOW_NETFLOW([[[::1]]], [IPv6])
5587 AT_SETUP([ofproto-dpif megaflow - normal, active-backup bonding])
5589 [add-port br0 p1 -- set Interface p1 type=dummy ofport_request=1 -- \
5590 add-bond br0 bond0 p2 p3 bond_mode=active-backup -- \
5591 set interface p2 type=dummy ofport_request=2 -- \
5592 set interface p3 type=dummy ofport_request=3])
5593 AT_CHECK([ovs-appctl netdev-dummy/set-admin-state up], 0, [OK
5595 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5597 AT_CHECK([ovs-ofctl add-flow br0 action=normal])
5598 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)'])
5599 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)'])
5601 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5602 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>
5603 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>
5608 AT_SETUP([ofproto-dpif megaflow - normal, balance-slb bonding])
5610 [add-port br0 p1 -- set Interface p1 type=dummy ofport_request=1 -- \
5611 add-bond br0 bond0 p2 p3 bond_mode=balance-slb -- \
5612 set interface p2 type=dummy ofport_request=2 -- \
5613 set interface p3 type=dummy ofport_request=3])
5614 AT_CHECK([ovs-appctl netdev-dummy/set-admin-state up], 0, [OK
5616 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5618 AT_CHECK([ovs-ofctl add-flow br0 action=normal])
5619 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)'])
5620 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)'])
5622 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5623 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>
5624 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>
5629 AT_SETUP([ofproto-dpif megaflow - normal, balance-tcp bonding])
5630 # Create bond0 on br0 with interfaces p0 and p1
5631 # and bond1 on br1 with interfaces p2 and p3
5632 # with p0 patched to p2 and p1 patched to p3.
5634 [add-bond br0 bond0 p0 p1 bond_mode=balance-tcp lacp=active \
5635 other-config:lacp-time=fast \
5636 other-config:bond-rebalance-interval=0 -- \
5637 set interface p0 type=patch options:peer=p2 ofport_request=1 -- \
5638 set interface p1 type=patch options:peer=p3 ofport_request=2 -- \
5640 set bridge br1 other-config:hwaddr=aa:66:aa:66:00:00 -- \
5641 set bridge br1 datapath-type=dummy other-config:datapath-id=1234 \
5642 fail-mode=secure -- \
5643 add-bond br1 bond1 p2 p3 bond_mode=balance-tcp lacp=active \
5644 other-config:lacp-time=fast \
5645 other-config:bond-rebalance-interval=0 -- \
5646 set interface p2 type=patch options:peer=p0 ofport_request=3 -- \
5647 set interface p3 type=patch options:peer=p1 ofport_request=4 --])
5649 AT_CHECK([ovs-appctl netdev-dummy/set-admin-state up], 0, [OK
5651 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5652 ADD_OF_PORTS([br0], [7])
5653 AT_CHECK([ovs-ofctl add-flow br0 action=normal])
5654 AT_CHECK([ovs-ofctl add-flow br1 action=normal])
5655 ovs-appctl time/stop
5656 ovs-appctl time/warp 5000
5657 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)'])
5658 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)'])
5660 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5661 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>
5662 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>
5667 AT_SETUP([ofproto-dpif megaflow - resubmit port 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(90)
5673 table=0 in_port=90,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=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
5679 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5680 recirc_id=0,ip,in_port=1,dl_src=50:54:00:00:00:09,nw_frag=no, actions: <del>
5681 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>
5686 AT_SETUP([ofproto-dpif megaflow - resubmit table action])
5688 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5689 ADD_OF_PORTS([br0], [1], [2])
5690 AT_DATA([flows.txt], [dnl
5691 table=0 in_port=1,ip actions=resubmit(,1)
5692 table=1 dl_src=50:54:00:00:00:09 actions=output(2)
5694 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5695 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)'])
5696 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=
5697 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 - goto_table action])
5708 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5709 ADD_OF_PORTS([br0], [1], [2])
5710 AT_DATA([flows.txt], [dnl
5711 table=0 in_port=1,ip actions=goto_table(1)
5712 table=1 dl_src=50:54:00:00:00:09 actions=output(2)
5714 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flows br0 flows.txt])
5715 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)'])
5716 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)'])
5718 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5719 recirc_id=0,ip,in_port=1,dl_src=50:54:00:00:00:09,nw_frag=no, actions: <del>
5720 recirc_id=0,ip,in_port=1,dl_src=50:54:00:00:00:0b,nw_frag=no, actions: <del>
5725 AT_SETUP([ofproto-dpif megaflow - mirroring, select_all])
5727 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5728 ADD_OF_PORTS([br0], [1], [2], [3])
5730 set Bridge br0 mirrors=@m --\
5731 --id=@p3 get Port p3 --\
5732 --id=@m create Mirror name=mymirror select_all=true output_port=@p3
5734 AT_DATA([flows.txt], [dnl
5735 in_port=1 actions=output:2
5737 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5738 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)'])
5740 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)'])
5742 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5743 recirc_id=0,ip,in_port=1,nw_frag=no, actions: <del>
5748 AT_SETUP([ofproto-dpif megaflow - mirroring, select_vlan])
5750 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5751 ADD_OF_PORTS([br0], [1], [2], [3])
5753 set Bridge br0 mirrors=@m --\
5754 --id=@p2 get Port p2 -- --id=@p3 get Port p3 --\
5755 --id=@m create Mirror name=mymirror select_all=true select_vlan=11 output_port=@p3
5757 AT_DATA([flows.txt], [dnl
5758 in_port=1 actions=output:2
5760 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5761 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))'])
5762 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)'])
5764 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5765 recirc_id=0,ip,in_port=1,dl_vlan=11,nw_frag=no, actions: <del>
5766 recirc_id=0,ip,in_port=1,vlan_tci=0x0000/0x1fff,nw_frag=no, actions: <del>
5771 AT_SETUP([ofproto-dpif megaflow - move action])
5773 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5774 ADD_OF_PORTS([br0], [1], [2])
5775 AT_DATA([flows.txt], [dnl
5776 table=0 in_port=1 ip,actions=move:NXM_OF_IP_SRC[[]]->NXM_NX_REG0[[]],resubmit(90)
5777 table=0 in_port=90 ip,actions=move:NXM_NX_REG0[[]]->NXM_NX_REG1[[]],resubmit(91)
5778 table=0 in_port=91 reg0=0x0a000002,actions=output(2)
5780 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5781 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)'])
5782 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)'])
5784 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5785 recirc_id=0,ip,in_port=1,nw_src=10.0.0.2,nw_frag=no, actions: <del>
5786 recirc_id=0,ip,in_port=1,nw_src=10.0.0.4,nw_frag=no, actions: <del>
5791 AT_SETUP([ofproto-dpif megaflow - push action])
5793 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5794 ADD_OF_PORTS([br0], [1], [2])
5795 AT_DATA([flows.txt], [dnl
5796 table=0 in_port=1 ip,actions=push:NXM_OF_IP_SRC[[]],output(2)
5798 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5799 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)'])
5800 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)'])
5802 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5803 recirc_id=0,ip,in_port=1,nw_src=10.0.0.2,nw_frag=no, actions: <del>
5804 recirc_id=0,ip,in_port=1,nw_src=10.0.0.4,nw_frag=no, actions: <del>
5809 AT_SETUP([ofproto-dpif megaflow - learning])
5811 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5812 ADD_OF_PORTS([br0], [1], [2])
5813 AT_DATA([flows.txt], [dnl
5814 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
5816 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5817 ovs-appctl time/stop
5818 # We send each packet twice because the first packet in each flow causes the
5819 # flow table to change and thus revalidations, which (depending on timing)
5820 # can keep a megaflow from being installed. The revalidations are done by
5821 # the second iteration, allowing the flows to be installed.
5823 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)'])
5824 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)'])
5825 ovs-appctl time/warp 100
5828 dnl The original flow is missing due to a revalidation.
5829 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5830 recirc_id=0,ip,in_port=1,vlan_tci=0x0000/0x0fff,dl_src=50:54:00:00:00:09,nw_frag=no, actions: <del>
5831 recirc_id=0,ip,in_port=1,vlan_tci=0x0000/0x0fff,dl_src=50:54:00:00:00:0b,nw_frag=no, actions: <del>
5836 AT_SETUP([ofproto-dpif megaflow - tunnels])
5838 [add-port br0 p1 -- set Interface p1 type=dummy ofport_request=1])
5839 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5840 AT_CHECK([ovs-vsctl add-port br0 p2 -- set Interface p2 type=gre \
5841 options:remote_ip=1.1.1.1 ofport_request=2 options:key=flow])
5842 AT_CHECK([ovs-vsctl add-port br0 p3 -- set Interface p3 type=dummy \
5844 AT_CHECK([ovs-vsctl add-port br0 p4 -- set Interface p4 type=gre \
5845 options:remote_ip=1.1.1.2 options:tos=inherit options:ttl=inherit \
5846 ofport_request=4 options:key=flow])
5847 AT_DATA([flows.txt], [dnl
5848 in_port=1,actions=output(2)
5849 in_port=3,actions=output(4)
5851 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5852 dnl ECN bits are always copied out, but don't use 0x3 (CE), since that
5853 dnl will cause the packet to be dropped.
5854 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)'])
5856 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)'])
5857 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)'])
5859 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)'])
5861 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5862 recirc_id=0,ip,in_port=1,nw_ecn=1,nw_frag=no, actions: <del>
5863 recirc_id=0,ip,in_port=3,nw_tos=0,nw_ecn=1,nw_ttl=64,nw_frag=no, actions: <del>
5864 recirc_id=0,ip,in_port=3,nw_tos=252,nw_ecn=1,nw_ttl=128,nw_frag=no, actions: <del>
5869 AT_SETUP([ofproto-dpif megaflow - dec_ttl])
5871 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5872 ADD_OF_PORTS([br0], [1], [2])
5873 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], [])
5874 AT_DATA([flows.txt], [dnl
5875 table=0 in_port=1,icmp,nw_src=10.0.0.4 actions=dec_ttl,output(2)
5877 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5878 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)'])
5879 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)'])
5881 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5882 recirc_id=0,icmp,in_port=1,nw_src=10.0.0.4,nw_ttl=64,nw_frag=no, actions: <del>
5883 recirc_id=0,ip,in_port=1,nw_src=10.0.0.2/0.0.0.2,nw_frag=no, actions: <del>
5888 AT_SETUP([ofproto-dpif megaflow - set dl_dst])
5890 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5891 ADD_OF_PORTS([br0], [1], [2])
5892 AT_DATA([flows.txt], [dnl
5893 table=0 in_port=1 actions=mod_dl_dst(50:54:00:00:00:0a),output(2)
5895 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5896 AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
5897 AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4,dst=10.0.0.3,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
5899 dnl The first packet is essentially a no-op, as the new destination MAC is the
5900 dnl same as the original. The second entry actually updates the destination
5902 AT_CHECK([cat ovs-vswitchd.log | STRIP_UFID | FILTER_FLOW_INSTALL | STRIP_USED], [0], [dnl
5903 recirc_id=0,ip,in_port=1,dl_dst=50:54:00:00:00:0a,nw_frag=no, actions:2
5904 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
5909 AT_SETUP([ofproto-dpif megaflow - disabled])
5911 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5912 ADD_OF_PORTS([br0], [1], [2])
5913 AT_DATA([flows.txt], [dnl
5914 table=0 in_port=1,ip,nw_dst=10.0.0.1 actions=output(2)
5915 table=0 in_port=1,ip,nw_dst=10.0.0.3 actions=drop
5917 AT_CHECK([ovs-appctl upcall/disable-megaflows], [0], [megaflows disabled
5919 AT_CHECK([ovs-appctl upcall/disable-ufid], [0], [Datapath dumping tersely using UFID disabled
5921 AT_CHECK([ovs-appctl vlog/set dpif_netdev:dbg], [0], [], [])
5922 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5923 for i in 1 2 3 4; do
5924 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)'])
5925 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)'])
5926 if [[ $i -eq 1 ]]; then
5931 AT_CHECK([cat ovs-vswitchd.log | STRIP_UFID | FILTER_FLOW_INSTALL | STRIP_USED], [0], [dnl
5932 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
5933 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
5935 AT_CHECK([cat ovs-vswitchd.log | STRIP_UFID | FILTER_FLOW_DUMP | grep 'packets:3'], [0], [dnl
5936 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
5937 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
5942 AT_SETUP([ofproto-dpif - datapath port number change])
5943 OVS_VSWITCHD_START([set Bridge br0 fail-mode=standalone])
5944 ADD_OF_PORTS([br0], 1)
5946 # Trace a flow that should output to p1.
5947 AT_CHECK([ovs-appctl ofproto/trace br0 in_port=LOCAL,dl_src=10:20:30:40:50:60],
5949 AT_CHECK([tail -1 stdout], [0], [Datapath actions: 1
5952 # Change p1's port number to 5.
5953 AT_CHECK([ovs-appctl dpif-dummy/change-port-number ovs-dummy p1 5])
5955 # Trace a flow that should output to p1 in its new location.
5956 AT_CHECK([ovs-appctl ofproto/trace br0 in_port=LOCAL,dl_src=10:20:30:40:50:60],
5958 AT_CHECK([tail -1 stdout], [0], [Datapath actions: 5
5963 # Tests the bundling with various bfd and cfm configurations.
5964 AT_SETUP([ofproto - bundle with variable bfd/cfm config])
5965 OVS_VSWITCHD_START([add-br br1 -- set bridge br1 datapath-type=dummy -- \
5966 add-bond br0 br0bond p0 p2 bond-mode=active-backup -- \
5967 add-bond br1 br1bond p1 p3 bond-mode=active-backup -- \
5968 set Interface p1 type=patch options:peer=p0 ofport_request=2 -- \
5969 set Interface p3 type=patch options:peer=p2 ofport_request=4 -- \
5970 set Interface p0 type=patch options:peer=p1 ofport_request=1 -- \
5971 set Interface p2 type=patch options:peer=p3 ofport_request=3 -- \
5972 set Interface p0 bfd:enable=true bfd:min_tx=300 bfd:min_rx=300 -- \
5973 set Interface p0 cfm_mpid=1 -- \
5974 set Interface p1 bfd:enable=true bfd:min_tx=500 bfd:min_rx=500])
5976 ovs-appctl time/stop
5977 # advance the clock to stablize everything.
5978 ovs-appctl time/warp 5000 100
5979 # cfm/show should show 'recv' fault.
5980 AT_CHECK([ovs-appctl cfm/show | sed -n '/^.*fault:.*/p'], [0], [dnl
5983 # bfd/show should show 'up'.
5984 AT_CHECK([ovs-appctl bfd/show | sed -n '/^.*Session State:.*/p'], [0], [dnl
5985 Local Session State: up
5986 Remote Session State: up
5987 Local Session State: up
5988 Remote Session State: up
5990 # bond/show should show 'may-enable: true' for all slaves.
5991 AT_CHECK([ovs-appctl bond/show | sed -n '/^.*may_enable:.*/p'], [0], [dnl
5998 # now disable the bfd on p1.
5999 AT_CHECK([ovs-vsctl set Interface p1 bfd:enable=false])
6000 # advance the clock to stablize everything.
6001 ovs-appctl time/warp 5000 100
6002 # cfm/show should show 'recv' fault.
6003 AT_CHECK([ovs-appctl cfm/show | sed -n '/^.*fault:.*/p'], [0], [dnl
6006 # bfd/show should show 'down'.
6007 AT_CHECK([ovs-appctl bfd/show | sed -n '/^.*Session State:.*/p'], [0], [dnl
6008 Local Session State: down
6009 Remote Session State: down
6011 # bond/show should show 'may-enable: false' for p0.
6012 AT_CHECK([ovs-appctl bond/show br0bond | sed -n '/^.*may_enable:.*/p'], [0], [dnl
6017 # now enable the bfd on p1 and disable bfd on p0.
6018 AT_CHECK([ovs-vsctl set Interface p1 bfd:enable=true])
6019 AT_CHECK([ovs-vsctl set Interface p0 bfd:enable=false])
6020 # advance the clock to stablize everything.
6021 ovs-appctl time/warp 5000 100
6022 # cfm/show should show 'recv' fault.
6023 AT_CHECK([ovs-appctl cfm/show | sed -n '/^.*fault:.*/p'], [0], [dnl
6026 # bfd/show should show 'down'.
6027 AT_CHECK([ovs-appctl bfd/show | sed -n '/^.*Session State:.*/p'], [0], [dnl
6028 Local Session State: down
6029 Remote Session State: down
6031 # bond/show should show 'may-enable: false' for p0 and p1.
6032 AT_CHECK([ovs-appctl bond/show | sed -n '/^.*may_enable:.*/p'], [0], [dnl
6042 AT_SETUP([ofproto-dpif - ofproto-dpif-monitor 1])
6043 OVS_VSWITCHD_START([add-port br0 p0 -- set interface p0 type=gre options:remote_ip=1.2.3.4])
6046 AT_CHECK([ovs-vsctl set interface p0 bfd:enable=true])
6048 OVS_WAIT_UNTIL([grep "monitor thread created" ovs-vswitchd.log])
6049 # disable bfd on p0.
6050 AT_CHECK([ovs-vsctl set interface p0 bfd:enable=false])
6052 OVS_WAIT_UNTIL([grep "monitor thread terminated" ovs-vswitchd.log])
6053 AT_CHECK([cat ovs-vswitchd.log | sed -e '/^.*ofproto_dpif_monitor.*$/d' > ovs-vswitchd.log])
6056 AT_CHECK([ovs-vsctl set interface p0 cfm_mpid=10])
6058 OVS_WAIT_UNTIL([grep "monitor thread created" ovs-vswitchd.log])
6059 # disable cfm on p0.
6060 AT_CHECK([ovs-vsctl remove interface p0 cfm_mpid 10])
6062 OVS_WAIT_UNTIL([grep "monitor thread terminated" ovs-vswitchd.log])
6063 AT_CHECK([cat ovs-vswitchd.log | sed -e '/^.*ofproto_dpif_monitor.*$/d' > ovs-vswitchd.log])
6065 # enable both bfd and cfm on p0.
6066 AT_CHECK([ovs-vsctl set interface p0 bfd:enable=true cfm_mpid=10])
6068 OVS_WAIT_UNTIL([grep "monitor thread created" ovs-vswitchd.log])
6069 # disable bfd on p0.
6070 AT_CHECK([ovs-vsctl set interface p0 bfd:enable=false])
6071 # check log, there should not be the log of thread terminated.
6072 AT_CHECK([sed -n "s/^.*|ofproto_dpif_monitor(monitor[[0-9]]*)|INFO|\(.* terminated\)$/\1/p" ovs-vswitchd.log], [0], [dnl
6074 # reenable bfd on p0.
6075 AT_CHECK([ovs-vsctl set interface p0 bfd:enable=true])
6076 # check log, should still be on log of thread created.
6077 AT_CHECK([sed -n "s/^.*|ofproto_dpif_monitor(monitor[[0-9]]*)|INFO|\(.* created\)$/\1/p" ovs-vswitchd.log], [0], [dnl
6078 monitor thread created
6080 # disable bfd and cfm together.
6081 AT_CHECK([ovs-vsctl set interface p0 bfd:enable=false -- remove interface p0 cfm_mpid 10])
6083 OVS_WAIT_UNTIL([grep "monitor thread terminated" ovs-vswitchd.log])
6088 # this test helps avoid the deadlock between the main thread and monitor thread.
6089 AT_SETUP([ofproto-dpif - ofproto-dpif-monitor 2])
6092 for i in `seq 1 199`
6094 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])
6100 AT_BANNER([ofproto-dpif - flow translation resource limits])
6102 AT_SETUP([ofproto-dpif - infinite resubmit])
6104 AT_CHECK([ovs-ofctl add-flow br0 actions=resubmit:1,resubmit:2,output:3])
6105 AT_CHECK([ovs-appctl -vpoll_loop:off ofproto/trace br0 'eth_dst=ff:ff:ff:ff:ff:ff'],
6107 AT_CHECK([tail -1 stdout], [0], [Datapath actions: drop
6109 AT_CHECK([grep -c 'resubmit actions recursed over 64 times' ovs-vswitchd.log],
6112 OVS_VSWITCHD_STOP(["/resubmit actions recursed/d"])
6115 AT_SETUP([ofproto-dpif - exponential resubmit chain])
6117 ADD_OF_PORTS([br0], 1)
6118 (for i in `seq 1 64`; do
6120 echo "in_port=$i, actions=resubmit:$j, resubmit:$j, local"
6122 echo "in_port=65, actions=local") > flows
6123 AT_CHECK([ovs-ofctl add-flows br0 flows])
6124 AT_CHECK([ovs-appctl -vpoll_loop:off ofproto/trace br0 'in_port=1'], [0], [stdout])
6125 AT_CHECK([grep -c 'over 4096 resubmit actions' ovs-vswitchd.log], [0], [1
6127 OVS_VSWITCHD_STOP(["/over.*resubmit actions/d"])
6130 AT_SETUP([ofproto-dpif - too many output actions])
6132 ADD_OF_PORTS([br0], 1)
6133 (for i in `seq 1 12`; do
6135 echo "in_port=$i, actions=resubmit:$j, resubmit:$j, local"
6137 echo "in_port=13, actions=local,local,local,local,local,local,local,local") > 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 -e '- Uses action(s) not supported by datapath' stdout],
6143 AT_CHECK([grep -c 'resubmits yielded over 64 kB of actions' ovs-vswitchd.log], [0], [1
6145 OVS_VSWITCHD_STOP(["/resubmits yielded over 64 kB of actions/d"])
6148 AT_SETUP([ofproto-dpif - stack too deep])
6150 ADD_OF_PORTS([br0], 1)
6151 (for i in `seq 1 12`; do
6153 echo "in_port=$i, actions=resubmit:$j, resubmit:$j, local"
6155 push="push:NXM_NX_REG0[[]]"
6156 echo "in_port=13, actions=$push,$push,$push,$push,$push,$push,$push,$push") > flows
6157 AT_CHECK([ovs-ofctl add-flows br0 flows])
6158 AT_CHECK([ovs-appctl -vpoll_loop:off ofproto/trace br0 'in_port=1'], [0], [stdout])
6159 AT_CHECK([grep -c 'resubmits yielded over 64 kB of stack' ovs-vswitchd.log], [0], [1
6161 OVS_VSWITCHD_STOP(["/resubmits yielded over 64 kB of stack/d"])
6165 AT_SETUP([ofproto-dpif packet-out controller])
6167 ADD_OF_PORTS([br0], 1, 2)
6169 AT_CHECK([ovs-ofctl add-flow br0 'dl_dst=50:54:00:00:00:0a actions=controller'])
6171 AT_CAPTURE_FILE([ofctl_monitor.log])
6172 AT_CHECK([ovs-ofctl monitor br0 65534 invalid_ttl --detach --no-chdir --pidfile 2> ofctl_monitor.log])
6175 AT_CHECK([ovs-ofctl -O OpenFlow13 packet-out br0 CONTROLLER controller '50540000000a5054000000091234'])
6178 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
6179 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
6180 NXT_PACKET_IN (xid=0x0): total_len=14 in_port=CONTROLLER (via action) data_len=14 (unbuffered)
6181 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
6183 NXT_PACKET_IN (xid=0x0): total_len=14 in_port=CONTROLLER (via action) data_len=14 (unbuffered)
6184 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
6186 NXT_PACKET_IN (xid=0x0): total_len=14 in_port=CONTROLLER (via action) data_len=14 (unbuffered)
6187 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
6190 AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
6191 dl_dst=50:54:00:00:00:0a actions=CONTROLLER:65535
6195 (echo "OFPST_TABLE reply (OF1.3) (xid=0x2):
6197 active=1, lookup=0, matched=0"
6199 while test $x -lt 254; do
6202 active=0, lookup=0, matched=0"
6205 AT_CHECK([ovs-ofctl -O OpenFlow13 dump-tables br0 ], [0], [expout])
6210 AT_SETUP([ofproto-dpif packet-out controller (patch port)])
6213 add-port br0 p1 -- \
6214 set interface p1 type=patch options:peer=p2 -- \
6216 set bridge br1 datapath-type=dummy -- \
6217 set bridge br1 fail-mode=secure -- \
6218 set bridge br1 protocols='[OpenFlow10,OpenFlow11,OpenFlow12,OpenFlow13]' -- \
6219 add-port br1 p2 -- \
6220 set interface p2 type=patch options:peer=p1 --])
6222 AT_CAPTURE_FILE([ofctl_monitor.log])
6223 AT_CHECK([ovs-ofctl monitor br1 65534 invalid_ttl --detach --no-chdir --pidfile 2> ofctl_monitor.log])
6226 AT_CHECK([ovs-ofctl -O OpenFlow13 packet-out br0 CONTROLLER output:1 '50540000000a5054000000091234'])
6229 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
6230 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
6231 NXT_PACKET_IN (xid=0x0): cookie=0x0 total_len=14 in_port=1 (via no_match) data_len=14 (unbuffered)
6232 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
6234 NXT_PACKET_IN (xid=0x0): cookie=0x0 total_len=14 in_port=1 (via no_match) data_len=14 (unbuffered)
6235 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
6237 NXT_PACKET_IN (xid=0x0): cookie=0x0 total_len=14 in_port=1 (via no_match) data_len=14 (unbuffered)
6238 in_port=0,vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,dl_type=0x1234
6241 (printf "OFPST_TABLE reply (OF1.3) (xid=0x2):"
6243 while test $x -lt 254; do
6246 active=0, lookup=0, matched=0"
6249 AT_CHECK([ovs-ofctl -O OpenFlow13 dump-tables br0 ], [0], [expout])
6251 (echo "OFPST_TABLE reply (OF1.3) (xid=0x2):
6253 active=0, lookup=3, matched=0"
6255 while test $x -lt 254; do
6258 active=0, lookup=0, matched=0"
6261 AT_CHECK([ovs-ofctl -O OpenFlow13 dump-tables br1 ], [0], [expout])
6267 AT_SETUP([ofproto-dpif packet-out goto_table])
6269 ADD_OF_PORTS([br0], 1, 2)
6271 AT_DATA([flows.txt], [dnl
6272 table=0 dl_dst=50:54:00:00:00:0a actions=goto_table(1)
6273 table=1 dl_dst=50:54:00:00:00:0a actions=controller
6275 AT_CHECK([ovs-ofctl -O OpenFlow13 add-flows br0 flows.txt])
6277 AT_CAPTURE_FILE([ofctl_monitor.log])
6278 AT_CHECK([ovs-ofctl monitor br0 65534 invalid_ttl --detach --no-chdir --pidfile 2> ofctl_monitor.log])
6281 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)'
6284 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
6285 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
6286 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
6287 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
6288 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
6290 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
6291 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
6293 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
6294 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
6297 AT_CHECK([ovs-appctl revalidator/purge], [0])
6298 AT_CHECK([ovs-ofctl -O OpenFlow13 dump-flows br0 | ofctl_strip | sort], [0], [dnl
6299 n_packets=3, n_bytes=180, dl_dst=50:54:00:00:00:0a actions=goto_table:1
6300 table=1, n_packets=3, n_bytes=180, dl_dst=50:54:00:00:00:0a actions=CONTROLLER:65535
6301 OFPST_FLOW reply (OF1.3):
6304 (echo "OFPST_TABLE reply (OF1.3) (xid=0x2):
6306 active=1, lookup=3, matched=3
6309 active=1, lookup=3, matched=3"
6311 while test $x -lt 254; do
6314 active=0, lookup=0, matched=0"
6317 AT_CHECK([ovs-ofctl -O OpenFlow13 dump-tables br0 ], [0], [expout])
6323 AT_SETUP([ofproto-dpif packet-out table-miss (continue)])
6325 ADD_OF_PORTS([br0], 1, 2)
6327 AT_CHECK([ovs-ofctl -O OpenFlow11 add-flow br0 'table=1 dl_dst=50:54:00:00:00:0a actions=controller'])
6328 AT_CHECK([ovs-ofctl -O OpenFlow11 mod-table br0 all continue])
6330 AT_CAPTURE_FILE([ofctl_monitor.log])
6331 AT_CHECK([ovs-ofctl monitor br0 65534 invalid_ttl --detach --no-chdir --pidfile 2> ofctl_monitor.log])
6334 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)'
6337 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
6338 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
6339 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
6340 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
6341 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
6343 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
6344 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
6346 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
6347 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
6350 AT_CHECK([ovs-appctl revalidator/purge], [0])
6351 AT_CHECK([ovs-ofctl -O OpenFlow11 dump-flows br0 | ofctl_strip | sort], [0], [dnl
6352 table=1, n_packets=3, n_bytes=180, dl_dst=50:54:00:00:00:0a actions=CONTROLLER:65535
6353 OFPST_FLOW reply (OF1.1):
6356 (echo "OFPST_TABLE reply (OF1.3) (xid=0x2):
6358 active=0, lookup=3, matched=0
6361 active=1, lookup=3, matched=3"
6363 while test $x -lt 254; do
6366 active=0, lookup=0, matched=0"
6369 AT_CHECK([ovs-ofctl -O OpenFlow13 dump-tables br0 ], [0], [expout])
6374 AT_SETUP([ofproto-dpif - ICMPv6])
6376 ADD_OF_PORTS([br0], 1)
6378 AT_CAPTURE_FILE([ofctl_monitor.log])
6380 AT_CHECK([ovs-ofctl monitor br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
6382 ovs-appctl netdev-dummy/receive p1 '0060970769ea0000860580da86dd6000000000203afffe80000000000000020086fffe0580dafe80000000000000026097fffe0769ea870068bd00000000fe80000000000000026097fffe0769ea01010000860580da'
6384 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
6386 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
6387 NXT_PACKET_IN (xid=0x0): cookie=0x0 total_len=86 in_port=1 (via no_match) data_len=86 (unbuffered)
6388 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 icmp6_csum:68bd
6394 AT_SETUP([ofproto-dpif - Neighbor Discovery set-field with checksum update])
6396 ADD_OF_PORTS([br0], 1)
6397 AT_CHECK([ovs-ofctl add-flow br0 icmp6,icmpv6_type=135,action=set_field:fe80::1-\>nd_target,set_field:32:21:14:86:11:74-\>nd_sll,output:controller])
6399 AT_CAPTURE_FILE([ofctl_monitor.log])
6401 AT_CHECK([ovs-ofctl monitor br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
6403 ovs-appctl netdev-dummy/receive p1 '0060970769ea0000860580da86dd6000000000203afffe80000000000000020086fffe0580dafe80000000000000026097fffe0769ea870068bd00000000fe80000000000000026097fffe0769ea01010000860580da'
6405 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
6407 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
6408 NXT_PACKET_IN (xid=0x0): cookie=0x0 total_len=86 in_port=1 (via action) data_len=86 (unbuffered)
6409 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::1,nd_sll=32:21:14:86:11:74,nd_tll=00:00:00:00:00:00 icmp6_csum:19d3