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(0x2),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=0x2,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 - group actions have no effect afterwards])
337 ADD_OF_PORTS([br0], [1], [10])
338 AT_CHECK([ovs-ofctl -O OpenFlow12 add-group br0 'group_id=1234,type=select,bucket=set_field:192.168.3.90->ip_src,output:10'])
339 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=group:1234,output:10'])
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 AT_CHECK([tail -1 stdout], [0],
342 [Datapath actions: set(ipv4(src=192.168.3.90,dst=192.168.0.2)),10,set(ipv4(src=192.168.0.1,dst=192.168.0.2)),10
347 AT_SETUP([ofproto-dpif - all group in action set])
349 ADD_OF_PORTS([br0], [1], [10], [11])
350 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'])
351 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=write_actions(group:1234)'])
352 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])
353 # Must match on the source address to be able to restore it's value for
355 AT_CHECK([tail -2 stdout], [0],
356 [Megaflow: recirc_id=0,ip,in_port=1,nw_src=192.168.0.1,nw_frag=no
357 Datapath actions: set(ipv4(src=192.168.3.90)),10,set(ipv4(src=192.168.0.1)),11
362 AT_SETUP([ofproto-dpif - indirect group in action set])
364 ADD_OF_PORTS([br0], [1], [10])
365 AT_CHECK([ovs-ofctl -O OpenFlow12 add-group br0 group_id=1234,type=indirect,bucket=output:10])
366 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=write_actions(group:1234)'])
367 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])
368 AT_CHECK([tail -1 stdout], [0],
369 [Datapath actions: 10
374 AT_SETUP([ofproto-dpif - select group])
376 ADD_OF_PORTS([br0], [1], [10], [11])
377 AT_CHECK([ovs-ofctl -O OpenFlow12 add-group br0 'group_id=1234,type=select,bucket=output:10,bucket=output:11'])
378 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=write_actions(group:1234)'])
380 # Try a bunch of different flows and make sure that they get distributed
382 for d in 0 1 2 3 4 5 6 7 8 9 a b c d e f; do
383 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])
384 tail -1 stdout >> results
386 sort results | uniq -c
387 AT_CHECK([sort results | uniq], [0],
388 [Datapath actions: 10
394 AT_SETUP([ofproto-dpif - select group with watch port])
396 ADD_OF_PORTS([br0], [1], [10], [11])
397 AT_CHECK([ovs-ofctl -O OpenFlow12 add-group br0 'group_id=1234,type=select,bucket=watch_port:10,output:10,bucket=output:11'])
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 - select group with weight])
408 ADD_OF_PORTS([br0], [1], [10], [11], [12])
409 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'])
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: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])
412 AT_CHECK([tail -1 stdout], [0],
413 [Datapath actions: 11
418 AT_SETUP([ofproto-dpif - select group with hash selection method])
420 ADD_OF_PORTS([br0], [1], [10], [11])
421 AT_CHECK([ovs-ofctl -O OpenFlow15 add-group br0 'group_id=1234,type=select,selection_method=hash,fields=eth_dst,bucket=output:10,bucket=output:11'])
422 AT_CHECK([ovs-ofctl -O OpenFlow15 add-flow br0 'ip actions=write_actions(group:1234)'])
424 # Try a bunch of different flows and make sure that they get distributed
426 for d in 0 1 2 3 4 5 6 7 8 9 a b c d e f; do
427 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])
428 tail -1 stdout >> results
430 sort results | uniq -c
431 AT_CHECK([sort results | uniq], [0],
432 [Datapath actions: 10
437 # Try a bunch of different flows and make sure that they are not distributed
438 # as they only vary a field that is not hashed
439 for d in 0 1 2 3 4 5 6 7 8 9 a b c d e f; do
440 AT_CHECK([ovs-appctl ofproto/trace br0 "in_port=1,dl_src=50:54:00:00:00:$d,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])
441 tail -1 stdout >> results
443 sort results | uniq -c
444 AT_CHECK([sort results | uniq], [0],
445 [Datapath actions: 10
451 AT_SETUP([ofproto-dpif - fast failover group])
453 ADD_OF_PORTS([br0], [1], [10], [11])
454 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'])
455 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=write_actions(group:1234)'])
456 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])
457 AT_CHECK([tail -1 stdout], [0],
458 [Datapath actions: drop
463 AT_SETUP([ofproto-dpif - group stats single bucket])
465 ADD_OF_PORTS([br0], [1], [10], [11])
466 AT_CHECK([ovs-ofctl -O OpenFlow12 add-group br0 'group_id=1234,type=select,bucket=output:10,weight=2000,bucket=output:11,weight=0'])
467 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=write_actions(group:1234)'])
471 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)"
472 AT_CHECK([ovs-appctl netdev-dummy/receive p1 $pkt])
475 AT_CHECK([ovs-appctl revalidator/purge], [0])
476 AT_CHECK([ovs-ofctl -O OpenFlow12 -vwarn dump-group-stats br0], [0], [stdout])
477 AT_CHECK([STRIP_XIDS stdout | sort], [0], [dnl
478 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
479 OFPST_GROUP reply (OF1.2):
484 AT_SETUP([ofproto-dpif - group stats all buckets])
486 ADD_OF_PORTS([br0], [1], [10], [11])
487 AT_CHECK([ovs-ofctl -O OpenFlow12 add-group br0 'group_id=1234,type=all,bucket=output:10,bucket=output:11'])
488 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=write_actions(group:1234)'])
492 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)"
493 AT_CHECK([ovs-appctl netdev-dummy/receive p1 $pkt])
496 AT_CHECK([ovs-appctl revalidator/purge], [0])
497 AT_CHECK([ovs-ofctl -O OpenFlow12 -vwarn dump-group-stats br0], [0], [stdout])
498 AT_CHECK([STRIP_XIDS stdout | sort], [0], [dnl
499 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
500 OFPST_GROUP reply (OF1.2):
505 AT_SETUP([ofproto-dpif - registers])
507 ADD_OF_PORTS([br0], [20], [21], [22], [33], [90])
508 AT_DATA([flows.txt], [dnl
509 in_port=90 actions=resubmit:2,resubmit:3,resubmit:4,resubmit:91
510 in_port=91 actions=resubmit:5,resubmit:6,resubmit:7,resubmit:92
511 in_port=92 actions=resubmit:8,resubmit:9,resubmit:10,resubmit:11,resubmit:93
512 in_port=93 actions=resubmit:12,resubmit:13,resubmit:14,resubmit:15
514 in_port=2 actions=load:0x000db000->NXM_NX_REG0[[]]
515 in_port=3 actions=load:0xdea->NXM_NX_REG0[[20..31]]
516 in_port=4 actions=load:0xeef->NXM_NX_REG0[[0..11]]
517 in_port=5 actions=move:NXM_NX_REG0[[]]->NXM_NX_REG1[[]]
518 in_port=6 actions=load:0x22222222->NXM_NX_REG2[[]]
519 in_port=7 actions=move:NXM_NX_REG1[[20..31]]->NXM_NX_REG2[[0..11]]
520 in_port=8 actions=move:NXM_NX_REG1[[0..11]]->NXM_NX_REG2[[20..31]]
521 in_port=9,reg0=0xdeadbeef actions=output:20
522 in_port=10,reg1=0xdeadbeef actions=output:21
523 in_port=11,reg2=0xeef22dea actions=output:22
525 dnl Sanilty check all registers
526 in_port=12 actions=load:0x10->NXM_NX_REG0[[]],load:0x11->NXM_NX_REG1[[]],load:0x12->NXM_NX_REG2[[]]
527 in_port=13 actions=load:0x13->NXM_NX_REG3[[]],load:0x14->NXM_NX_REG4[[]],load:0x15->NXM_NX_REG5[[]]
528 in_port=14 actions=load:0x16->NXM_NX_REG6[[]],load:0x17->NXM_NX_REG7[[]]
529 in_port=15,reg0=0x10,reg1=0x11,reg2=0x12,reg3=0x13,reg4=0x14,reg5=0x15,reg6=0x16,reg7=0x17 actions=output:33
532 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
533 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])
534 AT_CHECK([tail -1 stdout], [0],
535 [Datapath actions: 20,21,22,33
540 dnl Tests that the standardized xregs are mapped onto the legacy OVS registers
541 dnl in the manner documented in ovs-ofctl(8).
542 AT_SETUP([ofproto-dpif - extended registers])
544 ADD_OF_PORTS([br0], [1], [2], [3])
545 AT_DATA([flows.txt], [dnl
546 table=0 actions=load:0xfedcba9876543210->OXM_OF_PKT_REG1[[]],resubmit(,1)
547 table=1,reg2=0xfedcba98,reg3=0x76543210 actions=2
549 # These low-priority rules shouldn't match. They're here only to make really
550 # sure that the test fails if either of the above rules fails to match.
551 table=0,priority=0 actions=3
552 table=1,priority=0 actions=3
554 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
555 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])
556 AT_CHECK([tail -1 stdout], [0], [Datapath actions: 2
561 AT_SETUP([ofproto-dpif - load and move order])
563 ADD_OF_PORTS([br0], [1], [10], [11])
564 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'])
565 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)'])
566 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])
567 AT_CHECK([tail -2 stdout], [0],
568 [Megaflow: recirc_id=0,ip,in_port=1,nw_src=192.168.0.1,nw_frag=no
569 Datapath actions: set(ipv4(src=255.255.255.255)),10,set(ipv4(src=192.168.0.1)),11
574 dnl Tests that 1.5 copy-field can copy into the standardized xregs.
575 AT_SETUP([ofproto-dpif - copy-field into extended registers])
577 ADD_OF_PORTS([br0], [1], [2], [3])
578 AT_DATA([flows.txt], [dnl
579 table=0 actions=move:OXM_OF_ETH_SRC[[0..47]]->OXM_OF_PKT_REG0[[0..47]],goto_table(1)
580 table=1,xreg0=0x0000505400000005 actions=2
582 # These low-priority rules shouldn't match. They're here only to make really
583 # sure that the test fails if either of the above rules fails to match.
584 table=0,priority=0 actions=3
585 table=1,priority=0 actions=3
587 AT_CHECK([ovs-ofctl -O OpenFlow15 add-flows br0 flows.txt])
588 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])
589 AT_CHECK([tail -1 stdout], [0], [Datapath actions: 2
594 dnl Tests that 1.5 set-field with mask in the metadata register.
595 AT_SETUP([ofproto-dpif - masked set-field into metadata])
597 ADD_OF_PORTS([br0], [1], [2], [3])
598 AT_DATA([flows.txt], [dnl
599 table=0 actions=set_field:0xfafafafa5a5a5a5a->metadata,goto_table(1)
600 table=1 actions=set_field:0x6b/0xff->metadata,goto_table(2)
601 table=2,metadata=0xfafafafa5a5a5a6b actions=2
603 # These low-priority rules shouldn't match. They're here only to make really
604 # sure that the test fails if either of the above rules fails to match.
605 table=0,priority=0 actions=3
606 table=1,priority=0 actions=3
607 table=2,priority=0 actions=3
609 AT_CHECK([ovs-ofctl -O OpenFlow15 add-flows br0 flows.txt])
610 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])
611 AT_CHECK([tail -1 stdout], [0], [Datapath actions: 2
617 AT_SETUP([ofproto-dpif - actset_output])
620 [br0], [1], [2], [3], [4], [5], [6], [7], [8], [9], [10], [11], [12], [13])
621 AT_DATA([flows.txt], [dnl
622 table=0,actset_output=unset actions=write_actions(output(2)),goto_table(1)
623 table=1 actions=move:ONFOXM_ET_ACTSET_OUTPUT[[0..31]]->OXM_OF_PKT_REG0[[0..31]],goto_table(2)
625 # Verify that actset_output got set.
626 table=2,priority=20,actset_output=2 actions=4,goto_table(3)
627 table=2,priority=10 actions=5,goto_table(3)
629 # Verify that xreg0 got copied properly from actset_output.
630 table=3,priority=20,xreg0=2 actions=6,goto_table(4)
631 table=3,priority=10 actions=7,goto_table(4)
633 # Verify that adding a group action unsets actset_output,
634 # even if output follows group.
635 table=4 actions=write_actions(group(5),output(10)),goto_table(5)
636 table=5,priority=20,actset_output=unset actions=8,goto_table(6)
637 table=5,priority=10 actions=9,goto_table(6)
639 # Verify that adding another output action doesn't change actset_output
640 # (since there's still a group).
641 table=6 actions=write_actions(output(3)),goto_table(7)
642 table=7,priority=20,actset_output=unset actions=10,goto_table(8)
643 table=7,priority=10 actions=11,goto_table(8)
645 # Verify that clearing the action set, then writing an output action,
646 # causes actset_output to be set again.
647 table=8,actions=clear_actions,write_actions(output(3),output(2)),goto_table(9)
648 table=9,priority=20,actset_output=2 actions=12
649 table=9,priority=10 actions=13
651 AT_CHECK([ovs-ofctl -O OpenFlow13 add-flows br0 flows.txt])
652 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(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])
653 AT_CHECK([tail -1 stdout], [0], [Datapath actions: 4,6,8,10,12,2
657 AT_SETUP([ofproto-dpif - push-pop])
659 ADD_OF_PORTS([br0], [20], [21], [22], [33], [90])
660 AT_DATA([flows.txt], [dnl
661 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
662 in_port=2 actions=pop:NXM_NX_REG0[[0..7]],output:NXM_NX_REG0[[]]
663 in_port=3 actions=pop:NXM_NX_REG1[[0..7]],output:NXM_NX_REG1[[]]
664 in_port=4 actions=pop:NXM_NX_REG2[[0..15]],output:NXM_NX_REG2[[]]
665 in_port=5 actions=pop:NXM_NX_REG3[[]],output:NXM_NX_REG3[[]]
668 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
669 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])
670 AT_CHECK([tail -1 stdout], [0],
671 [Datapath actions: 33,22,21,20
676 AT_SETUP([ofproto-dpif - output])
678 ADD_OF_PORTS([br0], [1], [9], [10], [11], [55], [66], [77], [88])
679 AT_DATA([flows.txt], [dnl
680 in_port=1 actions=resubmit:2,resubmit:3,resubmit:4,resubmit:5,resubmit:6,resubmit:7,resubmit:8
681 in_port=2 actions=output:9
682 in_port=3 actions=load:55->NXM_NX_REG0[[]],output:NXM_NX_REG0[[]],load:66->NXM_NX_REG1[[]]
683 in_port=4 actions=output:10,output:NXM_NX_REG0[[]],output:NXM_NX_REG1[[]],output:11
684 in_port=5 actions=load:77->NXM_NX_REG0[[0..15]],load:88->NXM_NX_REG0[[16..31]]
685 in_port=6 actions=output:NXM_NX_REG0[[0..15]],output:NXM_NX_REG0[[16..31]]
686 in_port=7 actions=load:0x110000ff->NXM_NX_REG0[[]],output:NXM_NX_REG0[[]]
687 in_port=8 actions=1,9,load:9->NXM_OF_IN_PORT[[]],1,9
689 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
690 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])
691 AT_CHECK([tail -1 stdout], [0],
692 [Datapath actions: 9,55,10,55,66,11,77,88,9,1
697 AT_SETUP([ofproto-dpif - dec_ttl])
699 ADD_OF_PORTS([br0], [1], [2], [3], [4])
700 AT_DATA([flows.txt], [dnl
701 table=0 in_port=1 action=dec_ttl,output:2,resubmit(1,1),output:4
702 table=1 in_port=1 action=dec_ttl,output:3
704 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
705 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])
706 AT_CHECK([tail -4 stdout], [0],
707 [Megaflow: recirc_id=0,ip,in_port=1,nw_ttl=2,nw_frag=no
708 Datapath actions: set(ipv4(ttl=1)),2,4
709 This flow is handled by the userspace slow path because it:
710 - Sends "packet-in" messages to the OpenFlow controller.
712 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])
713 AT_CHECK([tail -2 stdout], [0],
714 [Megaflow: recirc_id=0,ip,in_port=1,nw_ttl=3,nw_frag=no
715 Datapath actions: set(ipv4(ttl=2)),2,set(ipv4(ttl=1)),3,4
717 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])
718 AT_CHECK([tail -2 stdout], [0],
719 [Megaflow: recirc_id=0,ipv6,in_port=1,nw_ttl=128,nw_frag=no
720 Datapath actions: set(ipv6(hlimit=127)),2,set(ipv6(hlimit=126)),3,4
723 AT_CAPTURE_FILE([ofctl_monitor.log])
724 AT_CHECK([ovs-ofctl monitor br0 65534 invalid_ttl --detach --no-chdir --pidfile 2> ofctl_monitor.log])
725 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])
726 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
727 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
728 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=34 in_port=1 (via invalid_ttl) data_len=34 (unbuffered)
729 ip,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
734 dnl A dec_ttl action at offset 32 in ofpacts will cause the ofpacts
735 dnl buffer to be resized just before pushing the id of the dec_ttl action.
736 dnl Thus the implementation must account for this by using the
737 dnl reallocated buffer rather than the original buffer.
739 dnl A number of similar rules are added to try and exercise
740 dnl xrealloc sufficiently that it returns a different base pointer
741 AT_SETUP([ofproto-dpif - dec_ttl without arguments at offset 32 in ofpacts])
743 ADD_OF_PORTS([br0], [1])
744 (for i in `seq 0 255`; do
745 printf "dl_src=10:11:11:11:11:%02x actions=output:1,output:1,output:1,dec_ttl,controller\n" $i
747 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
751 dnl A dec_ttl action at offset 32 in ofpacts will cause the ofpacts
752 dnl buffer to be resized just before pushing the id of the dec_ttl action.
753 dnl Thus the implementation must account for this by using the
754 dnl reallocated buffer rather than the original buffer.
756 dnl A number of similar rules are added to try and exercise
757 dnl xrealloc sufficiently that it returns a different base pointer
758 AT_SETUP([ofproto-dpif - dec_ttl with arguments at offset 32 in ofpacts])
760 ADD_OF_PORTS([br0], [1])
761 (for i in `seq 0 255`; do
762 printf "dl_src=10:11:11:11:11:%02x actions=output:1,output:1,output:1,dec_ttl(1),controller\n" $i
764 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
768 dnl A note action at offset 24 in ofpacts will cause the ofpacts
769 dnl buffer to be resized just before pushing the id of the dec_ttl action.
770 dnl Thus the implementation must account for this by using the
771 dnl reallocated buffer rather than the original buffer.
773 dnl A number of similar rules are added to try and exercise
774 dnl xrealloc sufficiently that it returns a different base pointer
775 AT_SETUP([ofproto-dpif - note at offset 24 in ofpacts])
777 ADD_OF_PORTS([br0], [1])
778 (for i in `seq 0 255`; do
779 printf "dl_src=10:11:11:11:11:%02x actions=output:1,output:1,note:ff,controller\n" $i
781 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
785 AT_SETUP([ofproto-dpif - output, OFPP_NONE ingress port])
787 ADD_OF_PORTS([br0], [1], [2])
789 AT_CHECK([ovs-ofctl add-flow br0 action=normal])
791 # "in_port" defaults to OFPP_NONE if it's not specified.
792 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"
793 AT_CHECK([ovs-appctl ofproto/trace br0 "$flow"], [0], [stdout])
794 AT_CHECK([tail -1 stdout | sed 's/Datapath actions: //' | tr "," "\n" | sort -n], [0], [dnl
803 AT_SETUP([ofproto-dpif - DSCP])
804 OVS_VSWITCHD_START([add-port br0 p1 -- set Interface p1 type=dummy])
805 ADD_OF_PORTS([br0], [9])
806 AT_DATA([flows.txt], [dnl
807 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
809 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
810 AT_CHECK([ovs-vsctl -- \
811 set Port p1 qos=@newqos --\
812 --id=@newqos create QoS type=linux-htb queues=1=@q1,2=@q2 --\
813 --id=@q1 create Queue dscp=1 --\
814 --id=@q2 create Queue dscp=2], [0], [ignore])
815 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])
816 AT_CHECK([tail -2 stdout], [0],
817 [Megaflow: recirc_id=0,skb_priority=0,ip,in_port=9,nw_tos=252,nw_frag=no
818 Datapath actions: dnl
820 set(ipv4(tos=0x4/0xfc)),set(skb_priority(0x1)),1,dnl
821 set(ipv4(tos=0x8/0xfc)),set(skb_priority(0x2)),1,dnl
823 set(ipv4(tos=0x4/0xfc)),set(skb_priority(0x1)),1,dnl
824 set(ipv4(tos=0xfc/0xfc)),set(skb_priority(0)),1,dnl
825 set(ipv4(tos=0/0xfc)),1,100
830 AT_SETUP([ofproto-dpif - output/flood flags])
832 ADD_OF_PORTS([br0], [1], [2], [3], [4], [5], [6], [7])
834 AT_DATA([flows.txt], [dnl
835 in_port=local actions=local,flood
836 in_port=1 actions=flood
837 in_port=2 actions=all
838 in_port=3 actions=output:LOCAL,output:1,output:2,output:3,output:4,output:5,output:6,output:7
839 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
841 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
842 AT_CHECK([ovs-ofctl mod-port br0 5 noforward])
843 AT_CHECK([ovs-ofctl mod-port br0 6 noflood])
845 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])
846 AT_CHECK([tail -1 stdout \
847 | sed -e 's/Datapath actions: //' | tr ',' '\n' | sort], [0], [dnl
855 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])
856 AT_CHECK([tail -1 stdout \
857 | sed -e 's/Datapath actions: //' | tr ',' '\n' | sort], [0], [dnl
865 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])
866 AT_CHECK([tail -1 stdout \
867 | sed -e 's/Datapath actions: //' | tr ',' '\n' | sort], [0], [dnl
876 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])
877 AT_CHECK([tail -1 stdout], [0],
878 [Datapath actions: 100,1,2,4,6,7
881 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])
882 AT_CHECK([tail -1 stdout], [0],
883 [Datapath actions: set(skb_priority(0x1)),100,1,2,set(skb_priority(0x2)),3,set(skb_priority(0x1)),6,7
888 AT_SETUP([ofproto-dpif - Default Table Miss - OF1.0 (OFPTC_TABLE_MISS_CONTROLLER)])
889 OVS_VSWITCHD_START([dnl
890 add-port br0 p1 -- set Interface p1 type=dummy
892 ON_EXIT([kill `cat ovs-ofctl.pid`])
894 AT_CAPTURE_FILE([ofctl_monitor.log])
896 AT_CHECK([ovs-ofctl monitor br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
899 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)'
901 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
902 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
903 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
904 NXT_PACKET_IN (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
905 tcp,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
907 NXT_PACKET_IN (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
908 tcp,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
910 NXT_PACKET_IN (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
911 tcp,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
914 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
915 AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
922 AT_SETUP([ofproto-dpif - Default Table Miss - OF1.3 (OFPTC_TABLE_MISS_DROP)])
923 OVS_VSWITCHD_START([dnl
924 add-port br0 p1 -- set Interface p1 type=dummy
926 ON_EXIT([kill `cat ovs-ofctl.pid`])
928 AT_CAPTURE_FILE([ofctl_monitor.log])
929 AT_CHECK([ovs-ofctl del-flows br0])
931 AT_CHECK([ovs-ofctl monitor -OOpenFlow13 -P openflow10 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
933 dnl Test that missed packets are droped
935 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)'
937 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
939 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
942 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
943 AT_CHECK([ovs-ofctl -OOpenFlow13 dump-flows br0 | ofctl_strip | sort], [0], [dnl
944 OFPST_FLOW reply (OF1.3):
950 AT_SETUP([ofproto-dpif - Table Miss - goto table and OFPTC_TABLE_MISS_CONTROLLER])
951 OVS_VSWITCHD_START([dnl
952 add-port br0 p1 -- set Interface p1 type=dummy
954 ON_EXIT([kill `cat ovs-ofctl.pid`])
956 AT_CAPTURE_FILE([ofctl_monitor.log])
957 AT_CHECK([ovs-ofctl -OOpenFlow12 add-flow br0 'table=0 actions=goto_table(1)'])
959 AT_CHECK([ovs-ofctl monitor -P openflow10 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
962 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)'
964 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
965 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
966 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
967 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
968 tcp,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
970 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
971 tcp,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
973 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
974 tcp,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
977 AT_CHECK([ovs-appctl revalidator/purge], [0])
978 AT_CHECK([ovs-ofctl -OOpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
979 n_packets=3, n_bytes=180, actions=goto_table:1
980 OFPST_FLOW reply (OF1.2):
986 AT_SETUP([ofproto-dpif - Table Miss - resubmit and OFPTC_TABLE_MISS_CONTROLLER])
987 OVS_VSWITCHD_START([dnl
988 add-port br0 p1 -- set Interface p1 type=dummy
990 ON_EXIT([kill `cat ovs-ofctl.pid`])
992 AT_CAPTURE_FILE([ofctl_monitor.log])
993 AT_CHECK([ovs-ofctl -OOpenFlow12 add-flow br0 'table=0 actions=resubmit(1,1)'])
995 AT_CHECK([ovs-ofctl monitor -P openflow10 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
998 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)'
1001 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
1002 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1005 AT_CHECK([ovs-appctl revalidator/purge], [0])
1006 AT_CHECK([ovs-ofctl -OOpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
1007 n_packets=3, n_bytes=180, actions=resubmit(1,1)
1008 OFPST_FLOW reply (OF1.2):
1014 AT_SETUP([ofproto-dpif - Table Miss - OFPTC_TABLE_MISS_CONTINUE])
1015 OVS_VSWITCHD_START([dnl
1016 add-port br0 p1 -- set Interface p1 type=dummy
1018 ON_EXIT([kill `cat ovs-ofctl.pid`])
1020 AT_CAPTURE_FILE([ofctl_monitor.log])
1021 AT_CHECK([ovs-ofctl add-flow br0 'table=1 dl_src=10:11:11:11:11:11 actions=controller'])
1022 AT_CHECK([ovs-ofctl -OOpenFlow11 mod-table br0 all continue])
1024 dnl Miss table 0, Hit table 1
1025 AT_CHECK([ovs-ofctl monitor br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1028 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)'
1030 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1031 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
1033 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1034 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1035 tcp,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
1037 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1038 tcp,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
1040 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1041 tcp,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
1044 dnl Hit table 0, Miss all other tables, sent to controller
1045 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1048 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)'
1050 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1051 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
1053 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1054 NXT_PACKET_IN (xid=0x0): table_id=253 cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
1055 tcp,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
1057 NXT_PACKET_IN (xid=0x0): table_id=253 cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
1058 tcp,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
1060 NXT_PACKET_IN (xid=0x0): table_id=253 cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
1061 tcp,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
1064 AT_CHECK([ovs-appctl revalidator/purge], [0])
1065 AT_CHECK([ovs-ofctl -OOpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
1066 table=1, n_packets=3, n_bytes=180, dl_src=10:11:11:11:11:11 actions=CONTROLLER:65535
1067 OFPST_FLOW reply (OF1.2):
1073 AT_SETUP([ofproto-dpif - Table Miss - goto table and OFPTC_TABLE_MISS_CONTINUE])
1074 OVS_VSWITCHD_START([dnl
1075 add-port br0 p1 -- set Interface p1 type=dummy
1077 ON_EXIT([kill `cat ovs-ofctl.pid`])
1079 AT_CAPTURE_FILE([ofctl_monitor.log])
1080 AT_DATA([flows.txt], [dnl
1081 table=0 actions=goto_table(1)
1082 table=2 dl_src=10:11:11:11:11:11 actions=controller
1084 AT_CHECK([ovs-ofctl -OOpenFlow12 add-flows br0 flows.txt])
1085 AT_CHECK([ovs-ofctl -OOpenFlow11 mod-table br0 all continue])
1087 dnl Hit table 0, Miss table 1, Hit table 2
1088 AT_CHECK([ovs-ofctl monitor br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1091 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)'
1093 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1094 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1096 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1097 NXT_PACKET_IN (xid=0x0): table_id=2 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1098 tcp,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
1100 NXT_PACKET_IN (xid=0x0): table_id=2 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1101 tcp,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
1103 NXT_PACKET_IN (xid=0x0): table_id=2 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1104 tcp,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
1107 dnl Hit table 1, Miss all other tables, sent to controller
1108 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1111 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)'
1113 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1114 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
1116 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1117 NXT_PACKET_IN (xid=0x0): table_id=253 cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
1118 tcp,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
1120 NXT_PACKET_IN (xid=0x0): table_id=253 cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
1121 tcp,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
1123 NXT_PACKET_IN (xid=0x0): table_id=253 cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
1124 tcp,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
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=goto_table:1
1130 table=2, n_packets=3, n_bytes=180, dl_src=10:11:11:11:11:11 actions=CONTROLLER:65535
1131 OFPST_FLOW reply (OF1.2):
1137 AT_SETUP([ofproto-dpif - Table Miss - resubmit and OFPTC_TABLE_MISS_CONTINUE])
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_DATA([flows.txt], [dnl
1145 table=0 actions=resubmit(1,1)
1146 table=2 dl_src=10:11:11:11:11:11 actions=controller
1148 AT_CHECK([ovs-ofctl -OOpenFlow12 add-flows br0 flows.txt])
1149 AT_CHECK([ovs-ofctl -OOpenFlow11 mod-table br0 all continue])
1151 dnl Hit table 0, Miss table 1, Dropped
1152 AT_CHECK([ovs-ofctl monitor br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1155 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)'
1157 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1159 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1162 dnl Hit table 1, Dropped
1163 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1166 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)'
1168 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
1170 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1173 AT_CHECK([ovs-appctl revalidator/purge], [0])
1174 AT_CHECK([ovs-ofctl -OOpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
1175 n_packets=6, n_bytes=360, actions=resubmit(1,1)
1176 table=2, dl_src=10:11:11:11:11:11 actions=CONTROLLER:65535
1177 OFPST_FLOW reply (OF1.2):
1183 AT_SETUP([ofproto-dpif - Table Miss - OFPTC_TABLE_MISS_DROP])
1184 OVS_VSWITCHD_START([dnl
1185 add-port br0 p1 -- set Interface p1 type=dummy
1187 ON_EXIT([kill `cat ovs-ofctl.pid`])
1189 AT_CAPTURE_FILE([ofctl_monitor.log])
1190 AT_CHECK([ovs-ofctl -OOpenFlow11 mod-table br0 all drop])
1192 AT_CHECK([ovs-ofctl monitor -P openflow10 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1194 dnl Test that missed packets are droped
1196 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)'
1198 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
1200 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1203 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1204 AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
1211 AT_SETUP([ofproto-dpif - Table Miss - goto table and OFPTC_TABLE_MISS_DROP])
1212 OVS_VSWITCHD_START([dnl
1213 add-port br0 p1 -- set Interface p1 type=dummy
1215 ON_EXIT([kill `cat ovs-ofctl.pid`])
1217 AT_CAPTURE_FILE([ofctl_monitor.log])
1218 AT_CHECK([ovs-ofctl del-flows br0])
1219 AT_CHECK([ovs-ofctl -OOpenFlow12 add-flow br0 'table=0 actions=goto_table(1)'])
1220 AT_CHECK([ovs-ofctl -OOpenFlow11 mod-table br0 all drop])
1222 AT_CHECK([ovs-ofctl monitor -P openflow10 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1224 dnl Test that missed packets are droped
1226 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)'
1228 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
1230 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1233 AT_CHECK([ovs-appctl revalidator/purge], [0])
1234 AT_CHECK([ovs-ofctl -OOpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
1235 n_packets=3, n_bytes=180, actions=goto_table:1
1236 OFPST_FLOW reply (OF1.2):
1242 AT_SETUP([ofproto-dpif - Table Miss - resubmit and OFPTC_TABLE_MISS_DROP])
1243 OVS_VSWITCHD_START([dnl
1244 add-port br0 p1 -- set Interface p1 type=dummy
1246 ON_EXIT([kill `cat ovs-ofctl.pid`])
1248 AT_CAPTURE_FILE([ofctl_monitor.log])
1249 AT_CHECK([ovs-ofctl del-flows br0])
1250 AT_CHECK([ovs-ofctl -OOpenFlow12 add-flow br0 'table=0 actions=resubmit(1,1)'])
1251 AT_CHECK([ovs-ofctl -OOpenFlow11 mod-table br0 all drop])
1253 AT_CHECK([ovs-ofctl monitor -P openflow10 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1255 dnl Test that missed packets are droped
1257 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)'
1259 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
1261 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1264 AT_CHECK([ovs-appctl revalidator/purge], [0])
1265 AT_CHECK([ovs-ofctl -OOpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
1266 n_packets=3, n_bytes=180, actions=resubmit(1,1)
1267 OFPST_FLOW reply (OF1.2):
1273 AT_SETUP([ofproto-dpif - controller])
1274 OVS_VSWITCHD_START([dnl
1275 add-port br0 p1 -- set Interface p1 type=dummy
1277 ON_EXIT([kill `cat ovs-ofctl.pid`])
1279 AT_CAPTURE_FILE([ofctl_monitor.log])
1280 AT_DATA([flows.txt], [dnl
1281 cookie=0x0 dl_src=10:11:11:11:11:11 actions=controller
1282 cookie=0x1 dl_src=20:22:22:22:22:22 actions=controller,resubmit(80,1)
1283 cookie=0x2 dl_src=30:33:33:33:33:33 actions=mod_vlan_vid:15,controller
1285 cookie=0x3 table=1 in_port=80 actions=load:1->NXM_NX_REG0[[]],mod_vlan_vid:80,controller,resubmit(81,2)
1286 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)
1287 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)
1288 cookie=0x6 table=4 in_port=83 actions=load:4->NXM_NX_REG3[[]],mod_nw_src:83.83.83.83,controller,resubmit(84,5)
1289 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)
1290 cookie=0x8 table=6 in_port=85 actions=mod_tp_src:85,controller,resubmit(86,7)
1291 cookie=0x9 table=7 in_port=86 actions=mod_tp_dst:86,controller,controller
1292 cookie=0xa dl_src=40:44:44:44:44:41 actions=mod_vlan_vid:99,mod_vlan_pcp:1,controller
1293 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
1295 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
1298 AT_CHECK([ovs-ofctl monitor -P openflow10 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1301 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)'
1303 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1304 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1306 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1307 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
1308 tcp,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
1310 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
1311 tcp,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
1313 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
1314 tcp,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
1317 dnl Singleton controller action.
1318 AT_CHECK([ovs-ofctl monitor -P openflow10 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1321 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)'
1323 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1324 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1326 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1327 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1328 tcp,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
1330 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1331 tcp,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
1333 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1334 tcp,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
1337 dnl Modified controller action.
1338 AT_CHECK([ovs-ofctl monitor -P openflow10 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1341 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)'
1343 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1344 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1346 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1347 OFPT_PACKET_IN (xid=0x0): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1348 tcp,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
1350 OFPT_PACKET_IN (xid=0x0): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1351 tcp,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
1353 OFPT_PACKET_IN (xid=0x0): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1354 tcp,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
1357 dnl Modified VLAN controller action.
1358 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1361 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)'
1363 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1364 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1366 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1367 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1368 ip,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
1370 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1371 ip,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
1373 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1374 ip,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
1378 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1381 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)'
1383 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 18])
1384 ovs-appctl -t ovs-ofctl exit
1386 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1387 NXT_PACKET_IN (xid=0x0): cookie=0x1 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1388 tcp,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
1390 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x3 total_len=64 reg0=0x1,in_port=1 (via action) data_len=64 (unbuffered)
1391 tcp,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
1393 NXT_PACKET_IN (xid=0x0): table_id=2 cookie=0x4 total_len=64 reg0=0x1,reg1=0x2,in_port=1 (via action) data_len=64 (unbuffered)
1394 tcp,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
1396 NXT_PACKET_IN (xid=0x0): table_id=3 cookie=0x5 total_len=64 reg0=0x1,reg1=0x2,reg2=0x3,in_port=1 (via action) data_len=64 (unbuffered)
1397 tcp,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
1399 NXT_PACKET_IN (xid=0x0): table_id=4 cookie=0x6 total_len=64 reg0=0x1,reg1=0x2,reg2=0x3,reg3=0x4,in_port=1 (via action) data_len=64 (unbuffered)
1400 tcp,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
1402 NXT_PACKET_IN (xid=0x0): table_id=5 cookie=0x7 total_len=64 reg0=0x1,reg1=0x2,reg2=0x3,reg3=0x4,reg4=0x5,tun_id=0x6,in_port=1 (via action) data_len=64 (unbuffered)
1403 tcp,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
1405 NXT_PACKET_IN (xid=0x0): table_id=6 cookie=0x8 total_len=64 reg0=0x1,reg1=0x2,reg2=0x3,reg3=0x4,reg4=0x5,tun_id=0x6,in_port=1 (via action) data_len=64 (unbuffered)
1406 tcp,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
1408 NXT_PACKET_IN (xid=0x0): table_id=7 cookie=0x9 total_len=64 reg0=0x1,reg1=0x2,reg2=0x3,reg3=0x4,reg4=0x5,tun_id=0x6,in_port=1 (via action) data_len=64 (unbuffered)
1409 tcp,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
1411 NXT_PACKET_IN (xid=0x0): table_id=7 cookie=0x9 total_len=64 reg0=0x1,reg1=0x2,reg2=0x3,reg3=0x4,reg4=0x5,tun_id=0x6,in_port=1 (via action) data_len=64 (unbuffered)
1412 tcp,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
1416 AT_CHECK([ovs-ofctl monitor br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1419 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'
1421 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 18])
1422 ovs-appctl -t ovs-ofctl exit
1424 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1425 NXT_PACKET_IN (xid=0x0): cookie=0x1 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1426 udp,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
1428 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x3 total_len=64 reg0=0x1,in_port=1 (via action) data_len=64 (unbuffered)
1429 udp,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
1431 NXT_PACKET_IN (xid=0x0): table_id=2 cookie=0x4 total_len=64 reg0=0x1,reg1=0x2,in_port=1 (via action) data_len=64 (unbuffered)
1432 udp,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
1434 NXT_PACKET_IN (xid=0x0): table_id=3 cookie=0x5 total_len=64 reg0=0x1,reg1=0x2,reg2=0x3,in_port=1 (via action) data_len=64 (unbuffered)
1435 udp,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
1437 NXT_PACKET_IN (xid=0x0): table_id=4 cookie=0x6 total_len=64 reg0=0x1,reg1=0x2,reg2=0x3,reg3=0x4,in_port=1 (via action) data_len=64 (unbuffered)
1438 udp,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
1440 NXT_PACKET_IN (xid=0x0): table_id=5 cookie=0x7 total_len=64 reg0=0x1,reg1=0x2,reg2=0x3,reg3=0x4,reg4=0x5,tun_id=0x6,in_port=1 (via action) data_len=64 (unbuffered)
1441 udp,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
1443 NXT_PACKET_IN (xid=0x0): table_id=6 cookie=0x8 total_len=64 reg0=0x1,reg1=0x2,reg2=0x3,reg3=0x4,reg4=0x5,tun_id=0x6,in_port=1 (via action) data_len=64 (unbuffered)
1444 udp,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
1446 NXT_PACKET_IN (xid=0x0): table_id=7 cookie=0x9 total_len=64 reg0=0x1,reg1=0x2,reg2=0x3,reg3=0x4,reg4=0x5,tun_id=0x6,in_port=1 (via action) data_len=64 (unbuffered)
1447 udp,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
1449 NXT_PACKET_IN (xid=0x0): table_id=7 cookie=0x9 total_len=64 reg0=0x1,reg1=0x2,reg2=0x3,reg3=0x4,reg4=0x5,tun_id=0x6,in_port=1 (via action) data_len=64 (unbuffered)
1450 udp,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
1453 dnl Modified ARP controller action.
1454 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1457 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)'
1460 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 18])
1461 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
1462 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1463 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1464 arp,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
1465 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1466 arp,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
1467 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1468 arp,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
1469 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1470 arp,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
1471 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1472 arp,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
1473 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1474 arp,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
1475 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1476 arp,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
1477 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1478 arp,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
1479 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1480 arp,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
1483 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1486 AT_CHECK([ovs-ofctl monitor br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1489 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'
1492 AT_CHECK([ovs-appctl time/warp 1000], [0], [ignore])
1493 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 18])
1494 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
1495 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1496 NXT_PACKET_IN (xid=0x0): cookie=0x1 total_len=98 in_port=1 (via action) data_len=98 (unbuffered)
1497 sctp,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
1499 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x3 total_len=102 reg0=0x1,in_port=1 (via action) data_len=102 (unbuffered)
1500 sctp,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
1502 NXT_PACKET_IN (xid=0x0): table_id=2 cookie=0x4 total_len=102 reg0=0x1,reg1=0x2,in_port=1 (via action) data_len=102 (unbuffered)
1503 sctp,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
1505 NXT_PACKET_IN (xid=0x0): table_id=3 cookie=0x5 total_len=102 reg0=0x1,reg1=0x2,reg2=0x3,in_port=1 (via action) data_len=102 (unbuffered)
1506 sctp,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
1508 NXT_PACKET_IN (xid=0x0): table_id=4 cookie=0x6 total_len=102 reg0=0x1,reg1=0x2,reg2=0x3,reg3=0x4,in_port=1 (via action) data_len=102 (unbuffered)
1509 sctp,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
1511 NXT_PACKET_IN (xid=0x0): table_id=5 cookie=0x7 total_len=102 reg0=0x1,reg1=0x2,reg2=0x3,reg3=0x4,reg4=0x5,tun_id=0x6,in_port=1 (via action) data_len=102 (unbuffered)
1512 sctp,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
1514 NXT_PACKET_IN (xid=0x0): table_id=6 cookie=0x8 total_len=102 reg0=0x1,reg1=0x2,reg2=0x3,reg3=0x4,reg4=0x5,tun_id=0x6,in_port=1 (via action) data_len=102 (unbuffered)
1515 sctp,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:dd778f5f
1517 NXT_PACKET_IN (xid=0x0): table_id=7 cookie=0x9 total_len=102 reg0=0x1,reg1=0x2,reg2=0x3,reg3=0x4,reg4=0x5,tun_id=0x6,in_port=1 (via action) data_len=102 (unbuffered)
1518 sctp,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:62051f56
1520 NXT_PACKET_IN (xid=0x0): table_id=7 cookie=0x9 total_len=102 reg0=0x1,reg1=0x2,reg2=0x3,reg3=0x4,reg4=0x5,tun_id=0x6,in_port=1 (via action) data_len=102 (unbuffered)
1521 sctp,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:62051f56
1524 AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
1525 cookie=0x1, n_packets=3, n_bytes=218, dl_src=20:22:22:22:22:22 actions=CONTROLLER:65535,resubmit(80,1)
1526 cookie=0x2, n_packets=3, n_bytes=180, dl_src=30:33:33:33:33:33 actions=mod_vlan_vid:15,CONTROLLER:65535
1527 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)
1528 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)
1529 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)
1530 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)
1531 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)
1532 cookie=0x8, table=6, n_packets=3, n_bytes=218, in_port=85 actions=mod_tp_src:85,CONTROLLER:65535,resubmit(86,7)
1533 cookie=0x9, table=7, n_packets=3, n_bytes=218, in_port=86 actions=mod_tp_dst:86,CONTROLLER:65535,CONTROLLER:65535
1534 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
1535 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
1536 n_packets=3, n_bytes=180, dl_src=10:11:11:11:11:11 actions=CONTROLLER:65535
1543 AT_SETUP([ofproto-dpif - MPLS handling])
1544 OVS_VSWITCHD_START([dnl
1545 add-port br0 p1 -- set Interface p1 type=dummy
1547 ON_EXIT([kill `cat ovs-ofctl.pid`])
1549 AT_CAPTURE_FILE([ofctl_monitor.log])
1550 AT_DATA([flows.txt], [dnl
1551 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
1552 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
1553 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
1554 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
1555 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
1556 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
1557 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
1558 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
1559 cookie=0xa mpls,dl_src=40:44:44:44:44:49 actions=push_mpls:0x8848,load:10->OXM_OF_MPLS_LABEL[[]],CONTROLLER:65535
1560 cookie=0xb dl_src=50:55:55:55:55:55 dl_type=0x8847 actions=load:1000->OXM_OF_MPLS_LABEL[[]],controller
1561 cookie=0xd dl_src=60:66:66:66:66:66 actions=pop_mpls:0x0800,controller
1562 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
1564 cookie=0xd dl_src=60:66:66:66:00:01 actions=pop_mpls:0x0800,dec_ttl,controller
1565 cookie=0xd dl_src=60:66:66:66:00:02 actions=pop_mpls:0x0800,load:0xa000001->OXM_OF_IPV4_DST[[]],controller
1566 cookie=0xd dl_src=60:66:66:66:00:03 actions=pop_mpls:0x0800,move:OXM_OF_IPV4_DST[[]]->OXM_OF_IPV4_SRC[[]],controller
1567 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
1568 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
1569 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
1570 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
1572 cookie=0xd dl_src=60:66:66:66:00:08 actions=pop_mpls:0x0806,resubmit(1,1)
1573 cookie=0xd table=1 arp actions=controller
1575 cookie=0xdeadbeef table=2 dl_src=60:66:66:66:00:09 actions=pop_mpls:0x0800,mod_nw_tos:48
1576 cookie=0xd dl_src=60:66:66:66:00:09 actions=resubmit(,2),controller
1577 cookie=0xd dl_src=60:66:66:66:00:0a actions=pop_mpls:0x0800,mod_nw_dst:10.0.0.1,controller
1578 cookie=0xd dl_src=60:66:66:66:00:0b actions=pop_mpls:0x0800,mod_nw_src:10.0.0.1,controller
1580 cookie=0xd dl_src=60:66:66:66:01:00 actions=pop_mpls:0x8848,controller
1581 cookie=0xd dl_src=60:66:66:66:01:01 actions=pop_mpls:0x8847,dec_mpls_ttl,controller
1582 cookie=0xd dl_src=60:66:66:66:01:02 actions=pop_mpls:0x8848,load:3->OXM_OF_MPLS_TC[[]],controller
1584 cookie=0xd dl_src=60:66:66:66:02:00 actions=pop_mpls:0x8847,pop_mpls:0x0800,controller
1585 cookie=0xe dl_src=60:66:66:66:02:01 actions=pop_mpls:0x8848,pop_mpls:0x0800,dec_ttl,controller
1586 cookie=0xe dl_src=60:66:66:66:02:10 actions=pop_mpls:0x8847,dec_mpls_ttl,pop_mpls:0x0800,dec_ttl,controller
1588 cookie=0xe dl_src=60:66:66:66:03:00 actions=pop_mpls:0x8848,pop_mpls:0x8848,controller
1589 cookie=0xe dl_src=60:66:66:66:03:01 actions=pop_mpls:0x8847,pop_mpls:0x8847,dec_mpls_ttl,controller
1590 cookie=0xe dl_src=60:66:66:66:03:10 actions=pop_mpls:0x8848,dec_mpls_ttl,pop_mpls:0x8848,dec_mpls_ttl,controller
1592 cookie=0xf dl_src=60:66:66:66:04:00 actions=pop_mpls:0x0800,push_mpls:0x8847,controller
1593 cookie=0xf dl_src=60:66:66:66:04:01 actions=pop_mpls:0x0800,push_mpls:0x8848,dec_mpls_ttl,controller
1594 cookie=0xf dl_src=60:66:66:66:04:10 actions=pop_mpls:0x0800,dec_ttl,push_mpls:0x8848,dec_mpls_ttl,controller
1596 cookie=0x5 dl_src=60:66:66:66:05:00 actions=push_mpls:0x8848,pop_mpls:0x8847,controller
1597 cookie=0x5 dl_src=60:66:66:66:05:01 actions=push_mpls:0x8847,pop_mpls:0x8848,dec_mpls_ttl,controller
1598 cookie=0x5 dl_src=60:66:66:66:05:10 actions=push_mpls:0x8848,dec_mpls_ttl,pop_mpls:0x8847,dec_mpls_ttl,controller
1600 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
1602 dnl Modified MPLS controller action.
1603 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1606 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)'
1608 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1609 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1611 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1612 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1613 mpls,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
1615 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1616 mpls,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
1618 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1619 mpls,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
1622 dnl Modified MPLS controller action.
1623 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1626 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)'
1628 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1629 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1631 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1632 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1633 ip,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
1635 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1636 ip,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
1638 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1639 ip,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
1642 dnl Modified MPLS controller action.
1643 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1645 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)
1648 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)'
1650 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1651 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1653 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1654 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1655 mpls,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
1657 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1658 mpls,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
1660 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1661 mpls,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
1664 dnl Modified MPLS controller action.
1665 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1668 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))'
1670 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1671 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1673 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1674 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1675 mpls,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
1677 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1678 mpls,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
1680 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1681 mpls,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
1684 dnl Modified MPLS controller action.
1685 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1688 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)'
1690 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1691 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1693 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1694 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1695 mpls,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
1697 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1698 mpls,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
1700 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1701 mpls,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
1704 dnl Modified MPLS controller action.
1705 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1708 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)'
1710 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1711 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1713 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1714 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1715 mpls,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
1717 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1718 mpls,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
1720 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1721 mpls,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
1724 dnl Modified MPLS controller action.
1725 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1728 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)'
1730 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1731 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1733 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1734 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1735 mpls,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
1737 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1738 mpls,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
1740 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1741 mpls,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
1744 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1746 dnl Modified MPLS controller action.
1747 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1750 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)'
1752 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1753 ovs-appctl -t ovs-ofctl exit
1755 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1756 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1757 mplsm,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
1759 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1760 mplsm,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
1762 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1763 mplsm,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
1766 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1768 dnl Modified MPLS controller action.
1769 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1772 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)'
1774 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1775 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1777 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1778 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1779 mpls,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
1781 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1782 mpls,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
1784 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1785 mpls,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
1788 dnl Modified MPLS actions.
1789 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1792 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)'
1794 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1795 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1797 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1798 NXT_PACKET_IN (xid=0x0): cookie=0xb total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1799 mpls,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
1801 NXT_PACKET_IN (xid=0x0): cookie=0xb total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1802 mpls,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
1804 NXT_PACKET_IN (xid=0x0): cookie=0xb total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1805 mpls,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
1808 dnl Modified MPLS ipv6 controller action.
1809 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1812 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)'
1814 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1815 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1817 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1818 NXT_PACKET_IN (xid=0x0): cookie=0xc total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1819 mplsm,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
1821 NXT_PACKET_IN (xid=0x0): cookie=0xc total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1822 mplsm,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
1824 NXT_PACKET_IN (xid=0x0): cookie=0xc total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1825 mplsm,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
1829 dnl Modified MPLS pop action.
1830 dnl The input is a frame with two MPLS headers which tcpdump -vve shows as:
1831 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)
1832 dnl (tos 0x0, ttl 64, id 0, offset 0, flags [none], proto TCP (6), length 44)
1834 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1837 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'
1840 # 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)'
1842 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1843 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1845 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1846 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1847 tcp,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
1849 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1850 tcp,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
1852 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1853 tcp,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
1856 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1858 dnl Modified MPLS pop action.
1859 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
1860 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)
1861 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
1862 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
1863 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1866 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'
1868 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1869 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1871 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
1872 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1873 tcp,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
1875 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1876 tcp,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
1878 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1879 tcp,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
1882 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1884 dnl Modified MPLS pop action.
1885 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
1886 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)
1887 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
1888 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
1889 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1892 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'
1894 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1895 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1897 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
1898 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1899 tcp,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
1901 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1902 tcp,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
1904 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1905 tcp,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
1908 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1910 dnl Modified MPLS pop action.
1911 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
1912 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)
1913 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
1914 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
1915 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1918 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'
1920 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1921 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1923 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
1924 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1925 tcp,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
1927 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1928 tcp,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
1930 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1931 tcp,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
1934 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1936 dnl Modified MPLS pop action.
1937 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
1938 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)
1939 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
1940 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
1941 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1944 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'
1946 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1947 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1949 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
1950 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1951 tcp,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
1953 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1954 tcp,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
1956 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1957 tcp,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
1960 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1962 dnl Modified MPLS pop action.
1963 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
1964 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)
1965 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
1966 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
1967 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1970 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'
1972 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1973 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1975 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
1976 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1977 tcp,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
1979 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1980 tcp,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
1982 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1983 tcp,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
1986 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1988 dnl Modified MPLS pop action.
1989 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
1990 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)
1991 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
1992 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
1993 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1996 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'
1998 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1999 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2001 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
2002 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2003 tcp,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
2005 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2006 tcp,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
2008 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2009 tcp,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
2012 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2014 dnl Modified MPLS pop action.
2015 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
2016 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)
2017 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
2018 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
2019 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2022 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'
2024 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2025 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2027 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
2028 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2029 tcp,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
2031 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2032 tcp,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
2034 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2035 tcp,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
2038 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2040 dnl Modified MPLS pop action.
2041 dnl The input is an ARP frame with a single MPLS label stack entry which tcpdump -vve shows as:
2042 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)
2043 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2046 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'
2048 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2049 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2051 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
2052 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0xd total_len=56 in_port=1 (via action) data_len=56 (unbuffered)
2053 arp,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
2055 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0xd total_len=56 in_port=1 (via action) data_len=56 (unbuffered)
2056 arp,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
2058 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0xd total_len=56 in_port=1 (via action) data_len=56 (unbuffered)
2059 arp,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
2062 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2064 dnl Modified MPLS pop action.
2065 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
2066 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)
2067 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
2068 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
2069 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2072 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'
2074 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2075 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2077 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
2078 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2079 tcp,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
2081 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2082 tcp,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
2084 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2085 tcp,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
2088 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2090 dnl Modified MPLS pop action.
2091 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
2092 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)
2093 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
2094 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
2095 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2098 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'
2100 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2101 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2103 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
2104 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2105 tcp,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
2107 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2108 tcp,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
2110 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2111 tcp,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
2114 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2116 dnl Modified MPLS pop action.
2117 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
2118 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)
2119 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
2120 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
2121 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2124 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'
2126 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2127 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2129 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
2130 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2131 tcp,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
2133 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2134 tcp,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
2136 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2137 tcp,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
2140 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2142 dnl Modified MPLS pop action.
2143 dnl The input is a frame with two MPLS label stack entries which tcpdump -vve shows as:
2144 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)
2145 dnl (label 20, exp 0, [S], ttl 31)
2146 dnl (tos 0x0, ttl 254, id 0, offset 0, flags [none], proto TCP (6), length 44)
2147 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
2148 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2151 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'
2153 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2154 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2156 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2157 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2158 mplsm,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
2160 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2161 mplsm,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
2163 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2164 mplsm,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
2167 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2169 dnl Modified MPLS pop action.
2170 dnl The input is a frame with two MPLS label stack entries which tcpdump -vve shows as:
2171 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)
2172 dnl (label 20, exp 0, [S], ttl 31)
2173 dnl (tos 0x0, ttl 254, id 0, offset 0, flags [none], proto TCP (6), length 44)
2174 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
2175 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2178 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'
2180 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2181 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2183 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2184 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2185 mpls,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
2187 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2188 mpls,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
2190 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2191 mpls,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
2194 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2196 dnl Modified MPLS pop action.
2197 dnl The input is a frame with two MPLS label stack entries which tcpdump -vve shows as:
2198 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)
2199 dnl (label 20, exp 0, [S], ttl 31)
2200 dnl (tos 0x0, ttl 254, id 0, offset 0, flags [none], proto TCP (6), length 44)
2201 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
2202 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2205 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'
2207 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2208 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2210 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2211 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2212 mplsm,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
2214 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2215 mplsm,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
2217 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2218 mplsm,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
2221 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2223 dnl Modified MPLS pop action.
2224 dnl The input is a frame with two MPLS label stack entries which tcpdump -vve shows as:
2225 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)
2226 dnl (label 20, exp 0, [S], ttl 31)
2227 dnl (tos 0x0, ttl 254, id 0, offset 0, flags [none], proto TCP (6), length 44)
2228 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
2229 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2232 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'
2234 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2235 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2237 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2238 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2239 tcp,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
2241 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2242 tcp,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
2244 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2245 tcp,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
2248 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2250 dnl Modified MPLS pop action.
2251 dnl The input is a frame with two MPLS label stack entries which tcpdump -vve shows as:
2252 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)
2253 dnl (label 20, exp 0, [S], ttl 31)
2254 dnl (tos 0x0, ttl 254, id 0, offset 0, flags [none], proto TCP (6), length 44)
2255 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
2256 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2259 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'
2262 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2263 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2265 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
2266 NXT_PACKET_IN (xid=0x0): cookie=0xe total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2267 tcp,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
2269 NXT_PACKET_IN (xid=0x0): cookie=0xe total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2270 tcp,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
2272 NXT_PACKET_IN (xid=0x0): cookie=0xe total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2273 tcp,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
2276 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2278 dnl Modified MPLS pop action.
2279 dnl The input is a frame with two MPLS label stack entries which tcpdump -vve shows as:
2280 dnl 60:66:66:66:02:10 > 50:54:00:00:00:07, ethertype MPLS unicast (0x8847), length 66: MPLS (label 20, exp 0, ttl 32)
2281 dnl (label 20, exp 0, [S], ttl 31)
2282 dnl (tos 0x0, ttl 254, id 0, offset 0, flags [none], proto TCP (6), length 44)
2283 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
2284 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2287 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'
2289 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2290 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2292 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
2293 NXT_PACKET_IN (xid=0x0): cookie=0xe total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2294 tcp,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
2296 NXT_PACKET_IN (xid=0x0): cookie=0xe total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2297 tcp,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
2299 NXT_PACKET_IN (xid=0x0): cookie=0xe total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2300 tcp,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
2303 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2305 dnl Modified MPLS pop action.
2306 dnl The input is a frame with three MPLS label stack entries which tcpdump -vve shows as:
2307 dnl 60:66:66:66:03:00 > 50:54:00:00:00:07, ethertype MPLS unicast (0x8847), length 66: MPLS (label 20, exp 0, ttl 32)
2308 dnl (label 20, exp 0, ttl 31)
2309 dnl (label 20, exp 0, [S], ttl 30)
2310 dnl (tos 0x0, ttl 254, id 0, offset 0, flags [none], proto TCP (6), length 44)
2311 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
2312 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2315 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'
2317 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2318 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2320 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2321 NXT_PACKET_IN (xid=0x0): cookie=0xe total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2322 mplsm,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
2324 NXT_PACKET_IN (xid=0x0): cookie=0xe total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2325 mplsm,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
2327 NXT_PACKET_IN (xid=0x0): cookie=0xe total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2328 mplsm,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
2331 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2333 dnl Modified MPLS pop action.
2334 dnl The input is a frame with three MPLS label stack entries which tcpdump -vve shows as:
2335 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)
2336 dnl (label 20, exp 0, ttl 31)
2337 dnl (label 20, exp 0, [S], ttl 30)
2338 dnl (tos 0x0, ttl 254, id 0, offset 0, flags [none], proto TCP (6), length 44)
2339 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
2340 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2343 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'
2345 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2346 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2348 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2349 NXT_PACKET_IN (xid=0x0): cookie=0xe total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2350 mpls,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
2352 NXT_PACKET_IN (xid=0x0): cookie=0xe total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2353 mpls,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
2355 NXT_PACKET_IN (xid=0x0): cookie=0xe total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2356 mpls,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
2359 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2361 dnl Modified MPLS pop action.
2362 dnl The input is a frame with three MPLS label stack entries which tcpdump -vve shows as:
2363 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)
2364 dnl (label 20, exp 0, ttl 31)
2365 dnl (label 20, exp 0, [S], ttl 30)
2366 dnl (tos 0x0, ttl 254, id 0, offset 0, flags [none], proto TCP (6), length 44)
2367 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
2368 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2371 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'
2373 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2374 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2376 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2377 NXT_PACKET_IN (xid=0x0): cookie=0xe total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2378 mplsm,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
2380 NXT_PACKET_IN (xid=0x0): cookie=0xe total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2381 mplsm,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
2383 NXT_PACKET_IN (xid=0x0): cookie=0xe total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2384 mplsm,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
2387 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2389 dnl Modified MPLS pop action.
2390 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
2391 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)
2392 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
2393 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
2394 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2397 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'
2399 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2400 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2402 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
2403 NXT_PACKET_IN (xid=0x0): cookie=0xf total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2404 mpls,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
2406 NXT_PACKET_IN (xid=0x0): cookie=0xf total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2407 mpls,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
2409 NXT_PACKET_IN (xid=0x0): cookie=0xf total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2410 mpls,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
2413 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2415 dnl Modified MPLS pop action.
2416 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
2417 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)
2418 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
2419 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
2420 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2423 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'
2425 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2426 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2428 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
2429 NXT_PACKET_IN (xid=0x0): cookie=0xf total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2430 mplsm,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
2432 NXT_PACKET_IN (xid=0x0): cookie=0xf total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2433 mplsm,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
2435 NXT_PACKET_IN (xid=0x0): cookie=0xf total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2436 mplsm,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
2439 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2441 dnl Modified MPLS pop action.
2442 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
2443 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)
2444 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
2445 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
2446 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2449 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'
2451 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2452 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2454 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
2455 NXT_PACKET_IN (xid=0x0): cookie=0xf total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2456 mplsm,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
2458 NXT_PACKET_IN (xid=0x0): cookie=0xf total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2459 mplsm,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
2461 NXT_PACKET_IN (xid=0x0): cookie=0xf total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2462 mplsm,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
2465 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2467 dnl Modified MPLS pop action.
2468 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
2469 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)
2470 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
2471 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
2472 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2475 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'
2478 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2479 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2481 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2482 NXT_PACKET_IN (xid=0x0): cookie=0x5 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2483 mpls,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
2485 NXT_PACKET_IN (xid=0x0): cookie=0x5 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2486 mpls,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
2488 NXT_PACKET_IN (xid=0x0): cookie=0x5 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2489 mpls,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
2492 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2494 dnl Modified MPLS pop action.
2495 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
2496 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)
2497 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
2498 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
2499 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2502 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'
2504 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2505 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2507 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2508 NXT_PACKET_IN (xid=0x0): cookie=0x5 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2509 mplsm,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
2511 NXT_PACKET_IN (xid=0x0): cookie=0x5 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2512 mplsm,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
2514 NXT_PACKET_IN (xid=0x0): cookie=0x5 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2515 mplsm,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
2518 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2520 dnl Modified MPLS pop action.
2521 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
2522 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)
2523 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
2524 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
2525 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2528 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'
2531 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2532 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2534 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2535 NXT_PACKET_IN (xid=0x0): cookie=0x5 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2536 mpls,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
2538 NXT_PACKET_IN (xid=0x0): cookie=0x5 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2539 mpls,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
2541 NXT_PACKET_IN (xid=0x0): cookie=0x5 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2542 mpls,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
2545 AT_CHECK([ovs-appctl revalidator/purge], [0])
2546 AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
2547 cookie=0x5, n_packets=3, n_bytes=186, dl_src=60:66:66:66:05:00 actions=push_mpls:0x8848,pop_mpls:0x8847,CONTROLLER:65535
2548 cookie=0x5, 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
2549 cookie=0x5, 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
2550 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
2551 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
2552 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
2553 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
2554 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
2555 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
2556 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
2557 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
2558 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
2559 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
2560 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
2561 cookie=0xd, n_packets=3, n_bytes=180, dl_src=60:66:66:66:00:08 actions=pop_mpls:0x0806,resubmit(1,1)
2562 cookie=0xd, n_packets=3, n_bytes=186, dl_src=60:66:66:66:00:01 actions=pop_mpls:0x0800,dec_ttl,CONTROLLER:65535
2563 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
2564 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
2565 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
2566 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
2567 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
2568 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
2569 cookie=0xd, n_packets=3, n_bytes=186, dl_src=60:66:66:66:00:09 actions=resubmit(,2),CONTROLLER:65535
2570 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
2571 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
2572 cookie=0xd, n_packets=3, n_bytes=186, dl_src=60:66:66:66:66:66 actions=pop_mpls:0x0800,CONTROLLER:65535
2573 cookie=0xd, n_packets=3, n_bytes=198, dl_src=60:66:66:66:01:00 actions=pop_mpls:0x8848,CONTROLLER:65535
2574 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
2575 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
2576 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
2577 cookie=0xd, table=1, n_packets=3, n_bytes=168, arp actions=CONTROLLER:65535
2578 cookie=0xdeadbeef, table=2, n_packets=3, n_bytes=186, dl_src=60:66:66:66:00:09 actions=pop_mpls:0x0800,mod_nw_tos:48
2579 cookie=0xe, 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
2580 cookie=0xe, 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
2581 cookie=0xe, n_packets=3, n_bytes=210, dl_src=60:66:66:66:03:00 actions=pop_mpls:0x8848,pop_mpls:0x8848,CONTROLLER:65535
2582 cookie=0xe, 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
2583 cookie=0xe, 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
2584 cookie=0xf, n_packets=3, n_bytes=186, dl_src=60:66:66:66:04:00 actions=pop_mpls:0x0800,push_mpls:0x8847,CONTROLLER:65535
2585 cookie=0xf, 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
2586 cookie=0xf, 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
2593 AT_SETUP([ofproto-dpif - MPLS handling with goto_table])
2594 OVS_VSWITCHD_START([dnl
2595 add-port br0 p1 -- set Interface p1 type=dummy
2597 ON_EXIT([kill `cat ovs-ofctl.pid`])
2599 AT_CAPTURE_FILE([ofctl_monitor.log])
2600 AT_DATA([flows.txt], [dnl
2601 table=0 mplsm actions=pop_mpls:0x800,goto_table(1)
2602 table=1 ip,ip_dscp=8 actions=controller
2604 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flows br0 flows.txt])
2607 dnl Modified MPLS pop action.
2608 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
2609 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)
2610 dnl (tos 0x20, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
2611 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
2612 AT_CHECK([ovs-ofctl -O OpenFlow12 monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2615 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'
2617 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2618 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2620 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
2621 OFPT_PACKET_IN (OF1.2) (xid=0x0): table_id=1 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2622 tcp,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
2624 OFPT_PACKET_IN (OF1.2) (xid=0x0): table_id=1 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2625 tcp,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
2627 OFPT_PACKET_IN (OF1.2) (xid=0x0): table_id=1 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2628 tcp,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
2631 AT_CHECK([ovs-appctl revalidator/purge], [0])
2632 AT_CHECK([ovs-ofctl -O OpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
2633 n_packets=3, n_bytes=186, mplsm actions=pop_mpls:0x0800,goto_table:1
2634 table=1, n_packets=3, n_bytes=174, ip,nw_tos=32 actions=CONTROLLER:65535
2635 OFPST_FLOW reply (OF1.2):
2641 AT_SETUP([ofproto-dpif - MPLS handling with write_actions])
2642 OVS_VSWITCHD_START([dnl
2643 add-port br0 p1 -- set Interface p1 type=dummy
2645 ON_EXIT([kill `cat ovs-ofctl.pid`])
2647 dnl N.B: The first (and only) action that accesses L3 data after the
2648 dnl pop_mpls action is present in write_actions. This exercises recirculation
2649 dnl triggered in write_actions due to a previous action not in write actions.
2650 AT_CAPTURE_FILE([ofctl_monitor.log])
2651 AT_DATA([flows.txt], [dnl
2652 mplsm actions=pop_mpls:0x800,write_actions(dec_ttl,controller)
2654 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flows br0 flows.txt])
2656 dnl Modified MPLS pop action.
2657 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
2658 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)
2659 dnl (tos 0x20, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
2660 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
2661 AT_CHECK([ovs-ofctl -O OpenFlow12 monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2664 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'
2666 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2667 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2669 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
2670 OFPT_PACKET_IN (OF1.2) (xid=0x0): total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2671 tcp,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
2673 OFPT_PACKET_IN (OF1.2) (xid=0x0): total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2674 tcp,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
2676 OFPT_PACKET_IN (OF1.2) (xid=0x0): total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2677 tcp,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
2680 AT_CHECK([ovs-appctl revalidator/purge], [0])
2681 AT_CHECK([ovs-ofctl -O OpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
2682 n_packets=3, n_bytes=186, mplsm actions=pop_mpls:0x0800,write_actions(dec_ttl,CONTROLLER:65535)
2683 OFPST_FLOW reply (OF1.2):
2689 AT_SETUP([ofproto-dpif - table-miss flow (OpenFlow 1.0)])
2690 OVS_VSWITCHD_START([dnl
2691 add-port br0 p1 -- set Interface p1 type=dummy
2693 ON_EXIT([kill `cat ovs-ofctl.pid`])
2695 AT_CAPTURE_FILE([ofctl_monitor.log])
2696 # A table-miss flow has priority 0 and no match
2697 AT_CHECK([ovs-ofctl --protocols=OpenFlow10 add-flow br0 'priority=0 actions=output:CONTROLLER'])
2699 dnl Singleton controller action.
2700 AT_CHECK([ovs-ofctl monitor -P openflow10 --protocols=OpenFlow10 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
2703 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)'
2705 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2706 ovs-appctl -t ovs-ofctl exit
2708 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2709 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
2710 tcp,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
2712 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
2713 tcp,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
2715 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
2716 tcp,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
2719 AT_CHECK([ovs-appctl revalidator/purge], [0])
2720 AT_CHECK([ovs-ofctl --protocols=OpenFlow10 dump-flows br0 | ofctl_strip | sort], [0], [dnl
2721 n_packets=3, n_bytes=180, priority=0 actions=CONTROLLER:65535
2729 AT_SETUP([ofproto-dpif - table-miss flow (OpenFlow 1.3)])
2730 OVS_VSWITCHD_START([dnl
2731 add-port br0 p1 -- set Interface p1 type=dummy
2733 ON_EXIT([kill `cat ovs-ofctl.pid`])
2735 AT_CAPTURE_FILE([ofctl_monitor.log])
2736 # A table-miss flow has priority 0 and no match
2737 AT_CHECK([ovs-ofctl --protocols=OpenFlow13 add-flow br0 'priority=0 actions=output:CONTROLLER'])
2739 dnl Singleton controller action.
2740 AT_CHECK([ovs-ofctl monitor -P openflow10 --protocols=OpenFlow13 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
2743 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)'
2745 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2746 ovs-appctl -t ovs-ofctl exit
2748 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2750 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2751 OFPT_PACKET_IN (OF1.3) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
2752 tcp,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:0
2754 OFPT_PACKET_IN (OF1.3) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
2755 tcp,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:0
2757 OFPT_PACKET_IN (OF1.3) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
2758 tcp,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
2761 AT_CHECK([ovs-appctl revalidator/purge], [0])
2762 AT_CHECK([ovs-ofctl --protocols=OpenFlow13 dump-flows br0 | ofctl_strip | sort], [0], [dnl
2763 n_packets=3, n_bytes=180, priority=0 actions=CONTROLLER:65535
2764 OFPST_FLOW reply (OF1.3):
2770 AT_SETUP([ofproto-dpif - table-miss flow with async config (OpenFlow 1.3)])
2771 OVS_VSWITCHD_START([dnl
2772 add-port br0 p1 -- set Interface p1 type=dummy
2774 ON_EXIT([kill `cat ovs-ofctl.pid`])
2776 ovs-appctl time/stop
2778 AT_CAPTURE_FILE([ofctl_monitor.log])
2779 # A table-miss flow has priority 0 and no match
2780 AT_CHECK([ovs-ofctl --protocols=OpenFlow13 add-flow br0 'priority=0 actions=output:CONTROLLER'])
2782 dnl Singleton controller action.
2783 AT_CHECK([ovs-ofctl monitor -P openflow10 --protocols=OpenFlow13 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
2785 # Become slave (OF 1.3), which should disable everything except port status.
2786 ovs-appctl -t ovs-ofctl ofctl/send 041800180000000200000003000000000000000000000001
2788 # Ensure that ovs-vswitchd gets a chance to reply before sending another command.
2789 ovs-appctl time/warp 500 100
2791 # Use OF 1.3 OFPT_SET_ASYNC to enable OFPR_NO_MATCH for slave only.
2792 ovs-appctl -t ovs-ofctl ofctl/send 041c002000000002000000000000000100000000000000000000000000000000
2794 ovs-appctl time/warp 500 100
2796 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)'
2798 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2799 ovs-appctl -t ovs-ofctl exit
2801 AT_CHECK([ovs-appctl revalidator/purge], [0])
2802 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2803 send: OFPT_ROLE_REQUEST (OF1.3) (xid=0x2): role=slave generation_id=1
2804 OFPT_ROLE_REPLY (OF1.3) (xid=0x2): role=slave generation_id=1
2806 send: OFPT_SET_ASYNC (OF1.3) (xid=0x2):
2817 OFPT_PACKET_IN (OF1.3) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
2818 tcp,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:0
2820 OFPT_PACKET_IN (OF1.3) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
2821 tcp,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:0
2823 OFPT_PACKET_IN (OF1.3) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
2824 tcp,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:0
2827 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2829 AT_CHECK([ovs-ofctl --protocols=OpenFlow13 dump-flows br0 | ofctl_strip | sort], [0], [dnl
2830 n_packets=3, n_bytes=180, priority=0 actions=CONTROLLER:65535
2831 OFPST_FLOW reply (OF1.3):
2838 AT_SETUP([ofproto-dpif - table-miss flow (OpenFlow 1.4)])
2839 OVS_VSWITCHD_START([dnl
2840 add-port br0 p1 -- set Interface p1 type=dummy
2842 ON_EXIT([kill `cat ovs-ofctl.pid`])
2844 AT_CAPTURE_FILE([ofctl_monitor.log])
2845 # A table-miss flow has priority 0 and no match
2846 AT_CHECK([ovs-ofctl --protocols=OpenFlow14 add-flow br0 'priority=0 actions=output:CONTROLLER'])
2848 dnl Singleton controller action.
2849 AT_CHECK([ovs-ofctl monitor -P openflow10 --protocols=OpenFlow14 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
2852 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)'
2854 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2855 ovs-appctl -t ovs-ofctl exit
2857 AT_CHECK([ovs-appctl revalidator/purge], [0])
2858 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2859 OFPT_PACKET_IN (OF1.4) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
2860 tcp,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.4) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
2863 tcp,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.4) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
2866 tcp,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
2869 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2871 AT_CHECK([ovs-ofctl --protocols=OpenFlow14 dump-flows br0 | ofctl_strip | sort], [0], [dnl
2872 n_packets=3, n_bytes=180, priority=0 actions=CONTROLLER:65535
2873 OFPST_FLOW reply (OF1.4):
2880 AT_SETUP([ofproto-dpif - packet-in reasons (Openflow 1.3)])
2881 OVS_VSWITCHD_START([dnl
2882 add-port br0 p1 -- set Interface p1 type=dummy
2884 ON_EXIT([kill `cat ovs-ofctl.pid`])
2886 AT_CAPTURE_FILE([ofctl_monitor.log])
2887 AT_DATA([flows.txt], [dnl
2888 table=0 in_port=1 actions=write_actions(output(CONTROLLER)),goto_table(1)
2889 table=1 actions=output(CONTROLLER),goto_table(2)
2890 table=2 actions=group:1234
2892 AT_CHECK([ovs-ofctl --protocols=OpenFlow13 add-group br0 'group_id=1234,type=all,bucket=output:10,bucket=output:CONTROLLER'])
2893 AT_CHECK([ovs-ofctl --protocols=OpenFlow13 add-flows br0 flows.txt])
2895 dnl Singleton controller action.
2896 AT_CHECK([ovs-ofctl monitor -P openflow10 --protocols=OpenFlow13 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
2899 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)'
2901 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2902 ovs-appctl -t ovs-ofctl exit
2904 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2906 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2907 OFPT_PACKET_IN (OF1.3) (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
2908 tcp,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
2910 OFPT_PACKET_IN (OF1.3) (xid=0x0): table_id=2 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
2911 tcp,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
2913 OFPT_PACKET_IN (OF1.3) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
2914 tcp,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
2916 OFPT_PACKET_IN (OF1.3) (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
2917 tcp,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
2919 OFPT_PACKET_IN (OF1.3) (xid=0x0): table_id=2 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
2920 tcp,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
2922 OFPT_PACKET_IN (OF1.3) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
2923 tcp,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
2925 OFPT_PACKET_IN (OF1.3) (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
2926 tcp,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
2928 OFPT_PACKET_IN (OF1.3) (xid=0x0): table_id=2 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
2929 tcp,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
2931 OFPT_PACKET_IN (OF1.3) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
2932 tcp,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
2935 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2937 AT_CHECK([ovs-ofctl --protocols=OpenFlow13 dump-flows br0 | ofctl_strip | sort], [0], [dnl
2938 n_packets=3, n_bytes=180, in_port=1 actions=write_actions(CONTROLLER:65535),goto_table:1
2939 table=1, n_packets=3, n_bytes=180, actions=CONTROLLER:65535,goto_table:2
2940 table=2, n_packets=3, n_bytes=180, actions=group:1234
2941 OFPST_FLOW reply (OF1.3):
2948 AT_SETUP([ofproto-dpif - packet-in reasons (Openflow 1.4)])
2949 OVS_VSWITCHD_START([dnl
2950 add-port br0 p1 -- set Interface p1 type=dummy
2952 ON_EXIT([kill `cat ovs-ofctl.pid`])
2954 AT_CAPTURE_FILE([ofctl_monitor.log])
2955 AT_DATA([flows.txt], [dnl
2956 table=0 in_port=1 actions=write_actions(output(CONTROLLER)),goto_table(1)
2957 table=1 actions=output(CONTROLLER),goto_table(2)
2958 table=2 actions=group:1234
2960 AT_CHECK([ovs-ofctl --protocols=OpenFlow14 add-group br0 'group_id=1234,type=all,bucket=output:10,bucket=output:CONTROLLER'])
2961 AT_CHECK([ovs-ofctl --protocols=OpenFlow14 add-flows br0 flows.txt])
2963 dnl Singleton controller action.
2964 AT_CHECK([ovs-ofctl monitor -P openflow10 --protocols=OpenFlow14 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
2967 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)'
2969 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2970 ovs-appctl -t ovs-ofctl exit
2972 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2974 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2975 OFPT_PACKET_IN (OF1.4) (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
2976 tcp,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
2978 OFPT_PACKET_IN (OF1.4) (xid=0x0): table_id=2 cookie=0x0 total_len=60 in_port=1 (via group) data_len=60 (unbuffered)
2979 tcp,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
2981 OFPT_PACKET_IN (OF1.4) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via action_set) data_len=60 (unbuffered)
2982 tcp,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
2984 OFPT_PACKET_IN (OF1.4) (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
2985 tcp,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
2987 OFPT_PACKET_IN (OF1.4) (xid=0x0): table_id=2 cookie=0x0 total_len=60 in_port=1 (via group) data_len=60 (unbuffered)
2988 tcp,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
2990 OFPT_PACKET_IN (OF1.4) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via action_set) data_len=60 (unbuffered)
2991 tcp,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
2993 OFPT_PACKET_IN (OF1.4) (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
2994 tcp,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
2996 OFPT_PACKET_IN (OF1.4) (xid=0x0): table_id=2 cookie=0x0 total_len=60 in_port=1 (via group) data_len=60 (unbuffered)
2997 tcp,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
2999 OFPT_PACKET_IN (OF1.4) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via action_set) data_len=60 (unbuffered)
3000 tcp,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
3003 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
3005 AT_CHECK([ovs-ofctl --protocols=OpenFlow14 dump-flows br0 | ofctl_strip | sort], [0], [dnl
3006 n_packets=3, n_bytes=180, in_port=1 actions=write_actions(CONTROLLER:65535),goto_table:1
3007 table=1, n_packets=3, n_bytes=180, actions=CONTROLLER:65535,goto_table:2
3008 table=2, n_packets=3, n_bytes=180, actions=group:1234
3009 OFPST_FLOW reply (OF1.4):
3016 AT_SETUP([ofproto-dpif - ARP modification slow-path])
3018 ADD_OF_PORTS([br0], [1], [2])
3020 ovs-vsctl -- set Interface p2 type=dummy options:pcap=p2.pcap
3021 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'
3023 # Input some packets that should follow the arp modification slow-path.
3025 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)'
3027 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
3029 # Check the packets that were output.
3030 AT_CHECK([ovs-ofctl parse-pcap p2.pcap], [0], [dnl
3031 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
3032 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
3033 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
3034 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
3035 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
3036 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
3037 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
3038 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
3039 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
3045 AT_SETUP([ofproto-dpif - VLAN handling])
3047 [set Bridge br0 fail-mode=standalone -- \
3048 add-port br0 p1 trunks=10,12 -- \
3049 add-port br0 p2 tag=10 -- \
3050 add-port br0 p3 tag=12 \
3051 other-config:priority-tags=true -- \
3052 add-port br0 p4 tag=12 -- \
3053 add-port br0 p5 vlan_mode=native-tagged tag=10 -- \
3054 add-port br0 p6 vlan_mode=native-tagged tag=10 trunks=10,12 -- \
3055 add-port br0 p7 vlan_mode=native-untagged tag=12 -- \
3056 add-port br0 p8 vlan_mode=native-untagged tag=12 trunks=10,12 \
3057 other-config:priority-tags=true -- \
3058 set Interface p1 type=dummy -- \
3059 set Interface p2 type=dummy -- \
3060 set Interface p3 type=dummy -- \
3061 set Interface p4 type=dummy -- \
3062 set Interface p5 type=dummy -- \
3063 set Interface p6 type=dummy -- \
3064 set Interface p7 type=dummy -- \
3065 set Interface p8 type=dummy --])
3067 dnl Each of these specifies an in_port by number, a VLAN VID (or "none"),
3068 dnl a VLAN PCP (used if the VID isn't "none") and the expected set of datapath
3074 "100 10 0 1,5,6,7,8,pop_vlan,2" \
3075 "100 10 1 1,5,6,7,8,pop_vlan,2" \
3078 "100 12 0 1,5,6,pop_vlan,3,4,7,8" \
3079 "100 12 1 1,5,6,pop_vlan,4,7,push_vlan(vid=0,pcp=1),3,8" \
3083 "1 10 0 5,6,7,8,100,pop_vlan,2" \
3084 "1 10 1 5,6,7,8,100,pop_vlan,2" \
3087 "1 12 0 5,6,100,pop_vlan,3,4,7,8" \
3088 "1 12 1 5,6,100,pop_vlan,4,7,push_vlan(vid=0,pcp=1),3,8" \
3089 "2 none 0 push_vlan(vid=10,pcp=0),1,5,6,7,8,100" \
3090 "2 0 0 pop_vlan,push_vlan(vid=10,pcp=0),1,5,6,7,8,100" \
3091 "2 0 1 pop_vlan,push_vlan(vid=10,pcp=1),1,5,6,7,8,100" \
3098 "3 none 0 4,7,8,push_vlan(vid=12,pcp=0),1,5,6,100" \
3099 "3 0 0 pop_vlan,4,7,8,push_vlan(vid=12,pcp=0),1,5,6,100" \
3100 "3 0 1 8,pop_vlan,4,7,push_vlan(vid=12,pcp=1),1,5,6,100" \
3107 "4 none 0 3,7,8,push_vlan(vid=12,pcp=0),1,5,6,100" \
3108 "4 0 0 pop_vlan,3,7,8,push_vlan(vid=12,pcp=0),1,5,6,100" \
3109 "4 0 1 3,8,pop_vlan,7,push_vlan(vid=12,pcp=1),1,5,6,100" \
3116 "5 none 0 2,push_vlan(vid=10,pcp=0),1,6,7,8,100" \
3117 "5 0 0 pop_vlan,2,push_vlan(vid=10,pcp=0),1,6,7,8,100" \
3118 "5 0 1 pop_vlan,2,push_vlan(vid=10,pcp=1),1,6,7,8,100" \
3119 "5 10 0 1,6,7,8,100,pop_vlan,2" \
3120 "5 10 1 1,6,7,8,100,pop_vlan,2" \
3123 "5 12 0 1,6,100,pop_vlan,3,4,7,8" \
3124 "5 12 1 1,6,100,pop_vlan,4,7,push_vlan(vid=0,pcp=1),3,8" \
3125 "6 none 0 2,push_vlan(vid=10,pcp=0),1,5,7,8,100" \
3126 "6 0 0 pop_vlan,2,push_vlan(vid=10,pcp=0),1,5,7,8,100" \
3127 "6 0 1 pop_vlan,2,push_vlan(vid=10,pcp=1),1,5,7,8,100" \
3128 "6 10 0 1,5,7,8,100,pop_vlan,2" \
3129 "6 10 1 1,5,7,8,100,pop_vlan,2" \
3132 "6 12 0 1,5,100,pop_vlan,3,4,7,8" \
3133 "6 12 1 1,5,100,pop_vlan,4,7,push_vlan(vid=0,pcp=1),3,8" \
3134 "7 none 0 3,4,8,push_vlan(vid=12,pcp=0),1,5,6,100" \
3135 "7 0 0 pop_vlan,3,4,8,push_vlan(vid=12,pcp=0),1,5,6,100" \
3136 "7 0 1 3,8,pop_vlan,4,push_vlan(vid=12,pcp=1),1,5,6,100" \
3137 "7 10 0 1,5,6,8,100,pop_vlan,2" \
3138 "7 10 1 1,5,6,8,100,pop_vlan,2" \
3141 "7 12 0 1,5,6,100,pop_vlan,3,4,8" \
3142 "7 12 1 1,5,6,100,pop_vlan,4,push_vlan(vid=0,pcp=1),3,8" \
3143 "8 none 0 3,4,7,push_vlan(vid=12,pcp=0),1,5,6,100" \
3144 "8 0 0 pop_vlan,3,4,7,push_vlan(vid=12,pcp=0),1,5,6,100" \
3145 "8 0 1 3,pop_vlan,4,7,push_vlan(vid=12,pcp=1),1,5,6,100" \
3146 "8 10 0 1,5,6,7,100,pop_vlan,2" \
3147 "8 10 1 1,5,6,7,100,pop_vlan,2" \
3150 "8 12 0 1,5,6,100,pop_vlan,3,4,7" \
3151 "8 12 1 1,5,6,100,pop_vlan,4,7,push_vlan(vid=0,pcp=1),3"
3159 if test $vlan = none; then
3160 flow="in_port($in_port),eth(src=50:54:00:00:00:01,dst=ff:ff:ff:ff:ff:ff),eth_type(0xabcd)"
3162 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))"
3165 echo "----------------------------------------------------------------------"
3166 echo "in_port=$in_port vlan=$vlan pcp=$pcp"
3168 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
3169 actual=`tail -1 stdout | sed 's/Datapath actions: //'`
3171 AT_CHECK([ovs-dpctl normalize-actions "$flow" "$expected"], [0], [stdout])
3173 AT_CHECK([ovs-dpctl normalize-actions "$flow" "$actual"], [0], [expout])
3179 AT_SETUP([ofproto-dpif - MPLS handling])
3180 OVS_VSWITCHD_START([dnl
3181 add-port br0 p1 -- set Interface p1 type=dummy
3183 ON_EXIT([kill `cat ovs-ofctl.pid`])
3185 AT_CAPTURE_FILE([ofctl_monitor.log])
3186 AT_DATA([flows.txt], [dnl
3187 dl_src=40:44:44:44:00:00 actions=push_mpls:0x8847,controller
3188 dl_src=40:44:44:44:00:01,mpls actions=push_mpls:0x8847,controller
3189 dl_src=40:44:44:44:00:02,mpls actions=push_mpls:0x8848,controller
3191 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 add-flows br0 flows.txt])
3193 dnl In this test, we push an MPLS tag to an ethernet packet.
3194 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
3197 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)'
3199 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3200 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
3202 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
3203 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3204 mpls,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
3205 00000000 50 54 00 00 00 07 40 44-44 44 00 00 88 47 00 00
3206 00000010 01 40 45 00 00 28 00 00-00 00 40 06 f9 7c c0 a8
3207 00000020 00 01 c0 a8 00 02 00 00-00 00 00 00 00 00 00 00
3208 00000030 00 00 50 00 00 00 00 00-00 00 00 00 00 00 00 00
3210 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3211 mpls,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
3212 00000000 50 54 00 00 00 07 40 44-44 44 00 00 88 47 00 00
3213 00000010 01 40 45 00 00 28 00 00-00 00 40 06 f9 7c c0 a8
3214 00000020 00 01 c0 a8 00 02 00 00-00 00 00 00 00 00 00 00
3215 00000030 00 00 50 00 00 00 00 00-00 00 00 00 00 00 00 00
3217 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3218 mpls,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
3219 00000000 50 54 00 00 00 07 40 44-44 44 00 00 88 47 00 00
3220 00000010 01 40 45 00 00 28 00 00-00 00 40 06 f9 7c c0 a8
3221 00000020 00 01 c0 a8 00 02 00 00-00 00 00 00 00 00 00 00
3222 00000030 00 00 50 00 00 00 00 00-00 00 00 00 00 00 00 00
3225 dnl In this test, we push an MPLS tag to an MPLS packet. The LSE should be
3226 dnl copied exactly, except for the BOS bit.
3227 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
3230 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)'
3232 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3233 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
3235 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
3236 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3237 mpls,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
3238 00000000 50 54 00 00 00 07 40 44-44 44 00 01 88 47 00 00
3239 00000010 a0 40 00 00 a1 40 00 00-00 00 00 00 00 00 00 00
3240 00000020 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
3241 00000030 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
3243 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3244 mpls,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
3245 00000000 50 54 00 00 00 07 40 44-44 44 00 01 88 47 00 00
3246 00000010 a0 40 00 00 a1 40 00 00-00 00 00 00 00 00 00 00
3247 00000020 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
3248 00000030 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
3250 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3251 mpls,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
3252 00000000 50 54 00 00 00 07 40 44-44 44 00 01 88 47 00 00
3253 00000010 a0 40 00 00 a1 40 00 00-00 00 00 00 00 00 00 00
3254 00000020 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
3255 00000030 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
3258 dnl In this test, we push an MPLS tag to an MPLS packet. The LSE should be
3259 dnl copied exactly, except for the BOS bit. The ethertype should be updated
3260 dnl to the MPLS ethertype of the MPLS push action which differs to that
3261 dnl of the input packet.
3262 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
3265 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)'
3267 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3268 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
3270 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
3271 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3272 mplsm,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
3273 00000000 50 54 00 00 00 07 40 44-44 44 00 02 88 48 00 00
3274 00000010 a0 40 00 00 a1 40 00 00-00 00 00 00 00 00 00 00
3275 00000020 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
3276 00000030 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
3278 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3279 mplsm,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
3280 00000000 50 54 00 00 00 07 40 44-44 44 00 02 88 48 00 00
3281 00000010 a0 40 00 00 a1 40 00 00-00 00 00 00 00 00 00 00
3282 00000020 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
3283 00000030 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
3285 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3286 mplsm,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
3287 00000000 50 54 00 00 00 07 40 44-44 44 00 02 88 48 00 00
3288 00000010 a0 40 00 00 a1 40 00 00-00 00 00 00 00 00 00 00
3289 00000020 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
3290 00000030 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
3296 AT_SETUP([ofproto-dpif - VLAN+MPLS handling])
3297 OVS_VSWITCHD_START([dnl
3298 add-port br0 p1 -- set Interface p1 type=dummy
3300 ON_EXIT([kill `cat ovs-ofctl.pid`])
3302 AT_CAPTURE_FILE([ofctl_monitor.log])
3303 AT_DATA([flows.txt], [dnl
3304 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
3305 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
3306 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
3307 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
3308 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
3309 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
3310 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
3311 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
3312 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
3313 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
3315 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 add-flows br0 flows.txt])
3317 dnl Modified MPLS controller action.
3318 dnl In this test, we push the MPLS tag before pushing a VLAN tag, so we see
3319 dnl both of these in the final flow
3320 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
3323 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=40:44:44:44:54: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)'
3325 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3326 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
3328 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
3329 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3330 mpls,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
3331 00000000 50 54 00 00 00 07 40 44-44 44 54 50 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
3335 00000040 00 00 00 00
3337 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3338 mpls,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
3339 00000000 50 54 00 00 00 07 40 44-44 44 54 50 81 00 20 63
3340 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3341 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3342 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3343 00000040 00 00 00 00
3345 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3346 mpls,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
3347 00000000 50 54 00 00 00 07 40 44-44 44 54 50 81 00 20 63
3348 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3349 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3350 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3351 00000040 00 00 00 00
3354 dnl Modified MPLS controller action.
3355 dnl In this test, the input packet in vlan-tagged, which should be stripped
3356 dnl before we push the MPLS and VLAN tags.
3357 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
3360 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))'
3362 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3363 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
3365 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
3366 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3367 mpls,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
3368 00000000 50 54 00 00 00 07 40 44-44 44 54 51 81 00 20 63
3369 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3370 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3371 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3373 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3374 mpls,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
3375 00000000 50 54 00 00 00 07 40 44-44 44 54 51 81 00 20 63
3376 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3377 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3378 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3380 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3381 mpls,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
3382 00000000 50 54 00 00 00 07 40 44-44 44 54 51 81 00 20 63
3383 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3384 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3385 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3388 dnl Modified MPLS controller action.
3389 dnl In this test, we push the MPLS tag before pushing a VLAN tag, so we see
3390 dnl both of these in the final flow
3391 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
3394 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=40:44:44:44:54: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)'
3396 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3397 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
3399 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
3400 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3401 mpls,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
3402 00000000 52 54 00 00 00 07 40 44-44 44 54 52 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
3406 00000040 00 00 00 00
3408 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3409 mpls,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
3410 00000000 52 54 00 00 00 07 40 44-44 44 54 52 81 00 20 63
3411 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3412 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3413 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3414 00000040 00 00 00 00
3416 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3417 mpls,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
3418 00000000 52 54 00 00 00 07 40 44-44 44 54 52 81 00 20 63
3419 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3420 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3421 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3422 00000040 00 00 00 00
3425 dnl Modified MPLS controller action.
3426 dnl In this test, the input packet in vlan-tagged, which should be stripped
3427 dnl before we push the MPLS and VLAN tags.
3428 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
3431 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))'
3433 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3434 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
3436 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
3437 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3438 mpls,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
3439 00000000 50 54 00 00 00 07 40 44-44 44 54 53 81 00 20 63
3440 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3441 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3442 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3444 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3445 mpls,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
3446 00000000 50 54 00 00 00 07 40 44-44 44 54 53 81 00 20 63
3447 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3448 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3449 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3451 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3452 mpls,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
3453 00000000 50 54 00 00 00 07 40 44-44 44 54 53 81 00 20 63
3454 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3455 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3456 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3459 dnl Modified MPLS controller action.
3460 dnl In this test, we push the VLAN tag before pushing a MPLS tag, but these
3461 dnl actions are reordered, so we see both of these in the final flow.
3462 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
3465 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)'
3467 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3468 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
3470 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
3471 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3472 mpls,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
3473 00000000 50 54 00 00 00 07 40 44-44 44 54 54 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
3477 00000040 00 00 00 00
3479 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3480 mpls,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
3481 00000000 50 54 00 00 00 07 40 44-44 44 54 54 81 00 20 63
3482 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3483 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3484 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3485 00000040 00 00 00 00
3487 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3488 mpls,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
3489 00000000 50 54 00 00 00 07 40 44-44 44 54 54 81 00 20 63
3490 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3491 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3492 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3493 00000040 00 00 00 00
3496 dnl Modified MPLS controller action.
3497 dnl In this test, the input packet in vlan-tagged, which should be stripped
3498 dnl before we push the MPLS and VLAN tags.
3499 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
3502 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))'
3504 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3505 OVS_APP_EXIT_AND_WAIT([ovs-ofctl])
3507 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
3508 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3509 mpls,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
3510 00000000 50 54 00 00 00 07 40 44-44 44 54 55 81 00 20 63
3511 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3512 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3513 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3515 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3516 mpls,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
3517 00000000 50 54 00 00 00 07 40 44-44 44 54 55 81 00 20 63
3518 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3519 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3520 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3522 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3523 mpls,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
3524 00000000 50 54 00 00 00 07 40 44-44 44 54 55 81 00 20 63
3525 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3526 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3527 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3530 dnl Modified MPLS controller action.
3531 dnl In this test, we push the VLAN tag before pushing a MPLS tag, but these
3532 dnl actions are reordered, so we see both of these in the final flow.
3533 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
3536 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)'
3538 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3539 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
3541 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
3542 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3543 mpls,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
3544 00000000 50 54 00 00 00 07 40 44-44 44 54 56 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
3548 00000040 00 00 00 00
3550 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3551 mpls,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
3552 00000000 50 54 00 00 00 07 40 44-44 44 54 56 81 00 20 63
3553 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3554 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3555 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3556 00000040 00 00 00 00
3558 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3559 mpls,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
3560 00000000 50 54 00 00 00 07 40 44-44 44 54 56 81 00 20 63
3561 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3562 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3563 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3564 00000040 00 00 00 00
3567 dnl Modified MPLS controller action.
3568 dnl In this test, the input packet in vlan-tagged, which should be stripped
3569 dnl before we push the MPLS and VLAN tags.
3570 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 -m 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
3573 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))'
3575 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3576 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
3578 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
3579 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3580 mpls,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
3581 00000000 50 54 00 00 00 07 40 44-44 44 54 57 81 00 20 63
3582 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3583 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3584 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3586 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3587 mpls,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
3588 00000000 50 54 00 00 00 07 40 44-44 44 54 57 81 00 20 63
3589 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3590 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3591 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3593 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3594 mpls,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
3595 00000000 50 54 00 00 00 07 40 44-44 44 54 57 81 00 20 63
3596 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3597 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3598 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3601 dnl Modified MPLS controller action.
3602 dnl In this test, the input packet in vlan-tagged, which should be stripped
3603 dnl before we push the MPLS and VLAN tags.
3604 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
3607 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))'
3609 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3610 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
3612 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
3613 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3614 mpls,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
3615 00000000 50 54 00 00 00 07 40 44-44 44 54 58 81 00 20 63
3616 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3617 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3618 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3620 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3621 mpls,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
3622 00000000 50 54 00 00 00 07 40 44-44 44 54 58 81 00 20 63
3623 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3624 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3625 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3627 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3628 mpls,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
3629 00000000 50 54 00 00 00 07 40 44-44 44 54 58 81 00 20 63
3630 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3631 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3632 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3635 dnl Modified MPLS controller action.
3636 dnl In this test, the input packet in vlan-tagged, which should be modified
3637 dnl before we push MPLS and VLAN tags.
3638 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
3641 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))'
3643 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3644 ovs-appctl -t ovs-ofctl exit
3646 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
3647 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3648 mpls,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
3649 00000000 50 54 00 00 00 07 40 44-44 44 54 59 81 00 20 63
3650 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3651 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3652 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3654 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3655 mpls,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
3656 00000000 50 54 00 00 00 07 40 44-44 44 54 59 81 00 20 63
3657 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3658 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3659 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3661 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3662 mpls,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
3663 00000000 50 54 00 00 00 07 40 44-44 44 54 59 81 00 20 63
3664 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3665 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3666 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3669 AT_CHECK([ovs-appctl revalidator/purge], [0])
3670 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
3671 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
3672 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
3673 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
3674 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
3675 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
3676 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
3677 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
3678 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
3679 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
3680 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
3681 OFPST_FLOW reply (OF1.2):
3687 AT_SETUP([ofproto-dpif - fragment handling - trace])
3689 ADD_OF_PORTS([br0], [1], [2], [3], [4], [5], [6], [90])
3690 AT_DATA([flows.txt], [dnl
3691 priority=75 tcp ip_frag=no tp_dst=80 actions=move:OXM_OF_TCP_DST[[]]->OXM_OF_TCP_SRC[[]],output:1
3692 priority=75 tcp ip_frag=first tp_dst=80 actions=move:OXM_OF_TCP_DST[[]]->OXM_OF_TCP_SRC[[]],output:2
3693 priority=50 tcp ip_frag=no actions=move:OXM_OF_TCP_DST[[]]->OXM_OF_TCP_SRC[[]],output:4
3694 priority=50 tcp ip_frag=first actions=move:OXM_OF_TCP_DST[[]]->OXM_OF_TCP_SRC[[]],output:5
3695 priority=50 tcp ip_frag=later actions=output:6
3697 AT_CHECK([ovs-ofctl replace-flows br0 flows.txt])
3699 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"
3700 no_flow="$base_flow,frag=no),tcp(src=12345,dst=80)"
3701 first_flow="$base_flow,frag=first),tcp(src=12345,dst=80)"
3702 later_flow="$base_flow,frag=later)"
3704 # mode no first later
3707 'drop 1 drop drop' \
3716 AT_CHECK([ovs-ofctl set-frags br0 $mode])
3717 for type in no first later; do
3718 eval flow=\$${type}_flow exp_output=\$$type
3719 printf "\n%s\n" "----$mode $type-----"
3720 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
3722 if test $mode = drop && test $type != no; then
3723 echo 'Packets dropped because they are IP fragments and the fragment handling mode is "drop".' >> expout
3724 echo "Datapath actions: $exp_output" >> expout
3725 elif test $type = later; then
3726 echo "Datapath actions: $exp_output" >> expout
3728 echo "Datapath actions: set(tcp(src=80,dst=80)),$exp_output" >> expout
3730 AT_CHECK([grep 'IP fragments' stdout; tail -1 stdout], [0], [expout])
3736 AT_SETUP([ofproto-dpif - fragment handling - upcall])
3738 ADD_OF_PORTS([br0], [1], [2], [3], [4], [5], [6], [90])
3739 AT_DATA([flows.txt], [dnl
3740 priority=75 tcp ip_frag=no tp_dst=80 actions=set_field:81->tcp_dst,output:1
3741 priority=75 tcp ip_frag=first tp_dst=80 actions=set_field:81->tcp_dst,output:2
3742 priority=50 tcp ip_frag=no actions=set_field:81->tcp_dst,output:4
3743 priority=50 tcp ip_frag=first actions=set_field:81->tcp_dst,output:5
3744 priority=50 tcp ip_frag=later actions=output:6
3746 AT_CHECK([ovs-ofctl replace-flows br0 flows.txt])
3748 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"
3749 no_flow="$base_flow,frag=no),tcp(src=12345,dst=80)"
3750 first_flow="$base_flow,frag=first),tcp(src=12345,dst=80)"
3751 later_flow="$base_flow,frag=later)"
3753 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
3757 AT_CHECK([ovs-ofctl set-frags br0 $mode])
3758 for type in no first later; do
3759 eval flow=\$${type}_flow
3760 printf "\n%s\n" "----$mode $type-----"
3762 AT_CHECK([ovs-appctl netdev-dummy/receive p90 "$flow"], [0], [stdout])
3765 AT_CHECK([ovs-appctl dpctl/dump-flows], [0], [dnl
3766 flow-dump from non-dpdk interfaces:
3767 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
3768 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
3769 recirc_id(0),in_port(90),eth_type(0x0800),ipv4(proto=6,frag=later), packets:0, bytes:0, used:never, actions:6
3774 AT_CHECK([ovs-appctl revalidator/purge], [0])
3775 AT_CHECK([ovs-ofctl set-frags br0 $mode])
3776 for type in no first later; do
3777 eval flow=\$${type}_flow
3778 printf "\n%s\n" "----$mode $type-----"
3780 AT_CHECK([ovs-appctl netdev-dummy/receive p90 "$flow"], [0], [stdout])
3783 AT_CHECK([ovs-appctl dpctl/dump-flows], [0], [dnl
3784 flow-dump from non-dpdk interfaces:
3785 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
3786 recirc_id(0),in_port(90),eth_type(0x0800),ipv4(frag=first), packets:0, bytes:0, used:never, actions:drop
3787 recirc_id(0),in_port(90),eth_type(0x0800),ipv4(frag=later), packets:0, bytes:0, used:never, actions:drop
3792 AT_CHECK([ovs-appctl revalidator/purge], [0])
3793 AT_CHECK([ovs-ofctl set-frags br0 $mode])
3794 for type in no first later; do
3795 eval flow=\$${type}_flow
3796 printf "\n%s\n" "----$mode $type-----"
3798 AT_CHECK([ovs-appctl netdev-dummy/receive p90 "$flow"], [0], [stdout])
3801 AT_CHECK([ovs-appctl dpctl/dump-flows], [0], [dnl
3802 flow-dump from non-dpdk interfaces:
3803 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
3804 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
3805 recirc_id(0),in_port(90),eth_type(0x0800),ipv4(proto=6,frag=later), packets:0, bytes:0, used:never, actions:6
3811 AT_SETUP([ofproto-dpif - fragment handling - actions])
3813 ADD_OF_PORTS([br0], [1], [2], [3], [4], [5], [6], [90])
3815 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])
3816 AT_CHECK([tail -2 stderr | sed 's/^.*|WARN|//'], [0], [dnl
3817 source field tcp_dst lacks correct prerequisites
3818 ovs-ofctl: actions are invalid with specified match (OFPBAC_MATCH_INCONSISTENT)
3821 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])
3822 AT_CHECK([tail -2 stderr | sed 's/^.*|WARN|//'], [0], [dnl
3823 destination field tcp_src lacks correct prerequisites
3824 ovs-ofctl: actions are invalid with specified match (OFPBAC_MATCH_INCONSISTENT)
3827 AT_CHECK([ovs-ofctl add-flow br0 "udp,ip_frag=later actions=set_field:8888->udp_src,output:1"], [1], [], [stderr])
3828 AT_CHECK([tail -2 stderr | sed 's/^.*|WARN|//'], [0], [dnl
3829 set_field udp_src lacks correct prerequisities
3830 ovs-ofctl: actions are invalid with specified match (OFPBAC_MATCH_INCONSISTENT)
3833 AT_CHECK([ovs-ofctl add-flow br0 "udp,ip_frag=later actions=load:8888->NXM_OF_UDP_DST[[]],output:1"], [1], [], [stderr])
3834 AT_CHECK([tail -2 stderr | sed 's/^.*|WARN|//'], [0], [dnl
3835 set_field udp_dst lacks correct prerequisities
3836 ovs-ofctl: actions are invalid with specified match (OFPBAC_MATCH_INCONSISTENT)
3839 AT_CHECK([ovs-ofctl add-flow br0 "sctp,ip_frag=later actions=set_field:8888->sctp_src,output:1"], [1], [], [stderr])
3840 AT_CHECK([tail -2 stderr | sed 's/^.*|WARN|//'], [0], [dnl
3841 set_field sctp_src lacks correct prerequisities
3842 ovs-ofctl: actions are invalid with specified match (OFPBAC_MATCH_INCONSISTENT)
3845 AT_CHECK([ovs-ofctl add-flow br0 "sctp,ip_frag=later actions=set_field:8888->sctp_dst,output:1"], [1], [], [stderr])
3846 AT_CHECK([tail -2 stderr | sed 's/^.*|WARN|//'], [0], [dnl
3847 set_field sctp_dst lacks correct prerequisities
3848 ovs-ofctl: actions are invalid with specified match (OFPBAC_MATCH_INCONSISTENT)
3851 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])
3852 AT_CHECK([tail -2 stderr | sed 's/^.*|WARN|//'], [0], [dnl
3853 source field tcp_dst lacks correct prerequisites
3854 ovs-ofctl: actions are invalid with specified match (OFPBAC_MATCH_INCONSISTENT)
3857 AT_DATA([flows.txt], [dnl
3858 priority=75 tcp actions=load:42->OXM_OF_TCP_SRC[[0..7]],output:1
3860 AT_CHECK([ovs-ofctl -O OpenFlow12 replace-flows br0 flows.txt])
3862 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
3866 AT_CHECK([ovs-ofctl set-frags br0 $mode])
3867 for frag in 4000 6000 6008 4010; do
3868 printf "\n%s\n" "----$mode $frag-----"
3870 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"])
3873 AT_CHECK([ovs-appctl dpctl/dump-flows | sed 's/used:[[0-9]].[[0-9]]*s/used:0.001s/'], [0], [dnl
3874 flow-dump from non-dpdk interfaces:
3875 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
3876 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
3877 recirc_id(0),in_port(90),eth_type(0x0800),ipv4(proto=6,frag=later), packets:1, bytes:74, used:0.001s, actions:1
3880 AT_CHECK([ovs-appctl revalidator/purge], [0])
3881 AT_CHECK([ovs-ofctl set-frags br0 $mode])
3882 for frag in 4000 6000 6008 4010; do
3883 printf "\n%s\n" "----$mode $frag truncated transport header -----"
3885 AT_CHECK([ovs-appctl netdev-dummy/receive p90 "0021853763af 0026b98cb0f9 0800 4500 0018 2e24 $frag 40 06 465d ac11370d ac11370b 828b 0016"])
3888 AT_CHECK([ovs-appctl dpctl/dump-flows | sed 's/used:[[0-9]].[[0-9]]*s/used:0.001s/'], [0], [dnl
3889 flow-dump from non-dpdk interfaces:
3890 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
3891 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
3892 recirc_id(0),in_port(90),eth_type(0x0800),ipv4(proto=6,frag=later), packets:1, bytes:60, used:0.001s, actions:1
3895 AT_CHECK([ovs-appctl revalidator/purge], [0])
3896 AT_CHECK([ovs-ofctl set-frags br0 $mode])
3897 for frag in 4000 6000 6001 4002; do
3898 printf "\n%s\n" "----$mode $frag missing transport header-----"
3900 AT_CHECK([ovs-appctl netdev-dummy/receive p90 "0021853763af 0026b98cb0f9 0800 4500 0014 2e24 $frag 40 06 465d ac11370d ac11370b"])
3903 AT_CHECK([ovs-appctl dpctl/dump-flows | sed 's/used:[[0-9]].[[0-9]]*s/used:0.001s/'], [0], [dnl
3904 flow-dump from non-dpdk interfaces:
3905 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
3906 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
3907 recirc_id(0),in_port(90),eth_type(0x0800),ipv4(proto=6,frag=later), packets:1, bytes:60, used:0.001s, actions:1
3913 AT_SETUP([ofproto-dpif - exit])
3915 ADD_OF_PORTS([br0], [1], [2], [3], [10], [11], [12], [13], [14])
3916 AT_DATA([flows.txt], [dnl
3917 in_port=1 actions=output:10,exit,output:11
3918 in_port=2 actions=output:12,resubmit:1,output:12
3919 in_port=3 actions=output:13,resubmit:2,output:14
3921 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
3922 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])
3923 AT_CHECK([tail -1 stdout], [0],
3924 [Datapath actions: 10
3926 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])
3927 AT_CHECK([tail -1 stdout], [0],
3928 [Datapath actions: 12,10
3930 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])
3931 AT_CHECK([tail -1 stdout], [0],
3932 [Datapath actions: 13,12,10
3938 AT_SETUP([ofproto-dpif - mirroring, select_all])
3940 ADD_OF_PORTS([br0], 1, 2, 3)
3942 set Bridge br0 mirrors=@m --\
3943 --id=@p3 get Port p3 --\
3944 --id=@m create Mirror name=mymirror select_all=true output_port=@p3
3946 AT_DATA([flows.txt], [dnl
3947 in_port=1 actions=output:2
3948 in_port=2 actions=output:1
3950 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
3952 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)"
3953 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
3954 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
3955 [Datapath actions: 2,3
3958 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)"
3959 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
3960 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
3961 [Datapath actions: 1,3
3968 AT_SETUP([ofproto-dpif - mirroring, select_src])
3970 ADD_OF_PORTS([br0], 1, 2, 3)
3972 set Bridge br0 mirrors=@m --\
3973 --id=@p1 get Port p1 -- --id=@p3 get Port p3 --\
3974 --id=@m create Mirror name=mymirror select_src_port=@p1 output_port=@p3
3976 AT_DATA([flows.txt], [dnl
3977 in_port=1 actions=output:2
3978 in_port=2 actions=output:1
3980 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
3982 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)"
3983 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
3984 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
3985 [Datapath actions: 2,3
3988 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)"
3989 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
3990 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
3991 [Datapath actions: 1
3996 AT_SETUP([ofproto-dpif - mirroring, OFPP_NONE ingress port])
3998 ADD_OF_PORTS([br0], 1, 2)
4000 set Bridge br0 mirrors=@m --\
4001 --id=@p2 get Port p2 --\
4002 --id=@m create Mirror name=mymirror select_all=true output_port=@p2
4004 AT_CHECK([ovs-ofctl add-flow br0 action=output:1])
4006 # "in_port" defaults to OFPP_NONE if it's not specified.
4007 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"
4008 AT_CHECK([ovs-appctl ofproto/trace br0 "$flow"], [0], [stdout])
4009 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
4010 [Datapath actions: 1,2
4017 AT_SETUP([ofproto-dpif - mirroring, select_dst])
4019 ADD_OF_PORTS([br0], 1, 2, 3)
4021 set Bridge br0 mirrors=@m --\
4022 --id=@p2 get Port p2 -- --id=@p3 get Port p3 --\
4023 --id=@m create Mirror name=mymirror select_dst_port=@p2 output_port=@p3
4025 AT_DATA([flows.txt], [dnl
4026 in_port=1 actions=output:2
4027 in_port=2 actions=output:1
4029 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
4031 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)"
4032 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
4033 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
4034 [Datapath actions: 2,3
4037 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)"
4038 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
4039 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
4040 [Datapath actions: 1
4047 AT_SETUP([ofproto-dpif - mirroring, select_vlan])
4049 ADD_OF_PORTS([br0], 1, 2, 3)
4051 set Bridge br0 mirrors=@m --\
4052 --id=@p2 get Port p2 -- --id=@p3 get Port p3 --\
4053 --id=@m create Mirror name=mymirror select_all=true select_vlan=11 output_port=@p3
4055 AT_DATA([flows.txt], [dnl
4056 in_port=1, actions=output:2
4058 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
4060 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)"
4061 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
4062 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
4063 [Datapath actions: 2
4066 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))"
4067 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
4068 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
4069 [Datapath actions: 2
4072 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))"
4073 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
4074 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
4075 [Datapath actions: 2,3
4082 AT_SETUP([ofproto-dpif - mirroring, output_port])
4084 ADD_OF_PORTS([br0], 1, 2, 3)
4086 set Bridge br0 mirrors=@m --\
4087 --id=@p3 get Port p3 --\
4088 --id=@m create Mirror name=mymirror select_all=true output_port=@p3
4090 AT_DATA([flows.txt], [dnl
4091 in_port=1 actions=mod_vlan_vid:17,output:2
4092 in_port=2 actions=output:1
4094 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
4096 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)"
4097 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
4098 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
4099 [Datapath actions: push_vlan(vid=17,pcp=0),2,pop_vlan,3
4102 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)"
4103 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
4104 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
4105 [Datapath actions: 1,3
4111 AT_SETUP([ofproto-dpif - mirroring, output_vlan])
4113 ADD_OF_PORTS([br0], 1, 2)
4115 set Bridge br0 mirrors=@m --\
4116 --id=@m create Mirror name=mymirror select_all=true output_vlan=12
4118 AT_DATA([flows.txt], [dnl
4119 in_port=1 actions=output:2
4120 in_port=2 actions=mod_vlan_vid:17,output:1
4122 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
4124 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)"
4125 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
4126 actual=`tail -1 stdout | sed 's/Datapath actions: //'`
4128 expected="2,push_vlan(vid=12,pcp=0),1,2,100"
4129 AT_CHECK([ovs-dpctl normalize-actions "$flow" "$expected"], [0], [stdout])
4131 AT_CHECK([ovs-dpctl normalize-actions "$flow" "$actual"], [0], [expout])
4133 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)"
4134 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
4135 actual=`tail -1 stdout | sed 's/Datapath actions: //'`
4137 expected="push_vlan(vid=17,pcp=0),1,pop_vlan,push_vlan(vid=12,pcp=0),1,2,100"
4138 AT_CHECK([ovs-dpctl normalize-actions "$flow" "$expected"], [0], [stdout])
4140 AT_CHECK([ovs-dpctl normalize-actions "$flow" "$actual"], [0], [expout])
4145 # Two testcases below are for the ofproto/trace command
4146 # The first one tests all correct syntax:
4147 # ofproto/trace [dp_name] odp_flow [-generate|packet]
4148 # ofproto/trace br_name br_flow [-generate|packet]
4149 AT_SETUP([ofproto-dpif - ofproto/trace command 1])
4150 OVS_VSWITCHD_START([set bridge br0 fail-mode=standalone])
4151 ADD_OF_PORTS([br0], 1, 2, 3)
4153 AT_DATA([flows.txt], [dnl
4154 in_port=1 actions=output:2
4155 in_port=2 actions=output:1
4157 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
4159 odp_flow="in_port(p1)"
4161 # Test command: ofproto/trace odp_flow with in_port as a name.
4162 AT_CHECK([ovs-appctl ofproto/trace "$odp_flow"], [0], [stdout])
4163 AT_CHECK([tail -1 stdout], [0], [dnl
4167 odp_flow="in_port(1)"
4168 # Test command: ofproto/trace odp_flow
4169 AT_CHECK([ovs-appctl ofproto/trace "$odp_flow"], [0], [stdout])
4170 AT_CHECK([tail -1 stdout], [0], [dnl
4174 # Test command: ofproto/trace dp_name odp_flow
4175 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$odp_flow"], [0], [stdout])
4176 AT_CHECK([tail -1 stdout], [0], [dnl
4179 # Test commmand: ofproto/trace br_name br_flow
4180 AT_CHECK([ovs-appctl ofproto/trace br0 "$br_flow"], [0], [stdout])
4181 AT_CHECK([tail -1 stdout], [0], [dnl
4185 # Delete the inserted flows
4186 AT_CHECK([ovs-ofctl del-flows br0 "in_port=1"], [0], [stdout])
4187 AT_CHECK([ovs-ofctl del-flows br0 "in_port=2"], [0], [stdout])
4189 # This section below tests the [-generate] option
4190 odp_flow="in_port(3),eth(src=50:54:00:00:00:05,dst=ff:ff:ff:ff:ff:ff)"
4191 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"
4193 # Test command: ofproto/trace odp_flow
4194 AT_CHECK([ovs-appctl ofproto/trace "$odp_flow"], [0], [stdout])
4195 # Check for no MAC learning entry
4196 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
4200 # Test command: ofproto/trace br_name br_flow
4201 AT_CHECK([ovs-appctl ofproto/trace br0 "$br_flow"], [0], [stdout])
4202 # Check for no MAC learning entry
4203 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
4207 # Test command: ofproto/trace odp_flow -generate
4208 AT_CHECK([ovs-appctl ofproto/trace "$odp_flow" -generate], [0], [stdout])
4209 # Check for the MAC learning entry
4210 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
4212 3 0 50:54:00:00:00:05 ?
4215 # Test command: ofproto/trace dp_name odp_flow -generate
4216 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy \
4217 "in_port(1),eth(src=50:54:00:00:00:06,dst=50:54:00:00:00:05)" \
4218 -generate], [0], [stdout])
4219 # Check for both MAC learning entries
4220 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
4222 3 0 50:54:00:00:00:05 ?
4223 1 0 50:54:00:00:00:06 ?
4226 # Test command: ofproto/trace br_name br_flow -generate
4227 AT_CHECK([ovs-appctl ofproto/trace br0 \
4228 "in_port=2,dl_src=50:54:00:00:00:07,dl_dst=50:54:00:00:00:06" \
4229 -generate], [0], [stdout])
4230 # Check for both MAC learning entries.
4231 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
4233 3 0 50:54:00:00:00:05 ?
4234 1 0 50:54:00:00:00:06 ?
4235 2 0 50:54:00:00:00:07 ?
4238 # This section beflow tests the [packet] option
4239 # The ovs-tcpundump of packets between port1 and port2
4240 pkt1to2="50540000000250540000000108064500001C000100004001F98CC0A80001C0A800020800F7FF00000000"
4241 pkt2to1="50540000000150540000000208064500001C000100004001F98CC0A80002C0A800010800F7FF00000000"
4243 # Construct the MAC learning table
4244 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy \
4245 "in_port(1),eth(src=50:54:00:00:00:01,dst=ff:ff:ff:ff:ff:ff)" \
4246 -generate], [0], [stdout])
4248 # Construct the MAC learning table
4249 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy \
4250 "in_port(2),eth(src=50:54:00:00:00:02,dst=ff:ff:ff:ff:ff:ff)" \
4251 -generate], [0], [stdout])
4253 # Test command: ofproto/trace odp_flow packet
4254 AT_CHECK([ovs-appctl ofproto/trace \
4255 "in_port(1),skb_priority(1),skb_mark(2)" "$pkt1to2"], [0], [stdout])
4256 AT_CHECK([tail -1 stdout], [0], [dnl
4259 AT_CHECK([head -n 2 stdout], [0], [dnl
4261 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
4264 # Test command: ofproto/trace dp_name odp_flow packet
4265 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy \
4266 "in_port(1),skb_priority(1),skb_mark(2)" "$pkt1to2"], [0], [stdout])
4267 AT_CHECK([tail -1 stdout], [0], [dnl
4270 AT_CHECK([head -n 2 stdout], [0], [dnl
4272 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
4275 # Test command: ofproto/trace br_name br_flow packet
4276 AT_CHECK([ovs-appctl ofproto/trace br0 \
4277 "in_port=2,skb_priority=2,pkt_mark=1" "$pkt2to1"], [0], [stdout],[stderr])
4278 AT_CHECK([tail -1 stdout], [0], [dnl
4281 AT_CHECK([head -n 2 stdout], [0], [dnl
4283 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
4289 # The second test tests the corner cases
4290 AT_SETUP([ofproto-dpif - ofproto/trace command 2])
4292 ADD_OF_PORTS([br0], 1, 2)
4295 odp_flow="in_port(1),eth(src=50:54:00:00:00:01,dst=50:54:00:00:00:02)"
4296 br_flow="in_port=1,dl_src=50:54:00:00:00:01,dl_dst=50:54:00:00:00:02"
4298 generate="-generate"
4299 pkt="50540000000250540000000108064500001C000100004001F98CC0A80001C0A800020800F7FF00000000"
4301 # Test incorrect command: ofproto/trace wrong_name odp_flow [-generate|packet]
4307 [AT_CHECK([ovs-appctl ofproto/trace wrong_name "$odp_flow" option],
4309 AT_CHECK([tail -2 stderr], [0], [dnl
4310 Cannot find the datapath
4311 ovs-appctl: ovs-vswitchd: server returned an error
4314 # Test incorrect command: ofproto/trace empty_string odp_flow [-generate|packet]
4320 [AT_CHECK([ovs-appctl ofproto/trace "" "$odp_flow" option],
4322 AT_CHECK([tail -2 stderr], [0], [dnl
4323 Cannot find the datapath
4324 ovs-appctl: ovs-vswitchd: server returned an error
4327 # Test incorrect command: ofproto/trace nonexist_dp_name odp_flow [-generate|packet]
4333 [AT_CHECK([ovs-appctl ofproto/trace ovs-system "$odp_flow" option],
4335 AT_CHECK([tail -2 stderr], [0], [dnl
4336 Cannot find the datapath
4337 ovs-appctl: ovs-vswitchd: server returned an error
4340 # Test incorrect command: ofproto/trace br_name odp_flow [-generate|packet]
4346 [AT_CHECK([ovs-appctl ofproto/trace br0 "$odp_flow" option],
4348 AT_CHECK([tail -2 stderr], [0], [dnl
4349 Cannot find the datapath
4350 ovs-appctl: ovs-vswitchd: server returned an error
4353 # Test incorrect command: ofproto/trace dp_name br_flow [-generate|packet]
4359 [AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$br_flow" option],
4361 AT_CHECK([tail -2 stderr], [0], [dnl
4363 ovs-appctl: ovs-vswitchd: server returned an error
4366 # Test incorrect command: ofproto/trace br_flow [-generate|packet]
4372 [AT_CHECK([ovs-appctl ofproto/trace "$br_flow" option],
4374 AT_CHECK([tail -2 stderr], [0], [dnl
4375 Must specify bridge name
4376 ovs-appctl: ovs-vswitchd: server returned an error
4379 # Test incorrect command: ofproto/trace dp_name odp_flow garbage_option
4380 AT_CHECK([ovs-appctl ofproto/trace \
4381 ovs-dummy "$odp_flow" garbage_option],
4382 [2], [stdout],[stderr])
4383 AT_CHECK([tail -2 stderr], [0], [dnl
4384 Trailing garbage in packet data
4385 ovs-appctl: ovs-vswitchd: server returned an error
4388 # Test incorrect command: ofproto/trace with 4 arguments
4389 AT_CHECK([ovs-appctl ofproto/trace \
4390 arg1, arg2, arg3, arg4], [2], [stdout],[stderr])
4391 AT_CHECK([tail -2 stderr], [0], [dnl
4392 "ofproto/trace" command takes at most 3 arguments
4393 ovs-appctl: ovs-vswitchd: server returned an error
4396 # Test incorrect command: ofproto/trace with 0 argument
4397 AT_CHECK([ovs-appctl ofproto/trace ], [2], [stdout],[stderr])
4398 AT_CHECK([tail -2 stderr], [0], [dnl
4399 "ofproto/trace" command requires at least 1 arguments
4400 ovs-appctl: ovs-vswitchd: server returned an error
4406 # The third test checks that the output of "ovs-dpctl -m" is valid to trace.
4407 AT_SETUP([ofproto-dpif - ofproto/trace from dpctl output])
4408 OVS_VSWITCHD_START([dnl
4409 set Open_vSwitch . other_config:max-idle=10000 \
4410 -- add-port br0 p1 -- set Interface p1 type=dummy])
4412 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)'])
4413 ovs-appctl revalidator/wait
4414 AT_CHECK([ovs-appctl dpif/dump-flows -m br0 | sed 's/, packets.*$//' > dp_flows1.txt])
4416 odp_flow=`cat dp_flows1.txt`
4417 AT_CHECK([ovs-appctl ofproto/trace "$odp_flow" | sed 's/\([[Ff]]low:\).*/\1 <cleared>/'], [0], [dnl
4420 No match, packets dropped because OFPPC_NO_PACKET_IN is set on in_port.
4422 Rule: table=254 cookie=0 priority=0,reg0=0x2
4423 OpenFlow actions=drop
4425 Final flow: <cleared>
4427 Datapath actions: drop
4430 dnl Now, try again without megaflows:
4431 ovs-appctl upcall/disable-megaflows
4433 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)'])
4434 ovs-appctl revalidator/wait
4435 AT_CHECK([ovs-appctl dpif/dump-flows -m br0 | sed 's/, packets.*$//' > dp_flows2.txt])
4437 odp_flow=`cat dp_flows2.txt`
4438 AT_CHECK([ovs-appctl ofproto/trace "$odp_flow" | sed 's/\([[Ff]]low:\).*/\1 <cleared>/'], [0], [dnl
4441 No match, packets dropped because OFPPC_NO_PACKET_IN is set on in_port.
4443 Rule: table=254 cookie=0 priority=0,reg0=0x2
4444 OpenFlow actions=drop
4446 Final flow: <cleared>
4448 Datapath actions: drop
4454 AT_SETUP([ofproto-dpif - ofproto/trace-packet-out])
4456 ADD_OF_PORTS([br0], 1, 2, 3)
4458 AT_DATA([flows.txt], [dnl
4459 in_port=1 actions=output:2
4460 in_port=2 actions=output:1
4462 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
4464 AT_CHECK([ovs-appctl ofproto/trace-packet-out br0 in_port=1 'mod_vlan_vid:123,resubmit(,0)'], [0], [stdout])
4465 AT_CHECK([tail -1 stdout], [0], [dnl
4466 Datapath actions: push_vlan(vid=123,pcp=0),2
4473 m4_define([OFPROTO_TRACE],
4475 AT_CHECK([ovs-appctl ofproto/trace $1 "$flow" $3], [0], [stdout])
4476 actual=`tail -1 stdout | sed 's/Datapath actions: //'`
4478 AT_CHECK([ovs-dpctl normalize-actions "$flow" "$expected" $5],
4481 AT_CHECK([ovs-dpctl normalize-actions "$flow" "$actual" $5],
4484 AT_SETUP([ofproto-dpif - MAC learning])
4485 OVS_VSWITCHD_START([set bridge br0 fail-mode=standalone])
4486 ADD_OF_PORTS([br0], 1, 2, 3)
4488 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)'
4490 # Trace an ARP packet arriving on p3, to create a MAC learning entry.
4493 [in_port(3),eth(src=50:54:00:00:00:05,dst=ff:ff:ff:ff:ff:ff),$arp],
4497 # Check for the MAC learning entry.
4498 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
4500 3 0 50:54:00:00:00:05 ?
4503 # Trace a packet arrival destined for the learned MAC.
4504 # (This will also learn a MAC.)
4507 [in_port(1),eth(src=50:54:00:00:00:06,dst=50:54:00:00:00:05),$arp],
4511 # Check for both MAC learning entries.
4512 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
4514 3 0 50:54:00:00:00:05 ?
4515 1 0 50:54:00:00:00:06 ?
4518 # Trace a packet arrival that updates the first learned MAC entry.
4521 [in_port(2),eth(src=50:54:00:00:00:05,dst=ff:ff:ff:ff:ff:ff),$arp],
4525 # Check that the MAC learning entry was updated.
4526 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
4528 1 0 50:54:00:00:00:06 ?
4529 2 0 50:54:00:00:00:05 ?
4532 # Add another bridge.
4536 -- set bridge br1 datapath-type=dummy])
4537 ADD_OF_PORTS([br1], 4, 5)
4539 # Trace some packet arrivals in br1 to create MAC learning entries there too.
4542 [in_port(4),eth(src=50:54:00:00:00:06,dst=ff:ff:ff:ff:ff:ff),$arp],
4547 [in_port(5),eth(src=50:54:00:00:00:07,dst=ff:ff:ff:ff:ff:ff),$arp],
4551 # Check that the MAC learning entries were added.
4552 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br1 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
4554 4 0 50:54:00:00:00:06 ?
4555 5 0 50:54:00:00:00:07 ?
4558 # Delete port p1 and see that its MAC learning entry disappeared, and
4559 # that the MAC learning entry for the same MAC was also deleted from br1.
4560 AT_CHECK([ovs-vsctl del-port p1])
4561 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
4563 2 0 50:54:00:00:00:05 ?
4565 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br1 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
4567 5 0 50:54:00:00:00:07 ?
4573 AT_SETUP([ofproto-dpif - MAC table overflow])
4575 [set bridge br0 fail-mode=standalone other-config:mac-table-size=10])
4576 ADD_OF_PORTS([br0], 1, 2, 3)
4578 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)'
4580 AT_CHECK([ovs-appctl time/stop])
4582 # Trace 10 ARP packets arriving on p3, to create MAC learning entries.
4583 for i in 0 1 2 3 4 5 6 7 8 9; do
4586 [in_port(3),eth(src=50:54:00:00:00:0$i,dst=ff:ff:ff:ff:ff:ff),$arp],
4589 ovs-appctl time/warp 1000
4592 # Check for the MAC learning entries.
4593 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/ *[[0-9]]\{1,\}$//' | sort],
4595 3 0 50:54:00:00:00:00
4596 3 0 50:54:00:00:00:01
4597 3 0 50:54:00:00:00:02
4598 3 0 50:54:00:00:00:03
4599 3 0 50:54:00:00:00:04
4600 3 0 50:54:00:00:00:05
4601 3 0 50:54:00:00:00:06
4602 3 0 50:54:00:00:00:07
4603 3 0 50:54:00:00:00:08
4604 3 0 50:54:00:00:00:09
4608 # Trace another ARP packet on another MAC.
4611 [in_port(3),eth(src=50:54:00:00:00:10,dst=ff:ff:ff:ff:ff:ff),$arp],
4615 # Check that the new one chased the oldest one out of the table.
4616 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/' | sort],
4618 3 0 50:54:00:00:00:01 ?
4619 3 0 50:54:00:00:00:02 ?
4620 3 0 50:54:00:00:00:03 ?
4621 3 0 50:54:00:00:00:04 ?
4622 3 0 50:54:00:00:00:05 ?
4623 3 0 50:54:00:00:00:06 ?
4624 3 0 50:54:00:00:00:07 ?
4625 3 0 50:54:00:00:00:08 ?
4626 3 0 50:54:00:00:00:09 ?
4627 3 0 50:54:00:00:00:10 ?
4633 AT_SETUP([ofproto-dpif - MAC table overflow fairness])
4635 [set bridge br0 fail-mode=standalone other-config:mac-table-size=10])
4636 ADD_OF_PORTS([br0], 1, 2, 3, 4, 5, 6)
4638 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)'
4640 AT_CHECK([ovs-appctl time/stop])
4642 # Trace packets with 2 different source MACs arriving on each of the 5
4643 # ports, filling up the 10-entry learning table.
4644 for i in 0 1 2 3 4 5 6 7 8 9; do
4646 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
4647 ovs-appctl time/warp 1000
4650 # Check for the MAC learning entries.
4651 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/ *[[0-9]]\{1,\}$//' | sort],
4653 1 0 50:54:00:00:00:00
4654 1 0 50:54:00:00:00:01
4655 2 0 50:54:00:00:00:02
4656 2 0 50:54:00:00:00:03
4657 3 0 50:54:00:00:00:04
4658 3 0 50:54:00:00:00:05
4659 4 0 50:54:00:00:00:06
4660 4 0 50:54:00:00:00:07
4661 5 0 50:54:00:00:00:08
4662 5 0 50:54:00:00:00:09
4666 # Now trace 16 new MACs on another port.
4667 for i in 0 1 2 3 4 5 6 7 8 9 a b c d e f; do
4668 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
4669 ovs-appctl time/warp 1000
4672 # Check the results.
4674 # Our eviction algorithm on overflow is that an arbitrary (but deterministic)
4675 # one of the ports with the most learned MACs loses the least recently used
4676 # one. Thus, the new port will end up with 3 MACs, 3 of the old ports with 1
4677 # MAC each, and the other 2 of the old ports with 2 MACs each.
4679 # (If someone changes lib/heap.c to do something different with equal-priority
4680 # nodes, then the output below could change, but it would still follow the
4681 # rules explained above.)
4682 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/ *[[0-9]]\{1,\}$//' | sort],
4684 1 0 50:54:00:00:00:01
4685 2 0 50:54:00:00:00:03
4686 3 0 50:54:00:00:00:04
4687 3 0 50:54:00:00:00:05
4688 4 0 50:54:00:00:00:07
4689 5 0 50:54:00:00:00:08
4690 5 0 50:54:00:00:00:09
4691 6 0 50:54:00:00:0d:ff
4692 6 0 50:54:00:00:0e:ff
4693 6 0 50:54:00:00:0f:ff
4699 # CHECK_SFLOW_SAMPLING_PACKET(LOOPBACK_ADDR, ADDR_WITHOUT_BRACKETS)
4701 # Test that sFlow samples packets correctly using IPv4/IPv6 sFlow collector
4703 # IP_VERSION_TYPE is used in AT_SETUP
4704 m4_define([CHECK_SFLOW_SAMPLING_PACKET],
4705 [AT_SETUP([ofproto-dpif - sFlow packet sampling - $2 collector])
4706 AT_XFAIL_IF([test "$IS_WIN32" = "yes"])
4707 OVS_VSWITCHD_START([set Bridge br0 fail-mode=standalone])
4709 ON_EXIT([kill `cat test-sflow.pid`])
4710 AT_CHECK([ovstest test-sflow --log-file --detach --no-chdir --pidfile 0:$1 > sflow.log], [0], [], [ignore])
4711 AT_CAPTURE_FILE([sflow.log])
4712 SFLOW_PORT=`parse_listening_port < test-sflow.log`
4713 ovs-appctl time/stop
4715 ADD_OF_PORTS([br0], 1, 2)
4717 set Interface br0 options:ifindex=1002 -- \
4718 set Interface p1 options:ifindex=1004 -- \
4719 set Interface p2 options:ifindex=1003 -- \
4720 set Bridge br0 sflow=@sf -- \
4721 --id=@sf create sflow targets=\"$1:$SFLOW_PORT\" \
4722 header=128 sampling=1 polling=1 agent=$LOOPBACK_INTERFACE
4724 dnl open with ARP packets to seed the bridge-learning. The output
4725 dnl ifIndex numbers should be reported predictably after that.
4726 dnl Since we set sampling=1 we should see all of these packets
4727 dnl reported. Sorting the output by data-source and seqNo makes
4728 dnl it deterministic. Ensuring that we send at least two packets
4729 dnl into each port means we get to check the seq nos are
4730 dnl incrementing correctly.
4731 dnl because packets from different ports can be handled by separate
4732 dnl threads, put some sleeps
4734 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)'
4736 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)'
4738 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)'
4740 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)'
4741 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)'
4743 dnl sleep long enough to get more than one counter sample
4744 dnl from each datasource so we can check sequence numbers
4745 ovs-appctl time/warp 3000 100
4747 ovs-appctl -t test-sflow exit
4749 AT_CHECK_UNQUOTED([[sort sflow.log | $EGREP 'HEADER|ERROR' | sed 's/ /\
4770 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
4790 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
4810 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
4830 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
4850 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
4853 AT_CHECK_UNQUOTED([[sort sflow.log | $EGREP 'IFCOUNTERS|ERROR|PORTNAME|OPENFLOWPORT' | head -18 | sed 's/ /\
4867 in_broadcasts=4294967295
4870 in_unknownprotos=4294967295
4873 out_multicasts=4294967295
4874 out_broadcasts=4294967295
4890 in_broadcasts=4294967295
4893 in_unknownprotos=4294967295
4896 out_multicasts=4294967295
4897 out_broadcasts=4294967295
4913 in_broadcasts=4294967295
4916 in_unknownprotos=4294967295
4919 out_multicasts=4294967295
4920 out_broadcasts=4294967295
4936 in_broadcasts=4294967295
4939 in_unknownprotos=4294967295
4942 out_multicasts=4294967295
4943 out_broadcasts=4294967295
4959 in_broadcasts=4294967295
4962 in_unknownprotos=4294967295
4965 out_multicasts=4294967295
4966 out_broadcasts=4294967295
4982 in_broadcasts=4294967295
4985 in_unknownprotos=4294967295
4988 out_multicasts=4294967295
4989 out_broadcasts=4294967295
4994 datapath_id=18364758544493064720
4997 datapath_id=18364758544493064720
5000 datapath_id=18364758544493064720
5003 datapath_id=18364758544493064720
5006 datapath_id=18364758544493064720
5009 datapath_id=18364758544493064720
5026 CHECK_SFLOW_SAMPLING_PACKET([127.0.0.1], [IPv4])
5027 CHECK_SFLOW_SAMPLING_PACKET([[[::1]]], [IPv6])
5029 dnl Test sFlow LAG structures
5030 AT_SETUP([ofproto-dpif - sFlow LACP structures])
5031 AT_SKIP_IF([test "$IS_WIN32" = "yes"])
5032 OVS_VSWITCHD_START([dnl
5033 add-bond br0 bond p1 p2 -- \
5034 set Port bond lacp=active bond-mode=active-backup \
5035 other_config:lacp-time="fast" \
5036 other_config:lacp-system-id=11:22:33:44:55:66 \
5037 other_config:lacp-system-priority=54321 -- \
5038 set Interface p1 type=dummy \
5039 other_config:lacp-port-id=11 \
5040 other_config:lacp-port-priority=111 \
5041 other_config:lacp-aggregation-key=3333 -- \
5042 set Interface p2 type=dummy \
5043 other_config:lacp-port-id=22 \
5044 other_config:lacp-port-priority=222 \
5045 other_config:lacp-aggregation-key=3333 ])
5047 ON_EXIT([kill `cat test-sflow.pid`])
5048 AT_CHECK([ovstest test-sflow --log-file --detach --no-chdir --pidfile 0:127.0.0.1 > sflow.log], [0], [], [ignore])
5049 AT_CAPTURE_FILE([sflow.log])
5050 SFLOW_PORT=`parse_listening_port < test-sflow.log`
5052 ovs-appctl time/stop
5055 set Interface p1 options:ifindex=1003 -- \
5056 set Bridge br0 sflow=@sf -- \
5057 --id=@sf create sflow targets=\"127.0.0.1:$SFLOW_PORT\" \
5058 header=128 sampling=1 polling=1
5060 dnl sleep long enough to get the sFlow datagram flushed out (may be delayed for up to 1 second)
5061 AT_CHECK([ovs-appctl time/warp 2000 100], [0], [ignore])
5062 AT_CHECK([ovs-appctl revalidator/purge], [0])
5064 ovs-appctl -t test-sflow exit
5065 AT_CHECK([[sort sflow.log | $EGREP 'LACPCOUNTERS|ERROR' | head -n 1 | sed 's/ /\
5068 sysID=11:22:33:44:55:66
5069 partnerID=00:00:00:00:00:00
5076 markerPDUsRx=4294967295
5077 markerRespPDUsRx=4294967295
5078 unknownRx=4294967295
5081 markerPDUsTx=4294967295
5082 markerRespPDUsTx=4294967295
5087 # CHECK_NETFLOW_EXPIRATION(LOOPBACK_ADDR, IP_VERSION_TYPE)
5089 # Test that basic NetFlow reports flow statistics correctly:
5090 # The initial packet of a flow are correctly accounted.
5091 # Later packets within a flow are correctly accounted.
5092 # Flow actions changing (in this case, due to MAC learning)
5093 # cause a record to be sent.
5095 # IP_VERSION_TYPE is used in AT_SETUP
5096 m4_define([CHECK_NETFLOW_EXPIRATION],
5097 [AT_SETUP([ofproto-dpif - NetFlow flow expiration - $2 collector])
5098 OVS_VSWITCHD_START([set Bridge br0 fail-mode=standalone])
5099 ADD_OF_PORTS([br0], 1, 2)
5101 ovs-appctl time/stop
5102 ON_EXIT([kill `cat test-netflow.pid`])
5103 AT_CHECK([ovstest test-netflow --log-file --detach --no-chdir --pidfile 0:$1 > netflow.log], [0], [], [ignore])
5104 AT_CAPTURE_FILE([netflow.log])
5105 NETFLOW_PORT=`parse_listening_port < test-netflow.log`
5108 set Bridge br0 netflow=@nf -- \
5109 --id=@nf create NetFlow targets=\"$1:$NETFLOW_PORT\" \
5110 engine_id=1 engine_type=2 active_timeout=30 add-id-to-interface=false
5112 for delay in 1000 30000; do
5113 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)'
5114 sleep 1 # ensure the order in which these two packets are processed
5115 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)'
5117 ovs-appctl time/warp $delay
5120 ovs-appctl time/warp 6000
5121 ovs-appctl revalidator/wait
5123 ovs-appctl -t test-netflow exit
5125 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])
5127 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])
5129 combined=`grep "192.168.0.2 > 192.168.0.1, if 2 > 1, 2 pkts, 120 bytes, ICMP 0:0" netflow.log | wc -l`
5130 separate=`grep "192.168.0.2 > 192.168.0.1, if 2 > 1, 1 pkts, 60 bytes, ICMP 0:0" netflow.log | wc -l`
5131 AT_CHECK([test $separate = 2 || test $combined = 1], [0])
5135 CHECK_NETFLOW_EXPIRATION([127.0.0.1], [IPv4])
5136 CHECK_NETFLOW_EXPIRATION([[[::1]]], [IPv6])
5138 # CHECK_NETFLOW_ACTIVE_EXPIRATION(LOOPBACK_ADDR, IP_VERSION_TYPE)
5140 # Test that basic NetFlow reports active expirations correctly.
5142 # IP_VERSION_TYPE is used in AT_SETUP
5143 m4_define([CHECK_NETFLOW_ACTIVE_EXPIRATION],
5144 [AT_SETUP([ofproto-dpif - NetFlow active expiration - $2 collector])
5146 OVS_VSWITCHD_START([set Bridge br0 fail-mode=standalone])
5147 ADD_OF_PORTS([br0], 1, 2)
5149 ON_EXIT([kill `cat test-netflow.pid`])
5150 AT_CHECK([ovstest test-netflow --log-file --detach --no-chdir --pidfile 0:$1 > netflow.log], [0], [], [ignore])
5151 AT_CAPTURE_FILE([netflow.log])
5152 NETFLOW_PORT=`parse_listening_port < test-netflow.log`
5155 set Bridge br0 netflow=@nf -- \
5156 --id=@nf create NetFlow targets=\"$1:$NETFLOW_PORT\" \
5157 engine_id=1 engine_type=2 active_timeout=10 add-id-to-interface=false
5159 AT_CHECK([ovs-appctl time/stop])
5161 while test $n -le 60; do
5164 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)'
5165 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)'
5167 ovs-appctl time/warp 1000
5170 ovs-appctl time/warp 10000
5172 ovs-appctl revalidator/wait
5174 ovs-appctl -t test-netflow exit
5176 # Count the number of reported packets:
5177 # - From source to destination before MAC learning kicks in (just one).
5178 # - From source to destination after that.
5179 # - From destination to source.
5187 pkts=`echo "$line" | sed 's/.*, \([[0-9]]*\) pkts,.*/\1/'`
5194 "seq "*": 192.168.0.1 > 192.168.0.2, if 1 > 65535, "*" pkts, "*" bytes, TCP 1234 > 80, time "*)
5197 "seq "*": 192.168.0.1 > 192.168.0.2, if 1 > 2, "*" pkts, "*" bytes, TCP 1234 > 80, time "*)
5200 "seq "*": 192.168.0.2 > 192.168.0.1, if 2 > 1, "*" pkts, "*" bytes, TCP 80 > 1234, time "*)
5207 eval $counter=\`expr \$$counter + \$pkts\`
5208 n_recs=`expr $n_recs + 1`
5211 # There should be exactly 1 MAC learning packet,
5212 # exactly 59 other packets in that direction,
5213 # and exactly 60 packets in the other direction.
5214 AT_CHECK([echo $n_learn $n_in $n_out $n_other], [0], [1 59 60 0
5219 CHECK_NETFLOW_ACTIVE_EXPIRATION([127.0.0.1], [IPv4])
5220 CHECK_NETFLOW_ACTIVE_EXPIRATION([[[::1]]], [IPv6])
5222 AT_SETUP([ofproto-dpif - flow stats])
5224 AT_CHECK([ovs-ofctl add-flow br0 "ip,actions=NORMAL"])
5225 AT_CHECK([ovs-ofctl add-flow br0 "icmp,actions=NORMAL"])
5227 ovs-appctl time/stop
5229 for i in `seq 1 10`; do
5230 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)'
5233 AT_CHECK([ovs-appctl time/warp 1000], [0], [ignore])
5234 AT_CHECK([ovs-appctl revalidator/purge], [0])
5235 AT_CHECK([ovs-ofctl dump-flows br0], [0], [stdout])
5236 AT_CHECK([STRIP_XIDS stdout | sed -n 's/duration=[[0-9]]*\.[[0-9]]*s/duration=0.0s/p' | sort], [0], [dnl
5237 cookie=0x0, duration=0.0s, table=0, n_packets=0, n_bytes=0, idle_age=1, icmp actions=NORMAL
5238 cookie=0x0, duration=0.0s, table=0, n_packets=10, n_bytes=600, idle_age=1, ip actions=NORMAL
5243 AT_SETUP([ofproto-dpif - flow stats, set-n-threads])
5245 AT_CHECK([ovs-ofctl add-flow br0 "ip,actions=NORMAL"])
5246 AT_CHECK([ovs-ofctl add-flow br0 "icmp,actions=NORMAL"])
5248 ovs-appctl time/stop
5250 for i in `seq 1 10`; do
5251 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)'
5254 ovs-appctl time/warp 100
5255 AT_CHECK([ovs-vsctl set Open_vSwitch . other-config:n-revalidator-threads=2])
5256 ovs-appctl time/warp 1000
5258 AT_CHECK([ovs-ofctl dump-flows br0], [0], [stdout])
5259 AT_CHECK([STRIP_XIDS stdout | sed -n 's/duration=[[0-9]]*\.[[0-9]]*s/duration=0.0s/p' | sort], [0], [dnl
5260 cookie=0x0, duration=0.0s, table=0, n_packets=0, n_bytes=0, idle_age=1, icmp actions=NORMAL
5261 cookie=0x0, duration=0.0s, table=0, n_packets=10, n_bytes=600, idle_age=1, ip actions=NORMAL
5266 AT_SETUP([ofproto-dpif - idle_age and hard_age increase over time])
5269 # get_ages DURATION HARD IDLE
5271 # Fetch the flow duration, hard age, and idle age into the variables
5272 # whose names are given as arguments. Rounds DURATION down to the
5273 # nearest integer. If hard_age doesn't appear in the output, sets
5274 # HARD to "none". If idle_age doesn't appear in the output, sets IDLE
5277 AT_CHECK([ovs-ofctl dump-flows br0], [0], [stdout])
5279 duration=`sed -n 's/.*duration=\([[0-9]]*\)\(\.[[0-9]]*\)\{0,1\}s.*/\1/p' stdout`
5280 AT_CHECK([[expr X"$duration" : 'X[0-9][0-9]*$']], [0], [ignore])
5281 AS_VAR_COPY([$1], [duration])
5283 hard=`sed -n 's/.*hard_age=\([[0-9]]*\),.*/\1/p' stdout`
5284 if test X"$hard" = X; then
5287 AT_CHECK([[expr X"$hard" : 'X[0-9][0-9]*$']], [0], [ignore])
5289 AS_VAR_COPY([$2], [hard])
5291 idle=`sed -n 's/.*idle_age=\([[0-9]]*\),.*/\1/p' stdout`
5292 if test X"$idle" = X; then
5295 AT_CHECK([[expr X"$idle" : 'X[0-9][0-9]*$']], [0], [ignore])
5297 AS_VAR_COPY([$3], [idle])
5300 # Add a flow and get its initial hard and idle age.
5301 AT_CHECK([ovs-ofctl add-flow br0 hard_timeout=199,idle_timeout=188,actions=drop])
5302 get_ages duration1 hard1 idle1
5304 ovs-appctl time/stop
5305 # Warp time forward by 10 seconds, then modify the flow's actions.
5306 ovs-appctl time/warp 10000
5307 get_ages duration2 hard2 idle2
5308 AT_CHECK([ovs-ofctl mod-flows br0 actions=flood])
5310 # Warp time forward by 10 seconds.
5311 ovs-appctl time/warp 10000
5312 get_ages duration3 hard3 idle3
5314 # Warp time forward 10 more seconds, then pass some packets through the flow,
5315 # then warp forward a few more times because idle times are only updated
5317 ovs-appctl time/warp 10000
5318 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)'
5319 ovs-appctl time/warp 3000 1000
5321 get_ages duration4 hard4 idle4
5323 printf "duration: %4s => %4s => %4s => %4s\n" $duration1 $duration2 $duration3 $duration4
5324 printf "hard_age: %4s => %4s => %4s => %4s\n" $hard1 $hard2 $hard3 $hard4
5325 printf "idle_age: %4s => %4s => %4s => %4s\n" $idle1 $idle2 $idle3 $idle4
5327 # Duration should increase steadily over time.
5328 AT_CHECK([test $duration1 -lt $duration2])
5329 AT_CHECK([test $duration2 -lt $duration3])
5330 AT_CHECK([test $duration3 -lt $duration4])
5332 # Hard age should be "none" initially because it's the same as flow_duration,
5333 # then it should increase.
5334 AT_CHECK([test $hard1 = none])
5335 AT_CHECK([test $hard2 = none])
5336 AT_CHECK([test $hard3 != none])
5337 AT_CHECK([test $hard4 != none])
5338 AT_CHECK([test $hard3 -lt $hard4])
5340 # Idle age should increase from 1 to 2 to 3, then decrease.
5341 AT_CHECK([test $idle1 -lt $idle2])
5342 AT_CHECK([test $idle2 -lt $idle3])
5343 AT_CHECK([test $idle3 -gt $idle4])
5345 # Check some invariant relationships.
5346 AT_CHECK([test $duration1 = $idle1])
5347 AT_CHECK([test $duration2 = $idle2])
5348 AT_CHECK([test $duration3 = $idle3])
5349 AT_CHECK([test $idle3 -gt $hard3])
5350 AT_CHECK([test $idle4 -lt $hard4])
5351 AT_CHECK([test $hard4 -lt $duration4])
5356 AT_SETUP([ofproto-dpif - fin_timeout])
5358 ovs-appctl time/stop
5359 AT_CHECK([ovs-ofctl add-flow br0 'idle_timeout=60,actions=fin_timeout(idle_timeout=5)'])
5360 AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip], [0],
5362 idle_timeout=60, actions=fin_timeout(idle_timeout=5)
5365 # Check that a TCP SYN packet does not change the timeout. (Because
5366 # flow stats updates are mainly what implements the fin_timeout
5367 # feature, we warp forward a couple of times to ensure that flow stats
5368 # run before re-checking the flow table.)
5369 AT_CHECK([ovs-appctl netdev-dummy/receive br0 0021853763af0026b98cb0f908004500003c2e2440004006465dac11370dac11370b828b0016751e267b00000000a00216d017360000020405b40402080a2d25085f0000000001030307])
5370 AT_CHECK([ovs-appctl time/warp 1000 && ovs-appctl time/warp 1000], [0], [warped
5373 AT_CHECK([ovs-appctl revalidator/purge], [0])
5374 AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip], [0],
5376 n_packets=1, n_bytes=74, idle_timeout=60, actions=fin_timeout(idle_timeout=5)
5378 # Check that a TCP FIN packet does change the timeout.
5379 AT_CHECK([ovs-appctl netdev-dummy/receive br0 0021853763af0026b98cb0f90800451000342e3e40004006463bac11370dac11370b828b0016751e319dfc96399b801100717ae800000101080a2d250a9408579588])
5380 AT_CHECK([ovs-appctl time/warp 1000 && ovs-appctl time/warp 1000], [0], [warped
5383 AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip], [0],
5385 n_packets=2, n_bytes=140, idle_timeout=5, actions=fin_timeout(idle_timeout=5)
5390 AT_SETUP([ofproto-dpif - ovs-appctl dpif/dump-dps])
5391 OVS_VSWITCHD_START([add-br br1 -- set bridge br1 datapath-type=dummy])
5392 ADD_OF_PORTS([br0], [1], [2])
5393 ADD_OF_PORTS([br1], [3])
5395 AT_CHECK([ovs-appctl dpif/dump-dps], [0], [dnl
5402 AT_SETUP([ofproto-dpif - ovs-appctl dpif/show])
5403 OVS_VSWITCHD_START([add-br br1 -- set bridge br1 datapath-type=dummy])
5404 ADD_OF_PORTS([br0], [1], [2])
5405 ADD_OF_PORTS([br1], [3])
5407 AT_CHECK([ovs-appctl dpif/show], [0], [dnl
5408 dummy@ovs-dummy: hit:0 missed:0
5410 br0 65534/100: (dummy)
5414 br1 65534/101: (dummy)
5420 AT_SETUP([ofproto-dpif - ovs-appctl dpif/dump-flows])
5421 # bump max-idle to avoid the flows being reclaimed behind us
5422 OVS_VSWITCHD_START([add-br br1 -- \
5423 set bridge br1 datapath-type=dummy fail-mode=secure -- \
5424 set Open_vSwitch . other_config:max-idle=10000])
5425 ADD_OF_PORTS([br0], [1], [2])
5426 ADD_OF_PORTS([br1], [3])
5428 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)'])
5429 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)'])
5430 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)'])
5431 ovs-appctl revalidator/wait
5432 AT_CHECK([ovs-appctl dpif/dump-flows br0 | STRIP_UFID | STRIP_USED | sort], [0], [dnl
5433 recirc_id(0),in_port(1),eth_type(0x0800),ipv4(frag=no), packets:0, bytes:0, used:never, actions:drop
5434 recirc_id(0),in_port(2),eth_type(0x0800),ipv4(frag=no), packets:0, bytes:0, used:never, actions:drop
5437 AT_CHECK([ovs-appctl dpif/dump-flows br1 | STRIP_UFID | STRIP_USED | sort], [0], [dnl
5438 recirc_id(0),in_port(3),eth_type(0x0800),ipv4(frag=no), packets:0, bytes:0, used:never, actions:drop
5441 AT_CHECK([ovs-appctl dpif/dump-flows -m br0 | STRIP_UFID | STRIP_USED | sort], [0], [dnl
5442 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
5443 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
5446 AT_CHECK([ovs-appctl dpif/dump-flows -m br1 | STRIP_UFID | STRIP_USED | sort], [0], [dnl
5447 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
5453 AT_SETUP([ofproto-dpif - ovs-appctl dpif/get-flow])
5455 OVS_VSWITCHD_START([add-br br1 -- \
5456 set bridge br1 datapath-type=dummy fail-mode=secure -- \
5457 set Open_vSwitch . other_config:max-idle=10000])
5458 ADD_OF_PORTS([br0], [1], [2])
5460 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)'])
5461 ovs-appctl revalidator/wait
5462 AT_CHECK([ovs-appctl dpif/dump-flows -m br0], [0], [stdout])
5464 UFID=`sed -n 's/\(ufid:[[-0-9a-fA-F]]*\).*/\1/p' stdout`
5465 AT_CHECK([ovs-appctl dpctl/get-flow $UFID], [0], [dnl
5466 recirc_id(0),in_port(1),eth_type(0x0800),ipv4(frag=no), packets:0, bytes:0, used:never, actions:drop
5472 AT_SETUP([ofproto-dpif - MPLS actions that result in a userspace action])
5473 OVS_VSWITCHD_START([dnl
5474 add-port br0 p1 -- set Interface p1 type=dummy
5476 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5477 ON_EXIT([kill `cat ovs-ofctl.pid`])
5479 AT_CAPTURE_FILE([ofctl_monitor.log])
5480 AT_DATA([flows.txt], [dnl
5481 dl_src=60:66:66:66:66:00 actions=push_mpls:0x8847,controller
5482 dl_src=60:66:66:66:66:01 actions=pop_mpls:0x8849,controller
5484 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5486 dnl Packet is sent to userspace because a MPLS push or pop action is applied to
5487 dnl a packet with 2 MPLS LSEs but dpif-netdev can't handle any labels.
5489 dnl The input is a frame with two MPLS labels which tcpdump -vve shows as:
5490 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)
5491 dnl (label 20, exp 0, [S], ttl 32)
5492 dnl (tos 0x0, ttl 64, id 0, offset 0, flags [none], proto TCP (6), length 44, bad cksum 3b78 (->f978)!)
5493 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
5495 for dl_src in 00 01; do
5496 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"])
5498 sleep 1 # wait for the datapath flow installed
5499 AT_CHECK_UNQUOTED([cat ovs-vswitchd.log | STRIP_UFID | FILTER_FLOW_INSTALL | STRIP_USED], [0], [dnl
5500 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))
5501 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))
5508 AT_SETUP([ofproto-dpif - MPLS actions that result in a drop])
5509 OVS_VSWITCHD_START([dnl
5510 add-port br0 p1 -- set Interface p1 type=dummy
5512 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5513 ON_EXIT([kill `cat ovs-ofctl.pid`])
5515 AT_CAPTURE_FILE([ofctl_monitor.log])
5516 AT_DATA([flows.txt], [dnl
5517 dl_src=60:66:66:66:66:00 actions=push_mpls:0x8847,controller
5518 dl_src=60:66:66:66:66:01 actions=pop_mpls:0x8849,controller
5520 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5522 dnl Packet is dropped because an MPLS PUSH action is applied to a packet with
5523 dnl 4 MPLS LSEs but ovs-vswtichd can only handle up to 3 MPLS LSEs and thus
5524 dnl can't determine the resulting MPLS label after MPLS push/pop actions.
5526 dnl The input is a frame with two MPLS headers which tcpdump -vve shows as:
5527 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)
5528 dnl (label 20, exp 0, ttl 32)
5529 dnl (label 20, exp 0, ttl 32)
5530 dnl (label 20, exp 0, [S], ttl 32)
5531 dnl (tos 0x0, ttl 64, id 0, offset 0, flags [none], proto TCP (6), length 44, bad cksum 3b78 (->f978)!)
5532 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
5534 for dl_src in 00 01; do
5535 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"])
5537 sleep 1 # wait for the datapath flow installed
5538 AT_CHECK_UNQUOTED([cat ovs-vswitchd.log | STRIP_UFID | FILTER_FLOW_INSTALL | STRIP_USED], [0], [dnl
5539 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))
5540 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))
5546 AT_SETUP([ofproto-dpif - patch ports])
5547 OVS_VSWITCHD_START([add-br br1 \
5548 -- set bridge br1 datapath-type=dummy fail-mode=secure \
5549 -- add-port br1 pbr1 -- set int pbr1 type=patch options:peer=pbr0 \
5550 -- add-port br0 pbr0 -- set int pbr0 type=patch options:peer=pbr1])
5552 ADD_OF_PORTS([br0], [2])
5553 ADD_OF_PORTS([br1], [3])
5555 AT_CHECK([ovs-appctl upcall/disable-ufid], [0], [Datapath dumping tersely using UFID disabled
5557 AT_CHECK([ovs-appctl time/stop])
5558 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5560 AT_CHECK([ovs-ofctl add-flow br0 actions=LOCAL,output:1,output:2])
5561 AT_CHECK([ovs-ofctl add-flow br1 actions=LOCAL,output:1,output:3])
5563 for i in $(seq 1 10); do
5564 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)'
5565 if [[ $i -eq 1 ]]; then
5570 for i in $(seq 1 5); do
5571 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)'
5572 if [[ $i -eq 1 ]]; then
5577 AT_CHECK([ovs-appctl time/warp 500], [0],
5580 sleep 1 # wait for log writer
5582 AT_CHECK([ovs-appctl dpif/show], [0], [dnl
5583 dummy@ovs-dummy: hit:13 missed:2
5585 br0 65534/100: (dummy)
5587 pbr0 1/none: (patch: peer=pbr1)
5589 br1 65534/101: (dummy)
5591 pbr1 1/none: (patch: peer=pbr0)
5594 AT_CHECK([cat ovs-vswitchd.log | STRIP_UFID | FILTER_FLOW_INSTALL | STRIP_USED], [0], [dnl
5595 recirc_id=0,ip,in_port=100,nw_frag=no, actions:101,3,2
5596 recirc_id=0,ip,in_port=101,nw_frag=no, actions:100,2,3
5599 AT_CHECK([cat ovs-vswitchd.log | grep -e 'in_port(100).*packets:9' | STRIP_UFID | FILTER_FLOW_DUMP], [0], [dnl
5600 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
5602 AT_CHECK([cat ovs-vswitchd.log | grep -e 'in_port(101).*packets:4' | STRIP_UFID | FILTER_FLOW_DUMP], [0], [dnl
5603 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
5606 AT_CHECK([ovs-ofctl dump-ports br0 pbr0], [0], [dnl
5607 OFPST_PORT reply (xid=0x4): 1 ports
5608 port 1: rx pkts=5, bytes=300, drop=0, errs=0, frame=0, over=0, crc=0
5609 tx pkts=10, bytes=600, drop=0, errs=0, coll=0
5612 AT_CHECK([ovs-ofctl dump-ports br1 pbr1], [0], [dnl
5613 OFPST_PORT reply (xid=0x4): 1 ports
5614 port 1: rx pkts=10, bytes=600, drop=0, errs=0, frame=0, over=0, crc=0
5615 tx pkts=5, bytes=300, drop=0, errs=0, coll=0
5621 AT_SETUP([ofproto-dpif - patch ports - stack])
5622 OVS_VSWITCHD_START([add-br br1 \
5623 -- set bridge br1 datapath-type=dummy fail-mode=secure \
5624 -- add-port br1 pbr1 -- set int pbr1 type=patch options:peer=pbr0 \
5625 -- add-port br0 pbr0 -- set int pbr0 type=patch options:peer=pbr1])
5627 ADD_OF_PORTS([br0], [2])
5628 ADD_OF_PORTS([br1], [3])
5630 AT_CHECK([ovs-appctl upcall/disable-ufid], [0], [Datapath dumping tersely using UFID disabled
5632 AT_CHECK([ovs-appctl time/stop])
5633 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5635 AT_CHECK([ovs-ofctl add-flow br0 "ip actions=push:OXM_OF_IN_PORT[[0..31]],output:1,pop:OXM_OF_IPV4_SRC[[0..31]],output:2"])
5636 # Try to pop from empty stack, and push and leave data to stack.
5637 AT_CHECK([ovs-ofctl add-flow br1 "ip actions=pop:OXM_OF_IPV4_DST[[0..31]],push:NXM_NX_REG1[[0..31]],LOCAL"])
5639 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)'
5641 AT_CHECK([ovs-appctl time/warp 500], [0],
5645 OVS_WAIT_UNTIL([test `grep flow_add ovs-vswitchd.log | wc -l` -ge 1])
5647 AT_CHECK([ovs-appctl dpif/show], [0], [dnl
5648 dummy@ovs-dummy: hit:0 missed:1
5650 br0 65534/100: (dummy)
5652 pbr0 1/none: (patch: peer=pbr1)
5654 br1 65534/101: (dummy)
5656 pbr1 1/none: (patch: peer=pbr0)
5659 AT_CHECK([cat ovs-vswitchd.log | STRIP_UFID | FILTER_FLOW_INSTALL | STRIP_USED], [0], [dnl
5660 recirc_id=0,ip,in_port=100,nw_src=192.168.0.1,nw_frag=no, actions:101,set(ipv4(src=255.255.255.254)),2
5663 AT_CHECK([cat ovs-vswitchd.log | grep -e '|nx_match|WARN|' | sed "s/^.*|WARN|//"], [0], [dnl
5664 Failed to pop from an empty stack. On flow
5667 OVS_VSWITCHD_STOP(["/Failed to pop from an empty stack/d"])
5670 AT_SETUP([ofproto-dpif - port duration])
5671 OVS_VSWITCHD_START([set Bridge br0 protocols=OpenFlow13])
5672 ADD_OF_PORTS([br0], 1, 2)
5674 ovs-appctl time/stop
5675 ovs-appctl time/warp 10000
5677 AT_CHECK([ovs-ofctl -O openflow13 dump-ports br0], [0], [stdout])
5678 AT_CHECK([sed -n 's/=[[0-9]][[0-9]]\(\.[[0-9]][[0-9]]*\)\{0,1\}s/=?s/p' stdout], [0],
5687 dnl ----------------------------------------------------------------------
5688 AT_BANNER([ofproto-dpif -- megaflows])
5690 AT_SETUP([ofproto-dpif megaflow - port classification])
5692 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5693 ADD_OF_PORTS([br0], [1], [2])
5694 AT_DATA([flows.txt], [dnl
5695 table=0 in_port=1 actions=output(2)
5697 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5698 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)'])
5700 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)'])
5702 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5703 recirc_id=0,ip,in_port=1,nw_frag=no, actions: <del>
5708 AT_SETUP([ofproto-dpif megaflow - L2 classification])
5710 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5711 ADD_OF_PORTS([br0], [1], [2])
5712 AT_DATA([flows.txt], [dnl
5713 table=0 in_port=1,dl_src=50:54:00:00:00:09 actions=output(2)
5715 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5716 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)'])
5717 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)'])
5719 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5720 recirc_id=0,ip,in_port=1,dl_src=50:54:00:00:00:09,nw_frag=no, actions: <del>
5721 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>
5726 AT_SETUP([ofproto-dpif megaflow - L3 classification])
5728 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5729 ADD_OF_PORTS([br0], [1], [2])
5730 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], [])
5731 AT_DATA([flows.txt], [dnl
5732 table=0 in_port=1,icmp,nw_src=10.0.0.4 actions=output(2)
5734 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5735 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)'])
5736 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)'])
5738 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5739 recirc_id=0,icmp,in_port=1,nw_src=10.0.0.4,nw_frag=no, actions: <del>
5740 recirc_id=0,ip,in_port=1,nw_src=10.0.0.2/0.0.0.2,nw_frag=no, actions: <del>
5745 AT_SETUP([ofproto-dpif megaflow - IPv6 classification])
5747 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5748 ADD_OF_PORTS([br0], [1], [2])
5749 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], [])
5750 AT_DATA([flows.txt], [dnl
5751 table=0 in_port=1,ipv6,ipv6_src=2001:db8:3c4d:1:2:3:4:5 actions=output(2)
5753 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5754 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)'])
5755 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)'])
5757 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5758 recirc_id=0,ipv6,in_port=1,ipv6_src=2001:db8:3c4d:1:2:3:4:5,nw_frag=no, actions: <del>
5759 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>
5764 AT_SETUP([ofproto-dpif megaflow - L4 classification])
5766 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5767 ADD_OF_PORTS([br0], [1], [2])
5768 AT_DATA([flows.txt], [dnl
5769 table=0 in_port=1,icmp,icmp_type=8 actions=output(2)
5771 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5772 AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
5774 AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4,dst=10.0.0.3,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
5776 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5777 recirc_id=0,icmp,in_port=1,nw_frag=no,icmp_type=0x8/0xff, actions: <del>
5782 AT_SETUP([ofproto-dpif megaflow - normal])
5784 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5785 ADD_OF_PORTS([br0], [1], [2])
5786 AT_CHECK([ovs-ofctl add-flow br0 action=normal])
5787 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)'])
5788 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)'])
5790 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5791 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>
5792 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>
5797 AT_SETUP([ofproto-dpif megaflow - mpls])
5799 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5800 ADD_OF_PORTS([br0], [1], [2])
5801 AT_DATA([flows.txt], [dnl
5802 table=0 dl_src=50:54:00:00:00:09 actions=push_mpls:0x8847,2
5803 table=0 dl_src=50:54:00:00:00:0b actions=pop_mpls:0x0800,2
5805 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5806 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)'])
5807 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)'])
5809 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5810 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>
5811 recirc_id=0,mpls,in_port=1,dl_src=50:54:00:00:00:0b,mpls_bos=1, actions: <del>
5816 # CHECK_MEGAFLOW_NETFLOW(LOOPBACK_ADDR, IP_VERSION_TYPE)
5818 # IP_VERSION_TYPE is used in AT_SETUP
5819 m4_define([CHECK_MEGAFLOW_NETFLOW],
5820 [AT_SETUP([ofproto-dpif megaflow - netflow - $2 collector])
5822 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5823 ADD_OF_PORTS([br0], [1], [2])
5825 dnl NetFlow configuration disables wildcarding relevant fields
5826 ON_EXIT([kill `cat test-netflow.pid`])
5827 AT_CHECK([ovstest test-netflow --log-file --detach --no-chdir --pidfile 0:$1 > netflow.log], [0], [], [ignore])
5828 AT_CAPTURE_FILE([netflow.log])
5829 NETFLOW_PORT=`parse_listening_port < test-netflow.log`
5831 set Bridge br0 netflow=@nf -- \
5832 --id=@nf create NetFlow targets=\"$1:$NETFLOW_PORT\" \
5833 engine_id=1 engine_type=2 active_timeout=30 add-id-to-interface=false
5835 AT_CHECK([ovs-ofctl add-flow br0 action=normal])
5836 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)'])
5837 AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4,dst=10.0.0.3,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
5839 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5840 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>
5841 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>
5846 CHECK_MEGAFLOW_NETFLOW([127.0.0.1], [IPv4])
5847 CHECK_MEGAFLOW_NETFLOW([[[::1]]], [IPv6])
5849 AT_SETUP([ofproto-dpif megaflow - normal, active-backup bonding])
5851 [add-port br0 p1 -- set Interface p1 type=dummy ofport_request=1 -- \
5852 add-bond br0 bond0 p2 p3 bond_mode=active-backup -- \
5853 set interface p2 type=dummy ofport_request=2 -- \
5854 set interface p3 type=dummy ofport_request=3])
5855 AT_CHECK([ovs-appctl netdev-dummy/set-admin-state up], 0, [OK
5857 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5859 AT_CHECK([ovs-ofctl add-flow br0 action=normal])
5860 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)'])
5861 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)'])
5863 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5864 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>
5865 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>
5870 AT_SETUP([ofproto-dpif megaflow - normal, balance-slb bonding])
5872 [add-port br0 p1 -- set Interface p1 type=dummy ofport_request=1 -- \
5873 add-bond br0 bond0 p2 p3 bond_mode=balance-slb -- \
5874 set interface p2 type=dummy ofport_request=2 -- \
5875 set interface p3 type=dummy ofport_request=3])
5876 AT_CHECK([ovs-appctl netdev-dummy/set-admin-state up], 0, [OK
5878 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5880 AT_CHECK([ovs-ofctl add-flow br0 action=normal])
5881 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)'])
5882 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)'])
5884 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5885 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>
5886 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>
5891 AT_SETUP([ofproto-dpif megaflow - normal, balance-tcp bonding])
5892 # Create bond0 on br0 with interfaces p0 and p1
5893 # and bond1 on br1 with interfaces p2 and p3
5894 # with p0 patched to p2 and p1 patched to p3.
5896 [add-bond br0 bond0 p0 p1 bond_mode=balance-tcp lacp=active \
5897 other-config:lacp-time=fast \
5898 other-config:bond-rebalance-interval=0 -- \
5899 set interface p0 type=patch options:peer=p2 ofport_request=1 -- \
5900 set interface p1 type=patch options:peer=p3 ofport_request=2 -- \
5902 set bridge br1 other-config:hwaddr=aa:66:aa:66:00:00 -- \
5903 set bridge br1 datapath-type=dummy other-config:datapath-id=1234 \
5904 fail-mode=secure -- \
5905 add-bond br1 bond1 p2 p3 bond_mode=balance-tcp lacp=active \
5906 other-config:lacp-time=fast \
5907 other-config:bond-rebalance-interval=0 -- \
5908 set interface p2 type=patch options:peer=p0 ofport_request=3 -- \
5909 set interface p3 type=patch options:peer=p1 ofport_request=4 --])
5911 AT_CHECK([ovs-appctl netdev-dummy/set-admin-state up], 0, [OK
5913 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5914 ADD_OF_PORTS([br0], [7])
5915 AT_CHECK([ovs-ofctl add-flow br0 action=normal])
5916 AT_CHECK([ovs-ofctl add-flow br1 action=normal])
5917 ovs-appctl time/stop
5918 ovs-appctl time/warp 5000
5919 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)'])
5920 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)'])
5922 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5923 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>
5924 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>
5929 AT_SETUP([ofproto-dpif megaflow - resubmit port action])
5931 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5932 ADD_OF_PORTS([br0], [1], [2])
5933 AT_DATA([flows.txt], [dnl
5934 table=0 in_port=1,ip actions=resubmit(90)
5935 table=0 in_port=90,dl_src=50:54:00:00:00:09 actions=output(2)
5937 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5938 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)'])
5939 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)'])
5941 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5942 recirc_id=0,ip,in_port=1,dl_src=50:54:00:00:00:09,nw_frag=no, actions: <del>
5943 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>
5948 AT_SETUP([ofproto-dpif megaflow - resubmit table action])
5950 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5951 ADD_OF_PORTS([br0], [1], [2])
5952 AT_DATA([flows.txt], [dnl
5953 table=0 in_port=1,ip actions=resubmit(,1)
5954 table=1 dl_src=50:54:00:00:00:09 actions=output(2)
5956 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5957 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)'])
5958 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=
5959 1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
5961 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5962 recirc_id=0,ip,in_port=1,dl_src=50:54:00:00:00:09,nw_frag=no, actions: <del>
5963 recirc_id=0,ip,in_port=1,dl_src=50:54:00:00:00:0b,nw_frag=no, actions: <del>
5968 AT_SETUP([ofproto-dpif megaflow - goto_table action])
5970 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5971 ADD_OF_PORTS([br0], [1], [2])
5972 AT_DATA([flows.txt], [dnl
5973 table=0 in_port=1,ip actions=goto_table(1)
5974 table=1 dl_src=50:54:00:00:00:09 actions=output(2)
5976 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flows br0 flows.txt])
5977 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)'])
5978 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)'])
5980 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5981 recirc_id=0,ip,in_port=1,dl_src=50:54:00:00:00:09,nw_frag=no, actions: <del>
5982 recirc_id=0,ip,in_port=1,dl_src=50:54:00:00:00:0b,nw_frag=no, actions: <del>
5987 AT_SETUP([ofproto-dpif megaflow - mirroring, select_all])
5989 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5990 ADD_OF_PORTS([br0], [1], [2], [3])
5992 set Bridge br0 mirrors=@m --\
5993 --id=@p3 get Port p3 --\
5994 --id=@m create Mirror name=mymirror select_all=true output_port=@p3
5996 AT_DATA([flows.txt], [dnl
5997 in_port=1 actions=output:2
5999 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
6000 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)'])
6002 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)'])
6004 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
6005 recirc_id=0,ip,in_port=1,nw_frag=no, actions: <del>
6010 AT_SETUP([ofproto-dpif megaflow - mirroring, select_vlan])
6012 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
6013 ADD_OF_PORTS([br0], [1], [2], [3])
6015 set Bridge br0 mirrors=@m --\
6016 --id=@p2 get Port p2 -- --id=@p3 get Port p3 --\
6017 --id=@m create Mirror name=mymirror select_all=true select_vlan=11 output_port=@p3
6019 AT_DATA([flows.txt], [dnl
6020 in_port=1 actions=output:2
6022 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
6023 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))'])
6024 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)'])
6026 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
6027 recirc_id=0,ip,in_port=1,dl_vlan=11,nw_frag=no, actions: <del>
6028 recirc_id=0,ip,in_port=1,vlan_tci=0x0000/0x1fff,nw_frag=no, actions: <del>
6033 AT_SETUP([ofproto-dpif megaflow - move action])
6035 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
6036 ADD_OF_PORTS([br0], [1], [2])
6037 AT_DATA([flows.txt], [dnl
6038 table=0 in_port=1 ip,actions=move:NXM_OF_IP_SRC[[]]->NXM_NX_REG0[[]],resubmit(90)
6039 table=0 in_port=90 ip,actions=move:NXM_NX_REG0[[]]->NXM_NX_REG1[[]],resubmit(91)
6040 table=0 in_port=91 reg0=0x0a000002,actions=output(2)
6042 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
6043 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)'])
6044 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)'])
6046 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
6047 recirc_id=0,ip,in_port=1,nw_src=10.0.0.2,nw_frag=no, actions: <del>
6048 recirc_id=0,ip,in_port=1,nw_src=10.0.0.4,nw_frag=no, actions: <del>
6053 AT_SETUP([ofproto-dpif megaflow - push action])
6055 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
6056 ADD_OF_PORTS([br0], [1], [2])
6057 AT_DATA([flows.txt], [dnl
6058 table=0 in_port=1 ip,actions=push:NXM_OF_IP_SRC[[]],output(2)
6060 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
6061 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)'])
6062 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)'])
6064 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
6065 recirc_id=0,ip,in_port=1,nw_src=10.0.0.2,nw_frag=no, actions: <del>
6066 recirc_id=0,ip,in_port=1,nw_src=10.0.0.4,nw_frag=no, actions: <del>
6071 AT_SETUP([ofproto-dpif megaflow - learning])
6073 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
6074 ADD_OF_PORTS([br0], [1], [2])
6075 AT_DATA([flows.txt], [dnl
6076 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
6078 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
6079 ovs-appctl time/stop
6080 # We send each packet twice because the first packet in each flow causes the
6081 # flow table to change and thus revalidations, which (depending on timing)
6082 # can keep a megaflow from being installed. The revalidations are done by
6083 # the second iteration, allowing the flows to be installed.
6085 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)'])
6086 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)'])
6087 ovs-appctl time/warp 100
6090 dnl The original flow is missing due to a revalidation.
6091 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
6092 recirc_id=0,ip,in_port=1,vlan_tci=0x0000/0x1fff,dl_src=50:54:00:00:00:09,nw_frag=no, actions: <del>
6093 recirc_id=0,ip,in_port=1,vlan_tci=0x0000/0x1fff,dl_src=50:54:00:00:00:0b,nw_frag=no, actions: <del>
6098 AT_SETUP([ofproto-dpif megaflow - tunnels])
6100 [add-port br0 p1 -- set Interface p1 type=dummy ofport_request=1])
6101 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
6102 AT_CHECK([ovs-vsctl add-port br0 p2 -- set Interface p2 type=gre \
6103 options:remote_ip=1.1.1.1 ofport_request=2 options:key=flow])
6104 AT_CHECK([ovs-vsctl add-port br0 p3 -- set Interface p3 type=dummy \
6106 AT_CHECK([ovs-vsctl add-port br0 p4 -- set Interface p4 type=gre \
6107 options:remote_ip=1.1.1.2 options:tos=inherit options:ttl=inherit \
6108 ofport_request=4 options:key=flow])
6109 AT_DATA([flows.txt], [dnl
6110 in_port=1,actions=output(2)
6111 in_port=3,actions=output(4)
6113 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
6114 dnl ECN bits are always copied out, but don't use 0x3 (CE), since that
6115 dnl will cause the packet to be dropped.
6116 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)'])
6118 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)'])
6119 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)'])
6121 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)'])
6123 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
6124 recirc_id=0,ip,in_port=1,nw_ecn=1,nw_frag=no, actions: <del>
6125 recirc_id=0,ip,in_port=3,nw_tos=0,nw_ecn=1,nw_ttl=64,nw_frag=no, actions: <del>
6126 recirc_id=0,ip,in_port=3,nw_tos=252,nw_ecn=1,nw_ttl=128,nw_frag=no, actions: <del>
6131 AT_SETUP([ofproto-dpif megaflow - dec_ttl])
6133 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
6134 ADD_OF_PORTS([br0], [1], [2])
6135 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], [])
6136 AT_DATA([flows.txt], [dnl
6137 table=0 in_port=1,icmp,nw_src=10.0.0.4 actions=dec_ttl,output(2)
6139 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
6140 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)'])
6141 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)'])
6143 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
6144 recirc_id=0,icmp,in_port=1,nw_src=10.0.0.4,nw_ttl=64,nw_frag=no, actions: <del>
6145 recirc_id=0,ip,in_port=1,nw_src=10.0.0.2/0.0.0.2,nw_frag=no, actions: <del>
6150 AT_SETUP([ofproto-dpif megaflow - set dl_dst])
6152 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
6153 ADD_OF_PORTS([br0], [1], [2])
6154 AT_DATA([flows.txt], [dnl
6155 table=0 in_port=1 actions=mod_dl_dst(50:54:00:00:00:0a),output(2)
6157 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
6158 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)'])
6159 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)'])
6161 dnl The first packet is essentially a no-op, as the new destination MAC is the
6162 dnl same as the original. The second entry actually updates the destination
6164 AT_CHECK([cat ovs-vswitchd.log | STRIP_UFID | FILTER_FLOW_INSTALL | STRIP_USED], [0], [dnl
6165 recirc_id=0,ip,in_port=1,dl_dst=50:54:00:00:00:0a,nw_frag=no, actions:2
6166 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
6171 AT_SETUP([ofproto-dpif megaflow - disabled])
6173 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
6174 ADD_OF_PORTS([br0], [1], [2])
6175 AT_DATA([flows.txt], [dnl
6176 table=0 in_port=1,ip,nw_dst=10.0.0.1 actions=output(2)
6177 table=0 in_port=1,ip,nw_dst=10.0.0.3 actions=drop
6179 AT_CHECK([ovs-appctl upcall/disable-megaflows], [0], [megaflows disabled
6181 AT_CHECK([ovs-appctl upcall/disable-ufid], [0], [Datapath dumping tersely using UFID disabled
6183 AT_CHECK([ovs-appctl vlog/set dpif_netdev:dbg], [0], [], [])
6184 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
6185 for i in 1 2 3 4; do
6186 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)'])
6187 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)'])
6188 if [[ $i -eq 1 ]]; then
6193 AT_CHECK([cat ovs-vswitchd.log | STRIP_UFID | FILTER_FLOW_INSTALL | STRIP_USED], [0], [dnl
6194 pkt_mark=0,recirc_id=0,dp_hash=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
6195 pkt_mark=0,recirc_id=0,dp_hash=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
6197 AT_CHECK([cat ovs-vswitchd.log | STRIP_UFID | FILTER_FLOW_DUMP | grep 'packets:3'], [0], [dnl
6198 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
6199 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
6204 AT_SETUP([ofproto-dpif - datapath port number change])
6205 OVS_VSWITCHD_START([set Bridge br0 fail-mode=standalone])
6206 ADD_OF_PORTS([br0], 1)
6208 # Trace a flow that should output to p1.
6209 AT_CHECK([ovs-appctl ofproto/trace br0 in_port=LOCAL,dl_src=10:20:30:40:50:60],
6211 AT_CHECK([tail -1 stdout], [0], [Datapath actions: 1
6214 # Change p1's port number to 5.
6215 AT_CHECK([ovs-appctl dpif-dummy/change-port-number ovs-dummy p1 5])
6217 # Trace a flow that should output to p1 in its new location.
6218 AT_CHECK([ovs-appctl ofproto/trace br0 in_port=LOCAL,dl_src=10:20:30:40:50:60],
6220 AT_CHECK([tail -1 stdout], [0], [Datapath actions: 5
6225 # Tests the bundling with various bfd and cfm configurations.
6226 AT_SETUP([ofproto - bundle with variable bfd/cfm config])
6227 OVS_VSWITCHD_START([add-br br1 -- set bridge br1 datapath-type=dummy -- \
6228 add-bond br0 br0bond p0 p2 bond-mode=active-backup -- \
6229 add-bond br1 br1bond p1 p3 bond-mode=active-backup -- \
6230 set Interface p1 type=patch options:peer=p0 ofport_request=2 -- \
6231 set Interface p3 type=patch options:peer=p2 ofport_request=4 -- \
6232 set Interface p0 type=patch options:peer=p1 ofport_request=1 -- \
6233 set Interface p2 type=patch options:peer=p3 ofport_request=3 -- \
6234 set Interface p0 bfd:enable=true bfd:min_tx=300 bfd:min_rx=300 -- \
6235 set Interface p0 cfm_mpid=1 -- \
6236 set Interface p1 bfd:enable=true bfd:min_tx=500 bfd:min_rx=500])
6238 ovs-appctl time/stop
6239 # advance the clock to stablize everything.
6240 ovs-appctl time/warp 5000 100
6241 # cfm/show should show 'recv' fault.
6242 AT_CHECK([ovs-appctl cfm/show | sed -n '/^.*fault:.*/p'], [0], [dnl
6245 # bfd/show should show 'up'.
6246 AT_CHECK([ovs-appctl bfd/show | sed -n '/^.*Session State:.*/p'], [0], [dnl
6247 Local Session State: up
6248 Remote Session State: up
6249 Local Session State: up
6250 Remote Session State: up
6252 # bond/show should show 'may-enable: true' for all slaves.
6253 AT_CHECK([ovs-appctl bond/show | sed -n '/^.*may_enable:.*/p'], [0], [dnl
6260 # now disable the bfd on p1.
6261 AT_CHECK([ovs-vsctl set Interface p1 bfd:enable=false])
6262 # advance the clock to stablize everything.
6263 ovs-appctl time/warp 5000 100
6264 # cfm/show should show 'recv' fault.
6265 AT_CHECK([ovs-appctl cfm/show | sed -n '/^.*fault:.*/p'], [0], [dnl
6268 # bfd/show should show 'down'.
6269 AT_CHECK([ovs-appctl bfd/show | sed -n '/^.*Session State:.*/p'], [0], [dnl
6270 Local Session State: down
6271 Remote Session State: down
6273 # bond/show should show 'may-enable: false' for p0.
6274 AT_CHECK([ovs-appctl bond/show br0bond | sed -n '/^.*may_enable:.*/p'], [0], [dnl
6279 # now enable the bfd on p1 and disable bfd on p0.
6280 AT_CHECK([ovs-vsctl set Interface p1 bfd:enable=true])
6281 AT_CHECK([ovs-vsctl set Interface p0 bfd:enable=false])
6282 # advance the clock to stablize everything.
6283 ovs-appctl time/warp 5000 100
6284 # cfm/show should show 'recv' fault.
6285 AT_CHECK([ovs-appctl cfm/show | sed -n '/^.*fault:.*/p'], [0], [dnl
6288 # bfd/show should show 'down'.
6289 AT_CHECK([ovs-appctl bfd/show | sed -n '/^.*Session State:.*/p'], [0], [dnl
6290 Local Session State: down
6291 Remote Session State: down
6293 # bond/show should show 'may-enable: false' for p0 and p1.
6294 AT_CHECK([ovs-appctl bond/show | sed -n '/^.*may_enable:.*/p'], [0], [dnl
6304 AT_SETUP([ofproto-dpif - ofproto-dpif-monitor 1])
6305 OVS_VSWITCHD_START([add-port br0 p0 -- set interface p0 type=gre options:remote_ip=1.2.3.4])
6308 AT_CHECK([ovs-vsctl set interface p0 bfd:enable=true])
6310 OVS_WAIT_UNTIL([grep "monitor thread created" ovs-vswitchd.log])
6311 # disable bfd on p0.
6312 AT_CHECK([ovs-vsctl set interface p0 bfd:enable=false])
6314 OVS_WAIT_UNTIL([grep "monitor thread terminated" ovs-vswitchd.log])
6315 AT_CHECK([cat ovs-vswitchd.log | sed -e '/^.*ofproto_dpif_monitor.*$/d' > ovs-vswitchd.log])
6318 AT_CHECK([ovs-vsctl set interface p0 cfm_mpid=10])
6320 OVS_WAIT_UNTIL([grep "monitor thread created" ovs-vswitchd.log])
6321 # disable cfm on p0.
6322 AT_CHECK([ovs-vsctl remove interface p0 cfm_mpid 10])
6324 OVS_WAIT_UNTIL([grep "monitor thread terminated" ovs-vswitchd.log])
6325 AT_CHECK([cat ovs-vswitchd.log | sed -e '/^.*ofproto_dpif_monitor.*$/d' > ovs-vswitchd.log])
6327 # enable both bfd and cfm on p0.
6328 AT_CHECK([ovs-vsctl set interface p0 bfd:enable=true cfm_mpid=10])
6330 OVS_WAIT_UNTIL([grep "monitor thread created" ovs-vswitchd.log])
6331 # disable bfd on p0.
6332 AT_CHECK([ovs-vsctl set interface p0 bfd:enable=false])
6333 # check log, there should not be the log of thread terminated.
6334 AT_CHECK([sed -n "s/^.*|ofproto_dpif_monitor(monitor[[0-9]]*)|INFO|\(.* terminated\)$/\1/p" ovs-vswitchd.log], [0], [dnl
6336 # reenable bfd on p0.
6337 AT_CHECK([ovs-vsctl set interface p0 bfd:enable=true])
6338 # check log, should still be on log of thread created.
6339 AT_CHECK([sed -n "s/^.*|ofproto_dpif_monitor(monitor[[0-9]]*)|INFO|\(.* created\)$/\1/p" ovs-vswitchd.log], [0], [dnl
6340 monitor thread created
6342 # disable bfd and cfm together.
6343 AT_CHECK([ovs-vsctl set interface p0 bfd:enable=false -- remove interface p0 cfm_mpid 10])
6345 OVS_WAIT_UNTIL([grep "monitor thread terminated" ovs-vswitchd.log])
6350 # this test helps avoid the deadlock between the main thread and monitor thread.
6351 AT_SETUP([ofproto-dpif - ofproto-dpif-monitor 2])
6354 for i in `seq 1 199`
6356 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])
6362 AT_BANNER([ofproto-dpif - flow translation resource limits])
6364 AT_SETUP([ofproto-dpif - infinite resubmit])
6366 AT_CHECK([ovs-ofctl add-flow br0 actions=resubmit:1,resubmit:2,output:3])
6367 AT_CHECK([ovs-appctl -vpoll_loop:off ofproto/trace br0 'eth_dst=ff:ff:ff:ff:ff:ff'],
6369 AT_CHECK([tail -1 stdout], [0], [Datapath actions: drop
6371 AT_CHECK([grep -c 'resubmit actions recursed over 64 times' ovs-vswitchd.log],
6374 OVS_VSWITCHD_STOP(["/resubmit actions recursed/d"])
6377 AT_SETUP([ofproto-dpif - exponential resubmit chain])
6379 ADD_OF_PORTS([br0], 1)
6380 (for i in `seq 1 64`; do
6382 echo "in_port=$i, actions=resubmit:$j, resubmit:$j, local"
6384 echo "in_port=65, actions=local") > flows
6385 AT_CHECK([ovs-ofctl add-flows br0 flows])
6386 AT_CHECK([ovs-appctl -vpoll_loop:off ofproto/trace br0 'in_port=1'], [0], [stdout])
6387 AT_CHECK([grep -c 'over 4096 resubmit actions' ovs-vswitchd.log], [0], [1
6389 OVS_VSWITCHD_STOP(["/over.*resubmit actions/d"])
6392 AT_SETUP([ofproto-dpif - too many output actions])
6394 ADD_OF_PORTS([br0], 1)
6395 (for i in `seq 1 12`; do
6397 echo "in_port=$i, actions=resubmit:$j, resubmit:$j, local"
6399 echo "in_port=13, actions=local,local,local,local,local,local,local,local") > flows
6400 AT_CHECK([ovs-ofctl add-flows br0 flows])
6401 AT_CHECK([ovs-appctl -vpoll_loop:off ofproto/trace br0 'in_port=1'], [0], [stdout])
6402 AT_CHECK([grep -c -e '- Uses action(s) not supported by datapath' stdout],
6405 AT_CHECK([grep -c 'resubmits yielded over 64 kB of actions' ovs-vswitchd.log], [0], [1
6407 OVS_VSWITCHD_STOP(["/resubmits yielded over 64 kB of actions/d"])
6410 AT_SETUP([ofproto-dpif - stack too deep])
6412 ADD_OF_PORTS([br0], 1)
6413 (for i in `seq 1 12`; do
6415 echo "in_port=$i, actions=resubmit:$j, resubmit:$j, local"
6417 push="push:NXM_NX_REG0[[]]"
6418 echo "in_port=13, actions=$push,$push,$push,$push,$push,$push,$push,$push") > flows
6419 AT_CHECK([ovs-ofctl add-flows br0 flows])
6420 AT_CHECK([ovs-appctl -vpoll_loop:off ofproto/trace br0 'in_port=1'], [0], [stdout])
6421 AT_CHECK([grep -c 'resubmits yielded over 64 kB of stack' ovs-vswitchd.log], [0], [1
6423 OVS_VSWITCHD_STOP(["/resubmits yielded over 64 kB of stack/d"])
6427 AT_SETUP([ofproto-dpif packet-out controller])
6429 ADD_OF_PORTS([br0], 1, 2)
6431 AT_CHECK([ovs-ofctl add-flow br0 'dl_dst=50:54:00:00:00:0a actions=controller'])
6433 AT_CAPTURE_FILE([ofctl_monitor.log])
6434 AT_CHECK([ovs-ofctl monitor br0 65534 invalid_ttl --detach --no-chdir --pidfile 2> ofctl_monitor.log])
6437 AT_CHECK([ovs-ofctl -O OpenFlow13 packet-out br0 CONTROLLER controller '50540000000a5054000000091234'])
6440 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
6441 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
6442 NXT_PACKET_IN (xid=0x0): total_len=14 in_port=CONTROLLER (via action) data_len=14 (unbuffered)
6443 vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,dl_type=0x1234
6445 NXT_PACKET_IN (xid=0x0): total_len=14 in_port=CONTROLLER (via action) data_len=14 (unbuffered)
6446 vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,dl_type=0x1234
6448 NXT_PACKET_IN (xid=0x0): total_len=14 in_port=CONTROLLER (via action) data_len=14 (unbuffered)
6449 vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,dl_type=0x1234
6452 AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
6453 dl_dst=50:54:00:00:00:0a actions=CONTROLLER:65535
6457 (echo "OFPST_TABLE reply (OF1.3) (xid=0x2):
6459 active=1, lookup=0, matched=0"
6461 while test $x -lt 254; do
6464 active=0, lookup=0, matched=0"
6467 AT_CHECK([ovs-ofctl -O OpenFlow13 dump-tables br0 ], [0], [expout])
6472 AT_SETUP([ofproto-dpif packet-out controller (patch port)])
6475 add-port br0 p1 -- \
6476 set interface p1 type=patch options:peer=p2 -- \
6478 set bridge br1 datapath-type=dummy -- \
6479 set bridge br1 fail-mode=secure -- \
6480 set bridge br1 protocols='[OpenFlow10,OpenFlow11,OpenFlow12,OpenFlow13]' -- \
6481 add-port br1 p2 -- \
6482 set interface p2 type=patch options:peer=p1 --])
6484 AT_CAPTURE_FILE([ofctl_monitor.log])
6485 AT_CHECK([ovs-ofctl monitor br1 65534 invalid_ttl --detach --no-chdir --pidfile 2> ofctl_monitor.log])
6488 AT_CHECK([ovs-ofctl -O OpenFlow13 packet-out br0 CONTROLLER output:1 '50540000000a5054000000091234'])
6491 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
6492 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
6493 NXT_PACKET_IN (xid=0x0): cookie=0x0 total_len=14 in_port=1 (via no_match) data_len=14 (unbuffered)
6494 vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,dl_type=0x1234
6496 NXT_PACKET_IN (xid=0x0): cookie=0x0 total_len=14 in_port=1 (via no_match) data_len=14 (unbuffered)
6497 vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,dl_type=0x1234
6499 NXT_PACKET_IN (xid=0x0): cookie=0x0 total_len=14 in_port=1 (via no_match) data_len=14 (unbuffered)
6500 vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,dl_type=0x1234
6503 (printf "OFPST_TABLE reply (OF1.3) (xid=0x2):"
6505 while test $x -lt 254; do
6508 active=0, lookup=0, matched=0"
6511 AT_CHECK([ovs-ofctl -O OpenFlow13 dump-tables br0 ], [0], [expout])
6513 (echo "OFPST_TABLE reply (OF1.3) (xid=0x2):
6515 active=0, lookup=3, matched=0"
6517 while test $x -lt 254; do
6520 active=0, lookup=0, matched=0"
6523 AT_CHECK([ovs-ofctl -O OpenFlow13 dump-tables br1 ], [0], [expout])
6529 AT_SETUP([ofproto-dpif packet-out goto_table])
6531 ADD_OF_PORTS([br0], 1, 2)
6533 AT_DATA([flows.txt], [dnl
6534 table=0 dl_dst=50:54:00:00:00:0a actions=goto_table(1)
6535 table=1 dl_dst=50:54:00:00:00:0a actions=controller
6537 AT_CHECK([ovs-ofctl -O OpenFlow13 add-flows br0 flows.txt])
6539 AT_CAPTURE_FILE([ofctl_monitor.log])
6540 AT_CHECK([ovs-ofctl monitor br0 65534 invalid_ttl --detach --no-chdir --pidfile 2> ofctl_monitor.log])
6543 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)'
6546 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
6547 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
6548 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
6549 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
6550 vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,dl_type=0x1234
6552 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
6553 vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,dl_type=0x1234
6555 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
6556 vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,dl_type=0x1234
6559 AT_CHECK([ovs-appctl revalidator/purge], [0])
6560 AT_CHECK([ovs-ofctl -O OpenFlow13 dump-flows br0 | ofctl_strip | sort], [0], [dnl
6561 n_packets=3, n_bytes=180, dl_dst=50:54:00:00:00:0a actions=goto_table:1
6562 table=1, n_packets=3, n_bytes=180, dl_dst=50:54:00:00:00:0a actions=CONTROLLER:65535
6563 OFPST_FLOW reply (OF1.3):
6566 (echo "OFPST_TABLE reply (OF1.3) (xid=0x2):
6568 active=1, lookup=3, matched=3
6571 active=1, lookup=3, matched=3"
6573 while test $x -lt 254; do
6576 active=0, lookup=0, matched=0"
6579 AT_CHECK([ovs-ofctl -O OpenFlow13 dump-tables br0 ], [0], [expout])
6585 AT_SETUP([ofproto-dpif packet-out table-miss (continue)])
6587 ADD_OF_PORTS([br0], 1, 2)
6589 AT_CHECK([ovs-ofctl -O OpenFlow11 add-flow br0 'table=1 dl_dst=50:54:00:00:00:0a actions=controller'])
6590 AT_CHECK([ovs-ofctl -O OpenFlow11 mod-table br0 all continue])
6592 AT_CAPTURE_FILE([ofctl_monitor.log])
6593 AT_CHECK([ovs-ofctl monitor br0 65534 invalid_ttl --detach --no-chdir --pidfile 2> ofctl_monitor.log])
6596 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)'
6599 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
6600 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
6601 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
6602 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
6603 vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,dl_type=0x1234
6605 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
6606 vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,dl_type=0x1234
6608 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
6609 vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,dl_type=0x1234
6612 AT_CHECK([ovs-appctl revalidator/purge], [0])
6613 AT_CHECK([ovs-ofctl -O OpenFlow11 dump-flows br0 | ofctl_strip | sort], [0], [dnl
6614 table=1, n_packets=3, n_bytes=180, dl_dst=50:54:00:00:00:0a actions=CONTROLLER:65535
6615 OFPST_FLOW reply (OF1.1):
6618 (echo "OFPST_TABLE reply (OF1.3) (xid=0x2):
6620 active=0, lookup=3, matched=0
6623 active=1, lookup=3, matched=3"
6625 while test $x -lt 254; do
6628 active=0, lookup=0, matched=0"
6631 AT_CHECK([ovs-ofctl -O OpenFlow13 dump-tables br0 ], [0], [expout])
6636 AT_SETUP([ofproto-dpif - ICMPv6])
6638 ADD_OF_PORTS([br0], 1)
6640 AT_CAPTURE_FILE([ofctl_monitor.log])
6642 AT_CHECK([ovs-ofctl monitor br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
6644 ovs-appctl netdev-dummy/receive p1 '0060970769ea0000860580da86dd6000000000203afffe80000000000000020086fffe0580dafe80000000000000026097fffe0769ea870068bd00000000fe80000000000000026097fffe0769ea01010000860580da'
6646 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
6648 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
6649 NXT_PACKET_IN (xid=0x0): cookie=0x0 total_len=86 in_port=1 (via no_match) data_len=86 (unbuffered)
6650 icmp6,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
6656 AT_SETUP([ofproto-dpif - Neighbor Discovery set-field with checksum update])
6658 ADD_OF_PORTS([br0], 1)
6659 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])
6661 AT_CAPTURE_FILE([ofctl_monitor.log])
6663 AT_CHECK([ovs-ofctl monitor br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
6665 ovs-appctl netdev-dummy/receive p1 '0060970769ea0000860580da86dd6000000000203afffe80000000000000020086fffe0580dafe80000000000000026097fffe0769ea870068bd00000000fe80000000000000026097fffe0769ea01010000860580da'
6667 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
6669 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
6670 NXT_PACKET_IN (xid=0x0): cookie=0x0 total_len=86 in_port=1 (via action) data_len=86 (unbuffered)
6671 icmp6,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
6677 # Tests the exact match of CFI bit in installed datapath flows matching VLAN.
6678 AT_SETUP([ofproto-dpif - vlan matching])
6680 [add-port br0 p0 -- set Interface p0 type=dummy ofport_request=1])
6681 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
6683 AT_CHECK([ovs-ofctl del-flows br0])
6684 AT_CHECK([ovs-ofctl add-flow br0 "vlan_tci=0x000a/0x0fff,action=output:local"])
6686 AT_CHECK([ovs-appctl netdev-dummy/receive p0 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x8100),vlan(vid=10,pcp=0),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))'])
6688 AT_CHECK([cat ovs-vswitchd.log | grep 'in_port=[[1]]' | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
6689 recirc_id=0,ip,in_port=1,dl_vlan=10,nw_frag=no, actions: <del>