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])
299 ADD_OF_PORTS([br0], [1], [10], [11])
300 AT_CHECK([ovs-ofctl -O OpenFlow12 add-group br0 'group_id=1234,type=all,bucket=set_field:192.168.3.90->ip_src,group:123,bucket=output:11'])
301 AT_CHECK([ovs-ofctl -O OpenFlow12 add-group br0 'group_id=123,type=all,bucket=output:10'])
302 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=group:1234'])
303 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])
304 AT_CHECK([tail -1 stdout], [0],
305 [Datapath actions: set(ipv4(src=192.168.3.90)),10,set(ipv4(src=192.168.0.1)),11
310 AT_SETUP([ofproto-dpif - all group in action list])
312 ADD_OF_PORTS([br0], [1], [10], [11])
313 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'])
314 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=group:1234'])
315 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])
316 # Must match on the source address to be able to restore it's value for
318 AT_CHECK([tail -2 stdout], [0],
319 [Megaflow: recirc_id=0,ip,in_port=1,nw_src=192.168.0.1,nw_frag=no
320 Datapath actions: set(ipv4(src=192.168.3.90)),10,set(ipv4(src=192.168.0.1)),11
325 AT_SETUP([ofproto-dpif - indirect group in action list])
327 ADD_OF_PORTS([br0], [1], [10])
328 AT_CHECK([ovs-ofctl -O OpenFlow12 add-group br0 group_id=1234,type=indirect,bucket=output:10])
329 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=group:1234'])
330 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])
331 AT_CHECK([tail -1 stdout], [0],
332 [Datapath actions: 10
337 AT_SETUP([ofproto-dpif - group actions have no effect afterwards])
339 ADD_OF_PORTS([br0], [1], [10])
340 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'])
341 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=group:1234,output:10'])
342 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])
343 AT_CHECK([tail -1 stdout], [0],
344 [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
349 AT_SETUP([ofproto-dpif - all group in action set])
351 ADD_OF_PORTS([br0], [1], [10], [11])
352 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'])
353 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=write_actions(group:1234)'])
354 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])
355 # Must match on the source address to be able to restore it's value for
357 AT_CHECK([tail -2 stdout], [0],
358 [Megaflow: recirc_id=0,ip,in_port=1,nw_src=192.168.0.1,nw_frag=no
359 Datapath actions: set(ipv4(src=192.168.3.90)),10,set(ipv4(src=192.168.0.1)),11
364 AT_SETUP([ofproto-dpif - indirect group in action set])
366 ADD_OF_PORTS([br0], [1], [10])
367 AT_CHECK([ovs-ofctl -O OpenFlow12 add-group br0 group_id=1234,type=indirect,bucket=output:10])
368 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=write_actions(group:1234)'])
369 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])
370 AT_CHECK([tail -1 stdout], [0],
371 [Datapath actions: 10
376 AT_SETUP([ofproto-dpif - select group])
378 ADD_OF_PORTS([br0], [1], [10], [11])
379 AT_CHECK([ovs-ofctl -O OpenFlow12 add-group br0 'group_id=1234,type=select,bucket=output:10,bucket=output:11'])
380 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=write_actions(group:1234)'])
382 # Try a bunch of different flows and make sure that they get distributed
384 for d in 0 1 2 3 4 5 6 7 8 9 a b c d e f; do
385 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])
386 tail -1 stdout >> results
388 sort results | uniq -c
389 AT_CHECK([sort results | uniq], [0],
390 [Datapath actions: 10
396 AT_SETUP([ofproto-dpif - select group with watch port])
398 ADD_OF_PORTS([br0], [1], [10], [11])
399 AT_CHECK([ovs-ofctl -O OpenFlow12 add-group br0 'group_id=1234,type=select,bucket=watch_port:10,output:10,bucket=output:11'])
400 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=write_actions(group:1234)'])
401 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])
402 AT_CHECK([tail -1 stdout], [0],
403 [Datapath actions: 11
408 AT_SETUP([ofproto-dpif - select group with weight])
410 ADD_OF_PORTS([br0], [1], [10], [11], [12])
411 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'])
412 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=write_actions(group:1234)'])
413 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])
414 AT_CHECK([tail -1 stdout], [0],
415 [Datapath actions: 11
420 AT_SETUP([ofproto-dpif - select group with hash selection method])
422 ADD_OF_PORTS([br0], [1], [10], [11])
423 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'])
424 AT_CHECK([ovs-ofctl -O OpenFlow15 add-flow br0 'ip actions=write_actions(group:1234)'])
426 # Try a bunch of different flows and make sure that they get distributed
428 for d in 0 1 2 3 4 5 6 7 8 9 a b c d e f; do
429 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])
430 tail -1 stdout >> results
432 sort results | uniq -c
433 AT_CHECK([sort results | uniq], [0],
434 [Datapath actions: 10
439 # Try a bunch of different flows and make sure that they are not distributed
440 # as they only vary a field that is not hashed
441 for d in 0 1 2 3 4 5 6 7 8 9 a b c d e f; do
442 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])
443 tail -1 stdout >> results
445 sort results | uniq -c
446 AT_CHECK([sort results | uniq], [0],
447 [Datapath actions: 10
453 AT_SETUP([ofproto-dpif - fast failover group])
455 ADD_OF_PORTS([br0], [1], [10], [11])
456 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'])
457 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=write_actions(group:1234)'])
458 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])
459 AT_CHECK([tail -1 stdout], [0],
460 [Datapath actions: drop
465 AT_SETUP([ofproto-dpif - group stats single bucket])
467 ADD_OF_PORTS([br0], [1], [10], [11])
468 AT_CHECK([ovs-ofctl -O OpenFlow12 add-group br0 'group_id=1234,type=select,bucket=output:10,weight=2000,bucket=output:11,weight=0'])
469 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=write_actions(group:1234)'])
473 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)"
474 AT_CHECK([ovs-appctl netdev-dummy/receive p1 $pkt])
477 AT_CHECK([ovs-appctl revalidator/purge], [0])
478 AT_CHECK([ovs-ofctl -O OpenFlow12 -vwarn dump-group-stats br0], [0], [stdout])
479 AT_CHECK([STRIP_XIDS stdout | sort], [0], [dnl
480 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
481 OFPST_GROUP reply (OF1.2):
486 AT_SETUP([ofproto-dpif - group stats all buckets])
488 ADD_OF_PORTS([br0], [1], [10], [11])
489 AT_CHECK([ovs-ofctl -O OpenFlow12 add-group br0 'group_id=1234,type=all,bucket=output:10,bucket=output:11'])
490 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=write_actions(group:1234)'])
494 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)"
495 AT_CHECK([ovs-appctl netdev-dummy/receive p1 $pkt])
498 AT_CHECK([ovs-appctl revalidator/purge], [0])
499 AT_CHECK([ovs-ofctl -O OpenFlow12 -vwarn dump-group-stats br0], [0], [stdout])
500 AT_CHECK([STRIP_XIDS stdout | sort], [0], [dnl
501 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
502 OFPST_GROUP reply (OF1.2):
507 AT_SETUP([ofproto-dpif - registers])
509 ADD_OF_PORTS([br0], [20], [21], [22], [33], [90])
510 AT_DATA([flows.txt], [dnl
511 in_port=90 actions=resubmit:2,resubmit:3,resubmit:4,resubmit:91
512 in_port=91 actions=resubmit:5,resubmit:6,resubmit:7,resubmit:92
513 in_port=92 actions=resubmit:8,resubmit:9,resubmit:10,resubmit:11,resubmit:93
514 in_port=93 actions=resubmit:12,resubmit:13,resubmit:14,resubmit:15
516 in_port=2 actions=load:0x000db000->NXM_NX_REG0[[]]
517 in_port=3 actions=load:0xdea->NXM_NX_REG0[[20..31]]
518 in_port=4 actions=load:0xeef->NXM_NX_REG0[[0..11]]
519 in_port=5 actions=move:NXM_NX_REG0[[]]->NXM_NX_REG1[[]]
520 in_port=6 actions=load:0x22222222->NXM_NX_REG2[[]]
521 in_port=7 actions=move:NXM_NX_REG1[[20..31]]->NXM_NX_REG2[[0..11]]
522 in_port=8 actions=move:NXM_NX_REG1[[0..11]]->NXM_NX_REG2[[20..31]]
523 in_port=9,reg0=0xdeadbeef actions=output:20
524 in_port=10,reg1=0xdeadbeef actions=output:21
525 in_port=11,reg2=0xeef22dea actions=output:22
527 dnl Sanilty check all registers
528 in_port=12 actions=load:0x10->NXM_NX_REG0[[]],load:0x11->NXM_NX_REG1[[]],load:0x12->NXM_NX_REG2[[]]
529 in_port=13 actions=load:0x13->NXM_NX_REG3[[]],load:0x14->NXM_NX_REG4[[]],load:0x15->NXM_NX_REG5[[]]
530 in_port=14 actions=load:0x16->NXM_NX_REG6[[]],load:0x17->NXM_NX_REG7[[]]
531 in_port=15,reg0=0x10,reg1=0x11,reg2=0x12,reg3=0x13,reg4=0x14,reg5=0x15,reg6=0x16,reg7=0x17 actions=output:33
534 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
535 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])
536 AT_CHECK([tail -1 stdout], [0],
537 [Datapath actions: 20,21,22,33
542 dnl Tests that the standardized xregs are mapped onto the legacy OVS registers
543 dnl in the manner documented in ovs-ofctl(8).
544 AT_SETUP([ofproto-dpif - extended registers])
546 ADD_OF_PORTS([br0], [1], [2], [3])
547 AT_DATA([flows.txt], [dnl
548 table=0 actions=load:0xfedcba9876543210->OXM_OF_PKT_REG1[[]],resubmit(,1)
549 table=1,reg2=0xfedcba98,reg3=0x76543210 actions=2
551 # These low-priority rules shouldn't match. They're here only to make really
552 # sure that the test fails if either of the above rules fails to match.
553 table=0,priority=0 actions=3
554 table=1,priority=0 actions=3
556 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
557 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])
558 AT_CHECK([tail -1 stdout], [0], [Datapath actions: 2
563 AT_SETUP([ofproto-dpif - load and move order])
565 ADD_OF_PORTS([br0], [1], [10], [11])
566 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'])
567 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)'])
568 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])
569 AT_CHECK([tail -2 stdout], [0],
570 [Megaflow: recirc_id=0,ip,in_port=1,nw_src=192.168.0.1,nw_frag=no
571 Datapath actions: set(ipv4(src=255.255.255.255)),10,set(ipv4(src=192.168.0.1)),11
576 dnl Tests that 1.5 copy-field can copy into the standardized xregs.
577 AT_SETUP([ofproto-dpif - copy-field into extended registers])
579 ADD_OF_PORTS([br0], [1], [2], [3])
580 AT_DATA([flows.txt], [dnl
581 table=0 actions=move:OXM_OF_ETH_SRC[[0..47]]->OXM_OF_PKT_REG0[[0..47]],goto_table(1)
582 table=1,xreg0=0x0000505400000005 actions=2
584 # These low-priority rules shouldn't match. They're here only to make really
585 # sure that the test fails if either of the above rules fails to match.
586 table=0,priority=0 actions=3
587 table=1,priority=0 actions=3
589 AT_CHECK([ovs-ofctl -O OpenFlow15 add-flows br0 flows.txt])
590 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])
591 AT_CHECK([tail -1 stdout], [0], [Datapath actions: 2
596 dnl Tests that 1.5 set-field with mask in the metadata register.
597 AT_SETUP([ofproto-dpif - masked set-field into metadata])
599 ADD_OF_PORTS([br0], [1], [2], [3])
600 AT_DATA([flows.txt], [dnl
601 table=0 actions=set_field:0xfafafafa5a5a5a5a->metadata,goto_table(1)
602 table=1 actions=set_field:0x6b/0xff->metadata,goto_table(2)
603 table=2,metadata=0xfafafafa5a5a5a6b actions=2
605 # These low-priority rules shouldn't match. They're here only to make really
606 # sure that the test fails if either of the above rules fails to match.
607 table=0,priority=0 actions=3
608 table=1,priority=0 actions=3
609 table=2,priority=0 actions=3
611 AT_CHECK([ovs-ofctl -O OpenFlow15 add-flows br0 flows.txt])
612 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])
613 AT_CHECK([tail -1 stdout], [0], [Datapath actions: 2
619 AT_SETUP([ofproto-dpif - actset_output])
622 [br0], [1], [2], [3], [4], [5], [6], [7], [8], [9], [10], [11], [12], [13])
623 AT_DATA([flows.txt], [dnl
624 table=0,actset_output=unset actions=write_actions(output(2)),goto_table(1)
625 table=1 actions=move:ONFOXM_ET_ACTSET_OUTPUT[[0..31]]->OXM_OF_PKT_REG0[[0..31]],goto_table(2)
627 # Verify that actset_output got set.
628 table=2,priority=20,actset_output=2 actions=4,goto_table(3)
629 table=2,priority=10 actions=5,goto_table(3)
631 # Verify that xreg0 got copied properly from actset_output.
632 table=3,priority=20,xreg0=2 actions=6,goto_table(4)
633 table=3,priority=10 actions=7,goto_table(4)
635 # Verify that adding a group action unsets actset_output.
636 table=4 actions=write_actions(group(5)),goto_table(5)
637 table=5,priority=20,actset_output=unset actions=8,goto_table(6)
638 table=5,priority=10 actions=9,goto_table(6)
640 # Verify that adding another output action doesn't change actset_output
641 # (since there's still a group).
642 table=6 actions=write_actions(output(3)),goto_table(7)
643 table=7,priority=20,actset_output=unset actions=10,goto_table(8)
644 table=7,priority=10 actions=11,goto_table(8)
646 # Verify that clearing the action set, then writing an output action,
647 # causes actset_output to be set again.
648 table=8,actions=clear_actions,write_actions(output(3),output(2)),goto_table(9)
649 table=9,priority=20,actset_output=2 actions=12
650 table=9,priority=10 actions=13
652 AT_CHECK([ovs-ofctl -O OpenFlow13 add-flows br0 flows.txt])
653 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])
654 AT_CHECK([tail -1 stdout], [0], [Datapath actions: 4,6,8,10,12,2
658 AT_SETUP([ofproto-dpif - push-pop])
660 ADD_OF_PORTS([br0], [20], [21], [22], [33], [90])
661 AT_DATA([flows.txt], [dnl
662 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
663 in_port=2 actions=pop:NXM_NX_REG0[[0..7]],output:NXM_NX_REG0[[]]
664 in_port=3 actions=pop:NXM_NX_REG1[[0..7]],output:NXM_NX_REG1[[]]
665 in_port=4 actions=pop:NXM_NX_REG2[[0..15]],output:NXM_NX_REG2[[]]
666 in_port=5 actions=pop:NXM_NX_REG3[[]],output:NXM_NX_REG3[[]]
669 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
670 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])
671 AT_CHECK([tail -1 stdout], [0],
672 [Datapath actions: 33,22,21,20
677 AT_SETUP([ofproto-dpif - output])
679 ADD_OF_PORTS([br0], [1], [9], [10], [11], [55], [66], [77], [88])
680 AT_DATA([flows.txt], [dnl
681 in_port=1 actions=resubmit:2,resubmit:3,resubmit:4,resubmit:5,resubmit:6,resubmit:7,resubmit:8
682 in_port=2 actions=output:9
683 in_port=3 actions=load:55->NXM_NX_REG0[[]],output:NXM_NX_REG0[[]],load:66->NXM_NX_REG1[[]]
684 in_port=4 actions=output:10,output:NXM_NX_REG0[[]],output:NXM_NX_REG1[[]],output:11
685 in_port=5 actions=load:77->NXM_NX_REG0[[0..15]],load:88->NXM_NX_REG0[[16..31]]
686 in_port=6 actions=output:NXM_NX_REG0[[0..15]],output:NXM_NX_REG0[[16..31]]
687 in_port=7 actions=load:0x110000ff->NXM_NX_REG0[[]],output:NXM_NX_REG0[[]]
688 in_port=8 actions=1,9,load:9->NXM_OF_IN_PORT[[]],1,9
690 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
691 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])
692 AT_CHECK([tail -1 stdout], [0],
693 [Datapath actions: 9,55,10,55,66,11,77,88,9,1
698 AT_SETUP([ofproto-dpif - dec_ttl])
700 ADD_OF_PORTS([br0], [1], [2], [3], [4])
701 AT_DATA([flows.txt], [dnl
702 table=0 in_port=1 action=dec_ttl,output:2,resubmit(1,1),output:4
703 table=1 in_port=1 action=dec_ttl,output:3
705 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
706 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])
707 AT_CHECK([tail -4 stdout], [0],
708 [Megaflow: recirc_id=0,ip,in_port=1,nw_ttl=2,nw_frag=no
709 Datapath actions: set(ipv4(ttl=1)),2,4
710 This flow is handled by the userspace slow path because it:
711 - Sends "packet-in" messages to the OpenFlow controller.
713 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])
714 AT_CHECK([tail -2 stdout], [0],
715 [Megaflow: recirc_id=0,ip,in_port=1,nw_ttl=3,nw_frag=no
716 Datapath actions: set(ipv4(ttl=2)),2,set(ipv4(ttl=1)),3,4
718 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])
719 AT_CHECK([tail -2 stdout], [0],
720 [Megaflow: recirc_id=0,ipv6,in_port=1,nw_ttl=128,nw_frag=no
721 Datapath actions: set(ipv6(hlimit=127)),2,set(ipv6(hlimit=126)),3,4
724 AT_CAPTURE_FILE([ofctl_monitor.log])
725 AT_CHECK([ovs-ofctl monitor br0 65534 invalid_ttl --detach --no-chdir --pidfile 2> ofctl_monitor.log])
726 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])
727 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
728 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
729 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=34 in_port=1 (via invalid_ttl) data_len=34 (unbuffered)
730 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
735 dnl A dec_ttl action at offset 32 in ofpacts will cause the ofpacts
736 dnl buffer to be resized just before pushing the id of the dec_ttl action.
737 dnl Thus the implementation must account for this by using the
738 dnl reallocated buffer rather than the original buffer.
740 dnl A number of similar rules are added to try and exercise
741 dnl xrealloc sufficiently that it returns a different base pointer
742 AT_SETUP([ofproto-dpif - dec_ttl without arguments at offset 32 in ofpacts])
744 ADD_OF_PORTS([br0], [1])
745 (for i in `seq 0 255`; do
746 printf "dl_src=10:11:11:11:11:%02x actions=output:1,output:1,output:1,dec_ttl,controller\n" $i
748 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
752 dnl A dec_ttl action at offset 32 in ofpacts will cause the ofpacts
753 dnl buffer to be resized just before pushing the id of the dec_ttl action.
754 dnl Thus the implementation must account for this by using the
755 dnl reallocated buffer rather than the original buffer.
757 dnl A number of similar rules are added to try and exercise
758 dnl xrealloc sufficiently that it returns a different base pointer
759 AT_SETUP([ofproto-dpif - dec_ttl with arguments at offset 32 in ofpacts])
761 ADD_OF_PORTS([br0], [1])
762 (for i in `seq 0 255`; do
763 printf "dl_src=10:11:11:11:11:%02x actions=output:1,output:1,output:1,dec_ttl(1),controller\n" $i
765 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
769 dnl A note action at offset 24 in ofpacts will cause the ofpacts
770 dnl buffer to be resized just before pushing the id of the dec_ttl action.
771 dnl Thus the implementation must account for this by using the
772 dnl reallocated buffer rather than the original buffer.
774 dnl A number of similar rules are added to try and exercise
775 dnl xrealloc sufficiently that it returns a different base pointer
776 AT_SETUP([ofproto-dpif - note at offset 24 in ofpacts])
778 ADD_OF_PORTS([br0], [1])
779 (for i in `seq 0 255`; do
780 printf "dl_src=10:11:11:11:11:%02x actions=output:1,output:1,note:ff,controller\n" $i
782 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
786 AT_SETUP([ofproto-dpif - output, OFPP_NONE ingress port])
788 ADD_OF_PORTS([br0], [1], [2])
790 AT_CHECK([ovs-ofctl add-flow br0 action=normal])
792 # "in_port" defaults to OFPP_NONE if it's not specified.
793 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"
794 AT_CHECK([ovs-appctl ofproto/trace br0 "$flow"], [0], [stdout])
795 AT_CHECK([tail -1 stdout | sed 's/Datapath actions: //' | tr "," "\n" | sort -n], [0], [dnl
804 AT_SETUP([ofproto-dpif - DSCP])
805 OVS_VSWITCHD_START([add-port br0 p1 -- set Interface p1 type=dummy])
806 ADD_OF_PORTS([br0], [9])
807 AT_DATA([flows.txt], [dnl
808 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
810 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
811 AT_CHECK([ovs-vsctl -- \
812 set Port p1 qos=@newqos --\
813 --id=@newqos create QoS type=linux-htb queues=1=@q1,2=@q2 --\
814 --id=@q1 create Queue dscp=1 --\
815 --id=@q2 create Queue dscp=2], [0], [ignore])
816 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])
817 AT_CHECK([tail -2 stdout], [0],
818 [Megaflow: recirc_id=0,skb_priority=0,ip,in_port=9,nw_tos=252,nw_frag=no
819 Datapath actions: dnl
821 set(ipv4(tos=0x4/0xfc)),set(skb_priority(0x1)),1,dnl
822 set(ipv4(tos=0x8/0xfc)),set(skb_priority(0x2)),1,dnl
824 set(ipv4(tos=0x4/0xfc)),set(skb_priority(0x1)),1,dnl
825 set(ipv4(tos=0xfc/0xfc)),set(skb_priority(0)),1,dnl
826 set(ipv4(tos=0/0xfc)),1,100
831 AT_SETUP([ofproto-dpif - output/flood flags])
833 ADD_OF_PORTS([br0], [1], [2], [3], [4], [5], [6], [7])
835 AT_DATA([flows.txt], [dnl
836 in_port=local actions=local,flood
837 in_port=1 actions=flood
838 in_port=2 actions=all
839 in_port=3 actions=output:LOCAL,output:1,output:2,output:3,output:4,output:5,output:6,output:7
840 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
842 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
843 AT_CHECK([ovs-ofctl mod-port br0 5 noforward])
844 AT_CHECK([ovs-ofctl mod-port br0 6 noflood])
846 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])
847 AT_CHECK([tail -1 stdout \
848 | sed -e 's/Datapath actions: //' | tr ',' '\n' | sort], [0], [dnl
856 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])
857 AT_CHECK([tail -1 stdout \
858 | sed -e 's/Datapath actions: //' | tr ',' '\n' | sort], [0], [dnl
866 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])
867 AT_CHECK([tail -1 stdout \
868 | sed -e 's/Datapath actions: //' | tr ',' '\n' | sort], [0], [dnl
877 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])
878 AT_CHECK([tail -1 stdout], [0],
879 [Datapath actions: 100,1,2,4,6,7
882 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])
883 AT_CHECK([tail -1 stdout], [0],
884 [Datapath actions: set(skb_priority(0x1)),100,1,2,set(skb_priority(0x2)),3,set(skb_priority(0x1)),6,7
889 AT_SETUP([ofproto-dpif - Default Table Miss - OF1.0 (OFPTC_TABLE_MISS_CONTROLLER)])
890 OVS_VSWITCHD_START([dnl
891 add-port br0 p1 -- set Interface p1 type=dummy
893 ON_EXIT([kill `cat ovs-ofctl.pid`])
895 AT_CAPTURE_FILE([ofctl_monitor.log])
897 AT_CHECK([ovs-ofctl monitor br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
900 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)'
902 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
903 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
904 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
905 NXT_PACKET_IN (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
906 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
908 NXT_PACKET_IN (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
909 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
911 NXT_PACKET_IN (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
912 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
915 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
916 AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
923 AT_SETUP([ofproto-dpif - Default Table Miss - OF1.3 (OFPTC_TABLE_MISS_DROP)])
924 OVS_VSWITCHD_START([dnl
925 add-port br0 p1 -- set Interface p1 type=dummy
927 ON_EXIT([kill `cat ovs-ofctl.pid`])
929 AT_CAPTURE_FILE([ofctl_monitor.log])
930 AT_CHECK([ovs-ofctl del-flows br0])
932 AT_CHECK([ovs-ofctl monitor -OOpenFlow13 -P openflow10 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
934 dnl Test that missed packets are droped
936 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)'
938 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
940 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
943 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
944 AT_CHECK([ovs-ofctl -OOpenFlow13 dump-flows br0 | ofctl_strip | sort], [0], [dnl
945 OFPST_FLOW reply (OF1.3):
951 AT_SETUP([ofproto-dpif - Table Miss - goto table and OFPTC_TABLE_MISS_CONTROLLER])
952 OVS_VSWITCHD_START([dnl
953 add-port br0 p1 -- set Interface p1 type=dummy
955 ON_EXIT([kill `cat ovs-ofctl.pid`])
957 AT_CAPTURE_FILE([ofctl_monitor.log])
958 AT_CHECK([ovs-ofctl -OOpenFlow12 add-flow br0 'table=0 actions=goto_table(1)'])
960 AT_CHECK([ovs-ofctl monitor -P openflow10 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
963 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)'
965 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
966 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
967 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
968 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
969 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
971 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
972 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
974 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
975 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
978 AT_CHECK([ovs-appctl revalidator/purge], [0])
979 AT_CHECK([ovs-ofctl -OOpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
980 n_packets=3, n_bytes=180, actions=goto_table:1
981 OFPST_FLOW reply (OF1.2):
987 AT_SETUP([ofproto-dpif - Table Miss - resubmit and OFPTC_TABLE_MISS_CONTROLLER])
988 OVS_VSWITCHD_START([dnl
989 add-port br0 p1 -- set Interface p1 type=dummy
991 ON_EXIT([kill `cat ovs-ofctl.pid`])
993 AT_CAPTURE_FILE([ofctl_monitor.log])
994 AT_CHECK([ovs-ofctl -OOpenFlow12 add-flow br0 'table=0 actions=resubmit(1,1)'])
996 AT_CHECK([ovs-ofctl monitor -P openflow10 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
999 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)'
1002 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
1003 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1006 AT_CHECK([ovs-appctl revalidator/purge], [0])
1007 AT_CHECK([ovs-ofctl -OOpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
1008 n_packets=3, n_bytes=180, actions=resubmit(1,1)
1009 OFPST_FLOW reply (OF1.2):
1015 AT_SETUP([ofproto-dpif - Table Miss - OFPTC_TABLE_MISS_CONTINUE])
1016 OVS_VSWITCHD_START([dnl
1017 add-port br0 p1 -- set Interface p1 type=dummy
1019 ON_EXIT([kill `cat ovs-ofctl.pid`])
1021 AT_CAPTURE_FILE([ofctl_monitor.log])
1022 AT_CHECK([ovs-ofctl add-flow br0 'table=1 dl_src=10:11:11:11:11:11 actions=controller'])
1023 AT_CHECK([ovs-ofctl -OOpenFlow11 mod-table br0 all continue])
1025 dnl Miss table 0, Hit table 1
1026 AT_CHECK([ovs-ofctl monitor br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1029 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)'
1031 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1032 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
1034 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1035 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1036 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
1038 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1039 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
1041 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1042 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
1045 dnl Hit table 0, Miss all other tables, sent to controller
1046 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1049 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)'
1051 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1052 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
1054 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1055 NXT_PACKET_IN (xid=0x0): table_id=253 cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
1056 tcp,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=9,tcp_flags=ack tcp_csum:0
1058 NXT_PACKET_IN (xid=0x0): table_id=253 cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
1059 tcp,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
1061 NXT_PACKET_IN (xid=0x0): table_id=253 cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
1062 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
1065 AT_CHECK([ovs-appctl revalidator/purge], [0])
1066 AT_CHECK([ovs-ofctl -OOpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
1067 table=1, n_packets=3, n_bytes=180, dl_src=10:11:11:11:11:11 actions=CONTROLLER:65535
1068 OFPST_FLOW reply (OF1.2):
1074 AT_SETUP([ofproto-dpif - Table Miss - goto table and OFPTC_TABLE_MISS_CONTINUE])
1075 OVS_VSWITCHD_START([dnl
1076 add-port br0 p1 -- set Interface p1 type=dummy
1078 ON_EXIT([kill `cat ovs-ofctl.pid`])
1080 AT_CAPTURE_FILE([ofctl_monitor.log])
1081 AT_DATA([flows.txt], [dnl
1082 table=0 actions=goto_table(1)
1083 table=2 dl_src=10:11:11:11:11:11 actions=controller
1085 AT_CHECK([ovs-ofctl -OOpenFlow12 add-flows br0 flows.txt])
1086 AT_CHECK([ovs-ofctl -OOpenFlow11 mod-table br0 all continue])
1088 dnl Hit table 0, Miss table 1, Hit table 2
1089 AT_CHECK([ovs-ofctl monitor br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1092 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)'
1094 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1095 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1097 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1098 NXT_PACKET_IN (xid=0x0): table_id=2 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1099 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
1101 NXT_PACKET_IN (xid=0x0): table_id=2 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1102 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
1104 NXT_PACKET_IN (xid=0x0): table_id=2 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1105 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
1108 dnl Hit table 1, Miss all other tables, sent to controller
1109 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1112 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)'
1114 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1115 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
1117 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1118 NXT_PACKET_IN (xid=0x0): table_id=253 cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
1119 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
1121 NXT_PACKET_IN (xid=0x0): table_id=253 cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
1122 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
1124 NXT_PACKET_IN (xid=0x0): table_id=253 cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
1125 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
1128 AT_CHECK([ovs-appctl revalidator/purge], [0])
1129 AT_CHECK([ovs-ofctl -OOpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
1130 n_packets=6, n_bytes=360, actions=goto_table:1
1131 table=2, n_packets=3, n_bytes=180, dl_src=10:11:11:11:11:11 actions=CONTROLLER:65535
1132 OFPST_FLOW reply (OF1.2):
1138 AT_SETUP([ofproto-dpif - Table Miss - resubmit and OFPTC_TABLE_MISS_CONTINUE])
1139 OVS_VSWITCHD_START([dnl
1140 add-port br0 p1 -- set Interface p1 type=dummy
1142 ON_EXIT([kill `cat ovs-ofctl.pid`])
1144 AT_CAPTURE_FILE([ofctl_monitor.log])
1145 AT_DATA([flows.txt], [dnl
1146 table=0 actions=resubmit(1,1)
1147 table=2 dl_src=10:11:11:11:11:11 actions=controller
1149 AT_CHECK([ovs-ofctl -OOpenFlow12 add-flows br0 flows.txt])
1150 AT_CHECK([ovs-ofctl -OOpenFlow11 mod-table br0 all continue])
1152 dnl Hit table 0, Miss table 1, Dropped
1153 AT_CHECK([ovs-ofctl monitor br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1156 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)'
1158 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1160 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1163 dnl Hit table 1, Dropped
1164 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1167 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)'
1169 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
1171 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1174 AT_CHECK([ovs-appctl revalidator/purge], [0])
1175 AT_CHECK([ovs-ofctl -OOpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
1176 n_packets=6, n_bytes=360, actions=resubmit(1,1)
1177 table=2, dl_src=10:11:11:11:11:11 actions=CONTROLLER:65535
1178 OFPST_FLOW reply (OF1.2):
1184 AT_SETUP([ofproto-dpif - Table Miss - OFPTC_TABLE_MISS_DROP])
1185 OVS_VSWITCHD_START([dnl
1186 add-port br0 p1 -- set Interface p1 type=dummy
1188 ON_EXIT([kill `cat ovs-ofctl.pid`])
1190 AT_CAPTURE_FILE([ofctl_monitor.log])
1191 AT_CHECK([ovs-ofctl -OOpenFlow11 mod-table br0 all drop])
1193 AT_CHECK([ovs-ofctl monitor -P openflow10 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1195 dnl Test that missed packets are droped
1197 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)'
1199 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
1201 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1204 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1205 AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
1212 AT_SETUP([ofproto-dpif - Table Miss - goto table and OFPTC_TABLE_MISS_DROP])
1213 OVS_VSWITCHD_START([dnl
1214 add-port br0 p1 -- set Interface p1 type=dummy
1216 ON_EXIT([kill `cat ovs-ofctl.pid`])
1218 AT_CAPTURE_FILE([ofctl_monitor.log])
1219 AT_CHECK([ovs-ofctl del-flows br0])
1220 AT_CHECK([ovs-ofctl -OOpenFlow12 add-flow br0 'table=0 actions=goto_table(1)'])
1221 AT_CHECK([ovs-ofctl -OOpenFlow11 mod-table br0 all drop])
1223 AT_CHECK([ovs-ofctl monitor -P openflow10 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1225 dnl Test that missed packets are droped
1227 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)'
1229 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
1231 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1234 AT_CHECK([ovs-appctl revalidator/purge], [0])
1235 AT_CHECK([ovs-ofctl -OOpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
1236 n_packets=3, n_bytes=180, actions=goto_table:1
1237 OFPST_FLOW reply (OF1.2):
1243 AT_SETUP([ofproto-dpif - Table Miss - resubmit and OFPTC_TABLE_MISS_DROP])
1244 OVS_VSWITCHD_START([dnl
1245 add-port br0 p1 -- set Interface p1 type=dummy
1247 ON_EXIT([kill `cat ovs-ofctl.pid`])
1249 AT_CAPTURE_FILE([ofctl_monitor.log])
1250 AT_CHECK([ovs-ofctl del-flows br0])
1251 AT_CHECK([ovs-ofctl -OOpenFlow12 add-flow br0 'table=0 actions=resubmit(1,1)'])
1252 AT_CHECK([ovs-ofctl -OOpenFlow11 mod-table br0 all drop])
1254 AT_CHECK([ovs-ofctl monitor -P openflow10 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1256 dnl Test that missed packets are droped
1258 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)'
1260 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
1262 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1265 AT_CHECK([ovs-appctl revalidator/purge], [0])
1266 AT_CHECK([ovs-ofctl -OOpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
1267 n_packets=3, n_bytes=180, actions=resubmit(1,1)
1268 OFPST_FLOW reply (OF1.2):
1274 AT_SETUP([ofproto-dpif - controller])
1275 OVS_VSWITCHD_START([dnl
1276 add-port br0 p1 -- set Interface p1 type=dummy
1278 ON_EXIT([kill `cat ovs-ofctl.pid`])
1280 AT_CAPTURE_FILE([ofctl_monitor.log])
1281 AT_DATA([flows.txt], [dnl
1282 cookie=0x0 dl_src=10:11:11:11:11:11 actions=controller
1283 cookie=0x1 dl_src=20:22:22:22:22:22 actions=controller,resubmit(80,1)
1284 cookie=0x2 dl_src=30:33:33:33:33:33 actions=mod_vlan_vid:15,controller
1286 cookie=0x3 table=1 in_port=80 actions=load:1->NXM_NX_REG0[[]],mod_vlan_vid:80,controller,resubmit(81,2)
1287 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)
1288 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)
1289 cookie=0x6 table=4 in_port=83 actions=load:4->NXM_NX_REG3[[]],mod_nw_src:83.83.83.83,controller,resubmit(84,5)
1290 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)
1291 cookie=0x8 table=6 in_port=85 actions=mod_tp_src:85,controller,resubmit(86,7)
1292 cookie=0x9 table=7 in_port=86 actions=mod_tp_dst:86,controller,controller
1293 cookie=0xa dl_src=40:44:44:44:44:41 actions=mod_vlan_vid:99,mod_vlan_pcp:1,controller
1294 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
1296 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
1299 AT_CHECK([ovs-ofctl monitor -P openflow10 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1302 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)'
1304 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1305 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1307 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1308 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
1309 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
1311 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
1312 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
1314 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
1315 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
1318 dnl Singleton controller action.
1319 AT_CHECK([ovs-ofctl monitor -P openflow10 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1322 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)'
1324 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1325 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1327 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1328 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1329 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
1331 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1332 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
1334 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1335 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
1338 dnl Modified controller action.
1339 AT_CHECK([ovs-ofctl monitor -P openflow10 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1342 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)'
1344 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1345 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1347 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1348 OFPT_PACKET_IN (xid=0x0): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1349 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
1351 OFPT_PACKET_IN (xid=0x0): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1352 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
1354 OFPT_PACKET_IN (xid=0x0): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1355 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
1358 dnl Modified VLAN controller action.
1359 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1362 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)'
1364 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1365 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1367 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1368 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1369 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
1371 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1372 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
1374 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1375 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
1379 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1382 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)'
1384 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 18])
1385 ovs-appctl -t ovs-ofctl exit
1387 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1388 NXT_PACKET_IN (xid=0x0): cookie=0x1 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1389 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
1391 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x3 total_len=64 reg0=0x1,in_port=1 (via action) data_len=64 (unbuffered)
1392 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
1394 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)
1395 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
1397 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)
1398 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
1400 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)
1401 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
1403 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)
1404 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
1406 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)
1407 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
1409 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)
1410 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
1412 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)
1413 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
1417 AT_CHECK([ovs-ofctl monitor br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1420 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'
1422 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 18])
1423 ovs-appctl -t ovs-ofctl exit
1425 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1426 NXT_PACKET_IN (xid=0x0): cookie=0x1 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1427 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
1429 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x3 total_len=64 reg0=0x1,in_port=1 (via action) data_len=64 (unbuffered)
1430 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
1432 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)
1433 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
1435 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)
1436 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
1438 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)
1439 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
1441 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)
1442 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
1444 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)
1445 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
1447 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)
1448 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
1450 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)
1451 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
1454 dnl Modified ARP controller action.
1455 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1458 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)'
1461 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 18])
1462 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
1463 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1464 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1465 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
1466 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1467 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
1468 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1469 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
1470 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1471 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
1472 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1473 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
1474 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1475 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
1476 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1477 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
1478 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1479 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
1480 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1481 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
1484 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1487 AT_CHECK([ovs-ofctl monitor br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1490 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'
1493 AT_CHECK([ovs-appctl time/warp 1000], [0], [ignore])
1494 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 18])
1495 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
1496 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1497 NXT_PACKET_IN (xid=0x0): cookie=0x1 total_len=98 in_port=1 (via action) data_len=98 (unbuffered)
1498 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
1500 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x3 total_len=102 reg0=0x1,in_port=1 (via action) data_len=102 (unbuffered)
1501 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
1503 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)
1504 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
1506 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)
1507 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
1509 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)
1510 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
1512 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)
1513 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
1515 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)
1516 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
1518 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)
1519 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
1521 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)
1522 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
1525 AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
1526 cookie=0x1, n_packets=3, n_bytes=218, dl_src=20:22:22:22:22:22 actions=CONTROLLER:65535,resubmit(80,1)
1527 cookie=0x2, n_packets=3, n_bytes=180, dl_src=30:33:33:33:33:33 actions=mod_vlan_vid:15,CONTROLLER:65535
1528 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)
1529 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)
1530 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)
1531 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)
1532 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)
1533 cookie=0x8, table=6, n_packets=3, n_bytes=218, in_port=85 actions=mod_tp_src:85,CONTROLLER:65535,resubmit(86,7)
1534 cookie=0x9, table=7, n_packets=3, n_bytes=218, in_port=86 actions=mod_tp_dst:86,CONTROLLER:65535,CONTROLLER:65535
1535 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
1536 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
1537 n_packets=3, n_bytes=180, dl_src=10:11:11:11:11:11 actions=CONTROLLER:65535
1544 AT_SETUP([ofproto-dpif - MPLS handling])
1545 OVS_VSWITCHD_START([dnl
1546 add-port br0 p1 -- set Interface p1 type=dummy
1548 ON_EXIT([kill `cat ovs-ofctl.pid`])
1550 AT_CAPTURE_FILE([ofctl_monitor.log])
1551 AT_DATA([flows.txt], [dnl
1552 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
1553 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
1554 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
1555 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
1556 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
1557 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
1558 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
1559 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
1560 cookie=0xa mpls,dl_src=40:44:44:44:44:49 actions=push_mpls:0x8848,load:10->OXM_OF_MPLS_LABEL[[]],CONTROLLER:65535
1561 cookie=0xb dl_src=50:55:55:55:55:55 dl_type=0x8847 actions=load:1000->OXM_OF_MPLS_LABEL[[]],controller
1562 cookie=0xd dl_src=60:66:66:66:66:66 actions=pop_mpls:0x0800,controller
1563 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
1565 cookie=0xd dl_src=60:66:66:66:00:01 actions=pop_mpls:0x0800,dec_ttl,controller
1566 cookie=0xd dl_src=60:66:66:66:00:02 actions=pop_mpls:0x0800,load:0xa000001->OXM_OF_IPV4_DST[[]],controller
1567 cookie=0xd dl_src=60:66:66:66:00:03 actions=pop_mpls:0x0800,move:OXM_OF_IPV4_DST[[]]->OXM_OF_IPV4_SRC[[]],controller
1568 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
1569 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
1570 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
1571 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
1573 cookie=0xd dl_src=60:66:66:66:00:08 actions=pop_mpls:0x0806,resubmit(1,1)
1574 cookie=0xd table=1 arp actions=controller
1576 cookie=0xdeadbeef table=2 dl_src=60:66:66:66:00:09 actions=pop_mpls:0x0800,mod_nw_tos:48
1577 cookie=0xd dl_src=60:66:66:66:00:09 actions=resubmit(,2),controller
1578 cookie=0xd dl_src=60:66:66:66:00:0a actions=pop_mpls:0x0800,mod_nw_dst:10.0.0.1,controller
1579 cookie=0xd dl_src=60:66:66:66:00:0b actions=pop_mpls:0x0800,mod_nw_src:10.0.0.1,controller
1581 cookie=0xd dl_src=60:66:66:66:01:00 actions=pop_mpls:0x8848,controller
1582 cookie=0xd dl_src=60:66:66:66:01:01 actions=pop_mpls:0x8847,dec_mpls_ttl,controller
1583 cookie=0xd dl_src=60:66:66:66:01:02 actions=pop_mpls:0x8848,load:3->OXM_OF_MPLS_TC[[]],controller
1585 cookie=0xd dl_src=60:66:66:66:02:00 actions=pop_mpls:0x8847,pop_mpls:0x0800,controller
1586 cookie=0xe dl_src=60:66:66:66:02:01 actions=pop_mpls:0x8848,pop_mpls:0x0800,dec_ttl,controller
1587 cookie=0xe dl_src=60:66:66:66:02:10 actions=pop_mpls:0x8847,dec_mpls_ttl,pop_mpls:0x0800,dec_ttl,controller
1589 cookie=0xe dl_src=60:66:66:66:03:00 actions=pop_mpls:0x8848,pop_mpls:0x8848,controller
1590 cookie=0xe dl_src=60:66:66:66:03:01 actions=pop_mpls:0x8847,pop_mpls:0x8847,dec_mpls_ttl,controller
1591 cookie=0xe dl_src=60:66:66:66:03:10 actions=pop_mpls:0x8848,dec_mpls_ttl,pop_mpls:0x8848,dec_mpls_ttl,controller
1593 cookie=0xf dl_src=60:66:66:66:04:00 actions=pop_mpls:0x0800,push_mpls:0x8847,controller
1594 cookie=0xf dl_src=60:66:66:66:04:01 actions=pop_mpls:0x0800,push_mpls:0x8848,dec_mpls_ttl,controller
1595 cookie=0xf dl_src=60:66:66:66:04:10 actions=pop_mpls:0x0800,dec_ttl,push_mpls:0x8848,dec_mpls_ttl,controller
1597 cookie=0x5 dl_src=60:66:66:66:05:00 actions=push_mpls:0x8848,pop_mpls:0x8847,controller
1598 cookie=0x5 dl_src=60:66:66:66:05:01 actions=push_mpls:0x8847,pop_mpls:0x8848,dec_mpls_ttl,controller
1599 cookie=0x5 dl_src=60:66:66:66:05:10 actions=push_mpls:0x8848,dec_mpls_ttl,pop_mpls:0x8847,dec_mpls_ttl,controller
1601 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
1603 dnl Modified MPLS controller action.
1604 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1607 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)'
1609 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1610 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1612 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1613 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1614 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
1616 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1617 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
1619 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1620 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
1623 dnl Modified MPLS controller action.
1624 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1627 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)'
1629 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1630 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1632 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1633 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1634 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
1636 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1637 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
1639 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1640 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
1643 dnl Modified MPLS controller action.
1644 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1646 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)
1649 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)'
1651 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1652 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1654 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1655 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1656 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
1658 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1659 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
1661 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1662 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
1665 dnl Modified MPLS controller action.
1666 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1669 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))'
1671 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1672 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1674 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1675 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1676 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
1678 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1679 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
1681 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1682 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
1685 dnl Modified MPLS controller action.
1686 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1689 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)'
1691 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1692 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1694 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1695 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1696 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
1698 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1699 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
1701 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1702 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
1705 dnl Modified MPLS controller action.
1706 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1709 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)'
1711 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1712 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1714 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1715 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1716 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
1718 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1719 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
1721 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1722 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
1725 dnl Modified MPLS controller action.
1726 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1729 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)'
1731 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1732 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1734 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1735 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1736 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
1738 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1739 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
1741 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1742 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
1745 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1747 dnl Modified MPLS controller action.
1748 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1751 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)'
1753 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1754 ovs-appctl -t ovs-ofctl exit
1756 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1757 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1758 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
1760 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1761 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
1763 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1764 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
1767 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1769 dnl Modified MPLS controller action.
1770 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1773 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)'
1775 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1776 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1778 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1779 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1780 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
1782 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1783 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
1785 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1786 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
1789 dnl Modified MPLS actions.
1790 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1793 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)'
1795 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1796 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1798 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1799 NXT_PACKET_IN (xid=0x0): cookie=0xb total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1800 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
1802 NXT_PACKET_IN (xid=0x0): cookie=0xb total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1803 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
1805 NXT_PACKET_IN (xid=0x0): cookie=0xb total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1806 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
1809 dnl Modified MPLS ipv6 controller action.
1810 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1813 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)'
1815 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1816 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1818 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1819 NXT_PACKET_IN (xid=0x0): cookie=0xc total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1820 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
1822 NXT_PACKET_IN (xid=0x0): cookie=0xc total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1823 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
1825 NXT_PACKET_IN (xid=0x0): cookie=0xc total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1826 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
1830 dnl Modified MPLS pop action.
1831 dnl The input is a frame with two MPLS headers which tcpdump -vve shows as:
1832 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)
1833 dnl (tos 0x0, ttl 64, id 0, offset 0, flags [none], proto TCP (6), length 44)
1835 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1838 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'
1841 # 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)'
1843 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1844 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1846 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1847 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1848 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
1850 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1851 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
1853 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1854 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
1857 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1859 dnl Modified MPLS pop action.
1860 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
1861 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)
1862 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
1863 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
1864 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1867 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'
1869 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1870 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1872 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
1873 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1874 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
1876 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1877 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
1879 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1880 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
1883 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1885 dnl Modified MPLS pop action.
1886 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
1887 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)
1888 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
1889 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
1890 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1893 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'
1895 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1896 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1898 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
1899 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1900 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
1902 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1903 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
1905 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1906 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
1909 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1911 dnl Modified MPLS pop action.
1912 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
1913 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)
1914 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
1915 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
1916 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1919 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'
1921 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1922 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1924 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
1925 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1926 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
1928 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1929 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
1931 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1932 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
1935 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1937 dnl Modified MPLS pop action.
1938 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
1939 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)
1940 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
1941 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
1942 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1945 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'
1947 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1948 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1950 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
1951 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1952 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
1954 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1955 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
1957 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1958 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
1961 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1963 dnl Modified MPLS pop action.
1964 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
1965 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)
1966 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
1967 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
1968 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1971 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'
1973 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1974 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1976 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
1977 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1978 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
1980 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1981 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
1983 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1984 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
1987 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1989 dnl Modified MPLS pop action.
1990 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
1991 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)
1992 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
1993 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
1994 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1997 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'
1999 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2000 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2002 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
2003 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2004 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
2006 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2007 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
2009 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2010 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
2013 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2015 dnl Modified MPLS pop action.
2016 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
2017 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)
2018 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
2019 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
2020 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2023 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'
2025 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2026 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2028 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
2029 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2030 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
2032 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2033 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
2035 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2036 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
2039 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2041 dnl Modified MPLS pop action.
2042 dnl The input is an ARP frame with a single MPLS label stack entry which tcpdump -vve shows as:
2043 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)
2044 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2047 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'
2049 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2050 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2052 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
2053 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0xd total_len=56 in_port=1 (via action) data_len=56 (unbuffered)
2054 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
2056 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0xd total_len=56 in_port=1 (via action) data_len=56 (unbuffered)
2057 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
2059 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0xd total_len=56 in_port=1 (via action) data_len=56 (unbuffered)
2060 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
2063 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2065 dnl Modified MPLS pop action.
2066 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
2067 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)
2068 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
2069 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
2070 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2073 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'
2075 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2076 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2078 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
2079 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2080 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
2082 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2083 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
2085 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2086 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
2089 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2091 dnl Modified MPLS pop action.
2092 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
2093 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)
2094 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
2095 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
2096 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2099 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'
2101 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2102 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2104 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
2105 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2106 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
2108 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2109 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
2111 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2112 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
2115 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2117 dnl Modified MPLS pop action.
2118 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
2119 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)
2120 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
2121 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
2122 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2125 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'
2127 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2128 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2130 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
2131 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2132 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
2134 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2135 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
2137 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2138 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
2141 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2143 dnl Modified MPLS pop action.
2144 dnl The input is a frame with two MPLS label stack entries which tcpdump -vve shows as:
2145 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)
2146 dnl (label 20, exp 0, [S], ttl 31)
2147 dnl (tos 0x0, ttl 254, id 0, offset 0, flags [none], proto TCP (6), length 44)
2148 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
2149 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2152 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'
2154 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2155 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2157 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2158 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2159 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
2161 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2162 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
2164 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2165 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
2168 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2170 dnl Modified MPLS pop action.
2171 dnl The input is a frame with two MPLS label stack entries which tcpdump -vve shows as:
2172 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)
2173 dnl (label 20, exp 0, [S], ttl 31)
2174 dnl (tos 0x0, ttl 254, id 0, offset 0, flags [none], proto TCP (6), length 44)
2175 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
2176 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2179 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'
2181 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2182 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2184 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2185 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2186 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
2188 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2189 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
2191 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2192 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
2195 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2197 dnl Modified MPLS pop action.
2198 dnl The input is a frame with two MPLS label stack entries which tcpdump -vve shows as:
2199 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)
2200 dnl (label 20, exp 0, [S], ttl 31)
2201 dnl (tos 0x0, ttl 254, id 0, offset 0, flags [none], proto TCP (6), length 44)
2202 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
2203 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2206 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'
2208 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2209 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2211 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2212 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2213 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
2215 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2216 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
2218 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2219 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
2222 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2224 dnl Modified MPLS pop action.
2225 dnl The input is a frame with two MPLS label stack entries which tcpdump -vve shows as:
2226 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)
2227 dnl (label 20, exp 0, [S], ttl 31)
2228 dnl (tos 0x0, ttl 254, id 0, offset 0, flags [none], proto TCP (6), length 44)
2229 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
2230 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2233 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'
2235 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2236 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2238 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2239 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2240 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
2242 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2243 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
2245 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2246 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
2249 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2251 dnl Modified MPLS pop action.
2252 dnl The input is a frame with two MPLS label stack entries which tcpdump -vve shows as:
2253 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)
2254 dnl (label 20, exp 0, [S], ttl 31)
2255 dnl (tos 0x0, ttl 254, id 0, offset 0, flags [none], proto TCP (6), length 44)
2256 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
2257 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2260 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'
2263 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2264 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2266 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
2267 NXT_PACKET_IN (xid=0x0): cookie=0xe total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2268 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
2270 NXT_PACKET_IN (xid=0x0): cookie=0xe total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2271 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
2273 NXT_PACKET_IN (xid=0x0): cookie=0xe total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2274 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
2277 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2279 dnl Modified MPLS pop action.
2280 dnl The input is a frame with two MPLS label stack entries which tcpdump -vve shows as:
2281 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)
2282 dnl (label 20, exp 0, [S], ttl 31)
2283 dnl (tos 0x0, ttl 254, id 0, offset 0, flags [none], proto TCP (6), length 44)
2284 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
2285 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2288 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'
2290 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2291 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2293 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
2294 NXT_PACKET_IN (xid=0x0): cookie=0xe total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2295 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
2297 NXT_PACKET_IN (xid=0x0): cookie=0xe total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2298 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
2300 NXT_PACKET_IN (xid=0x0): cookie=0xe total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2301 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
2304 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2306 dnl Modified MPLS pop action.
2307 dnl The input is a frame with three MPLS label stack entries which tcpdump -vve shows as:
2308 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)
2309 dnl (label 20, exp 0, ttl 31)
2310 dnl (label 20, exp 0, [S], ttl 30)
2311 dnl (tos 0x0, ttl 254, id 0, offset 0, flags [none], proto TCP (6), length 44)
2312 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
2313 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2316 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'
2318 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2319 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2321 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2322 NXT_PACKET_IN (xid=0x0): cookie=0xe total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2323 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
2325 NXT_PACKET_IN (xid=0x0): cookie=0xe total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2326 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
2328 NXT_PACKET_IN (xid=0x0): cookie=0xe total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2329 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
2332 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2334 dnl Modified MPLS pop action.
2335 dnl The input is a frame with three MPLS label stack entries which tcpdump -vve shows as:
2336 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)
2337 dnl (label 20, exp 0, ttl 31)
2338 dnl (label 20, exp 0, [S], ttl 30)
2339 dnl (tos 0x0, ttl 254, id 0, offset 0, flags [none], proto TCP (6), length 44)
2340 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
2341 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2344 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'
2346 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2347 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2349 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2350 NXT_PACKET_IN (xid=0x0): cookie=0xe total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2351 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
2353 NXT_PACKET_IN (xid=0x0): cookie=0xe total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2354 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
2356 NXT_PACKET_IN (xid=0x0): cookie=0xe total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2357 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
2360 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2362 dnl Modified MPLS pop action.
2363 dnl The input is a frame with three MPLS label stack entries which tcpdump -vve shows as:
2364 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)
2365 dnl (label 20, exp 0, ttl 31)
2366 dnl (label 20, exp 0, [S], ttl 30)
2367 dnl (tos 0x0, ttl 254, id 0, offset 0, flags [none], proto TCP (6), length 44)
2368 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
2369 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2372 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'
2374 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2375 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2377 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2378 NXT_PACKET_IN (xid=0x0): cookie=0xe total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2379 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
2381 NXT_PACKET_IN (xid=0x0): cookie=0xe total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2382 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
2384 NXT_PACKET_IN (xid=0x0): cookie=0xe total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2385 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
2388 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2390 dnl Modified MPLS pop action.
2391 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
2392 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)
2393 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
2394 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
2395 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2398 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'
2400 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2401 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2403 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
2404 NXT_PACKET_IN (xid=0x0): cookie=0xf total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2405 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
2407 NXT_PACKET_IN (xid=0x0): cookie=0xf total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2408 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
2410 NXT_PACKET_IN (xid=0x0): cookie=0xf total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2411 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
2414 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2416 dnl Modified MPLS pop action.
2417 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
2418 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)
2419 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
2420 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
2421 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2424 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'
2426 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2427 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2429 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
2430 NXT_PACKET_IN (xid=0x0): cookie=0xf total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2431 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
2433 NXT_PACKET_IN (xid=0x0): cookie=0xf total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2434 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
2436 NXT_PACKET_IN (xid=0x0): cookie=0xf total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2437 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
2440 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2442 dnl Modified MPLS pop action.
2443 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
2444 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)
2445 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
2446 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
2447 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2450 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'
2452 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2453 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2455 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
2456 NXT_PACKET_IN (xid=0x0): cookie=0xf total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2457 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
2459 NXT_PACKET_IN (xid=0x0): cookie=0xf total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2460 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
2462 NXT_PACKET_IN (xid=0x0): cookie=0xf total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2463 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
2466 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2468 dnl Modified MPLS pop action.
2469 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
2470 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)
2471 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
2472 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
2473 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2476 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'
2479 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2480 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2482 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2483 NXT_PACKET_IN (xid=0x0): cookie=0x5 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2484 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
2486 NXT_PACKET_IN (xid=0x0): cookie=0x5 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2487 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
2489 NXT_PACKET_IN (xid=0x0): cookie=0x5 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2490 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
2493 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2495 dnl Modified MPLS pop action.
2496 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
2497 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)
2498 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
2499 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
2500 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2503 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'
2505 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2506 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2508 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2509 NXT_PACKET_IN (xid=0x0): cookie=0x5 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2510 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
2512 NXT_PACKET_IN (xid=0x0): cookie=0x5 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2513 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
2515 NXT_PACKET_IN (xid=0x0): cookie=0x5 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2516 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
2519 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2521 dnl Modified MPLS pop action.
2522 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
2523 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)
2524 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
2525 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
2526 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2529 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'
2532 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2533 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2535 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2536 NXT_PACKET_IN (xid=0x0): cookie=0x5 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2537 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
2539 NXT_PACKET_IN (xid=0x0): cookie=0x5 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2540 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
2542 NXT_PACKET_IN (xid=0x0): cookie=0x5 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2543 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
2546 AT_CHECK([ovs-appctl revalidator/purge], [0])
2547 AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
2548 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
2549 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
2550 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
2551 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
2552 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
2553 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
2554 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
2555 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
2556 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
2557 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
2558 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
2559 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
2560 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
2561 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
2562 cookie=0xd, n_packets=3, n_bytes=180, dl_src=60:66:66:66:00:08 actions=pop_mpls:0x0806,resubmit(1,1)
2563 cookie=0xd, n_packets=3, n_bytes=186, dl_src=60:66:66:66:00:01 actions=pop_mpls:0x0800,dec_ttl,CONTROLLER:65535
2564 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
2565 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
2566 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
2567 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
2568 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
2569 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
2570 cookie=0xd, n_packets=3, n_bytes=186, dl_src=60:66:66:66:00:09 actions=resubmit(,2),CONTROLLER:65535
2571 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
2572 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
2573 cookie=0xd, n_packets=3, n_bytes=186, dl_src=60:66:66:66:66:66 actions=pop_mpls:0x0800,CONTROLLER:65535
2574 cookie=0xd, n_packets=3, n_bytes=198, dl_src=60:66:66:66:01:00 actions=pop_mpls:0x8848,CONTROLLER:65535
2575 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
2576 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
2577 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
2578 cookie=0xd, table=1, n_packets=3, n_bytes=168, arp actions=CONTROLLER:65535
2579 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
2580 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
2581 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
2582 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
2583 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
2584 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
2585 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
2586 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
2587 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
2594 AT_SETUP([ofproto-dpif - MPLS handling with goto_table])
2595 OVS_VSWITCHD_START([dnl
2596 add-port br0 p1 -- set Interface p1 type=dummy
2598 ON_EXIT([kill `cat ovs-ofctl.pid`])
2600 AT_CAPTURE_FILE([ofctl_monitor.log])
2601 AT_DATA([flows.txt], [dnl
2602 table=0 mplsm actions=pop_mpls:0x800,goto_table(1)
2603 table=1 ip,ip_dscp=8 actions=controller
2605 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flows br0 flows.txt])
2608 dnl Modified MPLS pop action.
2609 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
2610 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)
2611 dnl (tos 0x20, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
2612 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
2613 AT_CHECK([ovs-ofctl -O OpenFlow12 monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2616 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'
2618 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2619 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2621 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
2622 OFPT_PACKET_IN (OF1.2) (xid=0x0): table_id=1 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2623 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
2625 OFPT_PACKET_IN (OF1.2) (xid=0x0): table_id=1 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2626 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
2628 OFPT_PACKET_IN (OF1.2) (xid=0x0): table_id=1 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2629 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
2632 AT_CHECK([ovs-appctl revalidator/purge], [0])
2633 AT_CHECK([ovs-ofctl -O OpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
2634 n_packets=3, n_bytes=186, mplsm actions=pop_mpls:0x0800,goto_table:1
2635 table=1, n_packets=3, n_bytes=174, ip,nw_tos=32 actions=CONTROLLER:65535
2636 OFPST_FLOW reply (OF1.2):
2642 AT_SETUP([ofproto-dpif - MPLS handling with write_actions])
2643 OVS_VSWITCHD_START([dnl
2644 add-port br0 p1 -- set Interface p1 type=dummy
2646 ON_EXIT([kill `cat ovs-ofctl.pid`])
2648 dnl N.B: The first (and only) action that accesses L3 data after the
2649 dnl pop_mpls action is present in write_actions. This exercises recirculation
2650 dnl triggered in write_actions due to a previous action not in write actions.
2651 AT_CAPTURE_FILE([ofctl_monitor.log])
2652 AT_DATA([flows.txt], [dnl
2653 mplsm actions=pop_mpls:0x800,write_actions(dec_ttl,controller)
2655 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flows br0 flows.txt])
2657 dnl Modified MPLS pop action.
2658 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
2659 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)
2660 dnl (tos 0x20, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
2661 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
2662 AT_CHECK([ovs-ofctl -O OpenFlow12 monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2665 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'
2667 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2668 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2670 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
2671 OFPT_PACKET_IN (OF1.2) (xid=0x0): total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2672 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
2674 OFPT_PACKET_IN (OF1.2) (xid=0x0): total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2675 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
2677 OFPT_PACKET_IN (OF1.2) (xid=0x0): total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2678 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
2681 AT_CHECK([ovs-appctl revalidator/purge], [0])
2682 AT_CHECK([ovs-ofctl -O OpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
2683 n_packets=3, n_bytes=186, mplsm actions=pop_mpls:0x0800,write_actions(dec_ttl,CONTROLLER:65535)
2684 OFPST_FLOW reply (OF1.2):
2690 AT_SETUP([ofproto-dpif - table-miss flow (OpenFlow 1.0)])
2691 OVS_VSWITCHD_START([dnl
2692 add-port br0 p1 -- set Interface p1 type=dummy
2694 ON_EXIT([kill `cat ovs-ofctl.pid`])
2696 AT_CAPTURE_FILE([ofctl_monitor.log])
2697 # A table-miss flow has priority 0 and no match
2698 AT_CHECK([ovs-ofctl --protocols=OpenFlow10 add-flow br0 'priority=0 actions=output:CONTROLLER'])
2700 dnl Singleton controller action.
2701 AT_CHECK([ovs-ofctl monitor -P openflow10 --protocols=OpenFlow10 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
2704 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)'
2706 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2707 ovs-appctl -t ovs-ofctl exit
2709 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2710 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
2711 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
2713 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
2714 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
2716 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
2717 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
2720 AT_CHECK([ovs-appctl revalidator/purge], [0])
2721 AT_CHECK([ovs-ofctl --protocols=OpenFlow10 dump-flows br0 | ofctl_strip | sort], [0], [dnl
2722 n_packets=3, n_bytes=180, priority=0 actions=CONTROLLER:65535
2730 AT_SETUP([ofproto-dpif - table-miss flow (OpenFlow 1.3)])
2731 OVS_VSWITCHD_START([dnl
2732 add-port br0 p1 -- set Interface p1 type=dummy
2734 ON_EXIT([kill `cat ovs-ofctl.pid`])
2736 AT_CAPTURE_FILE([ofctl_monitor.log])
2737 # A table-miss flow has priority 0 and no match
2738 AT_CHECK([ovs-ofctl --protocols=OpenFlow13 add-flow br0 'priority=0 actions=output:CONTROLLER'])
2740 dnl Singleton controller action.
2741 AT_CHECK([ovs-ofctl monitor -P openflow10 --protocols=OpenFlow13 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
2744 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)'
2746 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2747 ovs-appctl -t ovs-ofctl exit
2749 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2751 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2752 OFPT_PACKET_IN (OF1.3) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
2753 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
2755 OFPT_PACKET_IN (OF1.3) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
2756 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
2758 OFPT_PACKET_IN (OF1.3) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
2759 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
2762 AT_CHECK([ovs-appctl revalidator/purge], [0])
2763 AT_CHECK([ovs-ofctl --protocols=OpenFlow13 dump-flows br0 | ofctl_strip | sort], [0], [dnl
2764 n_packets=3, n_bytes=180, priority=0 actions=CONTROLLER:65535
2765 OFPST_FLOW reply (OF1.3):
2771 AT_SETUP([ofproto-dpif - table-miss flow with async config (OpenFlow 1.3)])
2772 OVS_VSWITCHD_START([dnl
2773 add-port br0 p1 -- set Interface p1 type=dummy
2775 ON_EXIT([kill `cat ovs-ofctl.pid`])
2777 ovs-appctl time/stop
2779 AT_CAPTURE_FILE([ofctl_monitor.log])
2780 # A table-miss flow has priority 0 and no match
2781 AT_CHECK([ovs-ofctl --protocols=OpenFlow13 add-flow br0 'priority=0 actions=output:CONTROLLER'])
2783 dnl Singleton controller action.
2784 AT_CHECK([ovs-ofctl monitor -P openflow10 --protocols=OpenFlow13 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
2786 # Become slave (OF 1.3), which should disable everything except port status.
2787 ovs-appctl -t ovs-ofctl ofctl/send 041800180000000200000003000000000000000000000001
2789 # Ensure that ovs-vswitchd gets a chance to reply before sending another command.
2790 ovs-appctl time/warp 500 100
2792 # Use OF 1.3 OFPT_SET_ASYNC to enable OFPR_NO_MATCH for slave only.
2793 ovs-appctl -t ovs-ofctl ofctl/send 041c002000000002000000000000000100000000000000000000000000000000
2795 ovs-appctl time/warp 500 100
2797 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)'
2799 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2800 ovs-appctl -t ovs-ofctl exit
2802 AT_CHECK([ovs-appctl revalidator/purge], [0])
2803 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2804 send: OFPT_ROLE_REQUEST (OF1.3) (xid=0x2): role=slave generation_id=1
2805 OFPT_ROLE_REPLY (OF1.3) (xid=0x2): role=slave generation_id=1
2807 send: OFPT_SET_ASYNC (OF1.3) (xid=0x2):
2818 OFPT_PACKET_IN (OF1.3) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
2819 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
2821 OFPT_PACKET_IN (OF1.3) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
2822 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
2824 OFPT_PACKET_IN (OF1.3) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
2825 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
2828 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2830 AT_CHECK([ovs-ofctl --protocols=OpenFlow13 dump-flows br0 | ofctl_strip | sort], [0], [dnl
2831 n_packets=3, n_bytes=180, priority=0 actions=CONTROLLER:65535
2832 OFPST_FLOW reply (OF1.3):
2839 AT_SETUP([ofproto-dpif - table-miss flow (OpenFlow 1.4)])
2840 OVS_VSWITCHD_START([dnl
2841 add-port br0 p1 -- set Interface p1 type=dummy
2843 ON_EXIT([kill `cat ovs-ofctl.pid`])
2845 AT_CAPTURE_FILE([ofctl_monitor.log])
2846 # A table-miss flow has priority 0 and no match
2847 AT_CHECK([ovs-ofctl --protocols=OpenFlow14 add-flow br0 'priority=0 actions=output:CONTROLLER'])
2849 dnl Singleton controller action.
2850 AT_CHECK([ovs-ofctl monitor -P openflow10 --protocols=OpenFlow14 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
2853 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)'
2855 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2856 ovs-appctl -t ovs-ofctl exit
2858 AT_CHECK([ovs-appctl revalidator/purge], [0])
2859 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2860 OFPT_PACKET_IN (OF1.4) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
2861 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
2863 OFPT_PACKET_IN (OF1.4) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
2864 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
2866 OFPT_PACKET_IN (OF1.4) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
2867 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
2870 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2872 AT_CHECK([ovs-ofctl --protocols=OpenFlow14 dump-flows br0 | ofctl_strip | sort], [0], [dnl
2873 n_packets=3, n_bytes=180, priority=0 actions=CONTROLLER:65535
2874 OFPST_FLOW reply (OF1.4):
2881 AT_SETUP([ofproto-dpif - packet-in reasons (Openflow 1.3)])
2882 OVS_VSWITCHD_START([dnl
2883 add-port br0 p1 -- set Interface p1 type=dummy
2885 ON_EXIT([kill `cat ovs-ofctl.pid`])
2887 AT_CAPTURE_FILE([ofctl_monitor.log])
2888 AT_DATA([flows.txt], [dnl
2889 table=0 in_port=1 actions=write_actions(output(CONTROLLER)),goto_table(1)
2890 table=1 actions=output(CONTROLLER),goto_table(2)
2891 table=2 actions=group:1234
2893 AT_CHECK([ovs-ofctl --protocols=OpenFlow13 add-group br0 'group_id=1234,type=all,bucket=output:10,bucket=output:CONTROLLER'])
2894 AT_CHECK([ovs-ofctl --protocols=OpenFlow13 add-flows br0 flows.txt])
2896 dnl Singleton controller action.
2897 AT_CHECK([ovs-ofctl monitor -P openflow10 --protocols=OpenFlow13 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
2900 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)'
2902 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2903 ovs-appctl -t ovs-ofctl exit
2905 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2907 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2908 OFPT_PACKET_IN (OF1.3) (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
2909 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
2911 OFPT_PACKET_IN (OF1.3) (xid=0x0): table_id=2 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
2912 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
2914 OFPT_PACKET_IN (OF1.3) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
2915 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
2917 OFPT_PACKET_IN (OF1.3) (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
2918 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
2920 OFPT_PACKET_IN (OF1.3) (xid=0x0): table_id=2 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
2921 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
2923 OFPT_PACKET_IN (OF1.3) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
2924 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
2926 OFPT_PACKET_IN (OF1.3) (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
2927 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
2929 OFPT_PACKET_IN (OF1.3) (xid=0x0): table_id=2 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
2930 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
2932 OFPT_PACKET_IN (OF1.3) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
2933 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
2936 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2938 AT_CHECK([ovs-ofctl --protocols=OpenFlow13 dump-flows br0 | ofctl_strip | sort], [0], [dnl
2939 n_packets=3, n_bytes=180, in_port=1 actions=write_actions(CONTROLLER:65535),goto_table:1
2940 table=1, n_packets=3, n_bytes=180, actions=CONTROLLER:65535,goto_table:2
2941 table=2, n_packets=3, n_bytes=180, actions=group:1234
2942 OFPST_FLOW reply (OF1.3):
2949 AT_SETUP([ofproto-dpif - packet-in reasons (Openflow 1.4)])
2950 OVS_VSWITCHD_START([dnl
2951 add-port br0 p1 -- set Interface p1 type=dummy
2953 ON_EXIT([kill `cat ovs-ofctl.pid`])
2955 AT_CAPTURE_FILE([ofctl_monitor.log])
2956 AT_DATA([flows.txt], [dnl
2957 table=0 in_port=1 actions=write_actions(output(CONTROLLER)),goto_table(1)
2958 table=1 actions=output(CONTROLLER),goto_table(2)
2959 table=2 actions=group:1234
2961 AT_CHECK([ovs-ofctl --protocols=OpenFlow14 add-group br0 'group_id=1234,type=all,bucket=output:10,bucket=output:CONTROLLER'])
2962 AT_CHECK([ovs-ofctl --protocols=OpenFlow14 add-flows br0 flows.txt])
2964 dnl Singleton controller action.
2965 AT_CHECK([ovs-ofctl monitor -P openflow10 --protocols=OpenFlow14 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
2968 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)'
2970 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2971 ovs-appctl -t ovs-ofctl exit
2973 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2975 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2976 OFPT_PACKET_IN (OF1.4) (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
2977 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
2979 OFPT_PACKET_IN (OF1.4) (xid=0x0): table_id=2 cookie=0x0 total_len=60 in_port=1 (via group) data_len=60 (unbuffered)
2980 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
2982 OFPT_PACKET_IN (OF1.4) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via action_set) data_len=60 (unbuffered)
2983 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
2985 OFPT_PACKET_IN (OF1.4) (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
2986 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
2988 OFPT_PACKET_IN (OF1.4) (xid=0x0): table_id=2 cookie=0x0 total_len=60 in_port=1 (via group) data_len=60 (unbuffered)
2989 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
2991 OFPT_PACKET_IN (OF1.4) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via action_set) data_len=60 (unbuffered)
2992 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
2994 OFPT_PACKET_IN (OF1.4) (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
2995 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
2997 OFPT_PACKET_IN (OF1.4) (xid=0x0): table_id=2 cookie=0x0 total_len=60 in_port=1 (via group) data_len=60 (unbuffered)
2998 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
3000 OFPT_PACKET_IN (OF1.4) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via action_set) data_len=60 (unbuffered)
3001 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
3004 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
3006 AT_CHECK([ovs-ofctl --protocols=OpenFlow14 dump-flows br0 | ofctl_strip | sort], [0], [dnl
3007 n_packets=3, n_bytes=180, in_port=1 actions=write_actions(CONTROLLER:65535),goto_table:1
3008 table=1, n_packets=3, n_bytes=180, actions=CONTROLLER:65535,goto_table:2
3009 table=2, n_packets=3, n_bytes=180, actions=group:1234
3010 OFPST_FLOW reply (OF1.4):
3017 AT_SETUP([ofproto-dpif - ARP modification slow-path])
3019 ADD_OF_PORTS([br0], [1], [2])
3021 ovs-vsctl -- set Interface p2 type=dummy options:pcap=p2.pcap
3022 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'
3024 # Input some packets that should follow the arp modification slow-path.
3026 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)'
3028 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
3030 # Check the packets that were output.
3031 AT_CHECK([ovs-ofctl parse-pcap p2.pcap], [0], [dnl
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.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
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=00:00:00:00:00:00
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.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
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.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
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=00:00:00:00:00:00
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.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
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.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
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=00:00:00:00:00:00
3040 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
3046 AT_SETUP([ofproto-dpif - VLAN handling])
3048 [set Bridge br0 fail-mode=standalone -- \
3049 add-port br0 p1 trunks=10,12 -- \
3050 add-port br0 p2 tag=10 -- \
3051 add-port br0 p3 tag=12 \
3052 other-config:priority-tags=true -- \
3053 add-port br0 p4 tag=12 -- \
3054 add-port br0 p5 vlan_mode=native-tagged tag=10 -- \
3055 add-port br0 p6 vlan_mode=native-tagged tag=10 trunks=10,12 -- \
3056 add-port br0 p7 vlan_mode=native-untagged tag=12 -- \
3057 add-port br0 p8 vlan_mode=native-untagged tag=12 trunks=10,12 \
3058 other-config:priority-tags=true -- \
3059 set Interface p1 type=dummy -- \
3060 set Interface p2 type=dummy -- \
3061 set Interface p3 type=dummy -- \
3062 set Interface p4 type=dummy -- \
3063 set Interface p5 type=dummy -- \
3064 set Interface p6 type=dummy -- \
3065 set Interface p7 type=dummy -- \
3066 set Interface p8 type=dummy --])
3068 dnl Each of these specifies an in_port by number, a VLAN VID (or "none"),
3069 dnl a VLAN PCP (used if the VID isn't "none") and the expected set of datapath
3075 "100 10 0 1,5,6,7,8,pop_vlan,2" \
3076 "100 10 1 1,5,6,7,8,pop_vlan,2" \
3079 "100 12 0 1,5,6,pop_vlan,3,4,7,8" \
3080 "100 12 1 1,5,6,pop_vlan,4,7,push_vlan(vid=0,pcp=1),3,8" \
3084 "1 10 0 5,6,7,8,100,pop_vlan,2" \
3085 "1 10 1 5,6,7,8,100,pop_vlan,2" \
3088 "1 12 0 5,6,100,pop_vlan,3,4,7,8" \
3089 "1 12 1 5,6,100,pop_vlan,4,7,push_vlan(vid=0,pcp=1),3,8" \
3090 "2 none 0 push_vlan(vid=10,pcp=0),1,5,6,7,8,100" \
3091 "2 0 0 pop_vlan,push_vlan(vid=10,pcp=0),1,5,6,7,8,100" \
3092 "2 0 1 pop_vlan,push_vlan(vid=10,pcp=1),1,5,6,7,8,100" \
3099 "3 none 0 4,7,8,push_vlan(vid=12,pcp=0),1,5,6,100" \
3100 "3 0 0 pop_vlan,4,7,8,push_vlan(vid=12,pcp=0),1,5,6,100" \
3101 "3 0 1 8,pop_vlan,4,7,push_vlan(vid=12,pcp=1),1,5,6,100" \
3108 "4 none 0 3,7,8,push_vlan(vid=12,pcp=0),1,5,6,100" \
3109 "4 0 0 pop_vlan,3,7,8,push_vlan(vid=12,pcp=0),1,5,6,100" \
3110 "4 0 1 3,8,pop_vlan,7,push_vlan(vid=12,pcp=1),1,5,6,100" \
3117 "5 none 0 2,push_vlan(vid=10,pcp=0),1,6,7,8,100" \
3118 "5 0 0 pop_vlan,2,push_vlan(vid=10,pcp=0),1,6,7,8,100" \
3119 "5 0 1 pop_vlan,2,push_vlan(vid=10,pcp=1),1,6,7,8,100" \
3120 "5 10 0 1,6,7,8,100,pop_vlan,2" \
3121 "5 10 1 1,6,7,8,100,pop_vlan,2" \
3124 "5 12 0 1,6,100,pop_vlan,3,4,7,8" \
3125 "5 12 1 1,6,100,pop_vlan,4,7,push_vlan(vid=0,pcp=1),3,8" \
3126 "6 none 0 2,push_vlan(vid=10,pcp=0),1,5,7,8,100" \
3127 "6 0 0 pop_vlan,2,push_vlan(vid=10,pcp=0),1,5,7,8,100" \
3128 "6 0 1 pop_vlan,2,push_vlan(vid=10,pcp=1),1,5,7,8,100" \
3129 "6 10 0 1,5,7,8,100,pop_vlan,2" \
3130 "6 10 1 1,5,7,8,100,pop_vlan,2" \
3133 "6 12 0 1,5,100,pop_vlan,3,4,7,8" \
3134 "6 12 1 1,5,100,pop_vlan,4,7,push_vlan(vid=0,pcp=1),3,8" \
3135 "7 none 0 3,4,8,push_vlan(vid=12,pcp=0),1,5,6,100" \
3136 "7 0 0 pop_vlan,3,4,8,push_vlan(vid=12,pcp=0),1,5,6,100" \
3137 "7 0 1 3,8,pop_vlan,4,push_vlan(vid=12,pcp=1),1,5,6,100" \
3138 "7 10 0 1,5,6,8,100,pop_vlan,2" \
3139 "7 10 1 1,5,6,8,100,pop_vlan,2" \
3142 "7 12 0 1,5,6,100,pop_vlan,3,4,8" \
3143 "7 12 1 1,5,6,100,pop_vlan,4,push_vlan(vid=0,pcp=1),3,8" \
3144 "8 none 0 3,4,7,push_vlan(vid=12,pcp=0),1,5,6,100" \
3145 "8 0 0 pop_vlan,3,4,7,push_vlan(vid=12,pcp=0),1,5,6,100" \
3146 "8 0 1 3,pop_vlan,4,7,push_vlan(vid=12,pcp=1),1,5,6,100" \
3147 "8 10 0 1,5,6,7,100,pop_vlan,2" \
3148 "8 10 1 1,5,6,7,100,pop_vlan,2" \
3151 "8 12 0 1,5,6,100,pop_vlan,3,4,7" \
3152 "8 12 1 1,5,6,100,pop_vlan,4,7,push_vlan(vid=0,pcp=1),3"
3160 if test $vlan = none; then
3161 flow="in_port($in_port),eth(src=50:54:00:00:00:01,dst=ff:ff:ff:ff:ff:ff),eth_type(0xabcd)"
3163 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))"
3166 echo "----------------------------------------------------------------------"
3167 echo "in_port=$in_port vlan=$vlan pcp=$pcp"
3169 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
3170 actual=`tail -1 stdout | sed 's/Datapath actions: //'`
3172 AT_CHECK([ovs-dpctl normalize-actions "$flow" "$expected"], [0], [stdout])
3174 AT_CHECK([ovs-dpctl normalize-actions "$flow" "$actual"], [0], [expout])
3180 AT_SETUP([ofproto-dpif - MPLS handling])
3181 OVS_VSWITCHD_START([dnl
3182 add-port br0 p1 -- set Interface p1 type=dummy
3184 ON_EXIT([kill `cat ovs-ofctl.pid`])
3186 AT_CAPTURE_FILE([ofctl_monitor.log])
3187 AT_DATA([flows.txt], [dnl
3188 dl_src=40:44:44:44:00:00 actions=push_mpls:0x8847,controller
3189 dl_src=40:44:44:44:00:01,mpls actions=push_mpls:0x8847,controller
3190 dl_src=40:44:44:44:00:02,mpls actions=push_mpls:0x8848,controller
3192 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 add-flows br0 flows.txt])
3194 dnl In this test, we push an MPLS tag to an ethernet packet.
3195 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
3198 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)'
3200 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3201 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
3203 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
3204 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3205 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
3206 00000000 50 54 00 00 00 07 40 44-44 44 00 00 88 47 00 00
3207 00000010 01 40 45 00 00 28 00 00-00 00 40 06 f9 7c c0 a8
3208 00000020 00 01 c0 a8 00 02 00 00-00 00 00 00 00 00 00 00
3209 00000030 00 00 50 00 00 00 00 00-00 00 00 00 00 00 00 00
3211 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3212 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
3213 00000000 50 54 00 00 00 07 40 44-44 44 00 00 88 47 00 00
3214 00000010 01 40 45 00 00 28 00 00-00 00 40 06 f9 7c c0 a8
3215 00000020 00 01 c0 a8 00 02 00 00-00 00 00 00 00 00 00 00
3216 00000030 00 00 50 00 00 00 00 00-00 00 00 00 00 00 00 00
3218 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3219 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
3220 00000000 50 54 00 00 00 07 40 44-44 44 00 00 88 47 00 00
3221 00000010 01 40 45 00 00 28 00 00-00 00 40 06 f9 7c c0 a8
3222 00000020 00 01 c0 a8 00 02 00 00-00 00 00 00 00 00 00 00
3223 00000030 00 00 50 00 00 00 00 00-00 00 00 00 00 00 00 00
3226 dnl In this test, we push an MPLS tag to an MPLS packet. The LSE should be
3227 dnl copied exactly, except for the BOS bit.
3228 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
3231 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)'
3233 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3234 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
3236 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
3237 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3238 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
3239 00000000 50 54 00 00 00 07 40 44-44 44 00 01 88 47 00 00
3240 00000010 a0 40 00 00 a1 40 00 00-00 00 00 00 00 00 00 00
3241 00000020 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
3242 00000030 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
3244 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3245 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
3246 00000000 50 54 00 00 00 07 40 44-44 44 00 01 88 47 00 00
3247 00000010 a0 40 00 00 a1 40 00 00-00 00 00 00 00 00 00 00
3248 00000020 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
3249 00000030 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
3251 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3252 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
3253 00000000 50 54 00 00 00 07 40 44-44 44 00 01 88 47 00 00
3254 00000010 a0 40 00 00 a1 40 00 00-00 00 00 00 00 00 00 00
3255 00000020 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
3256 00000030 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
3259 dnl In this test, we push an MPLS tag to an MPLS packet. The LSE should be
3260 dnl copied exactly, except for the BOS bit. The ethertype should be updated
3261 dnl to the MPLS ethertype of the MPLS push action which differs to that
3262 dnl of the input packet.
3263 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
3266 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)'
3268 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3269 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
3271 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
3272 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3273 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
3274 00000000 50 54 00 00 00 07 40 44-44 44 00 02 88 48 00 00
3275 00000010 a0 40 00 00 a1 40 00 00-00 00 00 00 00 00 00 00
3276 00000020 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
3277 00000030 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
3279 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3280 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
3281 00000000 50 54 00 00 00 07 40 44-44 44 00 02 88 48 00 00
3282 00000010 a0 40 00 00 a1 40 00 00-00 00 00 00 00 00 00 00
3283 00000020 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
3284 00000030 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
3286 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3287 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
3288 00000000 50 54 00 00 00 07 40 44-44 44 00 02 88 48 00 00
3289 00000010 a0 40 00 00 a1 40 00 00-00 00 00 00 00 00 00 00
3290 00000020 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
3291 00000030 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
3297 AT_SETUP([ofproto-dpif - VLAN+MPLS handling])
3298 OVS_VSWITCHD_START([dnl
3299 add-port br0 p1 -- set Interface p1 type=dummy
3301 ON_EXIT([kill `cat ovs-ofctl.pid`])
3303 AT_CAPTURE_FILE([ofctl_monitor.log])
3304 AT_DATA([flows.txt], [dnl
3305 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
3306 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
3307 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
3308 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
3309 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
3310 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
3311 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
3312 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
3313 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
3314 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
3316 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 add-flows br0 flows.txt])
3318 dnl Modified MPLS controller action.
3319 dnl In this test, we push the MPLS tag before pushing a VLAN tag, so we see
3320 dnl both of these in the final flow
3321 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
3324 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)'
3326 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3327 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
3329 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
3330 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3331 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
3332 00000000 50 54 00 00 00 07 40 44-44 44 54 50 81 00 20 63
3333 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3334 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3335 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3336 00000040 00 00 00 00
3338 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3339 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
3340 00000000 50 54 00 00 00 07 40 44-44 44 54 50 81 00 20 63
3341 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3342 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3343 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3344 00000040 00 00 00 00
3346 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3347 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
3348 00000000 50 54 00 00 00 07 40 44-44 44 54 50 81 00 20 63
3349 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3350 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3351 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3352 00000040 00 00 00 00
3355 dnl Modified MPLS controller action.
3356 dnl In this test, the input packet in vlan-tagged, which should be stripped
3357 dnl before we push the MPLS and VLAN tags.
3358 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
3361 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))'
3363 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3364 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
3366 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
3367 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3368 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
3369 00000000 50 54 00 00 00 07 40 44-44 44 54 51 81 00 20 63
3370 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3371 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3372 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3374 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3375 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
3376 00000000 50 54 00 00 00 07 40 44-44 44 54 51 81 00 20 63
3377 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3378 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3379 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3381 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3382 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
3383 00000000 50 54 00 00 00 07 40 44-44 44 54 51 81 00 20 63
3384 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3385 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3386 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3389 dnl Modified MPLS controller action.
3390 dnl In this test, we push the MPLS tag before pushing a VLAN tag, so we see
3391 dnl both of these in the final flow
3392 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
3395 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)'
3397 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3398 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
3400 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
3401 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3402 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
3403 00000000 52 54 00 00 00 07 40 44-44 44 54 52 81 00 20 63
3404 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3405 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3406 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3407 00000040 00 00 00 00
3409 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3410 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
3411 00000000 52 54 00 00 00 07 40 44-44 44 54 52 81 00 20 63
3412 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3413 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3414 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3415 00000040 00 00 00 00
3417 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3418 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
3419 00000000 52 54 00 00 00 07 40 44-44 44 54 52 81 00 20 63
3420 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3421 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3422 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3423 00000040 00 00 00 00
3426 dnl Modified MPLS controller action.
3427 dnl In this test, the input packet in vlan-tagged, which should be stripped
3428 dnl before we push the MPLS and VLAN tags.
3429 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
3432 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))'
3434 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3435 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
3437 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
3438 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3439 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
3440 00000000 50 54 00 00 00 07 40 44-44 44 54 53 81 00 20 63
3441 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3442 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3443 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3445 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3446 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
3447 00000000 50 54 00 00 00 07 40 44-44 44 54 53 81 00 20 63
3448 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3449 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3450 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3452 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3453 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
3454 00000000 50 54 00 00 00 07 40 44-44 44 54 53 81 00 20 63
3455 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3456 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3457 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3460 dnl Modified MPLS controller action.
3461 dnl In this test, we push the VLAN tag before pushing a MPLS tag, but these
3462 dnl actions are reordered, so we see both of these in the final flow.
3463 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
3466 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)'
3468 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3469 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
3471 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
3472 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3473 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
3474 00000000 50 54 00 00 00 07 40 44-44 44 54 54 81 00 20 63
3475 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3476 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3477 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3478 00000040 00 00 00 00
3480 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3481 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
3482 00000000 50 54 00 00 00 07 40 44-44 44 54 54 81 00 20 63
3483 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3484 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3485 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3486 00000040 00 00 00 00
3488 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3489 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
3490 00000000 50 54 00 00 00 07 40 44-44 44 54 54 81 00 20 63
3491 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3492 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3493 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3494 00000040 00 00 00 00
3497 dnl Modified MPLS controller action.
3498 dnl In this test, the input packet in vlan-tagged, which should be stripped
3499 dnl before we push the MPLS and VLAN tags.
3500 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
3503 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))'
3505 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3506 OVS_APP_EXIT_AND_WAIT([ovs-ofctl])
3508 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
3509 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3510 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
3511 00000000 50 54 00 00 00 07 40 44-44 44 54 55 81 00 20 63
3512 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3513 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3514 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3516 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3517 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
3518 00000000 50 54 00 00 00 07 40 44-44 44 54 55 81 00 20 63
3519 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3520 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3521 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3523 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3524 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
3525 00000000 50 54 00 00 00 07 40 44-44 44 54 55 81 00 20 63
3526 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3527 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3528 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3531 dnl Modified MPLS controller action.
3532 dnl In this test, we push the VLAN tag before pushing a MPLS tag, but these
3533 dnl actions are reordered, so we see both of these in the final flow.
3534 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
3537 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)'
3539 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3540 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
3542 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
3543 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3544 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
3545 00000000 50 54 00 00 00 07 40 44-44 44 54 56 81 00 20 63
3546 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3547 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3548 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3549 00000040 00 00 00 00
3551 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3552 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
3553 00000000 50 54 00 00 00 07 40 44-44 44 54 56 81 00 20 63
3554 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3555 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3556 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3557 00000040 00 00 00 00
3559 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3560 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
3561 00000000 50 54 00 00 00 07 40 44-44 44 54 56 81 00 20 63
3562 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3563 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3564 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3565 00000040 00 00 00 00
3568 dnl Modified MPLS controller action.
3569 dnl In this test, the input packet in vlan-tagged, which should be stripped
3570 dnl before we push the MPLS and VLAN tags.
3571 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 -m 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
3574 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))'
3576 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3577 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
3579 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
3580 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3581 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
3582 00000000 50 54 00 00 00 07 40 44-44 44 54 57 81 00 20 63
3583 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3584 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3585 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3587 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3588 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
3589 00000000 50 54 00 00 00 07 40 44-44 44 54 57 81 00 20 63
3590 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3591 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3592 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3594 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3595 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
3596 00000000 50 54 00 00 00 07 40 44-44 44 54 57 81 00 20 63
3597 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3598 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3599 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3602 dnl Modified MPLS controller action.
3603 dnl In this test, the input packet in vlan-tagged, which should be stripped
3604 dnl before we push the MPLS and VLAN tags.
3605 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
3608 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))'
3610 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3611 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
3613 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
3614 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3615 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
3616 00000000 50 54 00 00 00 07 40 44-44 44 54 58 81 00 20 63
3617 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3618 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3619 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3621 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3622 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
3623 00000000 50 54 00 00 00 07 40 44-44 44 54 58 81 00 20 63
3624 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3625 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3626 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3628 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3629 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
3630 00000000 50 54 00 00 00 07 40 44-44 44 54 58 81 00 20 63
3631 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3632 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3633 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3636 dnl Modified MPLS controller action.
3637 dnl In this test, the input packet in vlan-tagged, which should be modified
3638 dnl before we push MPLS and VLAN tags.
3639 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
3642 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))'
3644 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3645 ovs-appctl -t ovs-ofctl exit
3647 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
3648 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3649 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
3650 00000000 50 54 00 00 00 07 40 44-44 44 54 59 81 00 20 63
3651 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3652 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3653 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3655 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3656 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
3657 00000000 50 54 00 00 00 07 40 44-44 44 54 59 81 00 20 63
3658 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3659 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3660 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3662 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3663 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
3664 00000000 50 54 00 00 00 07 40 44-44 44 54 59 81 00 20 63
3665 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3666 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3667 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3670 AT_CHECK([ovs-appctl revalidator/purge], [0])
3671 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
3672 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
3673 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
3674 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
3675 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
3676 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
3677 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
3678 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
3679 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
3680 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
3681 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
3682 OFPST_FLOW reply (OF1.2):
3688 AT_SETUP([ofproto-dpif - fragment handling - trace])
3690 ADD_OF_PORTS([br0], [1], [2], [3], [4], [5], [6], [90])
3691 AT_DATA([flows.txt], [dnl
3692 priority=75 tcp ip_frag=no tp_dst=80 actions=move:OXM_OF_TCP_DST[[]]->OXM_OF_TCP_SRC[[]],output:1
3693 priority=75 tcp ip_frag=first tp_dst=80 actions=move:OXM_OF_TCP_DST[[]]->OXM_OF_TCP_SRC[[]],output:2
3694 priority=50 tcp ip_frag=no actions=move:OXM_OF_TCP_DST[[]]->OXM_OF_TCP_SRC[[]],output:4
3695 priority=50 tcp ip_frag=first actions=move:OXM_OF_TCP_DST[[]]->OXM_OF_TCP_SRC[[]],output:5
3696 priority=50 tcp ip_frag=later actions=output:6
3698 AT_CHECK([ovs-ofctl replace-flows br0 flows.txt])
3700 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"
3701 no_flow="$base_flow,frag=no),tcp(src=12345,dst=80)"
3702 first_flow="$base_flow,frag=first),tcp(src=12345,dst=80)"
3703 later_flow="$base_flow,frag=later)"
3705 # mode no first later
3708 'drop 1 drop drop' \
3717 AT_CHECK([ovs-ofctl set-frags br0 $mode])
3718 for type in no first later; do
3719 eval flow=\$${type}_flow exp_output=\$$type
3720 printf "\n%s\n" "----$mode $type-----"
3721 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
3723 if test $mode = drop && test $type != no; then
3724 echo 'Packets dropped because they are IP fragments and the fragment handling mode is "drop".' >> expout
3725 echo "Datapath actions: $exp_output" >> expout
3726 elif test $type = later; then
3727 echo "Datapath actions: $exp_output" >> expout
3729 echo "Datapath actions: set(tcp(src=80,dst=80)),$exp_output" >> expout
3731 AT_CHECK([grep 'IP fragments' stdout; tail -1 stdout], [0], [expout])
3737 AT_SETUP([ofproto-dpif - fragment handling - upcall])
3739 ADD_OF_PORTS([br0], [1], [2], [3], [4], [5], [6], [90])
3740 AT_DATA([flows.txt], [dnl
3741 priority=75 tcp ip_frag=no tp_dst=80 actions=set_field:81->tcp_dst,output:1
3742 priority=75 tcp ip_frag=first tp_dst=80 actions=set_field:81->tcp_dst,output:2
3743 priority=50 tcp ip_frag=no actions=set_field:81->tcp_dst,output:4
3744 priority=50 tcp ip_frag=first actions=set_field:81->tcp_dst,output:5
3745 priority=50 tcp ip_frag=later actions=output:6
3747 AT_CHECK([ovs-ofctl replace-flows br0 flows.txt])
3749 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"
3750 no_flow="$base_flow,frag=no),tcp(src=12345,dst=80)"
3751 first_flow="$base_flow,frag=first),tcp(src=12345,dst=80)"
3752 later_flow="$base_flow,frag=later)"
3754 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
3758 AT_CHECK([ovs-ofctl set-frags br0 $mode])
3759 for type in no first later; do
3760 eval flow=\$${type}_flow
3761 printf "\n%s\n" "----$mode $type-----"
3763 AT_CHECK([ovs-appctl netdev-dummy/receive p90 "$flow"], [0], [stdout])
3766 AT_CHECK([ovs-appctl dpctl/dump-flows], [0], [dnl
3767 flow-dump from non-dpdk interfaces:
3768 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
3769 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
3770 recirc_id(0),in_port(90),eth_type(0x0800),ipv4(proto=6,frag=later), packets:0, bytes:0, used:never, actions:6
3775 AT_CHECK([ovs-appctl revalidator/purge], [0])
3776 AT_CHECK([ovs-ofctl set-frags br0 $mode])
3777 for type in no first later; do
3778 eval flow=\$${type}_flow
3779 printf "\n%s\n" "----$mode $type-----"
3781 AT_CHECK([ovs-appctl netdev-dummy/receive p90 "$flow"], [0], [stdout])
3784 AT_CHECK([ovs-appctl dpctl/dump-flows], [0], [dnl
3785 flow-dump from non-dpdk interfaces:
3786 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
3787 recirc_id(0),in_port(90),eth_type(0x0800),ipv4(frag=first), packets:0, bytes:0, used:never, actions:drop
3788 recirc_id(0),in_port(90),eth_type(0x0800),ipv4(frag=later), packets:0, bytes:0, used:never, actions:drop
3793 AT_CHECK([ovs-appctl revalidator/purge], [0])
3794 AT_CHECK([ovs-ofctl set-frags br0 $mode])
3795 for type in no first later; do
3796 eval flow=\$${type}_flow
3797 printf "\n%s\n" "----$mode $type-----"
3799 AT_CHECK([ovs-appctl netdev-dummy/receive p90 "$flow"], [0], [stdout])
3802 AT_CHECK([ovs-appctl dpctl/dump-flows], [0], [dnl
3803 flow-dump from non-dpdk interfaces:
3804 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
3805 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
3806 recirc_id(0),in_port(90),eth_type(0x0800),ipv4(proto=6,frag=later), packets:0, bytes:0, used:never, actions:6
3812 AT_SETUP([ofproto-dpif - fragment handling - actions])
3814 ADD_OF_PORTS([br0], [1], [2], [3], [4], [5], [6], [90])
3816 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])
3817 AT_CHECK([tail -2 stderr | sed 's/^.*|WARN|//'], [0], [dnl
3818 source field tcp_dst lacks correct prerequisites
3819 ovs-ofctl: actions are invalid with specified match (OFPBAC_MATCH_INCONSISTENT)
3822 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])
3823 AT_CHECK([tail -2 stderr | sed 's/^.*|WARN|//'], [0], [dnl
3824 destination field tcp_src lacks correct prerequisites
3825 ovs-ofctl: actions are invalid with specified match (OFPBAC_MATCH_INCONSISTENT)
3828 AT_CHECK([ovs-ofctl add-flow br0 "udp,ip_frag=later actions=set_field:8888->udp_src,output:1"], [1], [], [stderr])
3829 AT_CHECK([tail -2 stderr | sed 's/^.*|WARN|//'], [0], [dnl
3830 set_field udp_src lacks correct prerequisities
3831 ovs-ofctl: actions are invalid with specified match (OFPBAC_MATCH_INCONSISTENT)
3834 AT_CHECK([ovs-ofctl add-flow br0 "udp,ip_frag=later actions=load:8888->NXM_OF_UDP_DST[[]],output:1"], [1], [], [stderr])
3835 AT_CHECK([tail -2 stderr | sed 's/^.*|WARN|//'], [0], [dnl
3836 set_field udp_dst lacks correct prerequisities
3837 ovs-ofctl: actions are invalid with specified match (OFPBAC_MATCH_INCONSISTENT)
3840 AT_CHECK([ovs-ofctl add-flow br0 "sctp,ip_frag=later actions=set_field:8888->sctp_src,output:1"], [1], [], [stderr])
3841 AT_CHECK([tail -2 stderr | sed 's/^.*|WARN|//'], [0], [dnl
3842 set_field sctp_src lacks correct prerequisities
3843 ovs-ofctl: actions are invalid with specified match (OFPBAC_MATCH_INCONSISTENT)
3846 AT_CHECK([ovs-ofctl add-flow br0 "sctp,ip_frag=later actions=set_field:8888->sctp_dst,output:1"], [1], [], [stderr])
3847 AT_CHECK([tail -2 stderr | sed 's/^.*|WARN|//'], [0], [dnl
3848 set_field sctp_dst lacks correct prerequisities
3849 ovs-ofctl: actions are invalid with specified match (OFPBAC_MATCH_INCONSISTENT)
3852 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])
3853 AT_CHECK([tail -2 stderr | sed 's/^.*|WARN|//'], [0], [dnl
3854 source field tcp_dst lacks correct prerequisites
3855 ovs-ofctl: actions are invalid with specified match (OFPBAC_MATCH_INCONSISTENT)
3858 AT_DATA([flows.txt], [dnl
3859 priority=75 tcp actions=load:42->OXM_OF_TCP_SRC[[0..7]],output:1
3861 AT_CHECK([ovs-ofctl -O OpenFlow12 replace-flows br0 flows.txt])
3863 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
3867 AT_CHECK([ovs-ofctl set-frags br0 $mode])
3868 for frag in 4000 6000 6008 4010; do
3869 printf "\n%s\n" "----$mode $frag-----"
3871 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"])
3874 AT_CHECK([ovs-appctl dpctl/dump-flows | sed 's/used:[[0-9]].[[0-9]]*s/used:0.001s/'], [0], [dnl
3875 flow-dump from non-dpdk interfaces:
3876 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
3877 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
3878 recirc_id(0),in_port(90),eth_type(0x0800),ipv4(proto=6,frag=later), packets:1, bytes:74, used:0.001s, actions:1
3881 AT_CHECK([ovs-appctl revalidator/purge], [0])
3882 AT_CHECK([ovs-ofctl set-frags br0 $mode])
3883 for frag in 4000 6000 6008 4010; do
3884 printf "\n%s\n" "----$mode $frag truncated transport header -----"
3886 AT_CHECK([ovs-appctl netdev-dummy/receive p90 "0021853763af 0026b98cb0f9 0800 4500 0018 2e24 $frag 40 06 465d ac11370d ac11370b 828b 0016"])
3889 AT_CHECK([ovs-appctl dpctl/dump-flows | sed 's/used:[[0-9]].[[0-9]]*s/used:0.001s/'], [0], [dnl
3890 flow-dump from non-dpdk interfaces:
3891 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
3892 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
3893 recirc_id(0),in_port(90),eth_type(0x0800),ipv4(proto=6,frag=later), packets:1, bytes:60, used:0.001s, actions:1
3896 AT_CHECK([ovs-appctl revalidator/purge], [0])
3897 AT_CHECK([ovs-ofctl set-frags br0 $mode])
3898 for frag in 4000 6000 6001 4002; do
3899 printf "\n%s\n" "----$mode $frag missing transport header-----"
3901 AT_CHECK([ovs-appctl netdev-dummy/receive p90 "0021853763af 0026b98cb0f9 0800 4500 0014 2e24 $frag 40 06 465d ac11370d ac11370b"])
3904 AT_CHECK([ovs-appctl dpctl/dump-flows | sed 's/used:[[0-9]].[[0-9]]*s/used:0.001s/'], [0], [dnl
3905 flow-dump from non-dpdk interfaces:
3906 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
3907 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
3908 recirc_id(0),in_port(90),eth_type(0x0800),ipv4(proto=6,frag=later), packets:1, bytes:60, used:0.001s, actions:1
3914 AT_SETUP([ofproto-dpif - exit])
3916 ADD_OF_PORTS([br0], [1], [2], [3], [10], [11], [12], [13], [14])
3917 AT_DATA([flows.txt], [dnl
3918 in_port=1 actions=output:10,exit,output:11
3919 in_port=2 actions=output:12,resubmit:1,output:12
3920 in_port=3 actions=output:13,resubmit:2,output:14
3922 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
3923 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])
3924 AT_CHECK([tail -1 stdout], [0],
3925 [Datapath actions: 10
3927 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])
3928 AT_CHECK([tail -1 stdout], [0],
3929 [Datapath actions: 12,10
3931 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])
3932 AT_CHECK([tail -1 stdout], [0],
3933 [Datapath actions: 13,12,10
3939 AT_SETUP([ofproto-dpif - mirroring, select_all])
3941 ADD_OF_PORTS([br0], 1, 2, 3)
3943 set Bridge br0 mirrors=@m --\
3944 --id=@p3 get Port p3 --\
3945 --id=@m create Mirror name=mymirror select_all=true output_port=@p3
3947 AT_DATA([flows.txt], [dnl
3948 in_port=1 actions=output:2
3949 in_port=2 actions=output:1
3951 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
3953 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)"
3954 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
3955 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
3956 [Datapath actions: 2,3
3959 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)"
3960 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
3961 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
3962 [Datapath actions: 1,3
3969 AT_SETUP([ofproto-dpif - mirroring, select_src])
3971 ADD_OF_PORTS([br0], 1, 2, 3)
3973 set Bridge br0 mirrors=@m --\
3974 --id=@p1 get Port p1 -- --id=@p3 get Port p3 --\
3975 --id=@m create Mirror name=mymirror select_src_port=@p1 output_port=@p3
3977 AT_DATA([flows.txt], [dnl
3978 in_port=1 actions=output:2
3979 in_port=2 actions=output:1
3981 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
3983 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)"
3984 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
3985 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
3986 [Datapath actions: 2,3
3989 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)"
3990 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
3991 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
3992 [Datapath actions: 1
3997 AT_SETUP([ofproto-dpif - mirroring, OFPP_NONE ingress port])
3999 ADD_OF_PORTS([br0], 1, 2)
4001 set Bridge br0 mirrors=@m --\
4002 --id=@p2 get Port p2 --\
4003 --id=@m create Mirror name=mymirror select_all=true output_port=@p2
4005 AT_CHECK([ovs-ofctl add-flow br0 action=output:1])
4007 # "in_port" defaults to OFPP_NONE if it's not specified.
4008 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"
4009 AT_CHECK([ovs-appctl ofproto/trace br0 "$flow"], [0], [stdout])
4010 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
4011 [Datapath actions: 1,2
4018 AT_SETUP([ofproto-dpif - mirroring, select_dst])
4020 ADD_OF_PORTS([br0], 1, 2, 3)
4022 set Bridge br0 mirrors=@m --\
4023 --id=@p2 get Port p2 -- --id=@p3 get Port p3 --\
4024 --id=@m create Mirror name=mymirror select_dst_port=@p2 output_port=@p3
4026 AT_DATA([flows.txt], [dnl
4027 in_port=1 actions=output:2
4028 in_port=2 actions=output:1
4030 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
4032 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)"
4033 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
4034 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
4035 [Datapath actions: 2,3
4038 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)"
4039 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
4040 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
4041 [Datapath actions: 1
4048 AT_SETUP([ofproto-dpif - mirroring, select_vlan])
4050 ADD_OF_PORTS([br0], 1, 2, 3)
4052 set Bridge br0 mirrors=@m --\
4053 --id=@p2 get Port p2 -- --id=@p3 get Port p3 --\
4054 --id=@m create Mirror name=mymirror select_all=true select_vlan=11 output_port=@p3
4056 AT_DATA([flows.txt], [dnl
4057 in_port=1, actions=output:2
4059 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
4061 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)"
4062 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
4063 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
4064 [Datapath actions: 2
4067 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))"
4068 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
4069 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
4070 [Datapath actions: 2
4073 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))"
4074 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
4075 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
4076 [Datapath actions: 2,3
4083 AT_SETUP([ofproto-dpif - mirroring, output_port])
4085 ADD_OF_PORTS([br0], 1, 2, 3)
4087 set Bridge br0 mirrors=@m --\
4088 --id=@p3 get Port p3 --\
4089 --id=@m create Mirror name=mymirror select_all=true output_port=@p3
4091 AT_DATA([flows.txt], [dnl
4092 in_port=1 actions=mod_vlan_vid:17,output:2
4093 in_port=2 actions=output:1
4095 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
4097 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)"
4098 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
4099 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
4100 [Datapath actions: push_vlan(vid=17,pcp=0),2,pop_vlan,3
4103 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)"
4104 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
4105 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
4106 [Datapath actions: 1,3
4112 AT_SETUP([ofproto-dpif - mirroring, output_vlan])
4114 ADD_OF_PORTS([br0], 1, 2)
4116 set Bridge br0 mirrors=@m --\
4117 --id=@m create Mirror name=mymirror select_all=true output_vlan=12
4119 AT_DATA([flows.txt], [dnl
4120 in_port=1 actions=output:2
4121 in_port=2 actions=mod_vlan_vid:17,output:1
4123 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
4125 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)"
4126 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
4127 actual=`tail -1 stdout | sed 's/Datapath actions: //'`
4129 expected="2,push_vlan(vid=12,pcp=0),1,2,100"
4130 AT_CHECK([ovs-dpctl normalize-actions "$flow" "$expected"], [0], [stdout])
4132 AT_CHECK([ovs-dpctl normalize-actions "$flow" "$actual"], [0], [expout])
4134 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)"
4135 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
4136 actual=`tail -1 stdout | sed 's/Datapath actions: //'`
4138 expected="push_vlan(vid=17,pcp=0),1,pop_vlan,push_vlan(vid=12,pcp=0),1,2,100"
4139 AT_CHECK([ovs-dpctl normalize-actions "$flow" "$expected"], [0], [stdout])
4141 AT_CHECK([ovs-dpctl normalize-actions "$flow" "$actual"], [0], [expout])
4146 # Two testcases below are for the ofproto/trace command
4147 # The first one tests all correct syntax:
4148 # ofproto/trace [dp_name] odp_flow [-generate|packet]
4149 # ofproto/trace br_name br_flow [-generate|packet]
4150 AT_SETUP([ofproto-dpif - ofproto/trace command 1])
4151 OVS_VSWITCHD_START([set bridge br0 fail-mode=standalone])
4152 ADD_OF_PORTS([br0], 1, 2, 3)
4154 AT_DATA([flows.txt], [dnl
4155 in_port=1 actions=output:2
4156 in_port=2 actions=output:1
4158 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
4160 odp_flow="in_port(p1)"
4162 # Test command: ofproto/trace odp_flow with in_port as a name.
4163 AT_CHECK([ovs-appctl ofproto/trace "$odp_flow"], [0], [stdout])
4164 AT_CHECK([tail -1 stdout], [0], [dnl
4168 odp_flow="in_port(1)"
4169 # Test command: ofproto/trace odp_flow
4170 AT_CHECK([ovs-appctl ofproto/trace "$odp_flow"], [0], [stdout])
4171 AT_CHECK([tail -1 stdout], [0], [dnl
4175 # Test command: ofproto/trace dp_name odp_flow
4176 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$odp_flow"], [0], [stdout])
4177 AT_CHECK([tail -1 stdout], [0], [dnl
4180 # Test commmand: ofproto/trace br_name br_flow
4181 AT_CHECK([ovs-appctl ofproto/trace br0 "$br_flow"], [0], [stdout])
4182 AT_CHECK([tail -1 stdout], [0], [dnl
4186 # Delete the inserted flows
4187 AT_CHECK([ovs-ofctl del-flows br0 "in_port=1"], [0], [stdout])
4188 AT_CHECK([ovs-ofctl del-flows br0 "in_port=2"], [0], [stdout])
4190 # This section below tests the [-generate] option
4191 odp_flow="in_port(3),eth(src=50:54:00:00:00:05,dst=ff:ff:ff:ff:ff:ff)"
4192 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"
4194 # Test command: ofproto/trace odp_flow
4195 AT_CHECK([ovs-appctl ofproto/trace "$odp_flow"], [0], [stdout])
4196 # Check for no MAC learning entry
4197 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
4201 # Test command: ofproto/trace br_name br_flow
4202 AT_CHECK([ovs-appctl ofproto/trace br0 "$br_flow"], [0], [stdout])
4203 # Check for no MAC learning entry
4204 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
4208 # Test command: ofproto/trace odp_flow -generate
4209 AT_CHECK([ovs-appctl ofproto/trace "$odp_flow" -generate], [0], [stdout])
4210 # Check for the MAC learning entry
4211 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
4213 3 0 50:54:00:00:00:05 ?
4216 # Test command: ofproto/trace dp_name odp_flow -generate
4217 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy \
4218 "in_port(1),eth(src=50:54:00:00:00:06,dst=50:54:00:00:00:05)" \
4219 -generate], [0], [stdout])
4220 # Check for both MAC learning entries
4221 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
4223 3 0 50:54:00:00:00:05 ?
4224 1 0 50:54:00:00:00:06 ?
4227 # Test command: ofproto/trace br_name br_flow -generate
4228 AT_CHECK([ovs-appctl ofproto/trace br0 \
4229 "in_port=2,dl_src=50:54:00:00:00:07,dl_dst=50:54:00:00:00:06" \
4230 -generate], [0], [stdout])
4231 # Check for both MAC learning entries.
4232 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
4234 3 0 50:54:00:00:00:05 ?
4235 1 0 50:54:00:00:00:06 ?
4236 2 0 50:54:00:00:00:07 ?
4239 # This section beflow tests the [packet] option
4240 # The ovs-tcpundump of packets between port1 and port2
4241 pkt1to2="50540000000250540000000108064500001C000100004001F98CC0A80001C0A800020800F7FF00000000"
4242 pkt2to1="50540000000150540000000208064500001C000100004001F98CC0A80002C0A800010800F7FF00000000"
4244 # Construct the MAC learning table
4245 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy \
4246 "in_port(1),eth(src=50:54:00:00:00:01,dst=ff:ff:ff:ff:ff:ff)" \
4247 -generate], [0], [stdout])
4249 # Construct the MAC learning table
4250 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy \
4251 "in_port(2),eth(src=50:54:00:00:00:02,dst=ff:ff:ff:ff:ff:ff)" \
4252 -generate], [0], [stdout])
4254 # Test command: ofproto/trace odp_flow packet
4255 AT_CHECK([ovs-appctl ofproto/trace \
4256 "in_port(1),skb_priority(1),skb_mark(2)" "$pkt1to2"], [0], [stdout])
4257 AT_CHECK([tail -1 stdout], [0], [dnl
4260 AT_CHECK([head -n 2 stdout], [0], [dnl
4262 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
4265 # Test command: ofproto/trace dp_name odp_flow packet
4266 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy \
4267 "in_port(1),skb_priority(1),skb_mark(2)" "$pkt1to2"], [0], [stdout])
4268 AT_CHECK([tail -1 stdout], [0], [dnl
4271 AT_CHECK([head -n 2 stdout], [0], [dnl
4273 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
4276 # Test command: ofproto/trace br_name br_flow packet
4277 AT_CHECK([ovs-appctl ofproto/trace br0 \
4278 "in_port=2,skb_priority=2,pkt_mark=1" "$pkt2to1"], [0], [stdout],[stderr])
4279 AT_CHECK([tail -1 stdout], [0], [dnl
4282 AT_CHECK([head -n 2 stdout], [0], [dnl
4284 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
4290 # The second test tests the corner cases
4291 AT_SETUP([ofproto-dpif - ofproto/trace command 2])
4293 ADD_OF_PORTS([br0], 1, 2)
4296 odp_flow="in_port(1),eth(src=50:54:00:00:00:01,dst=50:54:00:00:00:02)"
4297 br_flow="in_port=1,dl_src=50:54:00:00:00:01,dl_dst=50:54:00:00:00:02"
4299 generate="-generate"
4300 pkt="50540000000250540000000108064500001C000100004001F98CC0A80001C0A800020800F7FF00000000"
4302 # Test incorrect command: ofproto/trace wrong_name odp_flow [-generate|packet]
4308 [AT_CHECK([ovs-appctl ofproto/trace wrong_name "$odp_flow" option],
4310 AT_CHECK([tail -2 stderr], [0], [dnl
4311 Cannot find the datapath
4312 ovs-appctl: ovs-vswitchd: server returned an error
4315 # Test incorrect command: ofproto/trace empty_string odp_flow [-generate|packet]
4321 [AT_CHECK([ovs-appctl ofproto/trace "" "$odp_flow" option],
4323 AT_CHECK([tail -2 stderr], [0], [dnl
4324 Cannot find the datapath
4325 ovs-appctl: ovs-vswitchd: server returned an error
4328 # Test incorrect command: ofproto/trace nonexist_dp_name odp_flow [-generate|packet]
4334 [AT_CHECK([ovs-appctl ofproto/trace ovs-system "$odp_flow" option],
4336 AT_CHECK([tail -2 stderr], [0], [dnl
4337 Cannot find the datapath
4338 ovs-appctl: ovs-vswitchd: server returned an error
4341 # Test incorrect command: ofproto/trace br_name odp_flow [-generate|packet]
4347 [AT_CHECK([ovs-appctl ofproto/trace br0 "$odp_flow" option],
4349 AT_CHECK([tail -2 stderr], [0], [dnl
4350 Cannot find the datapath
4351 ovs-appctl: ovs-vswitchd: server returned an error
4354 # Test incorrect command: ofproto/trace dp_name br_flow [-generate|packet]
4360 [AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$br_flow" option],
4362 AT_CHECK([tail -2 stderr], [0], [dnl
4364 ovs-appctl: ovs-vswitchd: server returned an error
4367 # Test incorrect command: ofproto/trace br_flow [-generate|packet]
4373 [AT_CHECK([ovs-appctl ofproto/trace "$br_flow" option],
4375 AT_CHECK([tail -2 stderr], [0], [dnl
4376 Must specify bridge name
4377 ovs-appctl: ovs-vswitchd: server returned an error
4380 # Test incorrect command: ofproto/trace dp_name odp_flow garbage_option
4381 AT_CHECK([ovs-appctl ofproto/trace \
4382 ovs-dummy "$odp_flow" garbage_option],
4383 [2], [stdout],[stderr])
4384 AT_CHECK([tail -2 stderr], [0], [dnl
4385 Trailing garbage in packet data
4386 ovs-appctl: ovs-vswitchd: server returned an error
4389 # Test incorrect command: ofproto/trace with 4 arguments
4390 AT_CHECK([ovs-appctl ofproto/trace \
4391 arg1, arg2, arg3, arg4], [2], [stdout],[stderr])
4392 AT_CHECK([tail -2 stderr], [0], [dnl
4393 "ofproto/trace" command takes at most 3 arguments
4394 ovs-appctl: ovs-vswitchd: server returned an error
4397 # Test incorrect command: ofproto/trace with 0 argument
4398 AT_CHECK([ovs-appctl ofproto/trace ], [2], [stdout],[stderr])
4399 AT_CHECK([tail -2 stderr], [0], [dnl
4400 "ofproto/trace" command requires at least 1 arguments
4401 ovs-appctl: ovs-vswitchd: server returned an error
4407 # The third test checks that the output of "ovs-dpctl -m" is valid to trace.
4408 AT_SETUP([ofproto-dpif - ofproto/trace from dpctl output])
4409 OVS_VSWITCHD_START([dnl
4410 set Open_vSwitch . other_config:max-idle=10000 \
4411 -- add-port br0 p1 -- set Interface p1 type=dummy])
4413 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)'])
4414 ovs-appctl revalidator/wait
4415 AT_CHECK([ovs-appctl dpif/dump-flows -m br0 | sed 's/, packets.*$//' > dp_flows1.txt])
4417 odp_flow=`cat dp_flows1.txt`
4418 AT_CHECK([ovs-appctl ofproto/trace "$odp_flow" | sed 's/\([[Ff]]low:\).*/\1 <cleared>/'], [0], [dnl
4421 No match, packets dropped because OFPPC_NO_PACKET_IN is set on in_port.
4423 Rule: table=254 cookie=0 priority=0,reg0=0x2
4424 OpenFlow actions=drop
4426 Final flow: <cleared>
4428 Datapath actions: drop
4431 dnl Now, try again without megaflows:
4432 ovs-appctl upcall/disable-megaflows
4434 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)'])
4435 ovs-appctl revalidator/wait
4436 AT_CHECK([ovs-appctl dpif/dump-flows -m br0 | sed 's/, packets.*$//' > dp_flows2.txt])
4438 odp_flow=`cat dp_flows2.txt`
4439 AT_CHECK([ovs-appctl ofproto/trace "$odp_flow" | sed 's/\([[Ff]]low:\).*/\1 <cleared>/'], [0], [dnl
4442 No match, packets dropped because OFPPC_NO_PACKET_IN is set on in_port.
4444 Rule: table=254 cookie=0 priority=0,reg0=0x2
4445 OpenFlow actions=drop
4447 Final flow: <cleared>
4449 Datapath actions: drop
4455 AT_SETUP([ofproto-dpif - ofproto/trace-packet-out])
4457 ADD_OF_PORTS([br0], 1, 2, 3)
4459 AT_DATA([flows.txt], [dnl
4460 in_port=1 actions=output:2
4461 in_port=2 actions=output:1
4463 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
4465 AT_CHECK([ovs-appctl ofproto/trace-packet-out br0 in_port=1 'mod_vlan_vid:123,resubmit(,0)'], [0], [stdout])
4466 AT_CHECK([tail -1 stdout], [0], [dnl
4467 Datapath actions: push_vlan(vid=123,pcp=0),2
4474 m4_define([OFPROTO_TRACE],
4476 AT_CHECK([ovs-appctl ofproto/trace $1 "$flow" $3], [0], [stdout])
4477 actual=`tail -1 stdout | sed 's/Datapath actions: //'`
4479 AT_CHECK([ovs-dpctl normalize-actions "$flow" "$expected" $5],
4482 AT_CHECK([ovs-dpctl normalize-actions "$flow" "$actual" $5],
4485 AT_SETUP([ofproto-dpif - MAC learning])
4486 OVS_VSWITCHD_START([set bridge br0 fail-mode=standalone])
4487 ADD_OF_PORTS([br0], 1, 2, 3)
4489 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)'
4491 # Trace an ARP packet arriving on p3, to create a MAC learning entry.
4494 [in_port(3),eth(src=50:54:00:00:00:05,dst=ff:ff:ff:ff:ff:ff),$arp],
4498 # Check for the MAC learning entry.
4499 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
4501 3 0 50:54:00:00:00:05 ?
4504 # Trace a packet arrival destined for the learned MAC.
4505 # (This will also learn a MAC.)
4508 [in_port(1),eth(src=50:54:00:00:00:06,dst=50:54:00:00:00:05),$arp],
4512 # Check for both MAC learning entries.
4513 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
4515 3 0 50:54:00:00:00:05 ?
4516 1 0 50:54:00:00:00:06 ?
4519 # Trace a packet arrival that updates the first learned MAC entry.
4522 [in_port(2),eth(src=50:54:00:00:00:05,dst=ff:ff:ff:ff:ff:ff),$arp],
4526 # Check that the MAC learning entry was updated.
4527 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
4529 1 0 50:54:00:00:00:06 ?
4530 2 0 50:54:00:00:00:05 ?
4533 # Add another bridge.
4537 -- set bridge br1 datapath-type=dummy])
4538 ADD_OF_PORTS([br1], 4, 5)
4540 # Trace some packet arrivals in br1 to create MAC learning entries there too.
4543 [in_port(4),eth(src=50:54:00:00:00:06,dst=ff:ff:ff:ff:ff:ff),$arp],
4548 [in_port(5),eth(src=50:54:00:00:00:07,dst=ff:ff:ff:ff:ff:ff),$arp],
4552 # Check that the MAC learning entries were added.
4553 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br1 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
4555 4 0 50:54:00:00:00:06 ?
4556 5 0 50:54:00:00:00:07 ?
4559 # Delete port p1 and see that its MAC learning entry disappeared, and
4560 # that the MAC learning entry for the same MAC was also deleted from br1.
4561 AT_CHECK([ovs-vsctl del-port p1])
4562 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
4564 2 0 50:54:00:00:00:05 ?
4566 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br1 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
4568 5 0 50:54:00:00:00:07 ?
4574 AT_SETUP([ofproto-dpif - MAC table overflow])
4576 [set bridge br0 fail-mode=standalone other-config:mac-table-size=10])
4577 ADD_OF_PORTS([br0], 1, 2, 3)
4579 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)'
4581 AT_CHECK([ovs-appctl time/stop])
4583 # Trace 10 ARP packets arriving on p3, to create MAC learning entries.
4584 for i in 0 1 2 3 4 5 6 7 8 9; do
4587 [in_port(3),eth(src=50:54:00:00:00:0$i,dst=ff:ff:ff:ff:ff:ff),$arp],
4590 ovs-appctl time/warp 1000
4593 # Check for the MAC learning entries.
4594 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/ *[[0-9]]\{1,\}$//' | sort],
4596 3 0 50:54:00:00:00:00
4597 3 0 50:54:00:00:00:01
4598 3 0 50:54:00:00:00:02
4599 3 0 50:54:00:00:00:03
4600 3 0 50:54:00:00:00:04
4601 3 0 50:54:00:00:00:05
4602 3 0 50:54:00:00:00:06
4603 3 0 50:54:00:00:00:07
4604 3 0 50:54:00:00:00:08
4605 3 0 50:54:00:00:00:09
4609 # Trace another ARP packet on another MAC.
4612 [in_port(3),eth(src=50:54:00:00:00:10,dst=ff:ff:ff:ff:ff:ff),$arp],
4616 # Check that the new one chased the oldest one out of the table.
4617 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/' | sort],
4619 3 0 50:54:00:00:00:01 ?
4620 3 0 50:54:00:00:00:02 ?
4621 3 0 50:54:00:00:00:03 ?
4622 3 0 50:54:00:00:00:04 ?
4623 3 0 50:54:00:00:00:05 ?
4624 3 0 50:54:00:00:00:06 ?
4625 3 0 50:54:00:00:00:07 ?
4626 3 0 50:54:00:00:00:08 ?
4627 3 0 50:54:00:00:00:09 ?
4628 3 0 50:54:00:00:00:10 ?
4634 AT_SETUP([ofproto-dpif - MAC table overflow fairness])
4636 [set bridge br0 fail-mode=standalone other-config:mac-table-size=10])
4637 ADD_OF_PORTS([br0], 1, 2, 3, 4, 5, 6)
4639 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)'
4641 AT_CHECK([ovs-appctl time/stop])
4643 # Trace packets with 2 different source MACs arriving on each of the 5
4644 # ports, filling up the 10-entry learning table.
4645 for i in 0 1 2 3 4 5 6 7 8 9; do
4647 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
4648 ovs-appctl time/warp 1000
4651 # Check for the MAC learning entries.
4652 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/ *[[0-9]]\{1,\}$//' | sort],
4654 1 0 50:54:00:00:00:00
4655 1 0 50:54:00:00:00:01
4656 2 0 50:54:00:00:00:02
4657 2 0 50:54:00:00:00:03
4658 3 0 50:54:00:00:00:04
4659 3 0 50:54:00:00:00:05
4660 4 0 50:54:00:00:00:06
4661 4 0 50:54:00:00:00:07
4662 5 0 50:54:00:00:00:08
4663 5 0 50:54:00:00:00:09
4667 # Now trace 16 new MACs on another port.
4668 for i in 0 1 2 3 4 5 6 7 8 9 a b c d e f; do
4669 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
4670 ovs-appctl time/warp 1000
4673 # Check the results.
4675 # Our eviction algorithm on overflow is that an arbitrary (but deterministic)
4676 # one of the ports with the most learned MACs loses the least recently used
4677 # one. Thus, the new port will end up with 3 MACs, 3 of the old ports with 1
4678 # MAC each, and the other 2 of the old ports with 2 MACs each.
4680 # (If someone changes lib/heap.c to do something different with equal-priority
4681 # nodes, then the output below could change, but it would still follow the
4682 # rules explained above.)
4683 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/ *[[0-9]]\{1,\}$//' | sort],
4685 1 0 50:54:00:00:00:01
4686 2 0 50:54:00:00:00:03
4687 3 0 50:54:00:00:00:04
4688 3 0 50:54:00:00:00:05
4689 4 0 50:54:00:00:00:07
4690 5 0 50:54:00:00:00:08
4691 5 0 50:54:00:00:00:09
4692 6 0 50:54:00:00:0d:ff
4693 6 0 50:54:00:00:0e:ff
4694 6 0 50:54:00:00:0f:ff
4700 # CHECK_SFLOW_SAMPLING_PACKET(LOOPBACK_ADDR, ADDR_WITHOUT_BRACKETS)
4702 # Test that sFlow samples packets correctly using IPv4/IPv6 sFlow collector
4704 # IP_VERSION_TYPE is used in AT_SETUP
4705 m4_define([CHECK_SFLOW_SAMPLING_PACKET],
4706 [AT_SETUP([ofproto-dpif - sFlow packet sampling - $2 collector])
4707 AT_XFAIL_IF([test "$IS_WIN32" = "yes"])
4708 OVS_VSWITCHD_START([set Bridge br0 fail-mode=standalone])
4710 ON_EXIT([kill `cat test-sflow.pid`])
4711 AT_CHECK([ovstest test-sflow --log-file --detach --no-chdir --pidfile 0:$1 > sflow.log], [0], [], [ignore])
4712 AT_CAPTURE_FILE([sflow.log])
4713 SFLOW_PORT=`parse_listening_port < test-sflow.log`
4714 ovs-appctl time/stop
4716 ADD_OF_PORTS([br0], 1, 2)
4718 set Interface br0 options:ifindex=1002 -- \
4719 set Interface p1 options:ifindex=1004 -- \
4720 set Interface p2 options:ifindex=1003 -- \
4721 set Bridge br0 sflow=@sf -- \
4722 --id=@sf create sflow targets=\"$1:$SFLOW_PORT\" \
4723 header=128 sampling=1 polling=1 agent=$LOOPBACK_INTERFACE
4725 dnl open with ARP packets to seed the bridge-learning. The output
4726 dnl ifIndex numbers should be reported predictably after that.
4727 dnl Since we set sampling=1 we should see all of these packets
4728 dnl reported. Sorting the output by data-source and seqNo makes
4729 dnl it deterministic. Ensuring that we send at least two packets
4730 dnl into each port means we get to check the seq nos are
4731 dnl incrementing correctly.
4732 dnl because packets from different ports can be handled by separate
4733 dnl threads, put some sleeps
4735 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)'
4737 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)'
4739 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)'
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(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)'
4742 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)'
4744 dnl sleep long enough to get more than one counter sample
4745 dnl from each datasource so we can check sequence numbers
4746 ovs-appctl time/warp 3000 100
4748 ovs-appctl -t test-sflow exit
4750 AT_CHECK_UNQUOTED([[sort sflow.log | $EGREP 'HEADER|ERROR' | sed 's/ /\
4771 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
4791 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
4811 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
4831 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
4851 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
4854 AT_CHECK_UNQUOTED([[sort sflow.log | $EGREP 'IFCOUNTERS|ERROR|PORTNAME|OPENFLOWPORT' | head -18 | sed 's/ /\
4868 in_broadcasts=4294967295
4871 in_unknownprotos=4294967295
4874 out_multicasts=4294967295
4875 out_broadcasts=4294967295
4891 in_broadcasts=4294967295
4894 in_unknownprotos=4294967295
4897 out_multicasts=4294967295
4898 out_broadcasts=4294967295
4914 in_broadcasts=4294967295
4917 in_unknownprotos=4294967295
4920 out_multicasts=4294967295
4921 out_broadcasts=4294967295
4937 in_broadcasts=4294967295
4940 in_unknownprotos=4294967295
4943 out_multicasts=4294967295
4944 out_broadcasts=4294967295
4960 in_broadcasts=4294967295
4963 in_unknownprotos=4294967295
4966 out_multicasts=4294967295
4967 out_broadcasts=4294967295
4983 in_broadcasts=4294967295
4986 in_unknownprotos=4294967295
4989 out_multicasts=4294967295
4990 out_broadcasts=4294967295
4995 datapath_id=18364758544493064720
4998 datapath_id=18364758544493064720
5001 datapath_id=18364758544493064720
5004 datapath_id=18364758544493064720
5007 datapath_id=18364758544493064720
5010 datapath_id=18364758544493064720
5027 CHECK_SFLOW_SAMPLING_PACKET([127.0.0.1], [IPv4])
5028 CHECK_SFLOW_SAMPLING_PACKET([[[::1]]], [IPv6])
5030 dnl Test sFlow LAG structures
5031 AT_SETUP([ofproto-dpif - sFlow LACP structures])
5032 AT_SKIP_IF([test "$IS_WIN32" = "yes"])
5033 OVS_VSWITCHD_START([dnl
5034 add-bond br0 bond p1 p2 -- \
5035 set Port bond lacp=active bond-mode=active-backup \
5036 other_config:lacp-time="fast" \
5037 other_config:lacp-system-id=11:22:33:44:55:66 \
5038 other_config:lacp-system-priority=54321 -- \
5039 set Interface p1 type=dummy \
5040 other_config:lacp-port-id=11 \
5041 other_config:lacp-port-priority=111 \
5042 other_config:lacp-aggregation-key=3333 -- \
5043 set Interface p2 type=dummy \
5044 other_config:lacp-port-id=22 \
5045 other_config:lacp-port-priority=222 \
5046 other_config:lacp-aggregation-key=3333 ])
5048 ON_EXIT([kill `cat test-sflow.pid`])
5049 AT_CHECK([ovstest test-sflow --log-file --detach --no-chdir --pidfile 0:127.0.0.1 > sflow.log], [0], [], [ignore])
5050 AT_CAPTURE_FILE([sflow.log])
5051 SFLOW_PORT=`parse_listening_port < test-sflow.log`
5053 ovs-appctl time/stop
5056 set Interface p1 options:ifindex=1003 -- \
5057 set Bridge br0 sflow=@sf -- \
5058 --id=@sf create sflow targets=\"127.0.0.1:$SFLOW_PORT\" \
5059 header=128 sampling=1 polling=1
5061 dnl sleep long enough to get the sFlow datagram flushed out (may be delayed for up to 1 second)
5062 AT_CHECK([ovs-appctl time/warp 2000 100], [0], [ignore])
5063 AT_CHECK([ovs-appctl revalidator/purge], [0])
5065 ovs-appctl -t test-sflow exit
5066 AT_CHECK([[sort sflow.log | $EGREP 'LACPCOUNTERS|ERROR' | head -n 1 | sed 's/ /\
5069 sysID=11:22:33:44:55:66
5070 partnerID=00:00:00:00:00:00
5077 markerPDUsRx=4294967295
5078 markerRespPDUsRx=4294967295
5079 unknownRx=4294967295
5082 markerPDUsTx=4294967295
5083 markerRespPDUsTx=4294967295
5088 # CHECK_NETFLOW_EXPIRATION(LOOPBACK_ADDR, IP_VERSION_TYPE)
5090 # Test that basic NetFlow reports flow statistics correctly:
5091 # The initial packet of a flow are correctly accounted.
5092 # Later packets within a flow are correctly accounted.
5093 # Flow actions changing (in this case, due to MAC learning)
5094 # cause a record to be sent.
5096 # IP_VERSION_TYPE is used in AT_SETUP
5097 m4_define([CHECK_NETFLOW_EXPIRATION],
5098 [AT_SETUP([ofproto-dpif - NetFlow flow expiration - $2 collector])
5099 OVS_VSWITCHD_START([set Bridge br0 fail-mode=standalone])
5100 ADD_OF_PORTS([br0], 1, 2)
5102 ovs-appctl time/stop
5103 ON_EXIT([kill `cat test-netflow.pid`])
5104 AT_CHECK([ovstest test-netflow --log-file --detach --no-chdir --pidfile 0:$1 > netflow.log], [0], [], [ignore])
5105 AT_CAPTURE_FILE([netflow.log])
5106 NETFLOW_PORT=`parse_listening_port < test-netflow.log`
5109 set Bridge br0 netflow=@nf -- \
5110 --id=@nf create NetFlow targets=\"$1:$NETFLOW_PORT\" \
5111 engine_id=1 engine_type=2 active_timeout=30 add-id-to-interface=false
5113 for delay in 1000 30000; do
5114 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)'
5115 sleep 1 # ensure the order in which these two packets are processed
5116 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)'
5118 ovs-appctl time/warp $delay
5121 ovs-appctl time/warp 6000
5122 ovs-appctl revalidator/wait
5124 ovs-appctl -t test-netflow exit
5126 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])
5128 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])
5130 combined=`grep "192.168.0.2 > 192.168.0.1, if 2 > 1, 2 pkts, 120 bytes, ICMP 0:0" netflow.log | wc -l`
5131 separate=`grep "192.168.0.2 > 192.168.0.1, if 2 > 1, 1 pkts, 60 bytes, ICMP 0:0" netflow.log | wc -l`
5132 AT_CHECK([test $separate = 2 || test $combined = 1], [0])
5136 CHECK_NETFLOW_EXPIRATION([127.0.0.1], [IPv4])
5137 CHECK_NETFLOW_EXPIRATION([[[::1]]], [IPv6])
5139 # CHECK_NETFLOW_ACTIVE_EXPIRATION(LOOPBACK_ADDR, IP_VERSION_TYPE)
5141 # Test that basic NetFlow reports active expirations correctly.
5143 # IP_VERSION_TYPE is used in AT_SETUP
5144 m4_define([CHECK_NETFLOW_ACTIVE_EXPIRATION],
5145 [AT_SETUP([ofproto-dpif - NetFlow active expiration - $2 collector])
5147 OVS_VSWITCHD_START([set Bridge br0 fail-mode=standalone])
5148 ADD_OF_PORTS([br0], 1, 2)
5150 ON_EXIT([kill `cat test-netflow.pid`])
5151 AT_CHECK([ovstest test-netflow --log-file --detach --no-chdir --pidfile 0:$1 > netflow.log], [0], [], [ignore])
5152 AT_CAPTURE_FILE([netflow.log])
5153 NETFLOW_PORT=`parse_listening_port < test-netflow.log`
5156 set Bridge br0 netflow=@nf -- \
5157 --id=@nf create NetFlow targets=\"$1:$NETFLOW_PORT\" \
5158 engine_id=1 engine_type=2 active_timeout=10 add-id-to-interface=false
5160 AT_CHECK([ovs-appctl time/stop])
5162 while test $n -le 60; do
5165 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)'
5166 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)'
5168 ovs-appctl time/warp 1000
5171 ovs-appctl time/warp 10000
5173 ovs-appctl revalidator/wait
5175 ovs-appctl -t test-netflow exit
5177 # Count the number of reported packets:
5178 # - From source to destination before MAC learning kicks in (just one).
5179 # - From source to destination after that.
5180 # - From destination to source.
5188 pkts=`echo "$line" | sed 's/.*, \([[0-9]]*\) pkts,.*/\1/'`
5195 "seq "*": 192.168.0.1 > 192.168.0.2, if 1 > 65535, "*" pkts, "*" bytes, TCP 1234 > 80, time "*)
5198 "seq "*": 192.168.0.1 > 192.168.0.2, if 1 > 2, "*" pkts, "*" bytes, TCP 1234 > 80, time "*)
5201 "seq "*": 192.168.0.2 > 192.168.0.1, if 2 > 1, "*" pkts, "*" bytes, TCP 80 > 1234, time "*)
5208 eval $counter=\`expr \$$counter + \$pkts\`
5209 n_recs=`expr $n_recs + 1`
5212 # There should be exactly 1 MAC learning packet,
5213 # exactly 59 other packets in that direction,
5214 # and exactly 60 packets in the other direction.
5215 AT_CHECK([echo $n_learn $n_in $n_out $n_other], [0], [1 59 60 0
5220 CHECK_NETFLOW_ACTIVE_EXPIRATION([127.0.0.1], [IPv4])
5221 CHECK_NETFLOW_ACTIVE_EXPIRATION([[[::1]]], [IPv6])
5223 AT_SETUP([ofproto-dpif - flow stats])
5225 AT_CHECK([ovs-ofctl add-flow br0 "ip,actions=NORMAL"])
5226 AT_CHECK([ovs-ofctl add-flow br0 "icmp,actions=NORMAL"])
5228 ovs-appctl time/stop
5230 for i in `seq 1 10`; do
5231 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)'
5234 AT_CHECK([ovs-appctl time/warp 1000], [0], [ignore])
5235 AT_CHECK([ovs-appctl revalidator/purge], [0])
5236 AT_CHECK([ovs-ofctl dump-flows br0], [0], [stdout])
5237 AT_CHECK([STRIP_XIDS stdout | sed -n 's/duration=[[0-9]]*\.[[0-9]]*s/duration=0.0s/p' | sort], [0], [dnl
5238 cookie=0x0, duration=0.0s, table=0, n_packets=0, n_bytes=0, idle_age=1, icmp actions=NORMAL
5239 cookie=0x0, duration=0.0s, table=0, n_packets=10, n_bytes=600, idle_age=1, ip actions=NORMAL
5244 AT_SETUP([ofproto-dpif - flow stats, set-n-threads])
5246 AT_CHECK([ovs-ofctl add-flow br0 "ip,actions=NORMAL"])
5247 AT_CHECK([ovs-ofctl add-flow br0 "icmp,actions=NORMAL"])
5249 ovs-appctl time/stop
5251 for i in `seq 1 10`; do
5252 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)'
5255 ovs-appctl time/warp 100
5256 AT_CHECK([ovs-vsctl set Open_vSwitch . other-config:n-revalidator-threads=2])
5257 ovs-appctl time/warp 1000
5259 AT_CHECK([ovs-ofctl dump-flows br0], [0], [stdout])
5260 AT_CHECK([STRIP_XIDS stdout | sed -n 's/duration=[[0-9]]*\.[[0-9]]*s/duration=0.0s/p' | sort], [0], [dnl
5261 cookie=0x0, duration=0.0s, table=0, n_packets=0, n_bytes=0, idle_age=1, icmp actions=NORMAL
5262 cookie=0x0, duration=0.0s, table=0, n_packets=10, n_bytes=600, idle_age=1, ip actions=NORMAL
5267 AT_SETUP([ofproto-dpif - idle_age and hard_age increase over time])
5270 # get_ages DURATION HARD IDLE
5272 # Fetch the flow duration, hard age, and idle age into the variables
5273 # whose names are given as arguments. Rounds DURATION down to the
5274 # nearest integer. If hard_age doesn't appear in the output, sets
5275 # HARD to "none". If idle_age doesn't appear in the output, sets IDLE
5278 AT_CHECK([ovs-ofctl dump-flows br0], [0], [stdout])
5280 duration=`sed -n 's/.*duration=\([[0-9]]*\)\(\.[[0-9]]*\)\{0,1\}s.*/\1/p' stdout`
5281 AT_CHECK([[expr X"$duration" : 'X[0-9][0-9]*$']], [0], [ignore])
5282 AS_VAR_COPY([$1], [duration])
5284 hard=`sed -n 's/.*hard_age=\([[0-9]]*\),.*/\1/p' stdout`
5285 if test X"$hard" = X; then
5288 AT_CHECK([[expr X"$hard" : 'X[0-9][0-9]*$']], [0], [ignore])
5290 AS_VAR_COPY([$2], [hard])
5292 idle=`sed -n 's/.*idle_age=\([[0-9]]*\),.*/\1/p' stdout`
5293 if test X"$idle" = X; then
5296 AT_CHECK([[expr X"$idle" : 'X[0-9][0-9]*$']], [0], [ignore])
5298 AS_VAR_COPY([$3], [idle])
5301 # Add a flow and get its initial hard and idle age.
5302 AT_CHECK([ovs-ofctl add-flow br0 hard_timeout=199,idle_timeout=188,actions=drop])
5303 get_ages duration1 hard1 idle1
5305 ovs-appctl time/stop
5306 # Warp time forward by 10 seconds, then modify the flow's actions.
5307 ovs-appctl time/warp 10000
5308 get_ages duration2 hard2 idle2
5309 AT_CHECK([ovs-ofctl mod-flows br0 actions=flood])
5311 # Warp time forward by 10 seconds.
5312 ovs-appctl time/warp 10000
5313 get_ages duration3 hard3 idle3
5315 # Warp time forward 10 more seconds, then pass some packets through the flow,
5316 # then warp forward a few more times because idle times are only updated
5318 ovs-appctl time/warp 10000
5319 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)'
5320 ovs-appctl time/warp 3000 1000
5322 get_ages duration4 hard4 idle4
5324 printf "duration: %4s => %4s => %4s => %4s\n" $duration1 $duration2 $duration3 $duration4
5325 printf "hard_age: %4s => %4s => %4s => %4s\n" $hard1 $hard2 $hard3 $hard4
5326 printf "idle_age: %4s => %4s => %4s => %4s\n" $idle1 $idle2 $idle3 $idle4
5328 # Duration should increase steadily over time.
5329 AT_CHECK([test $duration1 -lt $duration2])
5330 AT_CHECK([test $duration2 -lt $duration3])
5331 AT_CHECK([test $duration3 -lt $duration4])
5333 # Hard age should be "none" initially because it's the same as flow_duration,
5334 # then it should increase.
5335 AT_CHECK([test $hard1 = none])
5336 AT_CHECK([test $hard2 = none])
5337 AT_CHECK([test $hard3 != none])
5338 AT_CHECK([test $hard4 != none])
5339 AT_CHECK([test $hard3 -lt $hard4])
5341 # Idle age should increase from 1 to 2 to 3, then decrease.
5342 AT_CHECK([test $idle1 -lt $idle2])
5343 AT_CHECK([test $idle2 -lt $idle3])
5344 AT_CHECK([test $idle3 -gt $idle4])
5346 # Check some invariant relationships.
5347 AT_CHECK([test $duration1 = $idle1])
5348 AT_CHECK([test $duration2 = $idle2])
5349 AT_CHECK([test $duration3 = $idle3])
5350 AT_CHECK([test $idle3 -gt $hard3])
5351 AT_CHECK([test $idle4 -lt $hard4])
5352 AT_CHECK([test $hard4 -lt $duration4])
5357 AT_SETUP([ofproto-dpif - fin_timeout])
5359 ovs-appctl time/stop
5360 AT_CHECK([ovs-ofctl add-flow br0 'idle_timeout=60,actions=fin_timeout(idle_timeout=5)'])
5361 AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip], [0],
5363 idle_timeout=60, actions=fin_timeout(idle_timeout=5)
5366 # Check that a TCP SYN packet does not change the timeout. (Because
5367 # flow stats updates are mainly what implements the fin_timeout
5368 # feature, we warp forward a couple of times to ensure that flow stats
5369 # run before re-checking the flow table.)
5370 AT_CHECK([ovs-appctl netdev-dummy/receive br0 0021853763af0026b98cb0f908004500003c2e2440004006465dac11370dac11370b828b0016751e267b00000000a00216d017360000020405b40402080a2d25085f0000000001030307])
5371 AT_CHECK([ovs-appctl time/warp 1000 && ovs-appctl time/warp 1000], [0], [warped
5374 AT_CHECK([ovs-appctl revalidator/purge], [0])
5375 AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip], [0],
5377 n_packets=1, n_bytes=74, idle_timeout=60, actions=fin_timeout(idle_timeout=5)
5379 # Check that a TCP FIN packet does change the timeout.
5380 AT_CHECK([ovs-appctl netdev-dummy/receive br0 0021853763af0026b98cb0f90800451000342e3e40004006463bac11370dac11370b828b0016751e319dfc96399b801100717ae800000101080a2d250a9408579588])
5381 AT_CHECK([ovs-appctl time/warp 1000 && ovs-appctl time/warp 1000], [0], [warped
5384 AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip], [0],
5386 n_packets=2, n_bytes=140, idle_timeout=5, actions=fin_timeout(idle_timeout=5)
5391 AT_SETUP([ofproto-dpif - ovs-appctl dpif/dump-dps])
5392 OVS_VSWITCHD_START([add-br br1 -- set bridge br1 datapath-type=dummy])
5393 ADD_OF_PORTS([br0], [1], [2])
5394 ADD_OF_PORTS([br1], [3])
5396 AT_CHECK([ovs-appctl dpif/dump-dps], [0], [dnl
5403 AT_SETUP([ofproto-dpif - ovs-appctl dpif/show])
5404 OVS_VSWITCHD_START([add-br br1 -- set bridge br1 datapath-type=dummy])
5405 ADD_OF_PORTS([br0], [1], [2])
5406 ADD_OF_PORTS([br1], [3])
5408 AT_CHECK([ovs-appctl dpif/show], [0], [dnl
5409 dummy@ovs-dummy: hit:0 missed:0
5411 br0 65534/100: (dummy)
5415 br1 65534/101: (dummy)
5421 AT_SETUP([ofproto-dpif - ovs-appctl dpif/dump-flows])
5422 # bump max-idle to avoid the flows being reclaimed behind us
5423 OVS_VSWITCHD_START([add-br br1 -- \
5424 set bridge br1 datapath-type=dummy fail-mode=secure -- \
5425 set Open_vSwitch . other_config:max-idle=10000])
5426 ADD_OF_PORTS([br0], [1], [2])
5427 ADD_OF_PORTS([br1], [3])
5429 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)'])
5430 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)'])
5431 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)'])
5432 ovs-appctl revalidator/wait
5433 AT_CHECK([ovs-appctl dpif/dump-flows br0 | STRIP_UFID | STRIP_USED | sort], [0], [dnl
5434 recirc_id(0),in_port(1),eth_type(0x0800),ipv4(frag=no), packets:0, bytes:0, used:never, actions:drop
5435 recirc_id(0),in_port(2),eth_type(0x0800),ipv4(frag=no), packets:0, bytes:0, used:never, actions:drop
5438 AT_CHECK([ovs-appctl dpif/dump-flows br1 | STRIP_UFID | STRIP_USED | sort], [0], [dnl
5439 recirc_id(0),in_port(3),eth_type(0x0800),ipv4(frag=no), packets:0, bytes:0, used:never, actions:drop
5442 AT_CHECK([ovs-appctl dpif/dump-flows -m br0 | STRIP_UFID | STRIP_USED | sort], [0], [dnl
5443 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
5444 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
5447 AT_CHECK([ovs-appctl dpif/dump-flows -m br1 | STRIP_UFID | STRIP_USED | sort], [0], [dnl
5448 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
5454 AT_SETUP([ofproto-dpif - ovs-appctl dpif/get-flow])
5456 OVS_VSWITCHD_START([add-br br1 -- \
5457 set bridge br1 datapath-type=dummy fail-mode=secure -- \
5458 set Open_vSwitch . other_config:max-idle=10000])
5459 ADD_OF_PORTS([br0], [1], [2])
5461 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)'])
5462 ovs-appctl revalidator/wait
5463 AT_CHECK([ovs-appctl dpif/dump-flows -m br0], [0], [stdout])
5465 UFID=`sed -n 's/\(ufid:[[-0-9a-fA-F]]*\).*/\1/p' stdout`
5466 AT_CHECK([ovs-appctl dpctl/get-flow $UFID], [0], [dnl
5467 recirc_id(0),in_port(1),eth_type(0x0800),ipv4(frag=no), packets:0, bytes:0, used:never, actions:drop
5473 AT_SETUP([ofproto-dpif - MPLS actions that result in a userspace action])
5474 OVS_VSWITCHD_START([dnl
5475 add-port br0 p1 -- set Interface p1 type=dummy
5477 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5478 ON_EXIT([kill `cat ovs-ofctl.pid`])
5480 AT_CAPTURE_FILE([ofctl_monitor.log])
5481 AT_DATA([flows.txt], [dnl
5482 dl_src=60:66:66:66:66:00 actions=push_mpls:0x8847,controller
5483 dl_src=60:66:66:66:66:01 actions=pop_mpls:0x8849,controller
5485 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5487 dnl Packet is sent to userspace because a MPLS push or pop action is applied to
5488 dnl a packet with 2 MPLS LSEs but dpif-netdev can't handle any labels.
5490 dnl The input is a frame with two MPLS labels which tcpdump -vve shows as:
5491 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)
5492 dnl (label 20, exp 0, [S], ttl 32)
5493 dnl (tos 0x0, ttl 64, id 0, offset 0, flags [none], proto TCP (6), length 44, bad cksum 3b78 (->f978)!)
5494 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
5496 for dl_src in 00 01; do
5497 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"])
5499 sleep 1 # wait for the datapath flow installed
5500 AT_CHECK_UNQUOTED([cat ovs-vswitchd.log | STRIP_UFID | FILTER_FLOW_INSTALL | STRIP_USED], [0], [dnl
5501 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))
5502 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))
5509 AT_SETUP([ofproto-dpif - MPLS actions that result in a drop])
5510 OVS_VSWITCHD_START([dnl
5511 add-port br0 p1 -- set Interface p1 type=dummy
5513 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5514 ON_EXIT([kill `cat ovs-ofctl.pid`])
5516 AT_CAPTURE_FILE([ofctl_monitor.log])
5517 AT_DATA([flows.txt], [dnl
5518 dl_src=60:66:66:66:66:00 actions=push_mpls:0x8847,controller
5519 dl_src=60:66:66:66:66:01 actions=pop_mpls:0x8849,controller
5521 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5523 dnl Packet is dropped because an MPLS PUSH action is applied to a packet with
5524 dnl 4 MPLS LSEs but ovs-vswtichd can only handle up to 3 MPLS LSEs and thus
5525 dnl can't determine the resulting MPLS label after MPLS push/pop actions.
5527 dnl The input is a frame with two MPLS headers which tcpdump -vve shows as:
5528 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)
5529 dnl (label 20, exp 0, ttl 32)
5530 dnl (label 20, exp 0, ttl 32)
5531 dnl (label 20, exp 0, [S], ttl 32)
5532 dnl (tos 0x0, ttl 64, id 0, offset 0, flags [none], proto TCP (6), length 44, bad cksum 3b78 (->f978)!)
5533 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
5535 for dl_src in 00 01; do
5536 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"])
5538 sleep 1 # wait for the datapath flow installed
5539 AT_CHECK_UNQUOTED([cat ovs-vswitchd.log | STRIP_UFID | FILTER_FLOW_INSTALL | STRIP_USED], [0], [dnl
5540 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))
5541 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))
5547 AT_SETUP([ofproto-dpif - patch ports])
5548 OVS_VSWITCHD_START([add-br br1 \
5549 -- set bridge br1 datapath-type=dummy fail-mode=secure \
5550 -- add-port br1 pbr1 -- set int pbr1 type=patch options:peer=pbr0 \
5551 -- add-port br0 pbr0 -- set int pbr0 type=patch options:peer=pbr1])
5553 ADD_OF_PORTS([br0], [2])
5554 ADD_OF_PORTS([br1], [3])
5556 AT_CHECK([ovs-appctl upcall/disable-ufid], [0], [Datapath dumping tersely using UFID disabled
5558 AT_CHECK([ovs-appctl time/stop])
5559 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5561 AT_CHECK([ovs-ofctl add-flow br0 actions=LOCAL,output:1,output:2])
5562 AT_CHECK([ovs-ofctl add-flow br1 actions=LOCAL,output:1,output:3])
5564 for i in $(seq 1 10); do
5565 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)'
5566 if [[ $i -eq 1 ]]; then
5571 for i in $(seq 1 5); do
5572 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)'
5573 if [[ $i -eq 1 ]]; then
5578 AT_CHECK([ovs-appctl time/warp 500], [0],
5581 sleep 1 # wait for log writer
5583 AT_CHECK([ovs-appctl dpif/show], [0], [dnl
5584 dummy@ovs-dummy: hit:13 missed:2
5586 br0 65534/100: (dummy)
5588 pbr0 1/none: (patch: peer=pbr1)
5590 br1 65534/101: (dummy)
5592 pbr1 1/none: (patch: peer=pbr0)
5595 AT_CHECK([cat ovs-vswitchd.log | STRIP_UFID | FILTER_FLOW_INSTALL | STRIP_USED], [0], [dnl
5596 recirc_id=0,ip,in_port=100,nw_frag=no, actions:101,3,2
5597 recirc_id=0,ip,in_port=101,nw_frag=no, actions:100,2,3
5600 AT_CHECK([cat ovs-vswitchd.log | grep -e 'in_port(100).*packets:9' | STRIP_UFID | FILTER_FLOW_DUMP], [0], [dnl
5601 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
5603 AT_CHECK([cat ovs-vswitchd.log | grep -e 'in_port(101).*packets:4' | STRIP_UFID | FILTER_FLOW_DUMP], [0], [dnl
5604 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
5607 AT_CHECK([ovs-ofctl dump-ports br0 pbr0], [0], [dnl
5608 OFPST_PORT reply (xid=0x4): 1 ports
5609 port 1: rx pkts=5, bytes=300, drop=0, errs=0, frame=0, over=0, crc=0
5610 tx pkts=10, bytes=600, drop=0, errs=0, coll=0
5613 AT_CHECK([ovs-ofctl dump-ports br1 pbr1], [0], [dnl
5614 OFPST_PORT reply (xid=0x4): 1 ports
5615 port 1: rx pkts=10, bytes=600, drop=0, errs=0, frame=0, over=0, crc=0
5616 tx pkts=5, bytes=300, drop=0, errs=0, coll=0
5622 AT_SETUP([ofproto-dpif - patch ports - stack])
5623 OVS_VSWITCHD_START([add-br br1 \
5624 -- set bridge br1 datapath-type=dummy fail-mode=secure \
5625 -- add-port br1 pbr1 -- set int pbr1 type=patch options:peer=pbr0 \
5626 -- add-port br0 pbr0 -- set int pbr0 type=patch options:peer=pbr1])
5628 ADD_OF_PORTS([br0], [2])
5629 ADD_OF_PORTS([br1], [3])
5631 AT_CHECK([ovs-appctl upcall/disable-ufid], [0], [Datapath dumping tersely using UFID disabled
5633 AT_CHECK([ovs-appctl time/stop])
5634 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5636 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"])
5637 # Try to pop from empty stack, and push and leave data to stack.
5638 AT_CHECK([ovs-ofctl add-flow br1 "ip actions=pop:OXM_OF_IPV4_DST[[0..31]],push:NXM_NX_REG1[[0..31]],LOCAL"])
5640 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)'
5642 AT_CHECK([ovs-appctl time/warp 500], [0],
5646 OVS_WAIT_UNTIL([test `grep flow_add ovs-vswitchd.log | wc -l` -ge 1])
5648 AT_CHECK([ovs-appctl dpif/show], [0], [dnl
5649 dummy@ovs-dummy: hit:0 missed:1
5651 br0 65534/100: (dummy)
5653 pbr0 1/none: (patch: peer=pbr1)
5655 br1 65534/101: (dummy)
5657 pbr1 1/none: (patch: peer=pbr0)
5660 AT_CHECK([cat ovs-vswitchd.log | STRIP_UFID | FILTER_FLOW_INSTALL | STRIP_USED], [0], [dnl
5661 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
5664 AT_CHECK([cat ovs-vswitchd.log | grep -e '|nx_match|WARN|' | sed "s/^.*|WARN|//"], [0], [dnl
5665 Failed to pop from an empty stack. On flow
5668 OVS_VSWITCHD_STOP(["/Failed to pop from an empty stack/d"])
5671 AT_SETUP([ofproto-dpif - port duration])
5672 OVS_VSWITCHD_START([set Bridge br0 protocols=OpenFlow13])
5673 ADD_OF_PORTS([br0], 1, 2)
5675 ovs-appctl time/stop
5676 ovs-appctl time/warp 10000
5678 AT_CHECK([ovs-ofctl -O openflow13 dump-ports br0], [0], [stdout])
5679 AT_CHECK([sed -n 's/=[[0-9]][[0-9]]\(\.[[0-9]][[0-9]]*\)\{0,1\}s/=?s/p' stdout], [0],
5688 dnl ----------------------------------------------------------------------
5689 AT_BANNER([ofproto-dpif -- megaflows])
5691 AT_SETUP([ofproto-dpif megaflow - port classification])
5693 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5694 ADD_OF_PORTS([br0], [1], [2])
5695 AT_DATA([flows.txt], [dnl
5696 table=0 in_port=1 actions=output(2)
5698 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5699 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)'])
5701 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)'])
5703 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5704 recirc_id=0,ip,in_port=1,nw_frag=no, actions: <del>
5709 AT_SETUP([ofproto-dpif megaflow - L2 classification])
5711 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5712 ADD_OF_PORTS([br0], [1], [2])
5713 AT_DATA([flows.txt], [dnl
5714 table=0 in_port=1,dl_src=50:54:00:00:00:09 actions=output(2)
5716 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5717 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)'])
5718 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)'])
5720 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5721 recirc_id=0,ip,in_port=1,dl_src=50:54:00:00:00:09,nw_frag=no, actions: <del>
5722 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>
5727 AT_SETUP([ofproto-dpif megaflow - L3 classification])
5729 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5730 ADD_OF_PORTS([br0], [1], [2])
5731 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], [])
5732 AT_DATA([flows.txt], [dnl
5733 table=0 in_port=1,icmp,nw_src=10.0.0.4 actions=output(2)
5735 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5736 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)'])
5737 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)'])
5739 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5740 recirc_id=0,icmp,in_port=1,nw_src=10.0.0.4,nw_frag=no, actions: <del>
5741 recirc_id=0,ip,in_port=1,nw_src=10.0.0.2/0.0.0.2,nw_frag=no, actions: <del>
5746 AT_SETUP([ofproto-dpif megaflow - IPv6 classification])
5748 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5749 ADD_OF_PORTS([br0], [1], [2])
5750 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], [])
5751 AT_DATA([flows.txt], [dnl
5752 table=0 in_port=1,ipv6,ipv6_src=2001:db8:3c4d:1:2:3:4:5 actions=output(2)
5754 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5755 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)'])
5756 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)'])
5758 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5759 recirc_id=0,ipv6,in_port=1,ipv6_src=2001:db8:3c4d:1:2:3:4:5,nw_frag=no, actions: <del>
5760 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>
5765 AT_SETUP([ofproto-dpif megaflow - L4 classification])
5767 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5768 ADD_OF_PORTS([br0], [1], [2])
5769 AT_DATA([flows.txt], [dnl
5770 table=0 in_port=1,icmp,icmp_type=8 actions=output(2)
5772 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5773 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)'])
5775 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)'])
5777 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5778 recirc_id=0,icmp,in_port=1,nw_frag=no,icmp_type=0x8/0xff, actions: <del>
5783 AT_SETUP([ofproto-dpif megaflow - normal])
5785 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5786 ADD_OF_PORTS([br0], [1], [2])
5787 AT_CHECK([ovs-ofctl add-flow br0 action=normal])
5788 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)'])
5789 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)'])
5791 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5792 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>
5793 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>
5798 AT_SETUP([ofproto-dpif megaflow - mpls])
5800 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5801 ADD_OF_PORTS([br0], [1], [2])
5802 AT_DATA([flows.txt], [dnl
5803 table=0 dl_src=50:54:00:00:00:09 actions=push_mpls:0x8847,2
5804 table=0 dl_src=50:54:00:00:00:0b actions=pop_mpls:0x0800,2
5806 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5807 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)'])
5808 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)'])
5810 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5811 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>
5812 recirc_id=0,mpls,in_port=1,dl_src=50:54:00:00:00:0b,mpls_bos=1, actions: <del>
5817 # CHECK_MEGAFLOW_NETFLOW(LOOPBACK_ADDR, IP_VERSION_TYPE)
5819 # IP_VERSION_TYPE is used in AT_SETUP
5820 m4_define([CHECK_MEGAFLOW_NETFLOW],
5821 [AT_SETUP([ofproto-dpif megaflow - netflow - $2 collector])
5823 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5824 ADD_OF_PORTS([br0], [1], [2])
5826 dnl NetFlow configuration disables wildcarding relevant fields
5827 ON_EXIT([kill `cat test-netflow.pid`])
5828 AT_CHECK([ovstest test-netflow --log-file --detach --no-chdir --pidfile 0:$1 > netflow.log], [0], [], [ignore])
5829 AT_CAPTURE_FILE([netflow.log])
5830 NETFLOW_PORT=`parse_listening_port < test-netflow.log`
5832 set Bridge br0 netflow=@nf -- \
5833 --id=@nf create NetFlow targets=\"$1:$NETFLOW_PORT\" \
5834 engine_id=1 engine_type=2 active_timeout=30 add-id-to-interface=false
5836 AT_CHECK([ovs-ofctl add-flow br0 action=normal])
5837 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)'])
5838 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)'])
5840 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5841 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>
5842 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>
5847 CHECK_MEGAFLOW_NETFLOW([127.0.0.1], [IPv4])
5848 CHECK_MEGAFLOW_NETFLOW([[[::1]]], [IPv6])
5850 AT_SETUP([ofproto-dpif megaflow - normal, active-backup bonding])
5852 [add-port br0 p1 -- set Interface p1 type=dummy ofport_request=1 -- \
5853 add-bond br0 bond0 p2 p3 bond_mode=active-backup -- \
5854 set interface p2 type=dummy ofport_request=2 -- \
5855 set interface p3 type=dummy ofport_request=3])
5856 AT_CHECK([ovs-appctl netdev-dummy/set-admin-state up], 0, [OK
5858 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5860 AT_CHECK([ovs-ofctl add-flow br0 action=normal])
5861 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)'])
5862 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)'])
5864 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5865 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>
5866 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>
5871 AT_SETUP([ofproto-dpif megaflow - normal, balance-slb bonding])
5873 [add-port br0 p1 -- set Interface p1 type=dummy ofport_request=1 -- \
5874 add-bond br0 bond0 p2 p3 bond_mode=balance-slb -- \
5875 set interface p2 type=dummy ofport_request=2 -- \
5876 set interface p3 type=dummy ofport_request=3])
5877 AT_CHECK([ovs-appctl netdev-dummy/set-admin-state up], 0, [OK
5879 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5881 AT_CHECK([ovs-ofctl add-flow br0 action=normal])
5882 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)'])
5883 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)'])
5885 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5886 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>
5887 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>
5892 AT_SETUP([ofproto-dpif megaflow - normal, balance-tcp bonding])
5893 # Create bond0 on br0 with interfaces p0 and p1
5894 # and bond1 on br1 with interfaces p2 and p3
5895 # with p0 patched to p2 and p1 patched to p3.
5897 [add-bond br0 bond0 p0 p1 bond_mode=balance-tcp lacp=active \
5898 other-config:lacp-time=fast \
5899 other-config:bond-rebalance-interval=0 -- \
5900 set interface p0 type=patch options:peer=p2 ofport_request=1 -- \
5901 set interface p1 type=patch options:peer=p3 ofport_request=2 -- \
5903 set bridge br1 other-config:hwaddr=aa:66:aa:66:00:00 -- \
5904 set bridge br1 datapath-type=dummy other-config:datapath-id=1234 \
5905 fail-mode=secure -- \
5906 add-bond br1 bond1 p2 p3 bond_mode=balance-tcp lacp=active \
5907 other-config:lacp-time=fast \
5908 other-config:bond-rebalance-interval=0 -- \
5909 set interface p2 type=patch options:peer=p0 ofport_request=3 -- \
5910 set interface p3 type=patch options:peer=p1 ofport_request=4 --])
5912 AT_CHECK([ovs-appctl netdev-dummy/set-admin-state up], 0, [OK
5914 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5915 ADD_OF_PORTS([br0], [7])
5916 AT_CHECK([ovs-ofctl add-flow br0 action=normal])
5917 AT_CHECK([ovs-ofctl add-flow br1 action=normal])
5918 ovs-appctl time/stop
5919 ovs-appctl time/warp 5000
5920 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)'])
5921 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)'])
5923 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5924 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>
5925 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>
5930 AT_SETUP([ofproto-dpif megaflow - resubmit port action])
5932 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5933 ADD_OF_PORTS([br0], [1], [2])
5934 AT_DATA([flows.txt], [dnl
5935 table=0 in_port=1,ip actions=resubmit(90)
5936 table=0 in_port=90,dl_src=50:54:00:00:00:09 actions=output(2)
5938 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5939 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)'])
5940 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)'])
5942 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5943 recirc_id=0,ip,in_port=1,dl_src=50:54:00:00:00:09,nw_frag=no, actions: <del>
5944 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>
5949 AT_SETUP([ofproto-dpif megaflow - resubmit table action])
5951 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5952 ADD_OF_PORTS([br0], [1], [2])
5953 AT_DATA([flows.txt], [dnl
5954 table=0 in_port=1,ip actions=resubmit(,1)
5955 table=1 dl_src=50:54:00:00:00:09 actions=output(2)
5957 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5958 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)'])
5959 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=
5960 1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
5962 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5963 recirc_id=0,ip,in_port=1,dl_src=50:54:00:00:00:09,nw_frag=no, actions: <del>
5964 recirc_id=0,ip,in_port=1,dl_src=50:54:00:00:00:0b,nw_frag=no, actions: <del>
5969 AT_SETUP([ofproto-dpif megaflow - goto_table action])
5971 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5972 ADD_OF_PORTS([br0], [1], [2])
5973 AT_DATA([flows.txt], [dnl
5974 table=0 in_port=1,ip actions=goto_table(1)
5975 table=1 dl_src=50:54:00:00:00:09 actions=output(2)
5977 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flows br0 flows.txt])
5978 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)'])
5979 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)'])
5981 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5982 recirc_id=0,ip,in_port=1,dl_src=50:54:00:00:00:09,nw_frag=no, actions: <del>
5983 recirc_id=0,ip,in_port=1,dl_src=50:54:00:00:00:0b,nw_frag=no, actions: <del>
5988 AT_SETUP([ofproto-dpif megaflow - mirroring, select_all])
5990 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5991 ADD_OF_PORTS([br0], [1], [2], [3])
5993 set Bridge br0 mirrors=@m --\
5994 --id=@p3 get Port p3 --\
5995 --id=@m create Mirror name=mymirror select_all=true output_port=@p3
5997 AT_DATA([flows.txt], [dnl
5998 in_port=1 actions=output:2
6000 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
6001 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)'])
6003 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)'])
6005 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
6006 recirc_id=0,ip,in_port=1,nw_frag=no, actions: <del>
6011 AT_SETUP([ofproto-dpif megaflow - mirroring, select_vlan])
6013 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
6014 ADD_OF_PORTS([br0], [1], [2], [3])
6016 set Bridge br0 mirrors=@m --\
6017 --id=@p2 get Port p2 -- --id=@p3 get Port p3 --\
6018 --id=@m create Mirror name=mymirror select_all=true select_vlan=11 output_port=@p3
6020 AT_DATA([flows.txt], [dnl
6021 in_port=1 actions=output:2
6023 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
6024 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))'])
6025 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)'])
6027 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
6028 recirc_id=0,ip,in_port=1,dl_vlan=11,nw_frag=no, actions: <del>
6029 recirc_id=0,ip,in_port=1,vlan_tci=0x0000/0x1fff,nw_frag=no, actions: <del>
6034 AT_SETUP([ofproto-dpif megaflow - move action])
6036 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
6037 ADD_OF_PORTS([br0], [1], [2])
6038 AT_DATA([flows.txt], [dnl
6039 table=0 in_port=1 ip,actions=move:NXM_OF_IP_SRC[[]]->NXM_NX_REG0[[]],resubmit(90)
6040 table=0 in_port=90 ip,actions=move:NXM_NX_REG0[[]]->NXM_NX_REG1[[]],resubmit(91)
6041 table=0 in_port=91 reg0=0x0a000002,actions=output(2)
6043 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
6044 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)'])
6045 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)'])
6047 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
6048 recirc_id=0,ip,in_port=1,nw_src=10.0.0.2,nw_frag=no, actions: <del>
6049 recirc_id=0,ip,in_port=1,nw_src=10.0.0.4,nw_frag=no, actions: <del>
6054 AT_SETUP([ofproto-dpif megaflow - push action])
6056 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
6057 ADD_OF_PORTS([br0], [1], [2])
6058 AT_DATA([flows.txt], [dnl
6059 table=0 in_port=1 ip,actions=push:NXM_OF_IP_SRC[[]],output(2)
6061 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
6062 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)'])
6063 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)'])
6065 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
6066 recirc_id=0,ip,in_port=1,nw_src=10.0.0.2,nw_frag=no, actions: <del>
6067 recirc_id=0,ip,in_port=1,nw_src=10.0.0.4,nw_frag=no, actions: <del>
6072 AT_SETUP([ofproto-dpif megaflow - learning])
6074 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
6075 ADD_OF_PORTS([br0], [1], [2])
6076 AT_DATA([flows.txt], [dnl
6077 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
6079 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
6080 ovs-appctl time/stop
6081 # We send each packet twice because the first packet in each flow causes the
6082 # flow table to change and thus revalidations, which (depending on timing)
6083 # can keep a megaflow from being installed. The revalidations are done by
6084 # the second iteration, allowing the flows to be installed.
6086 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)'])
6087 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)'])
6088 ovs-appctl time/warp 100
6091 dnl The original flow is missing due to a revalidation.
6092 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
6093 recirc_id=0,ip,in_port=1,vlan_tci=0x0000/0x1fff,dl_src=50:54:00:00:00:09,nw_frag=no, actions: <del>
6094 recirc_id=0,ip,in_port=1,vlan_tci=0x0000/0x1fff,dl_src=50:54:00:00:00:0b,nw_frag=no, actions: <del>
6099 AT_SETUP([ofproto-dpif megaflow - tunnels])
6101 [add-port br0 p1 -- set Interface p1 type=dummy ofport_request=1])
6102 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
6103 AT_CHECK([ovs-vsctl add-port br0 p2 -- set Interface p2 type=gre \
6104 options:remote_ip=1.1.1.1 ofport_request=2 options:key=flow])
6105 AT_CHECK([ovs-vsctl add-port br0 p3 -- set Interface p3 type=dummy \
6107 AT_CHECK([ovs-vsctl add-port br0 p4 -- set Interface p4 type=gre \
6108 options:remote_ip=1.1.1.2 options:tos=inherit options:ttl=inherit \
6109 ofport_request=4 options:key=flow])
6110 AT_DATA([flows.txt], [dnl
6111 in_port=1,actions=output(2)
6112 in_port=3,actions=output(4)
6114 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
6115 dnl ECN bits are always copied out, but don't use 0x3 (CE), since that
6116 dnl will cause the packet to be dropped.
6117 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)'])
6119 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)'])
6120 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)'])
6122 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)'])
6124 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
6125 recirc_id=0,ip,in_port=1,nw_ecn=1,nw_frag=no, actions: <del>
6126 recirc_id=0,ip,in_port=3,nw_tos=0,nw_ecn=1,nw_ttl=64,nw_frag=no, actions: <del>
6127 recirc_id=0,ip,in_port=3,nw_tos=252,nw_ecn=1,nw_ttl=128,nw_frag=no, actions: <del>
6132 AT_SETUP([ofproto-dpif megaflow - dec_ttl])
6134 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
6135 ADD_OF_PORTS([br0], [1], [2])
6136 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], [])
6137 AT_DATA([flows.txt], [dnl
6138 table=0 in_port=1,icmp,nw_src=10.0.0.4 actions=dec_ttl,output(2)
6140 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
6141 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)'])
6142 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)'])
6144 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
6145 recirc_id=0,icmp,in_port=1,nw_src=10.0.0.4,nw_ttl=64,nw_frag=no, actions: <del>
6146 recirc_id=0,ip,in_port=1,nw_src=10.0.0.2/0.0.0.2,nw_frag=no, actions: <del>
6151 AT_SETUP([ofproto-dpif megaflow - set dl_dst])
6153 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
6154 ADD_OF_PORTS([br0], [1], [2])
6155 AT_DATA([flows.txt], [dnl
6156 table=0 in_port=1 actions=mod_dl_dst(50:54:00:00:00:0a),output(2)
6158 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
6159 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)'])
6160 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)'])
6162 dnl The first packet is essentially a no-op, as the new destination MAC is the
6163 dnl same as the original. The second entry actually updates the destination
6165 AT_CHECK([cat ovs-vswitchd.log | STRIP_UFID | FILTER_FLOW_INSTALL | STRIP_USED], [0], [dnl
6166 recirc_id=0,ip,in_port=1,dl_dst=50:54:00:00:00:0a,nw_frag=no, actions:2
6167 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
6172 AT_SETUP([ofproto-dpif megaflow - disabled])
6174 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
6175 ADD_OF_PORTS([br0], [1], [2])
6176 AT_DATA([flows.txt], [dnl
6177 table=0 in_port=1,ip,nw_dst=10.0.0.1 actions=output(2)
6178 table=0 in_port=1,ip,nw_dst=10.0.0.3 actions=drop
6180 AT_CHECK([ovs-appctl upcall/disable-megaflows], [0], [megaflows disabled
6182 AT_CHECK([ovs-appctl upcall/disable-ufid], [0], [Datapath dumping tersely using UFID disabled
6184 AT_CHECK([ovs-appctl vlog/set dpif_netdev:dbg], [0], [], [])
6185 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
6186 for i in 1 2 3 4; do
6187 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)'])
6188 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)'])
6189 if [[ $i -eq 1 ]]; then
6194 AT_CHECK([cat ovs-vswitchd.log | STRIP_UFID | FILTER_FLOW_INSTALL | STRIP_USED], [0], [dnl
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: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
6196 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
6198 AT_CHECK([cat ovs-vswitchd.log | STRIP_UFID | FILTER_FLOW_DUMP | grep 'packets:3'], [0], [dnl
6199 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
6200 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
6205 AT_SETUP([ofproto-dpif - datapath port number change])
6206 OVS_VSWITCHD_START([set Bridge br0 fail-mode=standalone])
6207 ADD_OF_PORTS([br0], 1)
6209 # Trace a flow that should output to p1.
6210 AT_CHECK([ovs-appctl ofproto/trace br0 in_port=LOCAL,dl_src=10:20:30:40:50:60],
6212 AT_CHECK([tail -1 stdout], [0], [Datapath actions: 1
6215 # Change p1's port number to 5.
6216 AT_CHECK([ovs-appctl dpif-dummy/change-port-number ovs-dummy p1 5])
6218 # Trace a flow that should output to p1 in its new location.
6219 AT_CHECK([ovs-appctl ofproto/trace br0 in_port=LOCAL,dl_src=10:20:30:40:50:60],
6221 AT_CHECK([tail -1 stdout], [0], [Datapath actions: 5
6226 # Tests the bundling with various bfd and cfm configurations.
6227 AT_SETUP([ofproto - bundle with variable bfd/cfm config])
6228 OVS_VSWITCHD_START([add-br br1 -- set bridge br1 datapath-type=dummy -- \
6229 add-bond br0 br0bond p0 p2 bond-mode=active-backup -- \
6230 add-bond br1 br1bond p1 p3 bond-mode=active-backup -- \
6231 set Interface p1 type=patch options:peer=p0 ofport_request=2 -- \
6232 set Interface p3 type=patch options:peer=p2 ofport_request=4 -- \
6233 set Interface p0 type=patch options:peer=p1 ofport_request=1 -- \
6234 set Interface p2 type=patch options:peer=p3 ofport_request=3 -- \
6235 set Interface p0 bfd:enable=true bfd:min_tx=300 bfd:min_rx=300 -- \
6236 set Interface p0 cfm_mpid=1 -- \
6237 set Interface p1 bfd:enable=true bfd:min_tx=500 bfd:min_rx=500])
6239 ovs-appctl time/stop
6240 # advance the clock to stablize everything.
6241 ovs-appctl time/warp 5000 100
6242 # cfm/show should show 'recv' fault.
6243 AT_CHECK([ovs-appctl cfm/show | sed -n '/^.*fault:.*/p'], [0], [dnl
6246 # bfd/show should show 'up'.
6247 AT_CHECK([ovs-appctl bfd/show | sed -n '/^.*Session State:.*/p'], [0], [dnl
6248 Local Session State: up
6249 Remote Session State: up
6250 Local Session State: up
6251 Remote Session State: up
6253 # bond/show should show 'may-enable: true' for all slaves.
6254 AT_CHECK([ovs-appctl bond/show | sed -n '/^.*may_enable:.*/p'], [0], [dnl
6261 # now disable the bfd on p1.
6262 AT_CHECK([ovs-vsctl set Interface p1 bfd:enable=false])
6263 # advance the clock to stablize everything.
6264 ovs-appctl time/warp 5000 100
6265 # cfm/show should show 'recv' fault.
6266 AT_CHECK([ovs-appctl cfm/show | sed -n '/^.*fault:.*/p'], [0], [dnl
6269 # bfd/show should show 'down'.
6270 AT_CHECK([ovs-appctl bfd/show | sed -n '/^.*Session State:.*/p'], [0], [dnl
6271 Local Session State: down
6272 Remote Session State: down
6274 # bond/show should show 'may-enable: false' for p0.
6275 AT_CHECK([ovs-appctl bond/show br0bond | sed -n '/^.*may_enable:.*/p'], [0], [dnl
6280 # now enable the bfd on p1 and disable bfd on p0.
6281 AT_CHECK([ovs-vsctl set Interface p1 bfd:enable=true])
6282 AT_CHECK([ovs-vsctl set Interface p0 bfd:enable=false])
6283 # advance the clock to stablize everything.
6284 ovs-appctl time/warp 5000 100
6285 # cfm/show should show 'recv' fault.
6286 AT_CHECK([ovs-appctl cfm/show | sed -n '/^.*fault:.*/p'], [0], [dnl
6289 # bfd/show should show 'down'.
6290 AT_CHECK([ovs-appctl bfd/show | sed -n '/^.*Session State:.*/p'], [0], [dnl
6291 Local Session State: down
6292 Remote Session State: down
6294 # bond/show should show 'may-enable: false' for p0 and p1.
6295 AT_CHECK([ovs-appctl bond/show | sed -n '/^.*may_enable:.*/p'], [0], [dnl
6305 AT_SETUP([ofproto-dpif - ofproto-dpif-monitor 1])
6306 OVS_VSWITCHD_START([add-port br0 p0 -- set interface p0 type=gre options:remote_ip=1.2.3.4])
6309 AT_CHECK([ovs-vsctl set interface p0 bfd:enable=true])
6311 OVS_WAIT_UNTIL([grep "monitor thread created" ovs-vswitchd.log])
6312 # disable bfd on p0.
6313 AT_CHECK([ovs-vsctl set interface p0 bfd:enable=false])
6315 OVS_WAIT_UNTIL([grep "monitor thread terminated" ovs-vswitchd.log])
6316 AT_CHECK([cat ovs-vswitchd.log | sed -e '/^.*ofproto_dpif_monitor.*$/d' > ovs-vswitchd.log])
6319 AT_CHECK([ovs-vsctl set interface p0 cfm_mpid=10])
6321 OVS_WAIT_UNTIL([grep "monitor thread created" ovs-vswitchd.log])
6322 # disable cfm on p0.
6323 AT_CHECK([ovs-vsctl remove interface p0 cfm_mpid 10])
6325 OVS_WAIT_UNTIL([grep "monitor thread terminated" ovs-vswitchd.log])
6326 AT_CHECK([cat ovs-vswitchd.log | sed -e '/^.*ofproto_dpif_monitor.*$/d' > ovs-vswitchd.log])
6328 # enable both bfd and cfm on p0.
6329 AT_CHECK([ovs-vsctl set interface p0 bfd:enable=true cfm_mpid=10])
6331 OVS_WAIT_UNTIL([grep "monitor thread created" ovs-vswitchd.log])
6332 # disable bfd on p0.
6333 AT_CHECK([ovs-vsctl set interface p0 bfd:enable=false])
6334 # check log, there should not be the log of thread terminated.
6335 AT_CHECK([sed -n "s/^.*|ofproto_dpif_monitor(monitor[[0-9]]*)|INFO|\(.* terminated\)$/\1/p" ovs-vswitchd.log], [0], [dnl
6337 # reenable bfd on p0.
6338 AT_CHECK([ovs-vsctl set interface p0 bfd:enable=true])
6339 # check log, should still be on log of thread created.
6340 AT_CHECK([sed -n "s/^.*|ofproto_dpif_monitor(monitor[[0-9]]*)|INFO|\(.* created\)$/\1/p" ovs-vswitchd.log], [0], [dnl
6341 monitor thread created
6343 # disable bfd and cfm together.
6344 AT_CHECK([ovs-vsctl set interface p0 bfd:enable=false -- remove interface p0 cfm_mpid 10])
6346 OVS_WAIT_UNTIL([grep "monitor thread terminated" ovs-vswitchd.log])
6351 # this test helps avoid the deadlock between the main thread and monitor thread.
6352 AT_SETUP([ofproto-dpif - ofproto-dpif-monitor 2])
6355 for i in `seq 1 199`
6357 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])
6363 AT_BANNER([ofproto-dpif - flow translation resource limits])
6365 AT_SETUP([ofproto-dpif - infinite resubmit])
6367 AT_CHECK([ovs-ofctl add-flow br0 actions=resubmit:1,resubmit:2,output:3])
6368 AT_CHECK([ovs-appctl -vpoll_loop:off ofproto/trace br0 'eth_dst=ff:ff:ff:ff:ff:ff'],
6370 AT_CHECK([tail -1 stdout], [0], [Datapath actions: drop
6372 AT_CHECK([grep -c 'resubmit actions recursed over 64 times' ovs-vswitchd.log],
6375 OVS_VSWITCHD_STOP(["/resubmit actions recursed/d"])
6378 AT_SETUP([ofproto-dpif - exponential resubmit chain])
6380 ADD_OF_PORTS([br0], 1)
6381 (for i in `seq 1 64`; do
6383 echo "in_port=$i, actions=resubmit:$j, resubmit:$j, local"
6385 echo "in_port=65, actions=local") > flows
6386 AT_CHECK([ovs-ofctl add-flows br0 flows])
6387 AT_CHECK([ovs-appctl -vpoll_loop:off ofproto/trace br0 'in_port=1'], [0], [stdout])
6388 AT_CHECK([grep -c 'over 4096 resubmit actions' ovs-vswitchd.log], [0], [1
6390 OVS_VSWITCHD_STOP(["/over.*resubmit actions/d"])
6393 AT_SETUP([ofproto-dpif - too many output actions])
6395 ADD_OF_PORTS([br0], 1)
6396 (for i in `seq 1 12`; do
6398 echo "in_port=$i, actions=resubmit:$j, resubmit:$j, local"
6400 echo "in_port=13, actions=local,local,local,local,local,local,local,local") > flows
6401 AT_CHECK([ovs-ofctl add-flows br0 flows])
6402 AT_CHECK([ovs-appctl -vpoll_loop:off ofproto/trace br0 'in_port=1'], [0], [stdout])
6403 AT_CHECK([grep -c -e '- Uses action(s) not supported by datapath' stdout],
6406 AT_CHECK([grep -c 'resubmits yielded over 64 kB of actions' ovs-vswitchd.log], [0], [1
6408 OVS_VSWITCHD_STOP(["/resubmits yielded over 64 kB of actions/d"])
6411 AT_SETUP([ofproto-dpif - stack too deep])
6413 ADD_OF_PORTS([br0], 1)
6414 (for i in `seq 1 12`; do
6416 echo "in_port=$i, actions=resubmit:$j, resubmit:$j, local"
6418 push="push:NXM_NX_REG0[[]]"
6419 echo "in_port=13, actions=$push,$push,$push,$push,$push,$push,$push,$push") > flows
6420 AT_CHECK([ovs-ofctl add-flows br0 flows])
6421 AT_CHECK([ovs-appctl -vpoll_loop:off ofproto/trace br0 'in_port=1'], [0], [stdout])
6422 AT_CHECK([grep -c 'resubmits yielded over 64 kB of stack' ovs-vswitchd.log], [0], [1
6424 OVS_VSWITCHD_STOP(["/resubmits yielded over 64 kB of stack/d"])
6428 AT_SETUP([ofproto-dpif packet-out controller])
6430 ADD_OF_PORTS([br0], 1, 2)
6432 AT_CHECK([ovs-ofctl add-flow br0 'dl_dst=50:54:00:00:00:0a actions=controller'])
6434 AT_CAPTURE_FILE([ofctl_monitor.log])
6435 AT_CHECK([ovs-ofctl monitor br0 65534 invalid_ttl --detach --no-chdir --pidfile 2> ofctl_monitor.log])
6438 AT_CHECK([ovs-ofctl -O OpenFlow13 packet-out br0 CONTROLLER controller '50540000000a5054000000091234'])
6441 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
6442 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
6443 NXT_PACKET_IN (xid=0x0): total_len=14 in_port=CONTROLLER (via action) data_len=14 (unbuffered)
6444 vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,dl_type=0x1234
6446 NXT_PACKET_IN (xid=0x0): total_len=14 in_port=CONTROLLER (via action) data_len=14 (unbuffered)
6447 vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,dl_type=0x1234
6449 NXT_PACKET_IN (xid=0x0): total_len=14 in_port=CONTROLLER (via action) data_len=14 (unbuffered)
6450 vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,dl_type=0x1234
6453 AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
6454 dl_dst=50:54:00:00:00:0a actions=CONTROLLER:65535
6458 (echo "OFPST_TABLE reply (OF1.3) (xid=0x2):
6460 active=1, lookup=0, matched=0"
6462 while test $x -lt 254; do
6465 active=0, lookup=0, matched=0"
6468 AT_CHECK([ovs-ofctl -O OpenFlow13 dump-tables br0 ], [0], [expout])
6473 AT_SETUP([ofproto-dpif packet-out controller (patch port)])
6476 add-port br0 p1 -- \
6477 set interface p1 type=patch options:peer=p2 -- \
6479 set bridge br1 datapath-type=dummy -- \
6480 set bridge br1 fail-mode=secure -- \
6481 set bridge br1 protocols='[OpenFlow10,OpenFlow11,OpenFlow12,OpenFlow13]' -- \
6482 add-port br1 p2 -- \
6483 set interface p2 type=patch options:peer=p1 --])
6485 AT_CAPTURE_FILE([ofctl_monitor.log])
6486 AT_CHECK([ovs-ofctl monitor br1 65534 invalid_ttl --detach --no-chdir --pidfile 2> ofctl_monitor.log])
6489 AT_CHECK([ovs-ofctl -O OpenFlow13 packet-out br0 CONTROLLER output:1 '50540000000a5054000000091234'])
6492 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
6493 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
6494 NXT_PACKET_IN (xid=0x0): cookie=0x0 total_len=14 in_port=1 (via no_match) data_len=14 (unbuffered)
6495 vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,dl_type=0x1234
6497 NXT_PACKET_IN (xid=0x0): cookie=0x0 total_len=14 in_port=1 (via no_match) data_len=14 (unbuffered)
6498 vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,dl_type=0x1234
6500 NXT_PACKET_IN (xid=0x0): cookie=0x0 total_len=14 in_port=1 (via no_match) data_len=14 (unbuffered)
6501 vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,dl_type=0x1234
6504 (printf "OFPST_TABLE reply (OF1.3) (xid=0x2):"
6506 while test $x -lt 254; do
6509 active=0, lookup=0, matched=0"
6512 AT_CHECK([ovs-ofctl -O OpenFlow13 dump-tables br0 ], [0], [expout])
6514 (echo "OFPST_TABLE reply (OF1.3) (xid=0x2):
6516 active=0, lookup=3, matched=0"
6518 while test $x -lt 254; do
6521 active=0, lookup=0, matched=0"
6524 AT_CHECK([ovs-ofctl -O OpenFlow13 dump-tables br1 ], [0], [expout])
6530 AT_SETUP([ofproto-dpif packet-out goto_table])
6532 ADD_OF_PORTS([br0], 1, 2)
6534 AT_DATA([flows.txt], [dnl
6535 table=0 dl_dst=50:54:00:00:00:0a actions=goto_table(1)
6536 table=1 dl_dst=50:54:00:00:00:0a actions=controller
6538 AT_CHECK([ovs-ofctl -O OpenFlow13 add-flows br0 flows.txt])
6540 AT_CAPTURE_FILE([ofctl_monitor.log])
6541 AT_CHECK([ovs-ofctl monitor br0 65534 invalid_ttl --detach --no-chdir --pidfile 2> ofctl_monitor.log])
6544 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)'
6547 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
6548 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
6549 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
6550 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
6551 vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,dl_type=0x1234
6553 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
6554 vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,dl_type=0x1234
6556 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
6557 vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,dl_type=0x1234
6560 AT_CHECK([ovs-appctl revalidator/purge], [0])
6561 AT_CHECK([ovs-ofctl -O OpenFlow13 dump-flows br0 | ofctl_strip | sort], [0], [dnl
6562 n_packets=3, n_bytes=180, dl_dst=50:54:00:00:00:0a actions=goto_table:1
6563 table=1, n_packets=3, n_bytes=180, dl_dst=50:54:00:00:00:0a actions=CONTROLLER:65535
6564 OFPST_FLOW reply (OF1.3):
6567 (echo "OFPST_TABLE reply (OF1.3) (xid=0x2):
6569 active=1, lookup=3, matched=3
6572 active=1, lookup=3, matched=3"
6574 while test $x -lt 254; do
6577 active=0, lookup=0, matched=0"
6580 AT_CHECK([ovs-ofctl -O OpenFlow13 dump-tables br0 ], [0], [expout])
6586 AT_SETUP([ofproto-dpif packet-out table-miss (continue)])
6588 ADD_OF_PORTS([br0], 1, 2)
6590 AT_CHECK([ovs-ofctl -O OpenFlow11 add-flow br0 'table=1 dl_dst=50:54:00:00:00:0a actions=controller'])
6591 AT_CHECK([ovs-ofctl -O OpenFlow11 mod-table br0 all continue])
6593 AT_CAPTURE_FILE([ofctl_monitor.log])
6594 AT_CHECK([ovs-ofctl monitor br0 65534 invalid_ttl --detach --no-chdir --pidfile 2> ofctl_monitor.log])
6597 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)'
6600 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
6601 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
6602 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
6603 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
6604 vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,dl_type=0x1234
6606 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
6607 vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,dl_type=0x1234
6609 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
6610 vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,dl_type=0x1234
6613 AT_CHECK([ovs-appctl revalidator/purge], [0])
6614 AT_CHECK([ovs-ofctl -O OpenFlow11 dump-flows br0 | ofctl_strip | sort], [0], [dnl
6615 table=1, n_packets=3, n_bytes=180, dl_dst=50:54:00:00:00:0a actions=CONTROLLER:65535
6616 OFPST_FLOW reply (OF1.1):
6619 (echo "OFPST_TABLE reply (OF1.3) (xid=0x2):
6621 active=0, lookup=3, matched=0
6624 active=1, lookup=3, matched=3"
6626 while test $x -lt 254; do
6629 active=0, lookup=0, matched=0"
6632 AT_CHECK([ovs-ofctl -O OpenFlow13 dump-tables br0 ], [0], [expout])
6637 AT_SETUP([ofproto-dpif - ICMPv6])
6639 ADD_OF_PORTS([br0], 1)
6641 AT_CAPTURE_FILE([ofctl_monitor.log])
6643 AT_CHECK([ovs-ofctl monitor br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
6645 ovs-appctl netdev-dummy/receive p1 '0060970769ea0000860580da86dd6000000000203afffe80000000000000020086fffe0580dafe80000000000000026097fffe0769ea870068bd00000000fe80000000000000026097fffe0769ea01010000860580da'
6647 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
6649 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
6650 NXT_PACKET_IN (xid=0x0): cookie=0x0 total_len=86 in_port=1 (via no_match) data_len=86 (unbuffered)
6651 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
6657 AT_SETUP([ofproto-dpif - Neighbor Discovery set-field with checksum update])
6659 ADD_OF_PORTS([br0], 1)
6660 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])
6662 AT_CAPTURE_FILE([ofctl_monitor.log])
6664 AT_CHECK([ovs-ofctl monitor br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
6666 ovs-appctl netdev-dummy/receive p1 '0060970769ea0000860580da86dd6000000000203afffe80000000000000020086fffe0580dafe80000000000000026097fffe0769ea870068bd00000000fe80000000000000026097fffe0769ea01010000860580da'
6668 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
6670 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
6671 NXT_PACKET_IN (xid=0x0): cookie=0x0 total_len=86 in_port=1 (via action) data_len=86 (unbuffered)
6672 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
6678 # Tests the exact match of CFI bit in installed datapath flows matching VLAN.
6679 AT_SETUP([ofproto-dpif - vlan matching])
6681 [add-port br0 p0 -- set Interface p0 type=dummy ofport_request=1])
6682 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
6684 AT_CHECK([ovs-ofctl del-flows br0])
6685 AT_CHECK([ovs-ofctl add-flow br0 "vlan_tci=0x000a/0x0fff,action=output:local"])
6687 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))'])
6689 AT_CHECK([cat ovs-vswitchd.log | grep 'in_port=[[1]]' | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
6690 recirc_id=0,ip,in_port=1,dl_vlan=10,nw_frag=no, actions: <del>