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):
2829 AT_SETUP([ofproto-dpif - packet-in reasons (Openflow 1.3)])
2830 OVS_VSWITCHD_START([dnl
2831 add-port br0 p1 -- set Interface p1 type=dummy
2833 ON_EXIT([kill `cat ovs-ofctl.pid`])
2835 AT_CAPTURE_FILE([ofctl_monitor.log])
2836 AT_DATA([flows.txt], [dnl
2837 table=0 in_port=1 actions=write_actions(output(CONTROLLER)),goto_table(1)
2838 table=1 actions=output(CONTROLLER),goto_table(2)
2839 table=2 actions=group:1234
2841 AT_CHECK([ovs-ofctl --protocols=OpenFlow13 add-group br0 'group_id=1234,type=all,bucket=output:10,bucket=output:CONTROLLER'])
2842 AT_CHECK([ovs-ofctl --protocols=OpenFlow13 add-flows br0 flows.txt])
2844 dnl Singleton controller action.
2845 AT_CHECK([ovs-ofctl monitor -P openflow10 --protocols=OpenFlow13 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
2848 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)'
2850 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2851 ovs-appctl -t ovs-ofctl exit
2853 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2855 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2856 OFPT_PACKET_IN (OF1.3) (xid=0x0): table_id=1 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): table_id=2 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
2862 OFPT_PACKET_IN (OF1.3) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
2863 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
2865 OFPT_PACKET_IN (OF1.3) (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
2866 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
2868 OFPT_PACKET_IN (OF1.3) (xid=0x0): table_id=2 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
2869 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
2871 OFPT_PACKET_IN (OF1.3) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
2872 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
2874 OFPT_PACKET_IN (OF1.3) (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
2875 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
2877 OFPT_PACKET_IN (OF1.3) (xid=0x0): table_id=2 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
2878 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
2880 OFPT_PACKET_IN (OF1.3) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
2881 tcp,in_port=0,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:0
2884 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2886 AT_CHECK([ovs-ofctl --protocols=OpenFlow13 dump-flows br0 | ofctl_strip | sort], [0], [dnl
2887 n_packets=3, n_bytes=180, in_port=1 actions=write_actions(CONTROLLER:65535),goto_table:1
2888 table=1, n_packets=3, n_bytes=180, actions=CONTROLLER:65535,goto_table:2
2889 table=2, n_packets=3, n_bytes=180, actions=group:1234
2890 OFPST_FLOW reply (OF1.3):
2897 AT_SETUP([ofproto-dpif - packet-in reasons (Openflow 1.4)])
2898 OVS_VSWITCHD_START([dnl
2899 add-port br0 p1 -- set Interface p1 type=dummy
2901 ON_EXIT([kill `cat ovs-ofctl.pid`])
2903 AT_CAPTURE_FILE([ofctl_monitor.log])
2904 AT_DATA([flows.txt], [dnl
2905 table=0 in_port=1 actions=write_actions(output(CONTROLLER)),goto_table(1)
2906 table=1 actions=output(CONTROLLER),goto_table(2)
2907 table=2 actions=group:1234
2909 AT_CHECK([ovs-ofctl --protocols=OpenFlow14 add-group br0 'group_id=1234,type=all,bucket=output:10,bucket=output:CONTROLLER'])
2910 AT_CHECK([ovs-ofctl --protocols=OpenFlow14 add-flows br0 flows.txt])
2912 dnl Singleton controller action.
2913 AT_CHECK([ovs-ofctl monitor -P openflow10 --protocols=OpenFlow14 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
2916 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)'
2918 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2919 ovs-appctl -t ovs-ofctl exit
2921 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2923 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2924 OFPT_PACKET_IN (OF1.4) (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
2925 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
2927 OFPT_PACKET_IN (OF1.4) (xid=0x0): table_id=2 cookie=0x0 total_len=60 in_port=1 (via group) data_len=60 (unbuffered)
2928 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
2930 OFPT_PACKET_IN (OF1.4) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via action_set) data_len=60 (unbuffered)
2931 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
2933 OFPT_PACKET_IN (OF1.4) (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
2934 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
2936 OFPT_PACKET_IN (OF1.4) (xid=0x0): table_id=2 cookie=0x0 total_len=60 in_port=1 (via group) data_len=60 (unbuffered)
2937 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
2939 OFPT_PACKET_IN (OF1.4) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via action_set) data_len=60 (unbuffered)
2940 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
2942 OFPT_PACKET_IN (OF1.4) (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
2943 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
2945 OFPT_PACKET_IN (OF1.4) (xid=0x0): table_id=2 cookie=0x0 total_len=60 in_port=1 (via group) data_len=60 (unbuffered)
2946 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
2948 OFPT_PACKET_IN (OF1.4) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via action_set) data_len=60 (unbuffered)
2949 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
2952 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2954 AT_CHECK([ovs-ofctl --protocols=OpenFlow14 dump-flows br0 | ofctl_strip | sort], [0], [dnl
2955 n_packets=3, n_bytes=180, in_port=1 actions=write_actions(CONTROLLER:65535),goto_table:1
2956 table=1, n_packets=3, n_bytes=180, actions=CONTROLLER:65535,goto_table:2
2957 table=2, n_packets=3, n_bytes=180, actions=group:1234
2958 OFPST_FLOW reply (OF1.4):
2965 AT_SETUP([ofproto-dpif - ARP modification slow-path])
2967 ADD_OF_PORTS([br0], [1], [2])
2969 ovs-vsctl -- set Interface p2 type=dummy options:pcap=p2.pcap
2970 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'
2972 # Input some packets that should follow the arp modification slow-path.
2974 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)'
2976 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2978 # Check the packets that were output.
2979 AT_CHECK([ovs-ofctl parse-pcap p2.pcap], [0], [dnl
2980 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
2981 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
2982 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
2983 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
2984 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
2985 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
2986 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
2987 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
2988 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
2994 AT_SETUP([ofproto-dpif - VLAN handling])
2996 [set Bridge br0 fail-mode=standalone -- \
2997 add-port br0 p1 trunks=10,12 -- \
2998 add-port br0 p2 tag=10 -- \
2999 add-port br0 p3 tag=12 \
3000 other-config:priority-tags=true -- \
3001 add-port br0 p4 tag=12 -- \
3002 add-port br0 p5 vlan_mode=native-tagged tag=10 -- \
3003 add-port br0 p6 vlan_mode=native-tagged tag=10 trunks=10,12 -- \
3004 add-port br0 p7 vlan_mode=native-untagged tag=12 -- \
3005 add-port br0 p8 vlan_mode=native-untagged tag=12 trunks=10,12 \
3006 other-config:priority-tags=true -- \
3007 set Interface p1 type=dummy -- \
3008 set Interface p2 type=dummy -- \
3009 set Interface p3 type=dummy -- \
3010 set Interface p4 type=dummy -- \
3011 set Interface p5 type=dummy -- \
3012 set Interface p6 type=dummy -- \
3013 set Interface p7 type=dummy -- \
3014 set Interface p8 type=dummy --])
3016 dnl Each of these specifies an in_port by number, a VLAN VID (or "none"),
3017 dnl a VLAN PCP (used if the VID isn't "none") and the expected set of datapath
3023 "100 10 0 1,5,6,7,8,pop_vlan,2" \
3024 "100 10 1 1,5,6,7,8,pop_vlan,2" \
3027 "100 12 0 1,5,6,pop_vlan,3,4,7,8" \
3028 "100 12 1 1,5,6,pop_vlan,4,7,push_vlan(vid=0,pcp=1),3,8" \
3032 "1 10 0 5,6,7,8,100,pop_vlan,2" \
3033 "1 10 1 5,6,7,8,100,pop_vlan,2" \
3036 "1 12 0 5,6,100,pop_vlan,3,4,7,8" \
3037 "1 12 1 5,6,100,pop_vlan,4,7,push_vlan(vid=0,pcp=1),3,8" \
3038 "2 none 0 push_vlan(vid=10,pcp=0),1,5,6,7,8,100" \
3039 "2 0 0 pop_vlan,push_vlan(vid=10,pcp=0),1,5,6,7,8,100" \
3040 "2 0 1 pop_vlan,push_vlan(vid=10,pcp=1),1,5,6,7,8,100" \
3047 "3 none 0 4,7,8,push_vlan(vid=12,pcp=0),1,5,6,100" \
3048 "3 0 0 pop_vlan,4,7,8,push_vlan(vid=12,pcp=0),1,5,6,100" \
3049 "3 0 1 8,pop_vlan,4,7,push_vlan(vid=12,pcp=1),1,5,6,100" \
3056 "4 none 0 3,7,8,push_vlan(vid=12,pcp=0),1,5,6,100" \
3057 "4 0 0 pop_vlan,3,7,8,push_vlan(vid=12,pcp=0),1,5,6,100" \
3058 "4 0 1 3,8,pop_vlan,7,push_vlan(vid=12,pcp=1),1,5,6,100" \
3065 "5 none 0 2,push_vlan(vid=10,pcp=0),1,6,7,8,100" \
3066 "5 0 0 pop_vlan,2,push_vlan(vid=10,pcp=0),1,6,7,8,100" \
3067 "5 0 1 pop_vlan,2,push_vlan(vid=10,pcp=1),1,6,7,8,100" \
3068 "5 10 0 1,6,7,8,100,pop_vlan,2" \
3069 "5 10 1 1,6,7,8,100,pop_vlan,2" \
3072 "5 12 0 1,6,100,pop_vlan,3,4,7,8" \
3073 "5 12 1 1,6,100,pop_vlan,4,7,push_vlan(vid=0,pcp=1),3,8" \
3074 "6 none 0 2,push_vlan(vid=10,pcp=0),1,5,7,8,100" \
3075 "6 0 0 pop_vlan,2,push_vlan(vid=10,pcp=0),1,5,7,8,100" \
3076 "6 0 1 pop_vlan,2,push_vlan(vid=10,pcp=1),1,5,7,8,100" \
3077 "6 10 0 1,5,7,8,100,pop_vlan,2" \
3078 "6 10 1 1,5,7,8,100,pop_vlan,2" \
3081 "6 12 0 1,5,100,pop_vlan,3,4,7,8" \
3082 "6 12 1 1,5,100,pop_vlan,4,7,push_vlan(vid=0,pcp=1),3,8" \
3083 "7 none 0 3,4,8,push_vlan(vid=12,pcp=0),1,5,6,100" \
3084 "7 0 0 pop_vlan,3,4,8,push_vlan(vid=12,pcp=0),1,5,6,100" \
3085 "7 0 1 3,8,pop_vlan,4,push_vlan(vid=12,pcp=1),1,5,6,100" \
3086 "7 10 0 1,5,6,8,100,pop_vlan,2" \
3087 "7 10 1 1,5,6,8,100,pop_vlan,2" \
3090 "7 12 0 1,5,6,100,pop_vlan,3,4,8" \
3091 "7 12 1 1,5,6,100,pop_vlan,4,push_vlan(vid=0,pcp=1),3,8" \
3092 "8 none 0 3,4,7,push_vlan(vid=12,pcp=0),1,5,6,100" \
3093 "8 0 0 pop_vlan,3,4,7,push_vlan(vid=12,pcp=0),1,5,6,100" \
3094 "8 0 1 3,pop_vlan,4,7,push_vlan(vid=12,pcp=1),1,5,6,100" \
3095 "8 10 0 1,5,6,7,100,pop_vlan,2" \
3096 "8 10 1 1,5,6,7,100,pop_vlan,2" \
3099 "8 12 0 1,5,6,100,pop_vlan,3,4,7" \
3100 "8 12 1 1,5,6,100,pop_vlan,4,7,push_vlan(vid=0,pcp=1),3"
3108 if test $vlan = none; then
3109 flow="in_port($in_port),eth(src=50:54:00:00:00:01,dst=ff:ff:ff:ff:ff:ff),eth_type(0xabcd)"
3111 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))"
3114 echo "----------------------------------------------------------------------"
3115 echo "in_port=$in_port vlan=$vlan pcp=$pcp"
3117 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
3118 actual=`tail -1 stdout | sed 's/Datapath actions: //'`
3120 AT_CHECK([ovs-dpctl normalize-actions "$flow" "$expected"], [0], [stdout])
3122 AT_CHECK([ovs-dpctl normalize-actions "$flow" "$actual"], [0], [expout])
3128 AT_SETUP([ofproto-dpif - MPLS handling])
3129 OVS_VSWITCHD_START([dnl
3130 add-port br0 p1 -- set Interface p1 type=dummy
3132 ON_EXIT([kill `cat ovs-ofctl.pid`])
3134 AT_CAPTURE_FILE([ofctl_monitor.log])
3135 AT_DATA([flows.txt], [dnl
3136 dl_src=40:44:44:44:00:00 actions=push_mpls:0x8847,controller
3137 dl_src=40:44:44:44:00:01,mpls actions=push_mpls:0x8847,controller
3138 dl_src=40:44:44:44:00:02,mpls actions=push_mpls:0x8848,controller
3140 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 add-flows br0 flows.txt])
3142 dnl In this test, we push an MPLS tag to an ethernet packet.
3143 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
3146 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)'
3148 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3149 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
3151 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
3152 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3153 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
3154 00000000 50 54 00 00 00 07 40 44-44 44 00 00 88 47 00 00
3155 00000010 01 40 45 00 00 28 00 00-00 00 40 06 f9 7c c0 a8
3156 00000020 00 01 c0 a8 00 02 00 00-00 00 00 00 00 00 00 00
3157 00000030 00 00 50 00 00 00 00 00-00 00 00 00 00 00 00 00
3159 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3160 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
3161 00000000 50 54 00 00 00 07 40 44-44 44 00 00 88 47 00 00
3162 00000010 01 40 45 00 00 28 00 00-00 00 40 06 f9 7c c0 a8
3163 00000020 00 01 c0 a8 00 02 00 00-00 00 00 00 00 00 00 00
3164 00000030 00 00 50 00 00 00 00 00-00 00 00 00 00 00 00 00
3166 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3167 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
3168 00000000 50 54 00 00 00 07 40 44-44 44 00 00 88 47 00 00
3169 00000010 01 40 45 00 00 28 00 00-00 00 40 06 f9 7c c0 a8
3170 00000020 00 01 c0 a8 00 02 00 00-00 00 00 00 00 00 00 00
3171 00000030 00 00 50 00 00 00 00 00-00 00 00 00 00 00 00 00
3174 dnl In this test, we push an MPLS tag to an MPLS packet. The LSE should be
3175 dnl copied exactly, except for the BOS bit.
3176 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
3179 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)'
3181 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3182 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
3184 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
3185 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3186 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
3187 00000000 50 54 00 00 00 07 40 44-44 44 00 01 88 47 00 00
3188 00000010 a0 40 00 00 a1 40 00 00-00 00 00 00 00 00 00 00
3189 00000020 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
3190 00000030 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
3192 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3193 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
3194 00000000 50 54 00 00 00 07 40 44-44 44 00 01 88 47 00 00
3195 00000010 a0 40 00 00 a1 40 00 00-00 00 00 00 00 00 00 00
3196 00000020 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
3197 00000030 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
3199 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3200 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
3201 00000000 50 54 00 00 00 07 40 44-44 44 00 01 88 47 00 00
3202 00000010 a0 40 00 00 a1 40 00 00-00 00 00 00 00 00 00 00
3203 00000020 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
3204 00000030 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
3207 dnl In this test, we push an MPLS tag to an MPLS packet. The LSE should be
3208 dnl copied exactly, except for the BOS bit. The ethertype should be updated
3209 dnl to the MPLS ethertype of the MPLS push action which differs to that
3210 dnl of the input packet.
3211 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
3214 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)'
3216 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3217 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
3219 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
3220 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3221 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
3222 00000000 50 54 00 00 00 07 40 44-44 44 00 02 88 48 00 00
3223 00000010 a0 40 00 00 a1 40 00 00-00 00 00 00 00 00 00 00
3224 00000020 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
3225 00000030 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
3227 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3228 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
3229 00000000 50 54 00 00 00 07 40 44-44 44 00 02 88 48 00 00
3230 00000010 a0 40 00 00 a1 40 00 00-00 00 00 00 00 00 00 00
3231 00000020 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
3232 00000030 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
3234 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3235 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
3236 00000000 50 54 00 00 00 07 40 44-44 44 00 02 88 48 00 00
3237 00000010 a0 40 00 00 a1 40 00 00-00 00 00 00 00 00 00 00
3238 00000020 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
3239 00000030 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
3245 AT_SETUP([ofproto-dpif - VLAN+MPLS handling])
3246 OVS_VSWITCHD_START([dnl
3247 add-port br0 p1 -- set Interface p1 type=dummy
3249 ON_EXIT([kill `cat ovs-ofctl.pid`])
3251 AT_CAPTURE_FILE([ofctl_monitor.log])
3252 AT_DATA([flows.txt], [dnl
3253 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
3254 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
3255 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
3256 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
3257 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
3258 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
3259 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
3260 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
3261 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
3262 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
3264 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 add-flows br0 flows.txt])
3266 dnl Modified MPLS controller action.
3267 dnl In this test, we push the MPLS tag before pushing a VLAN tag, so we see
3268 dnl both of these in the final flow
3269 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
3272 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)'
3274 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3275 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
3277 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
3278 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3279 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
3280 00000000 50 54 00 00 00 07 40 44-44 44 54 50 81 00 20 63
3281 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3282 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3283 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3284 00000040 00 00 00 00
3286 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3287 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
3288 00000000 50 54 00 00 00 07 40 44-44 44 54 50 81 00 20 63
3289 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3290 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3291 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3292 00000040 00 00 00 00
3294 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3295 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
3296 00000000 50 54 00 00 00 07 40 44-44 44 54 50 81 00 20 63
3297 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3298 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3299 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3300 00000040 00 00 00 00
3303 dnl Modified MPLS controller action.
3304 dnl In this test, the input packet in vlan-tagged, which should be stripped
3305 dnl before we push the MPLS and VLAN tags.
3306 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
3309 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))'
3311 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3312 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
3314 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
3315 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3316 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
3317 00000000 50 54 00 00 00 07 40 44-44 44 54 51 81 00 20 63
3318 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3319 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3320 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3322 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3323 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
3324 00000000 50 54 00 00 00 07 40 44-44 44 54 51 81 00 20 63
3325 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3326 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3327 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3329 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3330 mpls,in_port=0,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:54:51,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1
3331 00000000 50 54 00 00 00 07 40 44-44 44 54 51 81 00 20 63
3332 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3333 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3334 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3337 dnl Modified MPLS controller action.
3338 dnl In this test, we push the MPLS tag before pushing a VLAN tag, so we see
3339 dnl both of these in the final flow
3340 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
3343 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)'
3345 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3346 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
3348 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
3349 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3350 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
3351 00000000 52 54 00 00 00 07 40 44-44 44 54 52 81 00 20 63
3352 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3353 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3354 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3355 00000040 00 00 00 00
3357 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3358 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
3359 00000000 52 54 00 00 00 07 40 44-44 44 54 52 81 00 20 63
3360 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3361 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3362 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3363 00000040 00 00 00 00
3365 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3366 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
3367 00000000 52 54 00 00 00 07 40 44-44 44 54 52 81 00 20 63
3368 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3369 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3370 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3371 00000040 00 00 00 00
3374 dnl Modified MPLS controller action.
3375 dnl In this test, the input packet in vlan-tagged, which should be stripped
3376 dnl before we push the MPLS and VLAN tags.
3377 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
3380 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))'
3382 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3383 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
3385 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
3386 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3387 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
3388 00000000 50 54 00 00 00 07 40 44-44 44 54 53 81 00 20 63
3389 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3390 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3391 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3393 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3394 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
3395 00000000 50 54 00 00 00 07 40 44-44 44 54 53 81 00 20 63
3396 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3397 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3398 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3400 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3401 mpls,in_port=0,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:54:53,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1
3402 00000000 50 54 00 00 00 07 40 44-44 44 54 53 81 00 20 63
3403 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3404 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3405 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3408 dnl Modified MPLS controller action.
3409 dnl In this test, we push the VLAN tag before pushing a MPLS tag, but these
3410 dnl actions are reordered, so we see both of these in the final flow.
3411 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
3414 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)'
3416 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3417 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
3419 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
3420 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3421 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
3422 00000000 50 54 00 00 00 07 40 44-44 44 54 54 81 00 20 63
3423 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3424 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3425 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3426 00000040 00 00 00 00
3428 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3429 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
3430 00000000 50 54 00 00 00 07 40 44-44 44 54 54 81 00 20 63
3431 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3432 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3433 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3434 00000040 00 00 00 00
3436 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3437 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
3438 00000000 50 54 00 00 00 07 40 44-44 44 54 54 81 00 20 63
3439 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3440 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3441 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3442 00000040 00 00 00 00
3445 dnl Modified MPLS controller action.
3446 dnl In this test, the input packet in vlan-tagged, which should be stripped
3447 dnl before we push the MPLS and VLAN tags.
3448 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
3451 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))'
3453 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3454 OVS_APP_EXIT_AND_WAIT([ovs-ofctl])
3456 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
3457 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3458 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
3459 00000000 50 54 00 00 00 07 40 44-44 44 54 55 81 00 20 63
3460 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3461 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3462 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3464 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3465 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
3466 00000000 50 54 00 00 00 07 40 44-44 44 54 55 81 00 20 63
3467 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3468 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3469 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3471 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3472 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
3473 00000000 50 54 00 00 00 07 40 44-44 44 54 55 81 00 20 63
3474 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3475 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3476 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3479 dnl Modified MPLS controller action.
3480 dnl In this test, we push the VLAN tag before pushing a MPLS tag, but these
3481 dnl actions are reordered, so we see both of these in the final flow.
3482 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
3485 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)'
3487 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3488 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
3490 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
3491 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3492 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
3493 00000000 50 54 00 00 00 07 40 44-44 44 54 56 81 00 20 63
3494 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3495 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3496 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3497 00000040 00 00 00 00
3499 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3500 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
3501 00000000 50 54 00 00 00 07 40 44-44 44 54 56 81 00 20 63
3502 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3503 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3504 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3505 00000040 00 00 00 00
3507 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3508 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
3509 00000000 50 54 00 00 00 07 40 44-44 44 54 56 81 00 20 63
3510 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3511 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3512 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3513 00000040 00 00 00 00
3516 dnl Modified MPLS controller action.
3517 dnl In this test, the input packet in vlan-tagged, which should be stripped
3518 dnl before we push the MPLS and VLAN tags.
3519 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 -m 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
3522 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))'
3524 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3525 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
3527 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
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:57,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 57 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
3535 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3536 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
3537 00000000 50 54 00 00 00 07 40 44-44 44 54 57 81 00 20 63
3538 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3539 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3540 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3542 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3543 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
3544 00000000 50 54 00 00 00 07 40 44-44 44 54 57 81 00 20 63
3545 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3546 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3547 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3550 dnl Modified MPLS controller action.
3551 dnl In this test, the input packet in vlan-tagged, which should be stripped
3552 dnl before we push the MPLS and VLAN tags.
3553 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
3556 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))'
3558 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3559 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
3561 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
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:58,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 58 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
3569 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3570 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
3571 00000000 50 54 00 00 00 07 40 44-44 44 54 58 81 00 20 63
3572 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3573 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3574 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3576 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3577 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
3578 00000000 50 54 00 00 00 07 40 44-44 44 54 58 81 00 20 63
3579 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3580 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3581 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3584 dnl Modified MPLS controller action.
3585 dnl In this test, the input packet in vlan-tagged, which should be modified
3586 dnl before we push MPLS and VLAN tags.
3587 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
3590 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))'
3592 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3593 ovs-appctl -t ovs-ofctl exit
3595 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
3596 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3597 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
3598 00000000 50 54 00 00 00 07 40 44-44 44 54 59 81 00 20 63
3599 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3600 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3601 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3603 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3604 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
3605 00000000 50 54 00 00 00 07 40 44-44 44 54 59 81 00 20 63
3606 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3607 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3608 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3610 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3611 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
3612 00000000 50 54 00 00 00 07 40 44-44 44 54 59 81 00 20 63
3613 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3614 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3615 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3618 AT_CHECK([ovs-appctl revalidator/purge], [0])
3619 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
3620 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
3621 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
3622 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
3623 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
3624 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
3625 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
3626 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
3627 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
3628 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
3629 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
3630 OFPST_FLOW reply (OF1.2):
3636 AT_SETUP([ofproto-dpif - fragment handling - trace])
3638 ADD_OF_PORTS([br0], [1], [2], [3], [4], [5], [6], [90])
3639 AT_DATA([flows.txt], [dnl
3640 priority=75 tcp ip_frag=no tp_dst=80 actions=move:OXM_OF_TCP_DST[[]]->OXM_OF_TCP_SRC[[]],output:1
3641 priority=75 tcp ip_frag=first tp_dst=80 actions=move:OXM_OF_TCP_DST[[]]->OXM_OF_TCP_SRC[[]],output:2
3642 priority=50 tcp ip_frag=no actions=move:OXM_OF_TCP_DST[[]]->OXM_OF_TCP_SRC[[]],output:4
3643 priority=50 tcp ip_frag=first actions=move:OXM_OF_TCP_DST[[]]->OXM_OF_TCP_SRC[[]],output:5
3644 priority=50 tcp ip_frag=later actions=output:6
3646 AT_CHECK([ovs-ofctl replace-flows br0 flows.txt])
3648 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"
3649 no_flow="$base_flow,frag=no),tcp(src=12345,dst=80)"
3650 first_flow="$base_flow,frag=first),tcp(src=12345,dst=80)"
3651 later_flow="$base_flow,frag=later)"
3653 # mode no first later
3656 'drop 1 drop drop' \
3665 AT_CHECK([ovs-ofctl set-frags br0 $mode])
3666 for type in no first later; do
3667 eval flow=\$${type}_flow exp_output=\$$type
3668 printf "\n%s\n" "----$mode $type-----"
3669 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
3671 if test $mode = drop && test $type != no; then
3672 echo 'Packets dropped because they are IP fragments and the fragment handling mode is "drop".' >> expout
3673 echo "Datapath actions: $exp_output" >> expout
3674 elif test $type = later; then
3675 echo "Datapath actions: $exp_output" >> expout
3677 echo "Datapath actions: set(tcp(src=80,dst=80)),$exp_output" >> expout
3679 AT_CHECK([grep 'IP fragments' stdout; tail -1 stdout], [0], [expout])
3685 AT_SETUP([ofproto-dpif - fragment handling - upcall])
3687 ADD_OF_PORTS([br0], [1], [2], [3], [4], [5], [6], [90])
3688 AT_DATA([flows.txt], [dnl
3689 priority=75 tcp ip_frag=no tp_dst=80 actions=set_field:81->tcp_dst,output:1
3690 priority=75 tcp ip_frag=first tp_dst=80 actions=set_field:81->tcp_dst,output:2
3691 priority=50 tcp ip_frag=no actions=set_field:81->tcp_dst,output:4
3692 priority=50 tcp ip_frag=first actions=set_field:81->tcp_dst,output:5
3693 priority=50 tcp ip_frag=later actions=output:6
3695 AT_CHECK([ovs-ofctl replace-flows br0 flows.txt])
3697 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"
3698 no_flow="$base_flow,frag=no),tcp(src=12345,dst=80)"
3699 first_flow="$base_flow,frag=first),tcp(src=12345,dst=80)"
3700 later_flow="$base_flow,frag=later)"
3702 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
3706 AT_CHECK([ovs-ofctl set-frags br0 $mode])
3707 for type in no first later; do
3708 eval flow=\$${type}_flow
3709 printf "\n%s\n" "----$mode $type-----"
3711 AT_CHECK([ovs-appctl netdev-dummy/receive p90 "$flow"], [0], [stdout])
3714 AT_CHECK([ovs-appctl dpctl/dump-flows], [0], [dnl
3715 flow-dump from non-dpdk interfaces:
3716 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
3717 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
3718 recirc_id(0),in_port(90),eth_type(0x0800),ipv4(proto=6,frag=later), packets:0, bytes:0, used:never, actions:6
3723 AT_CHECK([ovs-appctl revalidator/purge], [0])
3724 AT_CHECK([ovs-ofctl set-frags br0 $mode])
3725 for type in no first later; do
3726 eval flow=\$${type}_flow
3727 printf "\n%s\n" "----$mode $type-----"
3729 AT_CHECK([ovs-appctl netdev-dummy/receive p90 "$flow"], [0], [stdout])
3732 AT_CHECK([ovs-appctl dpctl/dump-flows], [0], [dnl
3733 flow-dump from non-dpdk interfaces:
3734 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
3735 recirc_id(0),in_port(90),eth_type(0x0800),ipv4(frag=first), packets:0, bytes:0, used:never, actions:drop
3736 recirc_id(0),in_port(90),eth_type(0x0800),ipv4(frag=later), packets:0, bytes:0, used:never, actions:drop
3741 AT_CHECK([ovs-appctl revalidator/purge], [0])
3742 AT_CHECK([ovs-ofctl set-frags br0 $mode])
3743 for type in no first later; do
3744 eval flow=\$${type}_flow
3745 printf "\n%s\n" "----$mode $type-----"
3747 AT_CHECK([ovs-appctl netdev-dummy/receive p90 "$flow"], [0], [stdout])
3750 AT_CHECK([ovs-appctl dpctl/dump-flows], [0], [dnl
3751 flow-dump from non-dpdk interfaces:
3752 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
3753 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
3754 recirc_id(0),in_port(90),eth_type(0x0800),ipv4(proto=6,frag=later), packets:0, bytes:0, used:never, actions:6
3760 AT_SETUP([ofproto-dpif - fragment handling - actions])
3762 ADD_OF_PORTS([br0], [1], [2], [3], [4], [5], [6], [90])
3764 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])
3765 AT_CHECK([tail -2 stderr | sed 's/^.*|WARN|//'], [0], [dnl
3766 source field tcp_dst lacks correct prerequisites
3767 ovs-ofctl: actions are invalid with specified match (OFPBAC_MATCH_INCONSISTENT)
3770 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])
3771 AT_CHECK([tail -2 stderr | sed 's/^.*|WARN|//'], [0], [dnl
3772 destination field tcp_src lacks correct prerequisites
3773 ovs-ofctl: actions are invalid with specified match (OFPBAC_MATCH_INCONSISTENT)
3776 AT_CHECK([ovs-ofctl add-flow br0 "udp,ip_frag=later actions=set_field:8888->udp_src,output:1"], [1], [], [stderr])
3777 AT_CHECK([tail -2 stderr | sed 's/^.*|WARN|//'], [0], [dnl
3778 set_field udp_src lacks correct prerequisities
3779 ovs-ofctl: actions are invalid with specified match (OFPBAC_MATCH_INCONSISTENT)
3782 AT_CHECK([ovs-ofctl add-flow br0 "udp,ip_frag=later actions=load:8888->NXM_OF_UDP_DST[[]],output:1"], [1], [], [stderr])
3783 AT_CHECK([tail -2 stderr | sed 's/^.*|WARN|//'], [0], [dnl
3784 set_field udp_dst lacks correct prerequisities
3785 ovs-ofctl: actions are invalid with specified match (OFPBAC_MATCH_INCONSISTENT)
3788 AT_CHECK([ovs-ofctl add-flow br0 "sctp,ip_frag=later actions=set_field:8888->sctp_src,output:1"], [1], [], [stderr])
3789 AT_CHECK([tail -2 stderr | sed 's/^.*|WARN|//'], [0], [dnl
3790 set_field sctp_src lacks correct prerequisities
3791 ovs-ofctl: actions are invalid with specified match (OFPBAC_MATCH_INCONSISTENT)
3794 AT_CHECK([ovs-ofctl add-flow br0 "sctp,ip_frag=later actions=set_field:8888->sctp_dst,output:1"], [1], [], [stderr])
3795 AT_CHECK([tail -2 stderr | sed 's/^.*|WARN|//'], [0], [dnl
3796 set_field sctp_dst lacks correct prerequisities
3797 ovs-ofctl: actions are invalid with specified match (OFPBAC_MATCH_INCONSISTENT)
3800 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])
3801 AT_CHECK([tail -2 stderr | sed 's/^.*|WARN|//'], [0], [dnl
3802 source field tcp_dst lacks correct prerequisites
3803 ovs-ofctl: actions are invalid with specified match (OFPBAC_MATCH_INCONSISTENT)
3806 AT_DATA([flows.txt], [dnl
3807 priority=75 tcp actions=load:42->OXM_OF_TCP_SRC[[0..7]],output:1
3809 AT_CHECK([ovs-ofctl -O OpenFlow12 replace-flows br0 flows.txt])
3811 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
3815 AT_CHECK([ovs-ofctl set-frags br0 $mode])
3816 for frag in 4000 6000 6008 4010; do
3817 printf "\n%s\n" "----$mode $frag-----"
3819 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"])
3822 AT_CHECK([ovs-appctl dpctl/dump-flows | sed 's/used:[[0-9]].[[0-9]]*s/used:0.001s/'], [0], [dnl
3823 flow-dump from non-dpdk interfaces:
3824 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
3825 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
3826 recirc_id(0),in_port(90),eth_type(0x0800),ipv4(proto=6,frag=later), packets:1, bytes:74, used:0.001s, actions:1
3829 AT_CHECK([ovs-appctl revalidator/purge], [0])
3830 AT_CHECK([ovs-ofctl set-frags br0 $mode])
3831 for frag in 4000 6000 6008 4010; do
3832 printf "\n%s\n" "----$mode $frag truncated transport header -----"
3834 AT_CHECK([ovs-appctl netdev-dummy/receive p90 "0021853763af 0026b98cb0f9 0800 4500 0018 2e24 $frag 40 06 465d ac11370d ac11370b 828b 0016"])
3837 AT_CHECK([ovs-appctl dpctl/dump-flows | sed 's/used:[[0-9]].[[0-9]]*s/used:0.001s/'], [0], [dnl
3838 flow-dump from non-dpdk interfaces:
3839 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
3840 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
3841 recirc_id(0),in_port(90),eth_type(0x0800),ipv4(proto=6,frag=later), packets:1, bytes:60, used:0.001s, actions:1
3844 AT_CHECK([ovs-appctl revalidator/purge], [0])
3845 AT_CHECK([ovs-ofctl set-frags br0 $mode])
3846 for frag in 4000 6000 6001 4002; do
3847 printf "\n%s\n" "----$mode $frag missing transport header-----"
3849 AT_CHECK([ovs-appctl netdev-dummy/receive p90 "0021853763af 0026b98cb0f9 0800 4500 0014 2e24 $frag 40 06 465d ac11370d ac11370b"])
3852 AT_CHECK([ovs-appctl dpctl/dump-flows | sed 's/used:[[0-9]].[[0-9]]*s/used:0.001s/'], [0], [dnl
3853 flow-dump from non-dpdk interfaces:
3854 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
3855 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
3856 recirc_id(0),in_port(90),eth_type(0x0800),ipv4(proto=6,frag=later), packets:1, bytes:60, used:0.001s, actions:1
3862 AT_SETUP([ofproto-dpif - exit])
3864 ADD_OF_PORTS([br0], [1], [2], [3], [10], [11], [12], [13], [14])
3865 AT_DATA([flows.txt], [dnl
3866 in_port=1 actions=output:10,exit,output:11
3867 in_port=2 actions=output:12,resubmit:1,output:12
3868 in_port=3 actions=output:13,resubmit:2,output:14
3870 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
3871 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])
3872 AT_CHECK([tail -1 stdout], [0],
3873 [Datapath actions: 10
3875 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])
3876 AT_CHECK([tail -1 stdout], [0],
3877 [Datapath actions: 12,10
3879 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])
3880 AT_CHECK([tail -1 stdout], [0],
3881 [Datapath actions: 13,12,10
3887 AT_SETUP([ofproto-dpif - mirroring, select_all])
3889 ADD_OF_PORTS([br0], 1, 2, 3)
3891 set Bridge br0 mirrors=@m --\
3892 --id=@p3 get Port p3 --\
3893 --id=@m create Mirror name=mymirror select_all=true output_port=@p3
3895 AT_DATA([flows.txt], [dnl
3896 in_port=1 actions=output:2
3897 in_port=2 actions=output:1
3899 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
3901 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)"
3902 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
3903 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
3904 [Datapath actions: 2,3
3907 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)"
3908 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
3909 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
3910 [Datapath actions: 1,3
3917 AT_SETUP([ofproto-dpif - mirroring, select_src])
3919 ADD_OF_PORTS([br0], 1, 2, 3)
3921 set Bridge br0 mirrors=@m --\
3922 --id=@p1 get Port p1 -- --id=@p3 get Port p3 --\
3923 --id=@m create Mirror name=mymirror select_src_port=@p1 output_port=@p3
3925 AT_DATA([flows.txt], [dnl
3926 in_port=1 actions=output:2
3927 in_port=2 actions=output:1
3929 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
3931 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)"
3932 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
3933 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
3934 [Datapath actions: 2,3
3937 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)"
3938 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
3939 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
3940 [Datapath actions: 1
3945 AT_SETUP([ofproto-dpif - mirroring, OFPP_NONE ingress port])
3947 ADD_OF_PORTS([br0], 1, 2)
3949 set Bridge br0 mirrors=@m --\
3950 --id=@p2 get Port p2 --\
3951 --id=@m create Mirror name=mymirror select_all=true output_port=@p2
3953 AT_CHECK([ovs-ofctl add-flow br0 action=output:1])
3955 # "in_port" defaults to OFPP_NONE if it's not specified.
3956 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"
3957 AT_CHECK([ovs-appctl ofproto/trace br0 "$flow"], [0], [stdout])
3958 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
3959 [Datapath actions: 1,2
3966 AT_SETUP([ofproto-dpif - mirroring, select_dst])
3968 ADD_OF_PORTS([br0], 1, 2, 3)
3970 set Bridge br0 mirrors=@m --\
3971 --id=@p2 get Port p2 -- --id=@p3 get Port p3 --\
3972 --id=@m create Mirror name=mymirror select_dst_port=@p2 output_port=@p3
3974 AT_DATA([flows.txt], [dnl
3975 in_port=1 actions=output:2
3976 in_port=2 actions=output:1
3978 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
3980 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)"
3981 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
3982 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
3983 [Datapath actions: 2,3
3986 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)"
3987 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
3988 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
3989 [Datapath actions: 1
3996 AT_SETUP([ofproto-dpif - mirroring, select_vlan])
3998 ADD_OF_PORTS([br0], 1, 2, 3)
4000 set Bridge br0 mirrors=@m --\
4001 --id=@p2 get Port p2 -- --id=@p3 get Port p3 --\
4002 --id=@m create Mirror name=mymirror select_all=true select_vlan=11 output_port=@p3
4004 AT_DATA([flows.txt], [dnl
4005 in_port=1, actions=output:2
4007 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
4009 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)"
4010 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
4011 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
4012 [Datapath actions: 2
4015 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))"
4016 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
4017 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
4018 [Datapath actions: 2
4021 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))"
4022 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
4023 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
4024 [Datapath actions: 2,3
4031 AT_SETUP([ofproto-dpif - mirroring, output_port])
4033 ADD_OF_PORTS([br0], 1, 2, 3)
4035 set Bridge br0 mirrors=@m --\
4036 --id=@p3 get Port p3 --\
4037 --id=@m create Mirror name=mymirror select_all=true output_port=@p3
4039 AT_DATA([flows.txt], [dnl
4040 in_port=1 actions=mod_vlan_vid:17,output:2
4041 in_port=2 actions=output:1
4043 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
4045 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)"
4046 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
4047 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
4048 [Datapath actions: push_vlan(vid=17,pcp=0),2,pop_vlan,3
4051 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)"
4052 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
4053 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
4054 [Datapath actions: 1,3
4060 AT_SETUP([ofproto-dpif - mirroring, output_vlan])
4062 ADD_OF_PORTS([br0], 1, 2)
4064 set Bridge br0 mirrors=@m --\
4065 --id=@m create Mirror name=mymirror select_all=true output_vlan=12
4067 AT_DATA([flows.txt], [dnl
4068 in_port=1 actions=output:2
4069 in_port=2 actions=mod_vlan_vid:17,output:1
4071 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
4073 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)"
4074 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
4075 actual=`tail -1 stdout | sed 's/Datapath actions: //'`
4077 expected="2,push_vlan(vid=12,pcp=0),1,2,100"
4078 AT_CHECK([ovs-dpctl normalize-actions "$flow" "$expected"], [0], [stdout])
4080 AT_CHECK([ovs-dpctl normalize-actions "$flow" "$actual"], [0], [expout])
4082 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)"
4083 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
4084 actual=`tail -1 stdout | sed 's/Datapath actions: //'`
4086 expected="push_vlan(vid=17,pcp=0),1,pop_vlan,push_vlan(vid=12,pcp=0),1,2,100"
4087 AT_CHECK([ovs-dpctl normalize-actions "$flow" "$expected"], [0], [stdout])
4089 AT_CHECK([ovs-dpctl normalize-actions "$flow" "$actual"], [0], [expout])
4094 # Two testcases below are for the ofproto/trace command
4095 # The first one tests all correct syntax:
4096 # ofproto/trace [dp_name] odp_flow [-generate|packet]
4097 # ofproto/trace br_name br_flow [-generate|packet]
4098 AT_SETUP([ofproto-dpif - ofproto/trace command 1])
4099 OVS_VSWITCHD_START([set bridge br0 fail-mode=standalone])
4100 ADD_OF_PORTS([br0], 1, 2, 3)
4102 AT_DATA([flows.txt], [dnl
4103 in_port=1 actions=output:2
4104 in_port=2 actions=output:1
4106 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
4108 odp_flow="in_port(1)"
4110 # Test command: ofproto/trace odp_flow with in_port as a name.
4111 AT_CHECK([ovs-appctl ofproto/trace "$odp_flow"], [0], [stdout])
4112 AT_CHECK([tail -1 stdout], [0], [dnl
4116 odp_flow="in_port(1)"
4117 # Test command: ofproto/trace odp_flow
4118 AT_CHECK([ovs-appctl ofproto/trace "$odp_flow"], [0], [stdout])
4119 AT_CHECK([tail -1 stdout], [0], [dnl
4123 # Test command: ofproto/trace dp_name odp_flow
4124 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$odp_flow"], [0], [stdout])
4125 AT_CHECK([tail -1 stdout], [0], [dnl
4128 # Test commmand: ofproto/trace br_name br_flow
4129 AT_CHECK([ovs-appctl ofproto/trace br0 "$br_flow"], [0], [stdout])
4130 AT_CHECK([tail -1 stdout], [0], [dnl
4134 # Delete the inserted flows
4135 AT_CHECK([ovs-ofctl del-flows br0 "in_port=1"], [0], [stdout])
4136 AT_CHECK([ovs-ofctl del-flows br0 "in_port=2"], [0], [stdout])
4138 # This section below tests the [-generate] option
4139 odp_flow="in_port(3),eth(src=50:54:00:00:00:05,dst=ff:ff:ff:ff:ff:ff)"
4140 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"
4142 # Test command: ofproto/trace odp_flow
4143 AT_CHECK([ovs-appctl ofproto/trace "$odp_flow"], [0], [stdout])
4144 # Check for no MAC learning entry
4145 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
4149 # Test command: ofproto/trace br_name br_flow
4150 AT_CHECK([ovs-appctl ofproto/trace br0 "$br_flow"], [0], [stdout])
4151 # Check for no MAC learning entry
4152 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
4156 # Test command: ofproto/trace odp_flow -generate
4157 AT_CHECK([ovs-appctl ofproto/trace "$odp_flow" -generate], [0], [stdout])
4158 # Check for the MAC learning entry
4159 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
4161 3 0 50:54:00:00:00:05 ?
4164 # Test command: ofproto/trace dp_name odp_flow -generate
4165 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy \
4166 "in_port(1),eth(src=50:54:00:00:00:06,dst=50:54:00:00:00:05)" \
4167 -generate], [0], [stdout])
4168 # Check for both MAC learning entries
4169 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
4171 3 0 50:54:00:00:00:05 ?
4172 1 0 50:54:00:00:00:06 ?
4175 # Test command: ofproto/trace br_name br_flow -generate
4176 AT_CHECK([ovs-appctl ofproto/trace br0 \
4177 "in_port=2,dl_src=50:54:00:00:00:07,dl_dst=50:54:00:00:00:06" \
4178 -generate], [0], [stdout])
4179 # Check for both MAC learning entries.
4180 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
4182 3 0 50:54:00:00:00:05 ?
4183 1 0 50:54:00:00:00:06 ?
4184 2 0 50:54:00:00:00:07 ?
4187 # This section beflow tests the [packet] option
4188 # The ovs-tcpundump of packets between port1 and port2
4189 pkt1to2="50540000000250540000000108064500001C000100004001F98CC0A80001C0A800020800F7FF00000000"
4190 pkt2to1="50540000000150540000000208064500001C000100004001F98CC0A80002C0A800010800F7FF00000000"
4192 # Construct the MAC learning table
4193 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy \
4194 "in_port(1),eth(src=50:54:00:00:00:01,dst=ff:ff:ff:ff:ff:ff)" \
4195 -generate], [0], [stdout])
4197 # Construct the MAC learning table
4198 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy \
4199 "in_port(2),eth(src=50:54:00:00:00:02,dst=ff:ff:ff:ff:ff:ff)" \
4200 -generate], [0], [stdout])
4202 # Test command: ofproto/trace odp_flow packet
4203 AT_CHECK([ovs-appctl ofproto/trace \
4204 "in_port(1),skb_priority(1),skb_mark(2)" "$pkt1to2"], [0], [stdout])
4205 AT_CHECK([tail -1 stdout], [0], [dnl
4208 AT_CHECK([head -n 2 stdout], [0], [dnl
4210 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
4213 # Test command: ofproto/trace dp_name odp_flow packet
4214 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy \
4215 "in_port(1),skb_priority(1),skb_mark(2)" "$pkt1to2"], [0], [stdout])
4216 AT_CHECK([tail -1 stdout], [0], [dnl
4219 AT_CHECK([head -n 2 stdout], [0], [dnl
4221 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
4224 # Test command: ofproto/trace br_name br_flow packet
4225 AT_CHECK([ovs-appctl ofproto/trace br0 \
4226 "in_port=2,skb_priority=2,pkt_mark=1" "$pkt2to1"], [0], [stdout],[stderr])
4227 AT_CHECK([tail -1 stdout], [0], [dnl
4230 AT_CHECK([head -n 2 stdout], [0], [dnl
4232 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
4238 # The second test tests the corner cases
4239 AT_SETUP([ofproto-dpif - ofproto/trace command 2])
4241 ADD_OF_PORTS([br0], 1, 2)
4244 odp_flow="in_port(1),eth(src=50:54:00:00:00:01,dst=50:54:00:00:00:02)"
4245 br_flow="in_port=1,dl_src=50:54:00:00:00:01,dl_dst=50:54:00:00:00:02"
4247 generate="-generate"
4248 pkt="50540000000250540000000108064500001C000100004001F98CC0A80001C0A800020800F7FF00000000"
4250 # Test incorrect command: ofproto/trace wrong_name odp_flow [-generate|packet]
4256 [AT_CHECK([ovs-appctl ofproto/trace wrong_name "$odp_flow" option],
4258 AT_CHECK([tail -2 stderr], [0], [dnl
4259 Cannot find the datapath
4260 ovs-appctl: ovs-vswitchd: server returned an error
4263 # Test incorrect command: ofproto/trace empty_string odp_flow [-generate|packet]
4269 [AT_CHECK([ovs-appctl ofproto/trace "" "$odp_flow" option],
4271 AT_CHECK([tail -2 stderr], [0], [dnl
4272 Cannot find the datapath
4273 ovs-appctl: ovs-vswitchd: server returned an error
4276 # Test incorrect command: ofproto/trace nonexist_dp_name odp_flow [-generate|packet]
4282 [AT_CHECK([ovs-appctl ofproto/trace ovs-system "$odp_flow" option],
4284 AT_CHECK([tail -2 stderr], [0], [dnl
4285 Cannot find the datapath
4286 ovs-appctl: ovs-vswitchd: server returned an error
4289 # Test incorrect command: ofproto/trace br_name odp_flow [-generate|packet]
4295 [AT_CHECK([ovs-appctl ofproto/trace br0 "$odp_flow" option],
4297 AT_CHECK([tail -2 stderr], [0], [dnl
4298 Cannot find the datapath
4299 ovs-appctl: ovs-vswitchd: server returned an error
4302 # Test incorrect command: ofproto/trace dp_name br_flow [-generate|packet]
4308 [AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$br_flow" option],
4310 AT_CHECK([tail -2 stderr], [0], [dnl
4312 ovs-appctl: ovs-vswitchd: server returned an error
4315 # Test incorrect command: ofproto/trace br_flow [-generate|packet]
4321 [AT_CHECK([ovs-appctl ofproto/trace "$br_flow" option],
4323 AT_CHECK([tail -2 stderr], [0], [dnl
4324 Must specify bridge name
4325 ovs-appctl: ovs-vswitchd: server returned an error
4328 # Test incorrect command: ofproto/trace dp_name odp_flow garbage_option
4329 AT_CHECK([ovs-appctl ofproto/trace \
4330 ovs-dummy "$odp_flow" garbage_option],
4331 [2], [stdout],[stderr])
4332 AT_CHECK([tail -2 stderr], [0], [dnl
4333 Trailing garbage in packet data
4334 ovs-appctl: ovs-vswitchd: server returned an error
4337 # Test incorrect command: ofproto/trace with 4 arguments
4338 AT_CHECK([ovs-appctl ofproto/trace \
4339 arg1, arg2, arg3, arg4], [2], [stdout],[stderr])
4340 AT_CHECK([tail -2 stderr], [0], [dnl
4341 "ofproto/trace" command takes at most 3 arguments
4342 ovs-appctl: ovs-vswitchd: server returned an error
4345 # Test incorrect command: ofproto/trace with 0 argument
4346 AT_CHECK([ovs-appctl ofproto/trace ], [2], [stdout],[stderr])
4347 AT_CHECK([tail -2 stderr], [0], [dnl
4348 "ofproto/trace" command requires at least 1 arguments
4349 ovs-appctl: ovs-vswitchd: server returned an error
4355 AT_SETUP([ofproto-dpif - ofproto/trace-packet-out])
4357 ADD_OF_PORTS([br0], 1, 2, 3)
4359 AT_DATA([flows.txt], [dnl
4360 in_port=1 actions=output:2
4361 in_port=2 actions=output:1
4363 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
4365 AT_CHECK([ovs-appctl ofproto/trace-packet-out br0 in_port=1 'mod_vlan_vid:123,resubmit(,0)'], [0], [stdout])
4366 AT_CHECK([tail -1 stdout], [0], [dnl
4367 Datapath actions: push_vlan(vid=123,pcp=0),2
4374 m4_define([OFPROTO_TRACE],
4376 AT_CHECK([ovs-appctl ofproto/trace $1 "$flow" $3], [0], [stdout])
4377 actual=`tail -1 stdout | sed 's/Datapath actions: //'`
4379 AT_CHECK([ovs-dpctl normalize-actions "$flow" "$expected" $5],
4382 AT_CHECK([ovs-dpctl normalize-actions "$flow" "$actual" $5],
4385 AT_SETUP([ofproto-dpif - MAC learning])
4386 OVS_VSWITCHD_START([set bridge br0 fail-mode=standalone])
4387 ADD_OF_PORTS([br0], 1, 2, 3)
4389 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)'
4391 # Trace an ARP packet arriving on p3, to create a MAC learning entry.
4394 [in_port(3),eth(src=50:54:00:00:00:05,dst=ff:ff:ff:ff:ff:ff),$arp],
4398 # Check for the MAC learning entry.
4399 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
4401 3 0 50:54:00:00:00:05 ?
4404 # Trace a packet arrival destined for the learned MAC.
4405 # (This will also learn a MAC.)
4408 [in_port(1),eth(src=50:54:00:00:00:06,dst=50:54:00:00:00:05),$arp],
4412 # Check for both MAC learning entries.
4413 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
4415 3 0 50:54:00:00:00:05 ?
4416 1 0 50:54:00:00:00:06 ?
4419 # Trace a packet arrival that updates the first learned MAC entry.
4422 [in_port(2),eth(src=50:54:00:00:00:05,dst=ff:ff:ff:ff:ff:ff),$arp],
4426 # Check that the MAC learning entry was updated.
4427 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
4429 1 0 50:54:00:00:00:06 ?
4430 2 0 50:54:00:00:00:05 ?
4433 # Add another bridge.
4437 -- set bridge br1 datapath-type=dummy])
4438 ADD_OF_PORTS([br1], 4, 5)
4440 # Trace some packet arrivals in br1 to create MAC learning entries there too.
4443 [in_port(4),eth(src=50:54:00:00:00:06,dst=ff:ff:ff:ff:ff:ff),$arp],
4448 [in_port(5),eth(src=50:54:00:00:00:07,dst=ff:ff:ff:ff:ff:ff),$arp],
4452 # Check that the MAC learning entries were added.
4453 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br1 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
4455 4 0 50:54:00:00:00:06 ?
4456 5 0 50:54:00:00:00:07 ?
4459 # Delete port p1 and see that its MAC learning entry disappeared, and
4460 # that the MAC learning entry for the same MAC was also deleted from br1.
4461 AT_CHECK([ovs-vsctl del-port p1])
4462 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
4464 2 0 50:54:00:00:00:05 ?
4466 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br1 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
4468 5 0 50:54:00:00:00:07 ?
4474 AT_SETUP([ofproto-dpif - MAC table overflow])
4476 [set bridge br0 fail-mode=standalone other-config:mac-table-size=10])
4477 ADD_OF_PORTS([br0], 1, 2, 3)
4479 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)'
4481 AT_CHECK([ovs-appctl time/stop])
4483 # Trace 10 ARP packets arriving on p3, to create MAC learning entries.
4484 for i in 0 1 2 3 4 5 6 7 8 9; do
4487 [in_port(3),eth(src=50:54:00:00:00:0$i,dst=ff:ff:ff:ff:ff:ff),$arp],
4490 ovs-appctl time/warp 1000
4493 # Check for the MAC learning entries.
4494 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/ *[[0-9]]\{1,\}$//' | sort],
4496 3 0 50:54:00:00:00:00
4497 3 0 50:54:00:00:00:01
4498 3 0 50:54:00:00:00:02
4499 3 0 50:54:00:00:00:03
4500 3 0 50:54:00:00:00:04
4501 3 0 50:54:00:00:00:05
4502 3 0 50:54:00:00:00:06
4503 3 0 50:54:00:00:00:07
4504 3 0 50:54:00:00:00:08
4505 3 0 50:54:00:00:00:09
4509 # Trace another ARP packet on another MAC.
4512 [in_port(3),eth(src=50:54:00:00:00:10,dst=ff:ff:ff:ff:ff:ff),$arp],
4516 # Check that the new one chased the oldest one out of the table.
4517 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/' | sort],
4519 3 0 50:54:00:00:00:01 ?
4520 3 0 50:54:00:00:00:02 ?
4521 3 0 50:54:00:00:00:03 ?
4522 3 0 50:54:00:00:00:04 ?
4523 3 0 50:54:00:00:00:05 ?
4524 3 0 50:54:00:00:00:06 ?
4525 3 0 50:54:00:00:00:07 ?
4526 3 0 50:54:00:00:00:08 ?
4527 3 0 50:54:00:00:00:09 ?
4528 3 0 50:54:00:00:00:10 ?
4534 AT_SETUP([ofproto-dpif - MAC table overflow fairness])
4536 [set bridge br0 fail-mode=standalone other-config:mac-table-size=10])
4537 ADD_OF_PORTS([br0], 1, 2, 3, 4, 5, 6)
4539 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)'
4541 AT_CHECK([ovs-appctl time/stop])
4543 # Trace packets with 2 different source MACs arriving on each of the 5
4544 # ports, filling up the 10-entry learning table.
4545 for i in 0 1 2 3 4 5 6 7 8 9; do
4547 ovs-appctl ofproto/trace ovs-dummy "in_port($p),eth(src=50:54:00:00:00:0$i,dst=ff:ff:ff:ff:ff:ff),$arp" -generate
4548 ovs-appctl time/warp 1000
4551 # Check for the MAC learning entries.
4552 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/ *[[0-9]]\{1,\}$//' | sort],
4554 1 0 50:54:00:00:00:00
4555 1 0 50:54:00:00:00:01
4556 2 0 50:54:00:00:00:02
4557 2 0 50:54:00:00:00:03
4558 3 0 50:54:00:00:00:04
4559 3 0 50:54:00:00:00:05
4560 4 0 50:54:00:00:00:06
4561 4 0 50:54:00:00:00:07
4562 5 0 50:54:00:00:00:08
4563 5 0 50:54:00:00:00:09
4567 # Now trace 16 new MACs on another port.
4568 for i in 0 1 2 3 4 5 6 7 8 9 a b c d e f; do
4569 ovs-appctl ofproto/trace ovs-dummy "in_port(6),eth(src=50:54:00:00:0$i:ff,dst=ff:ff:ff:ff:ff:ff),$arp" -generate
4570 ovs-appctl time/warp 1000
4573 # Check the results.
4575 # Our eviction algorithm on overflow is that an arbitrary (but deterministic)
4576 # one of the ports with the most learned MACs loses the least recently used
4577 # one. Thus, the new port will end up with 3 MACs, 3 of the old ports with 1
4578 # MAC each, and the other 2 of the old ports with 2 MACs each.
4580 # (If someone changes lib/heap.c to do something different with equal-priority
4581 # nodes, then the output below could change, but it would still follow the
4582 # rules explained above.)
4583 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/ *[[0-9]]\{1,\}$//' | sort],
4585 1 0 50:54:00:00:00:01
4586 2 0 50:54:00:00:00:03
4587 3 0 50:54:00:00:00:04
4588 3 0 50:54:00:00:00:05
4589 4 0 50:54:00:00:00:07
4590 5 0 50:54:00:00:00:08
4591 5 0 50:54:00:00:00:09
4592 6 0 50:54:00:00:0d:ff
4593 6 0 50:54:00:00:0e:ff
4594 6 0 50:54:00:00:0f:ff
4600 # CHECK_SFLOW_SAMPLING_PACKET(LOOPBACK_ADDR, ADDR_WITHOUT_BRACKETS)
4602 # Test that sFlow samples packets correctly using IPv4/IPv6 sFlow collector
4604 # IP_VERSION_TYPE is used in AT_SETUP
4605 m4_define([CHECK_SFLOW_SAMPLING_PACKET],
4606 [AT_SETUP([ofproto-dpif - sFlow packet sampling - $2 collector])
4607 AT_XFAIL_IF([test "$IS_WIN32" = "yes"])
4608 OVS_VSWITCHD_START([set Bridge br0 fail-mode=standalone])
4610 ON_EXIT([kill `cat test-sflow.pid`])
4611 AT_CHECK([ovstest test-sflow --log-file --detach --no-chdir --pidfile 0:$1 > sflow.log], [0], [], [ignore])
4612 AT_CAPTURE_FILE([sflow.log])
4613 SFLOW_PORT=`parse_listening_port < test-sflow.log`
4614 ovs-appctl time/stop
4616 ADD_OF_PORTS([br0], 1, 2)
4618 set Interface br0 options:ifindex=1002 -- \
4619 set Interface p1 options:ifindex=1004 -- \
4620 set Interface p2 options:ifindex=1003 -- \
4621 set Bridge br0 sflow=@sf -- \
4622 --id=@sf create sflow targets=\"$1:$SFLOW_PORT\" \
4623 header=128 sampling=1 polling=1 agent=$LOOPBACK_INTERFACE
4625 dnl open with ARP packets to seed the bridge-learning. The output
4626 dnl ifIndex numbers should be reported predictably after that.
4627 dnl Since we set sampling=1 we should see all of these packets
4628 dnl reported. Sorting the output by data-source and seqNo makes
4629 dnl it deterministic. Ensuring that we send at least two packets
4630 dnl into each port means we get to check the seq nos are
4631 dnl incrementing correctly.
4632 dnl because packets from different ports can be handled by separate
4633 dnl threads, put some sleeps
4635 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)'
4637 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)'
4639 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)'
4641 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)'
4642 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)'
4644 dnl sleep long enough to get more than one counter sample
4645 dnl from each datasource so we can check sequence numbers
4646 ovs-appctl time/warp 3000 100
4648 ovs-appctl -t test-sflow exit
4650 AT_CHECK_UNQUOTED([[sort sflow.log | $EGREP 'HEADER|ERROR' | sed 's/ /\
4671 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
4691 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
4711 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
4731 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
4751 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
4754 AT_CHECK_UNQUOTED([[sort sflow.log | $EGREP 'IFCOUNTERS|ERROR|PORTNAME|OPENFLOWPORT' | head -18 | sed 's/ /\
4768 in_broadcasts=4294967295
4771 in_unknownprotos=4294967295
4774 out_multicasts=4294967295
4775 out_broadcasts=4294967295
4791 in_broadcasts=4294967295
4794 in_unknownprotos=4294967295
4797 out_multicasts=4294967295
4798 out_broadcasts=4294967295
4814 in_broadcasts=4294967295
4817 in_unknownprotos=4294967295
4820 out_multicasts=4294967295
4821 out_broadcasts=4294967295
4837 in_broadcasts=4294967295
4840 in_unknownprotos=4294967295
4843 out_multicasts=4294967295
4844 out_broadcasts=4294967295
4860 in_broadcasts=4294967295
4863 in_unknownprotos=4294967295
4866 out_multicasts=4294967295
4867 out_broadcasts=4294967295
4883 in_broadcasts=4294967295
4886 in_unknownprotos=4294967295
4889 out_multicasts=4294967295
4890 out_broadcasts=4294967295
4895 datapath_id=18364758544493064720
4898 datapath_id=18364758544493064720
4901 datapath_id=18364758544493064720
4904 datapath_id=18364758544493064720
4907 datapath_id=18364758544493064720
4910 datapath_id=18364758544493064720
4927 CHECK_SFLOW_SAMPLING_PACKET([127.0.0.1], [IPv4])
4928 CHECK_SFLOW_SAMPLING_PACKET([[[::1]]], [IPv6])
4930 dnl Test sFlow LAG structures
4931 AT_SETUP([ofproto-dpif - sFlow LACP structures])
4932 AT_SKIP_IF([test "$IS_WIN32" = "yes"])
4933 OVS_VSWITCHD_START([dnl
4934 add-bond br0 bond p1 p2 -- \
4935 set Port bond lacp=active bond-mode=active-backup \
4936 other_config:lacp-time="fast" \
4937 other_config:lacp-system-id=11:22:33:44:55:66 \
4938 other_config:lacp-system-priority=54321 -- \
4939 set Interface p1 type=dummy \
4940 other_config:lacp-port-id=11 \
4941 other_config:lacp-port-priority=111 \
4942 other_config:lacp-aggregation-key=3333 -- \
4943 set Interface p2 type=dummy \
4944 other_config:lacp-port-id=22 \
4945 other_config:lacp-port-priority=222 \
4946 other_config:lacp-aggregation-key=3333 ])
4948 ON_EXIT([kill `cat test-sflow.pid`])
4949 AT_CHECK([ovstest test-sflow --log-file --detach --no-chdir --pidfile 0:127.0.0.1 > sflow.log], [0], [], [ignore])
4950 AT_CAPTURE_FILE([sflow.log])
4951 SFLOW_PORT=`parse_listening_port < test-sflow.log`
4953 ovs-appctl time/stop
4956 set Interface p1 options:ifindex=1003 -- \
4957 set Bridge br0 sflow=@sf -- \
4958 --id=@sf create sflow targets=\"127.0.0.1:$SFLOW_PORT\" \
4959 header=128 sampling=1 polling=1
4961 dnl sleep long enough to get the sFlow datagram flushed out (may be delayed for up to 1 second)
4962 AT_CHECK([ovs-appctl time/warp 2000 100], [0], [ignore])
4963 AT_CHECK([ovs-appctl revalidator/purge], [0])
4965 ovs-appctl -t test-sflow exit
4966 AT_CHECK([[sort sflow.log | $EGREP 'LACPCOUNTERS|ERROR' | head -n 1 | sed 's/ /\
4969 sysID=11:22:33:44:55:66
4970 partnerID=00:00:00:00:00:00
4977 markerPDUsRx=4294967295
4978 markerRespPDUsRx=4294967295
4979 unknownRx=4294967295
4982 markerPDUsTx=4294967295
4983 markerRespPDUsTx=4294967295
4988 # CHECK_NETFLOW_EXPIRATION(LOOPBACK_ADDR, IP_VERSION_TYPE)
4990 # Test that basic NetFlow reports flow statistics correctly:
4991 # The initial packet of a flow are correctly accounted.
4992 # Later packets within a flow are correctly accounted.
4993 # Flow actions changing (in this case, due to MAC learning)
4994 # cause a record to be sent.
4996 # IP_VERSION_TYPE is used in AT_SETUP
4997 m4_define([CHECK_NETFLOW_EXPIRATION],
4998 [AT_SETUP([ofproto-dpif - NetFlow flow expiration - $2 collector])
4999 OVS_VSWITCHD_START([set Bridge br0 fail-mode=standalone])
5000 ADD_OF_PORTS([br0], 1, 2)
5002 ovs-appctl time/stop
5003 ON_EXIT([kill `cat test-netflow.pid`])
5004 AT_CHECK([ovstest test-netflow --log-file --detach --no-chdir --pidfile 0:$1 > netflow.log], [0], [], [ignore])
5005 AT_CAPTURE_FILE([netflow.log])
5006 NETFLOW_PORT=`parse_listening_port < test-netflow.log`
5009 set Bridge br0 netflow=@nf -- \
5010 --id=@nf create NetFlow targets=\"$1:$NETFLOW_PORT\" \
5011 engine_id=1 engine_type=2 active_timeout=30 add-id-to-interface=false
5013 for delay in 1000 30000; do
5014 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)'
5015 sleep 1 # ensure the order in which these two packets are processed
5016 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)'
5018 ovs-appctl time/warp $delay
5021 ovs-appctl time/warp 6000
5022 ovs-appctl revalidator/wait
5024 ovs-appctl -t test-netflow exit
5026 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])
5028 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])
5030 combined=`grep "192.168.0.2 > 192.168.0.1, if 2 > 1, 2 pkts, 120 bytes, ICMP 0:0" netflow.log | wc -l`
5031 separate=`grep "192.168.0.2 > 192.168.0.1, if 2 > 1, 1 pkts, 60 bytes, ICMP 0:0" netflow.log | wc -l`
5032 AT_CHECK([test $separate = 2 || test $combined = 1], [0])
5036 CHECK_NETFLOW_EXPIRATION([127.0.0.1], [IPv4])
5037 CHECK_NETFLOW_EXPIRATION([[[::1]]], [IPv6])
5039 # CHECK_NETFLOW_ACTIVE_EXPIRATION(LOOPBACK_ADDR, IP_VERSION_TYPE)
5041 # Test that basic NetFlow reports active expirations correctly.
5043 # IP_VERSION_TYPE is used in AT_SETUP
5044 m4_define([CHECK_NETFLOW_ACTIVE_EXPIRATION],
5045 [AT_SETUP([ofproto-dpif - NetFlow active expiration - $2 collector])
5047 OVS_VSWITCHD_START([set Bridge br0 fail-mode=standalone])
5048 ADD_OF_PORTS([br0], 1, 2)
5050 ON_EXIT([kill `cat test-netflow.pid`])
5051 AT_CHECK([ovstest test-netflow --log-file --detach --no-chdir --pidfile 0:$1 > netflow.log], [0], [], [ignore])
5052 AT_CAPTURE_FILE([netflow.log])
5053 NETFLOW_PORT=`parse_listening_port < test-netflow.log`
5056 set Bridge br0 netflow=@nf -- \
5057 --id=@nf create NetFlow targets=\"$1:$NETFLOW_PORT\" \
5058 engine_id=1 engine_type=2 active_timeout=10 add-id-to-interface=false
5060 AT_CHECK([ovs-appctl time/stop])
5062 while test $n -le 60; do
5065 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)'
5066 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)'
5068 ovs-appctl time/warp 1000
5071 ovs-appctl time/warp 10000
5073 ovs-appctl revalidator/wait
5075 ovs-appctl -t test-netflow exit
5077 # Count the number of reported packets:
5078 # - From source to destination before MAC learning kicks in (just one).
5079 # - From source to destination after that.
5080 # - From destination to source.
5088 pkts=`echo "$line" | sed 's/.*, \([[0-9]]*\) pkts,.*/\1/'`
5095 "seq "*": 192.168.0.1 > 192.168.0.2, if 1 > 65535, "*" pkts, "*" bytes, TCP 1234 > 80, time "*)
5098 "seq "*": 192.168.0.1 > 192.168.0.2, if 1 > 2, "*" pkts, "*" bytes, TCP 1234 > 80, time "*)
5101 "seq "*": 192.168.0.2 > 192.168.0.1, if 2 > 1, "*" pkts, "*" bytes, TCP 80 > 1234, time "*)
5108 eval $counter=\`expr \$$counter + \$pkts\`
5109 n_recs=`expr $n_recs + 1`
5112 # There should be exactly 1 MAC learning packet,
5113 # exactly 59 other packets in that direction,
5114 # and exactly 60 packets in the other direction.
5115 AT_CHECK([echo $n_learn $n_in $n_out $n_other], [0], [1 59 60 0
5120 CHECK_NETFLOW_ACTIVE_EXPIRATION([127.0.0.1], [IPv4])
5121 CHECK_NETFLOW_ACTIVE_EXPIRATION([[[::1]]], [IPv6])
5123 AT_SETUP([ofproto-dpif - flow stats])
5125 AT_CHECK([ovs-ofctl add-flow br0 "ip,actions=NORMAL"])
5126 AT_CHECK([ovs-ofctl add-flow br0 "icmp,actions=NORMAL"])
5128 ovs-appctl time/stop
5130 for i in `seq 1 10`; do
5131 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)'
5134 AT_CHECK([ovs-appctl time/warp 1000], [0], [ignore])
5135 AT_CHECK([ovs-appctl revalidator/purge], [0])
5136 AT_CHECK([ovs-ofctl dump-flows br0], [0], [stdout])
5137 AT_CHECK([STRIP_XIDS stdout | sed -n 's/duration=[[0-9]]*\.[[0-9]]*s/duration=0.0s/p' | sort], [0], [dnl
5138 cookie=0x0, duration=0.0s, table=0, n_packets=0, n_bytes=0, idle_age=1, icmp actions=NORMAL
5139 cookie=0x0, duration=0.0s, table=0, n_packets=10, n_bytes=600, idle_age=1, ip actions=NORMAL
5144 AT_SETUP([ofproto-dpif - flow stats, set-n-threads])
5146 AT_CHECK([ovs-ofctl add-flow br0 "ip,actions=NORMAL"])
5147 AT_CHECK([ovs-ofctl add-flow br0 "icmp,actions=NORMAL"])
5149 ovs-appctl time/stop
5151 for i in `seq 1 10`; do
5152 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)'
5155 ovs-appctl time/warp 100
5156 AT_CHECK([ovs-vsctl set Open_vSwitch . other-config:n-revalidator-threads=2])
5157 ovs-appctl time/warp 1000
5159 AT_CHECK([ovs-ofctl dump-flows br0], [0], [stdout])
5160 AT_CHECK([STRIP_XIDS stdout | sed -n 's/duration=[[0-9]]*\.[[0-9]]*s/duration=0.0s/p' | sort], [0], [dnl
5161 cookie=0x0, duration=0.0s, table=0, n_packets=0, n_bytes=0, idle_age=1, icmp actions=NORMAL
5162 cookie=0x0, duration=0.0s, table=0, n_packets=10, n_bytes=600, idle_age=1, ip actions=NORMAL
5167 AT_SETUP([idle_age and hard_age increase over time])
5170 # get_ages DURATION HARD IDLE
5172 # Fetch the flow duration, hard age, and idle age into the variables
5173 # whose names are given as arguments. Rounds DURATION down to the
5174 # nearest integer. If hard_age doesn't appear in the output, sets
5175 # HARD to "none". If idle_age doesn't appear in the output, sets IDLE
5178 AT_CHECK([ovs-ofctl dump-flows br0], [0], [stdout])
5180 duration=`sed -n 's/.*duration=\([[0-9]]*\)\(\.[[0-9]]*\)\{0,1\}s.*/\1/p' stdout`
5181 AT_CHECK([[expr X"$duration" : 'X[0-9][0-9]*$']], [0], [ignore])
5182 AS_VAR_COPY([$1], [duration])
5184 hard=`sed -n 's/.*hard_age=\([[0-9]]*\),.*/\1/p' stdout`
5185 if test X"$hard" = X; then
5188 AT_CHECK([[expr X"$hard" : 'X[0-9][0-9]*$']], [0], [ignore])
5190 AS_VAR_COPY([$2], [hard])
5192 idle=`sed -n 's/.*idle_age=\([[0-9]]*\),.*/\1/p' stdout`
5193 if test X"$idle" = X; then
5196 AT_CHECK([[expr X"$idle" : 'X[0-9][0-9]*$']], [0], [ignore])
5198 AS_VAR_COPY([$3], [idle])
5201 # Add a flow and get its initial hard and idle age.
5202 AT_CHECK([ovs-ofctl add-flow br0 hard_timeout=199,idle_timeout=188,actions=drop])
5203 get_ages duration1 hard1 idle1
5205 ovs-appctl time/stop
5206 # Warp time forward by 10 seconds, then modify the flow's actions.
5207 ovs-appctl time/warp 10000
5208 get_ages duration2 hard2 idle2
5209 AT_CHECK([ovs-ofctl mod-flows br0 actions=flood])
5211 # Warp time forward by 10 seconds.
5212 ovs-appctl time/warp 10000
5213 get_ages duration3 hard3 idle3
5215 # Warp time forward 10 more seconds, then pass some packets through the flow,
5216 # then warp forward a few more times because idle times are only updated
5218 ovs-appctl time/warp 10000
5219 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)'
5220 ovs-appctl time/warp 3000 1000
5222 get_ages duration4 hard4 idle4
5224 printf "duration: %4s => %4s => %4s => %4s\n" $duration1 $duration2 $duration3 $duration4
5225 printf "hard_age: %4s => %4s => %4s => %4s\n" $hard1 $hard2 $hard3 $hard4
5226 printf "idle_age: %4s => %4s => %4s => %4s\n" $idle1 $idle2 $idle3 $idle4
5228 # Duration should increase steadily over time.
5229 AT_CHECK([test $duration1 -lt $duration2])
5230 AT_CHECK([test $duration2 -lt $duration3])
5231 AT_CHECK([test $duration3 -lt $duration4])
5233 # Hard age should be "none" initially because it's the same as flow_duration,
5234 # then it should increase.
5235 AT_CHECK([test $hard1 = none])
5236 AT_CHECK([test $hard2 = none])
5237 AT_CHECK([test $hard3 != none])
5238 AT_CHECK([test $hard4 != none])
5239 AT_CHECK([test $hard3 -lt $hard4])
5241 # Idle age should increase from 1 to 2 to 3, then decrease.
5242 AT_CHECK([test $idle1 -lt $idle2])
5243 AT_CHECK([test $idle2 -lt $idle3])
5244 AT_CHECK([test $idle3 -gt $idle4])
5246 # Check some invariant relationships.
5247 AT_CHECK([test $duration1 = $idle1])
5248 AT_CHECK([test $duration2 = $idle2])
5249 AT_CHECK([test $duration3 = $idle3])
5250 AT_CHECK([test $idle3 -gt $hard3])
5251 AT_CHECK([test $idle4 -lt $hard4])
5252 AT_CHECK([test $hard4 -lt $duration4])
5257 AT_SETUP([ofproto-dpif - fin_timeout])
5259 ovs-appctl time/stop
5260 AT_CHECK([ovs-ofctl add-flow br0 'idle_timeout=60,actions=fin_timeout(idle_timeout=5)'])
5261 AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip], [0],
5263 idle_timeout=60, actions=fin_timeout(idle_timeout=5)
5266 # Check that a TCP SYN packet does not change the timeout. (Because
5267 # flow stats updates are mainly what implements the fin_timeout
5268 # feature, we warp forward a couple of times to ensure that flow stats
5269 # run before re-checking the flow table.)
5270 AT_CHECK([ovs-appctl netdev-dummy/receive br0 0021853763af0026b98cb0f908004500003c2e2440004006465dac11370dac11370b828b0016751e267b00000000a00216d017360000020405b40402080a2d25085f0000000001030307])
5271 AT_CHECK([ovs-appctl time/warp 1000 && ovs-appctl time/warp 1000], [0], [warped
5274 AT_CHECK([ovs-appctl revalidator/purge], [0])
5275 AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip], [0],
5277 n_packets=1, n_bytes=74, idle_timeout=60, actions=fin_timeout(idle_timeout=5)
5279 # Check that a TCP FIN packet does change the timeout.
5280 AT_CHECK([ovs-appctl netdev-dummy/receive br0 0021853763af0026b98cb0f90800451000342e3e40004006463bac11370dac11370b828b0016751e319dfc96399b801100717ae800000101080a2d250a9408579588])
5281 AT_CHECK([ovs-appctl time/warp 1000 && ovs-appctl time/warp 1000], [0], [warped
5284 AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip], [0],
5286 n_packets=2, n_bytes=140, idle_timeout=5, actions=fin_timeout(idle_timeout=5)
5291 AT_SETUP([ofproto-dpif - ovs-appctl dpif/dump-dps])
5292 OVS_VSWITCHD_START([add-br br1 -- set bridge br1 datapath-type=dummy])
5293 ADD_OF_PORTS([br0], [1], [2])
5294 ADD_OF_PORTS([br1], [3])
5296 AT_CHECK([ovs-appctl dpif/dump-dps], [0], [dnl
5303 AT_SETUP([ofproto-dpif - ovs-appctl dpif/show])
5304 OVS_VSWITCHD_START([add-br br1 -- set bridge br1 datapath-type=dummy])
5305 ADD_OF_PORTS([br0], [1], [2])
5306 ADD_OF_PORTS([br1], [3])
5308 AT_CHECK([ovs-appctl dpif/show], [0], [dnl
5309 dummy@ovs-dummy: hit:0 missed:0
5311 br0 65534/100: (dummy)
5315 br1 65534/101: (dummy)
5321 AT_SETUP([ofproto-dpif - ovs-appctl dpif/dump-flows])
5322 # bump max-idle to avoid the flows being reclaimed behind us
5323 OVS_VSWITCHD_START([add-br br1 -- \
5324 set bridge br1 datapath-type=dummy fail-mode=secure -- \
5325 set Open_vSwitch . other_config:max-idle=10000])
5326 ADD_OF_PORTS([br0], [1], [2])
5327 ADD_OF_PORTS([br1], [3])
5329 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)'])
5330 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)'])
5331 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)'])
5332 ovs-appctl revalidator/wait
5333 AT_CHECK([ovs-appctl dpif/dump-flows br0 | STRIP_UFID | STRIP_USED | sort], [0], [dnl
5334 recirc_id(0),in_port(1),eth_type(0x0800),ipv4(frag=no), packets:0, bytes:0, used:never, actions:drop
5335 recirc_id(0),in_port(2),eth_type(0x0800),ipv4(frag=no), packets:0, bytes:0, used:never, actions:drop
5338 AT_CHECK([ovs-appctl dpif/dump-flows br1 | STRIP_UFID | STRIP_USED | sort], [0], [dnl
5339 recirc_id(0),in_port(3),eth_type(0x0800),ipv4(frag=no), packets:0, bytes:0, used:never, actions:drop
5342 AT_CHECK([ovs-appctl dpif/dump-flows -m br0 | STRIP_UFID | STRIP_USED | sort], [0], [dnl
5343 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
5344 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
5347 AT_CHECK([ovs-appctl dpif/dump-flows -m br1 | STRIP_UFID | STRIP_USED | sort], [0], [dnl
5348 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
5354 AT_SETUP([ofproto-dpif - ovs-appctl dpif/get-flow])
5356 OVS_VSWITCHD_START([add-br br1 -- \
5357 set bridge br1 datapath-type=dummy fail-mode=secure -- \
5358 set Open_vSwitch . other_config:max-idle=10000])
5359 ADD_OF_PORTS([br0], [1], [2])
5361 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)'])
5362 ovs-appctl revalidator/wait
5363 AT_CHECK([ovs-appctl dpif/dump-flows -m br0], [0], [stdout])
5365 UFID=`sed -n 's/\(ufid:[[0-9a-fA-F]]*\).*/\1/p' stdout`
5366 AT_CHECK([ovs-appctl dpctl/get-flow $UFID], [0], [dnl
5367 recirc_id(0),in_port(1),eth_type(0x0800),ipv4(frag=no), packets:0, bytes:0, used:never, actions:drop
5373 AT_SETUP([ofproto-dpif - MPLS actions that result in a userspace action])
5374 OVS_VSWITCHD_START([dnl
5375 add-port br0 p1 -- set Interface p1 type=dummy
5377 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5378 ON_EXIT([kill `cat ovs-ofctl.pid`])
5380 AT_CAPTURE_FILE([ofctl_monitor.log])
5381 AT_DATA([flows.txt], [dnl
5382 dl_src=60:66:66:66:66:00 actions=push_mpls:0x8847,controller
5383 dl_src=60:66:66:66:66:01 actions=pop_mpls:0x8849,controller
5385 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5387 dnl Packet is sent to userspace because a MPLS push or pop action is applied to
5388 dnl a packet with 2 MPLS LSEs but dpif-netdev can't handle any labels.
5390 dnl The input is a frame with two MPLS labels which tcpdump -vve shows as:
5391 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)
5392 dnl (label 20, exp 0, [S], ttl 32)
5393 dnl (tos 0x0, ttl 64, id 0, offset 0, flags [none], proto TCP (6), length 44, bad cksum 3b78 (->f978)!)
5394 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
5396 for dl_src in 00 01; do
5397 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"])
5399 sleep 1 # wait for the datapath flow installed
5400 AT_CHECK_UNQUOTED([cat ovs-vswitchd.log | STRIP_UFID | FILTER_FLOW_INSTALL | STRIP_USED], [0], [dnl
5401 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))
5402 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))
5409 AT_SETUP([ofproto-dpif - MPLS actions that result in a drop])
5410 OVS_VSWITCHD_START([dnl
5411 add-port br0 p1 -- set Interface p1 type=dummy
5413 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5414 ON_EXIT([kill `cat ovs-ofctl.pid`])
5416 AT_CAPTURE_FILE([ofctl_monitor.log])
5417 AT_DATA([flows.txt], [dnl
5418 dl_src=60:66:66:66:66:00 actions=push_mpls:0x8847,controller
5419 dl_src=60:66:66:66:66:01 actions=pop_mpls:0x8849,controller
5421 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5423 dnl Packet is dropped because an MPLS PUSH action is applied to a packet with
5424 dnl 4 MPLS LSEs but ovs-vswtichd can only handle up to 3 MPLS LSEs and thus
5425 dnl can't determine the resulting MPLS label after MPLS push/pop actions.
5427 dnl The input is a frame with two MPLS headers which tcpdump -vve shows as:
5428 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)
5429 dnl (label 20, exp 0, ttl 32)
5430 dnl (label 20, exp 0, ttl 32)
5431 dnl (label 20, exp 0, [S], ttl 32)
5432 dnl (tos 0x0, ttl 64, id 0, offset 0, flags [none], proto TCP (6), length 44, bad cksum 3b78 (->f978)!)
5433 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
5435 for dl_src in 00 01; do
5436 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"])
5438 sleep 1 # wait for the datapath flow installed
5439 AT_CHECK_UNQUOTED([cat ovs-vswitchd.log | STRIP_UFID | FILTER_FLOW_INSTALL | STRIP_USED], [0], [dnl
5440 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))
5441 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))
5447 AT_SETUP([ofproto-dpif - patch ports])
5448 OVS_VSWITCHD_START([add-br br1 \
5449 -- set bridge br1 datapath-type=dummy fail-mode=secure \
5450 -- add-port br1 pbr1 -- set int pbr1 type=patch options:peer=pbr0 \
5451 -- add-port br0 pbr0 -- set int pbr0 type=patch options:peer=pbr1])
5453 ADD_OF_PORTS([br0], [2])
5454 ADD_OF_PORTS([br1], [3])
5456 AT_CHECK([ovs-appctl upcall/disable-ufid], [0], [Datapath dumping tersely using UFID disabled
5458 AT_CHECK([ovs-appctl time/stop])
5459 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5461 AT_CHECK([ovs-ofctl add-flow br0 actions=LOCAL,output:1,output:2])
5462 AT_CHECK([ovs-ofctl add-flow br1 actions=LOCAL,output:1,output:3])
5464 for i in $(seq 1 10); do
5465 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)'
5466 if [[ $i -eq 1 ]]; then
5471 for i in $(seq 1 5); do
5472 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)'
5473 if [[ $i -eq 1 ]]; then
5478 AT_CHECK([ovs-appctl time/warp 500], [0],
5481 sleep 1 # wait for log writer
5483 AT_CHECK([ovs-appctl dpif/show], [0], [dnl
5484 dummy@ovs-dummy: hit:13 missed:2
5486 br0 65534/100: (dummy)
5488 pbr0 1/none: (patch: peer=pbr1)
5490 br1 65534/101: (dummy)
5492 pbr1 1/none: (patch: peer=pbr0)
5495 AT_CHECK([cat ovs-vswitchd.log | STRIP_UFID | FILTER_FLOW_INSTALL | STRIP_USED], [0], [dnl
5496 recirc_id=0,ip,in_port=100,nw_frag=no, actions:101,3,2
5497 recirc_id=0,ip,in_port=101,nw_frag=no, actions:100,2,3
5500 AT_CHECK([cat ovs-vswitchd.log | grep -e 'in_port(100).*packets:9' | STRIP_UFID | FILTER_FLOW_DUMP], [0], [dnl
5501 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
5503 AT_CHECK([cat ovs-vswitchd.log | grep -e 'in_port(101).*packets:4' | STRIP_UFID | FILTER_FLOW_DUMP], [0], [dnl
5504 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
5507 AT_CHECK([ovs-ofctl dump-ports br0 pbr0], [0], [dnl
5508 OFPST_PORT reply (xid=0x4): 1 ports
5509 port 1: rx pkts=5, bytes=300, drop=0, errs=0, frame=0, over=0, crc=0
5510 tx pkts=10, bytes=600, drop=0, errs=0, coll=0
5513 AT_CHECK([ovs-ofctl dump-ports br1 pbr1], [0], [dnl
5514 OFPST_PORT reply (xid=0x4): 1 ports
5515 port 1: rx pkts=10, bytes=600, drop=0, errs=0, frame=0, over=0, crc=0
5516 tx pkts=5, bytes=300, drop=0, errs=0, coll=0
5522 AT_SETUP([ofproto-dpif - port duration])
5523 OVS_VSWITCHD_START([set Bridge br0 protocols=OpenFlow13])
5524 ADD_OF_PORTS([br0], 1, 2)
5526 ovs-appctl time/stop
5527 ovs-appctl time/warp 10000
5529 AT_CHECK([ovs-ofctl -O openflow13 dump-ports br0], [0], [stdout])
5530 AT_CHECK([sed -n 's/=[[0-9]][[0-9]]\(\.[[0-9]][[0-9]]*\)\{0,1\}s/=?s/p' stdout], [0],
5539 dnl ----------------------------------------------------------------------
5540 AT_BANNER([ofproto-dpif -- megaflows])
5542 AT_SETUP([ofproto-dpif megaflow - port classification])
5544 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5545 ADD_OF_PORTS([br0], [1], [2])
5546 AT_DATA([flows.txt], [dnl
5547 table=0 in_port=1 actions=output(2)
5549 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5550 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)'])
5552 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)'])
5554 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5555 recirc_id=0,ip,in_port=1,nw_frag=no, actions: <del>
5560 AT_SETUP([ofproto-dpif megaflow - L2 classification])
5562 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5563 ADD_OF_PORTS([br0], [1], [2])
5564 AT_DATA([flows.txt], [dnl
5565 table=0 in_port=1,dl_src=50:54:00:00:00:09 actions=output(2)
5567 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5568 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)'])
5569 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)'])
5571 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5572 recirc_id=0,ip,in_port=1,dl_src=50:54:00:00:00:09,nw_frag=no, actions: <del>
5573 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>
5578 AT_SETUP([ofproto-dpif megaflow - L3 classification])
5580 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5581 ADD_OF_PORTS([br0], [1], [2])
5582 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], [])
5583 AT_DATA([flows.txt], [dnl
5584 table=0 in_port=1,icmp,nw_src=10.0.0.4 actions=output(2)
5586 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5587 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)'])
5588 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)'])
5590 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5591 recirc_id=0,icmp,in_port=1,nw_src=10.0.0.4,nw_frag=no, actions: <del>
5592 recirc_id=0,ip,in_port=1,nw_src=10.0.0.2/0.0.0.2,nw_frag=no, actions: <del>
5597 AT_SETUP([ofproto-dpif megaflow - IPv6 classification])
5599 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5600 ADD_OF_PORTS([br0], [1], [2])
5601 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], [])
5602 AT_DATA([flows.txt], [dnl
5603 table=0 in_port=1,ipv6,ipv6_src=2001:db8:3c4d:1:2:3:4:5 actions=output(2)
5605 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5606 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)'])
5607 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)'])
5609 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5610 recirc_id=0,ipv6,in_port=1,ipv6_src=2001:db8:3c4d:1:2:3:4:5,nw_frag=no, actions: <del>
5611 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>
5616 AT_SETUP([ofproto-dpif megaflow - L4 classification])
5618 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5619 ADD_OF_PORTS([br0], [1], [2])
5620 AT_DATA([flows.txt], [dnl
5621 table=0 in_port=1,icmp,icmp_type=8 actions=output(2)
5623 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5624 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)'])
5626 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)'])
5628 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5629 recirc_id=0,icmp,in_port=1,nw_frag=no,icmp_type=0x8/0xff, actions: <del>
5634 AT_SETUP([ofproto-dpif megaflow - normal])
5636 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5637 ADD_OF_PORTS([br0], [1], [2])
5638 AT_CHECK([ovs-ofctl add-flow br0 action=normal])
5639 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)'])
5640 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)'])
5642 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5643 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>
5644 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>
5649 AT_SETUP([ofproto-dpif megaflow - mpls])
5651 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5652 ADD_OF_PORTS([br0], [1], [2])
5653 AT_DATA([flows.txt], [dnl
5654 table=0 dl_src=50:54:00:00:00:09 actions=push_mpls:0x8847,2
5655 table=0 dl_src=50:54:00:00:00:0b actions=pop_mpls:0x0800,2
5657 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5658 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)'])
5659 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)'])
5661 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5662 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>
5663 recirc_id=0,mpls,in_port=1,dl_src=50:54:00:00:00:0b,mpls_bos=1, actions: <del>
5668 # CHECK_MEGAFLOW_NETFLOW(LOOPBACK_ADDR, IP_VERSION_TYPE)
5670 # IP_VERSION_TYPE is used in AT_SETUP
5671 m4_define([CHECK_MEGAFLOW_NETFLOW],
5672 [AT_SETUP([ofproto-dpif megaflow - netflow - $2 collector])
5674 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5675 ADD_OF_PORTS([br0], [1], [2])
5677 dnl NetFlow configuration disables wildcarding relevant fields
5678 ON_EXIT([kill `cat test-netflow.pid`])
5679 AT_CHECK([ovstest test-netflow --log-file --detach --no-chdir --pidfile 0:$1 > netflow.log], [0], [], [ignore])
5680 AT_CAPTURE_FILE([netflow.log])
5681 NETFLOW_PORT=`parse_listening_port < test-netflow.log`
5683 set Bridge br0 netflow=@nf -- \
5684 --id=@nf create NetFlow targets=\"$1:$NETFLOW_PORT\" \
5685 engine_id=1 engine_type=2 active_timeout=30 add-id-to-interface=false
5687 AT_CHECK([ovs-ofctl add-flow br0 action=normal])
5688 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)'])
5689 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)'])
5691 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5692 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>
5693 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>
5698 CHECK_MEGAFLOW_NETFLOW([127.0.0.1], [IPv4])
5699 CHECK_MEGAFLOW_NETFLOW([[[::1]]], [IPv6])
5701 AT_SETUP([ofproto-dpif megaflow - normal, active-backup bonding])
5703 [add-port br0 p1 -- set Interface p1 type=dummy ofport_request=1 -- \
5704 add-bond br0 bond0 p2 p3 bond_mode=active-backup -- \
5705 set interface p2 type=dummy ofport_request=2 -- \
5706 set interface p3 type=dummy ofport_request=3])
5707 AT_CHECK([ovs-appctl netdev-dummy/set-admin-state up], 0, [OK
5709 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5711 AT_CHECK([ovs-ofctl add-flow br0 action=normal])
5712 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)'])
5713 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)'])
5715 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5716 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>
5717 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>
5722 AT_SETUP([ofproto-dpif megaflow - normal, balance-slb bonding])
5724 [add-port br0 p1 -- set Interface p1 type=dummy ofport_request=1 -- \
5725 add-bond br0 bond0 p2 p3 bond_mode=balance-slb -- \
5726 set interface p2 type=dummy ofport_request=2 -- \
5727 set interface p3 type=dummy ofport_request=3])
5728 AT_CHECK([ovs-appctl netdev-dummy/set-admin-state up], 0, [OK
5730 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5732 AT_CHECK([ovs-ofctl add-flow br0 action=normal])
5733 AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
5734 AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4,dst=10.0.0.3,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
5736 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5737 recirc_id=0,ip,in_port=1,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>
5738 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>
5743 AT_SETUP([ofproto-dpif megaflow - normal, balance-tcp bonding])
5744 # Create bond0 on br0 with interfaces p0 and p1
5745 # and bond1 on br1 with interfaces p2 and p3
5746 # with p0 patched to p2 and p1 patched to p3.
5748 [add-bond br0 bond0 p0 p1 bond_mode=balance-tcp lacp=active \
5749 other-config:lacp-time=fast \
5750 other-config:bond-rebalance-interval=0 -- \
5751 set interface p0 type=patch options:peer=p2 ofport_request=1 -- \
5752 set interface p1 type=patch options:peer=p3 ofport_request=2 -- \
5754 set bridge br1 other-config:hwaddr=aa:66:aa:66:00:00 -- \
5755 set bridge br1 datapath-type=dummy other-config:datapath-id=1234 \
5756 fail-mode=secure -- \
5757 add-bond br1 bond1 p2 p3 bond_mode=balance-tcp lacp=active \
5758 other-config:lacp-time=fast \
5759 other-config:bond-rebalance-interval=0 -- \
5760 set interface p2 type=patch options:peer=p0 ofport_request=3 -- \
5761 set interface p3 type=patch options:peer=p1 ofport_request=4 --])
5763 AT_CHECK([ovs-appctl netdev-dummy/set-admin-state up], 0, [OK
5765 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5766 ADD_OF_PORTS([br0], [7])
5767 AT_CHECK([ovs-ofctl add-flow br0 action=normal])
5768 AT_CHECK([ovs-ofctl add-flow br1 action=normal])
5769 ovs-appctl time/stop
5770 ovs-appctl time/warp 5000
5771 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)'])
5772 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)'])
5774 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5775 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>
5776 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>
5781 AT_SETUP([ofproto-dpif megaflow - resubmit port action])
5783 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5784 ADD_OF_PORTS([br0], [1], [2])
5785 AT_DATA([flows.txt], [dnl
5786 table=0 in_port=1,ip actions=resubmit(90)
5787 table=0 in_port=90,dl_src=50:54:00:00:00:09 actions=output(2)
5789 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5790 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)'])
5791 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)'])
5793 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5794 recirc_id=0,ip,in_port=1,dl_src=50:54:00:00:00:09,nw_frag=no, actions: <del>
5795 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>
5800 AT_SETUP([ofproto-dpif megaflow - resubmit table action])
5802 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5803 ADD_OF_PORTS([br0], [1], [2])
5804 AT_DATA([flows.txt], [dnl
5805 table=0 in_port=1,ip actions=resubmit(,1)
5806 table=1 dl_src=50:54:00:00:00:09 actions=output(2)
5808 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5809 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)'])
5810 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=
5811 1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
5813 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5814 recirc_id=0,ip,in_port=1,dl_src=50:54:00:00:00:09,nw_frag=no, actions: <del>
5815 recirc_id=0,ip,in_port=1,dl_src=50:54:00:00:00:0b,nw_frag=no, actions: <del>
5820 AT_SETUP([ofproto-dpif megaflow - goto_table action])
5822 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5823 ADD_OF_PORTS([br0], [1], [2])
5824 AT_DATA([flows.txt], [dnl
5825 table=0 in_port=1,ip actions=goto_table(1)
5826 table=1 dl_src=50:54:00:00:00:09 actions=output(2)
5828 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flows br0 flows.txt])
5829 AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
5830 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)'])
5832 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5833 recirc_id=0,ip,in_port=1,dl_src=50:54:00:00:00:09,nw_frag=no, actions: <del>
5834 recirc_id=0,ip,in_port=1,dl_src=50:54:00:00:00:0b,nw_frag=no, actions: <del>
5839 AT_SETUP([ofproto-dpif megaflow - mirroring, select_all])
5841 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5842 ADD_OF_PORTS([br0], [1], [2], [3])
5844 set Bridge br0 mirrors=@m --\
5845 --id=@p3 get Port p3 --\
5846 --id=@m create Mirror name=mymirror select_all=true output_port=@p3
5848 AT_DATA([flows.txt], [dnl
5849 in_port=1 actions=output:2
5851 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5852 AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
5854 AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4,dst=10.0.0.3,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
5856 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5857 recirc_id=0,ip,in_port=1,nw_frag=no, actions: <del>
5862 AT_SETUP([ofproto-dpif megaflow - mirroring, select_vlan])
5864 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5865 ADD_OF_PORTS([br0], [1], [2], [3])
5867 set Bridge br0 mirrors=@m --\
5868 --id=@p2 get Port p2 -- --id=@p3 get Port p3 --\
5869 --id=@m create Mirror name=mymirror select_all=true select_vlan=11 output_port=@p3
5871 AT_DATA([flows.txt], [dnl
5872 in_port=1 actions=output:2
5874 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5875 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))'])
5876 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)'])
5878 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5879 recirc_id=0,ip,in_port=1,dl_vlan=11,nw_frag=no, actions: <del>
5880 recirc_id=0,ip,in_port=1,vlan_tci=0x0000/0x1fff,nw_frag=no, actions: <del>
5885 AT_SETUP([ofproto-dpif megaflow - move action])
5887 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5888 ADD_OF_PORTS([br0], [1], [2])
5889 AT_DATA([flows.txt], [dnl
5890 table=0 in_port=1 ip,actions=move:NXM_OF_IP_SRC[[]]->NXM_NX_REG0[[]],resubmit(90)
5891 table=0 in_port=90 ip,actions=move:NXM_NX_REG0[[]]->NXM_NX_REG1[[]],resubmit(91)
5892 table=0 in_port=91 reg0=0x0a000002,actions=output(2)
5894 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5895 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)'])
5896 AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4,dst=10.0.0.3,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
5898 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5899 recirc_id=0,ip,in_port=1,nw_src=10.0.0.2,nw_frag=no, actions: <del>
5900 recirc_id=0,ip,in_port=1,nw_src=10.0.0.4,nw_frag=no, actions: <del>
5905 AT_SETUP([ofproto-dpif megaflow - push action])
5907 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5908 ADD_OF_PORTS([br0], [1], [2])
5909 AT_DATA([flows.txt], [dnl
5910 table=0 in_port=1 ip,actions=push:NXM_OF_IP_SRC[[]],output(2)
5912 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5913 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)'])
5914 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)'])
5916 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5917 recirc_id=0,ip,in_port=1,nw_src=10.0.0.2,nw_frag=no, actions: <del>
5918 recirc_id=0,ip,in_port=1,nw_src=10.0.0.4,nw_frag=no, actions: <del>
5923 AT_SETUP([ofproto-dpif megaflow - learning])
5925 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5926 ADD_OF_PORTS([br0], [1], [2])
5927 AT_DATA([flows.txt], [dnl
5928 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
5930 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5931 ovs-appctl time/stop
5932 # We send each packet twice because the first packet in each flow causes the
5933 # flow table to change and thus revalidations, which (depending on timing)
5934 # can keep a megaflow from being installed. The revalidations are done by
5935 # the second iteration, allowing the flows to be installed.
5937 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)'])
5938 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)'])
5939 ovs-appctl time/warp 100
5942 dnl The original flow is missing due to a revalidation.
5943 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5944 recirc_id=0,ip,in_port=1,vlan_tci=0x0000/0x0fff,dl_src=50:54:00:00:00:09,nw_frag=no, actions: <del>
5945 recirc_id=0,ip,in_port=1,vlan_tci=0x0000/0x0fff,dl_src=50:54:00:00:00:0b,nw_frag=no, actions: <del>
5950 AT_SETUP([ofproto-dpif megaflow - tunnels])
5952 [add-port br0 p1 -- set Interface p1 type=dummy ofport_request=1])
5953 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5954 AT_CHECK([ovs-vsctl add-port br0 p2 -- set Interface p2 type=gre \
5955 options:remote_ip=1.1.1.1 ofport_request=2 options:key=flow])
5956 AT_CHECK([ovs-vsctl add-port br0 p3 -- set Interface p3 type=dummy \
5958 AT_CHECK([ovs-vsctl add-port br0 p4 -- set Interface p4 type=gre \
5959 options:remote_ip=1.1.1.2 options:tos=inherit options:ttl=inherit \
5960 ofport_request=4 options:key=flow])
5961 AT_DATA([flows.txt], [dnl
5962 in_port=1,actions=output(2)
5963 in_port=3,actions=output(4)
5965 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5966 dnl ECN bits are always copied out, but don't use 0x3 (CE), since that
5967 dnl will cause the packet to be dropped.
5968 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)'])
5970 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)'])
5971 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)'])
5973 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)'])
5975 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5976 recirc_id=0,ip,in_port=1,nw_ecn=1,nw_frag=no, actions: <del>
5977 recirc_id=0,ip,in_port=3,nw_tos=0,nw_ecn=1,nw_ttl=64,nw_frag=no, actions: <del>
5978 recirc_id=0,ip,in_port=3,nw_tos=252,nw_ecn=1,nw_ttl=128,nw_frag=no, actions: <del>
5983 AT_SETUP([ofproto-dpif megaflow - dec_ttl])
5985 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5986 ADD_OF_PORTS([br0], [1], [2])
5987 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], [])
5988 AT_DATA([flows.txt], [dnl
5989 table=0 in_port=1,icmp,nw_src=10.0.0.4 actions=dec_ttl,output(2)
5991 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5992 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)'])
5993 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)'])
5995 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5996 recirc_id=0,icmp,in_port=1,nw_src=10.0.0.4,nw_ttl=64,nw_frag=no, actions: <del>
5997 recirc_id=0,ip,in_port=1,nw_src=10.0.0.2/0.0.0.2,nw_frag=no, actions: <del>
6002 AT_SETUP([ofproto-dpif megaflow - set dl_dst])
6004 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
6005 ADD_OF_PORTS([br0], [1], [2])
6006 AT_DATA([flows.txt], [dnl
6007 table=0 in_port=1 actions=mod_dl_dst(50:54:00:00:00:0a),output(2)
6009 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
6010 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)'])
6011 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)'])
6013 dnl The first packet is essentially a no-op, as the new destination MAC is the
6014 dnl same as the original. The second entry actually updates the destination
6016 AT_CHECK([cat ovs-vswitchd.log | STRIP_UFID | FILTER_FLOW_INSTALL | STRIP_USED], [0], [dnl
6017 recirc_id=0,ip,in_port=1,dl_dst=50:54:00:00:00:0a,nw_frag=no, actions:2
6018 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
6023 AT_SETUP([ofproto-dpif megaflow - disabled])
6025 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
6026 ADD_OF_PORTS([br0], [1], [2])
6027 AT_DATA([flows.txt], [dnl
6028 table=0 in_port=1,ip,nw_dst=10.0.0.1 actions=output(2)
6029 table=0 in_port=1,ip,nw_dst=10.0.0.3 actions=drop
6031 AT_CHECK([ovs-appctl upcall/disable-megaflows], [0], [megaflows disabled
6033 AT_CHECK([ovs-appctl upcall/disable-ufid], [0], [Datapath dumping tersely using UFID disabled
6035 AT_CHECK([ovs-appctl vlog/set dpif_netdev:dbg], [0], [], [])
6036 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
6037 for i in 1 2 3 4; do
6038 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)'])
6039 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)'])
6040 if [[ $i -eq 1 ]]; then
6045 AT_CHECK([cat ovs-vswitchd.log | STRIP_UFID | FILTER_FLOW_INSTALL | STRIP_USED], [0], [dnl
6046 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
6047 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
6049 AT_CHECK([cat ovs-vswitchd.log | STRIP_UFID | FILTER_FLOW_DUMP | grep 'packets:3'], [0], [dnl
6050 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
6051 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
6056 AT_SETUP([ofproto-dpif - datapath port number change])
6057 OVS_VSWITCHD_START([set Bridge br0 fail-mode=standalone])
6058 ADD_OF_PORTS([br0], 1)
6060 # Trace a flow that should output to p1.
6061 AT_CHECK([ovs-appctl ofproto/trace br0 in_port=LOCAL,dl_src=10:20:30:40:50:60],
6063 AT_CHECK([tail -1 stdout], [0], [Datapath actions: 1
6066 # Change p1's port number to 5.
6067 AT_CHECK([ovs-appctl dpif-dummy/change-port-number ovs-dummy p1 5])
6069 # Trace a flow that should output to p1 in its new location.
6070 AT_CHECK([ovs-appctl ofproto/trace br0 in_port=LOCAL,dl_src=10:20:30:40:50:60],
6072 AT_CHECK([tail -1 stdout], [0], [Datapath actions: 5
6077 # Tests the bundling with various bfd and cfm configurations.
6078 AT_SETUP([ofproto - bundle with variable bfd/cfm config])
6079 OVS_VSWITCHD_START([add-br br1 -- set bridge br1 datapath-type=dummy -- \
6080 add-bond br0 br0bond p0 p2 bond-mode=active-backup -- \
6081 add-bond br1 br1bond p1 p3 bond-mode=active-backup -- \
6082 set Interface p1 type=patch options:peer=p0 ofport_request=2 -- \
6083 set Interface p3 type=patch options:peer=p2 ofport_request=4 -- \
6084 set Interface p0 type=patch options:peer=p1 ofport_request=1 -- \
6085 set Interface p2 type=patch options:peer=p3 ofport_request=3 -- \
6086 set Interface p0 bfd:enable=true bfd:min_tx=300 bfd:min_rx=300 -- \
6087 set Interface p0 cfm_mpid=1 -- \
6088 set Interface p1 bfd:enable=true bfd:min_tx=500 bfd:min_rx=500])
6090 ovs-appctl time/stop
6091 # advance the clock to stablize everything.
6092 ovs-appctl time/warp 5000 100
6093 # cfm/show should show 'recv' fault.
6094 AT_CHECK([ovs-appctl cfm/show | sed -n '/^.*fault:.*/p'], [0], [dnl
6097 # bfd/show should show 'up'.
6098 AT_CHECK([ovs-appctl bfd/show | sed -n '/^.*Session State:.*/p'], [0], [dnl
6099 Local Session State: up
6100 Remote Session State: up
6101 Local Session State: up
6102 Remote Session State: up
6104 # bond/show should show 'may-enable: true' for all slaves.
6105 AT_CHECK([ovs-appctl bond/show | sed -n '/^.*may_enable:.*/p'], [0], [dnl
6112 # now disable the bfd on p1.
6113 AT_CHECK([ovs-vsctl set Interface p1 bfd:enable=false])
6114 # advance the clock to stablize everything.
6115 ovs-appctl time/warp 5000 100
6116 # cfm/show should show 'recv' fault.
6117 AT_CHECK([ovs-appctl cfm/show | sed -n '/^.*fault:.*/p'], [0], [dnl
6120 # bfd/show should show 'down'.
6121 AT_CHECK([ovs-appctl bfd/show | sed -n '/^.*Session State:.*/p'], [0], [dnl
6122 Local Session State: down
6123 Remote Session State: down
6125 # bond/show should show 'may-enable: false' for p0.
6126 AT_CHECK([ovs-appctl bond/show br0bond | sed -n '/^.*may_enable:.*/p'], [0], [dnl
6131 # now enable the bfd on p1 and disable bfd on p0.
6132 AT_CHECK([ovs-vsctl set Interface p1 bfd:enable=true])
6133 AT_CHECK([ovs-vsctl set Interface p0 bfd:enable=false])
6134 # advance the clock to stablize everything.
6135 ovs-appctl time/warp 5000 100
6136 # cfm/show should show 'recv' fault.
6137 AT_CHECK([ovs-appctl cfm/show | sed -n '/^.*fault:.*/p'], [0], [dnl
6140 # bfd/show should show 'down'.
6141 AT_CHECK([ovs-appctl bfd/show | sed -n '/^.*Session State:.*/p'], [0], [dnl
6142 Local Session State: down
6143 Remote Session State: down
6145 # bond/show should show 'may-enable: false' for p0 and p1.
6146 AT_CHECK([ovs-appctl bond/show | sed -n '/^.*may_enable:.*/p'], [0], [dnl
6156 AT_SETUP([ofproto-dpif - ofproto-dpif-monitor 1])
6157 OVS_VSWITCHD_START([add-port br0 p0 -- set interface p0 type=gre options:remote_ip=1.2.3.4])
6160 AT_CHECK([ovs-vsctl set interface p0 bfd:enable=true])
6162 OVS_WAIT_UNTIL([grep "monitor thread created" ovs-vswitchd.log])
6163 # disable bfd on p0.
6164 AT_CHECK([ovs-vsctl set interface p0 bfd:enable=false])
6166 OVS_WAIT_UNTIL([grep "monitor thread terminated" ovs-vswitchd.log])
6167 AT_CHECK([cat ovs-vswitchd.log | sed -e '/^.*ofproto_dpif_monitor.*$/d' > ovs-vswitchd.log])
6170 AT_CHECK([ovs-vsctl set interface p0 cfm_mpid=10])
6172 OVS_WAIT_UNTIL([grep "monitor thread created" ovs-vswitchd.log])
6173 # disable cfm on p0.
6174 AT_CHECK([ovs-vsctl remove interface p0 cfm_mpid 10])
6176 OVS_WAIT_UNTIL([grep "monitor thread terminated" ovs-vswitchd.log])
6177 AT_CHECK([cat ovs-vswitchd.log | sed -e '/^.*ofproto_dpif_monitor.*$/d' > ovs-vswitchd.log])
6179 # enable both bfd and cfm on p0.
6180 AT_CHECK([ovs-vsctl set interface p0 bfd:enable=true cfm_mpid=10])
6182 OVS_WAIT_UNTIL([grep "monitor thread created" ovs-vswitchd.log])
6183 # disable bfd on p0.
6184 AT_CHECK([ovs-vsctl set interface p0 bfd:enable=false])
6185 # check log, there should not be the log of thread terminated.
6186 AT_CHECK([sed -n "s/^.*|ofproto_dpif_monitor(monitor[[0-9]]*)|INFO|\(.* terminated\)$/\1/p" ovs-vswitchd.log], [0], [dnl
6188 # reenable bfd on p0.
6189 AT_CHECK([ovs-vsctl set interface p0 bfd:enable=true])
6190 # check log, should still be on log of thread created.
6191 AT_CHECK([sed -n "s/^.*|ofproto_dpif_monitor(monitor[[0-9]]*)|INFO|\(.* created\)$/\1/p" ovs-vswitchd.log], [0], [dnl
6192 monitor thread created
6194 # disable bfd and cfm together.
6195 AT_CHECK([ovs-vsctl set interface p0 bfd:enable=false -- remove interface p0 cfm_mpid 10])
6197 OVS_WAIT_UNTIL([grep "monitor thread terminated" ovs-vswitchd.log])
6202 # this test helps avoid the deadlock between the main thread and monitor thread.
6203 AT_SETUP([ofproto-dpif - ofproto-dpif-monitor 2])
6206 for i in `seq 1 199`
6208 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])
6214 AT_BANNER([ofproto-dpif - flow translation resource limits])
6216 AT_SETUP([ofproto-dpif - infinite resubmit])
6218 AT_CHECK([ovs-ofctl add-flow br0 actions=resubmit:1,resubmit:2,output:3])
6219 AT_CHECK([ovs-appctl -vpoll_loop:off ofproto/trace br0 'eth_dst=ff:ff:ff:ff:ff:ff'],
6221 AT_CHECK([tail -1 stdout], [0], [Datapath actions: drop
6223 AT_CHECK([grep -c 'resubmit actions recursed over 64 times' ovs-vswitchd.log],
6226 OVS_VSWITCHD_STOP(["/resubmit actions recursed/d"])
6229 AT_SETUP([ofproto-dpif - exponential resubmit chain])
6231 ADD_OF_PORTS([br0], 1)
6232 (for i in `seq 1 64`; do
6234 echo "in_port=$i, actions=resubmit:$j, resubmit:$j, local"
6236 echo "in_port=65, actions=local") > flows
6237 AT_CHECK([ovs-ofctl add-flows br0 flows])
6238 AT_CHECK([ovs-appctl -vpoll_loop:off ofproto/trace br0 'in_port=1'], [0], [stdout])
6239 AT_CHECK([grep -c 'over 4096 resubmit actions' ovs-vswitchd.log], [0], [1
6241 OVS_VSWITCHD_STOP(["/over.*resubmit actions/d"])
6244 AT_SETUP([ofproto-dpif - too many output actions])
6246 ADD_OF_PORTS([br0], 1)
6247 (for i in `seq 1 12`; do
6249 echo "in_port=$i, actions=resubmit:$j, resubmit:$j, local"
6251 echo "in_port=13, actions=local,local,local,local,local,local,local,local") > flows
6252 AT_CHECK([ovs-ofctl add-flows br0 flows])
6253 AT_CHECK([ovs-appctl -vpoll_loop:off ofproto/trace br0 'in_port=1'], [0], [stdout])
6254 AT_CHECK([grep -c -e '- Uses action(s) not supported by datapath' stdout],
6257 AT_CHECK([grep -c 'resubmits yielded over 64 kB of actions' ovs-vswitchd.log], [0], [1
6259 OVS_VSWITCHD_STOP(["/resubmits yielded over 64 kB of actions/d"])
6262 AT_SETUP([ofproto-dpif - stack too deep])
6264 ADD_OF_PORTS([br0], 1)
6265 (for i in `seq 1 12`; do
6267 echo "in_port=$i, actions=resubmit:$j, resubmit:$j, local"
6269 push="push:NXM_NX_REG0[[]]"
6270 echo "in_port=13, actions=$push,$push,$push,$push,$push,$push,$push,$push") > flows
6271 AT_CHECK([ovs-ofctl add-flows br0 flows])
6272 AT_CHECK([ovs-appctl -vpoll_loop:off ofproto/trace br0 'in_port=1'], [0], [stdout])
6273 AT_CHECK([grep -c 'resubmits yielded over 64 kB of stack' ovs-vswitchd.log], [0], [1
6275 OVS_VSWITCHD_STOP(["/resubmits yielded over 64 kB of stack/d"])
6279 AT_SETUP([ofproto-dpif packet-out controller])
6281 ADD_OF_PORTS([br0], 1, 2)
6283 AT_CHECK([ovs-ofctl add-flow br0 'dl_dst=50:54:00:00:00:0a actions=controller'])
6285 AT_CAPTURE_FILE([ofctl_monitor.log])
6286 AT_CHECK([ovs-ofctl monitor br0 65534 invalid_ttl --detach --no-chdir --pidfile 2> ofctl_monitor.log])
6289 AT_CHECK([ovs-ofctl -O OpenFlow13 packet-out br0 CONTROLLER controller '50540000000a5054000000091234'])
6292 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
6293 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
6294 NXT_PACKET_IN (xid=0x0): total_len=14 in_port=CONTROLLER (via action) data_len=14 (unbuffered)
6295 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 NXT_PACKET_IN (xid=0x0): total_len=14 in_port=CONTROLLER (via action) data_len=14 (unbuffered)
6298 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
6300 NXT_PACKET_IN (xid=0x0): total_len=14 in_port=CONTROLLER (via action) data_len=14 (unbuffered)
6301 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
6304 AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
6305 dl_dst=50:54:00:00:00:0a actions=CONTROLLER:65535
6309 (echo "OFPST_TABLE reply (OF1.3) (xid=0x2):
6311 active=1, lookup=0, matched=0"
6313 while test $x -lt 254; do
6316 active=0, lookup=0, matched=0"
6319 AT_CHECK([ovs-ofctl -O OpenFlow13 dump-tables br0 ], [0], [expout])
6324 AT_SETUP([ofproto-dpif packet-out controller (patch port)])
6327 add-port br0 p1 -- \
6328 set interface p1 type=patch options:peer=p2 -- \
6330 set bridge br1 datapath-type=dummy -- \
6331 set bridge br1 fail-mode=secure -- \
6332 set bridge br1 protocols='[OpenFlow10,OpenFlow11,OpenFlow12,OpenFlow13]' -- \
6333 add-port br1 p2 -- \
6334 set interface p2 type=patch options:peer=p1 --])
6336 AT_CAPTURE_FILE([ofctl_monitor.log])
6337 AT_CHECK([ovs-ofctl monitor br1 65534 invalid_ttl --detach --no-chdir --pidfile 2> ofctl_monitor.log])
6340 AT_CHECK([ovs-ofctl -O OpenFlow13 packet-out br0 CONTROLLER output:1 '50540000000a5054000000091234'])
6343 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
6344 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
6345 NXT_PACKET_IN (xid=0x0): cookie=0x0 total_len=14 in_port=1 (via no_match) data_len=14 (unbuffered)
6346 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
6348 NXT_PACKET_IN (xid=0x0): cookie=0x0 total_len=14 in_port=1 (via no_match) data_len=14 (unbuffered)
6349 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
6351 NXT_PACKET_IN (xid=0x0): cookie=0x0 total_len=14 in_port=1 (via no_match) data_len=14 (unbuffered)
6352 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
6355 (printf "OFPST_TABLE reply (OF1.3) (xid=0x2):"
6357 while test $x -lt 254; do
6360 active=0, lookup=0, matched=0"
6363 AT_CHECK([ovs-ofctl -O OpenFlow13 dump-tables br0 ], [0], [expout])
6365 (echo "OFPST_TABLE reply (OF1.3) (xid=0x2):
6367 active=0, lookup=3, matched=0"
6369 while test $x -lt 254; do
6372 active=0, lookup=0, matched=0"
6375 AT_CHECK([ovs-ofctl -O OpenFlow13 dump-tables br1 ], [0], [expout])
6381 AT_SETUP([ofproto-dpif packet-out goto_table])
6383 ADD_OF_PORTS([br0], 1, 2)
6385 AT_DATA([flows.txt], [dnl
6386 table=0 dl_dst=50:54:00:00:00:0a actions=goto_table(1)
6387 table=1 dl_dst=50:54:00:00:00:0a actions=controller
6389 AT_CHECK([ovs-ofctl -O OpenFlow13 add-flows br0 flows.txt])
6391 AT_CAPTURE_FILE([ofctl_monitor.log])
6392 AT_CHECK([ovs-ofctl monitor br0 65534 invalid_ttl --detach --no-chdir --pidfile 2> ofctl_monitor.log])
6395 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)'
6398 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
6399 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
6400 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
6401 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
6402 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
6404 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
6405 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
6407 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
6408 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
6411 AT_CHECK([ovs-appctl revalidator/purge], [0])
6412 AT_CHECK([ovs-ofctl -O OpenFlow13 dump-flows br0 | ofctl_strip | sort], [0], [dnl
6413 n_packets=3, n_bytes=180, dl_dst=50:54:00:00:00:0a actions=goto_table:1
6414 table=1, n_packets=3, n_bytes=180, dl_dst=50:54:00:00:00:0a actions=CONTROLLER:65535
6415 OFPST_FLOW reply (OF1.3):
6418 (echo "OFPST_TABLE reply (OF1.3) (xid=0x2):
6420 active=1, lookup=3, matched=3
6423 active=1, lookup=3, matched=3"
6425 while test $x -lt 254; do
6428 active=0, lookup=0, matched=0"
6431 AT_CHECK([ovs-ofctl -O OpenFlow13 dump-tables br0 ], [0], [expout])
6437 AT_SETUP([ofproto-dpif packet-out table-miss (continue)])
6439 ADD_OF_PORTS([br0], 1, 2)
6441 AT_CHECK([ovs-ofctl -O OpenFlow11 add-flow br0 'table=1 dl_dst=50:54:00:00:00:0a actions=controller'])
6442 AT_CHECK([ovs-ofctl -O OpenFlow11 mod-table br0 all continue])
6444 AT_CAPTURE_FILE([ofctl_monitor.log])
6445 AT_CHECK([ovs-ofctl monitor br0 65534 invalid_ttl --detach --no-chdir --pidfile 2> ofctl_monitor.log])
6448 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)'
6451 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
6452 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
6453 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
6454 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
6455 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
6457 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
6458 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
6460 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
6461 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
6464 AT_CHECK([ovs-appctl revalidator/purge], [0])
6465 AT_CHECK([ovs-ofctl -O OpenFlow11 dump-flows br0 | ofctl_strip | sort], [0], [dnl
6466 table=1, n_packets=3, n_bytes=180, dl_dst=50:54:00:00:00:0a actions=CONTROLLER:65535
6467 OFPST_FLOW reply (OF1.1):
6470 (echo "OFPST_TABLE reply (OF1.3) (xid=0x2):
6472 active=0, lookup=3, matched=0
6475 active=1, lookup=3, matched=3"
6477 while test $x -lt 254; do
6480 active=0, lookup=0, matched=0"
6483 AT_CHECK([ovs-ofctl -O OpenFlow13 dump-tables br0 ], [0], [expout])
6488 AT_SETUP([ofproto-dpif - ICMPv6])
6490 ADD_OF_PORTS([br0], 1)
6492 AT_CAPTURE_FILE([ofctl_monitor.log])
6494 AT_CHECK([ovs-ofctl monitor br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
6496 ovs-appctl netdev-dummy/receive p1 '0060970769ea0000860580da86dd6000000000203afffe80000000000000020086fffe0580dafe80000000000000026097fffe0769ea870068bd00000000fe80000000000000026097fffe0769ea01010000860580da'
6498 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
6500 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
6501 NXT_PACKET_IN (xid=0x0): cookie=0x0 total_len=86 in_port=1 (via no_match) data_len=86 (unbuffered)
6502 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
6508 AT_SETUP([ofproto-dpif - Neighbor Discovery set-field with checksum update])
6510 ADD_OF_PORTS([br0], 1)
6511 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])
6513 AT_CAPTURE_FILE([ofctl_monitor.log])
6515 AT_CHECK([ovs-ofctl monitor br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
6517 ovs-appctl netdev-dummy/receive p1 '0060970769ea0000860580da86dd6000000000203afffe80000000000000020086fffe0580dafe80000000000000026097fffe0769ea870068bd00000000fe80000000000000026097fffe0769ea01010000860580da'
6519 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
6521 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
6522 NXT_PACKET_IN (xid=0x0): cookie=0x0 total_len=86 in_port=1 (via action) data_len=86 (unbuffered)
6523 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