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([grep 'in_port([[348]])' ovs-vswitchd.log | filter_flow_install | strip_xout], [0], [dnl
46 recirc_id(0),in_port(3),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(frag=no), actions: <del>
47 recirc_id(0),in_port(3),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(frag=no), actions: <del>
48 recirc_id(0),in_port(4),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0d),eth_type(0x0800),ipv4(frag=no), actions: <del>
49 recirc_id(0),in_port(4),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0e),eth_type(0x0800),ipv4(frag=no), actions: <del>
50 recirc_id(0),in_port(4),eth(src=50:54:00:00:00:09,dst=ff:ff:ff:ff:ff:ff),eth_type(0x8035), actions: <del>
51 recirc_id(0),in_port(4),eth(src=50:54:00:00:00:0b,dst=ff:ff:ff:ff:ff:ff),eth_type(0x8035), 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 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)"])
191 # Collects flow stats.
192 AT_CHECK([ovs-appctl revalidator/purge], [0])
194 # Checks the flow stats in br1, should only be one flow with non-zero
195 # 'n_packets' from internal table.
196 AT_CHECK([ovs-appctl bridge/dump-flows br1 | ofctl_strip | grep -- "n_packets" | grep -- "table_id" | sed -e 's/output:[[0-9]][[0-9]]*/output/'] , [0], [dnl
197 table_id=254, n_packets=1, n_bytes=64, priority=20,recirc_id=0x0,dp_hash=0x0/0xff,actions=output
200 # Checks the flow stats in br-int, should be only one match.
201 AT_CHECK([ovs-ofctl dump-flows br-int | ofctl_strip | sort], [0], [dnl
202 n_packets=1, n_bytes=60, priority=1,in_port=5 actions=mod_vlan_vid:1,output:101
203 priority=2,in_port=5,dl_vlan=1 actions=drop
210 AT_SETUP([ofproto-dpif - resubmit])
212 add_of_ports br0 1 10 11 12 13 14 15 16 17 18 19 20 21
213 AT_DATA([flows.txt], [dnl
214 table=0 in_port=1 priority=1000 icmp actions=output(10),resubmit(2),output(19),resubmit(3),output(21)
215 table=0 in_port=2 priority=1500 icmp actions=output(11),resubmit(,1),output(16),resubmit(2,1),output(18)
216 table=0 in_port=3 priority=2000 icmp actions=output(20)
217 table=1 in_port=1 priority=1000 icmp actions=output(12),resubmit(4,1),output(13),resubmit(3),output(15)
218 table=1 in_port=2 priority=1500 icmp actions=output(17),resubmit(,2)
219 table=1 in_port=3 priority=1500 icmp actions=output(14),resubmit(,2)
221 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
222 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])
223 AT_CHECK([tail -1 stdout], [0],
224 [Datapath actions: 10,11,12,13,14,15,16,17,18,19,20,21
229 AT_SETUP([ofproto-dpif - goto table])
231 add_of_ports br0 1 10 11
232 echo "table=0 in_port=1 actions=output(10),goto_table(1)" > flows.txt
233 for i in `seq 1 63`; do echo "table=$i actions=goto_table($(($i+1)))"; done >> flows.txt
234 echo "table=64 actions=output(11)" >> flows.txt
235 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flows br0 flows.txt])
236 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])
237 AT_CHECK([tail -1 stdout], [0],
238 [Datapath actions: 10,11
243 AT_SETUP([ofproto-dpif - write actions])
245 add_of_ports br0 1 10 11 12 13
246 AT_DATA([flows.txt], [dnl
247 table=0 in_port=1,ip actions=output(10),write_actions(set_field:192.168.3.90->ip_src,output(12)),goto_table(1)
248 table=1 ip actions=write_actions(output(13)),goto_table(2)
249 table=2 ip actions=set_field:192.168.3.91->ip_src,output(11)
251 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flows br0 flows.txt])
252 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])
253 AT_CHECK([tail -2 stdout], [0],
254 [Megaflow: recirc_id=0,ip,in_port=1,nw_src=192.168.0.1,nw_frag=no
255 Datapath actions: 10,set(ipv4(src=192.168.3.91)),11,set(ipv4(src=192.168.3.90)),13
260 AT_SETUP([ofproto-dpif - modify IPv6 Neighbor Solitication (ND)])
262 add_of_ports br0 1 10 11 12 13
263 AT_DATA([flows.txt], [dnl
264 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)
265 table=1 icmp6 actions=write_actions(output(13)),goto_table(2)
266 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)
268 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flows br0 flows.txt])
269 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])
270 AT_CHECK([tail -4 stdout], [0],
271 [Megaflow: recirc_id=0,icmp6,in_port=1,nw_frag=no,icmp_type=0x87/0xff,icmp_code=0x0/0xff,nd_target=fe80::2020,nd_sll=66:55:44:33:22:11
272 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
273 This flow is handled by the userspace slow path because it:
274 - Uses action(s) not supported by datapath.
279 AT_SETUP([ofproto-dpif - clear actions])
281 add_of_ports br0 1 10 11 12
282 AT_DATA([flows.txt], [dnl
283 table=0 in_port=1,ip actions=output(10),write_actions(set_field:192.168.3.90->ip_src,output(12)),goto_table(1)
284 table=1 tcp actions=set_field:91->tp_src,output(11),clear_actions
286 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flows br0 flows.txt])
287 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])
288 AT_CHECK([tail -2 stdout], [0],
289 [Megaflow: recirc_id=0,tcp,in_port=1,nw_frag=no,tp_src=8
290 Datapath actions: 10,set(tcp(src=91)),11
295 AT_SETUP([ofproto-dpif - group chaining])
297 add_of_ports br0 1 10 11
298 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'])
299 AT_CHECK([ovs-ofctl -O OpenFlow12 add-group br0 'group_id=123,type=all,bucket=output:10'])
300 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=group:1234'])
301 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])
302 AT_CHECK([tail -1 stdout], [0],
303 [Datapath actions: set(ipv4(src=192.168.3.90)),10,set(ipv4(src=192.168.0.1)),11
308 AT_SETUP([ofproto-dpif - all group in action list])
310 add_of_ports br0 1 10 11
311 AT_CHECK([ovs-ofctl -O OpenFlow12 add-group br0 'group_id=1234,type=all,bucket=output:10,set_field:192.168.3.90->ip_src,bucket=output:11'])
312 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=group:1234'])
313 AT_CHECK([ovs-appctl ofproto/trace br0 'in_port=1,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,dl_type=0x0800,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_proto=1,nw_tos=0,nw_ttl=128,icmp_type=8,icmp_code=0'], [0], [stdout])
314 # Must match on the source address to be able to restore it's value for
316 AT_CHECK([tail -2 stdout], [0],
317 [Megaflow: recirc_id=0,ip,in_port=1,nw_src=192.168.0.1,nw_frag=no
318 Datapath actions: set(ipv4(src=192.168.3.90)),10,set(ipv4(src=192.168.0.1)),11
323 AT_SETUP([ofproto-dpif - indirect group in action list])
325 add_of_ports br0 1 10
326 AT_CHECK([ovs-ofctl -O OpenFlow12 add-group br0 group_id=1234,type=indirect,bucket=output:10])
327 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=group:1234'])
328 AT_CHECK([ovs-appctl ofproto/trace br0 'in_port=1,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,dl_type=0x0800,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_proto=1,nw_tos=0,nw_ttl=128,icmp_type=8,icmp_code=0'], [0], [stdout])
329 AT_CHECK([tail -1 stdout], [0],
330 [Datapath actions: 10
335 AT_SETUP([ofproto-dpif - group actions have no effect afterwards])
337 add_of_ports br0 1 10
338 AT_CHECK([ovs-ofctl -O OpenFlow12 add-group br0 'group_id=1234,type=select,bucket=set_field:192.168.3.90->ip_src,output:10'])
339 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=group:1234,output:10'])
340 AT_CHECK([ovs-appctl ofproto/trace br0 'in_port=1,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,dl_type=0x0800,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_proto=1,nw_tos=0,nw_ttl=128,icmp_type=8,icmp_code=0'], [0], [stdout])
341 AT_CHECK([tail -1 stdout], [0],
342 [Datapath actions: set(ipv4(src=192.168.3.90,dst=192.168.0.2)),10,set(ipv4(src=192.168.0.1,dst=192.168.0.2)),10
347 AT_SETUP([ofproto-dpif - all group in action set])
349 add_of_ports br0 1 10 11
350 AT_CHECK([ovs-ofctl -O OpenFlow12 add-group br0 'group_id=1234,type=all,bucket=output:10,set_field:192.168.3.90->ip_src,bucket=output:11'])
351 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=write_actions(group:1234)'])
352 AT_CHECK([ovs-appctl ofproto/trace br0 'in_port=1,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,dl_type=0x0800,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_proto=1,nw_tos=0,nw_ttl=128,icmp_type=8,icmp_code=0'], [0], [stdout])
353 # Must match on the source address to be able to restore it's value for
355 AT_CHECK([tail -2 stdout], [0],
356 [Megaflow: recirc_id=0,ip,in_port=1,nw_src=192.168.0.1,nw_frag=no
357 Datapath actions: set(ipv4(src=192.168.3.90)),10,set(ipv4(src=192.168.0.1)),11
362 AT_SETUP([ofproto-dpif - indirect group in action set])
364 add_of_ports br0 1 10
365 AT_CHECK([ovs-ofctl -O OpenFlow12 add-group br0 group_id=1234,type=indirect,bucket=output:10])
366 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=write_actions(group:1234)'])
367 AT_CHECK([ovs-appctl ofproto/trace br0 'in_port=1,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,dl_type=0x0800,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_proto=1,nw_tos=0,nw_ttl=128,icmp_type=8,icmp_code=0'], [0], [stdout])
368 AT_CHECK([tail -1 stdout], [0],
369 [Datapath actions: 10
374 AT_SETUP([ofproto-dpif - select group])
376 add_of_ports br0 1 10 11
377 AT_CHECK([ovs-ofctl -O OpenFlow12 add-group br0 'group_id=1234,type=select,bucket=output:10,bucket=output:11'])
378 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=write_actions(group:1234)'])
380 # Try a bunch of different flows and make sure that they get distributed
382 for d in 0 1 2 3 4 5 6 7 8 9 a b c d e f; do
383 AT_CHECK([ovs-appctl ofproto/trace br0 "in_port=1,dl_src=50:54:00:00:00:07,dl_dst=50:54:00:00:00:0$d,dl_type=0x0800,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_proto=1,nw_tos=0,nw_ttl=128,icmp_type=8,icmp_code=0"], [0], [stdout])
384 tail -1 stdout >> results
386 sort results | uniq -c
387 AT_CHECK([sort results | uniq], [0],
388 [Datapath actions: 10
394 AT_SETUP([ofproto-dpif - select group with watch port])
396 add_of_ports br0 1 10 11
397 AT_CHECK([ovs-ofctl -O OpenFlow12 add-group br0 'group_id=1234,type=select,bucket=watch_port:10,output:10,bucket=output:11'])
398 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=write_actions(group:1234)'])
399 AT_CHECK([ovs-appctl ofproto/trace br0 'in_port=1,dl_src=50:54:00:00:00:07,dl_dst=50:54:00:00:00:07,dl_type=0x0800,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_proto=1,nw_tos=0,nw_ttl=128,icmp_type=8,icmp_code=0'], [0], [stdout])
400 AT_CHECK([tail -1 stdout], [0],
401 [Datapath actions: 11
406 AT_SETUP([ofproto-dpif - select group with weight])
408 add_of_ports br0 1 10 11 12
409 AT_CHECK([ovs-ofctl -O OpenFlow12 add-group br0 'group_id=1234,type=select,bucket=output:10,bucket=output:11,weight=2000,bucket=output:12,weight=0'])
410 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=write_actions(group:1234)'])
411 AT_CHECK([ovs-appctl ofproto/trace br0 'in_port=1,dl_src=50:54:00:00:00:07,dl_dst=50:54:00:00:00:07,dl_type=0x0800,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_proto=1,nw_tos=0,nw_ttl=128,icmp_type=8,icmp_code=0'], [0], [stdout])
412 AT_CHECK([tail -1 stdout], [0],
413 [Datapath actions: 11
418 AT_SETUP([ofproto-dpif - select group with hash selection method])
420 add_of_ports br0 1 10 11
421 AT_CHECK([ovs-ofctl -O OpenFlow15 add-group br0 'group_id=1234,type=select,selection_method=hash,fields=eth_dst,bucket=output:10,bucket=output:11'])
422 AT_CHECK([ovs-ofctl -O OpenFlow15 add-flow br0 'ip actions=write_actions(group:1234)'])
424 # Try a bunch of different flows and make sure that they get distributed
426 for d in 0 1 2 3 4 5 6 7 8 9 a b c d e f; do
427 AT_CHECK([ovs-appctl ofproto/trace br0 "in_port=1,dl_src=50:54:00:00:00:07,dl_dst=50:54:00:00:00:0$d,dl_type=0x0800,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_proto=1,nw_tos=0,nw_ttl=128,icmp_type=8,icmp_code=0"], [0], [stdout])
428 tail -1 stdout >> results
430 sort results | uniq -c
431 AT_CHECK([sort results | uniq], [0],
432 [Datapath actions: 10
437 # Try a bunch of different flows and make sure that they are not distributed
438 # as they only vary a field that is not hashed
439 for d in 0 1 2 3 4 5 6 7 8 9 a b c d e f; do
440 AT_CHECK([ovs-appctl ofproto/trace br0 "in_port=1,dl_src=50:54:00:00:00:0$d,dl_dst=50:54:00:00:00:07,dl_type=0x0800,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_proto=1,nw_tos=0,nw_ttl=128,icmp_type=8,icmp_code=0"], [0], [stdout])
441 tail -1 stdout >> results
443 sort results | uniq -c
444 AT_CHECK([sort results | uniq | sed 's/1[[01]]/1?/'], [0],
445 [Datapath actions: 1?
451 AT_SETUP([ofproto-dpif - fast failover group])
453 add_of_ports br0 1 10 11
454 AT_CHECK([ovs-ofctl -O OpenFlow12 add-group br0 'group_id=1234,type=ff,bucket=watch_port:10,output:10,bucket=watch_port:11,output:11'])
455 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=write_actions(group:1234)'])
456 AT_CHECK([ovs-appctl ofproto/trace br0 'in_port=1,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,dl_type=0x0800,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_proto=1,nw_tos=0,nw_ttl=128,icmp_type=8,icmp_code=0'], [0], [stdout])
457 AT_CHECK([tail -1 stdout], [0],
458 [Datapath actions: drop
463 AT_SETUP([ofproto-dpif - group stats single bucket])
465 add_of_ports br0 1 10 11
466 AT_CHECK([ovs-ofctl -O OpenFlow12 add-group br0 'group_id=1234,type=select,bucket=output:10,weight=2000,bucket=output:11,weight=0'])
467 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=write_actions(group:1234)'])
471 pkt="in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:01:00),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)"
472 AT_CHECK([ovs-appctl netdev-dummy/receive p1 $pkt])
475 AT_CHECK([ovs-appctl revalidator/purge], [0])
476 AT_CHECK([ovs-ofctl -O OpenFlow12 -vwarn dump-group-stats br0], [0], [stdout])
477 AT_CHECK([strip_xids < stdout | sort], [0], [dnl
478 group_id=1234,ref_count=1,packet_count=3,byte_count=180,bucket0:packet_count=3,byte_count=180,bucket1:packet_count=0,byte_count=0
479 OFPST_GROUP reply (OF1.2):
484 AT_SETUP([ofproto-dpif - group stats all buckets])
486 add_of_ports br0 1 10 11
487 AT_CHECK([ovs-ofctl -O OpenFlow12 add-group br0 'group_id=1234,type=all,bucket=output:10,bucket=output:11'])
488 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=write_actions(group:1234)'])
492 pkt="in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:01:00),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)"
493 AT_CHECK([ovs-appctl netdev-dummy/receive p1 $pkt])
496 AT_CHECK([ovs-appctl revalidator/purge], [0])
497 AT_CHECK([ovs-ofctl -O OpenFlow12 -vwarn dump-group-stats br0], [0], [stdout])
498 AT_CHECK([strip_xids < stdout | sort], [0], [dnl
499 group_id=1234,ref_count=1,packet_count=3,byte_count=180,bucket0:packet_count=3,byte_count=180,bucket1:packet_count=3,byte_count=180
500 OFPST_GROUP reply (OF1.2):
505 AT_SETUP([ofproto-dpif - registers])
507 add_of_ports br0 20 21 22 33 90
508 AT_DATA([flows.txt], [dnl
509 in_port=90 actions=resubmit:2,resubmit:3,resubmit:4,resubmit:91
510 in_port=91 actions=resubmit:5,resubmit:6,resubmit:7,resubmit:92
511 in_port=92 actions=resubmit:8,resubmit:9,resubmit:10,resubmit:11,resubmit:93
512 in_port=93 actions=resubmit:12,resubmit:13,resubmit:14,resubmit:15
514 in_port=2 actions=load:0x000db000->NXM_NX_REG0[[]]
515 in_port=3 actions=load:0xdea->NXM_NX_REG0[[20..31]]
516 in_port=4 actions=load:0xeef->NXM_NX_REG0[[0..11]]
517 in_port=5 actions=move:NXM_NX_REG0[[]]->NXM_NX_REG1[[]]
518 in_port=6 actions=load:0x22222222->NXM_NX_REG2[[]]
519 in_port=7 actions=move:NXM_NX_REG1[[20..31]]->NXM_NX_REG2[[0..11]]
520 in_port=8 actions=move:NXM_NX_REG1[[0..11]]->NXM_NX_REG2[[20..31]]
521 in_port=9,reg0=0xdeadbeef actions=output:20
522 in_port=10,reg1=0xdeadbeef actions=output:21
523 in_port=11,reg2=0xeef22dea actions=output:22
525 dnl Sanilty check all registers
526 in_port=12 actions=load:0x10->NXM_NX_REG0[[]],load:0x11->NXM_NX_REG1[[]],load:0x12->NXM_NX_REG2[[]]
527 in_port=13 actions=load:0x13->NXM_NX_REG3[[]],load:0x14->NXM_NX_REG4[[]],load:0x15->NXM_NX_REG5[[]]
528 in_port=14 actions=load:0x16->NXM_NX_REG6[[]],load:0x17->NXM_NX_REG7[[]]
529 in_port=15,reg0=0x10,reg1=0x11,reg2=0x12,reg3=0x13,reg4=0x14,reg5=0x15,reg6=0x16,reg7=0x17 actions=output:33
532 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
533 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(90),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)'], [0], [stdout])
534 AT_CHECK([tail -1 stdout], [0],
535 [Datapath actions: 20,21,22,33
540 dnl Tests that the standardized xregs are mapped onto the legacy OVS registers
541 dnl in the manner documented in ovs-ofctl(8).
542 AT_SETUP([ofproto-dpif - extended registers])
544 add_of_ports br0 1 2 3
545 AT_DATA([flows.txt], [dnl
546 table=0 actions=load:0xfedcba9876543210->OXM_OF_PKT_REG1[[]],resubmit(,1)
547 table=1,reg2=0xfedcba98,reg3=0x76543210 actions=2
549 # These low-priority rules shouldn't match. They're here only to make really
550 # sure that the test fails if either of the above rules fails to match.
551 table=0,priority=0 actions=3
552 table=1,priority=0 actions=3
554 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
555 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)'], [0], [stdout])
556 AT_CHECK([tail -1 stdout], [0], [Datapath actions: 2
561 AT_SETUP([ofproto-dpif - load and move order])
563 add_of_ports br0 1 10 11
564 AT_CHECK([ovs-ofctl -O OpenFlow12 add-group br0 'group_id=1234,type=all,bucket=output:10,move:NXM_NX_REG1[[]]->NXM_OF_IP_SRC[[]],bucket=output:11'])
565 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=write_actions(load:0xffffffff->NXM_NX_REG1[[]],move:NXM_NX_REG1[[]]->NXM_NX_REG2[[]],group:1234)'])
566 AT_CHECK([ovs-appctl ofproto/trace br0 'in_port=1,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,dl_type=0x0800,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_proto=1,nw_tos=0,nw_ttl=128,icmp_type=8,icmp_code=0'], [0], [stdout])
567 AT_CHECK([tail -2 stdout], [0],
568 [Megaflow: recirc_id=0,ip,in_port=1,nw_src=192.168.0.1,nw_frag=no
569 Datapath actions: set(ipv4(src=255.255.255.255)),10,set(ipv4(src=192.168.0.1)),11
574 dnl Tests that 1.5 copy-field can copy into the standardized xregs.
575 AT_SETUP([ofproto-dpif - copy-field into extended registers])
577 add_of_ports br0 1 2 3
578 AT_DATA([flows.txt], [dnl
579 table=0 actions=move:OXM_OF_ETH_SRC[[0..47]]->OXM_OF_PKT_REG0[[0..47]],goto_table(1)
580 table=1,xreg0=0x0000505400000005 actions=2
582 # These low-priority rules shouldn't match. They're here only to make really
583 # sure that the test fails if either of the above rules fails to match.
584 table=0,priority=0 actions=3
585 table=1,priority=0 actions=3
587 AT_CHECK([ovs-ofctl -O OpenFlow15 add-flows br0 flows.txt])
588 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)'], [0], [stdout])
589 AT_CHECK([tail -1 stdout], [0], [Datapath actions: 2
594 dnl Tests that 1.5 set-field with mask in the metadata register.
595 AT_SETUP([ofproto-dpif - masked set-field into metadata])
597 add_of_ports br0 1 2 3
598 AT_DATA([flows.txt], [dnl
599 table=0 actions=set_field:0xfafafafa5a5a5a5a->metadata,goto_table(1)
600 table=1 actions=set_field:0x6b/0xff->metadata,goto_table(2)
601 table=2,metadata=0xfafafafa5a5a5a6b actions=2
603 # These low-priority rules shouldn't match. They're here only to make really
604 # sure that the test fails if either of the above rules fails to match.
605 table=0,priority=0 actions=3
606 table=1,priority=0 actions=3
607 table=2,priority=0 actions=3
609 AT_CHECK([ovs-ofctl -O OpenFlow15 add-flows br0 flows.txt])
610 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)'], [0], [stdout])
611 AT_CHECK([tail -1 stdout], [0], [Datapath actions: 2
617 AT_SETUP([ofproto-dpif - actset_output])
619 add_of_ports br0 1 2 3 4 5 6 7 8 9 10 11 12 13
620 AT_DATA([flows.txt], [dnl
621 table=0,actset_output=unset actions=write_actions(output(2)),goto_table(1)
622 table=1 actions=move:ONFOXM_ET_ACTSET_OUTPUT[[0..31]]->OXM_OF_PKT_REG0[[0..31]],goto_table(2)
624 # Verify that actset_output got set.
625 table=2,priority=20,actset_output=2 actions=4,goto_table(3)
626 table=2,priority=10 actions=5,goto_table(3)
628 # Verify that xreg0 got copied properly from actset_output.
629 table=3,priority=20,xreg0=2 actions=6,goto_table(4)
630 table=3,priority=10 actions=7,goto_table(4)
632 # Verify that adding a group action unsets actset_output,
633 # even if output follows group.
634 table=4 actions=write_actions(group(5),output(10)),goto_table(5)
635 table=5,priority=20,actset_output=unset actions=8,goto_table(6)
636 table=5,priority=10 actions=9,goto_table(6)
638 # Verify that adding another output action doesn't change actset_output
639 # (since there's still a group).
640 table=6 actions=write_actions(output(3)),goto_table(7)
641 table=7,priority=20,actset_output=unset actions=10,goto_table(8)
642 table=7,priority=10 actions=11,goto_table(8)
644 # Verify that clearing the action set, then writing an output action,
645 # causes actset_output to be set again.
646 table=8,actions=clear_actions,write_actions(output(3),output(2)),goto_table(9)
647 table=9,priority=20,actset_output=2 actions=12
648 table=9,priority=10 actions=13
650 AT_CHECK([ovs-ofctl -O OpenFlow13 add-group br0 'group_id=5,type=all,bucket=output:1'])
651 AT_CHECK([ovs-ofctl -O OpenFlow13 add-flows br0 flows.txt])
652 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)'], [0], [stdout])
653 AT_CHECK([tail -1 stdout], [0], [Datapath actions: 4,6,8,10,12,2
657 AT_SETUP([ofproto-dpif - push-pop])
659 add_of_ports br0 20 21 22 33 90
660 AT_DATA([flows.txt], [dnl
661 in_port=90 actions=load:20->NXM_NX_REG0[[0..7]],load:21->NXM_NX_REG1[[0..7]],load:22->NXM_NX_REG2[[0..7]], load:33->NXM_NX_REG3[[0..7]], push:NXM_NX_REG0[[]], push:NXM_NX_REG1[[0..7]],push:NXM_NX_REG2[[0..15]], push:NXM_NX_REG3[[]], resubmit:2, resubmit:3, resubmit:4, resubmit:5
662 in_port=2 actions=pop:NXM_NX_REG0[[0..7]],output:NXM_NX_REG0[[]]
663 in_port=3 actions=pop:NXM_NX_REG1[[0..7]],output:NXM_NX_REG1[[]]
664 in_port=4 actions=pop:NXM_NX_REG2[[0..15]],output:NXM_NX_REG2[[]]
665 in_port=5 actions=pop:NXM_NX_REG3[[]],output:NXM_NX_REG3[[]]
668 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
669 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(90),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)'], [0], [stdout])
670 AT_CHECK([tail -1 stdout], [0],
671 [Datapath actions: 33,22,21,20
676 AT_SETUP([ofproto-dpif - output])
678 add_of_ports br0 1 9 10 11 55 66 77 88
679 AT_DATA([flows.txt], [dnl
680 in_port=1 actions=resubmit:2,resubmit:3,resubmit:4,resubmit:5,resubmit:6,resubmit:7,resubmit:8
681 in_port=2 actions=output:9
682 in_port=3 actions=load:55->NXM_NX_REG0[[]],output:NXM_NX_REG0[[]],load:66->NXM_NX_REG1[[]]
683 in_port=4 actions=output:10,output:NXM_NX_REG0[[]],output:NXM_NX_REG1[[]],output:11
684 in_port=5 actions=load:77->NXM_NX_REG0[[0..15]],load:88->NXM_NX_REG0[[16..31]]
685 in_port=6 actions=output:NXM_NX_REG0[[0..15]],output:NXM_NX_REG0[[16..31]]
686 in_port=7 actions=load:0x110000ff->NXM_NX_REG0[[]],output:NXM_NX_REG0[[]]
687 in_port=8 actions=1,9,load:9->NXM_OF_IN_PORT[[]],1,9
689 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
690 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)'], [0], [stdout])
691 AT_CHECK([tail -1 stdout], [0],
692 [Datapath actions: 9,55,10,55,66,11,77,88,9,1
697 AT_SETUP([ofproto-dpif - dec_ttl])
699 add_of_ports br0 1 2 3 4
700 AT_DATA([flows.txt], [dnl
701 table=0 in_port=1 action=dec_ttl,output:2,resubmit(1,1),output:4
702 table=1 in_port=1 action=dec_ttl,output:3
704 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
705 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=111,tos=0,ttl=2,frag=no)' -generate], [0], [stdout])
706 AT_CHECK([tail -4 stdout], [0],
707 [Megaflow: recirc_id=0,ip,in_port=1,nw_ttl=2,nw_frag=no
708 Datapath actions: set(ipv4(ttl=1)),2,4
709 This flow is handled by the userspace slow path because it:
710 - Sends "packet-in" messages to the OpenFlow controller.
712 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=111,tos=0,ttl=3,frag=no)'], [0], [stdout])
713 AT_CHECK([tail -2 stdout], [0],
714 [Megaflow: recirc_id=0,ip,in_port=1,nw_ttl=3,nw_frag=no
715 Datapath actions: set(ipv4(ttl=2)),2,set(ipv4(ttl=1)),3,4
717 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x86dd),ipv6(src=::1,dst=::2,label=0,proto=10,tclass=0x70,hlimit=128,frag=no)'], [0], [stdout])
718 AT_CHECK([tail -2 stdout], [0],
719 [Megaflow: recirc_id=0,ipv6,in_port=1,nw_ttl=128,nw_frag=no
720 Datapath actions: set(ipv6(hlimit=127)),2,set(ipv6(hlimit=126)),3,4
723 AT_CAPTURE_FILE([ofctl_monitor.log])
724 AT_CHECK([ovs-ofctl -P nxt_packet_in monitor br0 65534 invalid_ttl --detach --no-chdir --pidfile 2> ofctl_monitor.log])
725 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=111,tos=0,ttl=2,frag=no)' -generate], [0], [stdout])
726 OVS_APP_EXIT_AND_WAIT([ovs-ofctl])
727 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
728 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=34 in_port=1 (via invalid_ttl) data_len=34 (unbuffered)
729 ip,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_proto=111,nw_tos=0,nw_ecn=0,nw_ttl=1
734 dnl A dec_ttl action at offset 32 in ofpacts will cause the ofpacts
735 dnl buffer to be resized just before pushing the id of the dec_ttl action.
736 dnl Thus the implementation must account for this by using the
737 dnl reallocated buffer rather than the original buffer.
739 dnl A number of similar rules are added to try and exercise
740 dnl xrealloc sufficiently that it returns a different base pointer
741 AT_SETUP([ofproto-dpif - dec_ttl without arguments at offset 32 in ofpacts])
744 (for i in `seq 0 255`; do
745 printf "dl_src=10:11:11:11:11:%02x actions=output:1,output:1,output:1,dec_ttl,controller\n" $i
747 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
751 dnl A dec_ttl action at offset 32 in ofpacts will cause the ofpacts
752 dnl buffer to be resized just before pushing the id of the dec_ttl action.
753 dnl Thus the implementation must account for this by using the
754 dnl reallocated buffer rather than the original buffer.
756 dnl A number of similar rules are added to try and exercise
757 dnl xrealloc sufficiently that it returns a different base pointer
758 AT_SETUP([ofproto-dpif - dec_ttl with arguments at offset 32 in ofpacts])
761 (for i in `seq 0 255`; do
762 printf "dl_src=10:11:11:11:11:%02x actions=output:1,output:1,output:1,dec_ttl(1),controller\n" $i
764 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
768 dnl A note action at offset 24 in ofpacts will cause the ofpacts
769 dnl buffer to be resized just before pushing the id of the dec_ttl action.
770 dnl Thus the implementation must account for this by using the
771 dnl reallocated buffer rather than the original buffer.
773 dnl A number of similar rules are added to try and exercise
774 dnl xrealloc sufficiently that it returns a different base pointer
775 AT_SETUP([ofproto-dpif - note at offset 24 in ofpacts])
778 (for i in `seq 0 255`; do
779 printf "dl_src=10:11:11:11:11:%02x actions=output:1,output:1,note:ff,controller\n" $i
781 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
785 dnl As of OVS-2.5, a note action after 4 set_field actions are likely to
786 dnl trigger ofpbuf reallocation during decode (~1KB into ofpacts buffer).
787 dnl Using `make check-valgrind' here checks for use-after-free in this
789 AT_SETUP([ofproto-dpif - note action deep inside ofpacts])
791 AT_CHECK([ovs-ofctl add-flow br0 'actions=set_field:0x1->metadata,set_field:0x2->metadata,set_field:0x3->metadata,set_field:0x4->metadata,note:00000000000000000000000000000000,note:00000000000000000000000000000000'])
795 AT_SETUP([ofproto-dpif - output, OFPP_NONE ingress port])
799 AT_CHECK([ovs-ofctl add-flow br0 action=normal])
801 # "in_port" defaults to OFPP_NONE if it's not specified.
802 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"
803 AT_CHECK([ovs-appctl ofproto/trace br0 "$flow"], [0], [stdout])
804 AT_CHECK([tail -1 stdout | sed 's/Datapath actions: //' | tr "," "\n" | sort -n], [0], [dnl
813 AT_SETUP([ofproto-dpif - DSCP])
814 OVS_VSWITCHD_START([add-port br0 p1 -- set Interface p1 type=dummy])
816 AT_DATA([flows.txt], [dnl
817 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
819 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
820 AT_CHECK([ovs-vsctl -- \
821 set Port p1 qos=@newqos --\
822 --id=@newqos create QoS type=linux-htb queues=1=@q1,2=@q2 --\
823 --id=@q1 create Queue dscp=1 --\
824 --id=@q2 create Queue dscp=2], [0], [ignore])
825 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])
826 AT_CHECK([tail -2 stdout], [0],
827 [Megaflow: recirc_id=0,skb_priority=0,ip,in_port=9,nw_tos=252,nw_frag=no
828 Datapath actions: dnl
830 set(ipv4(tos=0x4/0xfc)),set(skb_priority(0x1)),1,dnl
831 set(ipv4(tos=0x8/0xfc)),set(skb_priority(0x2)),1,dnl
833 set(ipv4(tos=0x4/0xfc)),set(skb_priority(0x1)),1,dnl
834 set(ipv4(tos=0xfc/0xfc)),set(skb_priority(0)),1,dnl
835 set(ipv4(tos=0/0xfc)),1,100
840 AT_SETUP([ofproto-dpif - output/flood flags])
842 add_of_ports br0 1 2 3 4 5 6 7
844 AT_DATA([flows.txt], [dnl
845 in_port=local actions=local,flood
846 in_port=1 actions=flood
847 in_port=2 actions=all
848 in_port=3 actions=output:LOCAL,output:1,output:2,output:3,output:4,output:5,output:6,output:7
849 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
851 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
852 AT_CHECK([ovs-ofctl mod-port br0 5 noforward])
853 AT_CHECK([ovs-ofctl mod-port br0 6 noflood])
855 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])
856 AT_CHECK([tail -1 stdout \
857 | sed -e 's/Datapath actions: //' | tr ',' '\n' | sort], [0], [dnl
865 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(1),eth(src=00:00:00:00:00:01,dst=00:00:00:00:00:02),eth_type(0x0900)'], [0], [stdout])
866 AT_CHECK([tail -1 stdout \
867 | sed -e 's/Datapath actions: //' | tr ',' '\n' | sort], [0], [dnl
875 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])
876 AT_CHECK([tail -1 stdout \
877 | sed -e 's/Datapath actions: //' | tr ',' '\n' | sort], [0], [dnl
886 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])
887 AT_CHECK([tail -1 stdout], [0],
888 [Datapath actions: 100,1,2,4,6,7
891 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])
892 AT_CHECK([tail -1 stdout], [0],
893 [Datapath actions: set(skb_priority(0x1)),100,1,2,set(skb_priority(0x2)),3,set(skb_priority(0x1)),6,7
898 AT_SETUP([ofproto-dpif - Default Table Miss - OF1.0 (OFPTC_TABLE_MISS_CONTROLLER)])
899 OVS_VSWITCHD_START([dnl
900 add-port br0 p1 -- set Interface p1 type=dummy
902 on_exit 'kill `cat ovs-ofctl.pid`'
904 AT_CAPTURE_FILE([ofctl_monitor.log])
906 AT_CHECK([ovs-ofctl -P nxt_packet_in monitor br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
909 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)'
911 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
912 OVS_APP_EXIT_AND_WAIT([ovs-ofctl])
913 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
914 NXT_PACKET_IN (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
915 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
917 NXT_PACKET_IN (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
918 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
920 NXT_PACKET_IN (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
921 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
924 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
925 AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
932 AT_SETUP([ofproto-dpif - Default Table Miss - OF1.3 (OFPTC_TABLE_MISS_DROP)])
933 OVS_VSWITCHD_START([dnl
934 add-port br0 p1 -- set Interface p1 type=dummy
936 on_exit 'kill `cat ovs-ofctl.pid`'
938 AT_CAPTURE_FILE([ofctl_monitor.log])
939 AT_CHECK([ovs-ofctl del-flows br0])
941 AT_CHECK([ovs-ofctl monitor -OOpenFlow13 -P standard br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
943 dnl Test that missed packets are droped
945 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)'
947 OVS_APP_EXIT_AND_WAIT([ovs-ofctl])
949 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
952 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
953 AT_CHECK([ovs-ofctl -OOpenFlow13 dump-flows br0 | ofctl_strip | sort], [0], [dnl
954 OFPST_FLOW reply (OF1.3):
960 AT_SETUP([ofproto-dpif - Table Miss - goto table and OFPTC_TABLE_MISS_CONTROLLER])
961 OVS_VSWITCHD_START([dnl
962 add-port br0 p1 -- set Interface p1 type=dummy
964 on_exit 'kill `cat ovs-ofctl.pid`'
966 AT_CAPTURE_FILE([ofctl_monitor.log])
967 AT_CHECK([ovs-ofctl -OOpenFlow12 add-flow br0 'table=0 actions=goto_table(1)'])
969 AT_CHECK([ovs-ofctl monitor -P standard br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
972 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)'
974 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
975 OVS_APP_EXIT_AND_WAIT([ovs-ofctl])
976 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
977 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
978 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
980 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
981 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
983 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
984 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
987 AT_CHECK([ovs-appctl revalidator/purge], [0])
988 AT_CHECK([ovs-ofctl -OOpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
989 n_packets=3, n_bytes=180, actions=goto_table:1
990 OFPST_FLOW reply (OF1.2):
996 AT_SETUP([ofproto-dpif - Table Miss - resubmit and OFPTC_TABLE_MISS_CONTROLLER])
997 OVS_VSWITCHD_START([dnl
998 add-port br0 p1 -- set Interface p1 type=dummy
1000 on_exit 'kill `cat ovs-ofctl.pid`'
1002 AT_CAPTURE_FILE([ofctl_monitor.log])
1003 AT_CHECK([ovs-ofctl -OOpenFlow12 add-flow br0 'table=0 actions=resubmit(1,1)'])
1005 AT_CHECK([ovs-ofctl monitor -P standard br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1008 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)'
1011 OVS_APP_EXIT_AND_WAIT([ovs-ofctl])
1012 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1015 AT_CHECK([ovs-appctl revalidator/purge], [0])
1016 AT_CHECK([ovs-ofctl -OOpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
1017 n_packets=3, n_bytes=180, actions=resubmit(1,1)
1018 OFPST_FLOW reply (OF1.2):
1024 AT_SETUP([ofproto-dpif - Table Miss - OFPTC_TABLE_MISS_CONTINUE])
1025 OVS_VSWITCHD_START([dnl
1026 add-port br0 p1 -- set Interface p1 type=dummy
1028 on_exit 'kill `cat ovs-ofctl.pid`'
1030 AT_CAPTURE_FILE([ofctl_monitor.log])
1031 AT_CHECK([ovs-ofctl add-flow br0 'table=1 dl_src=10:11:11:11:11:11 actions=controller'])
1032 AT_CHECK([ovs-ofctl -OOpenFlow11 mod-table br0 all continue])
1034 dnl Miss table 0, Hit table 1
1035 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxt_packet_in --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1038 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)'
1040 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1041 OVS_APP_EXIT_AND_WAIT([ovs-ofctl])
1043 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1044 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1045 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
1047 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1048 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
1050 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1051 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
1054 dnl Hit table 0, Miss all other tables, sent to controller
1055 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxt_packet_in --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1058 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)'
1060 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1061 OVS_APP_EXIT_AND_WAIT([ovs-ofctl])
1063 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1064 NXT_PACKET_IN (xid=0x0): table_id=253 cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
1065 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
1067 NXT_PACKET_IN (xid=0x0): table_id=253 cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
1068 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
1070 NXT_PACKET_IN (xid=0x0): table_id=253 cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
1071 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
1074 AT_CHECK([ovs-appctl revalidator/purge], [0])
1075 AT_CHECK([ovs-ofctl -OOpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
1076 table=1, n_packets=3, n_bytes=180, dl_src=10:11:11:11:11:11 actions=CONTROLLER:65535
1077 OFPST_FLOW reply (OF1.2):
1083 AT_SETUP([ofproto-dpif - Table Miss - goto table and OFPTC_TABLE_MISS_CONTINUE])
1084 OVS_VSWITCHD_START([dnl
1085 add-port br0 p1 -- set Interface p1 type=dummy
1087 on_exit 'kill `cat ovs-ofctl.pid`'
1089 AT_CAPTURE_FILE([ofctl_monitor.log])
1090 AT_DATA([flows.txt], [dnl
1091 table=0 actions=goto_table(1)
1092 table=2 dl_src=10:11:11:11:11:11 actions=controller
1094 AT_CHECK([ovs-ofctl -OOpenFlow12 add-flows br0 flows.txt])
1095 AT_CHECK([ovs-ofctl -OOpenFlow11 mod-table br0 all continue])
1097 dnl Hit table 0, Miss table 1, Hit table 2
1098 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxt_packet_in --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1101 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)'
1103 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1104 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1106 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1107 NXT_PACKET_IN (xid=0x0): table_id=2 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1108 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
1110 NXT_PACKET_IN (xid=0x0): table_id=2 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1111 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
1113 NXT_PACKET_IN (xid=0x0): table_id=2 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1114 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
1117 dnl Hit table 1, Miss all other tables, sent to controller
1118 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxt_packet_in --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1121 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)'
1123 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1124 OVS_APP_EXIT_AND_WAIT([ovs-ofctl])
1126 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1127 NXT_PACKET_IN (xid=0x0): table_id=253 cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
1128 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
1130 NXT_PACKET_IN (xid=0x0): table_id=253 cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
1131 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
1133 NXT_PACKET_IN (xid=0x0): table_id=253 cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
1134 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
1137 AT_CHECK([ovs-appctl revalidator/purge], [0])
1138 AT_CHECK([ovs-ofctl -OOpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
1139 n_packets=6, n_bytes=360, actions=goto_table:1
1140 table=2, n_packets=3, n_bytes=180, dl_src=10:11:11:11:11:11 actions=CONTROLLER:65535
1141 OFPST_FLOW reply (OF1.2):
1147 AT_SETUP([ofproto-dpif - Table Miss - resubmit and OFPTC_TABLE_MISS_CONTINUE])
1148 OVS_VSWITCHD_START([dnl
1149 add-port br0 p1 -- set Interface p1 type=dummy
1151 on_exit 'kill `cat ovs-ofctl.pid`'
1153 AT_CAPTURE_FILE([ofctl_monitor.log])
1154 AT_DATA([flows.txt], [dnl
1155 table=0 actions=resubmit(1,1)
1156 table=2 dl_src=10:11:11:11:11:11 actions=controller
1158 AT_CHECK([ovs-ofctl -OOpenFlow12 add-flows br0 flows.txt])
1159 AT_CHECK([ovs-ofctl -OOpenFlow11 mod-table br0 all continue])
1161 dnl Hit table 0, Miss table 1, Dropped
1162 AT_CHECK([ovs-ofctl monitor br0 65534 -P standard --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1165 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)'
1167 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1169 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1172 dnl Hit table 1, Dropped
1173 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxt_packet_in --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1176 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)'
1178 OVS_APP_EXIT_AND_WAIT([ovs-ofctl])
1180 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1183 AT_CHECK([ovs-appctl revalidator/purge], [0])
1184 AT_CHECK([ovs-ofctl -OOpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
1185 n_packets=6, n_bytes=360, actions=resubmit(1,1)
1186 table=2, dl_src=10:11:11:11:11:11 actions=CONTROLLER:65535
1187 OFPST_FLOW reply (OF1.2):
1193 AT_SETUP([ofproto-dpif - Table Miss - OFPTC_TABLE_MISS_DROP])
1194 OVS_VSWITCHD_START([dnl
1195 add-port br0 p1 -- set Interface p1 type=dummy
1197 on_exit 'kill `cat ovs-ofctl.pid`'
1199 AT_CAPTURE_FILE([ofctl_monitor.log])
1200 AT_CHECK([ovs-ofctl -OOpenFlow11 mod-table br0 all drop])
1202 AT_CHECK([ovs-ofctl monitor -P standard br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1204 dnl Test that missed packets are droped
1206 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)'
1208 OVS_APP_EXIT_AND_WAIT([ovs-ofctl])
1210 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1213 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1214 AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
1221 AT_SETUP([ofproto-dpif - Table Miss - goto table and OFPTC_TABLE_MISS_DROP])
1222 OVS_VSWITCHD_START([dnl
1223 add-port br0 p1 -- set Interface p1 type=dummy
1225 on_exit 'kill `cat ovs-ofctl.pid`'
1227 AT_CAPTURE_FILE([ofctl_monitor.log])
1228 AT_CHECK([ovs-ofctl del-flows br0])
1229 AT_CHECK([ovs-ofctl -OOpenFlow12 add-flow br0 'table=0 actions=goto_table(1)'])
1230 AT_CHECK([ovs-ofctl -OOpenFlow11 mod-table br0 all drop])
1232 AT_CHECK([ovs-ofctl monitor -P standard br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1234 dnl Test that missed packets are droped
1236 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=9),tcp_flags(0x010)'
1238 OVS_APP_EXIT_AND_WAIT([ovs-ofctl])
1240 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1243 AT_CHECK([ovs-appctl revalidator/purge], [0])
1244 AT_CHECK([ovs-ofctl -OOpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
1245 n_packets=3, n_bytes=180, actions=goto_table:1
1246 OFPST_FLOW reply (OF1.2):
1252 AT_SETUP([ofproto-dpif - Table Miss - resubmit and OFPTC_TABLE_MISS_DROP])
1253 OVS_VSWITCHD_START([dnl
1254 add-port br0 p1 -- set Interface p1 type=dummy
1256 on_exit 'kill `cat ovs-ofctl.pid`'
1258 AT_CAPTURE_FILE([ofctl_monitor.log])
1259 AT_CHECK([ovs-ofctl del-flows br0])
1260 AT_CHECK([ovs-ofctl -OOpenFlow12 add-flow br0 'table=0 actions=resubmit(1,1)'])
1261 AT_CHECK([ovs-ofctl -OOpenFlow11 mod-table br0 all drop])
1263 AT_CHECK([ovs-ofctl monitor -P standard br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1265 dnl Test that missed packets are droped
1267 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)'
1269 OVS_APP_EXIT_AND_WAIT([ovs-ofctl])
1271 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1274 AT_CHECK([ovs-appctl revalidator/purge], [0])
1275 AT_CHECK([ovs-ofctl -OOpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
1276 n_packets=3, n_bytes=180, actions=resubmit(1,1)
1277 OFPST_FLOW reply (OF1.2):
1283 AT_SETUP([ofproto-dpif - controller])
1284 OVS_VSWITCHD_START([dnl
1285 add-port br0 p1 -- set Interface p1 type=dummy
1287 on_exit 'kill `cat ovs-ofctl.pid`'
1289 AT_CAPTURE_FILE([ofctl_monitor.log])
1290 AT_DATA([flows.txt], [dnl
1291 cookie=0x0 dl_src=10:11:11:11:11:11 actions=controller
1292 cookie=0x1 dl_src=20:22:22:22:22:22 actions=controller,resubmit(80,1)
1293 cookie=0x2 dl_src=30:33:33:33:33:33 actions=mod_vlan_vid:15,controller
1295 cookie=0x3 table=1 in_port=80 actions=load:1->NXM_NX_REG0[[]],mod_vlan_vid:80,controller,resubmit(81,2)
1296 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)
1297 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)
1298 cookie=0x6 table=4 in_port=83 actions=load:4->NXM_NX_REG3[[]],mod_nw_src:83.83.83.83,controller,resubmit(84,5)
1299 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)
1300 cookie=0x8 table=6 in_port=85 actions=mod_tp_src:85,controller,resubmit(86,7)
1301 cookie=0x9 table=7 in_port=86 actions=mod_tp_dst:86,controller,controller
1302 cookie=0xa dl_src=40:44:44:44:44:41 actions=mod_vlan_vid:99,mod_vlan_pcp:1,controller
1303 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
1305 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
1308 AT_CHECK([ovs-ofctl monitor -P standard br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1311 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)'
1313 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1314 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1316 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1317 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
1318 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
1320 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
1321 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
1323 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
1324 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
1327 dnl Singleton controller action.
1328 AT_CHECK([ovs-ofctl monitor -P standard br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1331 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)'
1333 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1334 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1336 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1337 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1338 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
1340 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1341 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
1343 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1344 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
1347 dnl Modified controller action.
1348 AT_CHECK([ovs-ofctl monitor -P standard br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1351 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)'
1353 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1354 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1356 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1357 OFPT_PACKET_IN (xid=0x0): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1358 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
1360 OFPT_PACKET_IN (xid=0x0): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1361 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
1363 OFPT_PACKET_IN (xid=0x0): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1364 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
1367 dnl Modified VLAN controller action.
1368 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxt_packet_in --detach --pidfile 2> ofctl_monitor.log])
1371 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)'
1373 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1374 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1376 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1377 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1378 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
1380 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1381 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
1383 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1384 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
1388 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxt_packet_in --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1391 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)'
1393 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 18])
1394 OVS_APP_EXIT_AND_WAIT([ovs-ofctl])
1396 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1397 NXT_PACKET_IN (xid=0x0): cookie=0x1 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1398 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
1400 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x3 total_len=64 reg0=0x1,in_port=1 (via action) data_len=64 (unbuffered)
1401 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
1403 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)
1404 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
1406 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)
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=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
1409 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)
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=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
1412 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)
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=8,tp_dst=11,tcp_flags=fin tcp_csum:3205
1415 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)
1416 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
1418 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)
1419 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
1421 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)
1422 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
1426 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxt_packet_in --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1429 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'
1431 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 18])
1432 OVS_APP_EXIT_AND_WAIT([ovs-ofctl])
1434 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1435 NXT_PACKET_IN (xid=0x0): cookie=0x1 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1436 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
1438 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x3 total_len=64 reg0=0x1,in_port=1 (via action) data_len=64 (unbuffered)
1439 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
1441 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)
1442 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
1444 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)
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=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
1447 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)
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=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=8,tp_dst=11 udp_csum:2c37
1450 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)
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=8,tp_dst=11 udp_csum:4439
1453 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)
1454 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
1456 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)
1457 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
1459 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)
1460 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
1463 dnl Modified ARP controller action.
1464 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxt_packet_in --detach --pidfile 2> ofctl_monitor.log])
1467 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)'
1470 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 18])
1471 OVS_APP_EXIT_AND_WAIT([ovs-ofctl])
1472 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1473 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1474 arp,vlan_tci=0x0000,dl_src=80:88:88:88:88:88,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=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
1475 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1476 arp,vlan_tci=0x0000,dl_src=80:88:88:88:88:88,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=192.168.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
1477 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1478 arp,vlan_tci=0x0000,dl_src=80:88:88:88:88:88,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=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
1479 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1480 arp,vlan_tci=0x0000,dl_src=80:88:88:88:88:88,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=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
1481 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1482 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
1483 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1484 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
1485 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1486 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
1487 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1488 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
1489 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1490 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
1493 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1496 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxt_packet_in --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1499 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'
1502 AT_CHECK([ovs-appctl time/warp 1000], [0], [ignore])
1503 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 18])
1504 OVS_APP_EXIT_AND_WAIT([ovs-ofctl])
1505 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1506 NXT_PACKET_IN (xid=0x0): cookie=0x1 total_len=98 in_port=1 (via action) data_len=98 (unbuffered)
1507 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
1509 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x3 total_len=102 reg0=0x1,in_port=1 (via action) data_len=102 (unbuffered)
1510 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
1512 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)
1513 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
1515 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)
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=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
1518 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)
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=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=1112,tp_dst=2223 sctp_csum:d9d79157
1521 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)
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=1112,tp_dst=2223 sctp_csum:d9d79157
1524 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)
1525 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
1527 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)
1528 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
1530 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)
1531 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
1534 AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
1535 cookie=0x1, n_packets=3, n_bytes=218, dl_src=20:22:22:22:22:22 actions=CONTROLLER:65535,resubmit(80,1)
1536 cookie=0x2, n_packets=3, n_bytes=180, dl_src=30:33:33:33:33:33 actions=mod_vlan_vid:15,CONTROLLER:65535
1537 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)
1538 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)
1539 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)
1540 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)
1541 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)
1542 cookie=0x8, table=6, n_packets=3, n_bytes=218, in_port=85 actions=mod_tp_src:85,CONTROLLER:65535,resubmit(86,7)
1543 cookie=0x9, table=7, n_packets=3, n_bytes=218, in_port=86 actions=mod_tp_dst:86,CONTROLLER:65535,CONTROLLER:65535
1544 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
1545 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
1546 n_packets=3, n_bytes=180, dl_src=10:11:11:11:11:11 actions=CONTROLLER:65535
1553 AT_SETUP([ofproto-dpif - MPLS handling])
1554 OVS_VSWITCHD_START([dnl
1555 add-port br0 p1 -- set Interface p1 type=dummy
1557 on_exit 'kill `cat ovs-ofctl.pid`'
1559 AT_CAPTURE_FILE([ofctl_monitor.log])
1560 AT_DATA([flows.txt], [dnl
1561 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
1562 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
1563 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
1564 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
1565 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
1566 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
1567 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
1568 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
1569 cookie=0xa mpls,dl_src=40:44:44:44:44:49 actions=push_mpls:0x8848,load:10->OXM_OF_MPLS_LABEL[[]],CONTROLLER:65535
1570 cookie=0xb dl_src=50:55:55:55:55:55 dl_type=0x8847 actions=load:1000->OXM_OF_MPLS_LABEL[[]],controller
1571 cookie=0xd dl_src=60:66:66:66:66:66 actions=pop_mpls:0x0800,controller
1572 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
1574 cookie=0xd dl_src=60:66:66:66:00:01 actions=pop_mpls:0x0800,dec_ttl,controller
1575 cookie=0xd dl_src=60:66:66:66:00:02 actions=pop_mpls:0x0800,load:0xa000001->OXM_OF_IPV4_DST[[]],controller
1576 cookie=0xd dl_src=60:66:66:66:00:03 actions=pop_mpls:0x0800,move:OXM_OF_IPV4_DST[[]]->OXM_OF_IPV4_SRC[[]],controller
1577 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
1578 cookie=0xd dl_src=60:66:66:66:00:05 actions=pop_mpls:0x0800,multipath(eth_src,50,modulo_n,1,0,OXM_OF_IPV4_SRC[[0..7]]),controller
1579 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
1580 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
1582 cookie=0xd dl_src=60:66:66:66:00:08 actions=pop_mpls:0x0806,resubmit(1,1)
1583 cookie=0xd table=1 arp actions=controller
1585 cookie=0xdeadbeef table=2 dl_src=60:66:66:66:00:09 actions=pop_mpls:0x0800,mod_nw_tos:48
1586 cookie=0xd dl_src=60:66:66:66:00:09 actions=resubmit(,2),controller
1587 cookie=0xd dl_src=60:66:66:66:00:0a actions=pop_mpls:0x0800,mod_nw_dst:10.0.0.1,controller
1588 cookie=0xd dl_src=60:66:66:66:00:0b actions=pop_mpls:0x0800,mod_nw_src:10.0.0.1,controller
1590 cookie=0xd dl_src=60:66:66:66:01:00 actions=pop_mpls:0x8848,controller
1591 cookie=0xd dl_src=60:66:66:66:01:01 actions=pop_mpls:0x8847,dec_mpls_ttl,controller
1592 cookie=0xd dl_src=60:66:66:66:01:02 actions=pop_mpls:0x8848,load:3->OXM_OF_MPLS_TC[[]],controller
1594 cookie=0xd dl_src=60:66:66:66:02:00 actions=pop_mpls:0x8847,pop_mpls:0x0800,controller
1595 cookie=0xe dl_src=60:66:66:66:02:01 actions=pop_mpls:0x8848,pop_mpls:0x0800,dec_ttl,controller
1596 cookie=0xe dl_src=60:66:66:66:02:10 actions=pop_mpls:0x8847,dec_mpls_ttl,pop_mpls:0x0800,dec_ttl,controller
1598 cookie=0xe dl_src=60:66:66:66:03:00 actions=pop_mpls:0x8848,pop_mpls:0x8848,controller
1599 cookie=0xe dl_src=60:66:66:66:03:01 actions=pop_mpls:0x8847,pop_mpls:0x8847,dec_mpls_ttl,controller
1600 cookie=0xe dl_src=60:66:66:66:03:10 actions=pop_mpls:0x8848,dec_mpls_ttl,pop_mpls:0x8848,dec_mpls_ttl,controller
1602 cookie=0xf dl_src=60:66:66:66:04:00 actions=pop_mpls:0x0800,push_mpls:0x8847,controller
1603 cookie=0xf dl_src=60:66:66:66:04:01 actions=pop_mpls:0x0800,push_mpls:0x8848,dec_mpls_ttl,controller
1604 cookie=0xf dl_src=60:66:66:66:04:10 actions=pop_mpls:0x0800,dec_ttl,push_mpls:0x8848,dec_mpls_ttl,controller
1606 cookie=0x5 dl_src=60:66:66:66:05:00 actions=push_mpls:0x8848,pop_mpls:0x8847,controller
1607 cookie=0x5 dl_src=60:66:66:66:05:01 actions=push_mpls:0x8847,pop_mpls:0x8848,dec_mpls_ttl,controller
1608 cookie=0x5 dl_src=60:66:66:66:05:10 actions=push_mpls:0x8848,dec_mpls_ttl,pop_mpls:0x8847,dec_mpls_ttl,controller
1610 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
1612 dnl Modified MPLS controller action.
1613 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxt_packet_in --detach --pidfile 2> ofctl_monitor.log])
1616 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)'
1618 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1619 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1621 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1622 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1623 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
1625 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1626 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
1628 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1629 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
1632 dnl Modified MPLS controller action.
1633 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxt_packet_in --detach --pidfile 2> ofctl_monitor.log])
1636 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)'
1638 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1639 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1641 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1642 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1643 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
1645 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1646 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
1648 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1649 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
1652 dnl Modified MPLS controller action.
1653 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxt_packet_in --detach --pidfile 2> ofctl_monitor.log])
1655 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)
1658 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)'
1660 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1661 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1663 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1664 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1665 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
1667 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1668 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
1670 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1671 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
1674 dnl Modified MPLS controller action.
1675 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxt_packet_in --detach --pidfile 2> ofctl_monitor.log])
1678 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))'
1680 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1681 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1683 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1684 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1685 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
1687 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1688 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
1690 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1691 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
1694 dnl Modified MPLS controller action.
1695 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxt_packet_in --detach --pidfile 2> ofctl_monitor.log])
1698 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)'
1700 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1701 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1703 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1704 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1705 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
1707 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1708 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
1710 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1711 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
1714 dnl Modified MPLS controller action.
1715 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxt_packet_in --detach --pidfile 2> ofctl_monitor.log])
1718 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)'
1720 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1721 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1723 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1724 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1725 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
1727 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1728 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
1730 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1731 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
1734 dnl Modified MPLS controller action.
1735 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxt_packet_in --detach --pidfile 2> ofctl_monitor.log])
1738 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)'
1740 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1741 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1743 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1744 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1745 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
1747 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1748 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
1750 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1751 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
1754 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1756 dnl Modified MPLS controller action.
1757 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxt_packet_in --detach --pidfile 2> ofctl_monitor.log])
1760 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)'
1762 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1763 OVS_APP_EXIT_AND_WAIT([ovs-ofctl])
1765 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1766 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1767 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
1769 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1770 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
1772 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1773 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
1776 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1778 dnl Modified MPLS controller action.
1779 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxt_packet_in --detach --pidfile 2> ofctl_monitor.log])
1782 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)'
1784 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1785 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1787 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1788 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1789 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
1791 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1792 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
1794 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1795 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
1798 dnl Modified MPLS actions.
1799 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxt_packet_in --detach --pidfile 2> ofctl_monitor.log])
1802 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)'
1804 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1805 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1807 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1808 NXT_PACKET_IN (xid=0x0): cookie=0xb total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1809 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
1811 NXT_PACKET_IN (xid=0x0): cookie=0xb total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1812 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
1814 NXT_PACKET_IN (xid=0x0): cookie=0xb total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1815 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
1818 dnl Modified MPLS ipv6 controller action.
1819 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxt_packet_in --detach --pidfile 2> ofctl_monitor.log])
1822 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)'
1824 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1825 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1827 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1828 NXT_PACKET_IN (xid=0x0): cookie=0xc total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1829 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
1831 NXT_PACKET_IN (xid=0x0): cookie=0xc total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1832 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
1834 NXT_PACKET_IN (xid=0x0): cookie=0xc total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1835 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
1839 dnl Modified MPLS pop action.
1840 dnl The input is a frame with two MPLS headers which tcpdump -vve shows as:
1841 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)
1842 dnl (tos 0x0, ttl 64, id 0, offset 0, flags [none], proto TCP (6), length 44)
1844 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxt_packet_in --detach --pidfile 2> ofctl_monitor.log])
1847 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'
1850 # 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)'
1852 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1853 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1855 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1856 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1857 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
1859 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1860 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
1862 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1863 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
1866 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1868 dnl Modified MPLS pop action.
1869 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
1870 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)
1871 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
1872 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
1873 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxt_packet_in --detach --pidfile 2> ofctl_monitor.log])
1876 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'
1878 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1879 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1881 AT_CHECK([strip_metadata < ofctl_monitor.log], [0], [dnl
1882 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1883 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
1885 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1886 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
1888 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1889 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
1892 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1894 dnl Modified MPLS pop action.
1895 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
1896 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)
1897 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
1898 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
1899 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxt_packet_in --detach --pidfile 2> ofctl_monitor.log])
1902 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'
1904 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1905 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1907 AT_CHECK([strip_metadata < ofctl_monitor.log], [0], [dnl
1908 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1909 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
1911 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1912 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
1914 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1915 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
1918 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1920 dnl Modified MPLS pop action.
1921 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
1922 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)
1923 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
1924 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
1925 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxt_packet_in --detach --pidfile 2> ofctl_monitor.log])
1928 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'
1930 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1931 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1933 AT_CHECK([strip_metadata < ofctl_monitor.log], [0], [dnl
1934 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1935 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
1937 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1938 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
1940 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1941 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
1944 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1946 dnl Modified MPLS pop action.
1947 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
1948 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)
1949 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
1950 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
1951 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxt_packet_in --detach --pidfile 2> ofctl_monitor.log])
1954 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'
1956 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1957 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1959 AT_CHECK([strip_metadata < ofctl_monitor.log], [0], [dnl
1960 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1961 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
1963 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1964 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
1966 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1967 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
1970 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1972 dnl Modified MPLS pop action.
1973 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
1974 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)
1975 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
1976 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
1977 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxt_packet_in --detach --pidfile 2> ofctl_monitor.log])
1980 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'
1982 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1983 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1985 AT_CHECK([strip_metadata < ofctl_monitor.log], [0], [dnl
1986 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1987 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.0,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
1989 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1990 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.0,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
1992 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1993 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.0,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
1996 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1998 dnl Modified MPLS pop action.
1999 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
2000 dnl 60:66:66:66:00:06 > 50:54:00:00:00:07, ethertype MPLS multicast (0x8848), length 62: MPLS (label 20, exp 0, [S], ttl 32)
2001 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
2002 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
2003 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxt_packet_in --detach --pidfile 2> ofctl_monitor.log])
2006 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'
2008 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2009 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2011 AT_CHECK([strip_metadata < ofctl_monitor.log], [0], [dnl
2012 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2013 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
2015 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2016 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
2018 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2019 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
2022 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2024 dnl Modified MPLS pop action.
2025 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
2026 dnl 60:66:66:66:00:07 > 50:54:00:00:00:07, ethertype MPLS multicast (0x8848), length 62: MPLS (label 20, exp 0, [S], ttl 32)
2027 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
2028 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
2029 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxt_packet_in --detach --pidfile 2> ofctl_monitor.log])
2032 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'
2034 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2035 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2037 AT_CHECK([strip_metadata < ofctl_monitor.log], [0], [dnl
2038 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2039 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
2041 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2042 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
2044 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2045 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
2048 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2050 dnl Modified MPLS pop action.
2051 dnl The input is an ARP frame with a single MPLS label stack entry which tcpdump -vve shows as:
2052 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)
2053 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxt_packet_in --detach --pidfile 2> ofctl_monitor.log])
2056 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'
2058 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2059 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2061 AT_CHECK([strip_metadata < ofctl_monitor.log], [0], [dnl
2062 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0xd total_len=56 in_port=1 (via action) data_len=56 (unbuffered)
2063 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
2065 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0xd total_len=56 in_port=1 (via action) data_len=56 (unbuffered)
2066 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
2068 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0xd total_len=56 in_port=1 (via action) data_len=56 (unbuffered)
2069 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
2072 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2074 dnl Modified MPLS pop action.
2075 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
2076 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)
2077 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
2078 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
2079 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxt_packet_in --detach --pidfile 2> ofctl_monitor.log])
2082 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'
2084 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2085 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2087 AT_CHECK([strip_metadata < ofctl_monitor.log], [0], [dnl
2088 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2089 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
2091 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2092 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
2094 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2095 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
2098 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2100 dnl Modified MPLS pop action.
2101 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
2102 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)
2103 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
2104 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
2105 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxt_packet_in --detach --pidfile 2> ofctl_monitor.log])
2108 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'
2110 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2111 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2113 AT_CHECK([strip_metadata < ofctl_monitor.log], [0], [dnl
2114 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2115 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
2117 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2118 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
2120 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2121 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
2124 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2126 dnl Modified MPLS pop action.
2127 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
2128 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)
2129 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
2130 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
2131 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxt_packet_in --detach --pidfile 2> ofctl_monitor.log])
2134 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'
2136 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2137 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2139 AT_CHECK([strip_metadata < ofctl_monitor.log], [0], [dnl
2140 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2141 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
2143 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2144 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
2146 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2147 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
2150 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2152 dnl Modified MPLS pop action.
2153 dnl The input is a frame with two MPLS label stack entries which tcpdump -vve shows as:
2154 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)
2155 dnl (label 20, exp 0, [S], ttl 31)
2156 dnl (tos 0x0, ttl 254, id 0, offset 0, flags [none], proto TCP (6), length 44)
2157 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
2158 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxt_packet_in --detach --pidfile 2> ofctl_monitor.log])
2161 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'
2163 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2164 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2166 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2167 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2168 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
2170 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2171 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
2173 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2174 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
2177 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2179 dnl Modified MPLS pop action.
2180 dnl The input is a frame with two MPLS label stack entries which tcpdump -vve shows as:
2181 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)
2182 dnl (label 20, exp 0, [S], ttl 31)
2183 dnl (tos 0x0, ttl 254, id 0, offset 0, flags [none], proto TCP (6), length 44)
2184 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
2185 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxt_packet_in --detach --pidfile 2> ofctl_monitor.log])
2188 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'
2190 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2191 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2193 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2194 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2195 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
2197 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2198 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
2200 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2201 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
2204 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2206 dnl Modified MPLS pop action.
2207 dnl The input is a frame with two MPLS label stack entries which tcpdump -vve shows as:
2208 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)
2209 dnl (label 20, exp 0, [S], ttl 31)
2210 dnl (tos 0x0, ttl 254, id 0, offset 0, flags [none], proto TCP (6), length 44)
2211 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
2212 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxt_packet_in --detach --pidfile 2> ofctl_monitor.log])
2215 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'
2217 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2218 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2220 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2221 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2222 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
2224 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2225 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
2227 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2228 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
2231 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2233 dnl Modified MPLS pop action.
2234 dnl The input is a frame with two MPLS label stack entries which tcpdump -vve shows as:
2235 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)
2236 dnl (label 20, exp 0, [S], ttl 31)
2237 dnl (tos 0x0, ttl 254, id 0, offset 0, flags [none], proto TCP (6), length 44)
2238 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
2239 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxt_packet_in --detach --pidfile 2> ofctl_monitor.log])
2242 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'
2244 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2245 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2247 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2248 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2249 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
2251 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2252 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
2254 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2255 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
2258 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2260 dnl Modified MPLS pop action.
2261 dnl The input is a frame with two MPLS label stack entries which tcpdump -vve shows as:
2262 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)
2263 dnl (label 20, exp 0, [S], ttl 31)
2264 dnl (tos 0x0, ttl 254, id 0, offset 0, flags [none], proto TCP (6), length 44)
2265 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
2266 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxt_packet_in --detach --pidfile 2> ofctl_monitor.log])
2269 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'
2272 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2273 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2275 AT_CHECK([strip_metadata < ofctl_monitor.log], [0], [dnl
2276 NXT_PACKET_IN (xid=0x0): cookie=0xe total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2277 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
2279 NXT_PACKET_IN (xid=0x0): cookie=0xe total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2280 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
2282 NXT_PACKET_IN (xid=0x0): cookie=0xe total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2283 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
2286 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2288 dnl Modified MPLS pop action.
2289 dnl The input is a frame with two MPLS label stack entries which tcpdump -vve shows as:
2290 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)
2291 dnl (label 20, exp 0, [S], ttl 31)
2292 dnl (tos 0x0, ttl 254, id 0, offset 0, flags [none], proto TCP (6), length 44)
2293 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
2294 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxt_packet_in --detach --pidfile 2> ofctl_monitor.log])
2297 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'
2299 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2300 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2302 AT_CHECK([strip_metadata < ofctl_monitor.log], [0], [dnl
2303 NXT_PACKET_IN (xid=0x0): cookie=0xe total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2304 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
2306 NXT_PACKET_IN (xid=0x0): cookie=0xe total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2307 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
2309 NXT_PACKET_IN (xid=0x0): cookie=0xe total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2310 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
2313 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2315 dnl Modified MPLS pop action.
2316 dnl The input is a frame with three MPLS label stack entries which tcpdump -vve shows as:
2317 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)
2318 dnl (label 20, exp 0, ttl 31)
2319 dnl (label 20, exp 0, [S], ttl 30)
2320 dnl (tos 0x0, ttl 254, id 0, offset 0, flags [none], proto TCP (6), length 44)
2321 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
2322 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxt_packet_in --detach --pidfile 2> ofctl_monitor.log])
2325 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'
2327 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2328 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2330 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2331 NXT_PACKET_IN (xid=0x0): cookie=0xe total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2332 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
2334 NXT_PACKET_IN (xid=0x0): cookie=0xe total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2335 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
2337 NXT_PACKET_IN (xid=0x0): cookie=0xe total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2338 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
2341 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2343 dnl Modified MPLS pop action.
2344 dnl The input is a frame with three MPLS label stack entries which tcpdump -vve shows as:
2345 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)
2346 dnl (label 20, exp 0, ttl 31)
2347 dnl (label 20, exp 0, [S], ttl 30)
2348 dnl (tos 0x0, ttl 254, id 0, offset 0, flags [none], proto TCP (6), length 44)
2349 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
2350 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxt_packet_in --detach --pidfile 2> ofctl_monitor.log])
2353 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'
2355 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2356 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2358 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2359 NXT_PACKET_IN (xid=0x0): cookie=0xe total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2360 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
2362 NXT_PACKET_IN (xid=0x0): cookie=0xe total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2363 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
2365 NXT_PACKET_IN (xid=0x0): cookie=0xe total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2366 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
2369 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2371 dnl Modified MPLS pop action.
2372 dnl The input is a frame with three MPLS label stack entries which tcpdump -vve shows as:
2373 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)
2374 dnl (label 20, exp 0, ttl 31)
2375 dnl (label 20, exp 0, [S], ttl 30)
2376 dnl (tos 0x0, ttl 254, id 0, offset 0, flags [none], proto TCP (6), length 44)
2377 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
2378 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxt_packet_in --detach --pidfile 2> ofctl_monitor.log])
2381 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'
2383 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2384 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2386 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2387 NXT_PACKET_IN (xid=0x0): cookie=0xe total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2388 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
2390 NXT_PACKET_IN (xid=0x0): cookie=0xe total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2391 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
2393 NXT_PACKET_IN (xid=0x0): cookie=0xe total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2394 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
2397 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2399 dnl Modified MPLS pop action.
2400 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
2401 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)
2402 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
2403 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
2404 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxt_packet_in --detach --pidfile 2> ofctl_monitor.log])
2407 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'
2409 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2410 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2412 AT_CHECK([strip_metadata < ofctl_monitor.log], [0], [dnl
2413 NXT_PACKET_IN (xid=0x0): cookie=0xf total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2414 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
2416 NXT_PACKET_IN (xid=0x0): cookie=0xf total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2417 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
2419 NXT_PACKET_IN (xid=0x0): cookie=0xf total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2420 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
2423 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2425 dnl Modified MPLS pop action.
2426 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
2427 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)
2428 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
2429 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
2430 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxt_packet_in --detach --pidfile 2> ofctl_monitor.log])
2433 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'
2435 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2436 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2438 AT_CHECK([strip_metadata < ofctl_monitor.log], [0], [dnl
2439 NXT_PACKET_IN (xid=0x0): cookie=0xf total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2440 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
2442 NXT_PACKET_IN (xid=0x0): cookie=0xf total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2443 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
2445 NXT_PACKET_IN (xid=0x0): cookie=0xf total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2446 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
2449 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2451 dnl Modified MPLS pop action.
2452 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
2453 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)
2454 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
2455 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
2456 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxt_packet_in --detach --pidfile 2> ofctl_monitor.log])
2459 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'
2461 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2462 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2464 AT_CHECK([strip_metadata < ofctl_monitor.log], [0], [dnl
2465 NXT_PACKET_IN (xid=0x0): cookie=0xf total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2466 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
2468 NXT_PACKET_IN (xid=0x0): cookie=0xf total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2469 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
2471 NXT_PACKET_IN (xid=0x0): cookie=0xf total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2472 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
2475 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2477 dnl Modified MPLS pop action.
2478 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
2479 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)
2480 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
2481 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
2482 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxt_packet_in --detach --pidfile 2> ofctl_monitor.log])
2485 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'
2488 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2489 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2491 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2492 NXT_PACKET_IN (xid=0x0): cookie=0x5 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2493 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
2495 NXT_PACKET_IN (xid=0x0): cookie=0x5 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2496 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
2498 NXT_PACKET_IN (xid=0x0): cookie=0x5 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2499 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
2502 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2504 dnl Modified MPLS pop action.
2505 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
2506 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)
2507 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
2508 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
2509 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxt_packet_in --detach --pidfile 2> ofctl_monitor.log])
2512 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'
2514 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2515 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2517 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2518 NXT_PACKET_IN (xid=0x0): cookie=0x5 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2519 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
2521 NXT_PACKET_IN (xid=0x0): cookie=0x5 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2522 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
2524 NXT_PACKET_IN (xid=0x0): cookie=0x5 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2525 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
2528 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2530 dnl Modified MPLS pop action.
2531 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
2532 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)
2533 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
2534 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
2535 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxt_packet_in --detach --pidfile 2> ofctl_monitor.log])
2538 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'
2541 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2542 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2544 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2545 NXT_PACKET_IN (xid=0x0): cookie=0x5 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2546 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
2548 NXT_PACKET_IN (xid=0x0): cookie=0x5 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2549 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
2551 NXT_PACKET_IN (xid=0x0): cookie=0x5 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2552 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
2555 AT_CHECK([ovs-appctl revalidator/purge], [0])
2556 AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
2557 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
2558 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
2559 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
2560 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
2561 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
2562 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
2563 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
2564 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
2565 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
2566 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
2567 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
2568 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
2569 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
2570 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
2571 cookie=0xd, n_packets=3, n_bytes=180, dl_src=60:66:66:66:00:08 actions=pop_mpls:0x0806,resubmit(1,1)
2572 cookie=0xd, n_packets=3, n_bytes=186, dl_src=60:66:66:66:00:01 actions=pop_mpls:0x0800,dec_ttl,CONTROLLER:65535
2573 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
2574 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
2575 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
2576 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,1,0,NXM_OF_IP_SRC[[0..7]]),CONTROLLER:65535
2577 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
2578 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
2579 cookie=0xd, n_packets=3, n_bytes=186, dl_src=60:66:66:66:00:09 actions=resubmit(,2),CONTROLLER:65535
2580 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
2581 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
2582 cookie=0xd, n_packets=3, n_bytes=186, dl_src=60:66:66:66:66:66 actions=pop_mpls:0x0800,CONTROLLER:65535
2583 cookie=0xd, n_packets=3, n_bytes=198, dl_src=60:66:66:66:01:00 actions=pop_mpls:0x8848,CONTROLLER:65535
2584 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
2585 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
2586 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
2587 cookie=0xd, table=1, n_packets=3, n_bytes=168, arp actions=CONTROLLER:65535
2588 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
2589 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
2590 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
2591 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
2592 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
2593 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
2594 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
2595 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
2596 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
2603 AT_SETUP([ofproto-dpif - MPLS handling with goto_table])
2604 OVS_VSWITCHD_START([dnl
2605 add-port br0 p1 -- set Interface p1 type=dummy
2607 on_exit 'kill `cat ovs-ofctl.pid`'
2609 AT_CAPTURE_FILE([ofctl_monitor.log])
2610 AT_DATA([flows.txt], [dnl
2611 table=0 mplsm actions=pop_mpls:0x800,goto_table(1)
2612 table=1 ip,ip_dscp=8 actions=controller
2614 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flows br0 flows.txt])
2617 dnl Modified MPLS pop action.
2618 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
2619 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)
2620 dnl (tos 0x20, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
2621 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
2622 AT_CHECK([ovs-ofctl -O OpenFlow12 monitor br0 65534 -P standard --detach --pidfile 2> ofctl_monitor.log])
2625 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'
2627 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2628 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2630 AT_CHECK([strip_metadata < ofctl_monitor.log], [0], [dnl
2631 OFPT_PACKET_IN (OF1.2) (xid=0x0): table_id=1 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2632 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
2634 OFPT_PACKET_IN (OF1.2) (xid=0x0): table_id=1 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2635 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
2637 OFPT_PACKET_IN (OF1.2) (xid=0x0): table_id=1 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2638 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
2641 AT_CHECK([ovs-appctl revalidator/purge], [0])
2642 AT_CHECK([ovs-ofctl -O OpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
2643 n_packets=3, n_bytes=186, mplsm actions=pop_mpls:0x0800,goto_table:1
2644 table=1, n_packets=3, n_bytes=174, ip,nw_tos=32 actions=CONTROLLER:65535
2645 OFPST_FLOW reply (OF1.2):
2651 AT_SETUP([ofproto-dpif - MPLS handling with write_actions])
2652 OVS_VSWITCHD_START([dnl
2653 add-port br0 p1 -- set Interface p1 type=dummy
2655 on_exit 'kill `cat ovs-ofctl.pid`'
2657 dnl N.B: The first (and only) action that accesses L3 data after the
2658 dnl pop_mpls action is present in write_actions. This exercises recirculation
2659 dnl triggered in write_actions due to a previous action not in write actions.
2660 AT_CAPTURE_FILE([ofctl_monitor.log])
2661 AT_DATA([flows.txt], [dnl
2662 mplsm actions=pop_mpls:0x800,write_actions(dec_ttl,controller)
2664 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flows br0 flows.txt])
2666 dnl Modified MPLS pop action.
2667 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
2668 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)
2669 dnl (tos 0x20, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
2670 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
2671 AT_CHECK([ovs-ofctl -O OpenFlow12 monitor br0 65534 -P standard --detach --pidfile 2> ofctl_monitor.log])
2674 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'
2676 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2677 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2679 AT_CHECK([strip_metadata < ofctl_monitor.log], [0], [dnl
2680 OFPT_PACKET_IN (OF1.2) (xid=0x0): total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2681 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
2683 OFPT_PACKET_IN (OF1.2) (xid=0x0): total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2684 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
2686 OFPT_PACKET_IN (OF1.2) (xid=0x0): total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2687 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
2690 AT_CHECK([ovs-appctl revalidator/purge], [0])
2691 AT_CHECK([ovs-ofctl -O OpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
2692 n_packets=3, n_bytes=186, mplsm actions=pop_mpls:0x0800,write_actions(dec_ttl,CONTROLLER:65535)
2693 OFPST_FLOW reply (OF1.2):
2699 AT_SETUP([ofproto-dpif - table-miss flow (OpenFlow 1.0)])
2700 OVS_VSWITCHD_START([dnl
2701 add-port br0 p1 -- set Interface p1 type=dummy
2703 on_exit 'kill `cat ovs-ofctl.pid`'
2705 AT_CAPTURE_FILE([ofctl_monitor.log])
2706 # A table-miss flow has priority 0 and no match
2707 AT_CHECK([ovs-ofctl --protocols=OpenFlow10 add-flow br0 'priority=0 actions=output:CONTROLLER'])
2709 dnl Singleton controller action.
2710 AT_CHECK([ovs-ofctl monitor -P standard --protocols=OpenFlow10 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
2713 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)'
2715 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2716 OVS_APP_EXIT_AND_WAIT([ovs-ofctl])
2718 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2719 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
2720 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
2722 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
2723 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
2725 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
2726 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
2729 AT_CHECK([ovs-appctl revalidator/purge], [0])
2730 AT_CHECK([ovs-ofctl --protocols=OpenFlow10 dump-flows br0 | ofctl_strip | sort], [0], [dnl
2731 n_packets=3, n_bytes=180, priority=0 actions=CONTROLLER:65535
2739 AT_SETUP([ofproto-dpif - table-miss flow (OpenFlow 1.3)])
2740 OVS_VSWITCHD_START([dnl
2741 add-port br0 p1 -- set Interface p1 type=dummy
2743 on_exit 'kill `cat ovs-ofctl.pid`'
2745 AT_CAPTURE_FILE([ofctl_monitor.log])
2746 # A table-miss flow has priority 0 and no match
2747 AT_CHECK([ovs-ofctl --protocols=OpenFlow13 add-flow br0 'priority=0 actions=output:CONTROLLER'])
2749 dnl Singleton controller action.
2750 AT_CHECK([ovs-ofctl monitor -P standard --protocols=OpenFlow13 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
2753 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)'
2755 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2756 OVS_APP_EXIT_AND_WAIT([ovs-ofctl])
2758 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2760 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2761 OFPT_PACKET_IN (OF1.3) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
2762 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
2764 OFPT_PACKET_IN (OF1.3) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
2765 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
2767 OFPT_PACKET_IN (OF1.3) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
2768 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
2771 AT_CHECK([ovs-appctl revalidator/purge], [0])
2772 AT_CHECK([ovs-ofctl --protocols=OpenFlow13 dump-flows br0 | ofctl_strip | sort], [0], [dnl
2773 n_packets=3, n_bytes=180, priority=0 actions=CONTROLLER:65535
2774 OFPST_FLOW reply (OF1.3):
2780 AT_SETUP([ofproto-dpif - table-miss flow with async config (OpenFlow 1.3)])
2781 OVS_VSWITCHD_START([dnl
2782 add-port br0 p1 -- set Interface p1 type=dummy
2784 on_exit 'kill `cat ovs-ofctl.pid`'
2786 ovs-appctl time/stop
2788 AT_CAPTURE_FILE([ofctl_monitor.log])
2789 # A table-miss flow has priority 0 and no match
2790 AT_CHECK([ovs-ofctl --protocols=OpenFlow13 add-flow br0 'priority=0 actions=output:CONTROLLER'])
2792 dnl Singleton controller action.
2793 AT_CHECK([ovs-ofctl monitor -P standard --protocols=OpenFlow13 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
2795 # Become slave (OF 1.3), which should disable everything except port status.
2796 ovs-appctl -t ovs-ofctl ofctl/send 041800180000000200000003000000000000000000000001
2798 # Ensure that ovs-vswitchd gets a chance to reply before sending another command.
2799 ovs-appctl time/warp 500 100
2801 # Use OF 1.3 OFPT_SET_ASYNC to enable OFPR_NO_MATCH for slave only.
2802 ovs-appctl -t ovs-ofctl ofctl/send 041c002000000002000000000000000100000000000000000000000000000000
2804 ovs-appctl time/warp 500 100
2806 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)'
2808 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2809 OVS_APP_EXIT_AND_WAIT([ovs-ofctl])
2811 AT_CHECK([ovs-appctl revalidator/purge], [0])
2812 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2813 send: OFPT_ROLE_REQUEST (OF1.3) (xid=0x2): role=slave generation_id=1
2814 OFPT_ROLE_REPLY (OF1.3) (xid=0x2): role=slave generation_id=1
2816 send: OFPT_SET_ASYNC (OF1.3) (xid=0x2):
2823 REQUESTFORWARD: (off)
2831 REQUESTFORWARD: (off)
2833 OFPT_PACKET_IN (OF1.3) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
2834 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
2836 OFPT_PACKET_IN (OF1.3) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
2837 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
2839 OFPT_PACKET_IN (OF1.3) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
2840 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
2843 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2845 AT_CHECK([ovs-ofctl --protocols=OpenFlow13 dump-flows br0 | ofctl_strip | sort], [0], [dnl
2846 n_packets=3, n_bytes=180, priority=0 actions=CONTROLLER:65535
2847 OFPST_FLOW reply (OF1.3):
2854 AT_SETUP([ofproto-dpif - table-miss flow (OpenFlow 1.4)])
2855 OVS_VSWITCHD_START([dnl
2856 add-port br0 p1 -- set Interface p1 type=dummy
2858 on_exit 'kill `cat ovs-ofctl.pid`'
2860 AT_CAPTURE_FILE([ofctl_monitor.log])
2861 # A table-miss flow has priority 0 and no match
2862 AT_CHECK([ovs-ofctl --protocols=OpenFlow14 add-flow br0 'priority=0 actions=output:CONTROLLER'])
2864 dnl Singleton controller action.
2865 AT_CHECK([ovs-ofctl monitor -P standard --protocols=OpenFlow14 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
2868 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)'
2870 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2871 OVS_APP_EXIT_AND_WAIT([ovs-ofctl])
2873 AT_CHECK([ovs-appctl revalidator/purge], [0])
2874 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2875 OFPT_PACKET_IN (OF1.4) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
2876 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
2878 OFPT_PACKET_IN (OF1.4) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
2879 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
2881 OFPT_PACKET_IN (OF1.4) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
2882 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
2885 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2887 AT_CHECK([ovs-ofctl --protocols=OpenFlow14 dump-flows br0 | ofctl_strip | sort], [0], [dnl
2888 n_packets=3, n_bytes=180, priority=0 actions=CONTROLLER:65535
2889 OFPST_FLOW reply (OF1.4):
2896 AT_SETUP([ofproto-dpif - packet-in reasons (Openflow 1.3)])
2897 OVS_VSWITCHD_START([dnl
2898 add-port br0 p1 -- set Interface p1 type=dummy
2900 on_exit 'kill `cat ovs-ofctl.pid`'
2902 AT_CAPTURE_FILE([ofctl_monitor.log])
2903 AT_DATA([flows.txt], [dnl
2904 table=0 in_port=1 actions=write_actions(output(CONTROLLER)),goto_table(1)
2905 table=1 actions=output(CONTROLLER),goto_table(2)
2906 table=2 actions=group:1234
2908 AT_CHECK([ovs-ofctl --protocols=OpenFlow13 add-group br0 'group_id=1234,type=all,bucket=output:10,bucket=output:CONTROLLER'])
2909 AT_CHECK([ovs-ofctl --protocols=OpenFlow13 add-flows br0 flows.txt])
2911 dnl Singleton controller action.
2912 AT_CHECK([ovs-ofctl monitor -P standard --protocols=OpenFlow13 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
2915 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)'
2917 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2918 OVS_APP_EXIT_AND_WAIT([ovs-ofctl])
2920 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2922 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2923 OFPT_PACKET_IN (OF1.3) (xid=0x0): table_id=1 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=2 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): 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): table_id=1 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
2935 OFPT_PACKET_IN (OF1.3) (xid=0x0): table_id=2 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
2936 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
2938 OFPT_PACKET_IN (OF1.3) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
2939 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
2941 OFPT_PACKET_IN (OF1.3) (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
2942 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
2944 OFPT_PACKET_IN (OF1.3) (xid=0x0): table_id=2 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
2945 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
2947 OFPT_PACKET_IN (OF1.3) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
2948 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
2951 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2953 AT_CHECK([ovs-ofctl --protocols=OpenFlow13 dump-flows br0 | ofctl_strip | sort], [0], [dnl
2954 n_packets=3, n_bytes=180, in_port=1 actions=write_actions(CONTROLLER:65535),goto_table:1
2955 table=1, n_packets=3, n_bytes=180, actions=CONTROLLER:65535,goto_table:2
2956 table=2, n_packets=3, n_bytes=180, actions=group:1234
2957 OFPST_FLOW reply (OF1.3):
2964 AT_SETUP([ofproto-dpif - packet-in reasons (Openflow 1.4)])
2965 OVS_VSWITCHD_START([dnl
2966 add-port br0 p1 -- set Interface p1 type=dummy
2968 on_exit 'kill `cat ovs-ofctl.pid`'
2970 AT_CAPTURE_FILE([ofctl_monitor.log])
2971 AT_DATA([flows.txt], [dnl
2972 table=0 in_port=1 actions=write_actions(output(CONTROLLER)),goto_table(1)
2973 table=1 actions=output(CONTROLLER),goto_table(2)
2974 table=2 actions=group:1234
2976 AT_CHECK([ovs-ofctl --protocols=OpenFlow14 add-group br0 'group_id=1234,type=all,bucket=output:10,bucket=output:CONTROLLER'])
2977 AT_CHECK([ovs-ofctl --protocols=OpenFlow14 add-flows br0 flows.txt])
2979 dnl Singleton controller action.
2980 AT_CHECK([ovs-ofctl monitor -P standard --protocols=OpenFlow14 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
2983 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)'
2985 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2986 OVS_APP_EXIT_AND_WAIT([ovs-ofctl])
2988 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2990 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2991 OFPT_PACKET_IN (OF1.4) (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) 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=2 cookie=0x0 total_len=60 in_port=1 (via group) 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): cookie=0x0 total_len=60 in_port=1 (via action_set) 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): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) 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
3003 OFPT_PACKET_IN (OF1.4) (xid=0x0): table_id=2 cookie=0x0 total_len=60 in_port=1 (via group) data_len=60 (unbuffered)
3004 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
3006 OFPT_PACKET_IN (OF1.4) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via action_set) data_len=60 (unbuffered)
3007 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
3009 OFPT_PACKET_IN (OF1.4) (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
3010 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
3012 OFPT_PACKET_IN (OF1.4) (xid=0x0): table_id=2 cookie=0x0 total_len=60 in_port=1 (via group) data_len=60 (unbuffered)
3013 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
3015 OFPT_PACKET_IN (OF1.4) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via action_set) data_len=60 (unbuffered)
3016 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
3019 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
3021 AT_CHECK([ovs-ofctl --protocols=OpenFlow14 dump-flows br0 | ofctl_strip | sort], [0], [dnl
3022 n_packets=3, n_bytes=180, in_port=1 actions=write_actions(CONTROLLER:65535),goto_table:1
3023 table=1, n_packets=3, n_bytes=180, actions=CONTROLLER:65535,goto_table:2
3024 table=2, n_packets=3, n_bytes=180, actions=group:1234
3025 OFPST_FLOW reply (OF1.4):
3032 AT_SETUP([ofproto-dpif - ARP modification slow-path])
3034 add_of_ports br0 1 2
3036 ovs-vsctl -- set Interface p2 type=dummy options:pcap=p2.pcap
3037 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'
3039 # Input some packets that should follow the arp modification slow-path.
3041 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)'
3043 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
3045 # Check the packets that were output.
3046 AT_CHECK([ovs-ofctl parse-pcap p2.pcap], [0], [dnl
3047 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
3048 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
3049 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
3050 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
3051 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
3052 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
3053 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
3054 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
3055 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
3061 AT_SETUP([ofproto-dpif - VLAN handling])
3063 [set Bridge br0 fail-mode=standalone -- \
3064 add-port br0 p1 trunks=10,12 -- \
3065 add-port br0 p2 tag=10 -- \
3066 add-port br0 p3 tag=12 \
3067 other-config:priority-tags=true -- \
3068 add-port br0 p4 tag=12 -- \
3069 add-port br0 p5 vlan_mode=native-tagged tag=10 -- \
3070 add-port br0 p6 vlan_mode=native-tagged tag=10 trunks=10,12 -- \
3071 add-port br0 p7 vlan_mode=native-untagged tag=12 -- \
3072 add-port br0 p8 vlan_mode=native-untagged tag=12 trunks=10,12 \
3073 other-config:priority-tags=true -- \
3074 set Interface p1 type=dummy -- \
3075 set Interface p2 type=dummy -- \
3076 set Interface p3 type=dummy -- \
3077 set Interface p4 type=dummy -- \
3078 set Interface p5 type=dummy -- \
3079 set Interface p6 type=dummy -- \
3080 set Interface p7 type=dummy -- \
3081 set Interface p8 type=dummy --])
3083 dnl Each of these specifies an in_port by number, a VLAN VID (or "none"),
3084 dnl a VLAN PCP (used if the VID isn't "none") and the expected set of datapath
3090 "100 10 0 1,5,6,7,8,pop_vlan,2" \
3091 "100 10 1 1,5,6,7,8,pop_vlan,2" \
3094 "100 12 0 1,5,6,pop_vlan,3,4,7,8" \
3095 "100 12 1 1,5,6,pop_vlan,4,7,push_vlan(vid=0,pcp=1),3,8" \
3099 "1 10 0 5,6,7,8,100,pop_vlan,2" \
3100 "1 10 1 5,6,7,8,100,pop_vlan,2" \
3103 "1 12 0 5,6,100,pop_vlan,3,4,7,8" \
3104 "1 12 1 5,6,100,pop_vlan,4,7,push_vlan(vid=0,pcp=1),3,8" \
3105 "2 none 0 push_vlan(vid=10,pcp=0),1,5,6,7,8,100" \
3106 "2 0 0 pop_vlan,push_vlan(vid=10,pcp=0),1,5,6,7,8,100" \
3107 "2 0 1 pop_vlan,push_vlan(vid=10,pcp=1),1,5,6,7,8,100" \
3114 "3 none 0 4,7,8,push_vlan(vid=12,pcp=0),1,5,6,100" \
3115 "3 0 0 pop_vlan,4,7,8,push_vlan(vid=12,pcp=0),1,5,6,100" \
3116 "3 0 1 8,pop_vlan,4,7,push_vlan(vid=12,pcp=1),1,5,6,100" \
3123 "4 none 0 3,7,8,push_vlan(vid=12,pcp=0),1,5,6,100" \
3124 "4 0 0 pop_vlan,3,7,8,push_vlan(vid=12,pcp=0),1,5,6,100" \
3125 "4 0 1 3,8,pop_vlan,7,push_vlan(vid=12,pcp=1),1,5,6,100" \
3132 "5 none 0 2,push_vlan(vid=10,pcp=0),1,6,7,8,100" \
3133 "5 0 0 pop_vlan,2,push_vlan(vid=10,pcp=0),1,6,7,8,100" \
3134 "5 0 1 pop_vlan,2,push_vlan(vid=10,pcp=1),1,6,7,8,100" \
3135 "5 10 0 1,6,7,8,100,pop_vlan,2" \
3136 "5 10 1 1,6,7,8,100,pop_vlan,2" \
3139 "5 12 0 1,6,100,pop_vlan,3,4,7,8" \
3140 "5 12 1 1,6,100,pop_vlan,4,7,push_vlan(vid=0,pcp=1),3,8" \
3141 "6 none 0 2,push_vlan(vid=10,pcp=0),1,5,7,8,100" \
3142 "6 0 0 pop_vlan,2,push_vlan(vid=10,pcp=0),1,5,7,8,100" \
3143 "6 0 1 pop_vlan,2,push_vlan(vid=10,pcp=1),1,5,7,8,100" \
3144 "6 10 0 1,5,7,8,100,pop_vlan,2" \
3145 "6 10 1 1,5,7,8,100,pop_vlan,2" \
3148 "6 12 0 1,5,100,pop_vlan,3,4,7,8" \
3149 "6 12 1 1,5,100,pop_vlan,4,7,push_vlan(vid=0,pcp=1),3,8" \
3150 "7 none 0 3,4,8,push_vlan(vid=12,pcp=0),1,5,6,100" \
3151 "7 0 0 pop_vlan,3,4,8,push_vlan(vid=12,pcp=0),1,5,6,100" \
3152 "7 0 1 3,8,pop_vlan,4,push_vlan(vid=12,pcp=1),1,5,6,100" \
3153 "7 10 0 1,5,6,8,100,pop_vlan,2" \
3154 "7 10 1 1,5,6,8,100,pop_vlan,2" \
3157 "7 12 0 1,5,6,100,pop_vlan,3,4,8" \
3158 "7 12 1 1,5,6,100,pop_vlan,4,push_vlan(vid=0,pcp=1),3,8" \
3159 "8 none 0 3,4,7,push_vlan(vid=12,pcp=0),1,5,6,100" \
3160 "8 0 0 pop_vlan,3,4,7,push_vlan(vid=12,pcp=0),1,5,6,100" \
3161 "8 0 1 3,pop_vlan,4,7,push_vlan(vid=12,pcp=1),1,5,6,100" \
3162 "8 10 0 1,5,6,7,100,pop_vlan,2" \
3163 "8 10 1 1,5,6,7,100,pop_vlan,2" \
3166 "8 12 0 1,5,6,100,pop_vlan,3,4,7" \
3167 "8 12 1 1,5,6,100,pop_vlan,4,7,push_vlan(vid=0,pcp=1),3"
3175 if test $vlan = none; then
3176 flow="in_port($in_port),eth(src=50:54:00:00:00:01,dst=ff:ff:ff:ff:ff:ff),eth_type(0xabcd)"
3178 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))"
3181 echo "----------------------------------------------------------------------"
3182 echo "in_port=$in_port vlan=$vlan pcp=$pcp"
3184 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
3185 actual=`tail -1 stdout | sed 's/Datapath actions: //'`
3187 AT_CHECK([ovs-dpctl normalize-actions "$flow" "$expected"], [0], [stdout])
3189 AT_CHECK([ovs-dpctl normalize-actions "$flow" "$actual"], [0], [expout])
3195 AT_SETUP([ofproto-dpif - MPLS handling])
3196 OVS_VSWITCHD_START([dnl
3197 add-port br0 p1 -- set Interface p1 type=dummy
3199 on_exit 'kill `cat ovs-ofctl.pid`'
3201 AT_CAPTURE_FILE([ofctl_monitor.log])
3202 AT_DATA([flows.txt], [dnl
3203 dl_src=40:44:44:44:00:00 actions=push_mpls:0x8847,controller
3204 dl_src=40:44:44:44:00:01,mpls actions=push_mpls:0x8847,controller
3205 dl_src=40:44:44:44:00:02,mpls actions=push_mpls:0x8848,controller
3207 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 add-flows br0 flows.txt])
3209 dnl In this test, we push an MPLS tag to an ethernet packet.
3210 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P standard --detach --pidfile 2> ofctl_monitor.log])
3213 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)'
3215 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3216 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
3218 AT_CHECK([ofctl_strip < ofctl_monitor.log], [0], [dnl
3219 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3220 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
3221 00000000 50 54 00 00 00 07 40 44-44 44 00 00 88 47 00 00
3222 00000010 01 40 45 00 00 28 00 00-00 00 40 06 f9 7c c0 a8
3223 00000020 00 01 c0 a8 00 02 00 00-00 00 00 00 00 00 00 00
3224 00000030 00 00 50 00 00 00 00 00-00 00 00 00 00 00 00 00
3226 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3227 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
3228 00000000 50 54 00 00 00 07 40 44-44 44 00 00 88 47 00 00
3229 00000010 01 40 45 00 00 28 00 00-00 00 40 06 f9 7c c0 a8
3230 00000020 00 01 c0 a8 00 02 00 00-00 00 00 00 00 00 00 00
3231 00000030 00 00 50 00 00 00 00 00-00 00 00 00 00 00 00 00
3233 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3234 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
3235 00000000 50 54 00 00 00 07 40 44-44 44 00 00 88 47 00 00
3236 00000010 01 40 45 00 00 28 00 00-00 00 40 06 f9 7c c0 a8
3237 00000020 00 01 c0 a8 00 02 00 00-00 00 00 00 00 00 00 00
3238 00000030 00 00 50 00 00 00 00 00-00 00 00 00 00 00 00 00
3241 dnl In this test, we push an MPLS tag to an MPLS packet. The LSE should be
3242 dnl copied exactly, except for the BOS bit.
3243 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P standard --detach --pidfile 2> ofctl_monitor.log])
3246 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)'
3248 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3249 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
3251 AT_CHECK([ofctl_strip < ofctl_monitor.log], [0], [dnl
3252 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3253 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
3254 00000000 50 54 00 00 00 07 40 44-44 44 00 01 88 47 00 00
3255 00000010 a0 40 00 00 a1 40 00 00-00 00 00 00 00 00 00 00
3256 00000020 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
3257 00000030 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
3259 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3260 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
3261 00000000 50 54 00 00 00 07 40 44-44 44 00 01 88 47 00 00
3262 00000010 a0 40 00 00 a1 40 00 00-00 00 00 00 00 00 00 00
3263 00000020 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
3264 00000030 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
3266 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3267 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
3268 00000000 50 54 00 00 00 07 40 44-44 44 00 01 88 47 00 00
3269 00000010 a0 40 00 00 a1 40 00 00-00 00 00 00 00 00 00 00
3270 00000020 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
3271 00000030 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
3274 dnl In this test, we push an MPLS tag to an MPLS packet. The LSE should be
3275 dnl copied exactly, except for the BOS bit. The ethertype should be updated
3276 dnl to the MPLS ethertype of the MPLS push action which differs to that
3277 dnl of the input packet.
3278 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P standard --detach --pidfile 2> ofctl_monitor.log])
3281 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)'
3283 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3284 OVS_APP_EXIT_AND_WAIT([ovs-ofctl])
3286 AT_CHECK([ofctl_strip < ofctl_monitor.log], [0], [dnl
3287 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3288 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
3289 00000000 50 54 00 00 00 07 40 44-44 44 00 02 88 48 00 00
3290 00000010 a0 40 00 00 a1 40 00 00-00 00 00 00 00 00 00 00
3291 00000020 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
3292 00000030 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
3294 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3295 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
3296 00000000 50 54 00 00 00 07 40 44-44 44 00 02 88 48 00 00
3297 00000010 a0 40 00 00 a1 40 00 00-00 00 00 00 00 00 00 00
3298 00000020 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
3299 00000030 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
3301 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3302 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
3303 00000000 50 54 00 00 00 07 40 44-44 44 00 02 88 48 00 00
3304 00000010 a0 40 00 00 a1 40 00 00-00 00 00 00 00 00 00 00
3305 00000020 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
3306 00000030 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
3312 AT_SETUP([ofproto-dpif - VLAN+MPLS handling])
3313 OVS_VSWITCHD_START([dnl
3314 add-port br0 p1 -- set Interface p1 type=dummy
3316 on_exit 'kill `cat ovs-ofctl.pid`'
3318 AT_CAPTURE_FILE([ofctl_monitor.log])
3319 AT_DATA([flows.txt], [dnl
3320 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
3321 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
3322 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
3323 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
3324 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
3325 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
3326 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
3327 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
3328 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
3329 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
3331 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 add-flows br0 flows.txt])
3333 dnl Modified MPLS controller action.
3334 dnl In this test, we push the MPLS tag before pushing a VLAN tag, so we see
3335 dnl both of these in the final flow
3336 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P standard --detach --pidfile 2> ofctl_monitor.log])
3339 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)'
3341 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3342 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
3344 AT_CHECK([ofctl_strip < ofctl_monitor.log], [0], [dnl
3345 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3346 mpls,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:54:50,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1
3347 00000000 50 54 00 00 00 07 40 44-44 44 54 50 81 00 20 63
3348 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3349 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3350 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3351 00000040 00 00 00 00
3353 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3354 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
3355 00000000 50 54 00 00 00 07 40 44-44 44 54 50 81 00 20 63
3356 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3357 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3358 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3359 00000040 00 00 00 00
3361 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3362 mpls,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
3363 00000000 50 54 00 00 00 07 40 44-44 44 54 50 81 00 20 63
3364 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3365 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3366 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3367 00000040 00 00 00 00
3370 dnl Modified MPLS controller action.
3371 dnl In this test, the input packet is vlan-tagged, which should be stripped
3372 dnl before we push the MPLS and VLAN tags.
3373 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P standard --detach --pidfile 2> ofctl_monitor.log])
3376 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))'
3378 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3379 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
3381 AT_CHECK([ofctl_strip < ofctl_monitor.log], [0], [dnl
3382 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3383 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
3384 00000000 50 54 00 00 00 07 40 44-44 44 54 51 81 00 20 63
3385 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3386 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3387 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3389 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3390 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
3391 00000000 50 54 00 00 00 07 40 44-44 44 54 51 81 00 20 63
3392 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3393 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3394 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3396 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3397 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
3398 00000000 50 54 00 00 00 07 40 44-44 44 54 51 81 00 20 63
3399 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3400 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3401 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3404 dnl Modified MPLS controller action.
3405 dnl In this test, we push the MPLS tag before pushing a VLAN tag, so we see
3406 dnl both of these in the final flow
3407 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P standard --detach --pidfile 2> ofctl_monitor.log])
3410 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)'
3412 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3413 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
3415 AT_CHECK([ofctl_strip < ofctl_monitor.log], [0], [dnl
3416 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3417 mpls,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:54:52,dl_dst=52:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1
3418 00000000 52 54 00 00 00 07 40 44-44 44 54 52 81 00 20 63
3419 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3420 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3421 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3422 00000040 00 00 00 00
3424 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3425 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
3426 00000000 52 54 00 00 00 07 40 44-44 44 54 52 81 00 20 63
3427 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3428 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3429 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3430 00000040 00 00 00 00
3432 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3433 mpls,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
3434 00000000 52 54 00 00 00 07 40 44-44 44 54 52 81 00 20 63
3435 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3436 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3437 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3438 00000040 00 00 00 00
3441 dnl Modified MPLS controller action.
3442 dnl In this test, the input packet is vlan-tagged, which should be stripped
3443 dnl before we push the MPLS and VLAN tags.
3444 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P standard --detach --pidfile 2> ofctl_monitor.log])
3447 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))'
3449 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3450 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
3452 AT_CHECK([ofctl_strip < ofctl_monitor.log], [0], [dnl
3453 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3454 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
3455 00000000 50 54 00 00 00 07 40 44-44 44 54 53 81 00 20 63
3456 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3457 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3458 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3460 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3461 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
3462 00000000 50 54 00 00 00 07 40 44-44 44 54 53 81 00 20 63
3463 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3464 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3465 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3467 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3468 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
3469 00000000 50 54 00 00 00 07 40 44-44 44 54 53 81 00 20 63
3470 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3471 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3472 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3475 dnl Modified MPLS controller action.
3476 dnl In this test, we push the VLAN tag before pushing a MPLS tag, but these
3477 dnl actions are reordered, so we see both of these in the final flow.
3478 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P standard --detach --pidfile 2> ofctl_monitor.log])
3481 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)'
3483 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3484 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
3486 AT_CHECK([ofctl_strip < ofctl_monitor.log], [0], [dnl
3487 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3488 mpls,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:54:54,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1
3489 00000000 50 54 00 00 00 07 40 44-44 44 54 54 81 00 20 63
3490 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3491 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3492 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3493 00000040 00 00 00 00
3495 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3496 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
3497 00000000 50 54 00 00 00 07 40 44-44 44 54 54 81 00 20 63
3498 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3499 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3500 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3501 00000040 00 00 00 00
3503 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3504 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
3505 00000000 50 54 00 00 00 07 40 44-44 44 54 54 81 00 20 63
3506 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3507 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3508 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3509 00000040 00 00 00 00
3512 dnl Modified MPLS controller action.
3513 dnl In this test, the input packet is vlan-tagged, which should be stripped
3514 dnl before we push the MPLS and VLAN tags.
3515 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P standard --detach --pidfile 2> ofctl_monitor.log])
3518 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))'
3520 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3521 OVS_APP_EXIT_AND_WAIT([ovs-ofctl])
3523 AT_CHECK([ofctl_strip < ofctl_monitor.log], [0], [dnl
3524 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3525 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
3526 00000000 50 54 00 00 00 07 40 44-44 44 54 55 81 00 20 63
3527 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3528 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3529 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3531 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3532 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
3533 00000000 50 54 00 00 00 07 40 44-44 44 54 55 81 00 20 63
3534 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3535 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3536 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3538 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3539 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
3540 00000000 50 54 00 00 00 07 40 44-44 44 54 55 81 00 20 63
3541 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3542 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3543 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3546 dnl Modified MPLS controller action.
3547 dnl In this test, we push the VLAN tag before pushing a MPLS tag, but these
3548 dnl actions are reordered, so we see both of these in the final flow.
3549 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P standard --detach --pidfile 2> ofctl_monitor.log])
3552 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)'
3554 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3555 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
3557 AT_CHECK([ofctl_strip < ofctl_monitor.log], [0], [dnl
3558 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3559 mpls,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:54:56,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1
3560 00000000 50 54 00 00 00 07 40 44-44 44 54 56 81 00 20 63
3561 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3562 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3563 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3564 00000040 00 00 00 00
3566 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3567 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
3568 00000000 50 54 00 00 00 07 40 44-44 44 54 56 81 00 20 63
3569 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3570 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3571 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3572 00000040 00 00 00 00
3574 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3575 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
3576 00000000 50 54 00 00 00 07 40 44-44 44 54 56 81 00 20 63
3577 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3578 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3579 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3580 00000040 00 00 00 00
3583 dnl Modified MPLS controller action.
3584 dnl In this test, the input packet is vlan-tagged, which should be stripped
3585 dnl before we push the MPLS and VLAN tags.
3586 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 -m 65534 -P standard --detach --pidfile 2> ofctl_monitor.log])
3589 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))'
3591 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3592 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
3594 AT_CHECK([ofctl_strip < ofctl_monitor.log], [0], [dnl
3595 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3596 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
3597 00000000 50 54 00 00 00 07 40 44-44 44 54 57 81 00 20 63
3598 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3599 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3600 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3602 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3603 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
3604 00000000 50 54 00 00 00 07 40 44-44 44 54 57 81 00 20 63
3605 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3606 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3607 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3609 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3610 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
3611 00000000 50 54 00 00 00 07 40 44-44 44 54 57 81 00 20 63
3612 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3613 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3614 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3617 dnl Modified MPLS controller action.
3618 dnl In this test, the input packet is vlan-tagged, which should be stripped
3619 dnl before we push the MPLS and VLAN tags.
3620 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P standard --detach --pidfile 2> ofctl_monitor.log])
3623 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))'
3625 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3626 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
3628 AT_CHECK([ofctl_strip < ofctl_monitor.log], [0], [dnl
3629 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3630 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
3631 00000000 50 54 00 00 00 07 40 44-44 44 54 58 81 00 20 63
3632 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3633 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3634 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3636 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3637 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
3638 00000000 50 54 00 00 00 07 40 44-44 44 54 58 81 00 20 63
3639 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3640 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3641 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3643 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3644 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
3645 00000000 50 54 00 00 00 07 40 44-44 44 54 58 81 00 20 63
3646 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3647 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3648 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3651 dnl Modified MPLS controller action.
3652 dnl In this test, the input packet is vlan-tagged, which should be modified
3653 dnl before we push MPLS and VLAN tags.
3654 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P standard --detach --pidfile 2> ofctl_monitor.log])
3657 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))'
3659 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3660 OVS_APP_EXIT_AND_WAIT([ovs-ofctl])
3662 AT_CHECK([ofctl_strip < ofctl_monitor.log], [0], [dnl
3663 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3664 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
3665 00000000 50 54 00 00 00 07 40 44-44 44 54 59 81 00 20 63
3666 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3667 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3668 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3670 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3671 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
3672 00000000 50 54 00 00 00 07 40 44-44 44 54 59 81 00 20 63
3673 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3674 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3675 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3677 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3678 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
3679 00000000 50 54 00 00 00 07 40 44-44 44 54 59 81 00 20 63
3680 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3681 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3682 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3685 AT_CHECK([ovs-appctl revalidator/purge], [0])
3686 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
3687 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
3688 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
3689 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
3690 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
3691 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
3692 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
3693 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
3694 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
3695 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
3696 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
3697 OFPST_FLOW reply (OF1.2):
3703 AT_SETUP([ofproto-dpif - fragment handling - trace])
3705 add_of_ports br0 1 2 3 4 5 6 90
3706 AT_DATA([flows.txt], [dnl
3707 priority=75 tcp ip_frag=no tp_dst=80 actions=move:OXM_OF_TCP_DST[[]]->OXM_OF_TCP_SRC[[]],output:1
3708 priority=75 tcp ip_frag=first tp_dst=80 actions=move:OXM_OF_TCP_DST[[]]->OXM_OF_TCP_SRC[[]],output:2
3709 priority=50 tcp ip_frag=no actions=move:OXM_OF_TCP_DST[[]]->OXM_OF_TCP_SRC[[]],output:4
3710 priority=50 tcp ip_frag=first actions=move:OXM_OF_TCP_DST[[]]->OXM_OF_TCP_SRC[[]],output:5
3711 priority=50 tcp ip_frag=later actions=output:6
3713 AT_CHECK([ovs-ofctl replace-flows br0 flows.txt])
3715 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"
3716 no_flow="$base_flow,frag=no),tcp(src=12345,dst=80)"
3717 first_flow="$base_flow,frag=first),tcp(src=12345,dst=80)"
3718 later_flow="$base_flow,frag=later)"
3720 # mode no first later
3723 'drop 1 drop drop' \
3732 AT_CHECK([ovs-ofctl set-frags br0 $mode])
3733 for type in no first later; do
3734 eval flow=\$${type}_flow exp_output=\$$type
3735 printf "\n%s\n" "----$mode $type-----"
3736 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
3738 if test $mode = drop && test $type != no; then
3739 echo 'Packets dropped because they are IP fragments and the fragment handling mode is "drop".' >> expout
3740 echo "Datapath actions: $exp_output" >> expout
3741 elif test $type = later; then
3742 echo "Datapath actions: $exp_output" >> expout
3744 echo "Datapath actions: set(tcp(src=80,dst=80)),$exp_output" >> expout
3746 AT_CHECK([grep 'IP fragments' stdout; tail -1 stdout], [0], [expout])
3752 AT_SETUP([ofproto-dpif - fragment handling - upcall])
3754 add_of_ports br0 1 2 3 4 5 6 90
3755 AT_DATA([flows.txt], [dnl
3756 priority=75 tcp ip_frag=no tp_dst=80 actions=set_field:81->tcp_dst,output:1
3757 priority=75 tcp ip_frag=first tp_dst=80 actions=set_field:81->tcp_dst,output:2
3758 priority=50 tcp ip_frag=no actions=set_field:81->tcp_dst,output:4
3759 priority=50 tcp ip_frag=first actions=set_field:81->tcp_dst,output:5
3760 priority=50 tcp ip_frag=later actions=output:6
3762 AT_CHECK([ovs-ofctl replace-flows br0 flows.txt])
3764 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"
3765 no_flow="$base_flow,frag=no),tcp(src=12345,dst=80)"
3766 first_flow="$base_flow,frag=first),tcp(src=12345,dst=80)"
3767 later_flow="$base_flow,frag=later)"
3769 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
3773 AT_CHECK([ovs-ofctl set-frags br0 $mode])
3774 for type in no first later; do
3775 eval flow=\$${type}_flow
3776 printf "\n%s\n" "----$mode $type-----"
3778 AT_CHECK([ovs-appctl netdev-dummy/receive p90 "$flow"], [0], [stdout])
3781 AT_CHECK([ovs-appctl dpctl/dump-flows], [0], [dnl
3782 flow-dump from non-dpdk interfaces:
3783 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
3784 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
3785 recirc_id(0),in_port(90),eth_type(0x0800),ipv4(proto=6,frag=later), packets:0, bytes:0, used:never, actions:6
3790 AT_CHECK([ovs-appctl revalidator/purge], [0])
3791 AT_CHECK([ovs-ofctl set-frags br0 $mode])
3792 for type in no first later; do
3793 eval flow=\$${type}_flow
3794 printf "\n%s\n" "----$mode $type-----"
3796 AT_CHECK([ovs-appctl netdev-dummy/receive p90 "$flow"], [0], [stdout])
3799 AT_CHECK([ovs-appctl dpctl/dump-flows], [0], [dnl
3800 flow-dump from non-dpdk interfaces:
3801 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
3802 recirc_id(0),in_port(90),eth_type(0x0800),ipv4(frag=first), packets:0, bytes:0, used:never, actions:drop
3803 recirc_id(0),in_port(90),eth_type(0x0800),ipv4(frag=later), packets:0, bytes:0, used:never, actions:drop
3808 AT_CHECK([ovs-appctl revalidator/purge], [0])
3809 AT_CHECK([ovs-ofctl set-frags br0 $mode])
3810 for type in no first later; do
3811 eval flow=\$${type}_flow
3812 printf "\n%s\n" "----$mode $type-----"
3814 AT_CHECK([ovs-appctl netdev-dummy/receive p90 "$flow"], [0], [stdout])
3817 AT_CHECK([ovs-appctl dpctl/dump-flows], [0], [dnl
3818 flow-dump from non-dpdk interfaces:
3819 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
3820 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
3821 recirc_id(0),in_port(90),eth_type(0x0800),ipv4(proto=6,frag=later), packets:0, bytes:0, used:never, actions:6
3827 AT_SETUP([ofproto-dpif - fragment handling - actions])
3829 add_of_ports br0 1 2 3 4 5 6 90
3831 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])
3832 AT_CHECK([tail -2 stderr | sed 's/^.*|WARN|//'], [0], [dnl
3833 source field tcp_dst lacks correct prerequisites
3834 ovs-ofctl: actions are invalid with specified match (OFPBAC_MATCH_INCONSISTENT)
3837 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])
3838 AT_CHECK([tail -2 stderr | sed 's/^.*|WARN|//'], [0], [dnl
3839 destination field tcp_src lacks correct prerequisites
3840 ovs-ofctl: actions are invalid with specified match (OFPBAC_MATCH_INCONSISTENT)
3843 AT_CHECK([ovs-ofctl add-flow br0 "udp,ip_frag=later actions=set_field:8888->udp_src,output:1"], [1], [], [stderr])
3844 AT_CHECK([tail -2 stderr | sed 's/^.*|WARN|//'], [0], [dnl
3845 set_field udp_src lacks correct prerequisities
3846 ovs-ofctl: actions are invalid with specified match (OFPBAC_MATCH_INCONSISTENT)
3849 AT_CHECK([ovs-ofctl add-flow br0 "udp,ip_frag=later actions=load:8888->NXM_OF_UDP_DST[[]],output:1"], [1], [], [stderr])
3850 AT_CHECK([tail -2 stderr | sed 's/^.*|WARN|//'], [0], [dnl
3851 set_field udp_dst lacks correct prerequisities
3852 ovs-ofctl: actions are invalid with specified match (OFPBAC_MATCH_INCONSISTENT)
3855 AT_CHECK([ovs-ofctl add-flow br0 "sctp,ip_frag=later actions=set_field:8888->sctp_src,output:1"], [1], [], [stderr])
3856 AT_CHECK([tail -2 stderr | sed 's/^.*|WARN|//'], [0], [dnl
3857 set_field sctp_src lacks correct prerequisities
3858 ovs-ofctl: actions are invalid with specified match (OFPBAC_MATCH_INCONSISTENT)
3861 AT_CHECK([ovs-ofctl add-flow br0 "sctp,ip_frag=later actions=set_field:8888->sctp_dst,output:1"], [1], [], [stderr])
3862 AT_CHECK([tail -2 stderr | sed 's/^.*|WARN|//'], [0], [dnl
3863 set_field sctp_dst lacks correct prerequisities
3864 ovs-ofctl: actions are invalid with specified match (OFPBAC_MATCH_INCONSISTENT)
3867 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])
3868 AT_CHECK([tail -2 stderr | sed 's/^.*|WARN|//'], [0], [dnl
3869 source field tcp_dst lacks correct prerequisites
3870 ovs-ofctl: actions are invalid with specified match (OFPBAC_MATCH_INCONSISTENT)
3873 AT_DATA([flows.txt], [dnl
3874 priority=75 tcp actions=load:42->OXM_OF_TCP_SRC[[0..7]],output:1
3876 AT_CHECK([ovs-ofctl -O OpenFlow12 replace-flows br0 flows.txt])
3878 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
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-----"
3886 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"])
3889 dnl The set_field action only modifies 8 bits of the tcp_src, so both the flow
3890 dnl wildcard and the set_field action have a mask of 0xFF. Up to (including)
3891 dnl OVS-2.5, the wildcards and set_field mask are shared internally.
3892 AT_CHECK([ovs-appctl dpctl/dump-flows | sed 's/used:[[0-9]].[[0-9]]*s/used:0.001s/'], [0], [dnl
3893 flow-dump from non-dpdk interfaces:
3894 recirc_id(0),in_port(90),eth_type(0x0800),ipv4(proto=6,frag=no),tcp(src=33419/0xff), packets:0, bytes:0, used:never, actions:set(tcp(src=42/0xff)),1
3895 recirc_id(0),in_port(90),eth_type(0x0800),ipv4(proto=6,frag=first),tcp(src=33419/0xff), packets:0, bytes:0, used:never, actions:set(tcp(src=42/0xff)),1
3896 recirc_id(0),in_port(90),eth_type(0x0800),ipv4(proto=6,frag=later), packets:1, bytes:74, used:0.001s, actions:1
3899 AT_CHECK([ovs-appctl revalidator/purge], [0])
3900 AT_CHECK([ovs-ofctl set-frags br0 $mode])
3901 for frag in 4000 6000 6008 4010; do
3902 printf "\n%s\n" "----$mode $frag truncated transport header -----"
3904 AT_CHECK([ovs-appctl netdev-dummy/receive p90 "0021853763af 0026b98cb0f9 0800 4500 0018 2e24 $frag 40 06 465d ac11370d ac11370b 828b 0016"])
3907 AT_CHECK([ovs-appctl dpctl/dump-flows | sed 's/used:[[0-9]].[[0-9]]*s/used:0.001s/'], [0], [dnl
3908 flow-dump from non-dpdk interfaces:
3909 recirc_id(0),in_port(90),eth_type(0x0800),ipv4(proto=6,frag=no),tcp(src=0/0xff), packets:0, bytes:0, used:never, actions:set(tcp(src=42/0xff)),1
3910 recirc_id(0),in_port(90),eth_type(0x0800),ipv4(proto=6,frag=first),tcp(src=0/0xff), packets:0, bytes:0, used:never, actions:set(tcp(src=42/0xff)),1
3911 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_CHECK([ovs-appctl revalidator/purge], [0])
3915 AT_CHECK([ovs-ofctl set-frags br0 $mode])
3916 for frag in 4000 6000 6001 4002; do
3917 printf "\n%s\n" "----$mode $frag missing transport header-----"
3919 AT_CHECK([ovs-appctl netdev-dummy/receive p90 "0021853763af 0026b98cb0f9 0800 4500 0014 2e24 $frag 40 06 465d ac11370d ac11370b"])
3922 AT_CHECK([ovs-appctl dpctl/dump-flows | sed 's/used:[[0-9]].[[0-9]]*s/used:0.001s/'], [0], [dnl
3923 flow-dump from non-dpdk interfaces:
3924 recirc_id(0),in_port(90),eth_type(0x0800),ipv4(proto=6,frag=no),tcp(src=0/0xff), packets:0, bytes:0, used:never, actions:set(tcp(src=42/0xff)),1
3925 recirc_id(0),in_port(90),eth_type(0x0800),ipv4(proto=6,frag=first),tcp(src=0/0xff), packets:0, bytes:0, used:never, actions:set(tcp(src=42/0xff)),1
3926 recirc_id(0),in_port(90),eth_type(0x0800),ipv4(proto=6,frag=later), packets:1, bytes:60, used:0.001s, actions:1
3932 AT_SETUP([ofproto-dpif - exit])
3934 add_of_ports br0 1 2 3 10 11 12 13 14
3935 AT_DATA([flows.txt], [dnl
3936 in_port=1 actions=output:10,exit,output:11
3937 in_port=2 actions=output:12,resubmit:1,output:12
3938 in_port=3 actions=output:13,resubmit:2,output:14
3940 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
3941 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])
3942 AT_CHECK([tail -1 stdout], [0],
3943 [Datapath actions: 10
3945 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])
3946 AT_CHECK([tail -1 stdout], [0],
3947 [Datapath actions: 12,10
3949 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])
3950 AT_CHECK([tail -1 stdout], [0],
3951 [Datapath actions: 13,12,10
3957 AT_SETUP([ofproto-dpif - mirroring, select_all])
3958 AT_KEYWORDS([mirror mirrors mirroring])
3960 add_of_ports br0 1 2 3
3962 set Bridge br0 mirrors=@m --\
3963 --id=@p3 get Port p3 --\
3964 --id=@m create Mirror name=mymirror select_all=true output_port=@p3
3966 AT_DATA([flows.txt], [dnl
3967 in_port=1 actions=output:2
3968 in_port=2 actions=output:1
3970 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
3972 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)"
3973 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
3974 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
3975 [Datapath actions: 3,2
3978 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)"
3979 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
3980 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
3981 [Datapath actions: 3,1
3988 AT_SETUP([ofproto-dpif - mirroring, select_src])
3989 AT_KEYWORDS([mirror mirrors mirroring])
3991 add_of_ports br0 1 2 3
3993 set Bridge br0 mirrors=@m --\
3994 --id=@p1 get Port p1 -- --id=@p3 get Port p3 --\
3995 --id=@m create Mirror name=mymirror select_src_port=@p1 output_port=@p3
3997 AT_DATA([flows.txt], [dnl
3998 in_port=1 actions=output:2
3999 in_port=2 actions=output:1
4001 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
4003 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)"
4004 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
4005 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
4006 [Datapath actions: 3,2
4009 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)"
4010 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
4011 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
4012 [Datapath actions: 1
4017 AT_SETUP([ofproto-dpif - mirroring, OFPP_NONE ingress port])
4018 AT_KEYWORDS([mirror mirrors mirroring])
4020 add_of_ports br0 1 2
4022 set Bridge br0 mirrors=@m --\
4023 --id=@p2 get Port p2 --\
4024 --id=@m create Mirror name=mymirror select_all=true output_port=@p2
4026 AT_CHECK([ovs-ofctl add-flow br0 action=output:1])
4028 # "in_port" defaults to OFPP_NONE if it's not specified.
4029 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"
4030 AT_CHECK([ovs-appctl ofproto/trace br0 "$flow"], [0], [stdout])
4031 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
4032 [Datapath actions: 1,2
4039 AT_SETUP([ofproto-dpif - mirroring, select_dst])
4040 AT_KEYWORDS([mirror mirrors mirroring])
4042 add_of_ports br0 1 2 3
4044 set Bridge br0 mirrors=@m --\
4045 --id=@p2 get Port p2 -- --id=@p3 get Port p3 --\
4046 --id=@m create Mirror name=mymirror select_dst_port=@p2 output_port=@p3
4048 AT_DATA([flows.txt], [dnl
4049 in_port=1 actions=output:2
4050 in_port=2 actions=output:1
4052 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
4054 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)"
4055 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
4056 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
4057 [Datapath actions: 2,3
4060 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)"
4061 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
4062 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
4063 [Datapath actions: 1
4070 AT_SETUP([ofproto-dpif - mirroring, select_vlan])
4071 AT_KEYWORDS([mirror mirrors mirroring])
4073 add_of_ports br0 1 2 3
4075 set Bridge br0 mirrors=@m --\
4076 --id=@p2 get Port p2 -- --id=@p3 get Port p3 --\
4077 --id=@m create Mirror name=mymirror select_all=true select_vlan=11 output_port=@p3
4079 AT_DATA([flows.txt], [dnl
4080 in_port=1, actions=output:2
4082 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
4084 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)"
4085 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
4086 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
4087 [Datapath actions: 2
4090 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))"
4091 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
4092 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
4093 [Datapath actions: 2
4096 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))"
4097 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
4098 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
4099 [Datapath actions: 3,2
4106 AT_SETUP([ofproto-dpif - mirroring, output_port])
4107 AT_KEYWORDS([mirror mirrors mirroring])
4109 add_of_ports br0 1 2 3
4111 set Bridge br0 mirrors=@m --\
4112 --id=@p3 get Port p3 --\
4113 --id=@m create Mirror name=mymirror select_all=true output_port=@p3
4115 AT_DATA([flows.txt], [dnl
4116 in_port=1 actions=mod_vlan_vid:17,output:2
4117 in_port=2 actions=output:1
4119 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
4121 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)"
4122 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
4123 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
4124 [Datapath actions: 3,push_vlan(vid=17,pcp=0),2
4127 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)"
4128 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
4129 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
4130 [Datapath actions: 3,1
4136 AT_SETUP([ofproto-dpif - mirroring, output_vlan])
4137 AT_KEYWORDS([mirror mirrors mirroring])
4139 add_of_ports br0 1 2
4141 set Bridge br0 mirrors=@m --\
4142 --id=@m create Mirror name=mymirror select_all=true output_vlan=12
4144 AT_DATA([flows.txt], [dnl
4145 in_port=1 actions=output:2
4146 in_port=2 actions=mod_vlan_vid:17,output:1
4148 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
4150 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)"
4151 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
4152 actual=`tail -1 stdout | sed 's/Datapath actions: //'`
4154 expected="2,push_vlan(vid=12,pcp=0),1,2,100"
4155 AT_CHECK([ovs-dpctl normalize-actions "$flow" "$expected"], [0], [stdout])
4157 AT_CHECK([ovs-dpctl normalize-actions "$flow" "$actual"], [0], [expout])
4159 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)"
4160 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
4161 actual=`tail -1 stdout | sed 's/Datapath actions: //'`
4163 expected="push_vlan(vid=17,pcp=0),1,pop_vlan,push_vlan(vid=12,pcp=0),1,2,100"
4164 AT_CHECK([ovs-dpctl normalize-actions "$flow" "$expected"], [0], [stdout])
4166 AT_CHECK([ovs-dpctl normalize-actions "$flow" "$actual"], [0], [expout])
4171 # This verifies that we don't get duplicate mirroring when mirror_packet()
4172 # might be invoked recursively, as a check against regression.
4173 AT_SETUP([ofproto-dpif - multiple VLAN output mirrors])
4174 AT_KEYWORDS([mirror mirrors mirroring])
4176 add_of_ports br0 1 2 3
4178 -- set Bridge br0 fail-mode=standalone mirrors=@m1,@m2 \
4179 -- --id=@m1 create Mirror name=m1 select_all=true output_vlan=500 \
4180 -- --id=@m2 create Mirror name=m2 select_all=true output_vlan=501 \
4181 -- set Port br0 tag=0 \
4182 -- set Port p1 tag=0 \
4183 -- set Port p2 tag=500 \
4184 -- set Port p3 tag=501
4187 AT_CHECK([ovs-appctl ofproto/trace br0 "$flow"], [0], [stdout])
4188 AT_CHECK([tail -1 stdout | sed 's/Datapath actions: //
4190 /g' | sort], [0], [100
4198 # This test verifies that mirror state is preserved across recirculation.
4200 # Otherwise, post-recirculation the ingress and the output to port 4
4201 # would cause the packet to be mirrored to port 3 a second time.
4202 AT_SETUP([ofproto-dpif - mirroring with recirculation])
4203 AT_KEYWORDS([mirror mirrors mirroring])
4205 add_of_ports br0 1 2 3 4
4207 set Bridge br0 mirrors=@m --\
4208 --id=@p3 get Port p3 --\
4209 --id=@m create Mirror name=mymirror select_all=true output_port=@p3
4211 AT_DATA([flows.txt], [dnl
4212 in_port=1 actions=2,debug_recirc,4
4214 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
4216 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)"
4217 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow" -generate], [0], [stdout])
4218 AT_CHECK_UNQUOTED([tail -1 stdout], [0], [Datapath actions: 3,2,recirc(0x1)
4220 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow,recirc_id(1)" -generate], [0], [stdout])
4221 AT_CHECK_UNQUOTED([tail -1 stdout], [0], [Datapath actions: 4
4227 # This test verifies that the table ID is preserved across recirculation
4228 # when a resubmit action requires it (because the action is relative to
4229 # the current table rather than specifying a table).
4230 AT_SETUP([ofproto-dpif - resubmit with recirculation])
4232 add_of_ports br0 1 2 3
4234 AT_DATA([flows.txt], [dnl
4235 table=0 in_port=1 actions=2,resubmit(,1)
4236 table=1 in_port=1 actions=debug_recirc,resubmit:55
4237 table=1 in_port=55 actions=3
4239 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
4241 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)"
4242 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow" -generate], [0], [stdout])
4243 AT_CHECK_UNQUOTED([tail -1 stdout], [0], [Datapath actions: 2,recirc(0x1)
4245 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow,recirc_id(1)" -generate], [0], [stdout])
4246 AT_CHECK_UNQUOTED([tail -1 stdout], [0], [Datapath actions: 3
4252 # This test verifies that "resubmit", when it triggers recirculation
4253 # indirectly through the flow that it recursively invokes, is not
4254 # re-executed when execution continues later post-recirculation.
4255 AT_SETUP([ofproto-dpif - recirculation after resubmit])
4257 add_of_ports br0 1 2
4259 AT_DATA([flows.txt], [dnl
4260 table=0 in_port=1 actions=resubmit(,1),2
4261 table=1 in_port=1 actions=debug_recirc
4263 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
4265 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)"
4266 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow" -generate], [0], [stdout])
4267 AT_CHECK_UNQUOTED([tail -1 stdout], [0], [Datapath actions: recirc(0x1)
4269 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow,recirc_id(1)" -generate], [0], [stdout])
4270 AT_CHECK_UNQUOTED([tail -1 stdout], [0], [Datapath actions: 2
4276 dnl CHECK_CONTINUATION(TITLE, N_PORTS0, N_PORTS1, ACTIONS0, ACTIONS1, [EXTRA_SETUP])
4278 dnl Checks the implementation of the continuation mechanism that allows the
4279 dnl packet processing pipeline to be paused and resumed. Starts by creating
4280 dnl bridge br0 with N_PORTS0 ports numbered 1 through N_PORTS0, and adds the
4281 dnl flows listed in ACTIONS0 to that bridge. Then, injects a packet at port 1
4282 dnl in the bridge, resuming each time the pipeline pauses, and expects a single
4283 dnl packet to be output at each port 2 through N_PORTS0. Then, as long as
4284 dnl ACTIONS0 still contains at least one "pause" action, removes one of them
4285 dnl and repeats the process.
4287 dnl If N_PORTS1 is nonzero, also creates a bridge br1 and adds ports numbered
4288 dnl N_PORTS0 + 1 to N_PORTS0 + N_PORTS1 to it, as well as flows ACTIONS1.
4289 dnl ACTIONS1 may also contain "pause" actions. Packets are only ever injected
4290 dnl into port 1 on br0, so br1 only comes into action if a patch port (added
4291 dnl by EXTRA_SETUP) jumps from one bridge to another.
4293 dnl EXTRA_SETUP is an optional list of extra commands to run after setting up
4294 dnl both bridges, e.g. to configure mirrors or patch ports.
4295 m4_define([CHECK_CONTINUATION], [dnl
4296 AT_SETUP([ofproto-dpif - continuation - $1])
4297 AT_KEYWORDS([continuations pause resume])
4300 # count_matches STRING
4302 # Prints on stdout the number of occurrences of STRING in stdin.
4309 add_of_ports --pcap br0 `seq 1 $2`
4310 m4_if([$3], [0], [],
4312 add_of_ports --pcap br1 `seq m4_eval([$2 + 1]) m4_eval([$2 + $3])`])
4314 AT_CAPTURE_FILE([ofctl_monitor0.log])
4315 AT_CHECK([ovs-ofctl monitor br0 resume --detach --no-chdir --pidfile=ovs-ofctl0.pid 2> ofctl_monitor0.log])
4316 m4_if([$3], [0], [],
4317 [AT_CAPTURE_FILE([ofctl_monitor1.log])
4318 AT_CHECK([ovs-ofctl monitor br1 resume --detach --no-chdir --pidfile=ovs-ofctl1.pid 2> ofctl_monitor1.log])])
4323 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)"
4327 printf "\n\nactions for br0:\n%s\n" "$actions0"
4328 m4_if([$3], [0], [], [printf "actions for br1:\n%s\n" "$actions1"])
4331 AT_CHECK([echo "$actions0" | sed 's/pause/controller(pause)/g' | ovs-ofctl -O OpenFlow13 add-flows br0 -])
4332 m4_if([$3], [0], [],
4333 [AT_CHECK([echo "$actions1" | sed 's/pause/controller(pause)/g' | ovs-ofctl -O OpenFlow13 add-flows br1 -])])
4335 # Run a packet through the switch.
4336 AT_CHECK([ovs-appctl netdev-dummy/receive p1 "$flow"], [0], [stdout])
4338 # Wait for the expected number of packets to show up.
4339 n_packets=`expr $n_packets + $2 - 1 + $3`
4340 echo "waiting for $n_packets packets..."
4341 OVS_WAIT_UNTIL([test $n_packets = `ovs-ofctl parse-pcap p*-tx.pcap | wc -l`])
4343 # Wait for the expected number of NXT_RESUMEs to be logged.
4344 n_resumes=$(expr $n_resumes + $(echo "$actions0 $actions1" | count_matches pause) )
4345 echo "waiting for $n_resumes NXT_RESUMEs..."
4346 OVS_WAIT_UNTIL([test $n_resumes = `cat ofctl_monitor*.log | grep -c NXT_RESUME`])
4348 # Eliminate one "pause" from the actions.
4350 # If there were none left, then we're done.
4351 next_actions0=`echo "$actions0" | sed '1,/pause/s/pause//'`
4352 if test X"$actions0" = X"$next_actions0"; then
4353 next_actions1=`echo "$actions1" | sed '1,/pause/s/pause//'`
4354 if test X"$actions1" = X"$next_actions1"; then
4357 actions1=$next_actions1
4360 actions0=$next_actions0
4363 # Delete all the flows and verify that there are none, so that we
4364 # can be sure that our updated flow tables is actually in use
4366 AT_CHECK([ovs-ofctl del-flows br0 && ovs-ofctl dump-flows br0 | strip_xids], [0],
4369 m4_if([$3], [0], [],
4370 [AT_CHECK([ovs-ofctl del-flows br1 && ovs-ofctl dump-flows br1 | strip_xids], [0],
4378 # Check that pause at the end of the pipeline works OK.
4380 # (xlate_continuation() has a special case for no-op actions; this
4381 # fails without that special case.)
4382 CHECK_CONTINUATION([pause at end of pipeline], [2], [0], [actions=2 pause])
4384 # Check that remaining actions are preserved following resume.
4385 CHECK_CONTINUATION([actions], [7], [0],
4386 [in_port=1 actions=pause 2 pause 3 pause 4 pause 5 pause 6 pause 7])
4388 # Check that multiple levels of resubmit continue following resume.
4390 # The "resubmit:55", which is relative to the current table, is
4391 # particularly interesting because it checks that the notion of the
4392 # current table is correctly preserved.
4393 CHECK_CONTINUATION([resubmit], [10], [0],
4394 [table=0 in_port=1 actions=pause 2 pause resubmit(,1) pause 10 pause
4395 table=1 in_port=1 actions=pause 3 pause resubmit(,2) pause 9 pause
4396 table=2 in_port=1 actions=pause 4 pause resubmit(,3) pause 8 pause
4397 table=3 in_port=1 actions=pause 5 pause resubmit:55 pause 7 pause
4398 table=3 in_port=55 actions=pause 6 pause])
4400 # Check that the action set is preserved across pause/resume.
4401 CHECK_CONTINUATION([action set], [3], [0],
4402 [in_port=1 actions=1 pause resubmit(,1) pause 2
4403 table=1 actions=write_actions(3)])
4405 # Check that metadata and the stack used by push and pop is preserved
4406 # across pause/resume.
4407 CHECK_CONTINUATION([data stack], [3], [0],
4408 [in_port=1 actions=pause dnl
4409 set_field:1->reg0 dnl
4411 set_field:2->reg1 dnl
4413 output:NXM_NX_REG0[[]] dnl
4415 push:NXM_NX_REG1[[]] dnl
4417 pop:NXM_NX_REG2[[]] dnl
4419 output:NXM_NX_REG2[[]] dnl
4423 # Check that mirror output occurs once and once only, even if
4424 # separated by pause/resume.
4425 CHECK_CONTINUATION([mirroring], [5], [0],
4426 [in_port=1 actions=pause 2 pause 3 pause 4 pause], [],
4428 set Bridge br0 mirrors=@m --\
4429 --id=@p2 get Port p2 --\
4430 --id=@p3 get Port p3 --\
4431 --id=@p4 get Port p4 --\
4432 --id=@p5 get Port p5 --\
4433 --id=@m create Mirror name=mymirror select_dst_port=@p2,@p3,@p4 output_port=@p5])
4435 # Check that pause works in the presence of patch ports.
4436 CHECK_CONTINUATION([patch ports], [4], [1],
4437 [table=0 in_port=1 actions=pause 2 resubmit(,1) pause 4
4438 table=1 in_port=1 actions=pause 3 pause 10 pause],
4439 [table=0 in_port=11 actions=pause 5 pause],
4441 -- add-port br0 patch10 \
4442 -- set interface patch10 type=patch options:peer=patch11 \
4444 -- add-port br1 patch11 \
4445 -- set interface patch11 type=patch options:peer=patch10 \
4448 # Two testcases below are for the ofproto/trace command
4449 # The first one tests all correct syntax:
4450 # ofproto/trace [dp_name] odp_flow [-generate|packet]
4451 # ofproto/trace br_name br_flow [-generate|packet]
4452 AT_SETUP([ofproto-dpif - ofproto/trace command 1])
4453 OVS_VSWITCHD_START([set bridge br0 fail-mode=standalone])
4454 add_of_ports br0 1 2 3
4456 AT_DATA([flows.txt], [dnl
4457 in_port=1 actions=output:2
4458 in_port=2 actions=output:1
4460 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
4462 odp_flow="in_port(p1)"
4464 # Test command: ofproto/trace odp_flow with in_port as a name.
4465 AT_CHECK([ovs-appctl ofproto/trace "$odp_flow"], [0], [stdout])
4466 AT_CHECK([tail -1 stdout], [0], [dnl
4470 odp_flow="in_port(1)"
4471 # Test command: ofproto/trace odp_flow
4472 AT_CHECK([ovs-appctl ofproto/trace "$odp_flow"], [0], [stdout])
4473 AT_CHECK([tail -1 stdout], [0], [dnl
4477 # Test command: ofproto/trace dp_name odp_flow
4478 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$odp_flow"], [0], [stdout])
4479 AT_CHECK([tail -1 stdout], [0], [dnl
4482 # Test commmand: ofproto/trace br_name br_flow
4483 AT_CHECK([ovs-appctl ofproto/trace br0 "$br_flow"], [0], [stdout])
4484 AT_CHECK([tail -1 stdout], [0], [dnl
4488 # Delete the inserted flows
4489 AT_CHECK([ovs-ofctl del-flows br0 "in_port=1"], [0], [stdout])
4490 AT_CHECK([ovs-ofctl del-flows br0 "in_port=2"], [0], [stdout])
4492 # This section below tests the [-generate] option
4493 odp_flow="in_port(3),eth(src=50:54:00:00:00:05,dst=ff:ff:ff:ff:ff:ff)"
4494 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"
4496 # Test command: ofproto/trace odp_flow
4497 AT_CHECK([ovs-appctl ofproto/trace "$odp_flow"], [0], [stdout])
4498 # Check for no MAC learning entry
4499 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
4503 # Test command: ofproto/trace br_name br_flow
4504 AT_CHECK([ovs-appctl ofproto/trace br0 "$br_flow"], [0], [stdout])
4505 # Check for no MAC learning entry
4506 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
4510 # Test command: ofproto/trace odp_flow -generate
4511 AT_CHECK([ovs-appctl ofproto/trace "$odp_flow" -generate], [0], [stdout])
4512 # Check for the MAC learning entry
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 ?
4518 # Test command: ofproto/trace dp_name odp_flow -generate
4519 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy \
4520 "in_port(1),eth(src=50:54:00:00:00:06,dst=50:54:00:00:00:05)" \
4521 -generate], [0], [stdout])
4522 # Check for both MAC learning entries
4523 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
4525 3 0 50:54:00:00:00:05 ?
4526 1 0 50:54:00:00:00:06 ?
4529 # Test command: ofproto/trace br_name br_flow -generate
4530 AT_CHECK([ovs-appctl ofproto/trace br0 \
4531 "in_port=2,dl_src=50:54:00:00:00:07,dl_dst=50:54:00:00:00:06" \
4532 -generate], [0], [stdout])
4533 # Check for both MAC learning entries.
4534 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
4536 3 0 50:54:00:00:00:05 ?
4537 1 0 50:54:00:00:00:06 ?
4538 2 0 50:54:00:00:00:07 ?
4541 # This section beflow tests the [packet] option
4542 # The ovs-tcpundump of packets between port1 and port2
4543 pkt1to2="50540000000250540000000108064500001C000100004001F98CC0A80001C0A800020800F7FF00000000"
4544 pkt2to1="50540000000150540000000208064500001C000100004001F98CC0A80002C0A800010800F7FF00000000"
4546 # Construct the MAC learning table
4547 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy \
4548 "in_port(1),eth(src=50:54:00:00:00:01,dst=ff:ff:ff:ff:ff:ff)" \
4549 -generate], [0], [stdout])
4551 # Construct the MAC learning table
4552 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy \
4553 "in_port(2),eth(src=50:54:00:00:00:02,dst=ff:ff:ff:ff:ff:ff)" \
4554 -generate], [0], [stdout])
4556 # Test command: ofproto/trace odp_flow packet
4557 AT_CHECK([ovs-appctl ofproto/trace \
4558 "in_port(1),skb_priority(1),skb_mark(2)" "$pkt1to2"], [0], [stdout])
4559 AT_CHECK([tail -1 stdout], [0], [dnl
4562 AT_CHECK([head -n 2 stdout], [0], [dnl
4564 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
4567 # Test command: ofproto/trace dp_name odp_flow packet
4568 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy \
4569 "in_port(1),skb_priority(1),skb_mark(2)" "$pkt1to2"], [0], [stdout])
4570 AT_CHECK([tail -1 stdout], [0], [dnl
4573 AT_CHECK([head -n 2 stdout], [0], [dnl
4575 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
4578 # Test command: ofproto/trace br_name br_flow packet
4579 AT_CHECK([ovs-appctl ofproto/trace br0 \
4580 "in_port=2,skb_priority=2,pkt_mark=1" "$pkt2to1"], [0], [stdout],[stderr])
4581 AT_CHECK([tail -1 stdout], [0], [dnl
4584 AT_CHECK([head -n 2 stdout], [0], [dnl
4586 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
4592 # The second test tests the corner cases
4593 AT_SETUP([ofproto-dpif - ofproto/trace command 2])
4595 add_of_ports br0 1 2
4598 odp_flow="in_port(1),eth(src=50:54:00:00:00:01,dst=50:54:00:00:00:02)"
4599 br_flow="in_port=1,dl_src=50:54:00:00:00:01,dl_dst=50:54:00:00:00:02"
4601 generate="-generate"
4602 pkt="50540000000250540000000108064500001C000100004001F98CC0A80001C0A800020800F7FF00000000"
4604 # Test incorrect command: ofproto/trace wrong_name odp_flow [-generate|packet]
4610 [AT_CHECK([ovs-appctl ofproto/trace wrong_name "$odp_flow" option],
4612 AT_CHECK([tail -2 stderr], [0], [dnl
4613 Cannot find the datapath
4614 ovs-appctl: ovs-vswitchd: server returned an error
4617 # Test incorrect command: ofproto/trace empty_string odp_flow [-generate|packet]
4623 [AT_CHECK([ovs-appctl ofproto/trace "" "$odp_flow" option],
4625 AT_CHECK([tail -2 stderr], [0], [dnl
4626 Cannot find the datapath
4627 ovs-appctl: ovs-vswitchd: server returned an error
4630 # Test incorrect command: ofproto/trace nonexist_dp_name odp_flow [-generate|packet]
4636 [AT_CHECK([ovs-appctl ofproto/trace ovs-system "$odp_flow" option],
4638 AT_CHECK([tail -2 stderr], [0], [dnl
4639 Cannot find the datapath
4640 ovs-appctl: ovs-vswitchd: server returned an error
4643 # Test incorrect command: ofproto/trace br_name odp_flow [-generate|packet]
4649 [AT_CHECK([ovs-appctl ofproto/trace br0 "$odp_flow" option],
4651 AT_CHECK([tail -2 stderr], [0], [dnl
4652 Cannot find the datapath
4653 ovs-appctl: ovs-vswitchd: server returned an error
4656 # Test incorrect command: ofproto/trace dp_name br_flow [-generate|packet]
4662 [AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$br_flow" option],
4664 AT_CHECK([tail -2 stderr], [0], [dnl
4666 ovs-appctl: ovs-vswitchd: server returned an error
4669 # Test incorrect command: ofproto/trace br_flow [-generate|packet]
4675 [AT_CHECK([ovs-appctl ofproto/trace "$br_flow" option],
4677 AT_CHECK([tail -2 stderr], [0], [dnl
4678 Must specify bridge name
4679 ovs-appctl: ovs-vswitchd: server returned an error
4682 # Test incorrect command: ofproto/trace dp_name odp_flow garbage_option
4683 AT_CHECK([ovs-appctl ofproto/trace \
4684 ovs-dummy "$odp_flow" garbage_option],
4685 [2], [stdout],[stderr])
4686 AT_CHECK([tail -2 stderr], [0], [dnl
4687 Trailing garbage in packet data
4688 ovs-appctl: ovs-vswitchd: server returned an error
4691 # Test incorrect command: ofproto/trace with 4 arguments
4692 AT_CHECK([ovs-appctl ofproto/trace \
4693 arg1, arg2, arg3, arg4], [2], [stdout],[stderr])
4694 AT_CHECK([tail -2 stderr], [0], [dnl
4695 "ofproto/trace" command takes at most 3 arguments
4696 ovs-appctl: ovs-vswitchd: server returned an error
4699 # Test incorrect command: ofproto/trace with 0 argument
4700 AT_CHECK([ovs-appctl ofproto/trace ], [2], [stdout],[stderr])
4701 AT_CHECK([tail -2 stderr], [0], [dnl
4702 "ofproto/trace" command requires at least 1 arguments
4703 ovs-appctl: ovs-vswitchd: server returned an error
4709 # The third test checks that the output of "ovs-dpctl -m" is valid to trace.
4710 AT_SETUP([ofproto-dpif - ofproto/trace from dpctl output])
4711 OVS_VSWITCHD_START([dnl
4712 set Open_vSwitch . other_config:max-idle=10000 \
4713 -- add-port br0 p1 -- set Interface p1 type=dummy])
4715 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)'])
4716 ovs-appctl revalidator/wait
4717 AT_CHECK([ovs-appctl dpif/dump-flows -m br0 | sed 's/, packets.*$//' > dp_flows1.txt])
4719 odp_flow=`cat dp_flows1.txt`
4720 AT_CHECK([ovs-appctl ofproto/trace "$odp_flow" | sed 's/\([[Ff]]low:\).*/\1 <cleared>/'], [0], [dnl
4723 No match, packets dropped because OFPPC_NO_PACKET_IN is set on in_port.
4725 Rule: table=254 cookie=0 priority=0,reg0=0x2
4726 OpenFlow actions=drop
4728 Final flow: <cleared>
4730 Datapath actions: drop
4733 dnl Now, try again without megaflows:
4734 ovs-appctl upcall/disable-megaflows
4736 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)'])
4737 ovs-appctl revalidator/wait
4738 AT_CHECK([ovs-appctl dpif/dump-flows -m br0 | sed 's/, packets.*$//' > dp_flows2.txt])
4740 odp_flow=`cat dp_flows2.txt`
4741 AT_CHECK([ovs-appctl ofproto/trace "$odp_flow" | sed 's/\([[Ff]]low:\).*/\1 <cleared>/'], [0], [dnl
4744 No match, packets dropped because OFPPC_NO_PACKET_IN is set on in_port.
4746 Rule: table=254 cookie=0 priority=0,reg0=0x2
4747 OpenFlow actions=drop
4749 Final flow: <cleared>
4751 Datapath actions: drop
4757 AT_SETUP([ofproto-dpif - ofproto/trace-packet-out])
4759 add_of_ports br0 1 2 3
4761 AT_DATA([flows.txt], [dnl
4762 in_port=1 actions=output:2
4763 in_port=2 actions=output:1
4765 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
4767 AT_CHECK([ovs-appctl ofproto/trace-packet-out br0 in_port=1 'mod_vlan_vid:123,resubmit(,0)'], [0], [stdout])
4768 AT_CHECK([tail -1 stdout], [0], [dnl
4769 Datapath actions: push_vlan(vid=123,pcp=0),2
4776 m4_define([OFPROTO_TRACE],
4778 AT_CHECK([ovs-appctl ofproto/trace $1 "$flow" $3], [0], [stdout])
4779 actual=`tail -1 stdout | sed 's/Datapath actions: //'`
4781 AT_CHECK([ovs-dpctl normalize-actions "$flow" "$expected" $5],
4784 AT_CHECK([ovs-dpctl normalize-actions "$flow" "$actual" $5],
4787 AT_SETUP([ofproto-dpif - MAC learning])
4788 OVS_VSWITCHD_START([set bridge br0 fail-mode=standalone])
4789 add_of_ports br0 1 2 3
4791 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)'
4793 # Trace an ARP packet arriving on p3, to create a MAC learning entry.
4796 [in_port(3),eth(src=50:54:00:00:00:05,dst=ff:ff:ff:ff:ff:ff),$arp],
4800 # Check for the MAC learning entry.
4801 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
4803 3 0 50:54:00:00:00:05 ?
4806 # Trace a packet arrival destined for the learned MAC.
4807 # (This will also learn a MAC.)
4810 [in_port(1),eth(src=50:54:00:00:00:06,dst=50:54:00:00:00:05),$arp],
4814 # Check for both MAC learning entries.
4815 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
4817 3 0 50:54:00:00:00:05 ?
4818 1 0 50:54:00:00:00:06 ?
4821 # Trace a packet arrival that updates the first learned MAC entry.
4824 [in_port(2),eth(src=50:54:00:00:00:05,dst=ff:ff:ff:ff:ff:ff),$arp],
4828 # Check that the MAC learning entry was updated.
4829 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
4831 1 0 50:54:00:00:00:06 ?
4832 2 0 50:54:00:00:00:05 ?
4835 # Add another bridge.
4839 -- set bridge br1 datapath-type=dummy])
4840 add_of_ports br1 4 5
4842 # Trace some packet arrivals in br1 to create MAC learning entries there too.
4845 [in_port(4),eth(src=50:54:00:00:00:06,dst=ff:ff:ff:ff:ff:ff),$arp],
4850 [in_port(5),eth(src=50:54:00:00:00:07,dst=ff:ff:ff:ff:ff:ff),$arp],
4854 # Check that the MAC learning entries were added.
4855 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br1 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
4857 4 0 50:54:00:00:00:06 ?
4858 5 0 50:54:00:00:00:07 ?
4861 # Delete port p1 and see that its MAC learning entry disappeared, and
4862 # that the MAC learning entry for the same MAC was also deleted from br1.
4863 AT_CHECK([ovs-vsctl del-port p1])
4864 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
4866 2 0 50:54:00:00:00:05 ?
4868 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br1 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
4870 5 0 50:54:00:00:00:07 ?
4876 AT_SETUP([ofproto-dpif - MAC table overflow])
4878 [set bridge br0 fail-mode=standalone other-config:mac-table-size=10])
4879 add_of_ports br0 1 2 3
4881 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)'
4883 AT_CHECK([ovs-appctl time/stop])
4885 # Trace 10 ARP packets arriving on p3, to create MAC learning entries.
4886 for i in 0 1 2 3 4 5 6 7 8 9; do
4889 [in_port(3),eth(src=50:54:00:00:00:0$i,dst=ff:ff:ff:ff:ff:ff),$arp],
4892 ovs-appctl time/warp 1000
4895 # Check for the MAC learning entries.
4896 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/ *[[0-9]]\{1,\}$//' | sort],
4898 3 0 50:54:00:00:00:00
4899 3 0 50:54:00:00:00:01
4900 3 0 50:54:00:00:00:02
4901 3 0 50:54:00:00:00:03
4902 3 0 50:54:00:00:00:04
4903 3 0 50:54:00:00:00:05
4904 3 0 50:54:00:00:00:06
4905 3 0 50:54:00:00:00:07
4906 3 0 50:54:00:00:00:08
4907 3 0 50:54:00:00:00:09
4911 # Trace another ARP packet on another MAC.
4914 [in_port(3),eth(src=50:54:00:00:00:10,dst=ff:ff:ff:ff:ff:ff),$arp],
4918 # Check that the new one chased the oldest one out of the table.
4919 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/' | sort],
4921 3 0 50:54:00:00:00:01 ?
4922 3 0 50:54:00:00:00:02 ?
4923 3 0 50:54:00:00:00:03 ?
4924 3 0 50:54:00:00:00:04 ?
4925 3 0 50:54:00:00:00:05 ?
4926 3 0 50:54:00:00:00:06 ?
4927 3 0 50:54:00:00:00:07 ?
4928 3 0 50:54:00:00:00:08 ?
4929 3 0 50:54:00:00:00:09 ?
4930 3 0 50:54:00:00:00:10 ?
4936 AT_SETUP([ofproto-dpif - MAC table overflow fairness])
4938 [set bridge br0 fail-mode=standalone other-config:mac-table-size=10])
4939 add_of_ports br0 1 2 3 4 5 6
4941 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)'
4943 AT_CHECK([ovs-appctl time/stop])
4945 # Trace packets with 2 different source MACs arriving on each of the 5
4946 # ports, filling up the 10-entry learning table.
4947 for i in 0 1 2 3 4 5 6 7 8 9; do
4949 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
4950 ovs-appctl time/warp 1000
4953 # Check for the MAC learning entries.
4954 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/ *[[0-9]]\{1,\}$//' | sort],
4956 1 0 50:54:00:00:00:00
4957 1 0 50:54:00:00:00:01
4958 2 0 50:54:00:00:00:02
4959 2 0 50:54:00:00:00:03
4960 3 0 50:54:00:00:00:04
4961 3 0 50:54:00:00:00:05
4962 4 0 50:54:00:00:00:06
4963 4 0 50:54:00:00:00:07
4964 5 0 50:54:00:00:00:08
4965 5 0 50:54:00:00:00:09
4969 # Now trace 16 new MACs on another port.
4970 for i in 0 1 2 3 4 5 6 7 8 9 a b c d e f; do
4971 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
4972 ovs-appctl time/warp 1000
4975 # Check the results.
4977 # Our eviction algorithm on overflow is that an arbitrary (but deterministic)
4978 # one of the ports with the most learned MACs loses the least recently used
4979 # one. Thus, the new port will end up with 3 MACs, 3 of the old ports with 1
4980 # MAC each, and the other 2 of the old ports with 2 MACs each.
4982 # (If someone changes lib/heap.c to do something different with equal-priority
4983 # nodes, then the output below could change, but it would still follow the
4984 # rules explained above.)
4985 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/ *[[0-9]]\{1,\}$//' | sort],
4987 1 0 50:54:00:00:00:01
4988 2 0 50:54:00:00:00:03
4989 3 0 50:54:00:00:00:04
4990 3 0 50:54:00:00:00:05
4991 4 0 50:54:00:00:00:07
4992 5 0 50:54:00:00:00:08
4993 5 0 50:54:00:00:00:09
4994 6 0 50:54:00:00:0d:ff
4995 6 0 50:54:00:00:0e:ff
4996 6 0 50:54:00:00:0f:ff
5002 # CHECK_SFLOW_SAMPLING_PACKET(LOOPBACK_ADDR)
5004 # Test that sFlow samples packets correctly using IPv4/IPv6 sFlow collector
5005 m4_define([CHECK_SFLOW_SAMPLING_PACKET],
5006 [AT_XFAIL_IF([test "$IS_WIN32" = "yes"])
5007 OVS_VSWITCHD_START([set Bridge br0 fail-mode=standalone])
5009 on_exit 'kill `cat test-sflow.pid`'
5010 AT_CHECK([ovstest test-sflow --log-file --detach --no-chdir --pidfile 0:$1 > sflow.log], [0], [], [ignore])
5011 AT_CAPTURE_FILE([sflow.log])
5012 PARSE_LISTENING_PORT([test-sflow.log], [SFLOW_PORT])
5013 ovs-appctl time/stop
5015 add_of_ports br0 1 2
5017 set Interface br0 options:ifindex=1002 -- \
5018 set Interface p1 options:ifindex=1004 -- \
5019 set Interface p2 options:ifindex=1003 -- \
5020 set Bridge br0 sflow=@sf -- \
5021 --id=@sf create sflow targets=\"$1:$SFLOW_PORT\" \
5022 header=128 sampling=1 polling=1 agent=$LOOPBACK_INTERFACE
5024 dnl open with ARP packets to seed the bridge-learning. The output
5025 dnl ifIndex numbers should be reported predictably after that.
5026 dnl Since we set sampling=1 we should see all of these packets
5027 dnl reported. Sorting the output by data-source and seqNo makes
5028 dnl it deterministic. Ensuring that we send at least two packets
5029 dnl into each port means we get to check the seq nos are
5030 dnl incrementing correctly.
5031 dnl because packets from different ports can be handled by separate
5032 dnl threads, put some sleeps
5034 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)'
5036 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)'
5038 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)'
5040 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)'
5041 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)'
5043 dnl sleep long enough to get more than one counter sample
5044 dnl from each datasource so we can check sequence numbers
5045 ovs-appctl time/warp 3000 100
5047 OVS_APP_EXIT_AND_WAIT([test-sflow])
5049 AT_CHECK_UNQUOTED([[sort sflow.log | $EGREP 'HEADER|ERROR' | sed 's/ /\
5070 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
5090 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
5110 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
5130 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
5150 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
5153 AT_CHECK_UNQUOTED([[sort sflow.log | $EGREP 'IFCOUNTERS|ERROR|PORTNAME|OPENFLOWPORT' | head -18 | sed 's/ /\
5166 in_multicasts=4294967295
5167 in_broadcasts=4294967295
5168 in_discards=4294967295
5169 in_errors=4294967295
5170 in_unknownprotos=4294967295
5173 out_multicasts=4294967295
5174 out_broadcasts=4294967295
5175 out_discards=4294967295
5176 out_errors=4294967295
5189 in_multicasts=4294967295
5190 in_broadcasts=4294967295
5191 in_discards=4294967295
5192 in_errors=4294967295
5193 in_unknownprotos=4294967295
5196 out_multicasts=4294967295
5197 out_broadcasts=4294967295
5198 out_discards=4294967295
5199 out_errors=4294967295
5212 in_multicasts=4294967295
5213 in_broadcasts=4294967295
5214 in_discards=4294967295
5215 in_errors=4294967295
5216 in_unknownprotos=4294967295
5219 out_multicasts=4294967295
5220 out_broadcasts=4294967295
5221 out_discards=4294967295
5222 out_errors=4294967295
5235 in_multicasts=4294967295
5236 in_broadcasts=4294967295
5237 in_discards=4294967295
5238 in_errors=4294967295
5239 in_unknownprotos=4294967295
5242 out_multicasts=4294967295
5243 out_broadcasts=4294967295
5244 out_discards=4294967295
5245 out_errors=4294967295
5258 in_multicasts=4294967295
5259 in_broadcasts=4294967295
5260 in_discards=4294967295
5261 in_errors=4294967295
5262 in_unknownprotos=4294967295
5265 out_multicasts=4294967295
5266 out_broadcasts=4294967295
5267 out_discards=4294967295
5268 out_errors=4294967295
5281 in_multicasts=4294967295
5282 in_broadcasts=4294967295
5283 in_discards=4294967295
5284 in_errors=4294967295
5285 in_unknownprotos=4294967295
5288 out_multicasts=4294967295
5289 out_broadcasts=4294967295
5290 out_discards=4294967295
5291 out_errors=4294967295
5294 datapath_id=18364758544493064720
5297 datapath_id=18364758544493064720
5300 datapath_id=18364758544493064720
5303 datapath_id=18364758544493064720
5306 datapath_id=18364758544493064720
5309 datapath_id=18364758544493064720
5325 AT_SETUP([ofproto-dpif - sFlow packet sampling - IPv4 collector])
5326 CHECK_SFLOW_SAMPLING_PACKET([127.0.0.1])
5329 AT_SETUP([ofproto-dpif - sFlow packet sampling - IPv6 collector])
5330 AT_SKIP_IF([test $HAVE_IPV6 = no])
5331 CHECK_SFLOW_SAMPLING_PACKET([[[::1]]])
5334 dnl Test sFlow LAG structures
5335 AT_SETUP([ofproto-dpif - sFlow packet sampling - LACP structures])
5336 AT_SKIP_IF([test "$IS_WIN32" = "yes"])
5337 OVS_VSWITCHD_START([dnl
5338 add-bond br0 bond p1 p2 -- \
5339 set Port bond lacp=active bond-mode=active-backup \
5340 other_config:lacp-time="fast" \
5341 other_config:lacp-system-id=11:22:33:44:55:66 \
5342 other_config:lacp-system-priority=54321 -- \
5343 set Interface p1 type=dummy \
5344 other_config:lacp-port-id=11 \
5345 other_config:lacp-port-priority=111 \
5346 other_config:lacp-aggregation-key=3333 -- \
5347 set Interface p2 type=dummy \
5348 other_config:lacp-port-id=22 \
5349 other_config:lacp-port-priority=222 \
5350 other_config:lacp-aggregation-key=3333 ])
5352 on_exit 'kill `cat test-sflow.pid`'
5353 AT_CHECK([ovstest test-sflow --log-file --detach --no-chdir --pidfile 0:127.0.0.1 > sflow.log], [0], [], [ignore])
5354 AT_CAPTURE_FILE([sflow.log])
5355 PARSE_LISTENING_PORT([test-sflow.log], [SFLOW_PORT])
5357 ovs-appctl time/stop
5360 set Interface p1 options:ifindex=1003 -- \
5361 set Bridge br0 sflow=@sf -- \
5362 --id=@sf create sflow targets=\"127.0.0.1:$SFLOW_PORT\" \
5363 header=128 sampling=1 polling=1
5365 dnl sleep long enough to get the sFlow datagram flushed out (may be delayed for up to 1 second)
5366 AT_CHECK([ovs-appctl time/warp 2000 100], [0], [ignore])
5367 AT_CHECK([ovs-appctl revalidator/purge], [0])
5369 OVS_APP_EXIT_AND_WAIT([test-sflow])
5370 AT_CHECK([[sort sflow.log | $EGREP 'LACPCOUNTERS|ERROR' | head -n 1 | sed 's/ /\
5373 sysID=11:22:33:44:55:66
5374 partnerID=00:00:00:00:00:00
5381 markerPDUsRx=4294967295
5382 markerRespPDUsRx=4294967295
5383 unknownRx=4294967295
5386 markerPDUsTx=4294967295
5387 markerRespPDUsTx=4294967295
5392 AT_SETUP([ofproto-dpif - sFlow packet sampling - tunnel set])
5393 AT_XFAIL_IF([test "$IS_WIN32" = "yes"])
5394 OVS_VSWITCHD_START([set Bridge br0 fail-mode=standalone])
5396 dnl set up sFlow logging
5397 AT_CHECK([ovstest test-sflow --log-file --detach --no-chdir --pidfile 0:127.0.0.1 > sflow.log], [0], [], [ignore])
5398 AT_CAPTURE_FILE([sflow.log])
5399 PARSE_LISTENING_PORT([test-sflow.log], [SFLOW_PORT])
5400 ovs-appctl time/stop
5402 OVS_VSWITCHD_DISABLE_TUNNEL_PUSH_POP
5403 AT_CHECK([ovs-vsctl add-port br0 gre0 -- set Interface gre0 type=gre \
5404 options:remote_ip=1.1.1.1 options:key=456 ofport_request=3])
5405 AT_CHECK([ovs-vsctl add-port br0 p1 -- set Interface p1 type=dummy ofport_request=4])
5407 AT_CHECK([ovs-ofctl add-flow br0 action=3])
5411 set Bridge br0 sflow=@sf -- \
5412 --id=@sf create sflow targets=\"127.0.0.1:$SFLOW_PORT\" \
5413 header=128 sampling=1 polling=0
5415 dnl introduce a packet that will be flooded to the tunnel
5416 AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(4),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.10.10.2,dst=10.10.10.1,proto=1,tos=1,ttl=128,frag=no),icmp(type=8,code=0)'])
5418 dnl sleep long enough to get the sFlow datagram flushed out (may be delayed for up to 1 second)
5419 for i in `seq 1 30`; do
5420 ovs-appctl time/warp 100
5423 OVS_APP_EXIT_AND_WAIT([test-sflow])
5425 AT_CHECK_UNQUOTED([[sort sflow.log | $EGREP 'HEADER|ERROR' | sed 's/ /\
5431 tunnel4_out_length=0
5432 tunnel4_out_protocol=47
5433 tunnel4_out_src=0.0.0.0
5434 tunnel4_out_dst=1.1.1.1
5435 tunnel4_out_src_port=0
5436 tunnel4_out_dst_port=0
5437 tunnel4_out_tcp_flags=0
5455 hdr=50-54-00-00-00-0A-50-54-00-00-00-09-08-00-45-01-00-1C-00-00-00-00-80-01-12-CA-0A-0A-0A-02-0A-0A-0A-01-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
5461 AT_SETUP([ofproto-dpif - sFlow packet sampling - tunnel push])
5462 AT_XFAIL_IF([test "$IS_WIN32" = "yes"])
5464 OVS_VSWITCHD_START([add-port br0 p0 -- set Interface p0 type=dummy ofport_request=1 options:ifindex=1010])
5466 dnl set up sFlow logging
5467 AT_CHECK([ovstest test-sflow --log-file --detach --no-chdir --pidfile 0:127.0.0.1 > sflow.log], [0], [], [ignore])
5468 AT_CAPTURE_FILE([sflow.log])
5469 PARSE_LISTENING_PORT([test-sflow.log], [SFLOW_PORT])
5470 ovs-appctl time/stop
5472 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5473 AT_CHECK([ovs-vsctl add-br int-br -- set bridge int-br datapath_type=dummy], [0])
5474 AT_CHECK([ovs-vsctl -- add-port int-br t1 -- set Interface t1 type=gre \
5475 options:remote_ip=1.1.2.92 options:key=456 ofport_request=4\
5476 -- add-port int-br vm1 -- set Interface vm1 type=dummy \
5477 options:ifindex=2011 ofport_request=5
5480 AT_CHECK([ovs-appctl dpif/show], [0], [dnl
5481 dummy@ovs-dummy: hit:0 missed:0
5483 br0 65534/100: (dummy)
5484 p0 1/1: (dummy: ifindex=1010)
5486 int-br 65534/2: (dummy)
5487 t1 4/4: (gre: key=456, remote_ip=1.1.2.92)
5488 vm1 5/3: (dummy: ifindex=2011)
5491 dnl set up route to 1.1.2.92 via br0 and action=normal
5492 AT_CHECK([ovs-appctl netdev-dummy/ip4addr br0 1.1.2.88/24], [0], [OK
5494 AT_CHECK([ovs-appctl ovs/route/add 1.1.2.92/24 br0], [0], [OK
5496 AT_CHECK([ovs-ofctl add-flow br0 action=normal])
5498 dnl Prime ARP Cache for 1.1.2.92
5499 AT_CHECK([ovs-appctl netdev-dummy/receive br0 'recirc_id(0),in_port(100),eth(src=f8:bc:12:44:34:b6,dst=ff:ff:ff:ff:ff:ff),eth_type(0x0806),arp(sip=1.1.2.92,tip=1.1.2.88,op=2,sha=f8:bc:12:44:34:b6,tha=00:00:00:00:00:00)'])
5501 dnl configure sflow on int-br only
5503 set Bridge int-br sflow=@sf -- \
5504 --id=@sf create sflow targets=\"127.0.0.1:$SFLOW_PORT\" \
5505 header=128 sampling=1 polling=0
5507 dnl set up route to 192.168.1.2 via br0
5508 AT_CHECK([ovs-appctl netdev-dummy/ip4addr br0 192.168.1.1/16], [0], [OK
5510 AT_CHECK([ovs-appctl ovs/route/add 192.168.0.0/16 br0], [0], [OK
5513 dnl add rule for int-br to force packet onto tunnel. There is no ifindex
5514 dnl for this port so the sFlow output will just report that it went to
5515 dnl 1 output (out_format=2, out_ifindex=1)
5516 AT_CHECK([ovs-ofctl add-flow int-br "actions=4"])
5518 AT_CHECK([ovs-appctl netdev-dummy/receive vm1 'in_port(3),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=192.168.1.1,dst=192.168.2.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)'])
5520 dnl sleep long enough to get the sFlow datagram flushed out (may be delayed for up to 1 second)
5521 for i in `seq 1 30`; do
5522 ovs-appctl time/warp 100
5525 OVS_APP_EXIT_AND_WAIT([test-sflow])
5527 AT_CHECK_UNQUOTED([[sort sflow.log | $EGREP 'HEADER|ERROR' | sed 's/ /\
5533 tunnel4_out_length=0
5534 tunnel4_out_protocol=47
5535 tunnel4_out_src=1.1.2.88
5536 tunnel4_out_dst=1.1.2.92
5537 tunnel4_out_src_port=0
5538 tunnel4_out_dst_port=0
5539 tunnel4_out_tcp_flags=0
5557 hdr=50-54-00-00-00-0A-50-54-00-00-00-05-08-00-45-00-00-1C-00-00-00-00-80-01-B6-8D-C0-A8-01-01-C0-A8-02-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
5563 AT_SETUP([ofproto-dpif - sFlow packet sampling - MPLS])
5564 AT_XFAIL_IF([test "$IS_WIN32" = "yes"])
5566 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5567 add_of_ports br0 1 2
5568 AT_DATA([flows.txt], [dnl
5569 table=0 dl_src=50:54:00:00:00:09 actions=push_mpls:0x8847,set_mpls_label:789,set_mpls_tc:4,set_mpls_ttl:32,2
5570 table=0 dl_src=50:54:00:00:00:0b actions=pop_mpls:0x0800,2
5572 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5574 dnl set up sFlow logging
5575 AT_CHECK([ovstest test-sflow --log-file --detach --no-chdir --pidfile 0:127.0.0.1 > sflow.log], [0], [], [ignore])
5576 AT_CAPTURE_FILE([sflow.log])
5577 PARSE_LISTENING_PORT([test-sflow.log], [SFLOW_PORT])
5578 ovs-appctl time/stop
5582 set Bridge br0 sflow=@sf -- \
5583 --id=@sf create sflow targets=\"127.0.0.1:$SFLOW_PORT\" \
5584 header=128 sampling=1 polling=0
5586 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)'])
5587 AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800)'])
5589 dnl sleep long enough to get the sFlow datagram flushed out (may be delayed for up to 1 second)
5590 for i in `seq 1 30`; do
5591 ovs-appctl time/warp 100
5594 OVS_APP_EXIT_AND_WAIT([test-sflow])
5596 AT_CHECK_UNQUOTED([[sort sflow.log | $EGREP 'HEADER|ERROR' | sed 's/ /\
5625 hdr=50-54-00-00-00-0A-50-54-00-00-00-09-88-47-00-00-B7-40-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
5649 hdr=50-54-00-00-00-0A-50-54-00-00-00-09-08-00-45-00-00-14-00-00-00-00-00-00-BA-EB-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
5656 # CHECK_NETFLOW_EXPIRATION(LOOPBACK_ADDR)
5658 # Test that basic NetFlow reports flow statistics correctly:
5659 # The initial packet of a flow are correctly accounted.
5660 # Later packets within a flow are correctly accounted.
5661 # Flow actions changing (in this case, due to MAC learning)
5662 # cause a record to be sent.
5663 m4_define([CHECK_NETFLOW_EXPIRATION],
5664 [OVS_VSWITCHD_START([set Bridge br0 fail-mode=standalone])
5665 add_of_ports br0 1 2
5667 ovs-appctl time/stop
5668 on_exit 'kill `cat test-netflow.pid`'
5669 AT_CHECK([ovstest test-netflow --log-file --detach --no-chdir --pidfile 0:$1 > netflow.log], [0], [], [ignore])
5670 AT_CAPTURE_FILE([netflow.log])
5671 PARSE_LISTENING_PORT([test-netflow.log], [NETFLOW_PORT])
5674 set Bridge br0 netflow=@nf -- \
5675 --id=@nf create NetFlow targets=\"$1:$NETFLOW_PORT\" \
5676 engine_id=1 engine_type=2 active_timeout=30 add-id-to-interface=false
5678 for delay in 1000 30000; do
5679 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)'
5680 sleep 1 # ensure the order in which these two packets are processed
5681 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)'
5683 ovs-appctl time/warp $delay
5686 ovs-appctl time/warp 6000
5687 ovs-appctl revalidator/wait
5689 OVS_APP_EXIT_AND_WAIT([test-netflow])
5691 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])
5693 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])
5695 combined=`grep "192.168.0.2 > 192.168.0.1, if 2 > 1, 2 pkts, 120 bytes, ICMP 0:0" netflow.log | wc -l`
5696 separate=`grep "192.168.0.2 > 192.168.0.1, if 2 > 1, 1 pkts, 60 bytes, ICMP 0:0" netflow.log | wc -l`
5697 AT_CHECK([test $separate = 2 || test $combined = 1], [0])])
5699 AT_SETUP([ofproto-dpif - NetFlow flow expiration - IPv4 collector])
5700 CHECK_NETFLOW_EXPIRATION([127.0.0.1])
5703 AT_SETUP([ofproto-dpif - NetFlow flow expiration - IPv6 collector])
5704 AT_SKIP_IF([test $HAVE_IPV6 = no])
5705 CHECK_NETFLOW_EXPIRATION([[[::1]]])
5708 # CHECK_NETFLOW_ACTIVE_EXPIRATION(LOOPBACK_ADDR)
5710 # Test that basic NetFlow reports active expirations correctly.
5711 m4_define([CHECK_NETFLOW_ACTIVE_EXPIRATION],
5712 [OVS_VSWITCHD_START([set Bridge br0 fail-mode=standalone])
5713 add_of_ports br0 1 2
5715 on_exit 'kill `cat test-netflow.pid`'
5716 AT_CHECK([ovstest test-netflow --log-file --detach --no-chdir --pidfile 0:$1 > netflow.log], [0], [], [ignore])
5717 AT_CAPTURE_FILE([netflow.log])
5718 PARSE_LISTENING_PORT([test-netflow.log], [NETFLOW_PORT])
5721 set Bridge br0 netflow=@nf -- \
5722 --id=@nf create NetFlow targets=\"$1:$NETFLOW_PORT\" \
5723 engine_id=1 engine_type=2 active_timeout=10 add-id-to-interface=false
5725 AT_CHECK([ovs-appctl time/stop])
5727 while test $n -le 60; do
5730 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)'
5731 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)'
5733 ovs-appctl time/warp 1000
5736 ovs-appctl time/warp 10000
5738 ovs-appctl revalidator/wait
5740 OVS_APP_EXIT_AND_WAIT([test-netflow])
5742 # Count the number of reported packets:
5743 # - From source to destination before MAC learning kicks in (just one).
5744 # - From source to destination after that.
5745 # - From destination to source.
5753 pkts=`echo "$line" | sed 's/.*, \([[0-9]]*\) pkts,.*/\1/'`
5760 "seq "*": 192.168.0.1 > 192.168.0.2, if 1 > 65535, "*" pkts, "*" bytes, TCP 1234 > 80, time "*)
5763 "seq "*": 192.168.0.1 > 192.168.0.2, if 1 > 2, "*" pkts, "*" bytes, TCP 1234 > 80, time "*)
5766 "seq "*": 192.168.0.2 > 192.168.0.1, if 2 > 1, "*" pkts, "*" bytes, TCP 80 > 1234, time "*)
5773 eval $counter=\`expr \$$counter + \$pkts\`
5774 n_recs=`expr $n_recs + 1`
5777 # There should be exactly 1 MAC learning packet,
5778 # exactly 59 other packets in that direction,
5779 # and exactly 60 packets in the other direction.
5780 AT_CHECK([echo $n_learn $n_in $n_out $n_other], [0], [1 59 60 0
5783 AT_SETUP([ofproto-dpif - NetFlow active expiration - IPv4 collector])
5784 CHECK_NETFLOW_ACTIVE_EXPIRATION([127.0.0.1])
5787 AT_SETUP([ofproto-dpif - NetFlow active expiration - IPv6 collector])
5788 AT_SKIP_IF([test $HAVE_IPV6 = no])
5789 CHECK_NETFLOW_ACTIVE_EXPIRATION([[[::1]]])
5792 dnl In the absence of an IPFIX collector to verify protocol correctness, simply
5793 dnl configure bridge IPFIX and ensure that sample action generation works at the
5795 AT_SETUP([ofproto-dpif - Bridge IPFIX sanity check])
5797 add_of_ports br0 1 2
5799 dnl Sample every packet using bridge-based sampling.
5800 AT_CHECK([ovs-vsctl -- set bridge br0 ipfix=@fix -- \
5801 --id=@fix create ipfix targets=\"127.0.0.1:4739\" \
5802 sampling=1], [0], [ignore])
5804 dnl Send some packets that should be sampled.
5805 for i in `seq 1 3`; do
5806 AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800)'])
5808 AT_CHECK([ovs-appctl dpctl/dump-flows | sed 's/.*\(packets:\)/\1/' | sed 's/used:[[0-9]].[[0-9]]*s/used:0.001s/'], [0], [dnl
5809 flow-dump from non-dpdk interfaces:
5810 packets:2, bytes:120, used:0.001s, actions:sample(sample=100.0%,actions(userspace(pid=0,ipfix(output_port=4294967295))))
5813 dnl Remove the IPFIX configuration.
5814 AT_CHECK([ovs-vsctl clear bridge br0 ipfix])
5815 AT_CHECK([ovs-appctl revalidator/purge])
5817 dnl Send some more packets, to ensure that these are not sampled.
5818 for i in `seq 1 3`; do
5819 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)'])
5821 AT_CHECK([ovs-appctl dpctl/dump-flows | sed 's/.*\(packets:\)/\1/' | sed 's/used:[[0-9]].[[0-9]]*s/used:0.001s/'], [0], [dnl
5822 flow-dump from non-dpdk interfaces:
5823 packets:2, bytes:120, used:0.001s, actions:drop
5826 OVS_VSWITCHD_STOP(["/sending to collector failed/d"])
5829 dnl Bridge IPFIX statistics check
5830 AT_SETUP([ofproto-dpif - Bridge IPFIX statistics check])
5832 add_of_ports br0 1 2
5834 dnl Negative test check.
5835 AT_CHECK([ovs-ofctl dump-ipfix-bridge br0], [0], [dnl
5836 OFPT_ERROR (xid=0x2): NXST_NOT_CONFIGURED
5837 NXST_IPFIX_BRIDGE request (xid=0x2):
5840 dnl Sample every packet using bridge-based sampling.
5841 AT_CHECK([ovs-vsctl -- set bridge br0 ipfix=@fix -- \
5842 --id=@fix create ipfix targets=\"127.0.0.1:4739\" \
5843 sampling=1], [0], [ignore])
5845 dnl Send some packets that should be sampled.
5846 for i in `seq 1 20`; do
5847 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)'])
5850 dnl There are 4 extra IPFIX template packets.
5851 AT_CHECK([ovs-ofctl dump-ipfix-bridge br0], [0], [dnl
5852 NXST_IPFIX_BRIDGE reply (xid=0x2):
5853 bridge ipfix: flows=20, current flows=0, sampled pkts=20, ipv4 ok=0, ipv6 ok=0, tx pkts=12
5854 pkts errs=20, ipv4 errs=20, ipv6 errs=0, tx errs=12
5857 dnl Remove the IPFIX configuration.
5858 AT_CHECK([ovs-vsctl clear bridge br0 ipfix])
5859 AT_CHECK([ovs-appctl revalidator/purge])
5861 dnl Send some more packets, to ensure that these are not sampled.
5862 for i in `seq 1 2`; do
5863 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)'])
5865 AT_CHECK([ovs-ofctl dump-ipfix-bridge br0], [0], [dnl
5866 OFPT_ERROR (xid=0x2): NXST_NOT_CONFIGURED
5867 NXST_IPFIX_BRIDGE request (xid=0x2):
5870 OVS_VSWITCHD_STOP(["/sending to collector failed/d"])
5873 dnl Flow IPFIX sanity check
5874 AT_SETUP([ofproto-dpif - Flow IPFIX sanity check])
5876 add_of_ports br0 1 2
5878 AT_CHECK([ovs-vsctl -- --id=@br0 get Bridge br0 \
5879 -- --id=@ipfix create IPFIX targets=\"127.0.0.1:4739\" \
5880 -- --id=@cs create Flow_Sample_Collector_Set id=1 bridge=@br0 ipfix=@ipfix],
5883 AT_DATA([flows.txt], [dnl
5884 in_port=1, actions=sample(probability=65535,collector_set_id=1),output:2
5887 AT_CHECK([ovs-ofctl add-flows br0 flows.txt], [0], [ignore])
5889 dnl Send some packets that should be sampled.
5890 for i in `seq 1 3`; do
5891 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)'])
5893 AT_CHECK([ovs-appctl dpctl/dump-flows | sed 's/.*\(packets:\)/\1/' | sed 's/used:[[0-9]].[[0-9]]*s/used:0.001s/'], [0], [dnl
5894 flow-dump from non-dpdk interfaces:
5895 packets:2, bytes:120, used:0.001s, actions:sample(sample=100.0%,actions(userspace(pid=0,flow_sample(probability=65535,collector_set_id=1,obs_domain_id=0,obs_point_id=0)))),2
5898 dnl Remove the flow which contains sample action.
5899 AT_CHECK([ovs-ofctl del-flows br0 in_port=1], [0], [ignore])
5900 AT_CHECK([ovs-appctl revalidator/purge])
5902 dnl Send some more packets, to ensure that these are not sampled.
5903 for i in `seq 1 3`; do
5904 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)'])
5906 AT_CHECK([ovs-appctl dpctl/dump-flows | sed 's/.*\(packets:\)/\1/' | sed 's/used:[[0-9]].[[0-9]]*s/used:0.001s/'], [0], [dnl
5907 flow-dump from non-dpdk interfaces:
5908 packets:2, bytes:120, used:0.001s, actions:drop
5911 OVS_VSWITCHD_STOP(["/sending to collector failed/d"])
5914 dnl Flow based IPFIX statistics check
5915 AT_SETUP([ofproto-dpif - Flow IPFIX statistics check])
5917 add_of_ports br0 1 2
5919 dnl Negative test check.
5920 AT_CHECK([ovs-ofctl dump-ipfix-flow br0], [0], [dnl
5921 OFPT_ERROR (xid=0x2): NXST_NOT_CONFIGURED
5922 NXST_IPFIX_FLOW request (xid=0x2):
5925 AT_CHECK([ovs-vsctl -- --id=@br0 get Bridge br0 \
5926 -- --id=@ipfix create IPFIX targets=\"127.0.0.1:4739\" \
5927 -- --id=@cs create Flow_Sample_Collector_Set id=1 bridge=@br0 ipfix=@ipfix],
5930 AT_DATA([flows.txt], [dnl
5931 in_port=1, actions=sample(probability=65535,collector_set_id=1),output:2
5934 AT_CHECK([ovs-ofctl add-flows br0 flows.txt], [0], [ignore])
5936 dnl Send some packets that should be sampled.
5937 for i in `seq 1 20`; do
5938 AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800)'])
5941 dnl There are 4 extra IPFIX template packets.
5942 AT_CHECK([ovs-ofctl dump-ipfix-flow br0], [0], [dnl
5943 NXST_IPFIX_FLOW reply (xid=0x2): 1 ids
5944 id 1: flows=20, current flows=0, sampled pkts=20, ipv4 ok=0, ipv6 ok=0, tx pkts=12
5945 pkts errs=20, ipv4 errs=20, ipv6 errs=0, tx errs=12
5948 dnl Remove the flow which contains sample action.
5949 AT_CHECK([ovs-ofctl del-flows br0 in_port=1], [0], [ignore])
5950 AT_CHECK([ovs-vsctl destroy Flow_Sample_Collector_Set 1], [0], [ignore])
5951 AT_CHECK([ovs-appctl revalidator/purge])
5953 dnl Send some more packets, to ensure that these are not sampled.
5954 for i in `seq 1 3`; do
5955 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)'])
5957 AT_CHECK([ovs-ofctl dump-ipfix-flow br0], [0], [dnl
5958 OFPT_ERROR (xid=0x2): NXST_NOT_CONFIGURED
5959 NXST_IPFIX_FLOW request (xid=0x2):
5962 OVS_VSWITCHD_STOP(["/sending to collector failed/d"])
5965 AT_SETUP([ofproto-dpif - flow stats])
5967 AT_CHECK([ovs-ofctl add-flow br0 "ip,actions=NORMAL"])
5968 AT_CHECK([ovs-ofctl add-flow br0 "icmp,actions=NORMAL"])
5970 ovs-appctl time/stop
5972 for i in `seq 1 10`; do
5973 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)'
5976 AT_CHECK([ovs-appctl time/warp 1000], [0], [ignore])
5977 AT_CHECK([ovs-appctl revalidator/purge], [0])
5978 AT_CHECK([ovs-ofctl dump-flows br0], [0], [stdout])
5979 AT_CHECK([strip_xids < stdout | sed -n 's/duration=[[0-9]]*\.[[0-9]]*s/duration=0.0s/p' | sort], [0], [dnl
5980 cookie=0x0, duration=0.0s, table=0, n_packets=0, n_bytes=0, idle_age=1, icmp actions=NORMAL
5981 cookie=0x0, duration=0.0s, table=0, n_packets=10, n_bytes=600, idle_age=1, ip actions=NORMAL
5986 AT_SETUP([ofproto-dpif - flow stats, set-n-threads])
5988 AT_CHECK([ovs-ofctl add-flow br0 "ip,actions=NORMAL"])
5989 AT_CHECK([ovs-ofctl add-flow br0 "icmp,actions=NORMAL"])
5991 ovs-appctl time/stop
5993 for i in `seq 1 10`; do
5994 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)'
5997 ovs-appctl time/warp 100
5998 AT_CHECK([ovs-vsctl set Open_vSwitch . other-config:n-revalidator-threads=2])
5999 ovs-appctl time/warp 1000
6001 AT_CHECK([ovs-ofctl dump-flows br0], [0], [stdout])
6002 AT_CHECK([strip_xids < stdout | sed -n 's/duration=[[0-9]]*\.[[0-9]]*s/duration=0.0s/p' | sort], [0], [dnl
6003 cookie=0x0, duration=0.0s, table=0, n_packets=0, n_bytes=0, idle_age=1, icmp actions=NORMAL
6004 cookie=0x0, duration=0.0s, table=0, n_packets=10, n_bytes=600, idle_age=1, ip actions=NORMAL
6009 AT_SETUP([ofproto-dpif - idle_age and hard_age increase over time])
6012 # get_ages DURATION HARD IDLE
6014 # Fetch the flow duration, hard age, and idle age into the variables
6015 # whose names are given as arguments. Rounds DURATION down to the
6016 # nearest integer. If hard_age doesn't appear in the output, sets
6017 # HARD to "none". If idle_age doesn't appear in the output, sets IDLE
6020 AT_CHECK([ovs-ofctl dump-flows br0], [0], [stdout])
6022 duration=`sed -n 's/.*duration=\([[0-9]]*\)\(\.[[0-9]]*\)\{0,1\}s.*/\1/p' stdout`
6023 AT_CHECK([[expr X"$duration" : 'X[0-9][0-9]*$']], [0], [ignore])
6024 AS_VAR_COPY([$1], [duration])
6026 hard=`sed -n 's/.*hard_age=\([[0-9]]*\),.*/\1/p' stdout`
6027 if test X"$hard" = X; then
6030 AT_CHECK([[expr X"$hard" : 'X[0-9][0-9]*$']], [0], [ignore])
6032 AS_VAR_COPY([$2], [hard])
6034 idle=`sed -n 's/.*idle_age=\([[0-9]]*\),.*/\1/p' stdout`
6035 if test X"$idle" = X; then
6038 AT_CHECK([[expr X"$idle" : 'X[0-9][0-9]*$']], [0], [ignore])
6040 AS_VAR_COPY([$3], [idle])
6043 # Add a flow and get its initial hard and idle age.
6044 AT_CHECK([ovs-ofctl add-flow br0 hard_timeout=199,idle_timeout=188,actions=drop])
6045 get_ages duration1 hard1 idle1
6047 ovs-appctl time/stop
6048 # Warp time forward by 10 seconds, then modify the flow's actions.
6049 ovs-appctl time/warp 10000
6050 get_ages duration2 hard2 idle2
6051 AT_CHECK([ovs-ofctl mod-flows br0 actions=flood])
6053 # Warp time forward by 10 seconds.
6054 ovs-appctl time/warp 10000
6055 get_ages duration3 hard3 idle3
6057 # Warp time forward 10 more seconds, then pass some packets through the flow,
6058 # then warp forward a few more times because idle times are only updated
6060 ovs-appctl time/warp 10000
6061 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)'
6062 ovs-appctl time/warp 3000 1000
6064 get_ages duration4 hard4 idle4
6066 printf "duration: %4s => %4s => %4s => %4s\n" $duration1 $duration2 $duration3 $duration4
6067 printf "hard_age: %4s => %4s => %4s => %4s\n" $hard1 $hard2 $hard3 $hard4
6068 printf "idle_age: %4s => %4s => %4s => %4s\n" $idle1 $idle2 $idle3 $idle4
6070 # Duration should increase steadily over time.
6071 AT_CHECK([test $duration1 -lt $duration2])
6072 AT_CHECK([test $duration2 -lt $duration3])
6073 AT_CHECK([test $duration3 -lt $duration4])
6075 # Hard age should be "none" initially because it's the same as flow_duration,
6076 # then it should increase.
6077 AT_CHECK([test $hard1 = none])
6078 AT_CHECK([test $hard2 = none])
6079 AT_CHECK([test $hard3 != none])
6080 AT_CHECK([test $hard4 != none])
6081 AT_CHECK([test $hard3 -lt $hard4])
6083 # Idle age should increase from 1 to 2 to 3, then decrease.
6084 AT_CHECK([test $idle1 -lt $idle2])
6085 AT_CHECK([test $idle2 -lt $idle3])
6086 AT_CHECK([test $idle3 -gt $idle4])
6088 # Check some invariant relationships.
6089 AT_CHECK([test $duration1 = $idle1])
6090 AT_CHECK([test $duration2 = $idle2])
6091 AT_CHECK([test $duration3 = $idle3])
6092 AT_CHECK([test $idle3 -gt $hard3])
6093 AT_CHECK([test $idle4 -lt $hard4])
6094 AT_CHECK([test $hard4 -lt $duration4])
6099 AT_SETUP([ofproto-dpif - fin_timeout])
6101 ovs-appctl time/stop
6102 AT_CHECK([ovs-ofctl add-flow br0 'idle_timeout=60,actions=fin_timeout(idle_timeout=5)'])
6103 AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip], [0],
6105 idle_timeout=60, actions=fin_timeout(idle_timeout=5)
6108 # Check that a TCP SYN packet does not change the timeout. (Because
6109 # flow stats updates are mainly what implements the fin_timeout
6110 # feature, we warp forward a couple of times to ensure that flow stats
6111 # run before re-checking the flow table.)
6112 AT_CHECK([ovs-appctl netdev-dummy/receive br0 0021853763af0026b98cb0f908004500003c2e2440004006465dac11370dac11370b828b0016751e267b00000000a00216d017360000020405b40402080a2d25085f0000000001030307])
6113 AT_CHECK([ovs-appctl time/warp 1000 && ovs-appctl time/warp 1000], [0], [warped
6116 AT_CHECK([ovs-appctl revalidator/purge], [0])
6117 AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip], [0],
6119 n_packets=1, n_bytes=74, idle_timeout=60, actions=fin_timeout(idle_timeout=5)
6121 # Check that a TCP FIN packet does change the timeout.
6122 AT_CHECK([ovs-appctl netdev-dummy/receive br0 0021853763af0026b98cb0f90800451000342e3e40004006463bac11370dac11370b828b0016751e319dfc96399b801100717ae800000101080a2d250a9408579588])
6123 AT_CHECK([ovs-appctl time/warp 1000 && ovs-appctl time/warp 1000], [0], [warped
6126 AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip], [0],
6128 n_packets=2, n_bytes=140, idle_timeout=5, actions=fin_timeout(idle_timeout=5)
6133 AT_SETUP([ofproto-dpif - ovs-appctl dpif/dump-dps])
6134 OVS_VSWITCHD_START([add-br br1 -- set bridge br1 datapath-type=dummy])
6135 add_of_ports br0 1 2
6138 AT_CHECK([ovs-appctl dpif/dump-dps], [0], [dnl
6145 AT_SETUP([ofproto-dpif - ovs-appctl dpif/show])
6146 OVS_VSWITCHD_START([add-br br1 -- set bridge br1 datapath-type=dummy], [], [],
6147 [--dummy-numa="0,0,0,0,1,1,1,1"])
6148 add_pmd_of_ports br0 1 2
6151 AT_CHECK([ovs-appctl dpif/show | sed 's/\(dummy-pmd: \).*)/\1<cleared>)/'], [0], [dnl
6152 dummy@ovs-dummy: hit:0 missed:0
6154 br0 65534/100: (dummy)
6155 p1 1/1: (dummy-pmd: <cleared>)
6156 p2 2/2: (dummy-pmd: <cleared>)
6158 br1 65534/101: (dummy)
6164 AT_SETUP([ofproto-dpif - ovs-appctl dpif/dump-flows])
6165 # bump max-idle to avoid the flows being reclaimed behind us
6166 OVS_VSWITCHD_START([add-br br1 -- \
6167 set bridge br1 datapath-type=dummy fail-mode=secure -- \
6168 set Open_vSwitch . other_config:max-idle=10000], [], [],
6169 [--dummy-numa="0,0,0,0,1,1,1,1"])
6171 add_pmd_of_ports br0 2
6174 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)'])
6175 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)'])
6176 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)'])
6177 ovs-appctl revalidator/wait
6178 AT_CHECK([ovs-appctl dpif/dump-flows br0 | strip_ufid | strip_used | sort], [0], [dnl
6179 recirc_id(0),in_port(1),eth_type(0x0800),ipv4(frag=no), packets:0, bytes:0, used:never, actions:drop
6180 recirc_id(0),in_port(2),eth_type(0x0800),ipv4(frag=no), packets:0, bytes:0, used:never, actions:drop
6183 AT_CHECK([ovs-appctl dpif/dump-flows br1 | strip_ufid | strip_used | sort], [0], [dnl
6184 recirc_id(0),in_port(3),eth_type(0x0800),ipv4(frag=no), packets:0, bytes:0, used:never, actions:drop
6187 AT_CHECK([ovs-appctl dpif/dump-flows -m br0 | strip_ufid | strip_used | sort], [0], [dnl
6188 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
6189 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
6192 AT_CHECK([ovs-appctl dpif/dump-flows -m br1 | strip_ufid | strip_used | sort], [0], [dnl
6193 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
6199 m4_define([OFPROTO_DPIF_GET_FLOW],
6200 [AT_SETUP([ofproto-dpif - ovs-appctl dpif/get-flow$1])
6202 OVS_VSWITCHD_START([add-br br1 -- \
6203 set bridge br1 datapath-type=dummy fail-mode=secure -- \
6204 set Open_vSwitch . other_config:max-idle=10000], [], [],
6205 [m4_if([$1], [], [], [--dummy-numa="0,0,0,0,1,1,1,1"])])
6207 func=`echo -n "$1_" | cut -c 4-`
6208 add_${func}of_ports br0 1 2
6210 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)'])
6211 ovs-appctl revalidator/wait
6212 AT_CHECK([ovs-appctl dpif/dump-flows -m br0], [0], [stdout])
6214 UFID=`sed -n 's/\(ufid:[[-0-9a-fA-F]]*\).*/\1/p' stdout`
6215 AT_CHECK([ovs-appctl dpctl/get-flow $UFID], [0], [dnl
6216 recirc_id(0),in_port(1),eth_type(0x0800),ipv4(frag=no), packets:0, bytes:0, used:never, actions:drop
6222 OFPROTO_DPIF_GET_FLOW([])
6223 OFPROTO_DPIF_GET_FLOW([ - pmd])
6225 AT_SETUP([ofproto-dpif - MPLS actions that result in a userspace action])
6226 OVS_VSWITCHD_START([dnl
6227 add-port br0 p1 -- set Interface p1 type=dummy
6229 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
6230 on_exit 'kill `cat ovs-ofctl.pid`'
6232 AT_CAPTURE_FILE([ofctl_monitor.log])
6233 AT_DATA([flows.txt], [dnl
6234 dl_src=60:66:66:66:66:00 actions=push_mpls:0x8847,controller
6235 dl_src=60:66:66:66:66:01 actions=pop_mpls:0x8847,controller
6237 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
6239 dnl Packet is sent to userspace because a MPLS push or pop action is applied to
6240 dnl a packet with 2 MPLS LSEs but dpif-netdev can't handle any labels.
6242 dnl The input is a frame with two MPLS labels which tcpdump -vve shows as:
6243 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)
6244 dnl (label 20, exp 0, [S], ttl 32)
6245 dnl (tos 0x0, ttl 64, id 0, offset 0, flags [none], proto TCP (6), length 44, bad cksum 3b78 (->f978)!)
6246 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
6248 for dl_src in 00 01; do
6249 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"])
6251 sleep 1 # wait for the datapath flow installed
6252 AT_CHECK_UNQUOTED([strip_ufid < ovs-vswitchd.log | filter_flow_install | strip_used], [0], [dnl
6253 recirc_id(0),in_port(1),eth(src=60:66:66:66:66:00),eth_type(0x8847),mpls(label=20,tc=0,ttl=32,bos=0,label=20,tc=0,ttl=32,bos=1), actions:userspace(pid=0,slow_path(controller))
6254 recirc_id(0),in_port(1),eth(src=60:66:66:66:66:01),eth_type(0x8847),mpls(label=20/0x0,tc=0/0,ttl=32/0x0,bos=0/1,label=20/0xfffff,tc=0/7,ttl=32/0xff,bos=1/1), actions:userspace(pid=0,slow_path(controller))
6261 AT_SETUP([ofproto-dpif - MPLS actions that result in a drop])
6262 OVS_VSWITCHD_START([dnl
6263 add-port br0 p1 -- set Interface p1 type=dummy
6265 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
6266 on_exit 'kill `cat ovs-ofctl.pid`'
6268 AT_CAPTURE_FILE([ofctl_monitor.log])
6269 AT_DATA([flows.txt], [dnl
6270 dl_src=60:66:66:66:66:00 actions=push_mpls:0x8847,controller
6271 dl_src=60:66:66:66:66:01 actions=pop_mpls:0x8847,controller
6273 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
6275 dnl Packet is dropped because an MPLS PUSH action is applied to a packet with
6276 dnl 4 MPLS LSEs but ovs-vswtichd can only handle up to 3 MPLS LSEs and thus
6277 dnl can't determine the resulting MPLS label after MPLS push/pop actions.
6279 dnl The input is a frame with two MPLS headers which tcpdump -vve shows as:
6280 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)
6281 dnl (label 20, exp 0, ttl 32)
6282 dnl (label 20, exp 0, ttl 32)
6283 dnl (label 20, exp 0, [S], ttl 32)
6284 dnl (tos 0x0, ttl 64, id 0, offset 0, flags [none], proto TCP (6), length 44, bad cksum 3b78 (->f978)!)
6285 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
6287 for dl_src in 00 01; do
6288 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"])
6290 sleep 1 # wait for the datapath flow installed
6291 AT_CHECK_UNQUOTED([strip_ufid < ovs-vswitchd.log | filter_flow_install | strip_used], [0], [dnl
6292 recirc_id(0),in_port(1),eth(src=60:66:66:66:66:00),eth_type(0x8847),mpls(label=20,tc=0,ttl=32,bos=0,label=20,tc=0,ttl=32,bos=1), actions:userspace(pid=0,slow_path(controller))
6293 recirc_id(0),in_port(1),eth(src=60:66:66:66:66:01),eth_type(0x8847),mpls(label=20/0x0,tc=0/0,ttl=32/0x0,bos=0/1,label=20/0xfffff,tc=0/7,ttl=32/0xff,bos=1/1), actions:userspace(pid=0,slow_path(controller))
6299 AT_SETUP([ofproto-dpif - patch ports])
6300 OVS_VSWITCHD_START([add-br br1 \
6301 -- set bridge br1 datapath-type=dummy fail-mode=secure \
6302 -- add-port br1 pbr1 -- set int pbr1 type=patch options:peer=pbr0 \
6303 -- add-port br0 pbr0 -- set int pbr0 type=patch options:peer=pbr1])
6308 AT_CHECK([ovs-appctl upcall/disable-ufid], [0], [Datapath dumping tersely using UFID disabled
6310 AT_CHECK([ovs-appctl time/stop])
6311 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
6313 AT_CHECK([ovs-ofctl add-flow br0 actions=LOCAL,output:1,output:2])
6314 AT_CHECK([ovs-ofctl add-flow br1 actions=LOCAL,output:1,output:3])
6316 for i in $(seq 1 10); do
6317 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)'
6318 if [[ $i -eq 1 ]]; then
6323 for i in $(seq 1 5); do
6324 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)'
6325 if [[ $i -eq 1 ]]; then
6330 AT_CHECK([ovs-appctl time/warp 500], [0],
6333 sleep 1 # wait for log writer
6335 AT_CHECK([ovs-appctl dpif/show], [0], [dnl
6336 dummy@ovs-dummy: hit:13 missed:2
6338 br0 65534/100: (dummy)
6340 pbr0 1/none: (patch: peer=pbr1)
6342 br1 65534/101: (dummy)
6344 pbr1 1/none: (patch: peer=pbr0)
6347 AT_CHECK([strip_ufid < ovs-vswitchd.log | filter_flow_install | strip_used], [0], [dnl
6348 recirc_id(0),in_port(100),eth_type(0x0800),ipv4(frag=no), actions:101,3,2
6349 recirc_id(0),in_port(101),eth_type(0x0800),ipv4(frag=no), actions:100,2,3
6352 AT_CHECK([grep -e 'in_port(100).*packets:9' ovs-vswitchd.log | strip_ufid | filter_flow_dump], [0], [dnl
6353 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
6355 AT_CHECK([grep -e 'in_port(101).*packets:4' ovs-vswitchd.log | strip_ufid | filter_flow_dump], [0], [dnl
6356 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
6359 AT_CHECK([ovs-ofctl dump-ports br0 pbr0], [0], [dnl
6360 OFPST_PORT reply (xid=0x4): 1 ports
6361 port 1: rx pkts=5, bytes=300, drop=?, errs=?, frame=?, over=?, crc=?
6362 tx pkts=10, bytes=600, drop=?, errs=?, coll=?
6365 AT_CHECK([ovs-ofctl dump-ports br1 pbr1], [0], [dnl
6366 OFPST_PORT reply (xid=0x4): 1 ports
6367 port 1: rx pkts=10, bytes=600, drop=?, errs=?, frame=?, over=?, crc=?
6368 tx pkts=5, bytes=300, drop=?, errs=?, coll=?
6374 AT_SETUP([ofproto-dpif - patch ports - stack])
6375 OVS_VSWITCHD_START([add-br br1 \
6376 -- set bridge br1 datapath-type=dummy fail-mode=secure \
6377 -- add-port br1 pbr1 -- set int pbr1 type=patch options:peer=pbr0 \
6378 -- add-port br0 pbr0 -- set int pbr0 type=patch options:peer=pbr1])
6383 AT_CHECK([ovs-appctl upcall/disable-ufid], [0], [Datapath dumping tersely using UFID disabled
6385 AT_CHECK([ovs-appctl time/stop])
6386 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
6388 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"])
6389 # Try to pop from empty stack, and push and leave data to stack.
6390 AT_CHECK([ovs-ofctl add-flow br1 "ip actions=pop:OXM_OF_IPV4_DST[[0..31]],push:NXM_NX_REG1[[0..31]],LOCAL"])
6392 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)'
6394 AT_CHECK([ovs-appctl time/warp 500], [0],
6398 OVS_WAIT_UNTIL([test `grep flow_add ovs-vswitchd.log | wc -l` -ge 1])
6400 AT_CHECK([ovs-appctl dpif/show], [0], [dnl
6401 dummy@ovs-dummy: hit:0 missed:1
6403 br0 65534/100: (dummy)
6405 pbr0 1/none: (patch: peer=pbr1)
6407 br1 65534/101: (dummy)
6409 pbr1 1/none: (patch: peer=pbr0)
6412 AT_CHECK([strip_ufid < ovs-vswitchd.log | filter_flow_install | strip_used], [0], [dnl
6413 recirc_id(0),in_port(100),eth_type(0x0800),ipv4(src=192.168.0.1,frag=no), actions:101,set(ipv4(src=255.255.255.254)),2
6416 AT_CHECK([grep -e '|nx_match|WARN|' ovs-vswitchd.log | sed "s/^.*|WARN|//"], [0], [dnl
6417 Failed to pop from an empty stack. On flow
6420 OVS_VSWITCHD_STOP(["/Failed to pop from an empty stack/d"])
6423 AT_SETUP([ofproto-dpif - port duration])
6424 OVS_VSWITCHD_START([set Bridge br0 protocols=OpenFlow13])
6425 add_of_ports br0 1 2
6427 ovs-appctl time/stop
6428 ovs-appctl time/warp 10000
6430 AT_CHECK([ovs-ofctl -O openflow13 dump-ports br0], [0], [stdout])
6431 AT_CHECK([sed -n 's/=[[0-9]][[0-9]]\(\.[[0-9]][[0-9]]*\)\{0,1\}s/=?s/p' stdout], [0],
6440 dnl ----------------------------------------------------------------------
6441 AT_BANNER([ofproto-dpif -- megaflows])
6443 AT_SETUP([ofproto-dpif megaflow - port classification])
6445 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
6446 add_of_ports br0 1 2
6447 AT_DATA([flows.txt], [dnl
6448 table=0 in_port=1 actions=output(2)
6450 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
6451 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)'])
6453 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)'])
6455 AT_CHECK([filter_flow_install < ovs-vswitchd.log | strip_xout], [0], [dnl
6456 recirc_id(0),in_port(1),eth_type(0x0800),ipv4(frag=no), actions: <del>
6461 AT_SETUP([ofproto-dpif megaflow - L2 classification])
6463 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
6464 add_of_ports br0 1 2
6465 AT_DATA([flows.txt], [dnl
6466 table=0 in_port=1,dl_src=50:54:00:00:00:09 actions=output(2)
6468 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
6469 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)'])
6470 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)'])
6472 AT_CHECK([filter_flow_install < ovs-vswitchd.log | strip_xout], [0], [dnl
6473 recirc_id(0),in_port(1),eth(src=50:54:00:00:00:09),eth_type(0x0800),ipv4(frag=no), actions: <del>
6474 recirc_id(0),in_port(1),eth(src=50:54:00:00:00:0b),eth_type(0x0800),ipv4(frag=no), actions: <del>
6479 AT_SETUP([ofproto-dpif megaflow - L3 classification])
6481 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
6482 add_of_ports br0 1 2
6483 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], [])
6484 AT_DATA([flows.txt], [dnl
6485 table=0 in_port=1,icmp,nw_src=10.0.0.4 actions=output(2)
6487 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
6488 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)'])
6489 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)'])
6491 AT_CHECK([filter_flow_install < ovs-vswitchd.log | strip_xout], [0], [dnl
6492 recirc_id(0),in_port(1),eth_type(0x0800),ipv4(src=10.0.0.2/255.255.255.252,frag=no), actions: <del>
6493 recirc_id(0),in_port(1),eth_type(0x0800),ipv4(src=10.0.0.4,proto=1,frag=no), actions: <del>
6498 AT_SETUP([ofproto-dpif megaflow - IPv6 classification])
6500 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
6501 add_of_ports br0 1 2
6502 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], [])
6503 AT_DATA([flows.txt], [dnl
6504 table=0 in_port=1,ipv6,ipv6_src=2001:db8:3c4d:1:2:3:4:5 actions=output(2)
6506 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
6507 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)'])
6508 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)'])
6510 AT_CHECK([filter_flow_install < ovs-vswitchd.log | strip_xout], [0], [dnl
6511 recirc_id(0),in_port(1),eth_type(0x86dd),ipv6(src=2001:db8:3c4d:1:2:3:4:5,frag=no), actions: <del>
6512 recirc_id(0),in_port(1),eth_type(0x86dd),ipv6(src=2001:db8:3c4d:5:4:3:2:1/ffff:ffff:ffff:fffc::,frag=no), actions: <del>
6517 AT_SETUP([ofproto-dpif megaflow - L4 classification])
6519 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
6520 add_of_ports br0 1 2
6521 AT_DATA([flows.txt], [dnl
6522 table=0 in_port=1,icmp,icmp_type=8 actions=output(2)
6524 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
6525 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)'])
6527 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)'])
6529 AT_CHECK([filter_flow_install < ovs-vswitchd.log | strip_xout], [0], [dnl
6530 recirc_id(0),in_port(1),eth_type(0x0800),ipv4(proto=1,frag=no),icmp(type=8), actions: <del>
6535 m4_define([OFPROTO_DPIF_MEGAFLOW_NORMAL],
6536 [AT_SETUP([ofproto-dpif megaflow - normal$1])
6537 OVS_VSWITCHD_START([], [], [], [m4_if([$1], [], [], [--dummy-numa="0,0,0,0,1,1,1,1"])])
6538 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
6539 func=`echo -n "$1_" | cut -c 4-`
6540 add_${func}of_ports br0 1 2
6541 AT_CHECK([ovs-ofctl add-flow br0 action=normal])
6542 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)'])
6543 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)'])
6545 AT_CHECK([filter_flow_install < ovs-vswitchd.log | strip_xout], [0], [dnl
6546 recirc_id(0),in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(frag=no), actions: <del>
6547 recirc_id(0),in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(frag=no), actions: <del>
6552 OFPROTO_DPIF_MEGAFLOW_NORMAL([])
6553 OFPROTO_DPIF_MEGAFLOW_NORMAL([ - pmd])
6555 AT_SETUP([ofproto-dpif megaflow - mpls])
6557 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
6558 add_of_ports br0 1 2
6559 AT_DATA([flows.txt], [dnl
6560 table=0 dl_src=50:54:00:00:00:09 actions=push_mpls:0x8847,2
6561 table=0 dl_src=50:54:00:00:00:0b actions=pop_mpls:0x0800,2
6563 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
6564 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)'])
6565 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)'])
6567 AT_CHECK([filter_flow_install < ovs-vswitchd.log | strip_xout_keep_actions], [0], [dnl
6568 recirc_id(0),in_port(1),eth(src=50:54:00:00:00:09),eth_type(0x8847),mpls(label=11,tc=3,ttl=64,bos=1), actions:push_mpls(label=11,tc=3,ttl=64,bos=0,eth_type=0x8847),2
6569 recirc_id(0),in_port(1),eth(src=50:54:00:00:00:0b),eth_type(0x8847),mpls(label=11/0x0,tc=3/0,ttl=64/0x0,bos=1/1), actions:pop_mpls(eth_type=0x800),2
6574 # CHECK_MEGAFLOW_NETFLOW(LOOPBACK_ADDR)
6575 m4_define([CHECK_MEGAFLOW_NETFLOW],
6577 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
6578 add_of_ports br0 1 2
6580 dnl NetFlow configuration disables wildcarding relevant fields
6581 on_exit 'kill `cat test-netflow.pid`'
6582 AT_CHECK([ovstest test-netflow --log-file --detach --no-chdir --pidfile 0:$1 > netflow.log], [0], [], [ignore])
6583 AT_CAPTURE_FILE([netflow.log])
6584 PARSE_LISTENING_PORT([test-netflow.log], [NETFLOW_PORT])
6586 set Bridge br0 netflow=@nf -- \
6587 --id=@nf create NetFlow targets=\"$1:$NETFLOW_PORT\" \
6588 engine_id=1 engine_type=2 active_timeout=30 add-id-to-interface=false
6590 AT_CHECK([ovs-ofctl add-flow br0 action=normal])
6591 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)'])
6592 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)'])
6594 AT_CHECK([filter_flow_install < ovs-vswitchd.log | strip_xout], [0], [dnl
6595 recirc_id(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/0xfc,frag=no),icmp(type=8,code=0), actions: <del>
6596 recirc_id(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/0xfc,frag=no),icmp(type=8,code=0), actions: <del>
6598 OVS_APP_EXIT_AND_WAIT([test-netflow])
6601 AT_SETUP([ofproto-dpif megaflow - netflow - IPv4 collector])
6602 CHECK_MEGAFLOW_NETFLOW([127.0.0.1], [IPv4])
6605 AT_SETUP([ofproto-dpif megaflow - netflow - IPv6 collector])
6606 AT_SKIP_IF([test $HAVE_IPV6 = no])
6607 CHECK_MEGAFLOW_NETFLOW([[[::1]]], [IPv6])
6610 m4_define([OFPROTO_DPIF_MEGAFLOW_NORMAL_ACB_BOND],
6611 [AT_SETUP([ofproto-dpif megaflow - normal, active-backup bonding - $1])
6613 [add-port br0 p1 -- set Interface p1 type=$1 ofport_request=1 -- \
6614 add-bond br0 bond0 p2 p3 bond_mode=active-backup -- \
6615 set interface p2 type=$1 ofport_request=2 -- \
6616 set interface p3 type=$1 ofport_request=3], [], [],
6617 [m4_if([$1], [dummy-pmd], [--dummy-numa="0,0,0,0,1,1,1,1"], [])])
6618 AT_CHECK([ovs-appctl netdev-dummy/set-admin-state up], 0, [OK
6620 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
6622 AT_CHECK([ovs-ofctl add-flow br0 action=normal])
6623 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)'])
6624 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)'])
6626 AT_CHECK([filter_flow_install < ovs-vswitchd.log | strip_xout], [0], [dnl
6627 recirc_id(0),in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(frag=no), actions: <del>
6628 recirc_id(0),in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(frag=no), actions: <del>
6633 OFPROTO_DPIF_MEGAFLOW_NORMAL_ACB_BOND([dummy])
6634 OFPROTO_DPIF_MEGAFLOW_NORMAL_ACB_BOND([dummy-pmd])
6636 AT_SETUP([ofproto-dpif megaflow - normal, balance-slb bonding])
6638 [add-port br0 p1 -- set Interface p1 type=dummy ofport_request=1 -- \
6639 add-bond br0 bond0 p2 p3 bond_mode=balance-slb -- \
6640 set interface p2 type=dummy ofport_request=2 -- \
6641 set interface p3 type=dummy ofport_request=3])
6642 AT_CHECK([ovs-appctl netdev-dummy/set-admin-state up], 0, [OK
6644 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
6646 AT_CHECK([ovs-ofctl add-flow br0 action=normal])
6647 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)'])
6648 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)'])
6650 AT_CHECK([filter_flow_install < ovs-vswitchd.log | strip_xout], [0], [dnl
6651 recirc_id(0),in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(frag=no), actions: <del>
6652 recirc_id(0),in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(frag=no), actions: <del>
6657 AT_SETUP([ofproto-dpif megaflow - normal, balance-tcp bonding])
6658 # Create bond0 on br0 with interfaces p0 and p1
6659 # and bond1 on br1 with interfaces p2 and p3
6660 # with p0 patched to p2 and p1 patched to p3.
6662 [add-bond br0 bond0 p0 p1 bond_mode=balance-tcp lacp=active \
6663 other-config:lacp-time=fast \
6664 other-config:bond-rebalance-interval=0 -- \
6665 set interface p0 type=patch options:peer=p2 ofport_request=1 -- \
6666 set interface p1 type=patch options:peer=p3 ofport_request=2 -- \
6668 set bridge br1 other-config:hwaddr=aa:66:aa:66:00:00 -- \
6669 set bridge br1 datapath-type=dummy other-config:datapath-id=1234 \
6670 fail-mode=secure -- \
6671 add-bond br1 bond1 p2 p3 bond_mode=balance-tcp lacp=active \
6672 other-config:lacp-time=fast \
6673 other-config:bond-rebalance-interval=0 -- \
6674 set interface p2 type=patch options:peer=p0 ofport_request=3 -- \
6675 set interface p3 type=patch options:peer=p1 ofport_request=4 --])
6677 AT_CHECK([ovs-appctl netdev-dummy/set-admin-state up], 0, [OK
6679 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
6681 AT_CHECK([ovs-ofctl add-flow br0 action=normal])
6682 AT_CHECK([ovs-ofctl add-flow br1 action=normal])
6683 ovs-appctl time/stop
6684 ovs-appctl time/warp 5000
6685 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)'])
6686 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)'])
6688 AT_CHECK([filter_flow_install < ovs-vswitchd.log | strip_xout], [0], [dnl
6689 recirc_id(0),in_port(7),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(frag=no), actions: <del>
6690 recirc_id(0),in_port(7),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(frag=no), actions: <del>
6695 AT_SETUP([ofproto-dpif megaflow - resubmit port action])
6697 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
6698 add_of_ports br0 1 2
6699 AT_DATA([flows.txt], [dnl
6700 table=0 in_port=1,ip actions=resubmit(90)
6701 table=0 in_port=90,dl_src=50:54:00:00:00:09 actions=output(2)
6703 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
6704 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)'])
6705 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)'])
6707 AT_CHECK([filter_flow_install < ovs-vswitchd.log | strip_xout], [0], [dnl
6708 recirc_id(0),in_port(1),eth(src=50:54:00:00:00:09),eth_type(0x0800),ipv4(frag=no), actions: <del>
6709 recirc_id(0),in_port(1),eth(src=50:54:00:00:00:0b),eth_type(0x0800),ipv4(frag=no), actions: <del>
6714 AT_SETUP([ofproto-dpif megaflow - resubmit table action])
6716 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
6717 add_of_ports br0 1 2
6718 AT_DATA([flows.txt], [dnl
6719 table=0 in_port=1,ip actions=resubmit(,1)
6720 table=1 dl_src=50:54:00:00:00:09 actions=output(2)
6722 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
6723 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)'])
6724 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=
6725 1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
6727 AT_CHECK([filter_flow_install < ovs-vswitchd.log | strip_xout], [0], [dnl
6728 recirc_id(0),in_port(1),eth(src=50:54:00:00:00:09),eth_type(0x0800),ipv4(frag=no), actions: <del>
6729 recirc_id(0),in_port(1),eth(src=50:54:00:00:00:0b),eth_type(0x0800),ipv4(frag=no), actions: <del>
6734 AT_SETUP([ofproto-dpif megaflow - goto_table action])
6736 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
6737 add_of_ports br0 1 2
6738 AT_DATA([flows.txt], [dnl
6739 table=0 in_port=1,ip actions=goto_table(1)
6740 table=1 dl_src=50:54:00:00:00:09 actions=output(2)
6742 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flows br0 flows.txt])
6743 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)'])
6744 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)'])
6746 AT_CHECK([filter_flow_install < ovs-vswitchd.log | strip_xout], [0], [dnl
6747 recirc_id(0),in_port(1),eth(src=50:54:00:00:00:09),eth_type(0x0800),ipv4(frag=no), actions: <del>
6748 recirc_id(0),in_port(1),eth(src=50:54:00:00:00:0b),eth_type(0x0800),ipv4(frag=no), actions: <del>
6753 AT_SETUP([ofproto-dpif megaflow - mirroring, select_all])
6754 AT_KEYWORDS([mirror mirrors mirroring])
6756 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
6757 add_of_ports br0 1 2 3
6759 set Bridge br0 mirrors=@m --\
6760 --id=@p3 get Port p3 --\
6761 --id=@m create Mirror name=mymirror select_all=true output_port=@p3
6763 AT_DATA([flows.txt], [dnl
6764 in_port=1 actions=output:2
6766 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
6767 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)'])
6769 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)'])
6771 AT_CHECK([filter_flow_install < ovs-vswitchd.log | strip_xout], [0], [dnl
6772 recirc_id(0),in_port(1),eth_type(0x0800),ipv4(frag=no), actions: <del>
6777 AT_SETUP([ofproto-dpif megaflow - mirroring, select_vlan])
6779 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
6780 add_of_ports br0 1 2 3
6782 set Bridge br0 mirrors=@m --\
6783 --id=@p2 get Port p2 -- --id=@p3 get Port p3 --\
6784 --id=@m create Mirror name=mymirror select_all=true select_vlan=11 output_port=@p3
6786 AT_DATA([flows.txt], [dnl
6787 in_port=1 actions=output:2
6789 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
6790 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))'])
6791 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)'])
6793 AT_CHECK([filter_flow_install < ovs-vswitchd.log | strip_xout], [0], [dnl
6794 recirc_id(0),in_port(1),eth_type(0x0800),ipv4(frag=no), actions: <del>
6795 recirc_id(0),in_port(1),eth_type(0x8100),vlan(vid=11,pcp=7/0x0),encap(eth_type(0x0800),ipv4(frag=no)), actions: <del>
6800 AT_SETUP([ofproto-dpif megaflow - move action])
6802 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
6803 add_of_ports br0 1 2
6804 AT_DATA([flows.txt], [dnl
6805 table=0 in_port=1 ip,actions=move:NXM_OF_IP_SRC[[]]->NXM_NX_REG0[[]],resubmit(90)
6806 table=0 in_port=90 ip,actions=move:NXM_NX_REG0[[]]->NXM_NX_REG1[[]],resubmit(91)
6807 table=0 in_port=91 reg0=0x0a000002,actions=output(2)
6809 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
6810 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)'])
6811 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)'])
6813 AT_CHECK([filter_flow_install < ovs-vswitchd.log | strip_xout], [0], [dnl
6814 recirc_id(0),in_port(1),eth_type(0x0800),ipv4(src=10.0.0.2,frag=no), actions: <del>
6815 recirc_id(0),in_port(1),eth_type(0x0800),ipv4(src=10.0.0.4,frag=no), actions: <del>
6820 AT_SETUP([ofproto-dpif megaflow - push action])
6822 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
6823 add_of_ports br0 1 2
6824 AT_DATA([flows.txt], [dnl
6825 table=0 in_port=1 ip,actions=push:NXM_OF_IP_SRC[[]],output(2)
6827 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
6828 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)'])
6829 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)'])
6831 AT_CHECK([filter_flow_install < ovs-vswitchd.log | strip_xout], [0], [dnl
6832 recirc_id(0),in_port(1),eth_type(0x0800),ipv4(src=10.0.0.2,frag=no), actions: <del>
6833 recirc_id(0),in_port(1),eth_type(0x0800),ipv4(src=10.0.0.4,frag=no), actions: <del>
6838 AT_SETUP([ofproto-dpif megaflow - learning])
6840 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
6841 add_of_ports br0 1 2
6842 AT_DATA([flows.txt], [dnl
6843 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
6845 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
6846 ovs-appctl time/stop
6847 # We send each packet twice because the first packet in each flow causes the
6848 # flow table to change and thus revalidations, which (depending on timing)
6849 # can keep a megaflow from being installed. The revalidations are done by
6850 # the second iteration, allowing the flows to be installed.
6852 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)'])
6853 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)'])
6854 ovs-appctl time/warp 100
6857 dnl The original flow is missing due to a revalidation.
6858 AT_CHECK([filter_flow_install < ovs-vswitchd.log | strip_xout], [0], [dnl
6859 recirc_id(0),in_port(1),eth(src=50:54:00:00:00:09),eth_type(0x0800),ipv4(frag=no), actions: <del>
6860 recirc_id(0),in_port(1),eth(src=50:54:00:00:00:0b),eth_type(0x0800),ipv4(frag=no), actions: <del>
6865 AT_SETUP([ofproto-dpif megaflow - tunnels])
6867 [add-port br0 p1 -- set Interface p1 type=dummy ofport_request=1])
6868 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
6869 AT_CHECK([ovs-vsctl add-port br0 p2 -- set Interface p2 type=gre \
6870 options:remote_ip=1.1.1.1 ofport_request=2 options:key=flow])
6871 AT_CHECK([ovs-vsctl add-port br0 p3 -- set Interface p3 type=dummy \
6873 AT_CHECK([ovs-vsctl add-port br0 p4 -- set Interface p4 type=gre \
6874 options:remote_ip=1.1.1.2 options:tos=inherit options:ttl=inherit \
6875 ofport_request=4 options:key=flow])
6876 AT_DATA([flows.txt], [dnl
6877 in_port=1,actions=output(2)
6878 in_port=3,actions=output(4)
6880 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
6881 dnl ECN bits are always copied out, but don't use 0x3 (CE), since that
6882 dnl will cause the packet to be dropped.
6883 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)'])
6885 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)'])
6886 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)'])
6888 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)'])
6890 AT_CHECK([filter_flow_install < ovs-vswitchd.log | strip_xout], [0], [dnl
6891 recirc_id(0),in_port(1),eth_type(0x0800),ipv4(tos=0xfd/0x3,frag=no), actions: <del>
6892 recirc_id(0),in_port(3),eth_type(0x0800),ipv4(tos=0x1,ttl=64,frag=no), actions: <del>
6893 recirc_id(0),in_port(3),eth_type(0x0800),ipv4(tos=0xfd,ttl=128,frag=no), actions: <del>
6898 AT_SETUP([ofproto-dpif megaflow - dec_ttl])
6900 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
6901 add_of_ports br0 1 2
6902 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], [])
6903 AT_DATA([flows.txt], [dnl
6904 table=0 in_port=1,icmp,nw_src=10.0.0.4 actions=dec_ttl,output(2)
6906 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
6907 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)'])
6908 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)'])
6910 AT_CHECK([filter_flow_install < ovs-vswitchd.log | strip_xout], [0], [dnl
6911 recirc_id(0),in_port(1),eth_type(0x0800),ipv4(src=10.0.0.2/255.255.255.252,frag=no), actions: <del>
6912 recirc_id(0),in_port(1),eth_type(0x0800),ipv4(src=10.0.0.4,proto=1,ttl=64,frag=no), actions: <del>
6917 AT_SETUP([ofproto-dpif megaflow - set dl_dst])
6919 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
6920 add_of_ports br0 1 2
6921 AT_DATA([flows.txt], [dnl
6922 table=0 in_port=1 actions=mod_dl_dst(50:54:00:00:00:0a),output(2)
6924 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
6925 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)'])
6926 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)'])
6928 dnl The first packet is essentially a no-op, as the new destination MAC is the
6929 dnl same as the original. The second entry actually updates the destination
6931 AT_CHECK([strip_ufid < ovs-vswitchd.log | filter_flow_install | strip_used], [0], [dnl
6932 recirc_id(0),in_port(1),eth(dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(frag=no), actions:2
6933 recirc_id(0),in_port(1),eth(dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(frag=no), actions:set(eth(dst=50:54:00:00:00:0a)),2
6938 m4_define([OFPROTO_DPIF_MEGAFLOW_DISABLED],
6939 [AT_SETUP([ofproto-dpif megaflow - disabled$1])
6940 OVS_VSWITCHD_START([], [], [], [m4_if([$1], [], [], [--dummy-numa="0,0,0,0,1,1,1,1"])])
6941 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
6942 func=`echo -n "$1_" | cut -c 4-`
6943 add_${func}of_ports br0 1 2
6944 AT_DATA([flows.txt], [dnl
6945 table=0 in_port=1,ip,nw_dst=10.0.0.1 actions=output(2)
6946 table=0 in_port=1,ip,nw_dst=10.0.0.3 actions=drop
6948 AT_CHECK([ovs-appctl upcall/disable-megaflows], [0], [megaflows disabled
6950 AT_CHECK([ovs-appctl upcall/disable-ufid], [0], [Datapath dumping tersely using UFID disabled
6952 AT_CHECK([ovs-appctl vlog/set dpif_netdev:dbg], [0], [], [])
6953 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
6954 for i in 1 2 3 4; do
6955 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)'])
6956 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)'])
6957 if [[ $i -eq 1 ]]; then
6962 AT_CHECK([strip_ufid < ovs-vswitchd.log | filter_flow_install | strip_used], [0], [dnl
6963 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), actions:2
6964 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), actions:drop
6966 AT_CHECK([strip_ufid < ovs-vswitchd.log | filter_flow_dump | grep 'packets:3'], [0], [dnl
6967 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
6968 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
6973 OFPROTO_DPIF_MEGAFLOW_DISABLED([])
6974 OFPROTO_DPIF_MEGAFLOW_DISABLED([ - pmd])
6976 AT_SETUP([ofproto-dpif - datapath port number change])
6977 OVS_VSWITCHD_START([set Bridge br0 fail-mode=standalone])
6980 # Trace a flow that should output to p1.
6981 AT_CHECK([ovs-appctl ofproto/trace br0 in_port=LOCAL,dl_src=10:20:30:40:50:60],
6983 AT_CHECK([tail -1 stdout], [0], [Datapath actions: 1
6986 # Change p1's port number to 5.
6987 AT_CHECK([ovs-appctl dpif-dummy/change-port-number ovs-dummy p1 5])
6989 # Trace a flow that should output to p1 in its new location.
6990 AT_CHECK([ovs-appctl ofproto/trace br0 in_port=LOCAL,dl_src=10:20:30:40:50:60],
6992 AT_CHECK([tail -1 stdout], [0], [Datapath actions: 5
6997 # Tests the bundling with various bfd and cfm configurations.
6998 AT_SETUP([ofproto - bundle with variable bfd/cfm config])
6999 OVS_VSWITCHD_START([add-br br1 -- set bridge br1 datapath-type=dummy -- \
7000 add-bond br0 br0bond p0 p2 bond-mode=active-backup -- \
7001 add-bond br1 br1bond p1 p3 bond-mode=active-backup -- \
7002 set Interface p1 type=patch options:peer=p0 ofport_request=2 -- \
7003 set Interface p3 type=patch options:peer=p2 ofport_request=4 -- \
7004 set Interface p0 type=patch options:peer=p1 ofport_request=1 -- \
7005 set Interface p2 type=patch options:peer=p3 ofport_request=3 -- \
7006 set Interface p0 bfd:enable=true bfd:min_tx=300 bfd:min_rx=300 -- \
7007 set Interface p0 cfm_mpid=1 -- \
7008 set Interface p1 bfd:enable=true bfd:min_tx=500 bfd:min_rx=500])
7010 ovs-appctl time/stop
7011 # advance the clock to stablize everything.
7012 ovs-appctl time/warp 5000 100
7013 # cfm/show should show 'recv' fault.
7014 AT_CHECK([ovs-appctl cfm/show | sed -n '/^.*fault:.*/p'], [0], [dnl
7017 # bfd/show should show 'up'.
7018 AT_CHECK([ovs-appctl bfd/show | sed -n '/^.*Session State:.*/p'], [0], [dnl
7019 Local Session State: up
7020 Remote Session State: up
7021 Local Session State: up
7022 Remote Session State: up
7024 # bond/show should show 'may-enable: true' for all slaves.
7025 AT_CHECK([ovs-appctl bond/show | sed -n '/^.*may_enable:.*/p'], [0], [dnl
7032 # now disable the bfd on p1.
7033 AT_CHECK([ovs-vsctl set Interface p1 bfd:enable=false])
7034 # advance the clock to stablize everything.
7035 ovs-appctl time/warp 5000 100
7036 # cfm/show should show 'recv' fault.
7037 AT_CHECK([ovs-appctl cfm/show | sed -n '/^.*fault:.*/p'], [0], [dnl
7040 # bfd/show should show 'down'.
7041 AT_CHECK([ovs-appctl bfd/show | sed -n '/^.*Session State:.*/p'], [0], [dnl
7042 Local Session State: down
7043 Remote Session State: down
7045 # bond/show should show 'may-enable: false' for p0.
7046 AT_CHECK([ovs-appctl bond/show br0bond | sed -n '/^.*may_enable:.*/p'], [0], [dnl
7051 # now enable the bfd on p1 and disable bfd on p0.
7052 AT_CHECK([ovs-vsctl set Interface p1 bfd:enable=true])
7053 AT_CHECK([ovs-vsctl set Interface p0 bfd:enable=false])
7054 # advance the clock to stablize everything.
7055 ovs-appctl time/warp 5000 100
7056 # cfm/show should show 'recv' fault.
7057 AT_CHECK([ovs-appctl cfm/show | sed -n '/^.*fault:.*/p'], [0], [dnl
7060 # bfd/show should show 'down'.
7061 AT_CHECK([ovs-appctl bfd/show | sed -n '/^.*Session State:.*/p'], [0], [dnl
7062 Local Session State: down
7063 Remote Session State: down
7065 # bond/show should show 'may-enable: false' for p0 and p1.
7066 AT_CHECK([ovs-appctl bond/show | sed -n '/^.*may_enable:.*/p'], [0], [dnl
7076 AT_SETUP([ofproto-dpif - ofproto-dpif-monitor 1])
7077 OVS_VSWITCHD_START([add-port br0 p0 -- set interface p0 type=gre options:remote_ip=1.2.3.4])
7080 AT_CHECK([ovs-vsctl set interface p0 bfd:enable=true])
7082 OVS_WAIT_UNTIL([grep "monitor thread created" ovs-vswitchd.log])
7083 # disable bfd on p0.
7084 AT_CHECK([ovs-vsctl set interface p0 bfd:enable=false])
7086 OVS_WAIT_UNTIL([grep "monitor thread terminated" ovs-vswitchd.log])
7087 AT_CHECK([sed -e '/^.*ofproto_dpif_monitor.*$/d' < ovs-vswitchd.log > tmp && ovs-appctl vlog/close && mv tmp ovs-vswitchd.log && ovs-appctl vlog/reopen])
7090 AT_CHECK([ovs-vsctl set interface p0 cfm_mpid=10])
7092 OVS_WAIT_UNTIL([grep "monitor thread created" ovs-vswitchd.log])
7093 # disable cfm on p0.
7094 AT_CHECK([ovs-vsctl remove interface p0 cfm_mpid 10])
7096 OVS_WAIT_UNTIL([grep "monitor thread terminated" ovs-vswitchd.log])
7097 AT_CHECK([sed -e '/^.*ofproto_dpif_monitor.*$/d' < ovs-vswitchd.log > tmp && ovs-appctl vlog/close && mv tmp ovs-vswitchd.log && ovs-appctl vlog/reopen])
7099 # enable both bfd and cfm on p0.
7100 AT_CHECK([ovs-vsctl set interface p0 bfd:enable=true cfm_mpid=10])
7102 OVS_WAIT_UNTIL([grep "monitor thread created" ovs-vswitchd.log])
7103 # disable bfd on p0.
7104 AT_CHECK([ovs-vsctl set interface p0 bfd:enable=false])
7105 # check log, there should not be the log of thread terminated.
7106 AT_CHECK([sed -n "s/^.*|ofproto_dpif_monitor(monitor[[0-9]]*)|INFO|\(.* terminated\)$/\1/p" ovs-vswitchd.log], [0], [dnl
7108 # reenable bfd on p0.
7109 AT_CHECK([ovs-vsctl set interface p0 bfd:enable=true])
7110 # check log, should still be on log of thread created.
7111 AT_CHECK([sed -n "s/^.*|ofproto_dpif_monitor(monitor[[0-9]]*)|INFO|\(.* created\)$/\1/p" ovs-vswitchd.log], [0], [dnl
7112 monitor thread created
7114 # disable bfd and cfm together.
7115 AT_CHECK([ovs-vsctl set interface p0 bfd:enable=false -- remove interface p0 cfm_mpid 10])
7117 OVS_WAIT_UNTIL([grep "monitor thread terminated" ovs-vswitchd.log])
7122 # this test helps avoid the deadlock between the main thread and monitor thread.
7123 AT_SETUP([ofproto-dpif - ofproto-dpif-monitor 2])
7126 for i in `seq 1 199`
7128 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])
7134 AT_BANNER([ofproto-dpif - flow translation resource limits])
7136 dnl Resubmits to later tables do not count against the depth limit, so we
7137 dnl can do 99 of them even though the maximum depth is 64.
7138 AT_SETUP([ofproto-dpif - forward resubmit])
7140 (for i in `seq 0 99`; do
7142 echo "table=$i, actions=resubmit(,$j)"
7144 echo "table=100, actions=local") > flows
7145 AT_CHECK([ovs-ofctl add-flows br0 flows])
7146 AT_CHECK([ovs-appctl -vpoll_loop:off ofproto/trace br0 'eth_dst=ff:ff:ff:ff:ff:ff'],
7148 AT_CHECK([tail -1 stdout], [0], [Datapath actions: 100
7153 dnl Resubmits to the same or an earlier table count against the depth limit,
7154 dnl so only 64 of them are allowed.
7155 AT_SETUP([ofproto-dpif - backward resubmit])
7157 (echo "table=0, actions=resubmit(,66)"
7158 for i in `seq 2 66`; do
7160 echo "table=$i, actions=resubmit(,$j)"
7162 echo "table=1, actions=local") > flows
7163 AT_CHECK([ovs-ofctl add-flows br0 flows])
7164 AT_CHECK([ovs-appctl -vpoll_loop:off ofproto/trace br0 'eth_dst=ff:ff:ff:ff:ff:ff'],
7166 AT_CHECK([tail -1 stdout], [0],
7167 [Translation failed (Recursion too deep), packet is dropped.
7169 AT_CHECK([grep -c 'over max translation depth 64' stdout],
7172 OVS_VSWITCHD_STOP(["/resubmit actions recursed/d"])
7175 AT_SETUP([ofproto-dpif - infinite resubmit])
7177 AT_CHECK([ovs-ofctl add-flow br0 actions=resubmit:1,resubmit:2,output:3])
7178 AT_CHECK([ovs-appctl -vpoll_loop:off ofproto/trace br0 'eth_dst=ff:ff:ff:ff:ff:ff'],
7180 AT_CHECK([tail -1 stdout], [0],
7181 [Translation failed (Recursion too deep), packet is dropped.
7183 AT_CHECK([grep -c 'over max translation depth 64' stdout],
7186 OVS_VSWITCHD_STOP(["/resubmit actions recursed/d"])
7189 AT_SETUP([ofproto-dpif - exponential resubmit chain])
7192 (for i in `seq 1 64`; do
7194 echo "in_port=$i, actions=resubmit:$j, resubmit:$j, local"
7196 echo "in_port=65, actions=local") > flows
7197 AT_CHECK([ovs-ofctl add-flows br0 flows])
7198 AT_CHECK([ovs-appctl -vpoll_loop:off ofproto/trace br0 'in_port=1'], [0], [stdout])
7199 AT_CHECK([tail -1 stdout], [0],
7200 [Translation failed (Too many resubmits), packet is dropped.
7202 AT_CHECK([grep -c 'over 4096 resubmit actions' stdout], [0], [1
7204 OVS_VSWITCHD_STOP(["/over.*resubmit actions/d"])
7207 AT_SETUP([ofproto-dpif - too many output actions])
7210 (for i in `seq 1 12`; do
7212 echo "in_port=$i, actions=resubmit:$j, resubmit:$j, local"
7214 echo "in_port=13, actions=local,local,local,local,local,local,local,local") > flows
7215 AT_CHECK([ovs-ofctl add-flows br0 flows])
7216 AT_CHECK([ovs-appctl -vpoll_loop:off ofproto/trace br0 'in_port=1'], [0], [stdout])
7217 AT_CHECK([grep -c -e '- Uses action(s) not supported by datapath' stdout],
7220 AT_CHECK([grep -c 'resubmits yielded over 64 kB of actions' stdout], [0], [1
7222 OVS_VSWITCHD_STOP(["/resubmits yielded over 64 kB of actions/d"])
7225 AT_SETUP([ofproto-dpif - stack too deep])
7228 (for i in `seq 1 12`; do
7230 echo "in_port=$i, actions=resubmit:$j, resubmit:$j, local"
7232 push="push:NXM_NX_REG0[[]]"
7233 echo "in_port=13, actions=$push,$push,$push,$push,$push,$push,$push,$push") > flows
7234 AT_CHECK([ovs-ofctl add-flows br0 flows])
7235 AT_CHECK([ovs-appctl -vpoll_loop:off ofproto/trace br0 'in_port=1'], [0], [stdout])
7236 AT_CHECK([tail -1 stdout], [0],
7237 [Translation failed (Stack too deep), packet is dropped.
7239 AT_CHECK([grep -c 'resubmits yielded over 64 kB of stack' stdout], [0], [1
7241 OVS_VSWITCHD_STOP(["/resubmits yielded over 64 kB of stack/d"])
7245 AT_SETUP([ofproto-dpif packet-out controller])
7247 add_of_ports br0 1 2
7249 AT_CHECK([ovs-ofctl add-flow br0 'dl_dst=50:54:00:00:00:0a actions=controller'])
7251 AT_CAPTURE_FILE([ofctl_monitor.log])
7252 AT_CHECK([ovs-ofctl monitor br0 65534 invalid_ttl -P nxt_packet_in --detach --no-chdir --pidfile 2> ofctl_monitor.log])
7255 AT_CHECK([ovs-ofctl -O OpenFlow13 packet-out br0 CONTROLLER controller '50540000000a5054000000091234'])
7258 OVS_APP_EXIT_AND_WAIT([ovs-ofctl])
7259 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
7260 NXT_PACKET_IN (xid=0x0): total_len=14 in_port=CONTROLLER (via action) data_len=14 (unbuffered)
7261 vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,dl_type=0x1234
7263 NXT_PACKET_IN (xid=0x0): total_len=14 in_port=CONTROLLER (via action) data_len=14 (unbuffered)
7264 vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,dl_type=0x1234
7266 NXT_PACKET_IN (xid=0x0): total_len=14 in_port=CONTROLLER (via action) data_len=14 (unbuffered)
7267 vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,dl_type=0x1234
7270 AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
7271 dl_dst=50:54:00:00:00:0a actions=CONTROLLER:65535
7275 (echo "OFPST_TABLE reply (OF1.3) (xid=0x2):
7277 active=1, lookup=0, matched=0
7280 active=0, lookup=0, matched=0
7282 for i in `seq 2 253`; do
7283 printf ' table %d: ditto\n' $i
7285 AT_CHECK([ovs-ofctl -O OpenFlow13 dump-tables br0 ], [0], [expout])
7290 AT_SETUP([ofproto-dpif packet-out controller (patch port)])
7293 add-port br0 p1 -- \
7294 set interface p1 type=patch options:peer=p2 -- \
7296 set bridge br1 datapath-type=dummy -- \
7297 set bridge br1 fail-mode=secure -- \
7298 set bridge br1 protocols='[OpenFlow10,OpenFlow11,OpenFlow12,OpenFlow13]' -- \
7299 add-port br1 p2 -- \
7300 set interface p2 type=patch options:peer=p1 --])
7302 AT_CAPTURE_FILE([ofctl_monitor.log])
7303 AT_CHECK([ovs-ofctl monitor br1 65534 invalid_ttl -P nxt_packet_in --detach --no-chdir --pidfile 2> ofctl_monitor.log])
7306 AT_CHECK([ovs-ofctl -O OpenFlow13 packet-out br0 CONTROLLER output:1 '50540000000a5054000000091234'])
7309 OVS_APP_EXIT_AND_WAIT([ovs-ofctl])
7310 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
7311 NXT_PACKET_IN (xid=0x0): cookie=0x0 total_len=14 in_port=1 (via no_match) data_len=14 (unbuffered)
7312 vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,dl_type=0x1234
7314 NXT_PACKET_IN (xid=0x0): cookie=0x0 total_len=14 in_port=1 (via no_match) data_len=14 (unbuffered)
7315 vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,dl_type=0x1234
7317 NXT_PACKET_IN (xid=0x0): cookie=0x0 total_len=14 in_port=1 (via no_match) data_len=14 (unbuffered)
7318 vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,dl_type=0x1234
7321 (echo "OFPST_TABLE reply (OF1.3) (xid=0x2):
7323 active=0, lookup=0, matched=0
7325 for i in `seq 1 253`; do
7326 printf ' table %d: ditto\n' $i
7328 AT_CHECK([ovs-ofctl -O OpenFlow13 dump-tables br0 ], [0], [expout])
7330 (echo "OFPST_TABLE reply (OF1.3) (xid=0x2):
7332 active=0, lookup=3, matched=0
7335 active=0, lookup=0, matched=0
7337 for i in `seq 2 253`; do
7338 printf ' table %d: ditto\n' $i
7340 AT_CHECK([ovs-ofctl -O OpenFlow13 dump-tables br1 ], [0], [expout])
7346 AT_SETUP([ofproto-dpif packet-out goto_table])
7348 add_of_ports br0 1 2
7350 AT_DATA([flows.txt], [dnl
7351 table=0 dl_dst=50:54:00:00:00:0a actions=goto_table(1)
7352 table=1 dl_dst=50:54:00:00:00:0a actions=controller
7354 AT_CHECK([ovs-ofctl -O OpenFlow13 add-flows br0 flows.txt])
7356 AT_CAPTURE_FILE([ofctl_monitor.log])
7357 AT_CHECK([ovs-ofctl monitor br0 65534 invalid_ttl -P nxt_packet_in --detach --no-chdir --pidfile 2> ofctl_monitor.log])
7360 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)'
7363 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
7364 OVS_APP_EXIT_AND_WAIT([ovs-ofctl])
7365 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
7366 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
7367 vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,dl_type=0x1234
7369 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
7370 vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,dl_type=0x1234
7372 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
7373 vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,dl_type=0x1234
7376 AT_CHECK([ovs-appctl revalidator/purge], [0])
7377 AT_CHECK([ovs-ofctl -O OpenFlow13 dump-flows br0 | ofctl_strip | sort], [0], [dnl
7378 n_packets=3, n_bytes=180, dl_dst=50:54:00:00:00:0a actions=goto_table:1
7379 table=1, n_packets=3, n_bytes=180, dl_dst=50:54:00:00:00:0a actions=CONTROLLER:65535
7380 OFPST_FLOW reply (OF1.3):
7383 (echo "OFPST_TABLE reply (OF1.3) (xid=0x2):
7385 active=1, lookup=3, matched=3
7389 active=0, lookup=0, matched=0
7391 for i in `seq 3 253`; do
7392 printf ' table %d: ditto\n' $i
7394 AT_CHECK([ovs-ofctl -O OpenFlow13 dump-tables br0 ], [0], [expout])
7400 AT_SETUP([ofproto-dpif packet-out table-miss (continue)])
7402 add_of_ports br0 1 2
7404 AT_CHECK([ovs-ofctl -O OpenFlow11 add-flow br0 'table=1 dl_dst=50:54:00:00:00:0a actions=controller'])
7405 AT_CHECK([ovs-ofctl -O OpenFlow11 mod-table br0 all continue])
7407 AT_CAPTURE_FILE([ofctl_monitor.log])
7408 AT_CHECK([ovs-ofctl monitor br0 65534 invalid_ttl -P nxt_packet_in --detach --no-chdir --pidfile 2> ofctl_monitor.log])
7411 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)'
7414 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
7415 OVS_APP_EXIT_AND_WAIT([ovs-ofctl])
7416 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
7417 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
7418 vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,dl_type=0x1234
7420 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
7421 vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,dl_type=0x1234
7423 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
7424 vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,dl_type=0x1234
7427 AT_CHECK([ovs-appctl revalidator/purge], [0])
7428 AT_CHECK([ovs-ofctl -O OpenFlow11 dump-flows br0 | ofctl_strip | sort], [0], [dnl
7429 table=1, n_packets=3, n_bytes=180, dl_dst=50:54:00:00:00:0a actions=CONTROLLER:65535
7430 OFPST_FLOW reply (OF1.1):
7433 (echo "OFPST_TABLE reply (OF1.3) (xid=0x2):
7435 active=0, lookup=3, matched=0
7438 active=1, lookup=3, matched=3
7441 active=0, lookup=0, matched=0
7443 for i in `seq 3 253`; do
7444 printf ' table %d: ditto\n' $i
7446 AT_CHECK([ovs-ofctl -O OpenFlow13 dump-tables br0 ], [0], [expout])
7451 AT_SETUP([ofproto-dpif - ICMPv6])
7455 AT_CAPTURE_FILE([ofctl_monitor.log])
7457 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxt_packet_in --detach --no-chdir --pidfile 2> ofctl_monitor.log])
7459 ovs-appctl netdev-dummy/receive p1 '0060970769ea0000860580da86dd6000000000203afffe80000000000000020086fffe0580dafe80000000000000026097fffe0769ea870068bd00000000fe80000000000000026097fffe0769ea01010000860580da'
7461 OVS_APP_EXIT_AND_WAIT([ovs-ofctl])
7463 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
7464 NXT_PACKET_IN (xid=0x0): cookie=0x0 total_len=86 in_port=1 (via no_match) data_len=86 (unbuffered)
7465 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
7471 AT_SETUP([ofproto-dpif - ICMPv6 type match])
7473 add_of_ports br0 1 2 3
7475 AT_CHECK([ovs-ofctl add-flow br0 'icmp6,icmp_type=128,actions=2'])
7476 AT_CHECK([ovs-ofctl add-flow br0 'icmp6,icmp_type=129,actions=3'])
7478 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
7480 AT_CHECK([ovs-appctl netdev-dummy/receive p1 'recirc_id(0),in_port(1),eth(src=f2:49:6e:52:49:0b,dst=02:b7:d7:17:ff:72),eth_type(0x86dd),ipv6(proto=58,frag=no),icmpv6(type=128)'])
7481 AT_CHECK([ovs-appctl netdev-dummy/receive p1 'recirc_id(0),in_port(1),eth(src=f2:49:6e:52:49:0b,dst=02:b7:d7:17:ff:72),eth_type(0x86dd),ipv6(proto=58,frag=no),icmpv6(type=128)'])
7482 AT_CHECK([ovs-appctl netdev-dummy/receive p1 'recirc_id(0),in_port(1),eth(src=f2:49:6e:52:49:0b,dst=02:b7:d7:17:ff:72),eth_type(0x86dd),ipv6(proto=58,frag=no),icmpv6(type=129)'])
7483 AT_CHECK([ovs-appctl netdev-dummy/receive p1 'recirc_id(0),in_port(1),eth(src=f2:49:6e:52:49:0b,dst=02:b7:d7:17:ff:72),eth_type(0x86dd),ipv6(proto=58,frag=no),icmpv6(type=129)'])
7485 AT_CHECK([ovs-appctl revalidator/purge], [0])
7487 AT_CHECK([strip_ufid < ovs-vswitchd.log | filter_flow_install | strip_used], [0], [dnl
7488 recirc_id(0),in_port(1),eth_type(0x86dd),ipv6(proto=58,frag=no),icmpv6(type=128), actions:2
7489 recirc_id(0),in_port(1),eth_type(0x86dd),ipv6(proto=58,frag=no),icmpv6(type=129), actions:3
7492 AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
7493 n_packets=2, n_bytes=124, icmp6,icmp_type=128 actions=output:2
7494 n_packets=2, n_bytes=124, icmp6,icmp_type=129 actions=output:3
7501 AT_SETUP([ofproto-dpif - Neighbor Discovery set-field with checksum update])
7504 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])
7506 AT_CAPTURE_FILE([ofctl_monitor.log])
7508 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxt_packet_in --detach --no-chdir --pidfile 2> ofctl_monitor.log])
7510 ovs-appctl netdev-dummy/receive p1 '0060970769ea0000860580da86dd6000000000203afffe80000000000000020086fffe0580dafe80000000000000026097fffe0769ea870068bd00000000fe80000000000000026097fffe0769ea01010000860580da'
7512 OVS_APP_EXIT_AND_WAIT([ovs-ofctl])
7514 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
7515 NXT_PACKET_IN (xid=0x0): cookie=0x0 total_len=86 in_port=1 (via action) data_len=86 (unbuffered)
7516 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
7522 # Tests the exact match of CFI bit in installed datapath flows matching VLAN.
7523 AT_SETUP([ofproto-dpif - vlan matching])
7525 [add-port br0 p0 -- set Interface p0 type=dummy ofport_request=1])
7526 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
7528 AT_CHECK([ovs-ofctl del-flows br0])
7529 AT_CHECK([ovs-ofctl add-flow br0 "vlan_tci=0x000a/0x0fff,action=output:local"])
7531 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))'])
7533 OVS_WAIT_UNTIL([grep flow_add: ovs-vswitchd.log])
7534 AT_CHECK([grep 'in_port([[1]])' ovs-vswitchd.log | filter_flow_install | strip_xout], [0], [dnl
7535 recirc_id(0),in_port(1),eth_type(0x8100),vlan(vid=10),encap(eth_type(0x0800),ipv4(frag=no)), actions: <del>
7540 # Tests in place modification of installed datapath flows.
7541 AT_SETUP([ofproto-dpif - in place modification])
7543 [add-port br0 p1 -- set Interface p1 type=dummy ofport_request=1])
7544 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
7546 AT_CHECK([ovs-ofctl del-flows br0])
7547 AT_CHECK([ovs-ofctl add-flow br0 in_port=1,actions=mod_vlan_vid:3,output:local])
7549 ovs-appctl vlog/set PATTERN:ANY:'%c|%p|%m'
7551 ovs-appctl time/stop
7553 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(0x1234)'])
7555 # Wait for the flow setup to be done.
7556 OVS_WAIT_UNTIL([grep 'flow_add:' ovs-vswitchd.log])
7559 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)'
7562 AT_CHECK([ovs-appctl dpif/dump-flows br0 | strip_ufid | strip_used | sort], [0], [dnl
7563 recirc_id(0),in_port(1),eth_type(0x1234), packets:2, bytes:120, used:0.0s, actions:push_vlan(vid=3,pcp=0),100
7566 AT_CHECK([ovs-ofctl add-flow br0 priority=60000,in_port=1,actions=mod_vlan_vid:4,output:local])
7568 ovs-appctl time/warp 500
7569 ovs-appctl time/warp 500
7572 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)'
7575 AT_CHECK([ovs-appctl dpif/dump-flows br0 | strip_ufid | strip_used | sort], [0], [dnl
7576 recirc_id(0),in_port(1),eth_type(0x1234), packets:5, bytes:300, used:0.0s, actions:push_vlan(vid=4,pcp=0),100
7579 AT_CHECK([grep 'modify' ovs-vswitchd.log | strip_ufid ], [0], [dnl
7580 dpif|DBG|dummy@ovs-dummy: put[[modify]] skb_priority(0/0),skb_mark(0/0),recirc_id(0),dp_hash(0/0),in_port(1),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(0x1234), actions:push_vlan(vid=4,pcp=0),100
7585 # Tests in place modification of installed datapath flows with vlans.
7586 AT_SETUP([ofproto-dpif - in place modification (vlan)])
7588 [add-port br0 p1 -- set Interface p1 type=dummy ofport_request=1])
7589 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
7591 AT_CHECK([ovs-ofctl del-flows br0])
7592 AT_CHECK([ovs-ofctl add-flow br0 in_port=1,actions=output:local])
7594 ovs-appctl vlog/set PATTERN:ANY:'%c|%p|%m'
7596 ovs-appctl time/stop
7598 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(0x1234)'])
7600 # Check that a correct datapath flow is created.
7601 OVS_WAIT_UNTIL([grep 'flow_add:' ovs-vswitchd.log])
7604 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)'
7607 AT_CHECK([ovs-appctl dpif/dump-flows br0 | strip_ufid | strip_used | sort], [0], [dnl
7608 recirc_id(0),in_port(1),eth_type(0x1234), packets:2, bytes:120, used:0.0s, actions:100
7611 # Delete the flow. Then check that the datapath flow is modified to
7612 # drop the packets. A modified flow inherits the stats, a new
7613 # datapath flow would start from sero.
7614 AT_CHECK([ovs-ofctl del-flows br0])
7616 ovs-appctl time/warp 500
7617 ovs-appctl time/warp 500
7620 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)'
7623 AT_CHECK([ovs-appctl dpif/dump-flows br0 | strip_ufid | strip_used | sort], [0], [dnl
7624 recirc_id(0),in_port(1),eth_type(0x1234), packets:5, bytes:300, used:0.0s, actions:drop
7627 # Add a flow that matches the non-presence of a vlan tag, and check
7628 # that the datapath flow is modified accordingly.
7629 AT_CHECK([ovs-ofctl add-flow br0 in_port=1,vlan_tci=0x0000/0x1fff,actions=output:local])
7631 ovs-appctl time/warp 500
7632 ovs-appctl time/warp 500
7635 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)'
7638 AT_CHECK([ovs-appctl dpif/dump-flows br0 | strip_ufid | strip_used | sort], [0], [dnl
7639 recirc_id(0),in_port(1),eth_type(0x1234), packets:8, bytes:480, used:0.0s, actions:100
7642 # Check that VLAN packets will not hit the same datapath megaflow.
7644 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=99,pcp=7),encap(eth_type(0x1234))'])
7645 OVS_WAIT_UNTIL([grep 'flow_add:.*vlan(vid=99' ovs-vswitchd.log])
7648 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=99,pcp=7),encap(eth_type(0x1234))'
7651 AT_CHECK([ovs-appctl dpif/dump-flows br0 | strip_ufid | strip_used | sort], [0], [dnl
7652 recirc_id(0),in_port(1),eth_type(0x1234), packets:8, bytes:480, used:0.0s, actions:100
7653 recirc_id(0),in_port(1),eth_type(0x8100),vlan(vid=99,pcp=7/0x0),encap(eth_type(0x1234)), packets:2, bytes:120, used:0.0s, actions:drop
7656 # Check that the new flow matches the CFI bit, while both vid and pcp
7658 AT_CHECK([grep '\(modify\)\|\(flow_add\)' ovs-vswitchd.log | strip_ufid ], [0], [dnl
7659 dpif_netdev|DBG|flow_add: recirc_id(0),in_port(1),eth_type(0x1234), actions:100
7660 dpif|DBG|dummy@ovs-dummy: put[[modify]] skb_priority(0/0),skb_mark(0/0),recirc_id(0),dp_hash(0/0),in_port(1),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(0x1234)
7661 dpif|DBG|dummy@ovs-dummy: put[[modify]] skb_priority(0/0),skb_mark(0/0),recirc_id(0),dp_hash(0/0),in_port(1),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(0x1234), actions:100
7662 dpif_netdev|DBG|flow_add: recirc_id(0),in_port(1),eth_type(0x8100),vlan(vid=99,pcp=7/0x0),encap(eth_type(0x1234)), actions:drop
7667 AT_SETUP([ofproto-dpif - trace (unchanged)])
7669 AT_CHECK([ovs-appctl ofproto/trace br0 'in_port=1'], [0], [stdout])
7670 AT_CHECK([grep "Final flow:" stdout], [0], [Final flow: unchanged
7672 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(100)'], [0], [stdout])
7673 AT_CHECK([grep "Final flow:" stdout], [0], [Final flow: unchanged