1 AT_BANNER([ofproto-dpif])
3 AT_SETUP([ofproto-dpif - revalidator/wait])
5 AT_CHECK([ovs-appctl revalidator/wait])
9 AT_SETUP([ofproto-dpif - active-backup bonding])
10 # Create br0 with interfaces p1, p2 and p7, creating bond0 with p1 and p2
11 # and br1 with interfaces p3, p4 and p8.
12 # toggle p1,p2 of bond0 up and down to test bonding in active-backup mode.
14 [add-bond br0 bond0 p1 p2 bond_mode=active-backup --\
15 set interface p1 type=dummy options:pstream=punix:$OVS_RUNDIR/p1.sock ofport_request=1 -- \
16 set interface p2 type=dummy options:pstream=punix:$OVS_RUNDIR/p2.sock ofport_request=2 -- \
17 add-port br0 p7 -- set interface p7 ofport_request=7 type=dummy -- \
19 set bridge br1 other-config:hwaddr=aa:66:aa:66:00:00 -- \
20 set bridge br1 datapath-type=dummy other-config:datapath-id=1234 \
22 add-port br1 p3 -- set interface p3 type=dummy options:stream=unix:$OVS_RUNDIR/p1.sock ofport_request=3 -- \
23 add-port br1 p4 -- set interface p4 type=dummy options:stream=unix:$OVS_RUNDIR/p2.sock ofport_request=4 -- \
24 add-port br1 p8 -- set interface p8 ofport_request=8 type=dummy --])
25 WAIT_FOR_DUMMY_PORTS([p3], [p4])
26 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
28 AT_CHECK([ovs-ofctl add-flow br0 action=normal])
29 AT_CHECK([ovs-ofctl add-flow br1 action=normal])
30 ovs-appctl netdev-dummy/set-admin-state up
31 ovs-appctl time/warp 100
32 ovs-appctl netdev-dummy/set-admin-state p2 down
34 ovs-appctl time/warp 100
35 AT_CHECK([ovs-appctl netdev-dummy/receive p7 'in_port(7),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
36 AT_CHECK([ovs-appctl netdev-dummy/receive p7 'in_port(7),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.3,dst=10.0.0.4,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
37 ovs-appctl time/warp 100
38 ovs-appctl netdev-dummy/set-admin-state p2 up
39 ovs-appctl netdev-dummy/set-admin-state p1 down
40 ovs-appctl time/warp 100
41 AT_CHECK([ovs-appctl netdev-dummy/receive p7 'in_port(7),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0d),eth_type(0x0800),ipv4(src=10.0.0.5,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
42 AT_CHECK([ovs-appctl netdev-dummy/receive p7 'in_port(7),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0e),eth_type(0x0800),ipv4(src=10.0.0.6,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
43 ovs-appctl time/warp 200 100
45 AT_CHECK([cat ovs-vswitchd.log | grep 'in_port=[[348]]' | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
46 recirc_id=0,ip,in_port=3,vlan_tci=0x0000/0x1fff,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,nw_frag=no, actions: <del>
47 recirc_id=0,ip,in_port=3,vlan_tci=0x0000/0x1fff,dl_src=50:54:00:00:00:0b,dl_dst=50:54:00:00:00:0c,nw_frag=no, actions: <del>
48 recirc_id=0,ip,in_port=4,vlan_tci=0x0000/0x1fff,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0d,nw_frag=no, actions: <del>
49 recirc_id=0,ip,in_port=4,vlan_tci=0x0000/0x1fff,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0e,nw_frag=no, actions: <del>
50 recirc_id=0,rarp,in_port=4,vlan_tci=0x0000/0x1fff,dl_src=50:54:00:00:00:09,dl_dst=ff:ff:ff:ff:ff:ff, actions: <del>
51 recirc_id=0,rarp,in_port=4,vlan_tci=0x0000/0x1fff,dl_src=50:54:00:00:00:0b,dl_dst=ff:ff:ff:ff:ff:ff, actions: <del>
56 AT_SETUP([ofproto-dpif - balance-slb bonding])
57 # Create br0 with interfaces bond0(p1, p2, p3) and p7,
58 # and br1 with interfaces p4, p5, p6 and p8.
59 # p1 <-> p4, p2 <-> p5, p3 <-> p6
60 # Send some traffic, make sure the traffic are spread based on source mac.
62 [add-bond br0 bond0 p1 p2 p3 bond_mode=balance-slb --\
63 set interface p1 type=dummy options:pstream=punix:$OVS_RUNDIR/p1.sock ofport_request=1 -- \
64 set interface p2 type=dummy options:pstream=punix:$OVS_RUNDIR/p2.sock ofport_request=2 -- \
65 set interface p3 type=dummy options:pstream=punix:$OVS_RUNDIR/p3.sock ofport_request=3 -- \
66 add-port br0 p7 -- set interface p7 ofport_request=7 type=dummy -- \
68 set bridge br1 other-config:hwaddr=aa:66:aa:66:00:00 -- \
69 set bridge br1 datapath-type=dummy other-config:datapath-id=1234 \
71 add-port br1 p4 -- set interface p4 type=dummy options:stream=unix:$OVS_RUNDIR/p1.sock ofport_request=4 -- \
72 add-port br1 p5 -- set interface p5 type=dummy options:stream=unix:$OVS_RUNDIR/p2.sock ofport_request=5 -- \
73 add-port br1 p6 -- set interface p6 type=dummy options:stream=unix:$OVS_RUNDIR/p3.sock ofport_request=6 -- \
74 add-port br1 p8 -- set interface p8 ofport_request=8 type=dummy --])
75 WAIT_FOR_DUMMY_PORTS([p4], [p5], [p6])
76 AT_CHECK([ovs-ofctl add-flow br0 action=normal])
77 AT_CHECK([ovs-ofctl add-flow br1 action=normal])
78 AT_CHECK([ovs-appctl netdev-dummy/set-admin-state up], 0, [OK
81 ovs-appctl time/warp 100
83 for i in `seq 0 100 |xargs printf '%02x\n'`;
85 pkt="in_port(7),eth(src=50:54:00:00:00:$i,dst=50:54:00:00:01:00),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)"
86 AT_CHECK([ovs-appctl netdev-dummy/receive p7 $pkt])
89 ovs-appctl time/warp 100
90 AT_CHECK([ovs-appctl dpif/dump-flows br1 > br1_flows.txt])
91 # Make sure there is resonable distribution to all three ports.
92 # We don't want to make this check precise, in case hash function changes.
93 AT_CHECK([test `egrep 'in_port\(4\)' br1_flows.txt |wc -l` -gt 3])
94 AT_CHECK([test `egrep 'in_port\(5\)' br1_flows.txt |wc -l` -gt 3])
95 AT_CHECK([test `egrep 'in_port\(6\)' br1_flows.txt |wc -l` -gt 3])
99 AT_SETUP([ofproto-dpif - balance-tcp bonding])
100 # Create br0 with interfaces bond0(p1, p2, p3) and p7,
101 # and br1 with interfaces bond1(p4, p5, p6) and p8.
103 # Send some traffic, make sure the traffic are spread based on L4 headers.
105 [add-bond br0 bond0 p1 p2 p3 bond_mode=balance-tcp lacp=active \
106 other-config:lacp-time=fast other-config:bond-rebalance-interval=0 --\
107 set interface p1 type=dummy options:pstream=punix:$OVS_RUNDIR/p1.sock ofport_request=1 -- \
108 set interface p2 type=dummy options:pstream=punix:$OVS_RUNDIR/p2.sock ofport_request=2 -- \
109 set interface p3 type=dummy options:pstream=punix:$OVS_RUNDIR/p3.sock ofport_request=3 -- \
110 add-port br0 p7 -- set interface p7 ofport_request=7 type=dummy -- \
112 set bridge br1 other-config:hwaddr=aa:66:aa:66:00:00 -- \
113 set bridge br1 datapath-type=dummy other-config:datapath-id=1234 \
114 fail-mode=secure -- \
115 add-bond br1 bond1 p4 p5 p6 bond_mode=balance-tcp lacp=active \
116 other-config:lacp-time=fast other-config:bond-rebalance-interval=0 --\
117 set interface p4 type=dummy options:stream=unix:$OVS_RUNDIR/p1.sock ofport_request=4 -- \
118 set interface p5 type=dummy options:stream=unix:$OVS_RUNDIR/p2.sock ofport_request=5 -- \
119 set interface p6 type=dummy options:stream=unix:$OVS_RUNDIR/p3.sock ofport_request=6 -- \
120 add-port br1 p8 -- set interface p8 ofport_request=8 type=dummy --])
121 AT_CHECK([ovs-appctl netdev-dummy/set-admin-state up], 0, [OK
123 AT_CHECK([ovs-ofctl add-flow br0 action=normal])
124 AT_CHECK([ovs-ofctl add-flow br1 action=normal])
125 AT_CHECK([ovs-appctl upcall/disable-megaflows], [0], [megaflows disabled
127 OVS_WAIT_WHILE([ovs-appctl bond/show | grep "may_enable: false"])
129 ovs-appctl time/warp 100
130 ovs-appctl lacp/show > lacp.txt
131 ovs-appctl bond/show > bond.txt
133 for i in `seq 0 255` ;
135 pkt="in_port(7),eth(src=50:54:00:00:00:05,dst=50:54:00:00:01:00),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=$i),tcp_flags(ack)"
136 AT_CHECK([ovs-appctl netdev-dummy/receive p7 $pkt])
139 ovs-appctl time/warp 300 100
140 AT_CHECK([ovs-appctl dpif/dump-flows br0 |grep tcp > br0_flows.txt])
141 AT_CHECK([ovs-appctl dpif/dump-flows br1 |grep tcp > br1_flows.txt])
142 # Make sure there is resonable distribution to all three ports.
143 # We don't want to make this check precise, in case hash function changes.
144 AT_CHECK([test `grep in_port.4 br1_flows.txt |wc -l` -gt 24])
145 AT_CHECK([test `grep in_port.5 br1_flows.txt |wc -l` -gt 24])
146 AT_CHECK([test `grep in_port.6 br1_flows.txt |wc -l` -gt 24])
151 # Makes sure recirculation does not change the way packet is handled.
152 AT_SETUP([ofproto-dpif - balance-tcp bonding, different recirc flow ])
154 [add-bond br0 bond0 p1 p2 bond_mode=balance-tcp lacp=active \
155 other-config:lacp-time=fast other-config:bond-rebalance-interval=0 -- \
156 set interface p1 type=dummy options:pstream=punix:$OVS_RUNDIR/p1.sock ofport_request=1 -- \
157 set interface p2 type=dummy options:pstream=punix:$OVS_RUNDIR/p2.sock ofport_request=2 -- \
159 set bridge br1 other-config:hwaddr=aa:66:aa:66:00:00 -- \
160 set bridge br1 datapath-type=dummy other-config:datapath-id=1234 \
161 fail-mode=standalone -- \
162 add-bond br1 bond1 p3 p4 bond_mode=balance-tcp lacp=active \
163 other-config:lacp-time=fast other-config:bond-rebalance-interval=0 -- \
164 set interface p3 type=dummy options:stream=unix:$OVS_RUNDIR/p1.sock ofport_request=3 -- \
165 set interface p4 type=dummy options:stream=unix:$OVS_RUNDIR/p2.sock ofport_request=4 -- \
166 add-port br1 br1- -- set interface br1- type=patch options:peer=br1+ ofport_request=100 -- \
168 set bridge br-int other-config:hwaddr=aa:77:aa:77:00:00 -- \
169 set bridge br-int datapath-type=dummy other-config:datapath-id=1235 \
170 fail-mode=secure -- \
171 add-port br-int br1+ -- set interface br1+ type=patch options:peer=br1- ofport_request=101 -- \
172 add-port br-int p5 -- set interface p5 ofport_request=5 type=dummy
174 AT_CHECK([ovs-appctl netdev-dummy/set-admin-state up], 0, [OK
177 # Waits for all ifaces enabled.
178 OVS_WAIT_UNTIL([test `ovs-appctl bond/show | grep -- "may_enable: true" | wc -l` -ge 4])
180 # The dl_vlan flow should not be ever matched,
181 # since recirculation should not change the flow handling.
182 AT_DATA([flows.txt], [dnl
183 table=0 priority=1 in_port=5 actions=mod_vlan_vid:1,output(101)
184 table=0 priority=2 in_port=5 dl_vlan=1 actions=drop
186 AT_CHECK([ovs-ofctl add-flows br-int flows.txt])
188 # Sends a packet to trigger recirculation.
189 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],
213 [16], [17], [18], [19], [20], [21])
214 AT_DATA([flows.txt], [dnl
215 table=0 in_port=1 priority=1000 icmp actions=output(10),resubmit(2),output(19),resubmit(3),output(21)
216 table=0 in_port=2 priority=1500 icmp actions=output(11),resubmit(,1),output(16),resubmit(2,1),output(18)
217 table=0 in_port=3 priority=2000 icmp actions=output(20)
218 table=1 in_port=1 priority=1000 icmp actions=output(12),resubmit(4,1),output(13),resubmit(3),output(15)
219 table=1 in_port=2 priority=1500 icmp actions=output(17),resubmit(,2)
220 table=1 in_port=3 priority=1500 icmp actions=output(14),resubmit(,2)
222 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
223 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])
224 AT_CHECK([tail -1 stdout], [0],
225 [Datapath actions: 10,11,12,13,14,15,16,17,18,19,20,21
230 AT_SETUP([ofproto-dpif - goto table])
232 ADD_OF_PORTS([br0], [1], [10], [11])
233 echo "table=0 in_port=1 actions=output(10),goto_table(1)" > flows.txt
234 for i in `seq 1 63`; do echo "table=$i actions=goto_table($(($i+1)))"; done >> flows.txt
235 echo "table=64 actions=output(11)" >> flows.txt
236 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flows br0 flows.txt])
237 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])
238 AT_CHECK([tail -1 stdout], [0],
239 [Datapath actions: 10,11
244 AT_SETUP([ofproto-dpif - write actions])
246 ADD_OF_PORTS([br0], [1], [10], [11], [12], [13])
247 AT_DATA([flows.txt], [dnl
248 table=0 in_port=1,ip actions=output(10),write_actions(set_field:192.168.3.90->ip_src,output(12)),goto_table(1)
249 table=1 ip actions=write_actions(output(13)),goto_table(2)
250 table=2 ip actions=set_field:192.168.3.91->ip_src,output(11)
252 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flows br0 flows.txt])
253 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])
254 AT_CHECK([tail -2 stdout], [0],
255 [Megaflow: recirc_id=0,ip,in_port=1,nw_src=192.168.0.1,nw_frag=no
256 Datapath actions: 10,set(ipv4(src=192.168.3.91)),11,set(ipv4(src=192.168.3.90)),13
261 AT_SETUP([ofproto-dpif - modify IPv6 Neighbor Solitication (ND)])
263 ADD_OF_PORTS([br0], [1], [10], [11], [12], [13])
264 AT_DATA([flows.txt], [dnl
265 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)
266 table=1 icmp6 actions=write_actions(output(13)),goto_table(2)
267 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)
269 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flows br0 flows.txt])
270 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])
271 AT_CHECK([tail -4 stdout], [0],
272 [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
273 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
274 This flow is handled by the userspace slow path because it:
275 - Uses action(s) not supported by datapath.
280 AT_SETUP([ofproto-dpif - clear actions])
282 ADD_OF_PORTS([br0], [1], [10], [11], [12])
283 AT_DATA([flows.txt], [dnl
284 table=0 in_port=1,ip actions=output(10),write_actions(set_field:192.168.3.90->ip_src,output(12)),goto_table(1)
285 table=1 tcp actions=set_field:91->tp_src,output(11),clear_actions
287 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flows br0 flows.txt])
288 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])
289 AT_CHECK([tail -2 stdout], [0],
290 [Megaflow: recirc_id=0,tcp,in_port=1,nw_frag=no,tp_src=8
291 Datapath actions: 10,set(tcp(src=91)),11
296 AT_SETUP([ofproto-dpif - group chaining])
298 ADD_OF_PORTS([br0], [1], [10], [11])
299 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'])
300 AT_CHECK([ovs-ofctl -O OpenFlow12 add-group br0 'group_id=123,type=all,bucket=output:10'])
301 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=group:1234'])
302 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])
303 AT_CHECK([tail -1 stdout], [0],
304 [Datapath actions: set(ipv4(src=192.168.3.90)),10,set(ipv4(src=192.168.0.1)),11
309 AT_SETUP([ofproto-dpif - all group in action list])
311 ADD_OF_PORTS([br0], [1], [10], [11])
312 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'])
313 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=group:1234'])
314 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])
315 # Must match on the source address to be able to restore it's value for
317 AT_CHECK([tail -2 stdout], [0],
318 [Megaflow: recirc_id=0,ip,in_port=1,nw_src=192.168.0.1,nw_frag=no
319 Datapath actions: set(ipv4(src=192.168.3.90)),10,set(ipv4(src=192.168.0.1)),11
324 AT_SETUP([ofproto-dpif - indirect group in action list])
326 ADD_OF_PORTS([br0], [1], [10])
327 AT_CHECK([ovs-ofctl -O OpenFlow12 add-group br0 group_id=1234,type=indirect,bucket=output:10])
328 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=group:1234'])
329 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])
330 AT_CHECK([tail -1 stdout], [0],
331 [Datapath actions: 10
336 AT_SETUP([ofproto-dpif - group actions have no effect afterwards])
338 ADD_OF_PORTS([br0], [1], [10])
339 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'])
340 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=group:1234,output:10'])
341 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])
342 AT_CHECK([tail -1 stdout], [0],
343 [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
348 AT_SETUP([ofproto-dpif - all group in action set])
350 ADD_OF_PORTS([br0], [1], [10], [11])
351 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'])
352 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=write_actions(group:1234)'])
353 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])
354 # Must match on the source address to be able to restore it's value for
356 AT_CHECK([tail -2 stdout], [0],
357 [Megaflow: recirc_id=0,ip,in_port=1,nw_src=192.168.0.1,nw_frag=no
358 Datapath actions: set(ipv4(src=192.168.3.90)),10,set(ipv4(src=192.168.0.1)),11
363 AT_SETUP([ofproto-dpif - indirect group in action set])
365 ADD_OF_PORTS([br0], [1], [10])
366 AT_CHECK([ovs-ofctl -O OpenFlow12 add-group br0 group_id=1234,type=indirect,bucket=output:10])
367 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=write_actions(group:1234)'])
368 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])
369 AT_CHECK([tail -1 stdout], [0],
370 [Datapath actions: 10
375 AT_SETUP([ofproto-dpif - select group])
377 ADD_OF_PORTS([br0], [1], [10], [11])
378 AT_CHECK([ovs-ofctl -O OpenFlow12 add-group br0 'group_id=1234,type=select,bucket=output:10,bucket=output:11'])
379 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=write_actions(group:1234)'])
381 # Try a bunch of different flows and make sure that they get distributed
383 for d in 0 1 2 3 4 5 6 7 8 9 a b c d e f; do
384 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])
385 tail -1 stdout >> results
387 sort results | uniq -c
388 AT_CHECK([sort results | uniq], [0],
389 [Datapath actions: 10
395 AT_SETUP([ofproto-dpif - select group with watch port])
397 ADD_OF_PORTS([br0], [1], [10], [11])
398 AT_CHECK([ovs-ofctl -O OpenFlow12 add-group br0 'group_id=1234,type=select,bucket=watch_port:10,output:10,bucket=output:11'])
399 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=write_actions(group:1234)'])
400 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])
401 AT_CHECK([tail -1 stdout], [0],
402 [Datapath actions: 11
407 AT_SETUP([ofproto-dpif - select group with weight])
409 ADD_OF_PORTS([br0], [1], [10], [11], [12])
410 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'])
411 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=write_actions(group:1234)'])
412 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])
413 AT_CHECK([tail -1 stdout], [0],
414 [Datapath actions: 11
419 AT_SETUP([ofproto-dpif - select group with hash selection method])
421 ADD_OF_PORTS([br0], [1], [10], [11])
422 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'])
423 AT_CHECK([ovs-ofctl -O OpenFlow15 add-flow br0 'ip actions=write_actions(group:1234)'])
425 # Try a bunch of different flows and make sure that they get distributed
427 for d in 0 1 2 3 4 5 6 7 8 9 a b c d e f; do
428 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])
429 tail -1 stdout >> results
431 sort results | uniq -c
432 AT_CHECK([sort results | uniq], [0],
433 [Datapath actions: 10
438 # Try a bunch of different flows and make sure that they are not distributed
439 # as they only vary a field that is not hashed
440 for d in 0 1 2 3 4 5 6 7 8 9 a b c d e f; do
441 AT_CHECK([ovs-appctl ofproto/trace br0 "in_port=1,dl_src=50:54:00:00:00:$d,dl_dst=50:54:00:00:00:07,dl_type=0x0800,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_proto=1,nw_tos=0,nw_ttl=128,icmp_type=8,icmp_code=0"], [0], [stdout])
442 tail -1 stdout >> results
444 sort results | uniq -c
445 AT_CHECK([sort results | uniq], [0],
446 [Datapath actions: 10
452 AT_SETUP([ofproto-dpif - fast failover group])
454 ADD_OF_PORTS([br0], [1], [10], [11])
455 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'])
456 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=write_actions(group:1234)'])
457 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])
458 AT_CHECK([tail -1 stdout], [0],
459 [Datapath actions: drop
464 AT_SETUP([ofproto-dpif - group stats single bucket])
466 ADD_OF_PORTS([br0], [1], [10], [11])
467 AT_CHECK([ovs-ofctl -O OpenFlow12 add-group br0 'group_id=1234,type=select,bucket=output:10,weight=2000,bucket=output:11,weight=0'])
468 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=write_actions(group:1234)'])
472 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)"
473 AT_CHECK([ovs-appctl netdev-dummy/receive p1 $pkt])
476 AT_CHECK([ovs-appctl revalidator/purge], [0])
477 AT_CHECK([ovs-ofctl -O OpenFlow12 -vwarn dump-group-stats br0], [0], [stdout])
478 AT_CHECK([STRIP_XIDS stdout | sort], [0], [dnl
479 group_id=1234,ref_count=0,packet_count=3,byte_count=180,bucket0:packet_count=3,byte_count=180,bucket1:packet_count=0,byte_count=0
480 OFPST_GROUP reply (OF1.2):
485 AT_SETUP([ofproto-dpif - group stats all buckets])
487 ADD_OF_PORTS([br0], [1], [10], [11])
488 AT_CHECK([ovs-ofctl -O OpenFlow12 add-group br0 'group_id=1234,type=all,bucket=output:10,bucket=output:11'])
489 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=write_actions(group:1234)'])
493 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)"
494 AT_CHECK([ovs-appctl netdev-dummy/receive p1 $pkt])
497 AT_CHECK([ovs-appctl revalidator/purge], [0])
498 AT_CHECK([ovs-ofctl -O OpenFlow12 -vwarn dump-group-stats br0], [0], [stdout])
499 AT_CHECK([STRIP_XIDS stdout | sort], [0], [dnl
500 group_id=1234,ref_count=0,packet_count=3,byte_count=180,bucket0:packet_count=3,byte_count=180,bucket1:packet_count=3,byte_count=180
501 OFPST_GROUP reply (OF1.2):
506 AT_SETUP([ofproto-dpif - registers])
508 ADD_OF_PORTS([br0], [20], [21], [22], [33], [90])
509 AT_DATA([flows.txt], [dnl
510 in_port=90 actions=resubmit:2,resubmit:3,resubmit:4,resubmit:91
511 in_port=91 actions=resubmit:5,resubmit:6,resubmit:7,resubmit:92
512 in_port=92 actions=resubmit:8,resubmit:9,resubmit:10,resubmit:11,resubmit:93
513 in_port=93 actions=resubmit:12,resubmit:13,resubmit:14,resubmit:15
515 in_port=2 actions=load:0x000db000->NXM_NX_REG0[[]]
516 in_port=3 actions=load:0xdea->NXM_NX_REG0[[20..31]]
517 in_port=4 actions=load:0xeef->NXM_NX_REG0[[0..11]]
518 in_port=5 actions=move:NXM_NX_REG0[[]]->NXM_NX_REG1[[]]
519 in_port=6 actions=load:0x22222222->NXM_NX_REG2[[]]
520 in_port=7 actions=move:NXM_NX_REG1[[20..31]]->NXM_NX_REG2[[0..11]]
521 in_port=8 actions=move:NXM_NX_REG1[[0..11]]->NXM_NX_REG2[[20..31]]
522 in_port=9,reg0=0xdeadbeef actions=output:20
523 in_port=10,reg1=0xdeadbeef actions=output:21
524 in_port=11,reg2=0xeef22dea actions=output:22
526 dnl Sanilty check all registers
527 in_port=12 actions=load:0x10->NXM_NX_REG0[[]],load:0x11->NXM_NX_REG1[[]],load:0x12->NXM_NX_REG2[[]]
528 in_port=13 actions=load:0x13->NXM_NX_REG3[[]],load:0x14->NXM_NX_REG4[[]],load:0x15->NXM_NX_REG5[[]]
529 in_port=14 actions=load:0x16->NXM_NX_REG6[[]],load:0x17->NXM_NX_REG7[[]]
530 in_port=15,reg0=0x10,reg1=0x11,reg2=0x12,reg3=0x13,reg4=0x14,reg5=0x15,reg6=0x16,reg7=0x17 actions=output:33
533 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
534 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])
535 AT_CHECK([tail -1 stdout], [0],
536 [Datapath actions: 20,21,22,33
541 dnl Tests that the standardized xregs are mapped onto the legacy OVS registers
542 dnl in the manner documented in ovs-ofctl(8).
543 AT_SETUP([ofproto-dpif - extended registers])
545 ADD_OF_PORTS([br0], [1], [2], [3])
546 AT_DATA([flows.txt], [dnl
547 table=0 actions=load:0xfedcba9876543210->OXM_OF_PKT_REG1[[]],resubmit(,1)
548 table=1,reg2=0xfedcba98,reg3=0x76543210 actions=2
550 # These low-priority rules shouldn't match. They're here only to make really
551 # sure that the test fails if either of the above rules fails to match.
552 table=0,priority=0 actions=3
553 table=1,priority=0 actions=3
555 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
556 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])
557 AT_CHECK([tail -1 stdout], [0], [Datapath actions: 2
562 AT_SETUP([ofproto-dpif - load and move order])
564 ADD_OF_PORTS([br0], [1], [10], [11])
565 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'])
566 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)'])
567 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])
568 AT_CHECK([tail -2 stdout], [0],
569 [Megaflow: recirc_id=0,ip,in_port=1,nw_src=192.168.0.1,nw_frag=no
570 Datapath actions: set(ipv4(src=255.255.255.255)),10,set(ipv4(src=192.168.0.1)),11
575 dnl Tests that 1.5 copy-field can copy into the standardized xregs.
576 AT_SETUP([ofproto-dpif - copy-field into extended registers])
578 ADD_OF_PORTS([br0], [1], [2], [3])
579 AT_DATA([flows.txt], [dnl
580 table=0 actions=move:OXM_OF_ETH_SRC[[0..47]]->OXM_OF_PKT_REG0[[0..47]],goto_table(1)
581 table=1,xreg0=0x0000505400000005 actions=2
583 # These low-priority rules shouldn't match. They're here only to make really
584 # sure that the test fails if either of the above rules fails to match.
585 table=0,priority=0 actions=3
586 table=1,priority=0 actions=3
588 AT_CHECK([ovs-ofctl -O OpenFlow15 add-flows br0 flows.txt])
589 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])
590 AT_CHECK([tail -1 stdout], [0], [Datapath actions: 2
595 dnl Tests that 1.5 set-field with mask in the metadata register.
596 AT_SETUP([ofproto-dpif - masked set-field into metadata])
598 ADD_OF_PORTS([br0], [1], [2], [3])
599 AT_DATA([flows.txt], [dnl
600 table=0 actions=set_field:0xfafafafa5a5a5a5a->metadata,goto_table(1)
601 table=1 actions=set_field:0x6b/0xff->metadata,goto_table(2)
602 table=2,metadata=0xfafafafa5a5a5a6b actions=2
604 # These low-priority rules shouldn't match. They're here only to make really
605 # sure that the test fails if either of the above rules fails to match.
606 table=0,priority=0 actions=3
607 table=1,priority=0 actions=3
608 table=2,priority=0 actions=3
610 AT_CHECK([ovs-ofctl -O OpenFlow15 add-flows br0 flows.txt])
611 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])
612 AT_CHECK([tail -1 stdout], [0], [Datapath actions: 2
618 AT_SETUP([ofproto-dpif - actset_output])
621 [br0], [1], [2], [3], [4], [5], [6], [7], [8], [9], [10], [11], [12], [13])
622 AT_DATA([flows.txt], [dnl
623 table=0,actset_output=unset actions=write_actions(output(2)),goto_table(1)
624 table=1 actions=move:ONFOXM_ET_ACTSET_OUTPUT[[0..31]]->OXM_OF_PKT_REG0[[0..31]],goto_table(2)
626 # Verify that actset_output got set.
627 table=2,priority=20,actset_output=2 actions=4,goto_table(3)
628 table=2,priority=10 actions=5,goto_table(3)
630 # Verify that xreg0 got copied properly from actset_output.
631 table=3,priority=20,xreg0=2 actions=6,goto_table(4)
632 table=3,priority=10 actions=7,goto_table(4)
634 # Verify that adding a group action unsets actset_output,
635 # even if output follows group.
636 table=4 actions=write_actions(group(5),output(10)),goto_table(5)
637 table=5,priority=20,actset_output=unset actions=8,goto_table(6)
638 table=5,priority=10 actions=9,goto_table(6)
640 # Verify that adding another output action doesn't change actset_output
641 # (since there's still a group).
642 table=6 actions=write_actions(output(3)),goto_table(7)
643 table=7,priority=20,actset_output=unset actions=10,goto_table(8)
644 table=7,priority=10 actions=11,goto_table(8)
646 # Verify that clearing the action set, then writing an output action,
647 # causes actset_output to be set again.
648 table=8,actions=clear_actions,write_actions(output(3),output(2)),goto_table(9)
649 table=9,priority=20,actset_output=2 actions=12
650 table=9,priority=10 actions=13
652 AT_CHECK([ovs-ofctl -O OpenFlow13 add-flows br0 flows.txt])
653 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)'], [0], [stdout])
654 AT_CHECK([tail -1 stdout], [0], [Datapath actions: 4,6,8,10,12,2
658 AT_SETUP([ofproto-dpif - push-pop])
660 ADD_OF_PORTS([br0], [20], [21], [22], [33], [90])
661 AT_DATA([flows.txt], [dnl
662 in_port=90 actions=load:20->NXM_NX_REG0[[0..7]],load:21->NXM_NX_REG1[[0..7]],load:22->NXM_NX_REG2[[0..7]], load:33->NXM_NX_REG3[[0..7]], push:NXM_NX_REG0[[]], push:NXM_NX_REG1[[0..7]],push:NXM_NX_REG2[[0..15]], push:NXM_NX_REG3[[]], resubmit:2, resubmit:3, resubmit:4, resubmit:5
663 in_port=2 actions=pop:NXM_NX_REG0[[0..7]],output:NXM_NX_REG0[[]]
664 in_port=3 actions=pop:NXM_NX_REG1[[0..7]],output:NXM_NX_REG1[[]]
665 in_port=4 actions=pop:NXM_NX_REG2[[0..15]],output:NXM_NX_REG2[[]]
666 in_port=5 actions=pop:NXM_NX_REG3[[]],output:NXM_NX_REG3[[]]
669 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
670 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(90),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)'], [0], [stdout])
671 AT_CHECK([tail -1 stdout], [0],
672 [Datapath actions: 33,22,21,20
677 AT_SETUP([ofproto-dpif - output])
679 ADD_OF_PORTS([br0], [1], [9], [10], [11], [55], [66], [77], [88])
680 AT_DATA([flows.txt], [dnl
681 in_port=1 actions=resubmit:2,resubmit:3,resubmit:4,resubmit:5,resubmit:6,resubmit:7,resubmit:8
682 in_port=2 actions=output:9
683 in_port=3 actions=load:55->NXM_NX_REG0[[]],output:NXM_NX_REG0[[]],load:66->NXM_NX_REG1[[]]
684 in_port=4 actions=output:10,output:NXM_NX_REG0[[]],output:NXM_NX_REG1[[]],output:11
685 in_port=5 actions=load:77->NXM_NX_REG0[[0..15]],load:88->NXM_NX_REG0[[16..31]]
686 in_port=6 actions=output:NXM_NX_REG0[[0..15]],output:NXM_NX_REG0[[16..31]]
687 in_port=7 actions=load:0x110000ff->NXM_NX_REG0[[]],output:NXM_NX_REG0[[]]
688 in_port=8 actions=1,9,load:9->NXM_OF_IN_PORT[[]],1,9
690 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
691 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)'], [0], [stdout])
692 AT_CHECK([tail -1 stdout], [0],
693 [Datapath actions: 9,55,10,55,66,11,77,88,9,1
698 AT_SETUP([ofproto-dpif - dec_ttl])
700 ADD_OF_PORTS([br0], [1], [2], [3], [4])
701 AT_DATA([flows.txt], [dnl
702 table=0 in_port=1 action=dec_ttl,output:2,resubmit(1,1),output:4
703 table=1 in_port=1 action=dec_ttl,output:3
705 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
706 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=111,tos=0,ttl=2,frag=no)' -generate], [0], [stdout])
707 AT_CHECK([tail -4 stdout], [0],
708 [Megaflow: recirc_id=0,ip,in_port=1,nw_ttl=2,nw_frag=no
709 Datapath actions: set(ipv4(ttl=1)),2,4
710 This flow is handled by the userspace slow path because it:
711 - Sends "packet-in" messages to the OpenFlow controller.
713 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=111,tos=0,ttl=3,frag=no)'], [0], [stdout])
714 AT_CHECK([tail -2 stdout], [0],
715 [Megaflow: recirc_id=0,ip,in_port=1,nw_ttl=3,nw_frag=no
716 Datapath actions: set(ipv4(ttl=2)),2,set(ipv4(ttl=1)),3,4
718 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x86dd),ipv6(src=::1,dst=::2,label=0,proto=10,tclass=0x70,hlimit=128,frag=no)'], [0], [stdout])
719 AT_CHECK([tail -2 stdout], [0],
720 [Megaflow: recirc_id=0,ipv6,in_port=1,nw_ttl=128,nw_frag=no
721 Datapath actions: set(ipv6(hlimit=127)),2,set(ipv6(hlimit=126)),3,4
724 AT_CAPTURE_FILE([ofctl_monitor.log])
725 AT_CHECK([ovs-ofctl monitor br0 65534 invalid_ttl --detach --no-chdir --pidfile 2> ofctl_monitor.log])
726 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=111,tos=0,ttl=2,frag=no)' -generate], [0], [stdout])
727 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
728 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
729 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=34 in_port=1 (via invalid_ttl) data_len=34 (unbuffered)
730 ip,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_proto=111,nw_tos=0,nw_ecn=0,nw_ttl=1
735 dnl A dec_ttl action at offset 32 in ofpacts will cause the ofpacts
736 dnl buffer to be resized just before pushing the id of the dec_ttl action.
737 dnl Thus the implementation must account for this by using the
738 dnl reallocated buffer rather than the original buffer.
740 dnl A number of similar rules are added to try and exercise
741 dnl xrealloc sufficiently that it returns a different base pointer
742 AT_SETUP([ofproto-dpif - dec_ttl without arguments at offset 32 in ofpacts])
744 ADD_OF_PORTS([br0], [1])
745 (for i in `seq 0 255`; do
746 printf "dl_src=10:11:11:11:11:%02x actions=output:1,output:1,output:1,dec_ttl,controller\n" $i
748 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
752 dnl A dec_ttl action at offset 32 in ofpacts will cause the ofpacts
753 dnl buffer to be resized just before pushing the id of the dec_ttl action.
754 dnl Thus the implementation must account for this by using the
755 dnl reallocated buffer rather than the original buffer.
757 dnl A number of similar rules are added to try and exercise
758 dnl xrealloc sufficiently that it returns a different base pointer
759 AT_SETUP([ofproto-dpif - dec_ttl with arguments at offset 32 in ofpacts])
761 ADD_OF_PORTS([br0], [1])
762 (for i in `seq 0 255`; do
763 printf "dl_src=10:11:11:11:11:%02x actions=output:1,output:1,output:1,dec_ttl(1),controller\n" $i
765 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
769 dnl A note action at offset 24 in ofpacts will cause the ofpacts
770 dnl buffer to be resized just before pushing the id of the dec_ttl action.
771 dnl Thus the implementation must account for this by using the
772 dnl reallocated buffer rather than the original buffer.
774 dnl A number of similar rules are added to try and exercise
775 dnl xrealloc sufficiently that it returns a different base pointer
776 AT_SETUP([ofproto-dpif - note at offset 24 in ofpacts])
778 ADD_OF_PORTS([br0], [1])
779 (for i in `seq 0 255`; do
780 printf "dl_src=10:11:11:11:11:%02x actions=output:1,output:1,note:ff,controller\n" $i
782 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
786 AT_SETUP([ofproto-dpif - output, OFPP_NONE ingress port])
788 ADD_OF_PORTS([br0], [1], [2])
790 AT_CHECK([ovs-ofctl add-flow br0 action=normal])
792 # "in_port" defaults to OFPP_NONE if it's not specified.
793 flow="icmp,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,icmp_type=8,icmp_code=0"
794 AT_CHECK([ovs-appctl ofproto/trace br0 "$flow"], [0], [stdout])
795 AT_CHECK([tail -1 stdout | sed 's/Datapath actions: //' | tr "," "\n" | sort -n], [0], [dnl
804 AT_SETUP([ofproto-dpif - DSCP])
805 OVS_VSWITCHD_START([add-port br0 p1 -- set Interface p1 type=dummy])
806 ADD_OF_PORTS([br0], [9])
807 AT_DATA([flows.txt], [dnl
808 actions=output:LOCAL,enqueue:1:1,enqueue:1:2,enqueue:1:2,enqueue:1:1,output:1,mod_nw_tos:0,output:1,output:LOCAL
810 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
811 AT_CHECK([ovs-vsctl -- \
812 set Port p1 qos=@newqos --\
813 --id=@newqos create QoS type=linux-htb queues=1=@q1,2=@q2 --\
814 --id=@q1 create Queue dscp=1 --\
815 --id=@q2 create Queue dscp=2], [0], [ignore])
816 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(9),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=1.1.1.1,dst=2.2.2.2,proto=1,tos=0xff,ttl=128,frag=no),icmp(type=8,code=0)'], [0], [stdout])
817 AT_CHECK([tail -2 stdout], [0],
818 [Megaflow: recirc_id=0,skb_priority=0,ip,in_port=9,nw_tos=252,nw_frag=no
819 Datapath actions: dnl
821 set(ipv4(tos=0x4/0xfc)),set(skb_priority(0x1)),1,dnl
822 set(ipv4(tos=0x8/0xfc)),set(skb_priority(0x2)),1,dnl
824 set(ipv4(tos=0x4/0xfc)),set(skb_priority(0x1)),1,dnl
825 set(ipv4(tos=0xfc/0xfc)),set(skb_priority(0)),1,dnl
826 set(ipv4(tos=0/0xfc)),1,100
831 AT_SETUP([ofproto-dpif - output/flood flags])
833 ADD_OF_PORTS([br0], [1], [2], [3], [4], [5], [6], [7])
835 AT_DATA([flows.txt], [dnl
836 in_port=local actions=local,flood
837 in_port=1 actions=flood
838 in_port=2 actions=all
839 in_port=3 actions=output:LOCAL,output:1,output:2,output:3,output:4,output:5,output:6,output:7
840 in_port=4 actions=enqueue:LOCAL:1,enqueue:1:1,enqueue:2:1,enqueue:3:2,enqueue:4:1,enqueue:5:1,enqueue:6:1,enqueue:7:1
842 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
843 AT_CHECK([ovs-ofctl mod-port br0 5 noforward])
844 AT_CHECK([ovs-ofctl mod-port br0 6 noflood])
846 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(100),eth(src=00:00:00:00:00:01,dst=00:00:00:00:00:02),eth_type(0x0900)'], [0], [stdout])
847 AT_CHECK([tail -1 stdout \
848 | sed -e 's/Datapath actions: //' | tr ',' '\n' | sort], [0], [dnl
856 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(1),eth(src=00:00:00:00:00:01,dst=00:00:00:00:00:02),eth_type(0x0900)'], [0], [stdout])
857 AT_CHECK([tail -1 stdout \
858 | sed -e 's/Datapath actions: //' | tr ',' '\n' | sort], [0], [dnl
866 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(2),eth(src=00:00:00:00:00:01,dst=00:00:00:00:00:02),eth_type(0x0900)'], [0], [stdout])
867 AT_CHECK([tail -1 stdout \
868 | sed -e 's/Datapath actions: //' | tr ',' '\n' | sort], [0], [dnl
877 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(3),eth(src=00:00:00:00:00:01,dst=00:00:00:00:00:02),eth_type(0x0900)'], [0], [stdout])
878 AT_CHECK([tail -1 stdout], [0],
879 [Datapath actions: 100,1,2,4,6,7
882 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(4),eth(src=00:00:00:00:00:01,dst=00:00:00:00:00:02),eth_type(0x0900)'], [0], [stdout])
883 AT_CHECK([tail -1 stdout], [0],
884 [Datapath actions: set(skb_priority(0x1)),100,1,2,set(skb_priority(0x2)),3,set(skb_priority(0x1)),6,7
889 AT_SETUP([ofproto-dpif - Default Table Miss - OF1.0 (OFPTC_TABLE_MISS_CONTROLLER)])
890 OVS_VSWITCHD_START([dnl
891 add-port br0 p1 -- set Interface p1 type=dummy
893 on_exit 'kill `cat ovs-ofctl.pid`'
895 AT_CAPTURE_FILE([ofctl_monitor.log])
897 AT_CHECK([ovs-ofctl monitor br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
900 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=9),tcp_flags(syn)'
902 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
903 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
904 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
905 NXT_PACKET_IN (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
906 tcp,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=9,tcp_flags=syn tcp_csum:0
908 NXT_PACKET_IN (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
909 tcp,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=9,tcp_flags=syn tcp_csum:0
911 NXT_PACKET_IN (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
912 tcp,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=9,tcp_flags=syn tcp_csum:0
915 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
916 AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
923 AT_SETUP([ofproto-dpif - Default Table Miss - OF1.3 (OFPTC_TABLE_MISS_DROP)])
924 OVS_VSWITCHD_START([dnl
925 add-port br0 p1 -- set Interface p1 type=dummy
927 on_exit 'kill `cat ovs-ofctl.pid`'
929 AT_CAPTURE_FILE([ofctl_monitor.log])
930 AT_CHECK([ovs-ofctl del-flows br0])
932 AT_CHECK([ovs-ofctl monitor -OOpenFlow13 -P openflow10 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
934 dnl Test that missed packets are droped
936 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=9),tcp_flags(ack,syn)'
938 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
940 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
943 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
944 AT_CHECK([ovs-ofctl -OOpenFlow13 dump-flows br0 | ofctl_strip | sort], [0], [dnl
945 OFPST_FLOW reply (OF1.3):
951 AT_SETUP([ofproto-dpif - Table Miss - goto table and OFPTC_TABLE_MISS_CONTROLLER])
952 OVS_VSWITCHD_START([dnl
953 add-port br0 p1 -- set Interface p1 type=dummy
955 on_exit 'kill `cat ovs-ofctl.pid`'
957 AT_CAPTURE_FILE([ofctl_monitor.log])
958 AT_CHECK([ovs-ofctl -OOpenFlow12 add-flow br0 'table=0 actions=goto_table(1)'])
960 AT_CHECK([ovs-ofctl monitor -P openflow10 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
963 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=9),tcp_flags(urg|rst)'
965 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
966 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
967 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
968 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
969 tcp,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=9,tcp_flags=rst|urg tcp_csum:0
971 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
972 tcp,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=9,tcp_flags=rst|urg tcp_csum:0
974 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
975 tcp,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=9,tcp_flags=rst|urg tcp_csum:0
978 AT_CHECK([ovs-appctl revalidator/purge], [0])
979 AT_CHECK([ovs-ofctl -OOpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
980 n_packets=3, n_bytes=180, actions=goto_table:1
981 OFPST_FLOW reply (OF1.2):
987 AT_SETUP([ofproto-dpif - Table Miss - resubmit and OFPTC_TABLE_MISS_CONTROLLER])
988 OVS_VSWITCHD_START([dnl
989 add-port br0 p1 -- set Interface p1 type=dummy
991 on_exit 'kill `cat ovs-ofctl.pid`'
993 AT_CAPTURE_FILE([ofctl_monitor.log])
994 AT_CHECK([ovs-ofctl -OOpenFlow12 add-flow br0 'table=0 actions=resubmit(1,1)'])
996 AT_CHECK([ovs-ofctl monitor -P openflow10 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
999 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=9),tcp_flags(0x010)'
1002 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
1003 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1006 AT_CHECK([ovs-appctl revalidator/purge], [0])
1007 AT_CHECK([ovs-ofctl -OOpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
1008 n_packets=3, n_bytes=180, actions=resubmit(1,1)
1009 OFPST_FLOW reply (OF1.2):
1015 AT_SETUP([ofproto-dpif - Table Miss - OFPTC_TABLE_MISS_CONTINUE])
1016 OVS_VSWITCHD_START([dnl
1017 add-port br0 p1 -- set Interface p1 type=dummy
1019 on_exit 'kill `cat ovs-ofctl.pid`'
1021 AT_CAPTURE_FILE([ofctl_monitor.log])
1022 AT_CHECK([ovs-ofctl add-flow br0 'table=1 dl_src=10:11:11:11:11:11 actions=controller'])
1023 AT_CHECK([ovs-ofctl -OOpenFlow11 mod-table br0 all continue])
1025 dnl Miss table 0, Hit table 1
1026 AT_CHECK([ovs-ofctl monitor br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1029 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=10:11:11:11:11:11,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=9),tcp_flags(0x010)'
1031 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1032 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
1034 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1035 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1036 tcp,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=9,tcp_flags=ack tcp_csum:0
1038 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1039 tcp,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=9,tcp_flags=ack tcp_csum:0
1041 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1042 tcp,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=9,tcp_flags=ack tcp_csum:0
1045 dnl Hit table 0, Miss all other tables, sent to controller
1046 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1049 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=9),tcp_flags(0x010)'
1051 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1052 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
1054 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1055 NXT_PACKET_IN (xid=0x0): table_id=253 cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
1056 tcp,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=9,tcp_flags=ack tcp_csum:0
1058 NXT_PACKET_IN (xid=0x0): table_id=253 cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
1059 tcp,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=9,tcp_flags=ack tcp_csum:0
1061 NXT_PACKET_IN (xid=0x0): table_id=253 cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
1062 tcp,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=9,tcp_flags=ack tcp_csum:0
1065 AT_CHECK([ovs-appctl revalidator/purge], [0])
1066 AT_CHECK([ovs-ofctl -OOpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
1067 table=1, n_packets=3, n_bytes=180, dl_src=10:11:11:11:11:11 actions=CONTROLLER:65535
1068 OFPST_FLOW reply (OF1.2):
1074 AT_SETUP([ofproto-dpif - Table Miss - goto table and OFPTC_TABLE_MISS_CONTINUE])
1075 OVS_VSWITCHD_START([dnl
1076 add-port br0 p1 -- set Interface p1 type=dummy
1078 on_exit 'kill `cat ovs-ofctl.pid`'
1080 AT_CAPTURE_FILE([ofctl_monitor.log])
1081 AT_DATA([flows.txt], [dnl
1082 table=0 actions=goto_table(1)
1083 table=2 dl_src=10:11:11:11:11:11 actions=controller
1085 AT_CHECK([ovs-ofctl -OOpenFlow12 add-flows br0 flows.txt])
1086 AT_CHECK([ovs-ofctl -OOpenFlow11 mod-table br0 all continue])
1088 dnl Hit table 0, Miss table 1, Hit table 2
1089 AT_CHECK([ovs-ofctl monitor br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1092 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=10:11:11:11:11:11,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=9),tcp_flags(0x010)'
1094 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1095 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1097 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1098 NXT_PACKET_IN (xid=0x0): table_id=2 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1099 tcp,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=9,tcp_flags=ack tcp_csum:0
1101 NXT_PACKET_IN (xid=0x0): table_id=2 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1102 tcp,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=9,tcp_flags=ack tcp_csum:0
1104 NXT_PACKET_IN (xid=0x0): table_id=2 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1105 tcp,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=9,tcp_flags=ack tcp_csum:0
1108 dnl Hit table 1, Miss all other tables, sent to controller
1109 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1112 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=9),tcp_flags(0x010)'
1114 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1115 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
1117 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1118 NXT_PACKET_IN (xid=0x0): table_id=253 cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
1119 tcp,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=9,tcp_flags=ack tcp_csum:0
1121 NXT_PACKET_IN (xid=0x0): table_id=253 cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
1122 tcp,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=9,tcp_flags=ack tcp_csum:0
1124 NXT_PACKET_IN (xid=0x0): table_id=253 cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
1125 tcp,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=9,tcp_flags=ack tcp_csum:0
1128 AT_CHECK([ovs-appctl revalidator/purge], [0])
1129 AT_CHECK([ovs-ofctl -OOpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
1130 n_packets=6, n_bytes=360, actions=goto_table:1
1131 table=2, n_packets=3, n_bytes=180, dl_src=10:11:11:11:11:11 actions=CONTROLLER:65535
1132 OFPST_FLOW reply (OF1.2):
1138 AT_SETUP([ofproto-dpif - Table Miss - resubmit and OFPTC_TABLE_MISS_CONTINUE])
1139 OVS_VSWITCHD_START([dnl
1140 add-port br0 p1 -- set Interface p1 type=dummy
1142 on_exit 'kill `cat ovs-ofctl.pid`'
1144 AT_CAPTURE_FILE([ofctl_monitor.log])
1145 AT_DATA([flows.txt], [dnl
1146 table=0 actions=resubmit(1,1)
1147 table=2 dl_src=10:11:11:11:11:11 actions=controller
1149 AT_CHECK([ovs-ofctl -OOpenFlow12 add-flows br0 flows.txt])
1150 AT_CHECK([ovs-ofctl -OOpenFlow11 mod-table br0 all continue])
1152 dnl Hit table 0, Miss table 1, Dropped
1153 AT_CHECK([ovs-ofctl monitor br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1156 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=10:11:11:11:11:11,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=9),tcp_flags(0x010)'
1158 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1160 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1163 dnl Hit table 1, Dropped
1164 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1167 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=9),tcp_flags(0x010)'
1169 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
1171 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1174 AT_CHECK([ovs-appctl revalidator/purge], [0])
1175 AT_CHECK([ovs-ofctl -OOpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
1176 n_packets=6, n_bytes=360, actions=resubmit(1,1)
1177 table=2, dl_src=10:11:11:11:11:11 actions=CONTROLLER:65535
1178 OFPST_FLOW reply (OF1.2):
1184 AT_SETUP([ofproto-dpif - Table Miss - OFPTC_TABLE_MISS_DROP])
1185 OVS_VSWITCHD_START([dnl
1186 add-port br0 p1 -- set Interface p1 type=dummy
1188 on_exit 'kill `cat ovs-ofctl.pid`'
1190 AT_CAPTURE_FILE([ofctl_monitor.log])
1191 AT_CHECK([ovs-ofctl -OOpenFlow11 mod-table br0 all drop])
1193 AT_CHECK([ovs-ofctl monitor -P openflow10 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1195 dnl Test that missed packets are droped
1197 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=9),tcp_flags(0x010)'
1199 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
1201 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1204 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1205 AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
1212 AT_SETUP([ofproto-dpif - Table Miss - goto table and OFPTC_TABLE_MISS_DROP])
1213 OVS_VSWITCHD_START([dnl
1214 add-port br0 p1 -- set Interface p1 type=dummy
1216 on_exit 'kill `cat ovs-ofctl.pid`'
1218 AT_CAPTURE_FILE([ofctl_monitor.log])
1219 AT_CHECK([ovs-ofctl del-flows br0])
1220 AT_CHECK([ovs-ofctl -OOpenFlow12 add-flow br0 'table=0 actions=goto_table(1)'])
1221 AT_CHECK([ovs-ofctl -OOpenFlow11 mod-table br0 all drop])
1223 AT_CHECK([ovs-ofctl monitor -P openflow10 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1225 dnl Test that missed packets are droped
1227 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=9),tcp_flags(0x010)'
1229 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
1231 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1234 AT_CHECK([ovs-appctl revalidator/purge], [0])
1235 AT_CHECK([ovs-ofctl -OOpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
1236 n_packets=3, n_bytes=180, actions=goto_table:1
1237 OFPST_FLOW reply (OF1.2):
1243 AT_SETUP([ofproto-dpif - Table Miss - resubmit and OFPTC_TABLE_MISS_DROP])
1244 OVS_VSWITCHD_START([dnl
1245 add-port br0 p1 -- set Interface p1 type=dummy
1247 on_exit 'kill `cat ovs-ofctl.pid`'
1249 AT_CAPTURE_FILE([ofctl_monitor.log])
1250 AT_CHECK([ovs-ofctl del-flows br0])
1251 AT_CHECK([ovs-ofctl -OOpenFlow12 add-flow br0 'table=0 actions=resubmit(1,1)'])
1252 AT_CHECK([ovs-ofctl -OOpenFlow11 mod-table br0 all drop])
1254 AT_CHECK([ovs-ofctl monitor -P openflow10 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1256 dnl Test that missed packets are droped
1258 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=9),tcp_flags(0x010)'
1260 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
1262 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1265 AT_CHECK([ovs-appctl revalidator/purge], [0])
1266 AT_CHECK([ovs-ofctl -OOpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
1267 n_packets=3, n_bytes=180, actions=resubmit(1,1)
1268 OFPST_FLOW reply (OF1.2):
1274 AT_SETUP([ofproto-dpif - controller])
1275 OVS_VSWITCHD_START([dnl
1276 add-port br0 p1 -- set Interface p1 type=dummy
1278 on_exit 'kill `cat ovs-ofctl.pid`'
1280 AT_CAPTURE_FILE([ofctl_monitor.log])
1281 AT_DATA([flows.txt], [dnl
1282 cookie=0x0 dl_src=10:11:11:11:11:11 actions=controller
1283 cookie=0x1 dl_src=20:22:22:22:22:22 actions=controller,resubmit(80,1)
1284 cookie=0x2 dl_src=30:33:33:33:33:33 actions=mod_vlan_vid:15,controller
1286 cookie=0x3 table=1 in_port=80 actions=load:1->NXM_NX_REG0[[]],mod_vlan_vid:80,controller,resubmit(81,2)
1287 cookie=0x4 table=2 in_port=81 actions=load:2->NXM_NX_REG1[[]],mod_dl_src:80:81:81:81:81:81,controller,resubmit(82,3)
1288 cookie=0x5 table=3 in_port=82 actions=load:3->NXM_NX_REG2[[]],mod_dl_dst:82:82:82:82:82:82,controller,resubmit(83,4)
1289 cookie=0x6 table=4 in_port=83 actions=load:4->NXM_NX_REG3[[]],mod_nw_src:83.83.83.83,controller,resubmit(84,5)
1290 cookie=0x7 table=5 in_port=84 actions=load:5->NXM_NX_REG4[[]],load:6->NXM_NX_TUN_ID[[]],mod_nw_dst:84.84.84.84,controller,resubmit(85,6)
1291 cookie=0x8 table=6 in_port=85 actions=mod_tp_src:85,controller,resubmit(86,7)
1292 cookie=0x9 table=7 in_port=86 actions=mod_tp_dst:86,controller,controller
1293 cookie=0xa dl_src=40:44:44:44:44:41 actions=mod_vlan_vid:99,mod_vlan_pcp:1,controller
1294 cookie=0xd dl_src=80:88:88:88:88:88 arp actions=load:2->OXM_OF_ARP_OP[[]],controller,load:0xc0a88001->OXM_OF_ARP_SPA[[]],controller,load:0x404444444441->OXM_OF_ARP_THA[[]],load:0x01010101->OXM_OF_ARP_SPA[[]],load:0x02020202->OXM_OF_ARP_TPA[[]],controller
1296 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
1299 AT_CHECK([ovs-ofctl monitor -P openflow10 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1302 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=9),tcp_flags(0x010)'
1304 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1305 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1307 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1308 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
1309 tcp,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=9,tcp_flags=ack tcp_csum:0
1311 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
1312 tcp,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=9,tcp_flags=ack tcp_csum:0
1314 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
1315 tcp,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=9,tcp_flags=ack tcp_csum:0
1318 dnl Singleton controller action.
1319 AT_CHECK([ovs-ofctl monitor -P openflow10 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1322 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=10:11:11:11:11:11,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=10),tcp_flags(0x002)'
1324 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1325 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1327 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1328 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1329 tcp,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:0
1331 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1332 tcp,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:0
1334 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1335 tcp,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:0
1338 dnl Modified controller action.
1339 AT_CHECK([ovs-ofctl monitor -P openflow10 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1342 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=30:33:33:33:33:33,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=10),tcp_flags(0x001)'
1344 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1345 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1347 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1348 OFPT_PACKET_IN (xid=0x0): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1349 tcp,dl_vlan=15,dl_vlan_pcp=0,dl_src=30:33:33:33:33:33,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=fin tcp_csum:0
1351 OFPT_PACKET_IN (xid=0x0): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1352 tcp,dl_vlan=15,dl_vlan_pcp=0,dl_src=30:33:33:33:33:33,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=fin tcp_csum:0
1354 OFPT_PACKET_IN (xid=0x0): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1355 tcp,dl_vlan=15,dl_vlan_pcp=0,dl_src=30:33:33:33:33:33,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=fin tcp_csum:0
1358 dnl Modified VLAN controller action.
1359 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1362 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=40:44:44:44:44:41,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=16,tos=0,ttl=64,frag=no)'
1364 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1365 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1367 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1368 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1369 ip,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:44:41,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_proto=16,nw_tos=0,nw_ecn=0,nw_ttl=64
1371 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1372 ip,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:44:41,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_proto=16,nw_tos=0,nw_ecn=0,nw_ttl=64
1374 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1375 ip,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:44:41,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_proto=16,nw_tos=0,nw_ecn=0,nw_ttl=64
1379 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1382 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=20:22:22:22:22:22,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=11),tcp_flags(0x001)'
1384 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 18])
1385 ovs-appctl -t ovs-ofctl exit
1387 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1388 NXT_PACKET_IN (xid=0x0): cookie=0x1 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1389 tcp,vlan_tci=0x0000,dl_src=20:22:22:22:22:22,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=11,tcp_flags=fin tcp_csum:0
1391 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x3 total_len=64 reg0=0x1,in_port=1 (via action) data_len=64 (unbuffered)
1392 tcp,dl_vlan=80,dl_vlan_pcp=0,dl_src=20:22:22:22:22:22,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=11,tcp_flags=fin tcp_csum:0
1394 NXT_PACKET_IN (xid=0x0): table_id=2 cookie=0x4 total_len=64 reg0=0x1,reg1=0x2,in_port=1 (via action) data_len=64 (unbuffered)
1395 tcp,dl_vlan=80,dl_vlan_pcp=0,dl_src=80:81:81:81:81:81,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=11,tcp_flags=fin tcp_csum:0
1397 NXT_PACKET_IN (xid=0x0): table_id=3 cookie=0x5 total_len=64 reg0=0x1,reg1=0x2,reg2=0x3,in_port=1 (via action) data_len=64 (unbuffered)
1398 tcp,dl_vlan=80,dl_vlan_pcp=0,dl_src=80:81:81:81:81:81,dl_dst=82:82:82:82:82:82,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=11,tcp_flags=fin tcp_csum:0
1400 NXT_PACKET_IN (xid=0x0): table_id=4 cookie=0x6 total_len=64 reg0=0x1,reg1=0x2,reg2=0x3,reg3=0x4,in_port=1 (via action) data_len=64 (unbuffered)
1401 tcp,dl_vlan=80,dl_vlan_pcp=0,dl_src=80:81:81:81:81:81,dl_dst=82:82:82:82:82:82,nw_src=83.83.83.83,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=11,tcp_flags=fin tcp_csum:1a03
1403 NXT_PACKET_IN (xid=0x0): table_id=5 cookie=0x7 total_len=64 reg0=0x1,reg1=0x2,reg2=0x3,reg3=0x4,reg4=0x5,tun_id=0x6,in_port=1 (via action) data_len=64 (unbuffered)
1404 tcp,dl_vlan=80,dl_vlan_pcp=0,dl_src=80:81:81:81:81:81,dl_dst=82:82:82:82:82:82,nw_src=83.83.83.83,nw_dst=84.84.84.84,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=11,tcp_flags=fin tcp_csum:3205
1406 NXT_PACKET_IN (xid=0x0): table_id=6 cookie=0x8 total_len=64 reg0=0x1,reg1=0x2,reg2=0x3,reg3=0x4,reg4=0x5,tun_id=0x6,in_port=1 (via action) data_len=64 (unbuffered)
1407 tcp,dl_vlan=80,dl_vlan_pcp=0,dl_src=80:81:81:81:81:81,dl_dst=82:82:82:82:82:82,nw_src=83.83.83.83,nw_dst=84.84.84.84,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=85,tp_dst=11,tcp_flags=fin tcp_csum:31b8
1409 NXT_PACKET_IN (xid=0x0): table_id=7 cookie=0x9 total_len=64 reg0=0x1,reg1=0x2,reg2=0x3,reg3=0x4,reg4=0x5,tun_id=0x6,in_port=1 (via action) data_len=64 (unbuffered)
1410 tcp,dl_vlan=80,dl_vlan_pcp=0,dl_src=80:81:81:81:81:81,dl_dst=82:82:82:82:82:82,nw_src=83.83.83.83,nw_dst=84.84.84.84,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=85,tp_dst=86,tcp_flags=fin tcp_csum:316d
1412 NXT_PACKET_IN (xid=0x0): table_id=7 cookie=0x9 total_len=64 reg0=0x1,reg1=0x2,reg2=0x3,reg3=0x4,reg4=0x5,tun_id=0x6,in_port=1 (via action) data_len=64 (unbuffered)
1413 tcp,dl_vlan=80,dl_vlan_pcp=0,dl_src=80:81:81:81:81:81,dl_dst=82:82:82:82:82:82,nw_src=83.83.83.83,nw_dst=84.84.84.84,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=85,tp_dst=86,tcp_flags=fin tcp_csum:316d
1417 AT_CHECK([ovs-ofctl monitor br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1420 ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 20 22 22 22 22 22 08 00 45 00 00 1C 00 00 00 00 00 11 00 00 C0 A8 00 01 C0 A8 00 02 00 08 00 0B 00 00 12 34 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00'
1422 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 18])
1423 ovs-appctl -t ovs-ofctl exit
1425 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1426 NXT_PACKET_IN (xid=0x0): cookie=0x1 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1427 udp,vlan_tci=0x0000,dl_src=20:22:22:22:22:22,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=8,tp_dst=11 udp_csum:1234
1429 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x3 total_len=64 reg0=0x1,in_port=1 (via action) data_len=64 (unbuffered)
1430 udp,dl_vlan=80,dl_vlan_pcp=0,dl_src=20:22:22:22:22:22,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=8,tp_dst=11 udp_csum:1234
1432 NXT_PACKET_IN (xid=0x0): table_id=2 cookie=0x4 total_len=64 reg0=0x1,reg1=0x2,in_port=1 (via action) data_len=64 (unbuffered)
1433 udp,dl_vlan=80,dl_vlan_pcp=0,dl_src=80:81:81:81:81:81,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=8,tp_dst=11 udp_csum:1234
1435 NXT_PACKET_IN (xid=0x0): table_id=3 cookie=0x5 total_len=64 reg0=0x1,reg1=0x2,reg2=0x3,in_port=1 (via action) data_len=64 (unbuffered)
1436 udp,dl_vlan=80,dl_vlan_pcp=0,dl_src=80:81:81:81:81:81,dl_dst=82:82:82:82:82:82,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=8,tp_dst=11 udp_csum:1234
1438 NXT_PACKET_IN (xid=0x0): table_id=4 cookie=0x6 total_len=64 reg0=0x1,reg1=0x2,reg2=0x3,reg3=0x4,in_port=1 (via action) data_len=64 (unbuffered)
1439 udp,dl_vlan=80,dl_vlan_pcp=0,dl_src=80:81:81:81:81:81,dl_dst=82:82:82:82:82:82,nw_src=83.83.83.83,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=8,tp_dst=11 udp_csum:2c37
1441 NXT_PACKET_IN (xid=0x0): table_id=5 cookie=0x7 total_len=64 reg0=0x1,reg1=0x2,reg2=0x3,reg3=0x4,reg4=0x5,tun_id=0x6,in_port=1 (via action) data_len=64 (unbuffered)
1442 udp,dl_vlan=80,dl_vlan_pcp=0,dl_src=80:81:81:81:81:81,dl_dst=82:82:82:82:82:82,nw_src=83.83.83.83,nw_dst=84.84.84.84,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=8,tp_dst=11 udp_csum:4439
1444 NXT_PACKET_IN (xid=0x0): table_id=6 cookie=0x8 total_len=64 reg0=0x1,reg1=0x2,reg2=0x3,reg3=0x4,reg4=0x5,tun_id=0x6,in_port=1 (via action) data_len=64 (unbuffered)
1445 udp,dl_vlan=80,dl_vlan_pcp=0,dl_src=80:81:81:81:81:81,dl_dst=82:82:82:82:82:82,nw_src=83.83.83.83,nw_dst=84.84.84.84,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=85,tp_dst=11 udp_csum:43ec
1447 NXT_PACKET_IN (xid=0x0): table_id=7 cookie=0x9 total_len=64 reg0=0x1,reg1=0x2,reg2=0x3,reg3=0x4,reg4=0x5,tun_id=0x6,in_port=1 (via action) data_len=64 (unbuffered)
1448 udp,dl_vlan=80,dl_vlan_pcp=0,dl_src=80:81:81:81:81:81,dl_dst=82:82:82:82:82:82,nw_src=83.83.83.83,nw_dst=84.84.84.84,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=85,tp_dst=86 udp_csum:43a1
1450 NXT_PACKET_IN (xid=0x0): table_id=7 cookie=0x9 total_len=64 reg0=0x1,reg1=0x2,reg2=0x3,reg3=0x4,reg4=0x5,tun_id=0x6,in_port=1 (via action) data_len=64 (unbuffered)
1451 udp,dl_vlan=80,dl_vlan_pcp=0,dl_src=80:81:81:81:81:81,dl_dst=82:82:82:82:82:82,nw_src=83.83.83.83,nw_dst=84.84.84.84,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=85,tp_dst=86 udp_csum:43a1
1454 dnl Modified ARP controller action.
1455 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1458 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=80:88:88:88:88:88,dst=ff:ff:ff:ff:ff:ff),eth_type(0x0806),arp(sip=192.168.0.1,tip=192.168.0.2,op=1,sha=50:54:00:00:00:05,tha=00:00:00:00:00:00)'
1461 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 18])
1462 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
1463 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1464 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1465 arp,vlan_tci=0x0000,dl_src=80:88:88:88:88:88,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=192.168.0.1,arp_tpa=192.168.0.2,arp_op=2,arp_sha=50:54:00:00:00:05,arp_tha=00:00:00:00:00:00
1466 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1467 arp,vlan_tci=0x0000,dl_src=80:88:88:88:88:88,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=192.168.128.1,arp_tpa=192.168.0.2,arp_op=2,arp_sha=50:54:00:00:00:05,arp_tha=00:00:00:00:00:00
1468 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1469 arp,vlan_tci=0x0000,dl_src=80:88:88:88:88:88,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=1.1.1.1,arp_tpa=2.2.2.2,arp_op=2,arp_sha=50:54:00:00:00:05,arp_tha=40:44:44:44:44:41
1470 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1471 arp,vlan_tci=0x0000,dl_src=80:88:88:88:88:88,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=192.168.0.1,arp_tpa=192.168.0.2,arp_op=2,arp_sha=50:54:00:00:00:05,arp_tha=00:00:00:00:00:00
1472 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1473 arp,vlan_tci=0x0000,dl_src=80:88:88:88:88:88,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=192.168.128.1,arp_tpa=192.168.0.2,arp_op=2,arp_sha=50:54:00:00:00:05,arp_tha=00:00:00:00:00:00
1474 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1475 arp,vlan_tci=0x0000,dl_src=80:88:88:88:88:88,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=1.1.1.1,arp_tpa=2.2.2.2,arp_op=2,arp_sha=50:54:00:00:00:05,arp_tha=40:44:44:44:44:41
1476 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1477 arp,vlan_tci=0x0000,dl_src=80:88:88:88:88:88,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=192.168.0.1,arp_tpa=192.168.0.2,arp_op=2,arp_sha=50:54:00:00:00:05,arp_tha=00:00:00:00:00:00
1478 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1479 arp,vlan_tci=0x0000,dl_src=80:88:88:88:88:88,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=192.168.128.1,arp_tpa=192.168.0.2,arp_op=2,arp_sha=50:54:00:00:00:05,arp_tha=00:00:00:00:00:00
1480 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1481 arp,vlan_tci=0x0000,dl_src=80:88:88:88:88:88,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=1.1.1.1,arp_tpa=2.2.2.2,arp_op=2,arp_sha=50:54:00:00:00:05,arp_tha=40:44:44:44:44:41
1484 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1487 AT_CHECK([ovs-ofctl monitor br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1490 ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 20 22 22 22 22 22 08 00 45 00 00 24 00 00 00 00 00 84 00 00 C0 A8 00 01 C0 A8 00 02 04 58 08 af 00 00 00 00 d9 d7 91 57 01 00 00 34 cf 28 ec 4e 00 01 40 00 00 0a ff ff b7 53 24 19 00 05 00 08 7f 00 00 01 00 05 00 08 c0 a8 02 07 00 0c 00 06 00 05 00 00 80 00 00 04 c0 00 00 04'
1493 AT_CHECK([ovs-appctl time/warp 1000], [0], [ignore])
1494 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 18])
1495 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
1496 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1497 NXT_PACKET_IN (xid=0x0): cookie=0x1 total_len=98 in_port=1 (via action) data_len=98 (unbuffered)
1498 sctp,vlan_tci=0x0000,dl_src=20:22:22:22:22:22,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=1112,tp_dst=2223 sctp_csum:d9d79157
1500 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x3 total_len=102 reg0=0x1,in_port=1 (via action) data_len=102 (unbuffered)
1501 sctp,dl_vlan=80,dl_vlan_pcp=0,dl_src=20:22:22:22:22:22,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=1112,tp_dst=2223 sctp_csum:d9d79157
1503 NXT_PACKET_IN (xid=0x0): table_id=2 cookie=0x4 total_len=102 reg0=0x1,reg1=0x2,in_port=1 (via action) data_len=102 (unbuffered)
1504 sctp,dl_vlan=80,dl_vlan_pcp=0,dl_src=80:81:81:81:81:81,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=1112,tp_dst=2223 sctp_csum:d9d79157
1506 NXT_PACKET_IN (xid=0x0): table_id=3 cookie=0x5 total_len=102 reg0=0x1,reg1=0x2,reg2=0x3,in_port=1 (via action) data_len=102 (unbuffered)
1507 sctp,dl_vlan=80,dl_vlan_pcp=0,dl_src=80:81:81:81:81:81,dl_dst=82:82:82:82:82:82,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=1112,tp_dst=2223 sctp_csum:d9d79157
1509 NXT_PACKET_IN (xid=0x0): table_id=4 cookie=0x6 total_len=102 reg0=0x1,reg1=0x2,reg2=0x3,reg3=0x4,in_port=1 (via action) data_len=102 (unbuffered)
1510 sctp,dl_vlan=80,dl_vlan_pcp=0,dl_src=80:81:81:81:81:81,dl_dst=82:82:82:82:82:82,nw_src=83.83.83.83,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=1112,tp_dst=2223 sctp_csum:d9d79157
1512 NXT_PACKET_IN (xid=0x0): table_id=5 cookie=0x7 total_len=102 reg0=0x1,reg1=0x2,reg2=0x3,reg3=0x4,reg4=0x5,tun_id=0x6,in_port=1 (via action) data_len=102 (unbuffered)
1513 sctp,dl_vlan=80,dl_vlan_pcp=0,dl_src=80:81:81:81:81:81,dl_dst=82:82:82:82:82:82,nw_src=83.83.83.83,nw_dst=84.84.84.84,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=1112,tp_dst=2223 sctp_csum:d9d79157
1515 NXT_PACKET_IN (xid=0x0): table_id=6 cookie=0x8 total_len=102 reg0=0x1,reg1=0x2,reg2=0x3,reg3=0x4,reg4=0x5,tun_id=0x6,in_port=1 (via action) data_len=102 (unbuffered)
1516 sctp,dl_vlan=80,dl_vlan_pcp=0,dl_src=80:81:81:81:81:81,dl_dst=82:82:82:82:82:82,nw_src=83.83.83.83,nw_dst=84.84.84.84,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=85,tp_dst=2223 sctp_csum:dd778f5f
1518 NXT_PACKET_IN (xid=0x0): table_id=7 cookie=0x9 total_len=102 reg0=0x1,reg1=0x2,reg2=0x3,reg3=0x4,reg4=0x5,tun_id=0x6,in_port=1 (via action) data_len=102 (unbuffered)
1519 sctp,dl_vlan=80,dl_vlan_pcp=0,dl_src=80:81:81:81:81:81,dl_dst=82:82:82:82:82:82,nw_src=83.83.83.83,nw_dst=84.84.84.84,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=85,tp_dst=86 sctp_csum:62051f56
1521 NXT_PACKET_IN (xid=0x0): table_id=7 cookie=0x9 total_len=102 reg0=0x1,reg1=0x2,reg2=0x3,reg3=0x4,reg4=0x5,tun_id=0x6,in_port=1 (via action) data_len=102 (unbuffered)
1522 sctp,dl_vlan=80,dl_vlan_pcp=0,dl_src=80:81:81:81:81:81,dl_dst=82:82:82:82:82:82,nw_src=83.83.83.83,nw_dst=84.84.84.84,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=85,tp_dst=86 sctp_csum:62051f56
1525 AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
1526 cookie=0x1, n_packets=3, n_bytes=218, dl_src=20:22:22:22:22:22 actions=CONTROLLER:65535,resubmit(80,1)
1527 cookie=0x2, n_packets=3, n_bytes=180, dl_src=30:33:33:33:33:33 actions=mod_vlan_vid:15,CONTROLLER:65535
1528 cookie=0x3, table=1, n_packets=3, n_bytes=218, in_port=80 actions=load:0x1->NXM_NX_REG0[[]],mod_vlan_vid:80,CONTROLLER:65535,resubmit(81,2)
1529 cookie=0x4, table=2, n_packets=3, n_bytes=218, in_port=81 actions=load:0x2->NXM_NX_REG1[[]],mod_dl_src:80:81:81:81:81:81,CONTROLLER:65535,resubmit(82,3)
1530 cookie=0x5, table=3, n_packets=3, n_bytes=218, in_port=82 actions=load:0x3->NXM_NX_REG2[[]],mod_dl_dst:82:82:82:82:82:82,CONTROLLER:65535,resubmit(83,4)
1531 cookie=0x6, table=4, n_packets=3, n_bytes=218, in_port=83 actions=load:0x4->NXM_NX_REG3[[]],mod_nw_src:83.83.83.83,CONTROLLER:65535,resubmit(84,5)
1532 cookie=0x7, table=5, n_packets=3, n_bytes=218, in_port=84 actions=load:0x5->NXM_NX_REG4[[]],load:0x6->NXM_NX_TUN_ID[[]],mod_nw_dst:84.84.84.84,CONTROLLER:65535,resubmit(85,6)
1533 cookie=0x8, table=6, n_packets=3, n_bytes=218, in_port=85 actions=mod_tp_src:85,CONTROLLER:65535,resubmit(86,7)
1534 cookie=0x9, table=7, n_packets=3, n_bytes=218, in_port=86 actions=mod_tp_dst:86,CONTROLLER:65535,CONTROLLER:65535
1535 cookie=0xa, n_packets=3, n_bytes=180, dl_src=40:44:44:44:44:41 actions=mod_vlan_vid:99,mod_vlan_pcp:1,CONTROLLER:65535
1536 cookie=0xd, n_packets=3, n_bytes=180, arp,dl_src=80:88:88:88:88:88 actions=load:0x2->NXM_OF_ARP_OP[[]],CONTROLLER:65535,load:0xc0a88001->NXM_OF_ARP_SPA[[]],CONTROLLER:65535,load:0x404444444441->NXM_NX_ARP_THA[[]],load:0x1010101->NXM_OF_ARP_SPA[[]],load:0x2020202->NXM_OF_ARP_TPA[[]],CONTROLLER:65535
1537 n_packets=3, n_bytes=180, dl_src=10:11:11:11:11:11 actions=CONTROLLER:65535
1544 AT_SETUP([ofproto-dpif - MPLS handling])
1545 OVS_VSWITCHD_START([dnl
1546 add-port br0 p1 -- set Interface p1 type=dummy
1548 on_exit 'kill `cat ovs-ofctl.pid`'
1550 AT_CAPTURE_FILE([ofctl_monitor.log])
1551 AT_DATA([flows.txt], [dnl
1552 cookie=0xa dl_src=40:44:44:44:44:42 actions=push_mpls:0x8847,load:10->OXM_OF_MPLS_LABEL[[]],load:3->OXM_OF_MPLS_TC[[]],controller
1553 cookie=0xa dl_src=41:44:44:44:44:42 actions=push_mpls:0x8847,load:10->OXM_OF_MPLS_LABEL[[]],load:3->OXM_OF_MPLS_TC[[]],pop_mpls:0x0800,controller
1554 cookie=0xa dl_src=40:44:44:44:44:43 actions=push_mpls:0x8847,load:10->OXM_OF_MPLS_LABEL[[]],load:3->OXM_OF_MPLS_TC[[]],controller
1555 cookie=0xa dl_src=40:44:44:44:44:44 actions=push_mpls:0x8847,load:10->OXM_OF_MPLS_LABEL[[]],load:3->OXM_OF_MPLS_TC[[]],controller
1556 cookie=0xa dl_src=40:44:44:44:44:45 actions=push_mpls:0x8847,load:10->OXM_OF_MPLS_LABEL[[]],load:3->OXM_OF_MPLS_TC[[]],dec_mpls_ttl,controller
1557 cookie=0xa dl_src=40:44:44:44:44:46 actions=push_mpls:0x8847,load:10->OXM_OF_MPLS_LABEL[[]],load:3->OXM_OF_MPLS_TC[[]],set_mpls_ttl(10),controller
1558 cookie=0xa dl_src=40:44:44:44:44:47 actions=push_mpls:0x8847,load:10->OXM_OF_MPLS_LABEL[[]],load:3->OXM_OF_MPLS_TC[[]],dec_mpls_ttl,set_mpls_ttl(10),controller
1559 cookie=0xa dl_src=40:44:44:44:44:48 actions=push_mpls:0x8847,load:10->OXM_OF_MPLS_LABEL[[]],load:3->OXM_OF_MPLS_TC[[]],set_mpls_ttl(10),dec_mpls_ttl,controller
1560 cookie=0xa mpls,dl_src=40:44:44:44:44:49 actions=push_mpls:0x8848,load:10->OXM_OF_MPLS_LABEL[[]],CONTROLLER:65535
1561 cookie=0xb dl_src=50:55:55:55:55:55 dl_type=0x8847 actions=load:1000->OXM_OF_MPLS_LABEL[[]],controller
1562 cookie=0xd dl_src=60:66:66:66:66:66 actions=pop_mpls:0x0800,controller
1563 cookie=0xc dl_src=70:77:77:77:77:77 actions=push_mpls:0x8848,load:1000->OXM_OF_MPLS_LABEL[[]],load:7->OXM_OF_MPLS_TC[[]],controller
1565 cookie=0xd dl_src=60:66:66:66:00:01 actions=pop_mpls:0x0800,dec_ttl,controller
1566 cookie=0xd dl_src=60:66:66:66:00:02 actions=pop_mpls:0x0800,load:0xa000001->OXM_OF_IPV4_DST[[]],controller
1567 cookie=0xd dl_src=60:66:66:66:00:03 actions=pop_mpls:0x0800,move:OXM_OF_IPV4_DST[[]]->OXM_OF_IPV4_SRC[[]],controller
1568 cookie=0xd dl_src=60:66:66:66:00:04 actions=pop_mpls:0x0800,push:OXM_OF_IPV4_DST[[]],pop:OXM_OF_IPV4_SRC[[]],controller
1569 cookie=0xd dl_src=60:66:66:66:00:05 actions=pop_mpls:0x0800,multipath(eth_src,50,modulo_n,256,0,OXM_OF_IPV4_SRC[[0..7]]),controller
1570 cookie=0xd dl_src=60:66:66:66:00:06 actions=pop_mpls:0x0800,bundle_load(eth_src,50,hrw,ofport,OXM_OF_IPV4_SRC[[0..15]],slaves:1,2),controller
1571 cookie=0xd dl_src=60:66:66:66:00:07 actions=pop_mpls:0x0800,learn(table=1,hard_timeout=60,eth_type=0x800,nw_proto=6,OXM_OF_IPV4_SRC[[]]=OXM_OF_IPV4_DST[[]]),controller
1573 cookie=0xd dl_src=60:66:66:66:00:08 actions=pop_mpls:0x0806,resubmit(1,1)
1574 cookie=0xd table=1 arp actions=controller
1576 cookie=0xdeadbeef table=2 dl_src=60:66:66:66:00:09 actions=pop_mpls:0x0800,mod_nw_tos:48
1577 cookie=0xd dl_src=60:66:66:66:00:09 actions=resubmit(,2),controller
1578 cookie=0xd dl_src=60:66:66:66:00:0a actions=pop_mpls:0x0800,mod_nw_dst:10.0.0.1,controller
1579 cookie=0xd dl_src=60:66:66:66:00:0b actions=pop_mpls:0x0800,mod_nw_src:10.0.0.1,controller
1581 cookie=0xd dl_src=60:66:66:66:01:00 actions=pop_mpls:0x8848,controller
1582 cookie=0xd dl_src=60:66:66:66:01:01 actions=pop_mpls:0x8847,dec_mpls_ttl,controller
1583 cookie=0xd dl_src=60:66:66:66:01:02 actions=pop_mpls:0x8848,load:3->OXM_OF_MPLS_TC[[]],controller
1585 cookie=0xd dl_src=60:66:66:66:02:00 actions=pop_mpls:0x8847,pop_mpls:0x0800,controller
1586 cookie=0xe dl_src=60:66:66:66:02:01 actions=pop_mpls:0x8848,pop_mpls:0x0800,dec_ttl,controller
1587 cookie=0xe dl_src=60:66:66:66:02:10 actions=pop_mpls:0x8847,dec_mpls_ttl,pop_mpls:0x0800,dec_ttl,controller
1589 cookie=0xe dl_src=60:66:66:66:03:00 actions=pop_mpls:0x8848,pop_mpls:0x8848,controller
1590 cookie=0xe dl_src=60:66:66:66:03:01 actions=pop_mpls:0x8847,pop_mpls:0x8847,dec_mpls_ttl,controller
1591 cookie=0xe dl_src=60:66:66:66:03:10 actions=pop_mpls:0x8848,dec_mpls_ttl,pop_mpls:0x8848,dec_mpls_ttl,controller
1593 cookie=0xf dl_src=60:66:66:66:04:00 actions=pop_mpls:0x0800,push_mpls:0x8847,controller
1594 cookie=0xf dl_src=60:66:66:66:04:01 actions=pop_mpls:0x0800,push_mpls:0x8848,dec_mpls_ttl,controller
1595 cookie=0xf dl_src=60:66:66:66:04:10 actions=pop_mpls:0x0800,dec_ttl,push_mpls:0x8848,dec_mpls_ttl,controller
1597 cookie=0x5 dl_src=60:66:66:66:05:00 actions=push_mpls:0x8848,pop_mpls:0x8847,controller
1598 cookie=0x5 dl_src=60:66:66:66:05:01 actions=push_mpls:0x8847,pop_mpls:0x8848,dec_mpls_ttl,controller
1599 cookie=0x5 dl_src=60:66:66:66:05:10 actions=push_mpls:0x8848,dec_mpls_ttl,pop_mpls:0x8847,dec_mpls_ttl,controller
1601 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
1603 dnl Modified MPLS controller action.
1604 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1607 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=40:44:44:44:44:42,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=17,tos=0,ttl=64,frag=no),udp(src=7777,dst=80)'
1609 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1610 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1612 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1613 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1614 mpls,vlan_tci=0x0000,dl_src=40:44:44:44:44:42,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=64,mpls_bos=1
1616 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1617 mpls,vlan_tci=0x0000,dl_src=40:44:44:44:44:42,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=64,mpls_bos=1
1619 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1620 mpls,vlan_tci=0x0000,dl_src=40:44:44:44:44:42,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=64,mpls_bos=1
1623 dnl Modified MPLS controller action.
1624 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1627 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=41:44:44:44:44:42,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=16,tos=0,ttl=64,frag=no)'
1629 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1630 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1632 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1633 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1634 ip,vlan_tci=0x0000,dl_src=41:44:44:44:44:42,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_proto=16,nw_tos=0,nw_ecn=0,nw_ttl=64
1636 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1637 ip,vlan_tci=0x0000,dl_src=41:44:44:44:44:42,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_proto=16,nw_tos=0,nw_ecn=0,nw_ttl=64
1639 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1640 ip,vlan_tci=0x0000,dl_src=41:44:44:44:44:42,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_proto=16,nw_tos=0,nw_ecn=0,nw_ttl=64
1643 dnl Modified MPLS controller action.
1644 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1646 dnl in_port(1),eth(src=00:01:02:03:04:05,dst=10:11:12:13:14:15),eth_type(0x8847),mpls(label=100,tc=3,ttl=64,bos=1)
1649 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=40:44:44:44:44:43,dst=50:54:00:00:00:07),eth_type(0x8847),mpls(label=11,tc=3,ttl=64,bos=1)'
1651 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1652 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1654 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1655 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1656 mpls,vlan_tci=0x0000,dl_src=40:44:44:44:44:43,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=64,mpls_bos=0,mpls_lse1=46912
1658 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1659 mpls,vlan_tci=0x0000,dl_src=40:44:44:44:44:43,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=64,mpls_bos=0,mpls_lse1=46912
1661 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1662 mpls,vlan_tci=0x0000,dl_src=40:44:44:44:44:43,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=64,mpls_bos=0,mpls_lse1=46912
1665 dnl Modified MPLS controller action.
1666 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1669 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=40:44:44:44:44:44,dst=50:54:00:00:00:07),eth_type(0x8100),vlan(vid=99,pcp=7),encap(eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=16,tos=0,ttl=64,frag=no))'
1671 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1672 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1674 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1675 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1676 mpls,dl_vlan=99,dl_vlan_pcp=7,dl_src=40:44:44:44:44:44,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=64,mpls_bos=1
1678 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1679 mpls,dl_vlan=99,dl_vlan_pcp=7,dl_src=40:44:44:44:44:44,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=64,mpls_bos=1
1681 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1682 mpls,dl_vlan=99,dl_vlan_pcp=7,dl_src=40:44:44:44:44:44,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=64,mpls_bos=1
1685 dnl Modified MPLS controller action.
1686 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1689 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=40:44:44:44:44:45,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=16,tos=0,ttl=64,frag=no)'
1691 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1692 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1694 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1695 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1696 mpls,vlan_tci=0x0000,dl_src=40:44:44:44:44:45,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=63,mpls_bos=1
1698 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1699 mpls,vlan_tci=0x0000,dl_src=40:44:44:44:44:45,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=63,mpls_bos=1
1701 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1702 mpls,vlan_tci=0x0000,dl_src=40:44:44:44:44:45,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=63,mpls_bos=1
1705 dnl Modified MPLS controller action.
1706 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1709 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=40:44:44:44:44:46,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=16,tos=0,ttl=64,frag=no)'
1711 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1712 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1714 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1715 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1716 mpls,vlan_tci=0x0000,dl_src=40:44:44:44:44:46,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=10,mpls_bos=1
1718 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1719 mpls,vlan_tci=0x0000,dl_src=40:44:44:44:44:46,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=10,mpls_bos=1
1721 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1722 mpls,vlan_tci=0x0000,dl_src=40:44:44:44:44:46,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=10,mpls_bos=1
1725 dnl Modified MPLS controller action.
1726 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1729 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=40:44:44:44:44:47,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=16,tos=0,ttl=64,frag=no)'
1731 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1732 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1734 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1735 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1736 mpls,vlan_tci=0x0000,dl_src=40:44:44:44:44:47,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=10,mpls_bos=1
1738 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1739 mpls,vlan_tci=0x0000,dl_src=40:44:44:44:44:47,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=10,mpls_bos=1
1741 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1742 mpls,vlan_tci=0x0000,dl_src=40:44:44:44:44:47,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=10,mpls_bos=1
1745 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1747 dnl Modified MPLS controller action.
1748 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1751 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=40:44:44:44:44:49,dst=50:54:00:00:00:07),eth_type(0x8847),mpls(label=10,tc=3,ttl=64,bos=1)'
1753 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1754 ovs-appctl -t ovs-ofctl exit
1756 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1757 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1758 mplsm,vlan_tci=0x0000,dl_src=40:44:44:44:44:49,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=64,mpls_bos=0,mpls_lse1=42816
1760 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1761 mplsm,vlan_tci=0x0000,dl_src=40:44:44:44:44:49,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=64,mpls_bos=0,mpls_lse1=42816
1763 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1764 mplsm,vlan_tci=0x0000,dl_src=40:44:44:44:44:49,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=64,mpls_bos=0,mpls_lse1=42816
1767 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1769 dnl Modified MPLS controller action.
1770 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1773 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=40:44:44:44:44:48,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=16,tos=0,ttl=64,frag=no)'
1775 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1776 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1778 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1779 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1780 mpls,vlan_tci=0x0000,dl_src=40:44:44:44:44:48,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=9,mpls_bos=1
1782 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1783 mpls,vlan_tci=0x0000,dl_src=40:44:44:44:44:48,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=9,mpls_bos=1
1785 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1786 mpls,vlan_tci=0x0000,dl_src=40:44:44:44:44:48,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=9,mpls_bos=1
1789 dnl Modified MPLS actions.
1790 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1793 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:55:55:55:55:55,dst=50:54:00:00:00:07),eth_type(0x8847),mpls(label=100,tc=7,ttl=64,bos=1)'
1795 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1796 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1798 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1799 NXT_PACKET_IN (xid=0x0): cookie=0xb total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1800 mpls,vlan_tci=0x0000,dl_src=50:55:55:55:55:55,dl_dst=50:54:00:00:00:07,mpls_label=1000,mpls_tc=7,mpls_ttl=64,mpls_bos=1
1802 NXT_PACKET_IN (xid=0x0): cookie=0xb total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1803 mpls,vlan_tci=0x0000,dl_src=50:55:55:55:55:55,dl_dst=50:54:00:00:00:07,mpls_label=1000,mpls_tc=7,mpls_ttl=64,mpls_bos=1
1805 NXT_PACKET_IN (xid=0x0): cookie=0xb total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1806 mpls,vlan_tci=0x0000,dl_src=50:55:55:55:55:55,dl_dst=50:54:00:00:00:07,mpls_label=1000,mpls_tc=7,mpls_ttl=64,mpls_bos=1
1809 dnl Modified MPLS ipv6 controller action.
1810 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1813 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=70:77:77:77:77:77,dst=50:54:00:00:00:07),eth_type(0x86dd),ipv6(src=::1,dst=::2,label=0,proto=10,tclass=0x70,hlimit=128,frag=no)'
1815 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1816 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1818 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1819 NXT_PACKET_IN (xid=0x0): cookie=0xc total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1820 mplsm,vlan_tci=0x0000,dl_src=70:77:77:77:77:77,dl_dst=50:54:00:00:00:07,mpls_label=1000,mpls_tc=7,mpls_ttl=128,mpls_bos=1
1822 NXT_PACKET_IN (xid=0x0): cookie=0xc total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1823 mplsm,vlan_tci=0x0000,dl_src=70:77:77:77:77:77,dl_dst=50:54:00:00:00:07,mpls_label=1000,mpls_tc=7,mpls_ttl=128,mpls_bos=1
1825 NXT_PACKET_IN (xid=0x0): cookie=0xc total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1826 mplsm,vlan_tci=0x0000,dl_src=70:77:77:77:77:77,dl_dst=50:54:00:00:00:07,mpls_label=1000,mpls_tc=7,mpls_ttl=128,mpls_bos=1
1830 dnl Modified MPLS pop action.
1831 dnl The input is a frame with two MPLS headers which tcpdump -vve shows as:
1832 dnl 60:66:66:66:66:66 > 50:54:00:00:00:07, ethertype MPLS multicast (0x8847), length 66: MPLS (label 20, exp 0, ttl 32)
1833 dnl (tos 0x0, ttl 64, id 0, offset 0, flags [none], proto TCP (6), length 44)
1835 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1838 ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 60 66 66 66 66 66 88 47 00 01 41 20 45 00 00 2c 00 00 00 00 40 06 3b 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45'
1841 # ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=60:66:66:66:66:66,dst=50:54:00:00:00:07),eth_type(0x8847),mpls(label=10,tc=3,ttl=100,bos=1)'
1843 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1844 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1846 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1847 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1848 tcp,vlan_tci=0x0000,dl_src=60:66:66:66:66:66,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744
1850 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1851 tcp,vlan_tci=0x0000,dl_src=60:66:66:66:66:66,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744
1853 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1854 tcp,vlan_tci=0x0000,dl_src=60:66:66:66:66:66,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744
1857 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1859 dnl Modified MPLS pop action.
1860 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
1861 dnl 60:66:66:66:00:01 > 50:54:00:00:00:07, ethertype MPLS multicast (0x8848), length 62: MPLS (label 20, exp 0, [S], ttl 32)
1862 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
1863 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
1864 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1867 ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 60 66 66 66 00 01 88 48 00 01 41 20 45 00 00 2c 00 00 00 00 ff 06 3a 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45'
1869 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1870 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1872 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
1873 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1874 tcp,vlan_tci=0x0000,dl_src=60:66:66:66:00:01,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=254,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744
1876 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1877 tcp,vlan_tci=0x0000,dl_src=60:66:66:66:00:01,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=254,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744
1879 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1880 tcp,vlan_tci=0x0000,dl_src=60:66:66:66:00:01,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=254,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744
1883 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1885 dnl Modified MPLS pop action.
1886 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
1887 dnl 60:66:66:66:00:02 > 50:54:00:00:00:07, ethertype MPLS unicast (0x8847), length 62: MPLS (label 20, exp 0, [S], ttl 32)
1888 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
1889 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
1890 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1893 ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 60 66 66 66 00 02 88 47 00 01 41 20 45 00 00 2c 00 00 00 00 ff 06 3a 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45'
1895 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1896 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1898 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
1899 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1900 tcp,vlan_tci=0x0000,dl_src=60:66:66:66:00:02,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=10.0.0.1,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:2dee
1902 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1903 tcp,vlan_tci=0x0000,dl_src=60:66:66:66:00:02,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=10.0.0.1,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:2dee
1905 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1906 tcp,vlan_tci=0x0000,dl_src=60:66:66:66:00:02,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=10.0.0.1,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:2dee
1909 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1911 dnl Modified MPLS pop action.
1912 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
1913 dnl 60:66:66:66:00:03 > 50:54:00:00:00:07, ethertype MPLS multicast (0x8848), length 62: MPLS (label 20, exp 0, [S], ttl 32)
1914 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
1915 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
1916 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1919 ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 60 66 66 66 00 03 88 48 00 01 41 20 45 00 00 2c 00 00 00 00 ff 06 3a 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45'
1921 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1922 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1924 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
1925 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1926 tcp,vlan_tci=0x0000,dl_src=60:66:66:66:00:03,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.2,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7743
1928 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1929 tcp,vlan_tci=0x0000,dl_src=60:66:66:66:00:03,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.2,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7743
1931 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1932 tcp,vlan_tci=0x0000,dl_src=60:66:66:66:00:03,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.2,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7743
1935 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1937 dnl Modified MPLS pop action.
1938 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
1939 dnl 60:66:66:66:00:04 > 50:54:00:00:00:07, ethertype MPLS unicast (0x8847), length 62: MPLS (label 20, exp 0, [S], ttl 32)
1940 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
1941 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
1942 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1945 ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 60 66 66 66 00 04 88 47 00 01 41 20 45 00 00 2c 00 00 00 00 ff 06 3a 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45'
1947 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1948 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1950 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
1951 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1952 tcp,vlan_tci=0x0000,dl_src=60:66:66:66:00:04,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.2,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7743
1954 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1955 tcp,vlan_tci=0x0000,dl_src=60:66:66:66:00:04,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.2,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7743
1957 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1958 tcp,vlan_tci=0x0000,dl_src=60:66:66:66:00:04,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.2,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7743
1961 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1963 dnl Modified MPLS pop action.
1964 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
1965 dnl 60:66:66:66:00:05 > 50:54:00:00:00:07, ethertype MPLS unicast (0x8847), length 62: MPLS (label 20, exp 0, [S], ttl 32)
1966 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
1967 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
1968 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1971 ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 60 66 66 66 00 05 88 48 00 01 41 20 45 00 00 2c 00 00 00 00 ff 06 3a 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45'
1973 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1974 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1976 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
1977 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1978 tcp,vlan_tci=0x0000,dl_src=60:66:66:66:00:05,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.106,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:76db
1980 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1981 tcp,vlan_tci=0x0000,dl_src=60:66:66:66:00:05,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.106,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:76db
1983 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1984 tcp,vlan_tci=0x0000,dl_src=60:66:66:66:00:05,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.106,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:76db
1987 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1989 dnl Modified MPLS pop action.
1990 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
1991 dnl 60:66:66:66:00:06 > 50:54:00:00:00:07, ethertype MPLS multicast (0x8848), length 62: MPLS (label 20, exp 0, [S], ttl 32)
1992 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
1993 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
1994 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1997 ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 60 66 66 66 00 06 88 47 00 01 41 20 45 00 00 2c 00 00 00 00 ff 06 3a 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45'
1999 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2000 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2002 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
2003 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2004 tcp,vlan_tci=0x0000,dl_src=60:66:66:66:00:06,dl_dst=50:54:00:00:00:07,nw_src=192.168.255.255,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7745
2006 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2007 tcp,vlan_tci=0x0000,dl_src=60:66:66:66:00:06,dl_dst=50:54:00:00:00:07,nw_src=192.168.255.255,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7745
2009 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2010 tcp,vlan_tci=0x0000,dl_src=60:66:66:66:00:06,dl_dst=50:54:00:00:00:07,nw_src=192.168.255.255,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7745
2013 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2015 dnl Modified MPLS pop action.
2016 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
2017 dnl 60:66:66:66:00:07 > 50:54:00:00:00:07, ethertype MPLS multicast (0x8848), length 62: MPLS (label 20, exp 0, [S], ttl 32)
2018 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
2019 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
2020 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2023 ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 60 66 66 66 00 07 88 48 00 01 41 20 45 00 00 2c 00 00 00 00 ff 06 3a 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45'
2025 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2026 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2028 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
2029 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2030 tcp,vlan_tci=0x0000,dl_src=60:66:66:66:00:07,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744
2032 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2033 tcp,vlan_tci=0x0000,dl_src=60:66:66:66:00:07,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744
2035 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2036 tcp,vlan_tci=0x0000,dl_src=60:66:66:66:00:07,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744
2039 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2041 dnl Modified MPLS pop action.
2042 dnl The input is an ARP frame with a single MPLS label stack entry which tcpdump -vve shows as:
2043 dnl 60:66:66:66:00:08 > ff:ff:ff:ff:ff:ff, ethertype MPLS unicast (0x8847), length 46: MPLS (label 20, exp 0, [S], ttl 32)
2044 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2047 ovs-appctl netdev-dummy/receive p1 'ff ff ff ff ff ff 60 66 66 66 00 08 88 47 00 01 41 20 00 01 08 00 06 04 00 02 60 66 66 66 00 08 c0 a8 00 01 ff ff ff ff ff ff ff ff ff ff'
2049 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2050 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2052 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
2053 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0xd total_len=56 in_port=1 (via action) data_len=56 (unbuffered)
2054 arp,vlan_tci=0x0000,dl_src=60:66:66:66:00:08,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=192.168.0.1,arp_tpa=255.255.255.255,arp_op=2,arp_sha=60:66:66:66:00:08,arp_tha=ff:ff:ff:ff:ff:ff
2056 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0xd total_len=56 in_port=1 (via action) data_len=56 (unbuffered)
2057 arp,vlan_tci=0x0000,dl_src=60:66:66:66:00:08,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=192.168.0.1,arp_tpa=255.255.255.255,arp_op=2,arp_sha=60:66:66:66:00:08,arp_tha=ff:ff:ff:ff:ff:ff
2059 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0xd total_len=56 in_port=1 (via action) data_len=56 (unbuffered)
2060 arp,vlan_tci=0x0000,dl_src=60:66:66:66:00:08,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=192.168.0.1,arp_tpa=255.255.255.255,arp_op=2,arp_sha=60:66:66:66:00:08,arp_tha=ff:ff:ff:ff:ff:ff
2063 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2065 dnl Modified MPLS pop action.
2066 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
2067 dnl 60:66:66:66:00:09 > 50:54:00:00:00:07, ethertype MPLS multicast (0x8848), length 62: MPLS (label 20, exp 0, [S], ttl 32)
2068 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
2069 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
2070 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2073 ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 60 66 66 66 00 09 88 48 00 01 41 20 45 00 00 2c 00 00 00 00 ff 06 3a 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45'
2075 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2076 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2078 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
2079 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2080 tcp,vlan_tci=0x0000,dl_src=60:66:66:66:00:09,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=48,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744
2082 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2083 tcp,vlan_tci=0x0000,dl_src=60:66:66:66:00:09,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=48,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744
2085 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2086 tcp,vlan_tci=0x0000,dl_src=60:66:66:66:00:09,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=48,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744
2089 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2091 dnl Modified MPLS pop action.
2092 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
2093 dnl 60:66:66:66:00:0a > 50:54:00:00:00:07, ethertype MPLS multicast (0x8848), length 62: MPLS (label 20, exp 0, [S], ttl 32)
2094 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
2095 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
2096 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2099 ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 60 66 66 66 00 0a 88 48 00 01 41 20 45 00 00 2c 00 00 00 00 ff 06 3a 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45'
2101 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2102 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2104 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
2105 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2106 tcp,vlan_tci=0x0000,dl_src=60:66:66:66:00:0a,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=10.0.0.1,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:2dee
2108 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2109 tcp,vlan_tci=0x0000,dl_src=60:66:66:66:00:0a,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=10.0.0.1,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:2dee
2111 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2112 tcp,vlan_tci=0x0000,dl_src=60:66:66:66:00:0a,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=10.0.0.1,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:2dee
2115 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2117 dnl Modified MPLS pop action.
2118 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
2119 dnl 60:66:66:66:00:0b > 50:54:00:00:00:07, ethertype MPLS multicast (0x8848), length 62: MPLS (label 20, exp 0, [S], ttl 32)
2120 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
2121 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
2122 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2125 ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 60 66 66 66 00 0b 88 48 00 01 41 20 45 00 00 2c 00 00 00 00 ff 06 3a 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45'
2127 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2128 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2130 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
2131 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2132 tcp,vlan_tci=0x0000,dl_src=60:66:66:66:00:0b,dl_dst=50:54:00:00:00:07,nw_src=10.0.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:2ded
2134 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2135 tcp,vlan_tci=0x0000,dl_src=60:66:66:66:00:0b,dl_dst=50:54:00:00:00:07,nw_src=10.0.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:2ded
2137 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2138 tcp,vlan_tci=0x0000,dl_src=60:66:66:66:00:0b,dl_dst=50:54:00:00:00:07,nw_src=10.0.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:2ded
2141 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2143 dnl Modified MPLS pop action.
2144 dnl The input is a frame with two MPLS label stack entries which tcpdump -vve shows as:
2145 dnl 60:66:66:66:01:00 > 50:54:00:00:00:07, ethertype MPLS multicast (0x8848), length 66: MPLS (label 20, exp 0, ttl 32)
2146 dnl (label 20, exp 0, [S], ttl 31)
2147 dnl (tos 0x0, ttl 254, id 0, offset 0, flags [none], proto TCP (6), length 44)
2148 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
2149 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2152 ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 60 66 66 66 01 00 88 48 00 01 40 20 00 01 41 1f 45 00 00 2c 00 00 00 00 ff 06 3b 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45'
2154 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2155 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2157 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2158 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2159 mplsm,vlan_tci=0x0000,dl_src=60:66:66:66:01:00,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=0,mpls_ttl=31,mpls_bos=1
2161 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2162 mplsm,vlan_tci=0x0000,dl_src=60:66:66:66:01:00,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=0,mpls_ttl=31,mpls_bos=1
2164 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2165 mplsm,vlan_tci=0x0000,dl_src=60:66:66:66:01:00,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=0,mpls_ttl=31,mpls_bos=1
2168 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2170 dnl Modified MPLS pop action.
2171 dnl The input is a frame with two MPLS label stack entries which tcpdump -vve shows as:
2172 dnl 60:66:66:66:01:01 > 50:54:00:00:00:07, ethertype MPLS unicast (0x8847), length 66: MPLS (label 20, exp 0, ttl 32)
2173 dnl (label 20, exp 0, [S], ttl 31)
2174 dnl (tos 0x0, ttl 254, id 0, offset 0, flags [none], proto TCP (6), length 44)
2175 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
2176 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2179 ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 60 66 66 66 01 01 88 47 00 01 40 20 00 01 41 1f 45 00 00 2c 00 00 00 00 ff 06 3b 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45'
2181 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2182 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2184 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2185 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2186 mpls,vlan_tci=0x0000,dl_src=60:66:66:66:01:01,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=0,mpls_ttl=30,mpls_bos=1
2188 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2189 mpls,vlan_tci=0x0000,dl_src=60:66:66:66:01:01,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=0,mpls_ttl=30,mpls_bos=1
2191 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2192 mpls,vlan_tci=0x0000,dl_src=60:66:66:66:01:01,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=0,mpls_ttl=30,mpls_bos=1
2195 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2197 dnl Modified MPLS pop action.
2198 dnl The input is a frame with two MPLS label stack entries which tcpdump -vve shows as:
2199 dnl 60:66:66:66:01:02 > 50:54:00:00:00:07, ethertype MPLS multicast (0x8848), length 66: MPLS (label 20, exp 0, ttl 32)
2200 dnl (label 20, exp 0, [S], ttl 31)
2201 dnl (tos 0x0, ttl 254, id 0, offset 0, flags [none], proto TCP (6), length 44)
2202 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
2203 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2206 ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 60 66 66 66 01 02 88 48 00 01 40 20 00 01 41 1f 45 00 00 2c 00 00 00 00 ff 06 3b 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45'
2208 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2209 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2211 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2212 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2213 mplsm,vlan_tci=0x0000,dl_src=60:66:66:66:01:02,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=3,mpls_ttl=31,mpls_bos=1
2215 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2216 mplsm,vlan_tci=0x0000,dl_src=60:66:66:66:01:02,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=3,mpls_ttl=31,mpls_bos=1
2218 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2219 mplsm,vlan_tci=0x0000,dl_src=60:66:66:66:01:02,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=3,mpls_ttl=31,mpls_bos=1
2222 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2224 dnl Modified MPLS pop action.
2225 dnl The input is a frame with two MPLS label stack entries which tcpdump -vve shows as:
2226 dnl 60:66:66:66:02:00 > 50:54:00:00:02:00, ethertype MPLS unicast (0x8847), length 66: MPLS (label 20, exp 0, ttl 32)
2227 dnl (label 20, exp 0, [S], ttl 31)
2228 dnl (tos 0x0, ttl 254, id 0, offset 0, flags [none], proto TCP (6), length 44)
2229 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
2230 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2233 ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 60 66 66 66 02 00 88 47 00 01 40 20 00 01 41 1f 45 00 00 2c 00 00 00 00 ff 06 3b 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45'
2235 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2236 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2238 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2239 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2240 tcp,vlan_tci=0x0000,dl_src=60:66:66:66:02:00,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744
2242 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2243 tcp,vlan_tci=0x0000,dl_src=60:66:66:66:02:00,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744
2245 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2246 tcp,vlan_tci=0x0000,dl_src=60:66:66:66:02:00,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744
2249 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2251 dnl Modified MPLS pop action.
2252 dnl The input is a frame with two MPLS label stack entries which tcpdump -vve shows as:
2253 dnl 60:66:66:66:02:01 > 50:54:00:00:02:01, ethertype MPLS multicast (0x8848), length 66: MPLS (label 20, exp 0, ttl 32)
2254 dnl (label 20, exp 0, [S], ttl 31)
2255 dnl (tos 0x0, ttl 254, id 0, offset 0, flags [none], proto TCP (6), length 44)
2256 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
2257 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2260 ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 60 66 66 66 02 01 88 48 00 01 40 20 00 01 41 1f 45 00 00 2c 00 00 00 00 ff 06 3b 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45'
2263 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2264 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2266 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
2267 NXT_PACKET_IN (xid=0x0): cookie=0xe total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2268 tcp,vlan_tci=0x0000,dl_src=60:66:66:66:02:01,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=254,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744
2270 NXT_PACKET_IN (xid=0x0): cookie=0xe total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2271 tcp,vlan_tci=0x0000,dl_src=60:66:66:66:02:01,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=254,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744
2273 NXT_PACKET_IN (xid=0x0): cookie=0xe total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2274 tcp,vlan_tci=0x0000,dl_src=60:66:66:66:02:01,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=254,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744
2277 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2279 dnl Modified MPLS pop action.
2280 dnl The input is a frame with two MPLS label stack entries which tcpdump -vve shows as:
2281 dnl 60:66:66:66:02:10 > 50:54:00:00:00:07, ethertype MPLS unicast (0x8847), length 66: MPLS (label 20, exp 0, ttl 32)
2282 dnl (label 20, exp 0, [S], ttl 31)
2283 dnl (tos 0x0, ttl 254, id 0, offset 0, flags [none], proto TCP (6), length 44)
2284 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
2285 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2288 ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 60 66 66 66 02 10 88 47 00 01 40 20 00 01 41 1f 45 00 00 2c 00 00 00 00 ff 06 3b 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45'
2290 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2291 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2293 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
2294 NXT_PACKET_IN (xid=0x0): cookie=0xe total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2295 tcp,vlan_tci=0x0000,dl_src=60:66:66:66:02:10,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=254,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744
2297 NXT_PACKET_IN (xid=0x0): cookie=0xe total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2298 tcp,vlan_tci=0x0000,dl_src=60:66:66:66:02:10,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=254,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744
2300 NXT_PACKET_IN (xid=0x0): cookie=0xe total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2301 tcp,vlan_tci=0x0000,dl_src=60:66:66:66:02:10,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=254,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744
2304 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2306 dnl Modified MPLS pop action.
2307 dnl The input is a frame with three MPLS label stack entries which tcpdump -vve shows as:
2308 dnl 60:66:66:66:03:00 > 50:54:00:00:00:07, ethertype MPLS unicast (0x8847), length 66: MPLS (label 20, exp 0, ttl 32)
2309 dnl (label 20, exp 0, ttl 31)
2310 dnl (label 20, exp 0, [S], ttl 30)
2311 dnl (tos 0x0, ttl 254, id 0, offset 0, flags [none], proto TCP (6), length 44)
2312 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
2313 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2316 ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 60 66 66 66 03 00 88 47 00 01 40 20 00 01 40 1f 00 01 41 1e 45 00 00 2c 00 00 00 00 ff 06 3b 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45'
2318 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2319 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2321 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2322 NXT_PACKET_IN (xid=0x0): cookie=0xe total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2323 mplsm,vlan_tci=0x0000,dl_src=60:66:66:66:03:00,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=0,mpls_ttl=30,mpls_bos=1
2325 NXT_PACKET_IN (xid=0x0): cookie=0xe total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2326 mplsm,vlan_tci=0x0000,dl_src=60:66:66:66:03:00,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=0,mpls_ttl=30,mpls_bos=1
2328 NXT_PACKET_IN (xid=0x0): cookie=0xe total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2329 mplsm,vlan_tci=0x0000,dl_src=60:66:66:66:03:00,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=0,mpls_ttl=30,mpls_bos=1
2332 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2334 dnl Modified MPLS pop action.
2335 dnl The input is a frame with three MPLS label stack entries which tcpdump -vve shows as:
2336 dnl 60:66:66:66:03:01 > 50:54:00:00:00:00, ethertype MPLS multicast (0x8848), length 66: MPLS (label 20, exp 0, ttl 32)
2337 dnl (label 20, exp 0, ttl 31)
2338 dnl (label 20, exp 0, [S], ttl 30)
2339 dnl (tos 0x0, ttl 254, id 0, offset 0, flags [none], proto TCP (6), length 44)
2340 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
2341 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2344 ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 60 66 66 66 03 01 88 48 00 01 40 20 00 01 40 1f 00 01 41 1e 45 00 00 2c 00 00 00 00 ff 06 3b 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45'
2346 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2347 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2349 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2350 NXT_PACKET_IN (xid=0x0): cookie=0xe total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2351 mpls,vlan_tci=0x0000,dl_src=60:66:66:66:03:01,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=0,mpls_ttl=29,mpls_bos=1
2353 NXT_PACKET_IN (xid=0x0): cookie=0xe total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2354 mpls,vlan_tci=0x0000,dl_src=60:66:66:66:03:01,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=0,mpls_ttl=29,mpls_bos=1
2356 NXT_PACKET_IN (xid=0x0): cookie=0xe total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2357 mpls,vlan_tci=0x0000,dl_src=60:66:66:66:03:01,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=0,mpls_ttl=29,mpls_bos=1
2360 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2362 dnl Modified MPLS pop action.
2363 dnl The input is a frame with three MPLS label stack entries which tcpdump -vve shows as:
2364 dnl 60:66:66:66:03:10 > 50:54:00:00:00:00, ethertype MPLS unicast (0x8847), length 66: MPLS (label 20, exp 0, ttl 32)
2365 dnl (label 20, exp 0, ttl 31)
2366 dnl (label 20, exp 0, [S], ttl 30)
2367 dnl (tos 0x0, ttl 254, id 0, offset 0, flags [none], proto TCP (6), length 44)
2368 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
2369 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2372 ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 60 66 66 66 03 10 88 47 00 01 40 20 00 01 40 1f 00 01 41 1e 45 00 00 2c 00 00 00 00 ff 06 3b 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45'
2374 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2375 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2377 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2378 NXT_PACKET_IN (xid=0x0): cookie=0xe total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2379 mplsm,vlan_tci=0x0000,dl_src=60:66:66:66:03:10,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=0,mpls_ttl=29,mpls_bos=1
2381 NXT_PACKET_IN (xid=0x0): cookie=0xe total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2382 mplsm,vlan_tci=0x0000,dl_src=60:66:66:66:03:10,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=0,mpls_ttl=29,mpls_bos=1
2384 NXT_PACKET_IN (xid=0x0): cookie=0xe total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2385 mplsm,vlan_tci=0x0000,dl_src=60:66:66:66:03:10,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=0,mpls_ttl=29,mpls_bos=1
2388 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2390 dnl Modified MPLS pop action.
2391 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
2392 dnl 60:66:66:66:04:00 > 50:54:00:00:00:07, ethertype MPLS multicast (0x8848), length 62: MPLS (label 20, exp 0, [S], ttl 32)
2393 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
2394 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
2395 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2398 ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 60 66 66 66 04 00 88 48 00 01 41 20 45 00 00 2c 00 00 00 00 ff 06 3a 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45'
2400 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2401 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2403 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
2404 NXT_PACKET_IN (xid=0x0): cookie=0xf total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2405 mpls,vlan_tci=0x0000,dl_src=60:66:66:66:04:00,dl_dst=50:54:00:00:00:07,mpls_label=0,mpls_tc=0,mpls_ttl=255,mpls_bos=1
2407 NXT_PACKET_IN (xid=0x0): cookie=0xf total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2408 mpls,vlan_tci=0x0000,dl_src=60:66:66:66:04:00,dl_dst=50:54:00:00:00:07,mpls_label=0,mpls_tc=0,mpls_ttl=255,mpls_bos=1
2410 NXT_PACKET_IN (xid=0x0): cookie=0xf total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2411 mpls,vlan_tci=0x0000,dl_src=60:66:66:66:04:00,dl_dst=50:54:00:00:00:07,mpls_label=0,mpls_tc=0,mpls_ttl=255,mpls_bos=1
2414 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2416 dnl Modified MPLS pop action.
2417 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
2418 dnl 60:66:66:66:04:01 > 50:54:00:00:00:07, ethertype MPLS unicast (0x8847), length 62: MPLS (label 20, exp 0, [S], ttl 32)
2419 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
2420 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
2421 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2424 ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 60 66 66 66 04 01 88 47 00 01 41 20 45 00 00 2c 00 00 00 00 ff 06 3a 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45'
2426 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2427 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2429 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
2430 NXT_PACKET_IN (xid=0x0): cookie=0xf total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2431 mplsm,vlan_tci=0x0000,dl_src=60:66:66:66:04:01,dl_dst=50:54:00:00:00:07,mpls_label=0,mpls_tc=0,mpls_ttl=254,mpls_bos=1
2433 NXT_PACKET_IN (xid=0x0): cookie=0xf total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2434 mplsm,vlan_tci=0x0000,dl_src=60:66:66:66:04:01,dl_dst=50:54:00:00:00:07,mpls_label=0,mpls_tc=0,mpls_ttl=254,mpls_bos=1
2436 NXT_PACKET_IN (xid=0x0): cookie=0xf total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2437 mplsm,vlan_tci=0x0000,dl_src=60:66:66:66:04:01,dl_dst=50:54:00:00:00:07,mpls_label=0,mpls_tc=0,mpls_ttl=254,mpls_bos=1
2440 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2442 dnl Modified MPLS pop action.
2443 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
2444 dnl 60:66:66:66:04:10 > 50:54:00:00:00:07, ethertype MPLS multicast (0x8848), length 62: MPLS (label 20, exp 0, [S], ttl 32)
2445 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
2446 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
2447 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2450 ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 60 66 66 66 04 10 88 48 00 01 41 20 45 00 00 2c 00 00 00 00 ff 06 3a 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45'
2452 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2453 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2455 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
2456 NXT_PACKET_IN (xid=0x0): cookie=0xf total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2457 mplsm,vlan_tci=0x0000,dl_src=60:66:66:66:04:10,dl_dst=50:54:00:00:00:07,mpls_label=0,mpls_tc=0,mpls_ttl=253,mpls_bos=1
2459 NXT_PACKET_IN (xid=0x0): cookie=0xf total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2460 mplsm,vlan_tci=0x0000,dl_src=60:66:66:66:04:10,dl_dst=50:54:00:00:00:07,mpls_label=0,mpls_tc=0,mpls_ttl=253,mpls_bos=1
2462 NXT_PACKET_IN (xid=0x0): cookie=0xf total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2463 mplsm,vlan_tci=0x0000,dl_src=60:66:66:66:04:10,dl_dst=50:54:00:00:00:07,mpls_label=0,mpls_tc=0,mpls_ttl=253,mpls_bos=1
2466 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2468 dnl Modified MPLS pop action.
2469 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
2470 dnl 60:66:66:66:05:00 > 50:54:00:00:00:07, ethertype MPLS unicast (0x8847), length 62: MPLS (label 20, exp 0, [S], ttl 32)
2471 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
2472 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
2473 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2476 ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 60 66 66 66 05 00 88 47 00 01 41 20 45 00 00 2c 00 00 00 00 ff 06 3a 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45'
2479 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2480 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2482 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2483 NXT_PACKET_IN (xid=0x0): cookie=0x5 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2484 mpls,vlan_tci=0x0000,dl_src=60:66:66:66:05:00,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=0,mpls_ttl=32,mpls_bos=1
2486 NXT_PACKET_IN (xid=0x0): cookie=0x5 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2487 mpls,vlan_tci=0x0000,dl_src=60:66:66:66:05:00,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=0,mpls_ttl=32,mpls_bos=1
2489 NXT_PACKET_IN (xid=0x0): cookie=0x5 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2490 mpls,vlan_tci=0x0000,dl_src=60:66:66:66:05:00,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=0,mpls_ttl=32,mpls_bos=1
2493 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2495 dnl Modified MPLS pop action.
2496 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
2497 dnl 60:66:66:66:05:01 > 50:54:00:00:00:07, ethertype MPLS multicast (0x8848), length 62: MPLS (label 20, exp 0, [S], ttl 32)
2498 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
2499 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
2500 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2503 ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 60 66 66 66 05 01 88 48 00 01 41 20 45 00 00 2c 00 00 00 00 ff 06 3a 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45'
2505 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2506 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2508 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2509 NXT_PACKET_IN (xid=0x0): cookie=0x5 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2510 mplsm,vlan_tci=0x0000,dl_src=60:66:66:66:05:01,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=0,mpls_ttl=31,mpls_bos=1
2512 NXT_PACKET_IN (xid=0x0): cookie=0x5 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2513 mplsm,vlan_tci=0x0000,dl_src=60:66:66:66:05:01,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=0,mpls_ttl=31,mpls_bos=1
2515 NXT_PACKET_IN (xid=0x0): cookie=0x5 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2516 mplsm,vlan_tci=0x0000,dl_src=60:66:66:66:05:01,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=0,mpls_ttl=31,mpls_bos=1
2519 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2521 dnl Modified MPLS pop action.
2522 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
2523 dnl 60:66:66:66:05:10 > 50:54:00:00:00:07, ethertype MPLS unicast (0x8847), length 62: MPLS (label 20, exp 0, [S], ttl 32)
2524 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
2525 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
2526 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2529 ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 60 66 66 66 05 10 88 47 00 01 41 20 45 00 00 2c 00 00 00 00 ff 06 3a 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45'
2532 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2533 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2535 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2536 NXT_PACKET_IN (xid=0x0): cookie=0x5 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2537 mpls,vlan_tci=0x0000,dl_src=60:66:66:66:05:10,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=0,mpls_ttl=31,mpls_bos=1
2539 NXT_PACKET_IN (xid=0x0): cookie=0x5 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2540 mpls,vlan_tci=0x0000,dl_src=60:66:66:66:05:10,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=0,mpls_ttl=31,mpls_bos=1
2542 NXT_PACKET_IN (xid=0x0): cookie=0x5 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2543 mpls,vlan_tci=0x0000,dl_src=60:66:66:66:05:10,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=0,mpls_ttl=31,mpls_bos=1
2546 AT_CHECK([ovs-appctl revalidator/purge], [0])
2547 AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
2548 cookie=0x5, n_packets=3, n_bytes=186, dl_src=60:66:66:66:05:00 actions=push_mpls:0x8848,pop_mpls:0x8847,CONTROLLER:65535
2549 cookie=0x5, n_packets=3, n_bytes=186, dl_src=60:66:66:66:05:01 actions=push_mpls:0x8847,pop_mpls:0x8848,dec_mpls_ttl,CONTROLLER:65535
2550 cookie=0x5, n_packets=3, n_bytes=186, dl_src=60:66:66:66:05:10 actions=push_mpls:0x8848,dec_mpls_ttl,pop_mpls:0x8847,dec_mpls_ttl,CONTROLLER:65535
2551 cookie=0xa, n_packets=3, n_bytes=180, dl_src=40:44:44:44:44:42 actions=push_mpls:0x8847,load:0xa->OXM_OF_MPLS_LABEL[[]],load:0x3->OXM_OF_MPLS_TC[[]],CONTROLLER:65535
2552 cookie=0xa, n_packets=3, n_bytes=180, dl_src=40:44:44:44:44:43 actions=push_mpls:0x8847,load:0xa->OXM_OF_MPLS_LABEL[[]],load:0x3->OXM_OF_MPLS_TC[[]],CONTROLLER:65535
2553 cookie=0xa, n_packets=3, n_bytes=180, dl_src=40:44:44:44:44:44 actions=push_mpls:0x8847,load:0xa->OXM_OF_MPLS_LABEL[[]],load:0x3->OXM_OF_MPLS_TC[[]],CONTROLLER:65535
2554 cookie=0xa, n_packets=3, n_bytes=180, dl_src=40:44:44:44:44:45 actions=push_mpls:0x8847,load:0xa->OXM_OF_MPLS_LABEL[[]],load:0x3->OXM_OF_MPLS_TC[[]],dec_mpls_ttl,CONTROLLER:65535
2555 cookie=0xa, n_packets=3, n_bytes=180, dl_src=40:44:44:44:44:46 actions=push_mpls:0x8847,load:0xa->OXM_OF_MPLS_LABEL[[]],load:0x3->OXM_OF_MPLS_TC[[]],set_mpls_ttl(10),CONTROLLER:65535
2556 cookie=0xa, n_packets=3, n_bytes=180, dl_src=40:44:44:44:44:47 actions=push_mpls:0x8847,load:0xa->OXM_OF_MPLS_LABEL[[]],load:0x3->OXM_OF_MPLS_TC[[]],dec_mpls_ttl,set_mpls_ttl(10),CONTROLLER:65535
2557 cookie=0xa, n_packets=3, n_bytes=180, dl_src=40:44:44:44:44:48 actions=push_mpls:0x8847,load:0xa->OXM_OF_MPLS_LABEL[[]],load:0x3->OXM_OF_MPLS_TC[[]],set_mpls_ttl(10),dec_mpls_ttl,CONTROLLER:65535
2558 cookie=0xa, n_packets=3, n_bytes=180, dl_src=41:44:44:44:44:42 actions=push_mpls:0x8847,load:0xa->OXM_OF_MPLS_LABEL[[]],load:0x3->OXM_OF_MPLS_TC[[]],pop_mpls:0x0800,CONTROLLER:65535
2559 cookie=0xa, n_packets=3, n_bytes=180, mpls,dl_src=40:44:44:44:44:49 actions=push_mpls:0x8848,load:0xa->OXM_OF_MPLS_LABEL[[]],CONTROLLER:65535
2560 cookie=0xb, n_packets=3, n_bytes=180, mpls,dl_src=50:55:55:55:55:55 actions=load:0x3e8->OXM_OF_MPLS_LABEL[[]],CONTROLLER:65535
2561 cookie=0xc, n_packets=3, n_bytes=180, dl_src=70:77:77:77:77:77 actions=push_mpls:0x8848,load:0x3e8->OXM_OF_MPLS_LABEL[[]],load:0x7->OXM_OF_MPLS_TC[[]],CONTROLLER:65535
2562 cookie=0xd, n_packets=3, n_bytes=180, dl_src=60:66:66:66:00:08 actions=pop_mpls:0x0806,resubmit(1,1)
2563 cookie=0xd, n_packets=3, n_bytes=186, dl_src=60:66:66:66:00:01 actions=pop_mpls:0x0800,dec_ttl,CONTROLLER:65535
2564 cookie=0xd, n_packets=3, n_bytes=186, dl_src=60:66:66:66:00:02 actions=pop_mpls:0x0800,load:0xa000001->NXM_OF_IP_DST[[]],CONTROLLER:65535
2565 cookie=0xd, n_packets=3, n_bytes=186, dl_src=60:66:66:66:00:03 actions=pop_mpls:0x0800,move:NXM_OF_IP_DST[[]]->NXM_OF_IP_SRC[[]],CONTROLLER:65535
2566 cookie=0xd, n_packets=3, n_bytes=186, dl_src=60:66:66:66:00:04 actions=pop_mpls:0x0800,push:NXM_OF_IP_DST[[]],pop:NXM_OF_IP_SRC[[]],CONTROLLER:65535
2567 cookie=0xd, n_packets=3, n_bytes=186, dl_src=60:66:66:66:00:05 actions=pop_mpls:0x0800,multipath(eth_src,50,modulo_n,256,0,NXM_OF_IP_SRC[[0..7]]),CONTROLLER:65535
2568 cookie=0xd, n_packets=3, n_bytes=186, dl_src=60:66:66:66:00:06 actions=pop_mpls:0x0800,bundle_load(eth_src,50,hrw,ofport,NXM_OF_IP_SRC[[0..15]],slaves:1,2),CONTROLLER:65535
2569 cookie=0xd, n_packets=3, n_bytes=186, dl_src=60:66:66:66:00:07 actions=pop_mpls:0x0800,learn(table=1,hard_timeout=60,eth_type=0x800,nw_proto=6,NXM_OF_IP_SRC[[]]=NXM_OF_IP_DST[[]]),CONTROLLER:65535
2570 cookie=0xd, n_packets=3, n_bytes=186, dl_src=60:66:66:66:00:09 actions=resubmit(,2),CONTROLLER:65535
2571 cookie=0xd, n_packets=3, n_bytes=186, dl_src=60:66:66:66:00:0a actions=pop_mpls:0x0800,mod_nw_dst:10.0.0.1,CONTROLLER:65535
2572 cookie=0xd, n_packets=3, n_bytes=186, dl_src=60:66:66:66:00:0b actions=pop_mpls:0x0800,mod_nw_src:10.0.0.1,CONTROLLER:65535
2573 cookie=0xd, n_packets=3, n_bytes=186, dl_src=60:66:66:66:66:66 actions=pop_mpls:0x0800,CONTROLLER:65535
2574 cookie=0xd, n_packets=3, n_bytes=198, dl_src=60:66:66:66:01:00 actions=pop_mpls:0x8848,CONTROLLER:65535
2575 cookie=0xd, n_packets=3, n_bytes=198, dl_src=60:66:66:66:01:01 actions=pop_mpls:0x8847,dec_mpls_ttl,CONTROLLER:65535
2576 cookie=0xd, n_packets=3, n_bytes=198, dl_src=60:66:66:66:01:02 actions=pop_mpls:0x8848,load:0x3->OXM_OF_MPLS_TC[[]],CONTROLLER:65535
2577 cookie=0xd, n_packets=3, n_bytes=198, dl_src=60:66:66:66:02:00 actions=pop_mpls:0x8847,pop_mpls:0x0800,CONTROLLER:65535
2578 cookie=0xd, table=1, n_packets=3, n_bytes=168, arp actions=CONTROLLER:65535
2579 cookie=0xdeadbeef, table=2, n_packets=3, n_bytes=186, dl_src=60:66:66:66:00:09 actions=pop_mpls:0x0800,mod_nw_tos:48
2580 cookie=0xe, n_packets=3, n_bytes=198, dl_src=60:66:66:66:02:01 actions=pop_mpls:0x8848,pop_mpls:0x0800,dec_ttl,CONTROLLER:65535
2581 cookie=0xe, n_packets=3, n_bytes=198, dl_src=60:66:66:66:02:10 actions=pop_mpls:0x8847,dec_mpls_ttl,pop_mpls:0x0800,dec_ttl,CONTROLLER:65535
2582 cookie=0xe, n_packets=3, n_bytes=210, dl_src=60:66:66:66:03:00 actions=pop_mpls:0x8848,pop_mpls:0x8848,CONTROLLER:65535
2583 cookie=0xe, n_packets=3, n_bytes=210, dl_src=60:66:66:66:03:01 actions=pop_mpls:0x8847,pop_mpls:0x8847,dec_mpls_ttl,CONTROLLER:65535
2584 cookie=0xe, n_packets=3, n_bytes=210, dl_src=60:66:66:66:03:10 actions=pop_mpls:0x8848,dec_mpls_ttl,pop_mpls:0x8848,dec_mpls_ttl,CONTROLLER:65535
2585 cookie=0xf, n_packets=3, n_bytes=186, dl_src=60:66:66:66:04:00 actions=pop_mpls:0x0800,push_mpls:0x8847,CONTROLLER:65535
2586 cookie=0xf, n_packets=3, n_bytes=186, dl_src=60:66:66:66:04:01 actions=pop_mpls:0x0800,push_mpls:0x8848,dec_mpls_ttl,CONTROLLER:65535
2587 cookie=0xf, n_packets=3, n_bytes=186, dl_src=60:66:66:66:04:10 actions=pop_mpls:0x0800,dec_ttl,push_mpls:0x8848,dec_mpls_ttl,CONTROLLER:65535
2594 AT_SETUP([ofproto-dpif - MPLS handling with goto_table])
2595 OVS_VSWITCHD_START([dnl
2596 add-port br0 p1 -- set Interface p1 type=dummy
2598 on_exit 'kill `cat ovs-ofctl.pid`'
2600 AT_CAPTURE_FILE([ofctl_monitor.log])
2601 AT_DATA([flows.txt], [dnl
2602 table=0 mplsm actions=pop_mpls:0x800,goto_table(1)
2603 table=1 ip,ip_dscp=8 actions=controller
2605 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flows br0 flows.txt])
2608 dnl Modified MPLS pop action.
2609 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
2610 dnl 60:66:66:66:00:08 > 50:54:00:00:00:01, ethertype MPLS multicast (0x8848), length 62: MPLS (label 20, exp 0, [S], ttl 32)
2611 dnl (tos 0x20, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
2612 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
2613 AT_CHECK([ovs-ofctl -O OpenFlow12 monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2616 ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 01 60 66 66 66 00 08 88 48 00 01 41 20 45 20 00 2c 00 00 00 00 ff 06 3a 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45'
2618 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2619 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2621 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
2622 OFPT_PACKET_IN (OF1.2) (xid=0x0): table_id=1 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2623 tcp,vlan_tci=0x0000,dl_src=60:66:66:66:00:08,dl_dst=50:54:00:00:00:01,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=32,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744
2625 OFPT_PACKET_IN (OF1.2) (xid=0x0): table_id=1 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2626 tcp,vlan_tci=0x0000,dl_src=60:66:66:66:00:08,dl_dst=50:54:00:00:00:01,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=32,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744
2628 OFPT_PACKET_IN (OF1.2) (xid=0x0): table_id=1 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2629 tcp,vlan_tci=0x0000,dl_src=60:66:66:66:00:08,dl_dst=50:54:00:00:00:01,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=32,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744
2632 AT_CHECK([ovs-appctl revalidator/purge], [0])
2633 AT_CHECK([ovs-ofctl -O OpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
2634 n_packets=3, n_bytes=186, mplsm actions=pop_mpls:0x0800,goto_table:1
2635 table=1, n_packets=3, n_bytes=174, ip,nw_tos=32 actions=CONTROLLER:65535
2636 OFPST_FLOW reply (OF1.2):
2642 AT_SETUP([ofproto-dpif - MPLS handling with write_actions])
2643 OVS_VSWITCHD_START([dnl
2644 add-port br0 p1 -- set Interface p1 type=dummy
2646 on_exit 'kill `cat ovs-ofctl.pid`'
2648 dnl N.B: The first (and only) action that accesses L3 data after the
2649 dnl pop_mpls action is present in write_actions. This exercises recirculation
2650 dnl triggered in write_actions due to a previous action not in write actions.
2651 AT_CAPTURE_FILE([ofctl_monitor.log])
2652 AT_DATA([flows.txt], [dnl
2653 mplsm actions=pop_mpls:0x800,write_actions(dec_ttl,controller)
2655 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flows br0 flows.txt])
2657 dnl Modified MPLS pop action.
2658 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
2659 dnl 60:66:66:66:00:08 > 50:54:00:00:00:01, ethertype MPLS multicast (0x8848), length 62: MPLS (label 20, exp 0, [S], ttl 32)
2660 dnl (tos 0x20, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
2661 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
2662 AT_CHECK([ovs-ofctl -O OpenFlow12 monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2665 ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 01 60 66 66 66 00 08 88 48 00 01 41 20 45 20 00 2c 00 00 00 00 ff 06 3a 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45'
2667 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2668 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2670 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
2671 OFPT_PACKET_IN (OF1.2) (xid=0x0): total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2672 tcp,vlan_tci=0x0000,dl_src=60:66:66:66:00:08,dl_dst=50:54:00:00:00:01,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=32,nw_ecn=0,nw_ttl=254,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744
2674 OFPT_PACKET_IN (OF1.2) (xid=0x0): total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2675 tcp,vlan_tci=0x0000,dl_src=60:66:66:66:00:08,dl_dst=50:54:00:00:00:01,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=32,nw_ecn=0,nw_ttl=254,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744
2677 OFPT_PACKET_IN (OF1.2) (xid=0x0): total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2678 tcp,vlan_tci=0x0000,dl_src=60:66:66:66:00:08,dl_dst=50:54:00:00:00:01,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=32,nw_ecn=0,nw_ttl=254,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744
2681 AT_CHECK([ovs-appctl revalidator/purge], [0])
2682 AT_CHECK([ovs-ofctl -O OpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
2683 n_packets=3, n_bytes=186, mplsm actions=pop_mpls:0x0800,write_actions(dec_ttl,CONTROLLER:65535)
2684 OFPST_FLOW reply (OF1.2):
2690 AT_SETUP([ofproto-dpif - table-miss flow (OpenFlow 1.0)])
2691 OVS_VSWITCHD_START([dnl
2692 add-port br0 p1 -- set Interface p1 type=dummy
2694 on_exit 'kill `cat ovs-ofctl.pid`'
2696 AT_CAPTURE_FILE([ofctl_monitor.log])
2697 # A table-miss flow has priority 0 and no match
2698 AT_CHECK([ovs-ofctl --protocols=OpenFlow10 add-flow br0 'priority=0 actions=output:CONTROLLER'])
2700 dnl Singleton controller action.
2701 AT_CHECK([ovs-ofctl monitor -P openflow10 --protocols=OpenFlow10 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
2704 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=10:11:11:11:11:11,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=10),tcp_flags(0x002)'
2706 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2707 ovs-appctl -t ovs-ofctl exit
2709 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2710 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
2711 tcp,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:0
2713 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
2714 tcp,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:0
2716 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
2717 tcp,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:0
2720 AT_CHECK([ovs-appctl revalidator/purge], [0])
2721 AT_CHECK([ovs-ofctl --protocols=OpenFlow10 dump-flows br0 | ofctl_strip | sort], [0], [dnl
2722 n_packets=3, n_bytes=180, priority=0 actions=CONTROLLER:65535
2730 AT_SETUP([ofproto-dpif - table-miss flow (OpenFlow 1.3)])
2731 OVS_VSWITCHD_START([dnl
2732 add-port br0 p1 -- set Interface p1 type=dummy
2734 on_exit 'kill `cat ovs-ofctl.pid`'
2736 AT_CAPTURE_FILE([ofctl_monitor.log])
2737 # A table-miss flow has priority 0 and no match
2738 AT_CHECK([ovs-ofctl --protocols=OpenFlow13 add-flow br0 'priority=0 actions=output:CONTROLLER'])
2740 dnl Singleton controller action.
2741 AT_CHECK([ovs-ofctl monitor -P openflow10 --protocols=OpenFlow13 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
2744 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=10:11:11:11:11:11,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=10),tcp_flags(0x002)'
2746 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2747 ovs-appctl -t ovs-ofctl exit
2749 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2751 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2752 OFPT_PACKET_IN (OF1.3) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
2753 tcp,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:0
2755 OFPT_PACKET_IN (OF1.3) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
2756 tcp,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:0
2758 OFPT_PACKET_IN (OF1.3) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
2759 tcp,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:0
2762 AT_CHECK([ovs-appctl revalidator/purge], [0])
2763 AT_CHECK([ovs-ofctl --protocols=OpenFlow13 dump-flows br0 | ofctl_strip | sort], [0], [dnl
2764 n_packets=3, n_bytes=180, priority=0 actions=CONTROLLER:65535
2765 OFPST_FLOW reply (OF1.3):
2771 AT_SETUP([ofproto-dpif - table-miss flow with async config (OpenFlow 1.3)])
2772 OVS_VSWITCHD_START([dnl
2773 add-port br0 p1 -- set Interface p1 type=dummy
2775 on_exit 'kill `cat ovs-ofctl.pid`'
2777 ovs-appctl time/stop
2779 AT_CAPTURE_FILE([ofctl_monitor.log])
2780 # A table-miss flow has priority 0 and no match
2781 AT_CHECK([ovs-ofctl --protocols=OpenFlow13 add-flow br0 'priority=0 actions=output:CONTROLLER'])
2783 dnl Singleton controller action.
2784 AT_CHECK([ovs-ofctl monitor -P openflow10 --protocols=OpenFlow13 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
2786 # Become slave (OF 1.3), which should disable everything except port status.
2787 ovs-appctl -t ovs-ofctl ofctl/send 041800180000000200000003000000000000000000000001
2789 # Ensure that ovs-vswitchd gets a chance to reply before sending another command.
2790 ovs-appctl time/warp 500 100
2792 # Use OF 1.3 OFPT_SET_ASYNC to enable OFPR_NO_MATCH for slave only.
2793 ovs-appctl -t ovs-ofctl ofctl/send 041c002000000002000000000000000100000000000000000000000000000000
2795 ovs-appctl time/warp 500 100
2797 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=10:11:11:11:11:11,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=10),tcp_flags(0x002)'
2799 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2800 ovs-appctl -t ovs-ofctl exit
2802 AT_CHECK([ovs-appctl revalidator/purge], [0])
2803 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2804 send: OFPT_ROLE_REQUEST (OF1.3) (xid=0x2): role=slave generation_id=1
2805 OFPT_ROLE_REPLY (OF1.3) (xid=0x2): role=slave generation_id=1
2807 send: OFPT_SET_ASYNC (OF1.3) (xid=0x2):
2818 OFPT_PACKET_IN (OF1.3) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
2819 tcp,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:0
2821 OFPT_PACKET_IN (OF1.3) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
2822 tcp,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:0
2824 OFPT_PACKET_IN (OF1.3) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
2825 tcp,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:0
2828 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2830 AT_CHECK([ovs-ofctl --protocols=OpenFlow13 dump-flows br0 | ofctl_strip | sort], [0], [dnl
2831 n_packets=3, n_bytes=180, priority=0 actions=CONTROLLER:65535
2832 OFPST_FLOW reply (OF1.3):
2839 AT_SETUP([ofproto-dpif - table-miss flow (OpenFlow 1.4)])
2840 OVS_VSWITCHD_START([dnl
2841 add-port br0 p1 -- set Interface p1 type=dummy
2843 on_exit 'kill `cat ovs-ofctl.pid`'
2845 AT_CAPTURE_FILE([ofctl_monitor.log])
2846 # A table-miss flow has priority 0 and no match
2847 AT_CHECK([ovs-ofctl --protocols=OpenFlow14 add-flow br0 'priority=0 actions=output:CONTROLLER'])
2849 dnl Singleton controller action.
2850 AT_CHECK([ovs-ofctl monitor -P openflow10 --protocols=OpenFlow14 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
2853 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=10:11:11:11:11:11,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=10),tcp_flags(0x002)'
2855 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2856 ovs-appctl -t ovs-ofctl exit
2858 AT_CHECK([ovs-appctl revalidator/purge], [0])
2859 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2860 OFPT_PACKET_IN (OF1.4) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
2861 tcp,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:0
2863 OFPT_PACKET_IN (OF1.4) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
2864 tcp,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:0
2866 OFPT_PACKET_IN (OF1.4) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
2867 tcp,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:0
2870 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2872 AT_CHECK([ovs-ofctl --protocols=OpenFlow14 dump-flows br0 | ofctl_strip | sort], [0], [dnl
2873 n_packets=3, n_bytes=180, priority=0 actions=CONTROLLER:65535
2874 OFPST_FLOW reply (OF1.4):
2881 AT_SETUP([ofproto-dpif - packet-in reasons (Openflow 1.3)])
2882 OVS_VSWITCHD_START([dnl
2883 add-port br0 p1 -- set Interface p1 type=dummy
2885 on_exit 'kill `cat ovs-ofctl.pid`'
2887 AT_CAPTURE_FILE([ofctl_monitor.log])
2888 AT_DATA([flows.txt], [dnl
2889 table=0 in_port=1 actions=write_actions(output(CONTROLLER)),goto_table(1)
2890 table=1 actions=output(CONTROLLER),goto_table(2)
2891 table=2 actions=group:1234
2893 AT_CHECK([ovs-ofctl --protocols=OpenFlow13 add-group br0 'group_id=1234,type=all,bucket=output:10,bucket=output:CONTROLLER'])
2894 AT_CHECK([ovs-ofctl --protocols=OpenFlow13 add-flows br0 flows.txt])
2896 dnl Singleton controller action.
2897 AT_CHECK([ovs-ofctl monitor -P openflow10 --protocols=OpenFlow13 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
2900 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=10:11:11:11:11:11,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=10),tcp_flags(0x002)'
2902 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2903 ovs-appctl -t ovs-ofctl exit
2905 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2907 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2908 OFPT_PACKET_IN (OF1.3) (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
2909 tcp,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:0
2911 OFPT_PACKET_IN (OF1.3) (xid=0x0): table_id=2 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
2912 tcp,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:0
2914 OFPT_PACKET_IN (OF1.3) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
2915 tcp,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:0
2917 OFPT_PACKET_IN (OF1.3) (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
2918 tcp,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:0
2920 OFPT_PACKET_IN (OF1.3) (xid=0x0): table_id=2 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
2921 tcp,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:0
2923 OFPT_PACKET_IN (OF1.3) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
2924 tcp,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:0
2926 OFPT_PACKET_IN (OF1.3) (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
2927 tcp,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:0
2929 OFPT_PACKET_IN (OF1.3) (xid=0x0): table_id=2 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
2930 tcp,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:0
2932 OFPT_PACKET_IN (OF1.3) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
2933 tcp,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:0
2936 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2938 AT_CHECK([ovs-ofctl --protocols=OpenFlow13 dump-flows br0 | ofctl_strip | sort], [0], [dnl
2939 n_packets=3, n_bytes=180, in_port=1 actions=write_actions(CONTROLLER:65535),goto_table:1
2940 table=1, n_packets=3, n_bytes=180, actions=CONTROLLER:65535,goto_table:2
2941 table=2, n_packets=3, n_bytes=180, actions=group:1234
2942 OFPST_FLOW reply (OF1.3):
2949 AT_SETUP([ofproto-dpif - packet-in reasons (Openflow 1.4)])
2950 OVS_VSWITCHD_START([dnl
2951 add-port br0 p1 -- set Interface p1 type=dummy
2953 on_exit 'kill `cat ovs-ofctl.pid`'
2955 AT_CAPTURE_FILE([ofctl_monitor.log])
2956 AT_DATA([flows.txt], [dnl
2957 table=0 in_port=1 actions=write_actions(output(CONTROLLER)),goto_table(1)
2958 table=1 actions=output(CONTROLLER),goto_table(2)
2959 table=2 actions=group:1234
2961 AT_CHECK([ovs-ofctl --protocols=OpenFlow14 add-group br0 'group_id=1234,type=all,bucket=output:10,bucket=output:CONTROLLER'])
2962 AT_CHECK([ovs-ofctl --protocols=OpenFlow14 add-flows br0 flows.txt])
2964 dnl Singleton controller action.
2965 AT_CHECK([ovs-ofctl monitor -P openflow10 --protocols=OpenFlow14 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
2968 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=10:11:11:11:11:11,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=10),tcp_flags(0x002)'
2970 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2971 ovs-appctl -t ovs-ofctl exit
2973 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2975 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2976 OFPT_PACKET_IN (OF1.4) (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
2977 tcp,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:0
2979 OFPT_PACKET_IN (OF1.4) (xid=0x0): table_id=2 cookie=0x0 total_len=60 in_port=1 (via group) data_len=60 (unbuffered)
2980 tcp,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:0
2982 OFPT_PACKET_IN (OF1.4) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via action_set) data_len=60 (unbuffered)
2983 tcp,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:0
2985 OFPT_PACKET_IN (OF1.4) (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
2986 tcp,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:0
2988 OFPT_PACKET_IN (OF1.4) (xid=0x0): table_id=2 cookie=0x0 total_len=60 in_port=1 (via group) data_len=60 (unbuffered)
2989 tcp,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:0
2991 OFPT_PACKET_IN (OF1.4) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via action_set) data_len=60 (unbuffered)
2992 tcp,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:0
2994 OFPT_PACKET_IN (OF1.4) (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
2995 tcp,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:0
2997 OFPT_PACKET_IN (OF1.4) (xid=0x0): table_id=2 cookie=0x0 total_len=60 in_port=1 (via group) data_len=60 (unbuffered)
2998 tcp,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:0
3000 OFPT_PACKET_IN (OF1.4) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via action_set) data_len=60 (unbuffered)
3001 tcp,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:0
3004 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
3006 AT_CHECK([ovs-ofctl --protocols=OpenFlow14 dump-flows br0 | ofctl_strip | sort], [0], [dnl
3007 n_packets=3, n_bytes=180, in_port=1 actions=write_actions(CONTROLLER:65535),goto_table:1
3008 table=1, n_packets=3, n_bytes=180, actions=CONTROLLER:65535,goto_table:2
3009 table=2, n_packets=3, n_bytes=180, actions=group:1234
3010 OFPST_FLOW reply (OF1.4):
3017 AT_SETUP([ofproto-dpif - ARP modification slow-path])
3019 ADD_OF_PORTS([br0], [1], [2])
3021 ovs-vsctl -- set Interface p2 type=dummy options:pcap=p2.pcap
3022 ovs-ofctl add-flow br0 'in_port=1,arp actions=load:2->OXM_OF_ARP_OP[[]],2,load:0xc0a88001->OXM_OF_ARP_SPA[[]],2,load:0x404444444441->OXM_OF_ARP_THA[[]],2'
3024 # Input some packets that should follow the arp modification slow-path.
3026 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=80:88:88:88:88:88,dst=ff:ff:ff:ff:ff:ff),eth_type(0x0806),arp(sip=192.168.0.1,tip=192.168.0.2,op=1,sha=50:54:00:00:00:05,tha=00:00:00:00:00:00)'
3028 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
3030 # Check the packets that were output.
3031 AT_CHECK([ovs-ofctl parse-pcap p2.pcap], [0], [dnl
3032 arp,in_port=ANY,vlan_tci=0x0000,dl_src=80:88:88:88:88:88,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=192.168.0.1,arp_tpa=192.168.0.2,arp_op=2,arp_sha=50:54:00:00:00:05,arp_tha=00:00:00:00:00:00
3033 arp,in_port=ANY,vlan_tci=0x0000,dl_src=80:88:88:88:88:88,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=192.168.128.1,arp_tpa=192.168.0.2,arp_op=2,arp_sha=50:54:00:00:00:05,arp_tha=00:00:00:00:00:00
3034 arp,in_port=ANY,vlan_tci=0x0000,dl_src=80:88:88:88:88:88,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=192.168.128.1,arp_tpa=192.168.0.2,arp_op=2,arp_sha=50:54:00:00:00:05,arp_tha=40:44:44:44:44:41
3035 arp,in_port=ANY,vlan_tci=0x0000,dl_src=80:88:88:88:88:88,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=192.168.0.1,arp_tpa=192.168.0.2,arp_op=2,arp_sha=50:54:00:00:00:05,arp_tha=00:00:00:00:00:00
3036 arp,in_port=ANY,vlan_tci=0x0000,dl_src=80:88:88:88:88:88,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=192.168.128.1,arp_tpa=192.168.0.2,arp_op=2,arp_sha=50:54:00:00:00:05,arp_tha=00:00:00:00:00:00
3037 arp,in_port=ANY,vlan_tci=0x0000,dl_src=80:88:88:88:88:88,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=192.168.128.1,arp_tpa=192.168.0.2,arp_op=2,arp_sha=50:54:00:00:00:05,arp_tha=40:44:44:44:44:41
3038 arp,in_port=ANY,vlan_tci=0x0000,dl_src=80:88:88:88:88:88,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=192.168.0.1,arp_tpa=192.168.0.2,arp_op=2,arp_sha=50:54:00:00:00:05,arp_tha=00:00:00:00:00:00
3039 arp,in_port=ANY,vlan_tci=0x0000,dl_src=80:88:88:88:88:88,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=192.168.128.1,arp_tpa=192.168.0.2,arp_op=2,arp_sha=50:54:00:00:00:05,arp_tha=00:00:00:00:00:00
3040 arp,in_port=ANY,vlan_tci=0x0000,dl_src=80:88:88:88:88:88,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=192.168.128.1,arp_tpa=192.168.0.2,arp_op=2,arp_sha=50:54:00:00:00:05,arp_tha=40:44:44:44:44:41
3046 AT_SETUP([ofproto-dpif - VLAN handling])
3048 [set Bridge br0 fail-mode=standalone -- \
3049 add-port br0 p1 trunks=10,12 -- \
3050 add-port br0 p2 tag=10 -- \
3051 add-port br0 p3 tag=12 \
3052 other-config:priority-tags=true -- \
3053 add-port br0 p4 tag=12 -- \
3054 add-port br0 p5 vlan_mode=native-tagged tag=10 -- \
3055 add-port br0 p6 vlan_mode=native-tagged tag=10 trunks=10,12 -- \
3056 add-port br0 p7 vlan_mode=native-untagged tag=12 -- \
3057 add-port br0 p8 vlan_mode=native-untagged tag=12 trunks=10,12 \
3058 other-config:priority-tags=true -- \
3059 set Interface p1 type=dummy -- \
3060 set Interface p2 type=dummy -- \
3061 set Interface p3 type=dummy -- \
3062 set Interface p4 type=dummy -- \
3063 set Interface p5 type=dummy -- \
3064 set Interface p6 type=dummy -- \
3065 set Interface p7 type=dummy -- \
3066 set Interface p8 type=dummy --])
3068 dnl Each of these specifies an in_port by number, a VLAN VID (or "none"),
3069 dnl a VLAN PCP (used if the VID isn't "none") and the expected set of datapath
3075 "100 10 0 1,5,6,7,8,pop_vlan,2" \
3076 "100 10 1 1,5,6,7,8,pop_vlan,2" \
3079 "100 12 0 1,5,6,pop_vlan,3,4,7,8" \
3080 "100 12 1 1,5,6,pop_vlan,4,7,push_vlan(vid=0,pcp=1),3,8" \
3084 "1 10 0 5,6,7,8,100,pop_vlan,2" \
3085 "1 10 1 5,6,7,8,100,pop_vlan,2" \
3088 "1 12 0 5,6,100,pop_vlan,3,4,7,8" \
3089 "1 12 1 5,6,100,pop_vlan,4,7,push_vlan(vid=0,pcp=1),3,8" \
3090 "2 none 0 push_vlan(vid=10,pcp=0),1,5,6,7,8,100" \
3091 "2 0 0 pop_vlan,push_vlan(vid=10,pcp=0),1,5,6,7,8,100" \
3092 "2 0 1 pop_vlan,push_vlan(vid=10,pcp=1),1,5,6,7,8,100" \
3099 "3 none 0 4,7,8,push_vlan(vid=12,pcp=0),1,5,6,100" \
3100 "3 0 0 pop_vlan,4,7,8,push_vlan(vid=12,pcp=0),1,5,6,100" \
3101 "3 0 1 8,pop_vlan,4,7,push_vlan(vid=12,pcp=1),1,5,6,100" \
3108 "4 none 0 3,7,8,push_vlan(vid=12,pcp=0),1,5,6,100" \
3109 "4 0 0 pop_vlan,3,7,8,push_vlan(vid=12,pcp=0),1,5,6,100" \
3110 "4 0 1 3,8,pop_vlan,7,push_vlan(vid=12,pcp=1),1,5,6,100" \
3117 "5 none 0 2,push_vlan(vid=10,pcp=0),1,6,7,8,100" \
3118 "5 0 0 pop_vlan,2,push_vlan(vid=10,pcp=0),1,6,7,8,100" \
3119 "5 0 1 pop_vlan,2,push_vlan(vid=10,pcp=1),1,6,7,8,100" \
3120 "5 10 0 1,6,7,8,100,pop_vlan,2" \
3121 "5 10 1 1,6,7,8,100,pop_vlan,2" \
3124 "5 12 0 1,6,100,pop_vlan,3,4,7,8" \
3125 "5 12 1 1,6,100,pop_vlan,4,7,push_vlan(vid=0,pcp=1),3,8" \
3126 "6 none 0 2,push_vlan(vid=10,pcp=0),1,5,7,8,100" \
3127 "6 0 0 pop_vlan,2,push_vlan(vid=10,pcp=0),1,5,7,8,100" \
3128 "6 0 1 pop_vlan,2,push_vlan(vid=10,pcp=1),1,5,7,8,100" \
3129 "6 10 0 1,5,7,8,100,pop_vlan,2" \
3130 "6 10 1 1,5,7,8,100,pop_vlan,2" \
3133 "6 12 0 1,5,100,pop_vlan,3,4,7,8" \
3134 "6 12 1 1,5,100,pop_vlan,4,7,push_vlan(vid=0,pcp=1),3,8" \
3135 "7 none 0 3,4,8,push_vlan(vid=12,pcp=0),1,5,6,100" \
3136 "7 0 0 pop_vlan,3,4,8,push_vlan(vid=12,pcp=0),1,5,6,100" \
3137 "7 0 1 3,8,pop_vlan,4,push_vlan(vid=12,pcp=1),1,5,6,100" \
3138 "7 10 0 1,5,6,8,100,pop_vlan,2" \
3139 "7 10 1 1,5,6,8,100,pop_vlan,2" \
3142 "7 12 0 1,5,6,100,pop_vlan,3,4,8" \
3143 "7 12 1 1,5,6,100,pop_vlan,4,push_vlan(vid=0,pcp=1),3,8" \
3144 "8 none 0 3,4,7,push_vlan(vid=12,pcp=0),1,5,6,100" \
3145 "8 0 0 pop_vlan,3,4,7,push_vlan(vid=12,pcp=0),1,5,6,100" \
3146 "8 0 1 3,pop_vlan,4,7,push_vlan(vid=12,pcp=1),1,5,6,100" \
3147 "8 10 0 1,5,6,7,100,pop_vlan,2" \
3148 "8 10 1 1,5,6,7,100,pop_vlan,2" \
3151 "8 12 0 1,5,6,100,pop_vlan,3,4,7" \
3152 "8 12 1 1,5,6,100,pop_vlan,4,7,push_vlan(vid=0,pcp=1),3"
3160 if test $vlan = none; then
3161 flow="in_port($in_port),eth(src=50:54:00:00:00:01,dst=ff:ff:ff:ff:ff:ff),eth_type(0xabcd)"
3163 flow="in_port($in_port),eth(src=50:54:00:00:00:01,dst=ff:ff:ff:ff:ff:ff),eth_type(0x8100),vlan(vid=$vlan,pcp=$pcp),encap(eth_type(0xabcd))"
3166 echo "----------------------------------------------------------------------"
3167 echo "in_port=$in_port vlan=$vlan pcp=$pcp"
3169 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
3170 actual=`tail -1 stdout | sed 's/Datapath actions: //'`
3172 AT_CHECK([ovs-dpctl normalize-actions "$flow" "$expected"], [0], [stdout])
3174 AT_CHECK([ovs-dpctl normalize-actions "$flow" "$actual"], [0], [expout])
3180 AT_SETUP([ofproto-dpif - MPLS handling])
3181 OVS_VSWITCHD_START([dnl
3182 add-port br0 p1 -- set Interface p1 type=dummy
3184 on_exit 'kill `cat ovs-ofctl.pid`'
3186 AT_CAPTURE_FILE([ofctl_monitor.log])
3187 AT_DATA([flows.txt], [dnl
3188 dl_src=40:44:44:44:00:00 actions=push_mpls:0x8847,controller
3189 dl_src=40:44:44:44:00:01,mpls actions=push_mpls:0x8847,controller
3190 dl_src=40:44:44:44:00:02,mpls actions=push_mpls:0x8848,controller
3192 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 add-flows br0 flows.txt])
3194 dnl In this test, we push an MPLS tag to an ethernet packet.
3195 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
3198 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=40:44:44:44:00:00,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no)'
3200 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3201 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
3203 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
3204 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3205 mpls,vlan_tci=0x0000,dl_src=40:44:44:44:00:00,dl_dst=50:54:00:00:00:07,mpls_label=0,mpls_tc=0,mpls_ttl=64,mpls_bos=1
3206 00000000 50 54 00 00 00 07 40 44-44 44 00 00 88 47 00 00
3207 00000010 01 40 45 00 00 28 00 00-00 00 40 06 f9 7c c0 a8
3208 00000020 00 01 c0 a8 00 02 00 00-00 00 00 00 00 00 00 00
3209 00000030 00 00 50 00 00 00 00 00-00 00 00 00 00 00 00 00
3211 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3212 mpls,vlan_tci=0x0000,dl_src=40:44:44:44:00:00,dl_dst=50:54:00:00:00:07,mpls_label=0,mpls_tc=0,mpls_ttl=64,mpls_bos=1
3213 00000000 50 54 00 00 00 07 40 44-44 44 00 00 88 47 00 00
3214 00000010 01 40 45 00 00 28 00 00-00 00 40 06 f9 7c c0 a8
3215 00000020 00 01 c0 a8 00 02 00 00-00 00 00 00 00 00 00 00
3216 00000030 00 00 50 00 00 00 00 00-00 00 00 00 00 00 00 00
3218 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3219 mpls,vlan_tci=0x0000,dl_src=40:44:44:44:00:00,dl_dst=50:54:00:00:00:07,mpls_label=0,mpls_tc=0,mpls_ttl=64,mpls_bos=1
3220 00000000 50 54 00 00 00 07 40 44-44 44 00 00 88 47 00 00
3221 00000010 01 40 45 00 00 28 00 00-00 00 40 06 f9 7c c0 a8
3222 00000020 00 01 c0 a8 00 02 00 00-00 00 00 00 00 00 00 00
3223 00000030 00 00 50 00 00 00 00 00-00 00 00 00 00 00 00 00
3226 dnl In this test, we push an MPLS tag to an MPLS packet. The LSE should be
3227 dnl copied exactly, except for the BOS bit.
3228 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
3231 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=40:44:44:44:00:01,dst=50:54:00:00:00:07),eth_type(0x8847),mpls(label=10,tc=0,ttl=64,bos=1)'
3233 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3234 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
3236 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
3237 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3238 mpls,vlan_tci=0x0000,dl_src=40:44:44:44:00:01,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=0,mpls_lse1=41280
3239 00000000 50 54 00 00 00 07 40 44-44 44 00 01 88 47 00 00
3240 00000010 a0 40 00 00 a1 40 00 00-00 00 00 00 00 00 00 00
3241 00000020 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
3242 00000030 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
3244 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3245 mpls,vlan_tci=0x0000,dl_src=40:44:44:44:00:01,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=0,mpls_lse1=41280
3246 00000000 50 54 00 00 00 07 40 44-44 44 00 01 88 47 00 00
3247 00000010 a0 40 00 00 a1 40 00 00-00 00 00 00 00 00 00 00
3248 00000020 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
3249 00000030 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
3251 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3252 mpls,vlan_tci=0x0000,dl_src=40:44:44:44:00:01,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=0,mpls_lse1=41280
3253 00000000 50 54 00 00 00 07 40 44-44 44 00 01 88 47 00 00
3254 00000010 a0 40 00 00 a1 40 00 00-00 00 00 00 00 00 00 00
3255 00000020 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
3256 00000030 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
3259 dnl In this test, we push an MPLS tag to an MPLS packet. The LSE should be
3260 dnl copied exactly, except for the BOS bit. The ethertype should be updated
3261 dnl to the MPLS ethertype of the MPLS push action which differs to that
3262 dnl of the input packet.
3263 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
3266 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=40:44:44:44:00:02,dst=50:54:00:00:00:07),eth_type(0x8847),mpls(label=10,tc=0,ttl=64,bos=1)'
3268 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3269 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
3271 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
3272 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3273 mplsm,vlan_tci=0x0000,dl_src=40:44:44:44:00:02,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=0,mpls_lse1=41280
3274 00000000 50 54 00 00 00 07 40 44-44 44 00 02 88 48 00 00
3275 00000010 a0 40 00 00 a1 40 00 00-00 00 00 00 00 00 00 00
3276 00000020 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
3277 00000030 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
3279 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3280 mplsm,vlan_tci=0x0000,dl_src=40:44:44:44:00:02,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=0,mpls_lse1=41280
3281 00000000 50 54 00 00 00 07 40 44-44 44 00 02 88 48 00 00
3282 00000010 a0 40 00 00 a1 40 00 00-00 00 00 00 00 00 00 00
3283 00000020 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
3284 00000030 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
3286 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3287 mplsm,vlan_tci=0x0000,dl_src=40:44:44:44:00:02,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=0,mpls_lse1=41280
3288 00000000 50 54 00 00 00 07 40 44-44 44 00 02 88 48 00 00
3289 00000010 a0 40 00 00 a1 40 00 00-00 00 00 00 00 00 00 00
3290 00000020 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
3291 00000030 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
3297 AT_SETUP([ofproto-dpif - VLAN+MPLS handling])
3298 OVS_VSWITCHD_START([dnl
3299 add-port br0 p1 -- set Interface p1 type=dummy
3301 on_exit 'kill `cat ovs-ofctl.pid`'
3303 AT_CAPTURE_FILE([ofctl_monitor.log])
3304 AT_DATA([flows.txt], [dnl
3305 cookie=0xa dl_src=40:44:44:44:54:50 actions=push_mpls:0x8847,load:10->OXM_OF_MPLS_LABEL[[]],push_vlan:0x8100,set_vlan_vid:99,set_vlan_pcp:1,controller
3306 cookie=0xa dl_src=40:44:44:44:54:51 actions=push_mpls:0x8847,load:10->OXM_OF_MPLS_LABEL[[]],push_vlan:0x8100,set_vlan_vid:99,set_vlan_pcp:1,controller
3307 cookie=0xa dl_src=40:44:44:44:54:52 actions=push_mpls:0x8847,load:10->OXM_OF_MPLS_LABEL[[]],push_vlan:0x8100,load:99->OXM_OF_VLAN_VID[[]],set_vlan_pcp:1,controller
3308 cookie=0xa dl_src=40:44:44:44:54:53 actions=push_mpls:0x8847,load:10->OXM_OF_MPLS_LABEL[[]],push_vlan:0x8100,load:99->OXM_OF_VLAN_VID[[]],set_vlan_pcp:1,controller
3309 cookie=0xa dl_src=40:44:44:44:54:54 actions=push_vlan:0x8100,set_vlan_vid:99,set_vlan_pcp:1,push_mpls:0x8847,load:10->OXM_OF_MPLS_LABEL[[]],controller
3310 cookie=0xa dl_src=40:44:44:44:54:55 actions=push_vlan:0x8100,set_vlan_vid:99,set_vlan_pcp:1,push_mpls:0x8847,load:10->OXM_OF_MPLS_LABEL[[]],controller
3311 cookie=0xa dl_src=40:44:44:44:54:56 actions=push_vlan:0x8100,load:99->OXM_OF_VLAN_VID[[]],set_vlan_pcp:1,push_mpls:0x8847,load:10->OXM_OF_MPLS_LABEL[[]],controller
3312 cookie=0xa dl_src=40:44:44:44:54:57 actions=push_vlan:0x8100,load:99->OXM_OF_VLAN_VID[[]],set_vlan_pcp:1,push_mpls:0x8847,load:10->OXM_OF_MPLS_LABEL[[]],controller
3313 cookie=0xa dl_src=40:44:44:44:54:58,vlan_tci=0x1000/0x1000 actions=load:99->OXM_OF_VLAN_VID[[]],set_vlan_pcp:1,push_mpls:0x8847,load:10->OXM_OF_MPLS_LABEL[[]],controller
3314 cookie=0xa dl_src=40:44:44:44:54:59,vlan_tci=0x1000/0x1000 actions=push_mpls:0x8847,load:10->OXM_OF_MPLS_LABEL[[]],set_vlan_pcp:1,load:99->OXM_OF_VLAN_VID[[]],controller
3316 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 add-flows br0 flows.txt])
3318 dnl Modified MPLS controller action.
3319 dnl In this test, we push the MPLS tag before pushing a VLAN tag, so we see
3320 dnl both of these in the final flow
3321 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
3324 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=40:44:44:44:54:50,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no)'
3326 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3327 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
3329 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
3330 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3331 mpls,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:54:50,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1
3332 00000000 50 54 00 00 00 07 40 44-44 44 54 50 81 00 20 63
3333 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3334 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3335 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3336 00000040 00 00 00 00
3338 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3339 mpls,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:54:50,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1
3340 00000000 50 54 00 00 00 07 40 44-44 44 54 50 81 00 20 63
3341 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3342 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3343 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3344 00000040 00 00 00 00
3346 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3347 mpls,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:54:50,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1
3348 00000000 50 54 00 00 00 07 40 44-44 44 54 50 81 00 20 63
3349 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3350 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3351 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3352 00000040 00 00 00 00
3355 dnl Modified MPLS controller action.
3356 dnl In this test, the input packet in vlan-tagged, which should be stripped
3357 dnl before we push the MPLS and VLAN tags.
3358 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
3361 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=40:44:44:44:54:51,dst=50:54:00:00:00:07),eth_type(0x8100),vlan(vid=88,pcp=7),encap(eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no))'
3363 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3364 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
3366 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
3367 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3368 mpls,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:54:51,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1
3369 00000000 50 54 00 00 00 07 40 44-44 44 54 51 81 00 20 63
3370 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3371 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3372 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3374 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3375 mpls,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:54:51,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1
3376 00000000 50 54 00 00 00 07 40 44-44 44 54 51 81 00 20 63
3377 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3378 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3379 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3381 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3382 mpls,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:54:51,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1
3383 00000000 50 54 00 00 00 07 40 44-44 44 54 51 81 00 20 63
3384 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3385 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3386 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3389 dnl Modified MPLS controller action.
3390 dnl In this test, we push the MPLS tag before pushing a VLAN tag, so we see
3391 dnl both of these in the final flow
3392 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
3395 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=40:44:44:44:54:52,dst=52:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no)'
3397 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3398 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
3400 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
3401 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3402 mpls,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:54:52,dl_dst=52:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1
3403 00000000 52 54 00 00 00 07 40 44-44 44 54 52 81 00 20 63
3404 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3405 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3406 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3407 00000040 00 00 00 00
3409 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3410 mpls,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:54:52,dl_dst=52:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1
3411 00000000 52 54 00 00 00 07 40 44-44 44 54 52 81 00 20 63
3412 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3413 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3414 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3415 00000040 00 00 00 00
3417 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3418 mpls,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:54:52,dl_dst=52:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1
3419 00000000 52 54 00 00 00 07 40 44-44 44 54 52 81 00 20 63
3420 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3421 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3422 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3423 00000040 00 00 00 00
3426 dnl Modified MPLS controller action.
3427 dnl In this test, the input packet in vlan-tagged, which should be stripped
3428 dnl before we push the MPLS and VLAN tags.
3429 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
3432 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=40:44:44:44:54:53,dst=50:54:00:00:00:07),eth_type(0x8100),vlan(vid=88,pcp=7),encap(eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no))'
3434 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3435 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
3437 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
3438 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3439 mpls,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:54:53,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1
3440 00000000 50 54 00 00 00 07 40 44-44 44 54 53 81 00 20 63
3441 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3442 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3443 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3445 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3446 mpls,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:54:53,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1
3447 00000000 50 54 00 00 00 07 40 44-44 44 54 53 81 00 20 63
3448 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3449 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3450 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3452 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3453 mpls,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:54:53,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1
3454 00000000 50 54 00 00 00 07 40 44-44 44 54 53 81 00 20 63
3455 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3456 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3457 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3460 dnl Modified MPLS controller action.
3461 dnl In this test, we push the VLAN tag before pushing a MPLS tag, but these
3462 dnl actions are reordered, so we see both of these in the final flow.
3463 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
3466 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=40:44:44:44:54:54,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no)'
3468 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3469 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
3471 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
3472 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3473 mpls,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:54:54,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1
3474 00000000 50 54 00 00 00 07 40 44-44 44 54 54 81 00 20 63
3475 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3476 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3477 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3478 00000040 00 00 00 00
3480 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3481 mpls,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:54:54,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1
3482 00000000 50 54 00 00 00 07 40 44-44 44 54 54 81 00 20 63
3483 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3484 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3485 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3486 00000040 00 00 00 00
3488 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3489 mpls,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:54:54,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1
3490 00000000 50 54 00 00 00 07 40 44-44 44 54 54 81 00 20 63
3491 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3492 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3493 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3494 00000040 00 00 00 00
3497 dnl Modified MPLS controller action.
3498 dnl In this test, the input packet in vlan-tagged, which should be stripped
3499 dnl before we push the MPLS and VLAN tags.
3500 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
3503 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=40:44:44:44:54:55,dst=50:54:00:00:00:07),eth_type(0x8100),vlan(vid=88,pcp=7),encap(eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no))'
3505 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3506 OVS_APP_EXIT_AND_WAIT([ovs-ofctl])
3508 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
3509 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3510 mpls,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:54:55,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1
3511 00000000 50 54 00 00 00 07 40 44-44 44 54 55 81 00 20 63
3512 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3513 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3514 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3516 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3517 mpls,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:54:55,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1
3518 00000000 50 54 00 00 00 07 40 44-44 44 54 55 81 00 20 63
3519 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3520 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3521 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3523 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3524 mpls,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:54:55,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1
3525 00000000 50 54 00 00 00 07 40 44-44 44 54 55 81 00 20 63
3526 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3527 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3528 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3531 dnl Modified MPLS controller action.
3532 dnl In this test, we push the VLAN tag before pushing a MPLS tag, but these
3533 dnl actions are reordered, so we see both of these in the final flow.
3534 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
3537 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=40:44:44:44:54:56,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no)'
3539 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3540 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
3542 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
3543 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3544 mpls,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:54:56,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1
3545 00000000 50 54 00 00 00 07 40 44-44 44 54 56 81 00 20 63
3546 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3547 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3548 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3549 00000040 00 00 00 00
3551 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3552 mpls,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:54:56,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1
3553 00000000 50 54 00 00 00 07 40 44-44 44 54 56 81 00 20 63
3554 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3555 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3556 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3557 00000040 00 00 00 00
3559 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3560 mpls,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:54:56,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1
3561 00000000 50 54 00 00 00 07 40 44-44 44 54 56 81 00 20 63
3562 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3563 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3564 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3565 00000040 00 00 00 00
3568 dnl Modified MPLS controller action.
3569 dnl In this test, the input packet in vlan-tagged, which should be stripped
3570 dnl before we push the MPLS and VLAN tags.
3571 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 -m 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
3574 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=40:44:44:44:54:57,dst=50:54:00:00:00:07),eth_type(0x8100),vlan(vid=88,pcp=7),encap(eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no))'
3576 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3577 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
3579 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
3580 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3581 mpls,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:54:57,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1
3582 00000000 50 54 00 00 00 07 40 44-44 44 54 57 81 00 20 63
3583 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3584 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3585 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3587 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3588 mpls,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:54:57,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1
3589 00000000 50 54 00 00 00 07 40 44-44 44 54 57 81 00 20 63
3590 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3591 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3592 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3594 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3595 mpls,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:54:57,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1
3596 00000000 50 54 00 00 00 07 40 44-44 44 54 57 81 00 20 63
3597 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3598 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3599 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3602 dnl Modified MPLS controller action.
3603 dnl In this test, the input packet in vlan-tagged, which should be stripped
3604 dnl before we push the MPLS and VLAN tags.
3605 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
3608 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=40:44:44:44:54:58,dst=50:54:00:00:00:07),eth_type(0x8100),vlan(vid=88,pcp=7),encap(eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no))'
3610 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3611 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
3613 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
3614 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3615 mpls,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:54:58,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1
3616 00000000 50 54 00 00 00 07 40 44-44 44 54 58 81 00 20 63
3617 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3618 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3619 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3621 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3622 mpls,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:54:58,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1
3623 00000000 50 54 00 00 00 07 40 44-44 44 54 58 81 00 20 63
3624 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3625 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3626 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3628 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3629 mpls,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:54:58,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1
3630 00000000 50 54 00 00 00 07 40 44-44 44 54 58 81 00 20 63
3631 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3632 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3633 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3636 dnl Modified MPLS controller action.
3637 dnl In this test, the input packet in vlan-tagged, which should be modified
3638 dnl before we push MPLS and VLAN tags.
3639 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
3642 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=40:44:44:44:54:59,dst=50:54:00:00:00:07),eth_type(0x8100),vlan(vid=88,pcp=7),encap(eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no))'
3644 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3645 ovs-appctl -t ovs-ofctl exit
3647 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
3648 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3649 mpls,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:54:59,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1
3650 00000000 50 54 00 00 00 07 40 44-44 44 54 59 81 00 20 63
3651 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3652 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3653 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3655 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3656 mpls,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:54:59,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1
3657 00000000 50 54 00 00 00 07 40 44-44 44 54 59 81 00 20 63
3658 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3659 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3660 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3662 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3663 mpls,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:54:59,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1
3664 00000000 50 54 00 00 00 07 40 44-44 44 54 59 81 00 20 63
3665 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3666 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3667 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3670 AT_CHECK([ovs-appctl revalidator/purge], [0])
3671 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
3672 cookie=0xa, n_packets=3, n_bytes=180, dl_src=40:44:44:44:54:50 actions=push_mpls:0x8847,load:0xa->OXM_OF_MPLS_LABEL[[]],push_vlan:0x8100,set_field:4195->vlan_vid,set_field:1->vlan_pcp,CONTROLLER:65535
3673 cookie=0xa, n_packets=3, n_bytes=180, dl_src=40:44:44:44:54:51 actions=push_mpls:0x8847,load:0xa->OXM_OF_MPLS_LABEL[[]],push_vlan:0x8100,set_field:4195->vlan_vid,set_field:1->vlan_pcp,CONTROLLER:65535
3674 cookie=0xa, n_packets=3, n_bytes=180, dl_src=40:44:44:44:54:52 actions=push_mpls:0x8847,load:0xa->OXM_OF_MPLS_LABEL[[]],push_vlan:0x8100,load:0x63->OXM_OF_VLAN_VID[[]],set_field:1->vlan_pcp,CONTROLLER:65535
3675 cookie=0xa, n_packets=3, n_bytes=180, dl_src=40:44:44:44:54:53 actions=push_mpls:0x8847,load:0xa->OXM_OF_MPLS_LABEL[[]],push_vlan:0x8100,load:0x63->OXM_OF_VLAN_VID[[]],set_field:1->vlan_pcp,CONTROLLER:65535
3676 cookie=0xa, n_packets=3, n_bytes=180, dl_src=40:44:44:44:54:54 actions=push_vlan:0x8100,set_field:4195->vlan_vid,set_field:1->vlan_pcp,push_mpls:0x8847,load:0xa->OXM_OF_MPLS_LABEL[[]],CONTROLLER:65535
3677 cookie=0xa, n_packets=3, n_bytes=180, dl_src=40:44:44:44:54:55 actions=push_vlan:0x8100,set_field:4195->vlan_vid,set_field:1->vlan_pcp,push_mpls:0x8847,load:0xa->OXM_OF_MPLS_LABEL[[]],CONTROLLER:65535
3678 cookie=0xa, n_packets=3, n_bytes=180, dl_src=40:44:44:44:54:56 actions=push_vlan:0x8100,load:0x63->OXM_OF_VLAN_VID[[]],set_field:1->vlan_pcp,push_mpls:0x8847,load:0xa->OXM_OF_MPLS_LABEL[[]],CONTROLLER:65535
3679 cookie=0xa, n_packets=3, n_bytes=180, dl_src=40:44:44:44:54:57 actions=push_vlan:0x8100,load:0x63->OXM_OF_VLAN_VID[[]],set_field:1->vlan_pcp,push_mpls:0x8847,load:0xa->OXM_OF_MPLS_LABEL[[]],CONTROLLER:65535
3680 cookie=0xa, n_packets=3, n_bytes=180, vlan_tci=0x1000/0x1000,dl_src=40:44:44:44:54:58 actions=load:0x63->OXM_OF_VLAN_VID[[]],set_field:1->vlan_pcp,push_mpls:0x8847,load:0xa->OXM_OF_MPLS_LABEL[[]],CONTROLLER:65535
3681 cookie=0xa, n_packets=3, n_bytes=180, vlan_tci=0x1000/0x1000,dl_src=40:44:44:44:54:59 actions=push_mpls:0x8847,load:0xa->OXM_OF_MPLS_LABEL[[]],set_field:1->vlan_pcp,load:0x63->OXM_OF_VLAN_VID[[]],CONTROLLER:65535
3682 OFPST_FLOW reply (OF1.2):
3688 AT_SETUP([ofproto-dpif - fragment handling - trace])
3690 ADD_OF_PORTS([br0], [1], [2], [3], [4], [5], [6], [90])
3691 AT_DATA([flows.txt], [dnl
3692 priority=75 tcp ip_frag=no tp_dst=80 actions=move:OXM_OF_TCP_DST[[]]->OXM_OF_TCP_SRC[[]],output:1
3693 priority=75 tcp ip_frag=first tp_dst=80 actions=move:OXM_OF_TCP_DST[[]]->OXM_OF_TCP_SRC[[]],output:2
3694 priority=50 tcp ip_frag=no actions=move:OXM_OF_TCP_DST[[]]->OXM_OF_TCP_SRC[[]],output:4
3695 priority=50 tcp ip_frag=first actions=move:OXM_OF_TCP_DST[[]]->OXM_OF_TCP_SRC[[]],output:5
3696 priority=50 tcp ip_frag=later actions=output:6
3698 AT_CHECK([ovs-ofctl replace-flows br0 flows.txt])
3700 base_flow="in_port(90),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=128"
3701 no_flow="$base_flow,frag=no),tcp(src=12345,dst=80)"
3702 first_flow="$base_flow,frag=first),tcp(src=12345,dst=80)"
3703 later_flow="$base_flow,frag=later)"
3705 # mode no first later
3708 'drop 1 drop drop' \
3717 AT_CHECK([ovs-ofctl set-frags br0 $mode])
3718 for type in no first later; do
3719 eval flow=\$${type}_flow exp_output=\$$type
3720 printf "\n%s\n" "----$mode $type-----"
3721 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
3723 if test $mode = drop && test $type != no; then
3724 echo 'Packets dropped because they are IP fragments and the fragment handling mode is "drop".' >> expout
3725 echo "Datapath actions: $exp_output" >> expout
3726 elif test $type = later; then
3727 echo "Datapath actions: $exp_output" >> expout
3729 echo "Datapath actions: set(tcp(src=80,dst=80)),$exp_output" >> expout
3731 AT_CHECK([grep 'IP fragments' stdout; tail -1 stdout], [0], [expout])
3737 AT_SETUP([ofproto-dpif - fragment handling - upcall])
3739 ADD_OF_PORTS([br0], [1], [2], [3], [4], [5], [6], [90])
3740 AT_DATA([flows.txt], [dnl
3741 priority=75 tcp ip_frag=no tp_dst=80 actions=set_field:81->tcp_dst,output:1
3742 priority=75 tcp ip_frag=first tp_dst=80 actions=set_field:81->tcp_dst,output:2
3743 priority=50 tcp ip_frag=no actions=set_field:81->tcp_dst,output:4
3744 priority=50 tcp ip_frag=first actions=set_field:81->tcp_dst,output:5
3745 priority=50 tcp ip_frag=later actions=output:6
3747 AT_CHECK([ovs-ofctl replace-flows br0 flows.txt])
3749 base_flow="in_port(90),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=128"
3750 no_flow="$base_flow,frag=no),tcp(src=12345,dst=80)"
3751 first_flow="$base_flow,frag=first),tcp(src=12345,dst=80)"
3752 later_flow="$base_flow,frag=later)"
3754 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
3758 AT_CHECK([ovs-ofctl set-frags br0 $mode])
3759 for type in no first later; do
3760 eval flow=\$${type}_flow
3761 printf "\n%s\n" "----$mode $type-----"
3763 AT_CHECK([ovs-appctl netdev-dummy/receive p90 "$flow"], [0], [stdout])
3766 AT_CHECK([ovs-appctl dpctl/dump-flows], [0], [dnl
3767 flow-dump from non-dpdk interfaces:
3768 recirc_id(0),in_port(90),eth_type(0x0800),ipv4(proto=6,frag=no),tcp(dst=80), packets:0, bytes:0, used:never, actions:set(tcp(dst=81)),1
3769 recirc_id(0),in_port(90),eth_type(0x0800),ipv4(proto=6,frag=first),tcp(dst=80), packets:0, bytes:0, used:never, actions:set(tcp(dst=81)),5
3770 recirc_id(0),in_port(90),eth_type(0x0800),ipv4(proto=6,frag=later), packets:0, bytes:0, used:never, actions:6
3775 AT_CHECK([ovs-appctl revalidator/purge], [0])
3776 AT_CHECK([ovs-ofctl set-frags br0 $mode])
3777 for type in no first later; do
3778 eval flow=\$${type}_flow
3779 printf "\n%s\n" "----$mode $type-----"
3781 AT_CHECK([ovs-appctl netdev-dummy/receive p90 "$flow"], [0], [stdout])
3784 AT_CHECK([ovs-appctl dpctl/dump-flows], [0], [dnl
3785 flow-dump from non-dpdk interfaces:
3786 recirc_id(0),in_port(90),eth_type(0x0800),ipv4(proto=6,frag=no),tcp(dst=80), packets:0, bytes:0, used:never, actions:set(tcp(dst=81)),1
3787 recirc_id(0),in_port(90),eth_type(0x0800),ipv4(frag=first), packets:0, bytes:0, used:never, actions:drop
3788 recirc_id(0),in_port(90),eth_type(0x0800),ipv4(frag=later), packets:0, bytes:0, used:never, actions:drop
3793 AT_CHECK([ovs-appctl revalidator/purge], [0])
3794 AT_CHECK([ovs-ofctl set-frags br0 $mode])
3795 for type in no first later; do
3796 eval flow=\$${type}_flow
3797 printf "\n%s\n" "----$mode $type-----"
3799 AT_CHECK([ovs-appctl netdev-dummy/receive p90 "$flow"], [0], [stdout])
3802 AT_CHECK([ovs-appctl dpctl/dump-flows], [0], [dnl
3803 flow-dump from non-dpdk interfaces:
3804 recirc_id(0),in_port(90),eth_type(0x0800),ipv4(proto=6,frag=no),tcp(dst=80), packets:0, bytes:0, used:never, actions:set(tcp(dst=81)),1
3805 recirc_id(0),in_port(90),eth_type(0x0800),ipv4(proto=6,frag=first),tcp(dst=80), packets:0, bytes:0, used:never, actions:set(tcp(dst=81)),2
3806 recirc_id(0),in_port(90),eth_type(0x0800),ipv4(proto=6,frag=later), packets:0, bytes:0, used:never, actions:6
3812 AT_SETUP([ofproto-dpif - fragment handling - actions])
3814 ADD_OF_PORTS([br0], [1], [2], [3], [4], [5], [6], [90])
3816 AT_CHECK([ovs-ofctl add-flow br0 "tcp,ip_frag=later actions=move:OXM_OF_TCP_DST[[0..7]]->OXM_OF_TCP_SRC[[0..7]],output:1"], [1], [], [stderr])
3817 AT_CHECK([tail -2 stderr | sed 's/^.*|WARN|//'], [0], [dnl
3818 source field tcp_dst lacks correct prerequisites
3819 ovs-ofctl: actions are invalid with specified match (OFPBAC_MATCH_INCONSISTENT)
3822 AT_CHECK([ovs-ofctl -O OpenFlow15 add-flow br0 "tcp,ip_frag=later actions=move:OXM_OF_PKT_REG0[[0..7]]->OXM_OF_TCP_SRC[[0..7]],output:1"], [1], [], [stderr])
3823 AT_CHECK([tail -2 stderr | sed 's/^.*|WARN|//'], [0], [dnl
3824 destination field tcp_src lacks correct prerequisites
3825 ovs-ofctl: actions are invalid with specified match (OFPBAC_MATCH_INCONSISTENT)
3828 AT_CHECK([ovs-ofctl add-flow br0 "udp,ip_frag=later actions=set_field:8888->udp_src,output:1"], [1], [], [stderr])
3829 AT_CHECK([tail -2 stderr | sed 's/^.*|WARN|//'], [0], [dnl
3830 set_field udp_src lacks correct prerequisities
3831 ovs-ofctl: actions are invalid with specified match (OFPBAC_MATCH_INCONSISTENT)
3834 AT_CHECK([ovs-ofctl add-flow br0 "udp,ip_frag=later actions=load:8888->NXM_OF_UDP_DST[[]],output:1"], [1], [], [stderr])
3835 AT_CHECK([tail -2 stderr | sed 's/^.*|WARN|//'], [0], [dnl
3836 set_field udp_dst lacks correct prerequisities
3837 ovs-ofctl: actions are invalid with specified match (OFPBAC_MATCH_INCONSISTENT)
3840 AT_CHECK([ovs-ofctl add-flow br0 "sctp,ip_frag=later actions=set_field:8888->sctp_src,output:1"], [1], [], [stderr])
3841 AT_CHECK([tail -2 stderr | sed 's/^.*|WARN|//'], [0], [dnl
3842 set_field sctp_src lacks correct prerequisities
3843 ovs-ofctl: actions are invalid with specified match (OFPBAC_MATCH_INCONSISTENT)
3846 AT_CHECK([ovs-ofctl add-flow br0 "sctp,ip_frag=later actions=set_field:8888->sctp_dst,output:1"], [1], [], [stderr])
3847 AT_CHECK([tail -2 stderr | sed 's/^.*|WARN|//'], [0], [dnl
3848 set_field sctp_dst lacks correct prerequisities
3849 ovs-ofctl: actions are invalid with specified match (OFPBAC_MATCH_INCONSISTENT)
3852 AT_CHECK([ovs-ofctl add-flow br0 "tcp,ip_frag=later actions=learn(table=1,hard_timeout=60,eth_type=0x800,nw_proto=6,NXM_OF_IP_SRC[[]]=NXM_OF_IP_DST[[]],NXM_OF_TCP_SRC[[]]=NXM_OF_TCP_DST[[]],output:NXM_NX_REG0[[0..15]]),output:1"], [1], [], [stderr])
3853 AT_CHECK([tail -2 stderr | sed 's/^.*|WARN|//'], [0], [dnl
3854 source field tcp_dst lacks correct prerequisites
3855 ovs-ofctl: actions are invalid with specified match (OFPBAC_MATCH_INCONSISTENT)
3858 AT_DATA([flows.txt], [dnl
3859 priority=75 tcp actions=load:42->OXM_OF_TCP_SRC[[0..7]],output:1
3861 AT_CHECK([ovs-ofctl -O OpenFlow12 replace-flows br0 flows.txt])
3863 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
3867 AT_CHECK([ovs-ofctl set-frags br0 $mode])
3868 for frag in 4000 6000 6008 4010; do
3869 printf "\n%s\n" "----$mode $frag-----"
3871 AT_CHECK([ovs-appctl netdev-dummy/receive p90 "0021853763af 0026b98cb0f9 0800 4500 003c 2e24 $frag 40 06 465d ac11370d ac11370b 828b 0016 751e267b 00000000 a002 16d0 1736 0000 02 04 05 b4 04 02 08 0a 2d 25 08 5f 00 00 00 00 01 03 03 07"])
3874 AT_CHECK([ovs-appctl dpctl/dump-flows | sed 's/used:[[0-9]].[[0-9]]*s/used:0.001s/'], [0], [dnl
3875 flow-dump from non-dpdk interfaces:
3876 recirc_id(0),in_port(90),eth_type(0x0800),ipv4(proto=6,frag=no),tcp(src=33419), packets:0, bytes:0, used:never, actions:set(tcp(src=33322)),1
3877 recirc_id(0),in_port(90),eth_type(0x0800),ipv4(proto=6,frag=first),tcp(src=33419), packets:0, bytes:0, used:never, actions:set(tcp(src=33322)),1
3878 recirc_id(0),in_port(90),eth_type(0x0800),ipv4(proto=6,frag=later), packets:1, bytes:74, used:0.001s, actions:1
3881 AT_CHECK([ovs-appctl revalidator/purge], [0])
3882 AT_CHECK([ovs-ofctl set-frags br0 $mode])
3883 for frag in 4000 6000 6008 4010; do
3884 printf "\n%s\n" "----$mode $frag truncated transport header -----"
3886 AT_CHECK([ovs-appctl netdev-dummy/receive p90 "0021853763af 0026b98cb0f9 0800 4500 0018 2e24 $frag 40 06 465d ac11370d ac11370b 828b 0016"])
3889 AT_CHECK([ovs-appctl dpctl/dump-flows | sed 's/used:[[0-9]].[[0-9]]*s/used:0.001s/'], [0], [dnl
3890 flow-dump from non-dpdk interfaces:
3891 recirc_id(0),in_port(90),eth_type(0x0800),ipv4(proto=6,frag=no),tcp(src=0), packets:0, bytes:0, used:never, actions:set(tcp(src=42)),1
3892 recirc_id(0),in_port(90),eth_type(0x0800),ipv4(proto=6,frag=first),tcp(src=0), packets:0, bytes:0, used:never, actions:set(tcp(src=42)),1
3893 recirc_id(0),in_port(90),eth_type(0x0800),ipv4(proto=6,frag=later), packets:1, bytes:60, used:0.001s, actions:1
3896 AT_CHECK([ovs-appctl revalidator/purge], [0])
3897 AT_CHECK([ovs-ofctl set-frags br0 $mode])
3898 for frag in 4000 6000 6001 4002; do
3899 printf "\n%s\n" "----$mode $frag missing transport header-----"
3901 AT_CHECK([ovs-appctl netdev-dummy/receive p90 "0021853763af 0026b98cb0f9 0800 4500 0014 2e24 $frag 40 06 465d ac11370d ac11370b"])
3904 AT_CHECK([ovs-appctl dpctl/dump-flows | sed 's/used:[[0-9]].[[0-9]]*s/used:0.001s/'], [0], [dnl
3905 flow-dump from non-dpdk interfaces:
3906 recirc_id(0),in_port(90),eth_type(0x0800),ipv4(proto=6,frag=no),tcp(src=0), packets:0, bytes:0, used:never, actions:set(tcp(src=42)),1
3907 recirc_id(0),in_port(90),eth_type(0x0800),ipv4(proto=6,frag=first),tcp(src=0), packets:0, bytes:0, used:never, actions:set(tcp(src=42)),1
3908 recirc_id(0),in_port(90),eth_type(0x0800),ipv4(proto=6,frag=later), packets:1, bytes:60, used:0.001s, actions:1
3914 AT_SETUP([ofproto-dpif - exit])
3916 ADD_OF_PORTS([br0], [1], [2], [3], [10], [11], [12], [13], [14])
3917 AT_DATA([flows.txt], [dnl
3918 in_port=1 actions=output:10,exit,output:11
3919 in_port=2 actions=output:12,resubmit:1,output:12
3920 in_port=3 actions=output:13,resubmit:2,output:14
3922 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
3923 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)'], [0], [stdout])
3924 AT_CHECK([tail -1 stdout], [0],
3925 [Datapath actions: 10
3927 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(2),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)'], [0], [stdout])
3928 AT_CHECK([tail -1 stdout], [0],
3929 [Datapath actions: 12,10
3931 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(3),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)'], [0], [stdout])
3932 AT_CHECK([tail -1 stdout], [0],
3933 [Datapath actions: 13,12,10
3939 AT_SETUP([ofproto-dpif - mirroring, select_all])
3941 ADD_OF_PORTS([br0], 1, 2, 3)
3943 set Bridge br0 mirrors=@m --\
3944 --id=@p3 get Port p3 --\
3945 --id=@m create Mirror name=mymirror select_all=true output_port=@p3
3947 AT_DATA([flows.txt], [dnl
3948 in_port=1 actions=output:2
3949 in_port=2 actions=output:1
3951 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
3953 flow="in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)"
3954 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
3955 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
3956 [Datapath actions: 3,2
3959 flow="in_port(2),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)"
3960 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
3961 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
3962 [Datapath actions: 3,1
3969 AT_SETUP([ofproto-dpif - mirroring, select_src])
3971 ADD_OF_PORTS([br0], 1, 2, 3)
3973 set Bridge br0 mirrors=@m --\
3974 --id=@p1 get Port p1 -- --id=@p3 get Port p3 --\
3975 --id=@m create Mirror name=mymirror select_src_port=@p1 output_port=@p3
3977 AT_DATA([flows.txt], [dnl
3978 in_port=1 actions=output:2
3979 in_port=2 actions=output:1
3981 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
3983 flow="in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)"
3984 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
3985 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
3986 [Datapath actions: 3,2
3989 flow="in_port(2),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)"
3990 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
3991 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
3992 [Datapath actions: 1
3997 AT_SETUP([ofproto-dpif - mirroring, OFPP_NONE ingress port])
3999 ADD_OF_PORTS([br0], 1, 2)
4001 set Bridge br0 mirrors=@m --\
4002 --id=@p2 get Port p2 --\
4003 --id=@m create Mirror name=mymirror select_all=true output_port=@p2
4005 AT_CHECK([ovs-ofctl add-flow br0 action=output:1])
4007 # "in_port" defaults to OFPP_NONE if it's not specified.
4008 flow="icmp,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_ttl=128,icmp_type=8,icmp_code=0"
4009 AT_CHECK([ovs-appctl ofproto/trace br0 "$flow"], [0], [stdout])
4010 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
4011 [Datapath actions: 1,2
4018 AT_SETUP([ofproto-dpif - mirroring, select_dst])
4020 ADD_OF_PORTS([br0], 1, 2, 3)
4022 set Bridge br0 mirrors=@m --\
4023 --id=@p2 get Port p2 -- --id=@p3 get Port p3 --\
4024 --id=@m create Mirror name=mymirror select_dst_port=@p2 output_port=@p3
4026 AT_DATA([flows.txt], [dnl
4027 in_port=1 actions=output:2
4028 in_port=2 actions=output:1
4030 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
4032 flow="in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)"
4033 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
4034 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
4035 [Datapath actions: 2,3
4038 flow="in_port(2),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)"
4039 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
4040 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
4041 [Datapath actions: 1
4048 AT_SETUP([ofproto-dpif - mirroring, select_vlan])
4050 ADD_OF_PORTS([br0], 1, 2, 3)
4052 set Bridge br0 mirrors=@m --\
4053 --id=@p2 get Port p2 -- --id=@p3 get Port p3 --\
4054 --id=@m create Mirror name=mymirror select_all=true select_vlan=11 output_port=@p3
4056 AT_DATA([flows.txt], [dnl
4057 in_port=1, actions=output:2
4059 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
4061 flow="in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)"
4062 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
4063 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
4064 [Datapath actions: 2
4067 flow="in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x8100),vlan(vid=10,pcp=0),encap(eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0))"
4068 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
4069 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
4070 [Datapath actions: 2
4073 flow="in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x8100),vlan(vid=11,pcp=0),encap(eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0))"
4074 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
4075 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
4076 [Datapath actions: 3,2
4083 AT_SETUP([ofproto-dpif - mirroring, output_port])
4085 ADD_OF_PORTS([br0], 1, 2, 3)
4087 set Bridge br0 mirrors=@m --\
4088 --id=@p3 get Port p3 --\
4089 --id=@m create Mirror name=mymirror select_all=true output_port=@p3
4091 AT_DATA([flows.txt], [dnl
4092 in_port=1 actions=mod_vlan_vid:17,output:2
4093 in_port=2 actions=output:1
4095 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
4097 flow="in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)"
4098 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
4099 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
4100 [Datapath actions: 3,push_vlan(vid=17,pcp=0),2
4103 flow="in_port(2),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)"
4104 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
4105 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
4106 [Datapath actions: 3,1
4112 AT_SETUP([ofproto-dpif - mirroring, output_vlan])
4114 ADD_OF_PORTS([br0], 1, 2)
4116 set Bridge br0 mirrors=@m --\
4117 --id=@m create Mirror name=mymirror select_all=true output_vlan=12
4119 AT_DATA([flows.txt], [dnl
4120 in_port=1 actions=output:2
4121 in_port=2 actions=mod_vlan_vid:17,output:1
4123 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
4125 flow="in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)"
4126 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
4127 actual=`tail -1 stdout | sed 's/Datapath actions: //'`
4129 expected="2,push_vlan(vid=12,pcp=0),1,2,100"
4130 AT_CHECK([ovs-dpctl normalize-actions "$flow" "$expected"], [0], [stdout])
4132 AT_CHECK([ovs-dpctl normalize-actions "$flow" "$actual"], [0], [expout])
4134 flow="in_port(2),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)"
4135 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
4136 actual=`tail -1 stdout | sed 's/Datapath actions: //'`
4138 expected="push_vlan(vid=17,pcp=0),1,pop_vlan,push_vlan(vid=12,pcp=0),1,2,100"
4139 AT_CHECK([ovs-dpctl normalize-actions "$flow" "$expected"], [0], [stdout])
4141 AT_CHECK([ovs-dpctl normalize-actions "$flow" "$actual"], [0], [expout])
4146 # This test verifies that mirror state is preserved across recirculation.
4148 # Otherwise, post-recirculation the ingress and the output to port 4
4149 # would cause the packet to be mirrored to port 3 a second time.
4150 AT_SETUP([ofproto-dpif - mirroring with recirculation])
4152 ADD_OF_PORTS([br0], 1, 2, 3, 4)
4154 set Bridge br0 mirrors=@m --\
4155 --id=@p3 get Port p3 --\
4156 --id=@m create Mirror name=mymirror select_all=true output_port=@p3
4158 AT_DATA([flows.txt], [dnl
4159 in_port=1 actions=2,debug_recirc,4
4161 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
4163 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)"
4164 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow" -generate], [0], [stdout])
4165 AT_CHECK_UNQUOTED([tail -1 stdout], [0], [Datapath actions: 3,2,recirc(0x1)
4167 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow,recirc_id(1)" -generate], [0], [stdout])
4168 AT_CHECK_UNQUOTED([tail -1 stdout], [0], [Datapath actions: 4
4174 # Two testcases below are for the ofproto/trace command
4175 # The first one tests all correct syntax:
4176 # ofproto/trace [dp_name] odp_flow [-generate|packet]
4177 # ofproto/trace br_name br_flow [-generate|packet]
4178 AT_SETUP([ofproto-dpif - ofproto/trace command 1])
4179 OVS_VSWITCHD_START([set bridge br0 fail-mode=standalone])
4180 ADD_OF_PORTS([br0], 1, 2, 3)
4182 AT_DATA([flows.txt], [dnl
4183 in_port=1 actions=output:2
4184 in_port=2 actions=output:1
4186 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
4188 odp_flow="in_port(p1)"
4190 # Test command: ofproto/trace odp_flow with in_port as a name.
4191 AT_CHECK([ovs-appctl ofproto/trace "$odp_flow"], [0], [stdout])
4192 AT_CHECK([tail -1 stdout], [0], [dnl
4196 odp_flow="in_port(1)"
4197 # Test command: ofproto/trace odp_flow
4198 AT_CHECK([ovs-appctl ofproto/trace "$odp_flow"], [0], [stdout])
4199 AT_CHECK([tail -1 stdout], [0], [dnl
4203 # Test command: ofproto/trace dp_name odp_flow
4204 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$odp_flow"], [0], [stdout])
4205 AT_CHECK([tail -1 stdout], [0], [dnl
4208 # Test commmand: ofproto/trace br_name br_flow
4209 AT_CHECK([ovs-appctl ofproto/trace br0 "$br_flow"], [0], [stdout])
4210 AT_CHECK([tail -1 stdout], [0], [dnl
4214 # Delete the inserted flows
4215 AT_CHECK([ovs-ofctl del-flows br0 "in_port=1"], [0], [stdout])
4216 AT_CHECK([ovs-ofctl del-flows br0 "in_port=2"], [0], [stdout])
4218 # This section below tests the [-generate] option
4219 odp_flow="in_port(3),eth(src=50:54:00:00:00:05,dst=ff:ff:ff:ff:ff:ff)"
4220 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"
4222 # Test command: ofproto/trace odp_flow
4223 AT_CHECK([ovs-appctl ofproto/trace "$odp_flow"], [0], [stdout])
4224 # Check for no MAC learning entry
4225 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
4229 # Test command: ofproto/trace br_name br_flow
4230 AT_CHECK([ovs-appctl ofproto/trace br0 "$br_flow"], [0], [stdout])
4231 # Check for no MAC learning entry
4232 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
4236 # Test command: ofproto/trace odp_flow -generate
4237 AT_CHECK([ovs-appctl ofproto/trace "$odp_flow" -generate], [0], [stdout])
4238 # Check for the MAC learning entry
4239 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
4241 3 0 50:54:00:00:00:05 ?
4244 # Test command: ofproto/trace dp_name odp_flow -generate
4245 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy \
4246 "in_port(1),eth(src=50:54:00:00:00:06,dst=50:54:00:00:00:05)" \
4247 -generate], [0], [stdout])
4248 # Check for both MAC learning entries
4249 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
4251 3 0 50:54:00:00:00:05 ?
4252 1 0 50:54:00:00:00:06 ?
4255 # Test command: ofproto/trace br_name br_flow -generate
4256 AT_CHECK([ovs-appctl ofproto/trace br0 \
4257 "in_port=2,dl_src=50:54:00:00:00:07,dl_dst=50:54:00:00:00:06" \
4258 -generate], [0], [stdout])
4259 # Check for both MAC learning entries.
4260 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
4262 3 0 50:54:00:00:00:05 ?
4263 1 0 50:54:00:00:00:06 ?
4264 2 0 50:54:00:00:00:07 ?
4267 # This section beflow tests the [packet] option
4268 # The ovs-tcpundump of packets between port1 and port2
4269 pkt1to2="50540000000250540000000108064500001C000100004001F98CC0A80001C0A800020800F7FF00000000"
4270 pkt2to1="50540000000150540000000208064500001C000100004001F98CC0A80002C0A800010800F7FF00000000"
4272 # Construct the MAC learning table
4273 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy \
4274 "in_port(1),eth(src=50:54:00:00:00:01,dst=ff:ff:ff:ff:ff:ff)" \
4275 -generate], [0], [stdout])
4277 # Construct the MAC learning table
4278 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy \
4279 "in_port(2),eth(src=50:54:00:00:00:02,dst=ff:ff:ff:ff:ff:ff)" \
4280 -generate], [0], [stdout])
4282 # Test command: ofproto/trace odp_flow packet
4283 AT_CHECK([ovs-appctl ofproto/trace \
4284 "in_port(1),skb_priority(1),skb_mark(2)" "$pkt1to2"], [0], [stdout])
4285 AT_CHECK([tail -1 stdout], [0], [dnl
4288 AT_CHECK([head -n 2 stdout], [0], [dnl
4290 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
4293 # Test command: ofproto/trace dp_name odp_flow packet
4294 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy \
4295 "in_port(1),skb_priority(1),skb_mark(2)" "$pkt1to2"], [0], [stdout])
4296 AT_CHECK([tail -1 stdout], [0], [dnl
4299 AT_CHECK([head -n 2 stdout], [0], [dnl
4301 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
4304 # Test command: ofproto/trace br_name br_flow packet
4305 AT_CHECK([ovs-appctl ofproto/trace br0 \
4306 "in_port=2,skb_priority=2,pkt_mark=1" "$pkt2to1"], [0], [stdout],[stderr])
4307 AT_CHECK([tail -1 stdout], [0], [dnl
4310 AT_CHECK([head -n 2 stdout], [0], [dnl
4312 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
4318 # The second test tests the corner cases
4319 AT_SETUP([ofproto-dpif - ofproto/trace command 2])
4321 ADD_OF_PORTS([br0], 1, 2)
4324 odp_flow="in_port(1),eth(src=50:54:00:00:00:01,dst=50:54:00:00:00:02)"
4325 br_flow="in_port=1,dl_src=50:54:00:00:00:01,dl_dst=50:54:00:00:00:02"
4327 generate="-generate"
4328 pkt="50540000000250540000000108064500001C000100004001F98CC0A80001C0A800020800F7FF00000000"
4330 # Test incorrect command: ofproto/trace wrong_name odp_flow [-generate|packet]
4336 [AT_CHECK([ovs-appctl ofproto/trace wrong_name "$odp_flow" option],
4338 AT_CHECK([tail -2 stderr], [0], [dnl
4339 Cannot find the datapath
4340 ovs-appctl: ovs-vswitchd: server returned an error
4343 # Test incorrect command: ofproto/trace empty_string odp_flow [-generate|packet]
4349 [AT_CHECK([ovs-appctl ofproto/trace "" "$odp_flow" option],
4351 AT_CHECK([tail -2 stderr], [0], [dnl
4352 Cannot find the datapath
4353 ovs-appctl: ovs-vswitchd: server returned an error
4356 # Test incorrect command: ofproto/trace nonexist_dp_name odp_flow [-generate|packet]
4362 [AT_CHECK([ovs-appctl ofproto/trace ovs-system "$odp_flow" option],
4364 AT_CHECK([tail -2 stderr], [0], [dnl
4365 Cannot find the datapath
4366 ovs-appctl: ovs-vswitchd: server returned an error
4369 # Test incorrect command: ofproto/trace br_name odp_flow [-generate|packet]
4375 [AT_CHECK([ovs-appctl ofproto/trace br0 "$odp_flow" option],
4377 AT_CHECK([tail -2 stderr], [0], [dnl
4378 Cannot find the datapath
4379 ovs-appctl: ovs-vswitchd: server returned an error
4382 # Test incorrect command: ofproto/trace dp_name br_flow [-generate|packet]
4388 [AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$br_flow" option],
4390 AT_CHECK([tail -2 stderr], [0], [dnl
4392 ovs-appctl: ovs-vswitchd: server returned an error
4395 # Test incorrect command: ofproto/trace br_flow [-generate|packet]
4401 [AT_CHECK([ovs-appctl ofproto/trace "$br_flow" option],
4403 AT_CHECK([tail -2 stderr], [0], [dnl
4404 Must specify bridge name
4405 ovs-appctl: ovs-vswitchd: server returned an error
4408 # Test incorrect command: ofproto/trace dp_name odp_flow garbage_option
4409 AT_CHECK([ovs-appctl ofproto/trace \
4410 ovs-dummy "$odp_flow" garbage_option],
4411 [2], [stdout],[stderr])
4412 AT_CHECK([tail -2 stderr], [0], [dnl
4413 Trailing garbage in packet data
4414 ovs-appctl: ovs-vswitchd: server returned an error
4417 # Test incorrect command: ofproto/trace with 4 arguments
4418 AT_CHECK([ovs-appctl ofproto/trace \
4419 arg1, arg2, arg3, arg4], [2], [stdout],[stderr])
4420 AT_CHECK([tail -2 stderr], [0], [dnl
4421 "ofproto/trace" command takes at most 3 arguments
4422 ovs-appctl: ovs-vswitchd: server returned an error
4425 # Test incorrect command: ofproto/trace with 0 argument
4426 AT_CHECK([ovs-appctl ofproto/trace ], [2], [stdout],[stderr])
4427 AT_CHECK([tail -2 stderr], [0], [dnl
4428 "ofproto/trace" command requires at least 1 arguments
4429 ovs-appctl: ovs-vswitchd: server returned an error
4435 # The third test checks that the output of "ovs-dpctl -m" is valid to trace.
4436 AT_SETUP([ofproto-dpif - ofproto/trace from dpctl output])
4437 OVS_VSWITCHD_START([dnl
4438 set Open_vSwitch . other_config:max-idle=10000 \
4439 -- add-port br0 p1 -- set Interface p1 type=dummy])
4441 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)'])
4442 ovs-appctl revalidator/wait
4443 AT_CHECK([ovs-appctl dpif/dump-flows -m br0 | sed 's/, packets.*$//' > dp_flows1.txt])
4445 odp_flow=`cat dp_flows1.txt`
4446 AT_CHECK([ovs-appctl ofproto/trace "$odp_flow" | sed 's/\([[Ff]]low:\).*/\1 <cleared>/'], [0], [dnl
4449 No match, packets dropped because OFPPC_NO_PACKET_IN is set on in_port.
4451 Rule: table=254 cookie=0 priority=0,reg0=0x2
4452 OpenFlow actions=drop
4454 Final flow: <cleared>
4456 Datapath actions: drop
4459 dnl Now, try again without megaflows:
4460 ovs-appctl upcall/disable-megaflows
4462 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)'])
4463 ovs-appctl revalidator/wait
4464 AT_CHECK([ovs-appctl dpif/dump-flows -m br0 | sed 's/, packets.*$//' > dp_flows2.txt])
4466 odp_flow=`cat dp_flows2.txt`
4467 AT_CHECK([ovs-appctl ofproto/trace "$odp_flow" | sed 's/\([[Ff]]low:\).*/\1 <cleared>/'], [0], [dnl
4470 No match, packets dropped because OFPPC_NO_PACKET_IN is set on in_port.
4472 Rule: table=254 cookie=0 priority=0,reg0=0x2
4473 OpenFlow actions=drop
4475 Final flow: <cleared>
4477 Datapath actions: drop
4483 AT_SETUP([ofproto-dpif - ofproto/trace-packet-out])
4485 ADD_OF_PORTS([br0], 1, 2, 3)
4487 AT_DATA([flows.txt], [dnl
4488 in_port=1 actions=output:2
4489 in_port=2 actions=output:1
4491 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
4493 AT_CHECK([ovs-appctl ofproto/trace-packet-out br0 in_port=1 'mod_vlan_vid:123,resubmit(,0)'], [0], [stdout])
4494 AT_CHECK([tail -1 stdout], [0], [dnl
4495 Datapath actions: push_vlan(vid=123,pcp=0),2
4502 m4_define([OFPROTO_TRACE],
4504 AT_CHECK([ovs-appctl ofproto/trace $1 "$flow" $3], [0], [stdout])
4505 actual=`tail -1 stdout | sed 's/Datapath actions: //'`
4507 AT_CHECK([ovs-dpctl normalize-actions "$flow" "$expected" $5],
4510 AT_CHECK([ovs-dpctl normalize-actions "$flow" "$actual" $5],
4513 AT_SETUP([ofproto-dpif - MAC learning])
4514 OVS_VSWITCHD_START([set bridge br0 fail-mode=standalone])
4515 ADD_OF_PORTS([br0], 1, 2, 3)
4517 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)'
4519 # Trace an ARP packet arriving on p3, to create a MAC learning entry.
4522 [in_port(3),eth(src=50:54:00:00:00:05,dst=ff:ff:ff:ff:ff:ff),$arp],
4526 # Check for the MAC learning entry.
4527 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
4529 3 0 50:54:00:00:00:05 ?
4532 # Trace a packet arrival destined for the learned MAC.
4533 # (This will also learn a MAC.)
4536 [in_port(1),eth(src=50:54:00:00:00:06,dst=50:54:00:00:00:05),$arp],
4540 # Check for both MAC learning entries.
4541 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
4543 3 0 50:54:00:00:00:05 ?
4544 1 0 50:54:00:00:00:06 ?
4547 # Trace a packet arrival that updates the first learned MAC entry.
4550 [in_port(2),eth(src=50:54:00:00:00:05,dst=ff:ff:ff:ff:ff:ff),$arp],
4554 # Check that the MAC learning entry was updated.
4555 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
4557 1 0 50:54:00:00:00:06 ?
4558 2 0 50:54:00:00:00:05 ?
4561 # Add another bridge.
4565 -- set bridge br1 datapath-type=dummy])
4566 ADD_OF_PORTS([br1], 4, 5)
4568 # Trace some packet arrivals in br1 to create MAC learning entries there too.
4571 [in_port(4),eth(src=50:54:00:00:00:06,dst=ff:ff:ff:ff:ff:ff),$arp],
4576 [in_port(5),eth(src=50:54:00:00:00:07,dst=ff:ff:ff:ff:ff:ff),$arp],
4580 # Check that the MAC learning entries were added.
4581 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br1 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
4583 4 0 50:54:00:00:00:06 ?
4584 5 0 50:54:00:00:00:07 ?
4587 # Delete port p1 and see that its MAC learning entry disappeared, and
4588 # that the MAC learning entry for the same MAC was also deleted from br1.
4589 AT_CHECK([ovs-vsctl del-port p1])
4590 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
4592 2 0 50:54:00:00:00:05 ?
4594 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br1 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
4596 5 0 50:54:00:00:00:07 ?
4602 AT_SETUP([ofproto-dpif - MAC table overflow])
4604 [set bridge br0 fail-mode=standalone other-config:mac-table-size=10])
4605 ADD_OF_PORTS([br0], 1, 2, 3)
4607 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)'
4609 AT_CHECK([ovs-appctl time/stop])
4611 # Trace 10 ARP packets arriving on p3, to create MAC learning entries.
4612 for i in 0 1 2 3 4 5 6 7 8 9; do
4615 [in_port(3),eth(src=50:54:00:00:00:0$i,dst=ff:ff:ff:ff:ff:ff),$arp],
4618 ovs-appctl time/warp 1000
4621 # Check for the MAC learning entries.
4622 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/ *[[0-9]]\{1,\}$//' | sort],
4624 3 0 50:54:00:00:00:00
4625 3 0 50:54:00:00:00:01
4626 3 0 50:54:00:00:00:02
4627 3 0 50:54:00:00:00:03
4628 3 0 50:54:00:00:00:04
4629 3 0 50:54:00:00:00:05
4630 3 0 50:54:00:00:00:06
4631 3 0 50:54:00:00:00:07
4632 3 0 50:54:00:00:00:08
4633 3 0 50:54:00:00:00:09
4637 # Trace another ARP packet on another MAC.
4640 [in_port(3),eth(src=50:54:00:00:00:10,dst=ff:ff:ff:ff:ff:ff),$arp],
4644 # Check that the new one chased the oldest one out of the table.
4645 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/' | sort],
4647 3 0 50:54:00:00:00:01 ?
4648 3 0 50:54:00:00:00:02 ?
4649 3 0 50:54:00:00:00:03 ?
4650 3 0 50:54:00:00:00:04 ?
4651 3 0 50:54:00:00:00:05 ?
4652 3 0 50:54:00:00:00:06 ?
4653 3 0 50:54:00:00:00:07 ?
4654 3 0 50:54:00:00:00:08 ?
4655 3 0 50:54:00:00:00:09 ?
4656 3 0 50:54:00:00:00:10 ?
4662 AT_SETUP([ofproto-dpif - MAC table overflow fairness])
4664 [set bridge br0 fail-mode=standalone other-config:mac-table-size=10])
4665 ADD_OF_PORTS([br0], 1, 2, 3, 4, 5, 6)
4667 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)'
4669 AT_CHECK([ovs-appctl time/stop])
4671 # Trace packets with 2 different source MACs arriving on each of the 5
4672 # ports, filling up the 10-entry learning table.
4673 for i in 0 1 2 3 4 5 6 7 8 9; do
4675 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
4676 ovs-appctl time/warp 1000
4679 # Check for the MAC learning entries.
4680 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/ *[[0-9]]\{1,\}$//' | sort],
4682 1 0 50:54:00:00:00:00
4683 1 0 50:54:00:00:00:01
4684 2 0 50:54:00:00:00:02
4685 2 0 50:54:00:00:00:03
4686 3 0 50:54:00:00:00:04
4687 3 0 50:54:00:00:00:05
4688 4 0 50:54:00:00:00:06
4689 4 0 50:54:00:00:00:07
4690 5 0 50:54:00:00:00:08
4691 5 0 50:54:00:00:00:09
4695 # Now trace 16 new MACs on another port.
4696 for i in 0 1 2 3 4 5 6 7 8 9 a b c d e f; do
4697 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
4698 ovs-appctl time/warp 1000
4701 # Check the results.
4703 # Our eviction algorithm on overflow is that an arbitrary (but deterministic)
4704 # one of the ports with the most learned MACs loses the least recently used
4705 # one. Thus, the new port will end up with 3 MACs, 3 of the old ports with 1
4706 # MAC each, and the other 2 of the old ports with 2 MACs each.
4708 # (If someone changes lib/heap.c to do something different with equal-priority
4709 # nodes, then the output below could change, but it would still follow the
4710 # rules explained above.)
4711 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/ *[[0-9]]\{1,\}$//' | sort],
4713 1 0 50:54:00:00:00:01
4714 2 0 50:54:00:00:00:03
4715 3 0 50:54:00:00:00:04
4716 3 0 50:54:00:00:00:05
4717 4 0 50:54:00:00:00:07
4718 5 0 50:54:00:00:00:08
4719 5 0 50:54:00:00:00:09
4720 6 0 50:54:00:00:0d:ff
4721 6 0 50:54:00:00:0e:ff
4722 6 0 50:54:00:00:0f:ff
4728 # CHECK_SFLOW_SAMPLING_PACKET(LOOPBACK_ADDR)
4730 # Test that sFlow samples packets correctly using IPv4/IPv6 sFlow collector
4731 m4_define([CHECK_SFLOW_SAMPLING_PACKET],
4732 [AT_XFAIL_IF([test "$IS_WIN32" = "yes"])
4733 OVS_VSWITCHD_START([set Bridge br0 fail-mode=standalone])
4735 on_exit 'kill `cat test-sflow.pid`'
4736 AT_CHECK([ovstest test-sflow --log-file --detach --no-chdir --pidfile 0:$1 > sflow.log], [0], [], [ignore])
4737 AT_CAPTURE_FILE([sflow.log])
4738 SFLOW_PORT=`parse_listening_port < test-sflow.log`
4739 ovs-appctl time/stop
4741 ADD_OF_PORTS([br0], 1, 2)
4743 set Interface br0 options:ifindex=1002 -- \
4744 set Interface p1 options:ifindex=1004 -- \
4745 set Interface p2 options:ifindex=1003 -- \
4746 set Bridge br0 sflow=@sf -- \
4747 --id=@sf create sflow targets=\"$1:$SFLOW_PORT\" \
4748 header=128 sampling=1 polling=1 agent=$LOOPBACK_INTERFACE
4750 dnl open with ARP packets to seed the bridge-learning. The output
4751 dnl ifIndex numbers should be reported predictably after that.
4752 dnl Since we set sampling=1 we should see all of these packets
4753 dnl reported. Sorting the output by data-source and seqNo makes
4754 dnl it deterministic. Ensuring that we send at least two packets
4755 dnl into each port means we get to check the seq nos are
4756 dnl incrementing correctly.
4757 dnl because packets from different ports can be handled by separate
4758 dnl threads, put some sleeps
4760 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)'
4762 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)'
4764 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)'
4766 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)'
4767 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)'
4769 dnl sleep long enough to get more than one counter sample
4770 dnl from each datasource so we can check sequence numbers
4771 ovs-appctl time/warp 3000 100
4773 ovs-appctl -t test-sflow exit
4775 AT_CHECK_UNQUOTED([[sort sflow.log | $EGREP 'HEADER|ERROR' | sed 's/ /\
4796 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
4816 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
4836 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
4856 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
4876 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
4879 AT_CHECK_UNQUOTED([[sort sflow.log | $EGREP 'IFCOUNTERS|ERROR|PORTNAME|OPENFLOWPORT' | head -18 | sed 's/ /\
4893 in_broadcasts=4294967295
4896 in_unknownprotos=4294967295
4899 out_multicasts=4294967295
4900 out_broadcasts=4294967295
4916 in_broadcasts=4294967295
4919 in_unknownprotos=4294967295
4922 out_multicasts=4294967295
4923 out_broadcasts=4294967295
4939 in_broadcasts=4294967295
4942 in_unknownprotos=4294967295
4945 out_multicasts=4294967295
4946 out_broadcasts=4294967295
4962 in_broadcasts=4294967295
4965 in_unknownprotos=4294967295
4968 out_multicasts=4294967295
4969 out_broadcasts=4294967295
4985 in_broadcasts=4294967295
4988 in_unknownprotos=4294967295
4991 out_multicasts=4294967295
4992 out_broadcasts=4294967295
5008 in_broadcasts=4294967295
5011 in_unknownprotos=4294967295
5014 out_multicasts=4294967295
5015 out_broadcasts=4294967295
5020 datapath_id=18364758544493064720
5023 datapath_id=18364758544493064720
5026 datapath_id=18364758544493064720
5029 datapath_id=18364758544493064720
5032 datapath_id=18364758544493064720
5035 datapath_id=18364758544493064720
5051 AT_SETUP([ofproto-dpif - sFlow packet sampling - IPv4 collector])
5052 CHECK_SFLOW_SAMPLING_PACKET([127.0.0.1])
5055 AT_SETUP([ofproto-dpif - sFlow packet sampling - IPv6 collector])
5056 AT_SKIP_IF([test $HAVE_IPV6 = no])
5057 CHECK_SFLOW_SAMPLING_PACKET([[[::1]]])
5060 dnl Test sFlow LAG structures
5061 AT_SETUP([ofproto-dpif - sFlow packet sampling - LACP structures])
5062 AT_SKIP_IF([test "$IS_WIN32" = "yes"])
5063 OVS_VSWITCHD_START([dnl
5064 add-bond br0 bond p1 p2 -- \
5065 set Port bond lacp=active bond-mode=active-backup \
5066 other_config:lacp-time="fast" \
5067 other_config:lacp-system-id=11:22:33:44:55:66 \
5068 other_config:lacp-system-priority=54321 -- \
5069 set Interface p1 type=dummy \
5070 other_config:lacp-port-id=11 \
5071 other_config:lacp-port-priority=111 \
5072 other_config:lacp-aggregation-key=3333 -- \
5073 set Interface p2 type=dummy \
5074 other_config:lacp-port-id=22 \
5075 other_config:lacp-port-priority=222 \
5076 other_config:lacp-aggregation-key=3333 ])
5078 on_exit 'kill `cat test-sflow.pid`'
5079 AT_CHECK([ovstest test-sflow --log-file --detach --no-chdir --pidfile 0:127.0.0.1 > sflow.log], [0], [], [ignore])
5080 AT_CAPTURE_FILE([sflow.log])
5081 SFLOW_PORT=`parse_listening_port < test-sflow.log`
5083 ovs-appctl time/stop
5086 set Interface p1 options:ifindex=1003 -- \
5087 set Bridge br0 sflow=@sf -- \
5088 --id=@sf create sflow targets=\"127.0.0.1:$SFLOW_PORT\" \
5089 header=128 sampling=1 polling=1
5091 dnl sleep long enough to get the sFlow datagram flushed out (may be delayed for up to 1 second)
5092 AT_CHECK([ovs-appctl time/warp 2000 100], [0], [ignore])
5093 AT_CHECK([ovs-appctl revalidator/purge], [0])
5095 ovs-appctl -t test-sflow exit
5096 AT_CHECK([[sort sflow.log | $EGREP 'LACPCOUNTERS|ERROR' | head -n 1 | sed 's/ /\
5099 sysID=11:22:33:44:55:66
5100 partnerID=00:00:00:00:00:00
5107 markerPDUsRx=4294967295
5108 markerRespPDUsRx=4294967295
5109 unknownRx=4294967295
5112 markerPDUsTx=4294967295
5113 markerRespPDUsTx=4294967295
5118 AT_SETUP([ofproto-dpif - sFlow packet sampling - tunnel set])
5119 AT_XFAIL_IF([test "$IS_WIN32" = "yes"])
5120 OVS_VSWITCHD_START([set Bridge br0 fail-mode=standalone])
5122 dnl set up sFlow logging
5123 AT_CHECK([ovstest test-sflow --log-file --detach --no-chdir --pidfile 0:127.0.0.1 > sflow.log], [0], [], [ignore])
5124 AT_CAPTURE_FILE([sflow.log])
5125 SFLOW_PORT=`parse_listening_port < test-sflow.log`
5126 ovs-appctl time/stop
5128 OVS_VSWITCHD_DISABLE_TUNNEL_PUSH_POP
5129 AT_CHECK([ovs-vsctl add-port br0 gre0 -- set Interface gre0 type=gre \
5130 options:remote_ip=1.1.1.1 options:key=456 ofport_request=3])
5131 AT_CHECK([ovs-vsctl add-port br0 p1 -- set Interface p1 type=dummy ofport_request=4])
5133 AT_CHECK([ovs-ofctl add-flow br0 action=3])
5137 set Bridge br0 sflow=@sf -- \
5138 --id=@sf create sflow targets=\"127.0.0.1:$SFLOW_PORT\" \
5139 header=128 sampling=1 polling=0
5141 dnl introduce a packet that will be flooded to the tunnel
5142 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)'])
5144 dnl sleep long enough to get the sFlow datagram flushed out (may be delayed for up to 1 second)
5145 for i in `seq 1 30`; do
5146 ovs-appctl time/warp 100
5149 ovs-appctl -t test-sflow exit
5151 AT_CHECK_UNQUOTED([[sort sflow.log | $EGREP 'HEADER|ERROR' | sed 's/ /\
5157 tunnel4_out_length=0
5158 tunnel4_out_protocol=47
5159 tunnel4_out_src=0.0.0.0
5160 tunnel4_out_dst=1.1.1.1
5161 tunnel4_out_src_port=0
5162 tunnel4_out_dst_port=0
5163 tunnel4_out_tcp_flags=0
5181 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
5187 AT_SETUP([ofproto-dpif - sFlow packet sampling - tunnel push])
5188 AT_XFAIL_IF([test "$IS_WIN32" = "yes"])
5190 OVS_VSWITCHD_START([add-port br0 p0 -- set Interface p0 type=dummy ofport_request=1 options:ifindex=1010])
5192 dnl set up sFlow logging
5193 AT_CHECK([ovstest test-sflow --log-file --detach --no-chdir --pidfile 0:127.0.0.1 > sflow.log], [0], [], [ignore])
5194 AT_CAPTURE_FILE([sflow.log])
5195 SFLOW_PORT=`parse_listening_port < test-sflow.log`
5196 ovs-appctl time/stop
5198 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5199 AT_CHECK([ovs-vsctl add-br int-br -- set bridge int-br datapath_type=dummy], [0])
5200 AT_CHECK([ovs-vsctl -- add-port int-br t1 -- set Interface t1 type=gre \
5201 options:remote_ip=1.1.2.92 options:key=456 ofport_request=4\
5202 -- add-port int-br vm1 -- set Interface vm1 type=dummy \
5203 options:ifindex=2011 ofport_request=5
5206 AT_CHECK([ovs-appctl dpif/show], [0], [dnl
5207 dummy@ovs-dummy: hit:0 missed:0
5209 br0 65534/100: (dummy)
5210 p0 1/1: (dummy: ifindex=1010)
5212 int-br 65534/2: (dummy)
5213 t1 4/4: (gre: key=456, remote_ip=1.1.2.92)
5214 vm1 5/3: (dummy: ifindex=2011)
5217 dnl set up route to 1.1.2.92 via br0 and action=normal
5218 AT_CHECK([ovs-appctl ovs/route/add 1.1.2.92/24 br0], [0], [OK
5220 AT_CHECK([ovs-appctl ovs/route/add 192.168.0.0/16 br0], [0], [OK
5222 AT_CHECK([ovs-appctl netdev-dummy/ip4addr br0 1.1.2.88/24], [0], [OK
5224 AT_CHECK([ovs-ofctl add-flow br0 action=normal])
5226 dnl Prime ARP Cache for 1.1.2.92
5227 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=1,sha=f8:bc:12:44:34:b6,tha=00:00:00:00:00:00)'])
5229 dnl configure sflow on int-br only
5231 set Bridge int-br sflow=@sf -- \
5232 --id=@sf create sflow targets=\"127.0.0.1:$SFLOW_PORT\" \
5233 header=128 sampling=1 polling=0
5235 dnl add rule for int-br to force packet onto tunnel. There is no ifindex
5236 dnl for this port so the sFlow output will just report that it went to
5237 dnl 1 output (out_format=2, out_ifindex=1)
5238 AT_CHECK([ovs-ofctl add-flow int-br "actions=4"])
5240 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)'])
5242 dnl sleep long enough to get the sFlow datagram flushed out (may be delayed for up to 1 second)
5243 for i in `seq 1 30`; do
5244 ovs-appctl time/warp 100
5247 ovs-appctl -t test-sflow exit
5249 AT_CHECK_UNQUOTED([[sort sflow.log | $EGREP 'HEADER|ERROR' | sed 's/ /\
5255 tunnel4_out_length=0
5256 tunnel4_out_protocol=47
5257 tunnel4_out_src=1.1.2.88
5258 tunnel4_out_dst=1.1.2.92
5259 tunnel4_out_src_port=0
5260 tunnel4_out_dst_port=0
5261 tunnel4_out_tcp_flags=0
5279 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
5285 AT_SETUP([ofproto-dpif - sFlow packet sampling - MPLS])
5286 AT_XFAIL_IF([test "$IS_WIN32" = "yes"])
5288 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5289 ADD_OF_PORTS([br0], [1], [2])
5290 AT_DATA([flows.txt], [dnl
5291 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
5292 table=0 dl_src=50:54:00:00:00:0b actions=pop_mpls:0x0800,2
5294 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5296 dnl set up sFlow logging
5297 AT_CHECK([ovstest test-sflow --log-file --detach --no-chdir --pidfile 0:127.0.0.1 > sflow.log], [0], [], [ignore])
5298 AT_CAPTURE_FILE([sflow.log])
5299 SFLOW_PORT=`parse_listening_port < test-sflow.log`
5300 ovs-appctl time/stop
5304 set Bridge br0 sflow=@sf -- \
5305 --id=@sf create sflow targets=\"127.0.0.1:$SFLOW_PORT\" \
5306 header=128 sampling=1 polling=0
5308 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)'])
5309 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)'])
5311 dnl sleep long enough to get the sFlow datagram flushed out (may be delayed for up to 1 second)
5312 for i in `seq 1 30`; do
5313 ovs-appctl time/warp 100
5316 ovs-appctl -t test-sflow exit
5318 AT_CHECK_UNQUOTED([[sort sflow.log | $EGREP 'HEADER|ERROR' | sed 's/ /\
5347 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
5371 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
5378 # CHECK_NETFLOW_EXPIRATION(LOOPBACK_ADDR)
5380 # Test that basic NetFlow reports flow statistics correctly:
5381 # The initial packet of a flow are correctly accounted.
5382 # Later packets within a flow are correctly accounted.
5383 # Flow actions changing (in this case, due to MAC learning)
5384 # cause a record to be sent.
5385 m4_define([CHECK_NETFLOW_EXPIRATION],
5386 [OVS_VSWITCHD_START([set Bridge br0 fail-mode=standalone])
5387 ADD_OF_PORTS([br0], 1, 2)
5389 ovs-appctl time/stop
5390 on_exit 'kill `cat test-netflow.pid`'
5391 AT_CHECK([ovstest test-netflow --log-file --detach --no-chdir --pidfile 0:$1 > netflow.log], [0], [], [ignore])
5392 AT_CAPTURE_FILE([netflow.log])
5393 NETFLOW_PORT=`parse_listening_port < test-netflow.log`
5396 set Bridge br0 netflow=@nf -- \
5397 --id=@nf create NetFlow targets=\"$1:$NETFLOW_PORT\" \
5398 engine_id=1 engine_type=2 active_timeout=30 add-id-to-interface=false
5400 for delay in 1000 30000; do
5401 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)'
5402 sleep 1 # ensure the order in which these two packets are processed
5403 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)'
5405 ovs-appctl time/warp $delay
5408 ovs-appctl time/warp 6000
5409 ovs-appctl revalidator/wait
5411 ovs-appctl -t test-netflow exit
5413 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])
5415 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])
5417 combined=`grep "192.168.0.2 > 192.168.0.1, if 2 > 1, 2 pkts, 120 bytes, ICMP 0:0" netflow.log | wc -l`
5418 separate=`grep "192.168.0.2 > 192.168.0.1, if 2 > 1, 1 pkts, 60 bytes, ICMP 0:0" netflow.log | wc -l`
5419 AT_CHECK([test $separate = 2 || test $combined = 1], [0])])
5421 AT_SETUP([ofproto-dpif - NetFlow flow expiration - IPv4 collector])
5422 CHECK_NETFLOW_EXPIRATION([127.0.0.1])
5425 AT_SETUP([ofproto-dpif - NetFlow flow expiration - IPv6 collector])
5426 AT_SKIP_IF([test $HAVE_IPV6 = no])
5427 CHECK_NETFLOW_EXPIRATION([[[::1]]])
5430 # CHECK_NETFLOW_ACTIVE_EXPIRATION(LOOPBACK_ADDR)
5432 # Test that basic NetFlow reports active expirations correctly.
5433 m4_define([CHECK_NETFLOW_ACTIVE_EXPIRATION],
5434 [OVS_VSWITCHD_START([set Bridge br0 fail-mode=standalone])
5435 ADD_OF_PORTS([br0], 1, 2)
5437 on_exit 'kill `cat test-netflow.pid`'
5438 AT_CHECK([ovstest test-netflow --log-file --detach --no-chdir --pidfile 0:$1 > netflow.log], [0], [], [ignore])
5439 AT_CAPTURE_FILE([netflow.log])
5440 NETFLOW_PORT=`parse_listening_port < test-netflow.log`
5443 set Bridge br0 netflow=@nf -- \
5444 --id=@nf create NetFlow targets=\"$1:$NETFLOW_PORT\" \
5445 engine_id=1 engine_type=2 active_timeout=10 add-id-to-interface=false
5447 AT_CHECK([ovs-appctl time/stop])
5449 while test $n -le 60; do
5452 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)'
5453 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)'
5455 ovs-appctl time/warp 1000
5458 ovs-appctl time/warp 10000
5460 ovs-appctl revalidator/wait
5462 ovs-appctl -t test-netflow exit
5464 # Count the number of reported packets:
5465 # - From source to destination before MAC learning kicks in (just one).
5466 # - From source to destination after that.
5467 # - From destination to source.
5475 pkts=`echo "$line" | sed 's/.*, \([[0-9]]*\) pkts,.*/\1/'`
5482 "seq "*": 192.168.0.1 > 192.168.0.2, if 1 > 65535, "*" pkts, "*" bytes, TCP 1234 > 80, time "*)
5485 "seq "*": 192.168.0.1 > 192.168.0.2, if 1 > 2, "*" pkts, "*" bytes, TCP 1234 > 80, time "*)
5488 "seq "*": 192.168.0.2 > 192.168.0.1, if 2 > 1, "*" pkts, "*" bytes, TCP 80 > 1234, time "*)
5495 eval $counter=\`expr \$$counter + \$pkts\`
5496 n_recs=`expr $n_recs + 1`
5499 # There should be exactly 1 MAC learning packet,
5500 # exactly 59 other packets in that direction,
5501 # and exactly 60 packets in the other direction.
5502 AT_CHECK([echo $n_learn $n_in $n_out $n_other], [0], [1 59 60 0
5505 AT_SETUP([ofproto-dpif - NetFlow active expiration - IPv4 collector])
5506 CHECK_NETFLOW_ACTIVE_EXPIRATION([127.0.0.1])
5509 AT_SETUP([ofproto-dpif - NetFlow active expiration - IPv6 collector])
5510 AT_SKIP_IF([test $HAVE_IPV6 = no])
5511 CHECK_NETFLOW_ACTIVE_EXPIRATION([[[::1]]])
5514 dnl In the absence of an IPFIX collector to verify protocol correctness, simply
5515 dnl configure IPFIX and ensure that sample action generation works at the
5517 AT_SETUP([ofproto-dpif - Basic IPFIX sanity check])
5519 ADD_OF_PORTS([br0], 1, 2)
5521 dnl Sample every packet using bridge-based sampling
5522 AT_CHECK([ovs-vsctl -- set bridge br0 ipfix=@fix -- \
5523 --id=@fix create ipfix targets=\"127.0.0.1:4739\" \
5524 sampling=1], [0], [ignore])
5526 dnl Send some packets that should be sampled
5527 for i in `seq 1 3`; do
5528 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)'])
5530 AT_CHECK([ovs-appctl dpctl/dump-flows | sed 's/.*\(packets:\)/\1/' | sed 's/used:[[0-9]].[[0-9]]*s/used:0.001s/'], [0], [dnl
5531 flow-dump from non-dpdk interfaces:
5532 packets:2, bytes:120, used:0.001s, actions:sample(sample=100.0%,actions(userspace(pid=0,ipfix(output_port=4294967295))))
5535 dnl Remove the IPFIX configuration
5536 AT_CHECK([ovs-vsctl clear bridge br0 ipfix])
5537 AT_CHECK([ovs-appctl revalidator/purge])
5539 dnl Send some more packets, to ensure that these are not sampled.
5540 for i in `seq 1 3`; do
5541 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)'])
5543 AT_CHECK([ovs-appctl dpctl/dump-flows | sed 's/.*\(packets:\)/\1/' | sed 's/used:[[0-9]].[[0-9]]*s/used:0.001s/'], [0], [dnl
5544 flow-dump from non-dpdk interfaces:
5545 packets:2, bytes:120, used:0.001s, actions:drop
5548 OVS_VSWITCHD_STOP(["/sending to collector failed/d"])
5551 AT_SETUP([ofproto-dpif - flow stats])
5553 AT_CHECK([ovs-ofctl add-flow br0 "ip,actions=NORMAL"])
5554 AT_CHECK([ovs-ofctl add-flow br0 "icmp,actions=NORMAL"])
5556 ovs-appctl time/stop
5558 for i in `seq 1 10`; do
5559 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)'
5562 AT_CHECK([ovs-appctl time/warp 1000], [0], [ignore])
5563 AT_CHECK([ovs-appctl revalidator/purge], [0])
5564 AT_CHECK([ovs-ofctl dump-flows br0], [0], [stdout])
5565 AT_CHECK([STRIP_XIDS stdout | sed -n 's/duration=[[0-9]]*\.[[0-9]]*s/duration=0.0s/p' | sort], [0], [dnl
5566 cookie=0x0, duration=0.0s, table=0, n_packets=0, n_bytes=0, idle_age=1, icmp actions=NORMAL
5567 cookie=0x0, duration=0.0s, table=0, n_packets=10, n_bytes=600, idle_age=1, ip actions=NORMAL
5572 AT_SETUP([ofproto-dpif - flow stats, set-n-threads])
5574 AT_CHECK([ovs-ofctl add-flow br0 "ip,actions=NORMAL"])
5575 AT_CHECK([ovs-ofctl add-flow br0 "icmp,actions=NORMAL"])
5577 ovs-appctl time/stop
5579 for i in `seq 1 10`; do
5580 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)'
5583 ovs-appctl time/warp 100
5584 AT_CHECK([ovs-vsctl set Open_vSwitch . other-config:n-revalidator-threads=2])
5585 ovs-appctl time/warp 1000
5587 AT_CHECK([ovs-ofctl dump-flows br0], [0], [stdout])
5588 AT_CHECK([STRIP_XIDS stdout | sed -n 's/duration=[[0-9]]*\.[[0-9]]*s/duration=0.0s/p' | sort], [0], [dnl
5589 cookie=0x0, duration=0.0s, table=0, n_packets=0, n_bytes=0, idle_age=1, icmp actions=NORMAL
5590 cookie=0x0, duration=0.0s, table=0, n_packets=10, n_bytes=600, idle_age=1, ip actions=NORMAL
5595 AT_SETUP([ofproto-dpif - idle_age and hard_age increase over time])
5598 # get_ages DURATION HARD IDLE
5600 # Fetch the flow duration, hard age, and idle age into the variables
5601 # whose names are given as arguments. Rounds DURATION down to the
5602 # nearest integer. If hard_age doesn't appear in the output, sets
5603 # HARD to "none". If idle_age doesn't appear in the output, sets IDLE
5606 AT_CHECK([ovs-ofctl dump-flows br0], [0], [stdout])
5608 duration=`sed -n 's/.*duration=\([[0-9]]*\)\(\.[[0-9]]*\)\{0,1\}s.*/\1/p' stdout`
5609 AT_CHECK([[expr X"$duration" : 'X[0-9][0-9]*$']], [0], [ignore])
5610 AS_VAR_COPY([$1], [duration])
5612 hard=`sed -n 's/.*hard_age=\([[0-9]]*\),.*/\1/p' stdout`
5613 if test X"$hard" = X; then
5616 AT_CHECK([[expr X"$hard" : 'X[0-9][0-9]*$']], [0], [ignore])
5618 AS_VAR_COPY([$2], [hard])
5620 idle=`sed -n 's/.*idle_age=\([[0-9]]*\),.*/\1/p' stdout`
5621 if test X"$idle" = X; then
5624 AT_CHECK([[expr X"$idle" : 'X[0-9][0-9]*$']], [0], [ignore])
5626 AS_VAR_COPY([$3], [idle])
5629 # Add a flow and get its initial hard and idle age.
5630 AT_CHECK([ovs-ofctl add-flow br0 hard_timeout=199,idle_timeout=188,actions=drop])
5631 get_ages duration1 hard1 idle1
5633 ovs-appctl time/stop
5634 # Warp time forward by 10 seconds, then modify the flow's actions.
5635 ovs-appctl time/warp 10000
5636 get_ages duration2 hard2 idle2
5637 AT_CHECK([ovs-ofctl mod-flows br0 actions=flood])
5639 # Warp time forward by 10 seconds.
5640 ovs-appctl time/warp 10000
5641 get_ages duration3 hard3 idle3
5643 # Warp time forward 10 more seconds, then pass some packets through the flow,
5644 # then warp forward a few more times because idle times are only updated
5646 ovs-appctl time/warp 10000
5647 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)'
5648 ovs-appctl time/warp 3000 1000
5650 get_ages duration4 hard4 idle4
5652 printf "duration: %4s => %4s => %4s => %4s\n" $duration1 $duration2 $duration3 $duration4
5653 printf "hard_age: %4s => %4s => %4s => %4s\n" $hard1 $hard2 $hard3 $hard4
5654 printf "idle_age: %4s => %4s => %4s => %4s\n" $idle1 $idle2 $idle3 $idle4
5656 # Duration should increase steadily over time.
5657 AT_CHECK([test $duration1 -lt $duration2])
5658 AT_CHECK([test $duration2 -lt $duration3])
5659 AT_CHECK([test $duration3 -lt $duration4])
5661 # Hard age should be "none" initially because it's the same as flow_duration,
5662 # then it should increase.
5663 AT_CHECK([test $hard1 = none])
5664 AT_CHECK([test $hard2 = none])
5665 AT_CHECK([test $hard3 != none])
5666 AT_CHECK([test $hard4 != none])
5667 AT_CHECK([test $hard3 -lt $hard4])
5669 # Idle age should increase from 1 to 2 to 3, then decrease.
5670 AT_CHECK([test $idle1 -lt $idle2])
5671 AT_CHECK([test $idle2 -lt $idle3])
5672 AT_CHECK([test $idle3 -gt $idle4])
5674 # Check some invariant relationships.
5675 AT_CHECK([test $duration1 = $idle1])
5676 AT_CHECK([test $duration2 = $idle2])
5677 AT_CHECK([test $duration3 = $idle3])
5678 AT_CHECK([test $idle3 -gt $hard3])
5679 AT_CHECK([test $idle4 -lt $hard4])
5680 AT_CHECK([test $hard4 -lt $duration4])
5685 AT_SETUP([ofproto-dpif - fin_timeout])
5687 ovs-appctl time/stop
5688 AT_CHECK([ovs-ofctl add-flow br0 'idle_timeout=60,actions=fin_timeout(idle_timeout=5)'])
5689 AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip], [0],
5691 idle_timeout=60, actions=fin_timeout(idle_timeout=5)
5694 # Check that a TCP SYN packet does not change the timeout. (Because
5695 # flow stats updates are mainly what implements the fin_timeout
5696 # feature, we warp forward a couple of times to ensure that flow stats
5697 # run before re-checking the flow table.)
5698 AT_CHECK([ovs-appctl netdev-dummy/receive br0 0021853763af0026b98cb0f908004500003c2e2440004006465dac11370dac11370b828b0016751e267b00000000a00216d017360000020405b40402080a2d25085f0000000001030307])
5699 AT_CHECK([ovs-appctl time/warp 1000 && ovs-appctl time/warp 1000], [0], [warped
5702 AT_CHECK([ovs-appctl revalidator/purge], [0])
5703 AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip], [0],
5705 n_packets=1, n_bytes=74, idle_timeout=60, actions=fin_timeout(idle_timeout=5)
5707 # Check that a TCP FIN packet does change the timeout.
5708 AT_CHECK([ovs-appctl netdev-dummy/receive br0 0021853763af0026b98cb0f90800451000342e3e40004006463bac11370dac11370b828b0016751e319dfc96399b801100717ae800000101080a2d250a9408579588])
5709 AT_CHECK([ovs-appctl time/warp 1000 && ovs-appctl time/warp 1000], [0], [warped
5712 AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip], [0],
5714 n_packets=2, n_bytes=140, idle_timeout=5, actions=fin_timeout(idle_timeout=5)
5719 AT_SETUP([ofproto-dpif - ovs-appctl dpif/dump-dps])
5720 OVS_VSWITCHD_START([add-br br1 -- set bridge br1 datapath-type=dummy])
5721 ADD_OF_PORTS([br0], [1], [2])
5722 ADD_OF_PORTS([br1], [3])
5724 AT_CHECK([ovs-appctl dpif/dump-dps], [0], [dnl
5731 AT_SETUP([ofproto-dpif - ovs-appctl dpif/show])
5732 OVS_VSWITCHD_START([add-br br1 -- set bridge br1 datapath-type=dummy])
5733 ADD_OF_PORTS([br0], [1], [2])
5734 ADD_OF_PORTS([br1], [3])
5736 AT_CHECK([ovs-appctl dpif/show], [0], [dnl
5737 dummy@ovs-dummy: hit:0 missed:0
5739 br0 65534/100: (dummy)
5743 br1 65534/101: (dummy)
5749 AT_SETUP([ofproto-dpif - ovs-appctl dpif/dump-flows])
5750 # bump max-idle to avoid the flows being reclaimed behind us
5751 OVS_VSWITCHD_START([add-br br1 -- \
5752 set bridge br1 datapath-type=dummy fail-mode=secure -- \
5753 set Open_vSwitch . other_config:max-idle=10000])
5754 ADD_OF_PORTS([br0], [1], [2])
5755 ADD_OF_PORTS([br1], [3])
5757 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)'])
5758 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)'])
5759 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)'])
5760 ovs-appctl revalidator/wait
5761 AT_CHECK([ovs-appctl dpif/dump-flows br0 | STRIP_UFID | STRIP_USED | sort], [0], [dnl
5762 recirc_id(0),in_port(1),eth_type(0x0800),ipv4(frag=no), packets:0, bytes:0, used:never, actions:drop
5763 recirc_id(0),in_port(2),eth_type(0x0800),ipv4(frag=no), packets:0, bytes:0, used:never, actions:drop
5766 AT_CHECK([ovs-appctl dpif/dump-flows br1 | STRIP_UFID | STRIP_USED | sort], [0], [dnl
5767 recirc_id(0),in_port(3),eth_type(0x0800),ipv4(frag=no), packets:0, bytes:0, used:never, actions:drop
5770 AT_CHECK([ovs-appctl dpif/dump-flows -m br0 | STRIP_UFID | STRIP_USED | sort], [0], [dnl
5771 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
5772 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
5775 AT_CHECK([ovs-appctl dpif/dump-flows -m br1 | STRIP_UFID | STRIP_USED | sort], [0], [dnl
5776 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
5782 AT_SETUP([ofproto-dpif - ovs-appctl dpif/get-flow])
5784 OVS_VSWITCHD_START([add-br br1 -- \
5785 set bridge br1 datapath-type=dummy fail-mode=secure -- \
5786 set Open_vSwitch . other_config:max-idle=10000])
5787 ADD_OF_PORTS([br0], [1], [2])
5789 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)'])
5790 ovs-appctl revalidator/wait
5791 AT_CHECK([ovs-appctl dpif/dump-flows -m br0], [0], [stdout])
5793 UFID=`sed -n 's/\(ufid:[[-0-9a-fA-F]]*\).*/\1/p' stdout`
5794 AT_CHECK([ovs-appctl dpctl/get-flow $UFID], [0], [dnl
5795 recirc_id(0),in_port(1),eth_type(0x0800),ipv4(frag=no), packets:0, bytes:0, used:never, actions:drop
5801 AT_SETUP([ofproto-dpif - MPLS actions that result in a userspace action])
5802 OVS_VSWITCHD_START([dnl
5803 add-port br0 p1 -- set Interface p1 type=dummy
5805 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5806 on_exit 'kill `cat ovs-ofctl.pid`'
5808 AT_CAPTURE_FILE([ofctl_monitor.log])
5809 AT_DATA([flows.txt], [dnl
5810 dl_src=60:66:66:66:66:00 actions=push_mpls:0x8847,controller
5811 dl_src=60:66:66:66:66:01 actions=pop_mpls:0x8849,controller
5813 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5815 dnl Packet is sent to userspace because a MPLS push or pop action is applied to
5816 dnl a packet with 2 MPLS LSEs but dpif-netdev can't handle any labels.
5818 dnl The input is a frame with two MPLS labels which tcpdump -vve shows as:
5819 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)
5820 dnl (label 20, exp 0, [S], ttl 32)
5821 dnl (tos 0x0, ttl 64, id 0, offset 0, flags [none], proto TCP (6), length 44, bad cksum 3b78 (->f978)!)
5822 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
5824 for dl_src in 00 01; do
5825 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"])
5827 sleep 1 # wait for the datapath flow installed
5828 AT_CHECK_UNQUOTED([cat ovs-vswitchd.log | STRIP_UFID | FILTER_FLOW_INSTALL | STRIP_USED], [0], [dnl
5829 recirc_id=0,mpls,in_port=1,vlan_tci=0x0000,dl_src=60:66:66:66:66:00,mpls_label=20,mpls_tc=0,mpls_ttl=32,mpls_bos=0,mpls_lse1=82208, actions:userspace(pid=0,slow_path(controller))
5830 recirc_id=0,mpls,in_port=1,vlan_tci=0x0000,dl_src=60:66:66:66:66:01,mpls_bos=0,mpls_lse1=82208, actions:userspace(pid=0,slow_path(controller))
5837 AT_SETUP([ofproto-dpif - MPLS actions that result in a drop])
5838 OVS_VSWITCHD_START([dnl
5839 add-port br0 p1 -- set Interface p1 type=dummy
5841 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5842 on_exit 'kill `cat ovs-ofctl.pid`'
5844 AT_CAPTURE_FILE([ofctl_monitor.log])
5845 AT_DATA([flows.txt], [dnl
5846 dl_src=60:66:66:66:66:00 actions=push_mpls:0x8847,controller
5847 dl_src=60:66:66:66:66:01 actions=pop_mpls:0x8849,controller
5849 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5851 dnl Packet is dropped because an MPLS PUSH action is applied to a packet with
5852 dnl 4 MPLS LSEs but ovs-vswtichd can only handle up to 3 MPLS LSEs and thus
5853 dnl can't determine the resulting MPLS label after MPLS push/pop actions.
5855 dnl The input is a frame with two MPLS headers which tcpdump -vve shows as:
5856 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)
5857 dnl (label 20, exp 0, ttl 32)
5858 dnl (label 20, exp 0, ttl 32)
5859 dnl (label 20, exp 0, [S], ttl 32)
5860 dnl (tos 0x0, ttl 64, id 0, offset 0, flags [none], proto TCP (6), length 44, bad cksum 3b78 (->f978)!)
5861 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
5863 for dl_src in 00 01; do
5864 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"])
5866 sleep 1 # wait for the datapath flow installed
5867 AT_CHECK_UNQUOTED([cat ovs-vswitchd.log | STRIP_UFID | FILTER_FLOW_INSTALL | STRIP_USED], [0], [dnl
5868 recirc_id=0,mpls,in_port=1,vlan_tci=0x0000,dl_src=60:66:66:66:66:00,mpls_label=20,mpls_tc=0,mpls_ttl=32,mpls_bos=0,mpls_lse1=82208, actions:userspace(pid=0,slow_path(controller))
5869 recirc_id=0,mpls,in_port=1,vlan_tci=0x0000,dl_src=60:66:66:66:66:01,mpls_bos=0,mpls_lse1=82208, actions:userspace(pid=0,slow_path(controller))
5875 AT_SETUP([ofproto-dpif - patch ports])
5876 OVS_VSWITCHD_START([add-br br1 \
5877 -- set bridge br1 datapath-type=dummy fail-mode=secure \
5878 -- add-port br1 pbr1 -- set int pbr1 type=patch options:peer=pbr0 \
5879 -- add-port br0 pbr0 -- set int pbr0 type=patch options:peer=pbr1])
5881 ADD_OF_PORTS([br0], [2])
5882 ADD_OF_PORTS([br1], [3])
5884 AT_CHECK([ovs-appctl upcall/disable-ufid], [0], [Datapath dumping tersely using UFID disabled
5886 AT_CHECK([ovs-appctl time/stop])
5887 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5889 AT_CHECK([ovs-ofctl add-flow br0 actions=LOCAL,output:1,output:2])
5890 AT_CHECK([ovs-ofctl add-flow br1 actions=LOCAL,output:1,output:3])
5892 for i in $(seq 1 10); do
5893 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)'
5894 if [[ $i -eq 1 ]]; then
5899 for i in $(seq 1 5); do
5900 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)'
5901 if [[ $i -eq 1 ]]; then
5906 AT_CHECK([ovs-appctl time/warp 500], [0],
5909 sleep 1 # wait for log writer
5911 AT_CHECK([ovs-appctl dpif/show], [0], [dnl
5912 dummy@ovs-dummy: hit:13 missed:2
5914 br0 65534/100: (dummy)
5916 pbr0 1/none: (patch: peer=pbr1)
5918 br1 65534/101: (dummy)
5920 pbr1 1/none: (patch: peer=pbr0)
5923 AT_CHECK([cat ovs-vswitchd.log | STRIP_UFID | FILTER_FLOW_INSTALL | STRIP_USED], [0], [dnl
5924 recirc_id=0,ip,in_port=100,vlan_tci=0x0000,nw_frag=no, actions:101,3,2
5925 recirc_id=0,ip,in_port=101,vlan_tci=0x0000,nw_frag=no, actions:100,2,3
5928 AT_CHECK([cat ovs-vswitchd.log | grep -e 'in_port(100).*packets:9' | STRIP_UFID | FILTER_FLOW_DUMP], [0], [dnl
5929 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
5931 AT_CHECK([cat ovs-vswitchd.log | grep -e 'in_port(101).*packets:4' | STRIP_UFID | FILTER_FLOW_DUMP], [0], [dnl
5932 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
5935 AT_CHECK([ovs-ofctl dump-ports br0 pbr0], [0], [dnl
5936 OFPST_PORT reply (xid=0x4): 1 ports
5937 port 1: rx pkts=5, bytes=300, drop=0, errs=0, frame=0, over=0, crc=0
5938 tx pkts=10, bytes=600, drop=0, errs=0, coll=0
5941 AT_CHECK([ovs-ofctl dump-ports br1 pbr1], [0], [dnl
5942 OFPST_PORT reply (xid=0x4): 1 ports
5943 port 1: rx pkts=10, bytes=600, drop=0, errs=0, frame=0, over=0, crc=0
5944 tx pkts=5, bytes=300, drop=0, errs=0, coll=0
5950 AT_SETUP([ofproto-dpif - patch ports - stack])
5951 OVS_VSWITCHD_START([add-br br1 \
5952 -- set bridge br1 datapath-type=dummy fail-mode=secure \
5953 -- add-port br1 pbr1 -- set int pbr1 type=patch options:peer=pbr0 \
5954 -- add-port br0 pbr0 -- set int pbr0 type=patch options:peer=pbr1])
5956 ADD_OF_PORTS([br0], [2])
5957 ADD_OF_PORTS([br1], [3])
5959 AT_CHECK([ovs-appctl upcall/disable-ufid], [0], [Datapath dumping tersely using UFID disabled
5961 AT_CHECK([ovs-appctl time/stop])
5962 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5964 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"])
5965 # Try to pop from empty stack, and push and leave data to stack.
5966 AT_CHECK([ovs-ofctl add-flow br1 "ip actions=pop:OXM_OF_IPV4_DST[[0..31]],push:NXM_NX_REG1[[0..31]],LOCAL"])
5968 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)'
5970 AT_CHECK([ovs-appctl time/warp 500], [0],
5974 OVS_WAIT_UNTIL([test `grep flow_add ovs-vswitchd.log | wc -l` -ge 1])
5976 AT_CHECK([ovs-appctl dpif/show], [0], [dnl
5977 dummy@ovs-dummy: hit:0 missed:1
5979 br0 65534/100: (dummy)
5981 pbr0 1/none: (patch: peer=pbr1)
5983 br1 65534/101: (dummy)
5985 pbr1 1/none: (patch: peer=pbr0)
5988 AT_CHECK([cat ovs-vswitchd.log | STRIP_UFID | FILTER_FLOW_INSTALL | STRIP_USED], [0], [dnl
5989 recirc_id=0,ip,in_port=100,vlan_tci=0x0000,nw_src=192.168.0.1,nw_frag=no, actions:101,set(ipv4(src=255.255.255.254)),2
5992 AT_CHECK([cat ovs-vswitchd.log | grep -e '|nx_match|WARN|' | sed "s/^.*|WARN|//"], [0], [dnl
5993 Failed to pop from an empty stack. On flow
5996 OVS_VSWITCHD_STOP(["/Failed to pop from an empty stack/d"])
5999 AT_SETUP([ofproto-dpif - port duration])
6000 OVS_VSWITCHD_START([set Bridge br0 protocols=OpenFlow13])
6001 ADD_OF_PORTS([br0], 1, 2)
6003 ovs-appctl time/stop
6004 ovs-appctl time/warp 10000
6006 AT_CHECK([ovs-ofctl -O openflow13 dump-ports br0], [0], [stdout])
6007 AT_CHECK([sed -n 's/=[[0-9]][[0-9]]\(\.[[0-9]][[0-9]]*\)\{0,1\}s/=?s/p' stdout], [0],
6016 dnl ----------------------------------------------------------------------
6017 AT_BANNER([ofproto-dpif -- megaflows])
6019 AT_SETUP([ofproto-dpif megaflow - port classification])
6021 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
6022 ADD_OF_PORTS([br0], [1], [2])
6023 AT_DATA([flows.txt], [dnl
6024 table=0 in_port=1 actions=output(2)
6026 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
6027 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)'])
6029 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)'])
6031 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
6032 recirc_id=0,ip,in_port=1,vlan_tci=0x0000,nw_frag=no, actions: <del>
6037 AT_SETUP([ofproto-dpif megaflow - L2 classification])
6039 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
6040 ADD_OF_PORTS([br0], [1], [2])
6041 AT_DATA([flows.txt], [dnl
6042 table=0 in_port=1,dl_src=50:54:00:00:00:09 actions=output(2)
6044 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
6045 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)'])
6046 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)'])
6048 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
6049 recirc_id=0,ip,in_port=1,vlan_tci=0x0000,dl_src=50:54:00:00:00:09,nw_frag=no, actions: <del>
6050 recirc_id=0,ip,in_port=1,vlan_tci=0x0000,dl_src=50:54:00:00:00:0b/ff:ff:00:00:00:02,nw_frag=no, actions: <del>
6055 AT_SETUP([ofproto-dpif megaflow - L3 classification])
6057 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
6058 ADD_OF_PORTS([br0], [1], [2])
6059 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], [])
6060 AT_DATA([flows.txt], [dnl
6061 table=0 in_port=1,icmp,nw_src=10.0.0.4 actions=output(2)
6063 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
6064 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)'])
6065 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)'])
6067 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
6068 recirc_id=0,icmp,in_port=1,vlan_tci=0x0000,nw_src=10.0.0.4,nw_frag=no, actions: <del>
6069 recirc_id=0,ip,in_port=1,vlan_tci=0x0000,nw_src=10.0.0.2/0.0.0.2,nw_frag=no, actions: <del>
6074 AT_SETUP([ofproto-dpif megaflow - IPv6 classification])
6076 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
6077 ADD_OF_PORTS([br0], [1], [2])
6078 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], [])
6079 AT_DATA([flows.txt], [dnl
6080 table=0 in_port=1,ipv6,ipv6_src=2001:db8:3c4d:1:2:3:4:5 actions=output(2)
6082 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
6083 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)'])
6084 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)'])
6086 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
6087 recirc_id=0,ipv6,in_port=1,vlan_tci=0x0000,ipv6_src=2001:db8:3c4d:1:2:3:4:5,nw_frag=no, actions: <del>
6088 recirc_id=0,ipv6,in_port=1,vlan_tci=0x0000,ipv6_src=2001:db8:3c4d:5:4:3:2:1/0:0:0:4::,nw_frag=no, actions: <del>
6093 AT_SETUP([ofproto-dpif megaflow - L4 classification])
6095 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
6096 ADD_OF_PORTS([br0], [1], [2])
6097 AT_DATA([flows.txt], [dnl
6098 table=0 in_port=1,icmp,icmp_type=8 actions=output(2)
6100 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
6101 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)'])
6103 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)'])
6105 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
6106 recirc_id=0,icmp,in_port=1,vlan_tci=0x0000,nw_frag=no,icmp_type=0x8/0xff, actions: <del>
6111 AT_SETUP([ofproto-dpif megaflow - normal])
6113 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
6114 ADD_OF_PORTS([br0], [1], [2])
6115 AT_CHECK([ovs-ofctl add-flow br0 action=normal])
6116 AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
6117 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)'])
6119 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
6120 recirc_id=0,ip,in_port=1,vlan_tci=0x0000/0x1fff,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,nw_frag=no, actions: <del>
6121 recirc_id=0,ip,in_port=1,vlan_tci=0x0000/0x1fff,dl_src=50:54:00:00:00:0b,dl_dst=50:54:00:00:00:0c,nw_frag=no, actions: <del>
6126 AT_SETUP([ofproto-dpif megaflow - mpls])
6128 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
6129 ADD_OF_PORTS([br0], [1], [2])
6130 AT_DATA([flows.txt], [dnl
6131 table=0 dl_src=50:54:00:00:00:09 actions=push_mpls:0x8847,2
6132 table=0 dl_src=50:54:00:00:00:0b actions=pop_mpls:0x0800,2
6134 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
6135 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)'])
6136 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)'])
6138 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
6139 recirc_id=0,mpls,in_port=1,vlan_tci=0x0000,dl_src=50:54:00:00:00:09,mpls_label=11,mpls_tc=3,mpls_ttl=64,mpls_bos=1, actions: <del>
6140 recirc_id=0,mpls,in_port=1,vlan_tci=0x0000,dl_src=50:54:00:00:00:0b,mpls_bos=1, actions: <del>
6145 # CHECK_MEGAFLOW_NETFLOW(LOOPBACK_ADDR)
6146 m4_define([CHECK_MEGAFLOW_NETFLOW],
6148 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
6149 ADD_OF_PORTS([br0], [1], [2])
6151 dnl NetFlow configuration disables wildcarding relevant fields
6152 on_exit 'kill `cat test-netflow.pid`'
6153 AT_CHECK([ovstest test-netflow --log-file --detach --no-chdir --pidfile 0:$1 > netflow.log], [0], [], [ignore])
6154 AT_CAPTURE_FILE([netflow.log])
6155 NETFLOW_PORT=`parse_listening_port < test-netflow.log`
6157 set Bridge br0 netflow=@nf -- \
6158 --id=@nf create NetFlow targets=\"$1:$NETFLOW_PORT\" \
6159 engine_id=1 engine_type=2 active_timeout=30 add-id-to-interface=false
6161 AT_CHECK([ovs-ofctl add-flow br0 action=normal])
6162 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)'])
6163 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)'])
6165 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
6166 recirc_id=0,icmp,in_port=1,vlan_tci=0x0000/0x1fff,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,nw_src=10.0.0.2,nw_dst=10.0.0.1,nw_tos=0,nw_frag=no,icmp_type=0x8/0xff,icmp_code=0x0/0xff, actions: <del>
6167 recirc_id=0,icmp,in_port=1,vlan_tci=0x0000/0x1fff,dl_src=50:54:00:00:00:0b,dl_dst=50:54:00:00:00:0c,nw_src=10.0.0.4,nw_dst=10.0.0.3,nw_tos=0,nw_frag=no,icmp_type=0x8/0xff,icmp_code=0x0/0xff, actions: <del>
6171 AT_SETUP([ofproto-dpif megaflow - netflow - IPv4 collector])
6172 CHECK_MEGAFLOW_NETFLOW([127.0.0.1], [IPv4])
6175 AT_SETUP([ofproto-dpif megaflow - netflow - IPv6 collector])
6176 AT_SKIP_IF([test $HAVE_IPV6 = no])
6177 CHECK_MEGAFLOW_NETFLOW([[[::1]]], [IPv6])
6180 AT_SETUP([ofproto-dpif megaflow - normal, active-backup bonding])
6182 [add-port br0 p1 -- set Interface p1 type=dummy ofport_request=1 -- \
6183 add-bond br0 bond0 p2 p3 bond_mode=active-backup -- \
6184 set interface p2 type=dummy ofport_request=2 -- \
6185 set interface p3 type=dummy ofport_request=3])
6186 AT_CHECK([ovs-appctl netdev-dummy/set-admin-state up], 0, [OK
6188 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
6190 AT_CHECK([ovs-ofctl add-flow br0 action=normal])
6191 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)'])
6192 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)'])
6194 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
6195 recirc_id=0,ip,in_port=1,vlan_tci=0x0000/0x1fff,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,nw_frag=no, actions: <del>
6196 recirc_id=0,ip,in_port=1,vlan_tci=0x0000/0x1fff,dl_src=50:54:00:00:00:0b,dl_dst=50:54:00:00:00:0c,nw_frag=no, actions: <del>
6201 AT_SETUP([ofproto-dpif megaflow - normal, balance-slb bonding])
6203 [add-port br0 p1 -- set Interface p1 type=dummy ofport_request=1 -- \
6204 add-bond br0 bond0 p2 p3 bond_mode=balance-slb -- \
6205 set interface p2 type=dummy ofport_request=2 -- \
6206 set interface p3 type=dummy ofport_request=3])
6207 AT_CHECK([ovs-appctl netdev-dummy/set-admin-state up], 0, [OK
6209 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
6211 AT_CHECK([ovs-ofctl add-flow br0 action=normal])
6212 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)'])
6213 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)'])
6215 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
6216 recirc_id=0,ip,in_port=1,vlan_tci=0x0000/0x1fff,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,nw_frag=no, actions: <del>
6217 recirc_id=0,ip,in_port=1,vlan_tci=0x0000/0x1fff,dl_src=50:54:00:00:00:0b,dl_dst=50:54:00:00:00:0c,nw_frag=no, actions: <del>
6222 AT_SETUP([ofproto-dpif megaflow - normal, balance-tcp bonding])
6223 # Create bond0 on br0 with interfaces p0 and p1
6224 # and bond1 on br1 with interfaces p2 and p3
6225 # with p0 patched to p2 and p1 patched to p3.
6227 [add-bond br0 bond0 p0 p1 bond_mode=balance-tcp lacp=active \
6228 other-config:lacp-time=fast \
6229 other-config:bond-rebalance-interval=0 -- \
6230 set interface p0 type=patch options:peer=p2 ofport_request=1 -- \
6231 set interface p1 type=patch options:peer=p3 ofport_request=2 -- \
6233 set bridge br1 other-config:hwaddr=aa:66:aa:66:00:00 -- \
6234 set bridge br1 datapath-type=dummy other-config:datapath-id=1234 \
6235 fail-mode=secure -- \
6236 add-bond br1 bond1 p2 p3 bond_mode=balance-tcp lacp=active \
6237 other-config:lacp-time=fast \
6238 other-config:bond-rebalance-interval=0 -- \
6239 set interface p2 type=patch options:peer=p0 ofport_request=3 -- \
6240 set interface p3 type=patch options:peer=p1 ofport_request=4 --])
6242 AT_CHECK([ovs-appctl netdev-dummy/set-admin-state up], 0, [OK
6244 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
6245 ADD_OF_PORTS([br0], [7])
6246 AT_CHECK([ovs-ofctl add-flow br0 action=normal])
6247 AT_CHECK([ovs-ofctl add-flow br1 action=normal])
6248 ovs-appctl time/stop
6249 ovs-appctl time/warp 5000
6250 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)'])
6251 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)'])
6253 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
6254 recirc_id=0,ip,in_port=7,vlan_tci=0x0000/0x1fff,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,nw_frag=no, actions: <del>
6255 recirc_id=0,ip,in_port=7,vlan_tci=0x0000/0x1fff,dl_src=50:54:00:00:00:0b,dl_dst=50:54:00:00:00:0c,nw_frag=no, actions: <del>
6260 AT_SETUP([ofproto-dpif megaflow - resubmit port action])
6262 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
6263 ADD_OF_PORTS([br0], [1], [2])
6264 AT_DATA([flows.txt], [dnl
6265 table=0 in_port=1,ip actions=resubmit(90)
6266 table=0 in_port=90,dl_src=50:54:00:00:00:09 actions=output(2)
6268 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
6269 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)'])
6270 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)'])
6272 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
6273 recirc_id=0,ip,in_port=1,vlan_tci=0x0000,dl_src=50:54:00:00:00:09,nw_frag=no, actions: <del>
6274 recirc_id=0,ip,in_port=1,vlan_tci=0x0000,dl_src=50:54:00:00:00:0b/ff:ff:00:00:00:02,nw_frag=no, actions: <del>
6279 AT_SETUP([ofproto-dpif megaflow - resubmit table action])
6281 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
6282 ADD_OF_PORTS([br0], [1], [2])
6283 AT_DATA([flows.txt], [dnl
6284 table=0 in_port=1,ip actions=resubmit(,1)
6285 table=1 dl_src=50:54:00:00:00:09 actions=output(2)
6287 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
6288 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)'])
6289 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=
6290 1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
6292 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
6293 recirc_id=0,ip,in_port=1,vlan_tci=0x0000,dl_src=50:54:00:00:00:09,nw_frag=no, actions: <del>
6294 recirc_id=0,ip,in_port=1,vlan_tci=0x0000,dl_src=50:54:00:00:00:0b,nw_frag=no, actions: <del>
6299 AT_SETUP([ofproto-dpif megaflow - goto_table action])
6301 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
6302 ADD_OF_PORTS([br0], [1], [2])
6303 AT_DATA([flows.txt], [dnl
6304 table=0 in_port=1,ip actions=goto_table(1)
6305 table=1 dl_src=50:54:00:00:00:09 actions=output(2)
6307 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flows br0 flows.txt])
6308 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)'])
6309 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)'])
6311 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
6312 recirc_id=0,ip,in_port=1,vlan_tci=0x0000,dl_src=50:54:00:00:00:09,nw_frag=no, actions: <del>
6313 recirc_id=0,ip,in_port=1,vlan_tci=0x0000,dl_src=50:54:00:00:00:0b,nw_frag=no, actions: <del>
6318 AT_SETUP([ofproto-dpif megaflow - mirroring, select_all])
6320 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
6321 ADD_OF_PORTS([br0], [1], [2], [3])
6323 set Bridge br0 mirrors=@m --\
6324 --id=@p3 get Port p3 --\
6325 --id=@m create Mirror name=mymirror select_all=true output_port=@p3
6327 AT_DATA([flows.txt], [dnl
6328 in_port=1 actions=output:2
6330 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
6331 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)'])
6333 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)'])
6335 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
6336 recirc_id=0,ip,in_port=1,vlan_tci=0x0000,nw_frag=no, actions: <del>
6341 AT_SETUP([ofproto-dpif megaflow - mirroring, select_vlan])
6343 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
6344 ADD_OF_PORTS([br0], [1], [2], [3])
6346 set Bridge br0 mirrors=@m --\
6347 --id=@p2 get Port p2 -- --id=@p3 get Port p3 --\
6348 --id=@m create Mirror name=mymirror select_all=true select_vlan=11 output_port=@p3
6350 AT_DATA([flows.txt], [dnl
6351 in_port=1 actions=output:2
6353 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
6354 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))'])
6355 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)'])
6357 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
6358 recirc_id=0,ip,in_port=1,dl_vlan=11,nw_frag=no, actions: <del>
6359 recirc_id=0,ip,in_port=1,vlan_tci=0x0000/0x1fff,nw_frag=no, actions: <del>
6364 AT_SETUP([ofproto-dpif megaflow - move action])
6366 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
6367 ADD_OF_PORTS([br0], [1], [2])
6368 AT_DATA([flows.txt], [dnl
6369 table=0 in_port=1 ip,actions=move:NXM_OF_IP_SRC[[]]->NXM_NX_REG0[[]],resubmit(90)
6370 table=0 in_port=90 ip,actions=move:NXM_NX_REG0[[]]->NXM_NX_REG1[[]],resubmit(91)
6371 table=0 in_port=91 reg0=0x0a000002,actions=output(2)
6373 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
6374 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)'])
6375 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)'])
6377 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
6378 recirc_id=0,ip,in_port=1,vlan_tci=0x0000,nw_src=10.0.0.2,nw_frag=no, actions: <del>
6379 recirc_id=0,ip,in_port=1,vlan_tci=0x0000,nw_src=10.0.0.4,nw_frag=no, actions: <del>
6384 AT_SETUP([ofproto-dpif megaflow - push action])
6386 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
6387 ADD_OF_PORTS([br0], [1], [2])
6388 AT_DATA([flows.txt], [dnl
6389 table=0 in_port=1 ip,actions=push:NXM_OF_IP_SRC[[]],output(2)
6391 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
6392 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)'])
6393 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)'])
6395 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
6396 recirc_id=0,ip,in_port=1,vlan_tci=0x0000,nw_src=10.0.0.2,nw_frag=no, actions: <del>
6397 recirc_id=0,ip,in_port=1,vlan_tci=0x0000,nw_src=10.0.0.4,nw_frag=no, actions: <del>
6402 AT_SETUP([ofproto-dpif megaflow - learning])
6404 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
6405 ADD_OF_PORTS([br0], [1], [2])
6406 AT_DATA([flows.txt], [dnl
6407 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
6409 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
6410 ovs-appctl time/stop
6411 # We send each packet twice because the first packet in each flow causes the
6412 # flow table to change and thus revalidations, which (depending on timing)
6413 # can keep a megaflow from being installed. The revalidations are done by
6414 # the second iteration, allowing the flows to be installed.
6416 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)'])
6417 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)'])
6418 ovs-appctl time/warp 100
6421 dnl The original flow is missing due to a revalidation.
6422 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
6423 recirc_id=0,ip,in_port=1,vlan_tci=0x0000/0x1fff,dl_src=50:54:00:00:00:09,nw_frag=no, actions: <del>
6424 recirc_id=0,ip,in_port=1,vlan_tci=0x0000/0x1fff,dl_src=50:54:00:00:00:0b,nw_frag=no, actions: <del>
6429 AT_SETUP([ofproto-dpif megaflow - tunnels])
6431 [add-port br0 p1 -- set Interface p1 type=dummy ofport_request=1])
6432 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
6433 AT_CHECK([ovs-vsctl add-port br0 p2 -- set Interface p2 type=gre \
6434 options:remote_ip=1.1.1.1 ofport_request=2 options:key=flow])
6435 AT_CHECK([ovs-vsctl add-port br0 p3 -- set Interface p3 type=dummy \
6437 AT_CHECK([ovs-vsctl add-port br0 p4 -- set Interface p4 type=gre \
6438 options:remote_ip=1.1.1.2 options:tos=inherit options:ttl=inherit \
6439 ofport_request=4 options:key=flow])
6440 AT_DATA([flows.txt], [dnl
6441 in_port=1,actions=output(2)
6442 in_port=3,actions=output(4)
6444 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
6445 dnl ECN bits are always copied out, but don't use 0x3 (CE), since that
6446 dnl will cause the packet to be dropped.
6447 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)'])
6449 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)'])
6450 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)'])
6452 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)'])
6454 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
6455 recirc_id=0,ip,in_port=1,vlan_tci=0x0000,nw_ecn=1,nw_frag=no, actions: <del>
6456 recirc_id=0,ip,in_port=3,vlan_tci=0x0000,nw_tos=0,nw_ecn=1,nw_ttl=64,nw_frag=no, actions: <del>
6457 recirc_id=0,ip,in_port=3,vlan_tci=0x0000,nw_tos=252,nw_ecn=1,nw_ttl=128,nw_frag=no, actions: <del>
6462 AT_SETUP([ofproto-dpif megaflow - dec_ttl])
6464 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
6465 ADD_OF_PORTS([br0], [1], [2])
6466 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], [])
6467 AT_DATA([flows.txt], [dnl
6468 table=0 in_port=1,icmp,nw_src=10.0.0.4 actions=dec_ttl,output(2)
6470 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
6471 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)'])
6472 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)'])
6474 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
6475 recirc_id=0,icmp,in_port=1,vlan_tci=0x0000,nw_src=10.0.0.4,nw_ttl=64,nw_frag=no, actions: <del>
6476 recirc_id=0,ip,in_port=1,vlan_tci=0x0000,nw_src=10.0.0.2/0.0.0.2,nw_frag=no, actions: <del>
6481 AT_SETUP([ofproto-dpif megaflow - set dl_dst])
6483 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
6484 ADD_OF_PORTS([br0], [1], [2])
6485 AT_DATA([flows.txt], [dnl
6486 table=0 in_port=1 actions=mod_dl_dst(50:54:00:00:00:0a),output(2)
6488 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
6489 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)'])
6490 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)'])
6492 dnl The first packet is essentially a no-op, as the new destination MAC is the
6493 dnl same as the original. The second entry actually updates the destination
6495 AT_CHECK([cat ovs-vswitchd.log | STRIP_UFID | FILTER_FLOW_INSTALL | STRIP_USED], [0], [dnl
6496 recirc_id=0,ip,in_port=1,vlan_tci=0x0000,dl_dst=50:54:00:00:00:0a,nw_frag=no, actions:2
6497 recirc_id=0,ip,in_port=1,vlan_tci=0x0000,dl_dst=50:54:00:00:00:0c,nw_frag=no, actions:set(eth(dst=50:54:00:00:00:0a)),2
6502 AT_SETUP([ofproto-dpif megaflow - disabled])
6504 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
6505 ADD_OF_PORTS([br0], [1], [2])
6506 AT_DATA([flows.txt], [dnl
6507 table=0 in_port=1,ip,nw_dst=10.0.0.1 actions=output(2)
6508 table=0 in_port=1,ip,nw_dst=10.0.0.3 actions=drop
6510 AT_CHECK([ovs-appctl upcall/disable-megaflows], [0], [megaflows disabled
6512 AT_CHECK([ovs-appctl upcall/disable-ufid], [0], [Datapath dumping tersely using UFID disabled
6514 AT_CHECK([ovs-appctl vlog/set dpif_netdev:dbg], [0], [], [])
6515 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
6516 for i in 1 2 3 4; do
6517 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)'])
6518 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)'])
6519 if [[ $i -eq 1 ]]; then
6524 AT_CHECK([cat ovs-vswitchd.log | STRIP_UFID | FILTER_FLOW_INSTALL | STRIP_USED], [0], [dnl
6525 pkt_mark=0,recirc_id=0,dp_hash=0,skb_priority=0,ct_state=0,ct_zone=0,ct_mark=0,ct_label=0,icmp,in_port=1,vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,nw_src=10.0.0.2,nw_dst=10.0.0.1,nw_tos=0,nw_ecn=0,nw_ttl=64,icmp_type=8,icmp_code=0, actions:2
6526 pkt_mark=0,recirc_id=0,dp_hash=0,skb_priority=0,ct_state=0,ct_zone=0,ct_mark=0,ct_label=0,icmp,in_port=1,vlan_tci=0x0000,dl_src=50:54:00:00:00:0b,dl_dst=50:54:00:00:00:0c,nw_src=10.0.0.4,nw_dst=10.0.0.3,nw_tos=0,nw_ecn=0,nw_ttl=64,icmp_type=8,icmp_code=0, actions:drop
6528 AT_CHECK([cat ovs-vswitchd.log | STRIP_UFID | FILTER_FLOW_DUMP | grep 'packets:3'], [0], [dnl
6529 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
6530 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
6535 AT_SETUP([ofproto-dpif - datapath port number change])
6536 OVS_VSWITCHD_START([set Bridge br0 fail-mode=standalone])
6537 ADD_OF_PORTS([br0], 1)
6539 # Trace a flow that should output to p1.
6540 AT_CHECK([ovs-appctl ofproto/trace br0 in_port=LOCAL,dl_src=10:20:30:40:50:60],
6542 AT_CHECK([tail -1 stdout], [0], [Datapath actions: 1
6545 # Change p1's port number to 5.
6546 AT_CHECK([ovs-appctl dpif-dummy/change-port-number ovs-dummy p1 5])
6548 # Trace a flow that should output to p1 in its new location.
6549 AT_CHECK([ovs-appctl ofproto/trace br0 in_port=LOCAL,dl_src=10:20:30:40:50:60],
6551 AT_CHECK([tail -1 stdout], [0], [Datapath actions: 5
6556 # Tests the bundling with various bfd and cfm configurations.
6557 AT_SETUP([ofproto - bundle with variable bfd/cfm config])
6558 OVS_VSWITCHD_START([add-br br1 -- set bridge br1 datapath-type=dummy -- \
6559 add-bond br0 br0bond p0 p2 bond-mode=active-backup -- \
6560 add-bond br1 br1bond p1 p3 bond-mode=active-backup -- \
6561 set Interface p1 type=patch options:peer=p0 ofport_request=2 -- \
6562 set Interface p3 type=patch options:peer=p2 ofport_request=4 -- \
6563 set Interface p0 type=patch options:peer=p1 ofport_request=1 -- \
6564 set Interface p2 type=patch options:peer=p3 ofport_request=3 -- \
6565 set Interface p0 bfd:enable=true bfd:min_tx=300 bfd:min_rx=300 -- \
6566 set Interface p0 cfm_mpid=1 -- \
6567 set Interface p1 bfd:enable=true bfd:min_tx=500 bfd:min_rx=500])
6569 ovs-appctl time/stop
6570 # advance the clock to stablize everything.
6571 ovs-appctl time/warp 5000 100
6572 # cfm/show should show 'recv' fault.
6573 AT_CHECK([ovs-appctl cfm/show | sed -n '/^.*fault:.*/p'], [0], [dnl
6576 # bfd/show should show 'up'.
6577 AT_CHECK([ovs-appctl bfd/show | sed -n '/^.*Session State:.*/p'], [0], [dnl
6578 Local Session State: up
6579 Remote Session State: up
6580 Local Session State: up
6581 Remote Session State: up
6583 # bond/show should show 'may-enable: true' for all slaves.
6584 AT_CHECK([ovs-appctl bond/show | sed -n '/^.*may_enable:.*/p'], [0], [dnl
6591 # now disable the bfd on p1.
6592 AT_CHECK([ovs-vsctl set Interface p1 bfd:enable=false])
6593 # advance the clock to stablize everything.
6594 ovs-appctl time/warp 5000 100
6595 # cfm/show should show 'recv' fault.
6596 AT_CHECK([ovs-appctl cfm/show | sed -n '/^.*fault:.*/p'], [0], [dnl
6599 # bfd/show should show 'down'.
6600 AT_CHECK([ovs-appctl bfd/show | sed -n '/^.*Session State:.*/p'], [0], [dnl
6601 Local Session State: down
6602 Remote Session State: down
6604 # bond/show should show 'may-enable: false' for p0.
6605 AT_CHECK([ovs-appctl bond/show br0bond | sed -n '/^.*may_enable:.*/p'], [0], [dnl
6610 # now enable the bfd on p1 and disable bfd on p0.
6611 AT_CHECK([ovs-vsctl set Interface p1 bfd:enable=true])
6612 AT_CHECK([ovs-vsctl set Interface p0 bfd:enable=false])
6613 # advance the clock to stablize everything.
6614 ovs-appctl time/warp 5000 100
6615 # cfm/show should show 'recv' fault.
6616 AT_CHECK([ovs-appctl cfm/show | sed -n '/^.*fault:.*/p'], [0], [dnl
6619 # bfd/show should show 'down'.
6620 AT_CHECK([ovs-appctl bfd/show | sed -n '/^.*Session State:.*/p'], [0], [dnl
6621 Local Session State: down
6622 Remote Session State: down
6624 # bond/show should show 'may-enable: false' for p0 and p1.
6625 AT_CHECK([ovs-appctl bond/show | sed -n '/^.*may_enable:.*/p'], [0], [dnl
6635 AT_SETUP([ofproto-dpif - ofproto-dpif-monitor 1])
6636 OVS_VSWITCHD_START([add-port br0 p0 -- set interface p0 type=gre options:remote_ip=1.2.3.4])
6639 AT_CHECK([ovs-vsctl set interface p0 bfd:enable=true])
6641 OVS_WAIT_UNTIL([grep "monitor thread created" ovs-vswitchd.log])
6642 # disable bfd on p0.
6643 AT_CHECK([ovs-vsctl set interface p0 bfd:enable=false])
6645 OVS_WAIT_UNTIL([grep "monitor thread terminated" ovs-vswitchd.log])
6646 AT_CHECK([cat ovs-vswitchd.log | sed -e '/^.*ofproto_dpif_monitor.*$/d' > ovs-vswitchd.log])
6649 AT_CHECK([ovs-vsctl set interface p0 cfm_mpid=10])
6651 OVS_WAIT_UNTIL([grep "monitor thread created" ovs-vswitchd.log])
6652 # disable cfm on p0.
6653 AT_CHECK([ovs-vsctl remove interface p0 cfm_mpid 10])
6655 OVS_WAIT_UNTIL([grep "monitor thread terminated" ovs-vswitchd.log])
6656 AT_CHECK([cat ovs-vswitchd.log | sed -e '/^.*ofproto_dpif_monitor.*$/d' > ovs-vswitchd.log])
6658 # enable both bfd and cfm on p0.
6659 AT_CHECK([ovs-vsctl set interface p0 bfd:enable=true cfm_mpid=10])
6661 OVS_WAIT_UNTIL([grep "monitor thread created" ovs-vswitchd.log])
6662 # disable bfd on p0.
6663 AT_CHECK([ovs-vsctl set interface p0 bfd:enable=false])
6664 # check log, there should not be the log of thread terminated.
6665 AT_CHECK([sed -n "s/^.*|ofproto_dpif_monitor(monitor[[0-9]]*)|INFO|\(.* terminated\)$/\1/p" ovs-vswitchd.log], [0], [dnl
6667 # reenable bfd on p0.
6668 AT_CHECK([ovs-vsctl set interface p0 bfd:enable=true])
6669 # check log, should still be on log of thread created.
6670 AT_CHECK([sed -n "s/^.*|ofproto_dpif_monitor(monitor[[0-9]]*)|INFO|\(.* created\)$/\1/p" ovs-vswitchd.log], [0], [dnl
6671 monitor thread created
6673 # disable bfd and cfm together.
6674 AT_CHECK([ovs-vsctl set interface p0 bfd:enable=false -- remove interface p0 cfm_mpid 10])
6676 OVS_WAIT_UNTIL([grep "monitor thread terminated" ovs-vswitchd.log])
6681 # this test helps avoid the deadlock between the main thread and monitor thread.
6682 AT_SETUP([ofproto-dpif - ofproto-dpif-monitor 2])
6685 for i in `seq 1 199`
6687 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])
6693 AT_BANNER([ofproto-dpif - flow translation resource limits])
6695 AT_SETUP([ofproto-dpif - infinite resubmit])
6697 AT_CHECK([ovs-ofctl add-flow br0 actions=resubmit:1,resubmit:2,output:3])
6698 AT_CHECK([ovs-appctl -vpoll_loop:off ofproto/trace br0 'eth_dst=ff:ff:ff:ff:ff:ff'],
6700 AT_CHECK([tail -1 stdout], [0],
6701 [Translation failed (Recursion too deep), packet is dropped.
6703 AT_CHECK([grep -c 'resubmit actions recursed over 64 times' stdout],
6706 OVS_VSWITCHD_STOP(["/resubmit actions recursed/d"])
6709 AT_SETUP([ofproto-dpif - exponential resubmit chain])
6711 ADD_OF_PORTS([br0], 1)
6712 (for i in `seq 1 64`; do
6714 echo "in_port=$i, actions=resubmit:$j, resubmit:$j, local"
6716 echo "in_port=65, actions=local") > flows
6717 AT_CHECK([ovs-ofctl add-flows br0 flows])
6718 AT_CHECK([ovs-appctl -vpoll_loop:off ofproto/trace br0 'in_port=1'], [0], [stdout])
6719 AT_CHECK([tail -1 stdout], [0],
6720 [Translation failed (Too many resubmits), packet is dropped.
6722 AT_CHECK([grep -c 'over 4096 resubmit actions' stdout], [0], [1
6724 OVS_VSWITCHD_STOP(["/over.*resubmit actions/d"])
6727 AT_SETUP([ofproto-dpif - too many output actions])
6729 ADD_OF_PORTS([br0], 1)
6730 (for i in `seq 1 12`; do
6732 echo "in_port=$i, actions=resubmit:$j, resubmit:$j, local"
6734 echo "in_port=13, actions=local,local,local,local,local,local,local,local") > flows
6735 AT_CHECK([ovs-ofctl add-flows br0 flows])
6736 AT_CHECK([ovs-appctl -vpoll_loop:off ofproto/trace br0 'in_port=1'], [0], [stdout])
6737 AT_CHECK([grep -c -e '- Uses action(s) not supported by datapath' stdout],
6740 AT_CHECK([grep -c 'resubmits yielded over 64 kB of actions' stdout], [0], [1
6742 OVS_VSWITCHD_STOP(["/resubmits yielded over 64 kB of actions/d"])
6745 AT_SETUP([ofproto-dpif - stack too deep])
6747 ADD_OF_PORTS([br0], 1)
6748 (for i in `seq 1 12`; do
6750 echo "in_port=$i, actions=resubmit:$j, resubmit:$j, local"
6752 push="push:NXM_NX_REG0[[]]"
6753 echo "in_port=13, actions=$push,$push,$push,$push,$push,$push,$push,$push") > flows
6754 AT_CHECK([ovs-ofctl add-flows br0 flows])
6755 AT_CHECK([ovs-appctl -vpoll_loop:off ofproto/trace br0 'in_port=1'], [0], [stdout])
6756 AT_CHECK([tail -1 stdout], [0],
6757 [Translation failed (Stack too deep), packet is dropped.
6759 AT_CHECK([grep -c 'resubmits yielded over 64 kB of stack' stdout], [0], [1
6761 OVS_VSWITCHD_STOP(["/resubmits yielded over 64 kB of stack/d"])
6765 AT_SETUP([ofproto-dpif packet-out controller])
6767 ADD_OF_PORTS([br0], 1, 2)
6769 AT_CHECK([ovs-ofctl add-flow br0 'dl_dst=50:54:00:00:00:0a actions=controller'])
6771 AT_CAPTURE_FILE([ofctl_monitor.log])
6772 AT_CHECK([ovs-ofctl monitor br0 65534 invalid_ttl --detach --no-chdir --pidfile 2> ofctl_monitor.log])
6775 AT_CHECK([ovs-ofctl -O OpenFlow13 packet-out br0 CONTROLLER controller '50540000000a5054000000091234'])
6778 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
6779 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
6780 NXT_PACKET_IN (xid=0x0): total_len=14 in_port=CONTROLLER (via action) data_len=14 (unbuffered)
6781 vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,dl_type=0x1234
6783 NXT_PACKET_IN (xid=0x0): total_len=14 in_port=CONTROLLER (via action) data_len=14 (unbuffered)
6784 vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,dl_type=0x1234
6786 NXT_PACKET_IN (xid=0x0): total_len=14 in_port=CONTROLLER (via action) data_len=14 (unbuffered)
6787 vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,dl_type=0x1234
6790 AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
6791 dl_dst=50:54:00:00:00:0a actions=CONTROLLER:65535
6795 (echo "OFPST_TABLE reply (OF1.3) (xid=0x2):
6797 active=1, lookup=0, matched=0
6800 active=0, lookup=0, matched=0
6802 for i in `seq 2 253`; do
6803 printf ' table %d: ditto\n' $i
6805 AT_CHECK([ovs-ofctl -O OpenFlow13 dump-tables br0 ], [0], [expout])
6810 AT_SETUP([ofproto-dpif packet-out controller (patch port)])
6813 add-port br0 p1 -- \
6814 set interface p1 type=patch options:peer=p2 -- \
6816 set bridge br1 datapath-type=dummy -- \
6817 set bridge br1 fail-mode=secure -- \
6818 set bridge br1 protocols='[OpenFlow10,OpenFlow11,OpenFlow12,OpenFlow13]' -- \
6819 add-port br1 p2 -- \
6820 set interface p2 type=patch options:peer=p1 --])
6822 AT_CAPTURE_FILE([ofctl_monitor.log])
6823 AT_CHECK([ovs-ofctl monitor br1 65534 invalid_ttl --detach --no-chdir --pidfile 2> ofctl_monitor.log])
6826 AT_CHECK([ovs-ofctl -O OpenFlow13 packet-out br0 CONTROLLER output:1 '50540000000a5054000000091234'])
6829 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
6830 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
6831 NXT_PACKET_IN (xid=0x0): cookie=0x0 total_len=14 in_port=1 (via no_match) data_len=14 (unbuffered)
6832 vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,dl_type=0x1234
6834 NXT_PACKET_IN (xid=0x0): cookie=0x0 total_len=14 in_port=1 (via no_match) data_len=14 (unbuffered)
6835 vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,dl_type=0x1234
6837 NXT_PACKET_IN (xid=0x0): cookie=0x0 total_len=14 in_port=1 (via no_match) data_len=14 (unbuffered)
6838 vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,dl_type=0x1234
6841 (echo "OFPST_TABLE reply (OF1.3) (xid=0x2):
6843 active=0, lookup=0, matched=0
6845 for i in `seq 1 253`; do
6846 printf ' table %d: ditto\n' $i
6848 AT_CHECK([ovs-ofctl -O OpenFlow13 dump-tables br0 ], [0], [expout])
6850 (echo "OFPST_TABLE reply (OF1.3) (xid=0x2):
6852 active=0, lookup=3, matched=0
6855 active=0, lookup=0, matched=0
6857 for i in `seq 2 253`; do
6858 printf ' table %d: ditto\n' $i
6860 AT_CHECK([ovs-ofctl -O OpenFlow13 dump-tables br1 ], [0], [expout])
6866 AT_SETUP([ofproto-dpif packet-out goto_table])
6868 ADD_OF_PORTS([br0], 1, 2)
6870 AT_DATA([flows.txt], [dnl
6871 table=0 dl_dst=50:54:00:00:00:0a actions=goto_table(1)
6872 table=1 dl_dst=50:54:00:00:00:0a actions=controller
6874 AT_CHECK([ovs-ofctl -O OpenFlow13 add-flows br0 flows.txt])
6876 AT_CAPTURE_FILE([ofctl_monitor.log])
6877 AT_CHECK([ovs-ofctl monitor br0 65534 invalid_ttl --detach --no-chdir --pidfile 2> ofctl_monitor.log])
6880 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)'
6883 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
6884 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
6885 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
6886 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
6887 vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,dl_type=0x1234
6889 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
6890 vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,dl_type=0x1234
6892 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
6893 vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,dl_type=0x1234
6896 AT_CHECK([ovs-appctl revalidator/purge], [0])
6897 AT_CHECK([ovs-ofctl -O OpenFlow13 dump-flows br0 | ofctl_strip | sort], [0], [dnl
6898 n_packets=3, n_bytes=180, dl_dst=50:54:00:00:00:0a actions=goto_table:1
6899 table=1, n_packets=3, n_bytes=180, dl_dst=50:54:00:00:00:0a actions=CONTROLLER:65535
6900 OFPST_FLOW reply (OF1.3):
6903 (echo "OFPST_TABLE reply (OF1.3) (xid=0x2):
6905 active=1, lookup=3, matched=3
6909 active=0, lookup=0, matched=0
6911 for i in `seq 3 253`; do
6912 printf ' table %d: ditto\n' $i
6914 AT_CHECK([ovs-ofctl -O OpenFlow13 dump-tables br0 ], [0], [expout])
6920 AT_SETUP([ofproto-dpif packet-out table-miss (continue)])
6922 ADD_OF_PORTS([br0], 1, 2)
6924 AT_CHECK([ovs-ofctl -O OpenFlow11 add-flow br0 'table=1 dl_dst=50:54:00:00:00:0a actions=controller'])
6925 AT_CHECK([ovs-ofctl -O OpenFlow11 mod-table br0 all continue])
6927 AT_CAPTURE_FILE([ofctl_monitor.log])
6928 AT_CHECK([ovs-ofctl monitor br0 65534 invalid_ttl --detach --no-chdir --pidfile 2> ofctl_monitor.log])
6931 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)'
6934 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
6935 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
6936 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
6937 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
6938 vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,dl_type=0x1234
6940 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
6941 vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,dl_type=0x1234
6943 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
6944 vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,dl_type=0x1234
6947 AT_CHECK([ovs-appctl revalidator/purge], [0])
6948 AT_CHECK([ovs-ofctl -O OpenFlow11 dump-flows br0 | ofctl_strip | sort], [0], [dnl
6949 table=1, n_packets=3, n_bytes=180, dl_dst=50:54:00:00:00:0a actions=CONTROLLER:65535
6950 OFPST_FLOW reply (OF1.1):
6953 (echo "OFPST_TABLE reply (OF1.3) (xid=0x2):
6955 active=0, lookup=3, matched=0
6958 active=1, lookup=3, matched=3
6961 active=0, lookup=0, matched=0
6963 for i in `seq 3 253`; do
6964 printf ' table %d: ditto\n' $i
6966 AT_CHECK([ovs-ofctl -O OpenFlow13 dump-tables br0 ], [0], [expout])
6971 AT_SETUP([ofproto-dpif - ICMPv6])
6973 ADD_OF_PORTS([br0], 1)
6975 AT_CAPTURE_FILE([ofctl_monitor.log])
6977 AT_CHECK([ovs-ofctl monitor br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
6979 ovs-appctl netdev-dummy/receive p1 '0060970769ea0000860580da86dd6000000000203afffe80000000000000020086fffe0580dafe80000000000000026097fffe0769ea870068bd00000000fe80000000000000026097fffe0769ea01010000860580da'
6981 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
6983 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
6984 NXT_PACKET_IN (xid=0x0): cookie=0x0 total_len=86 in_port=1 (via no_match) data_len=86 (unbuffered)
6985 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
6991 AT_SETUP([ofproto-dpif - Neighbor Discovery set-field with checksum update])
6993 ADD_OF_PORTS([br0], 1)
6994 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])
6996 AT_CAPTURE_FILE([ofctl_monitor.log])
6998 AT_CHECK([ovs-ofctl monitor br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
7000 ovs-appctl netdev-dummy/receive p1 '0060970769ea0000860580da86dd6000000000203afffe80000000000000020086fffe0580dafe80000000000000026097fffe0769ea870068bd00000000fe80000000000000026097fffe0769ea01010000860580da'
7002 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
7004 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
7005 NXT_PACKET_IN (xid=0x0): cookie=0x0 total_len=86 in_port=1 (via action) data_len=86 (unbuffered)
7006 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
7012 # Tests the exact match of CFI bit in installed datapath flows matching VLAN.
7013 AT_SETUP([ofproto-dpif - vlan matching])
7015 [add-port br0 p0 -- set Interface p0 type=dummy ofport_request=1])
7016 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
7018 AT_CHECK([ovs-ofctl del-flows br0])
7019 AT_CHECK([ovs-ofctl add-flow br0 "vlan_tci=0x000a/0x0fff,action=output:local"])
7021 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))'])
7023 AT_CHECK([cat ovs-vswitchd.log | grep 'in_port=[[1]]' | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
7024 recirc_id=0,ip,in_port=1,dl_vlan=10,nw_frag=no, actions: <del>
7029 # Tests in place modification of installed datapath flows.
7030 AT_SETUP([ofproto-dpif - in place modification])
7032 [add-port br0 p1 -- set Interface p1 type=dummy ofport_request=1])
7033 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
7035 AT_CHECK([ovs-ofctl del-flows br0])
7036 AT_CHECK([ovs-ofctl add-flow br0 in_port=1,actions=mod_vlan_vid:3,output:local])
7038 ovs-appctl vlog/set PATTERN:ANY:'%c|%p|%m'
7040 ovs-appctl time/stop
7043 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)'
7046 AT_CHECK([ovs-appctl dpif/dump-flows br0 | STRIP_UFID | STRIP_USED | sort], [0], [dnl
7047 recirc_id(0),in_port(1),eth_type(0x1234), packets:2, bytes:120, used:0.0s, actions:push_vlan(vid=3,pcp=0),100
7050 AT_CHECK([ovs-ofctl add-flow br0 priority=60000,in_port=1,actions=mod_vlan_vid:4,output:local])
7052 ovs-appctl time/warp 500
7053 ovs-appctl time/warp 500
7056 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)'
7059 AT_CHECK([ovs-appctl dpif/dump-flows br0 | STRIP_UFID | STRIP_USED | sort], [0], [dnl
7060 recirc_id(0),in_port(1),eth_type(0x1234), packets:5, bytes:300, used:0.0s, actions:push_vlan(vid=4,pcp=0),100
7063 AT_CHECK([cat ovs-vswitchd.log | grep 'modify' | STRIP_UFID ], [0], [dnl
7064 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
7069 # Tests in place modification of installed datapath flows with vlans.
7070 AT_SETUP([ofproto-dpif - in place modification (vlan)])
7072 [add-port br0 p1 -- set Interface p1 type=dummy ofport_request=1])
7073 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
7075 AT_CHECK([ovs-ofctl del-flows br0])
7076 AT_CHECK([ovs-ofctl add-flow br0 in_port=1,actions=output:local])
7078 ovs-appctl vlog/set PATTERN:ANY:'%c|%p|%m'
7080 ovs-appctl time/stop
7082 # Check that a correct datapath flow is created.
7084 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)'
7087 AT_CHECK([ovs-appctl dpif/dump-flows br0 | STRIP_UFID | STRIP_USED | sort], [0], [dnl
7088 recirc_id(0),in_port(1),eth_type(0x1234), packets:2, bytes:120, used:0.0s, actions:100
7091 # Delete the flow. Then check that the datapath flow is modified to
7092 # drop the packets. A modified flow inherits the stats, a new
7093 # datapath flow would start from sero.
7094 AT_CHECK([ovs-ofctl del-flows br0])
7096 ovs-appctl time/warp 500
7097 ovs-appctl time/warp 500
7100 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)'
7103 AT_CHECK([ovs-appctl dpif/dump-flows br0 | STRIP_UFID | STRIP_USED | sort], [0], [dnl
7104 recirc_id(0),in_port(1),eth_type(0x1234), packets:5, bytes:300, used:0.0s, actions:drop
7107 # Add a flow that matches the non-presence of a vlan tag, and check
7108 # that the datapath flow is modified accordingly.
7109 AT_CHECK([ovs-ofctl add-flow br0 in_port=1,vlan_tci=0x0000/0x1fff,actions=output:local])
7111 ovs-appctl time/warp 500
7112 ovs-appctl time/warp 500
7115 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)'
7118 AT_CHECK([ovs-appctl dpif/dump-flows br0 | STRIP_UFID | STRIP_USED | sort], [0], [dnl
7119 recirc_id(0),in_port(1),eth_type(0x1234), packets:8, bytes:480, used:0.0s, actions:100
7122 # Check that VLAN packets will not hit the same datapath megaflow.
7124 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))'
7127 AT_CHECK([ovs-appctl dpif/dump-flows br0 | STRIP_UFID | STRIP_USED | sort], [0], [dnl
7128 recirc_id(0),in_port(1),eth_type(0x1234), packets:8, bytes:480, used:0.0s, actions:100
7129 recirc_id(0),in_port(1),eth_type(0x8100),vlan(vid=99/0x0,pcp=7/0x0),encap(eth_type(0x1234)), packets:2, bytes:120, used:0.0s, actions:drop
7132 # Check that the new flow matches the CFI bit, while both vid and pcp
7134 AT_CHECK([cat ovs-vswitchd.log | grep '\(modify\)\|\(flow_add\)' | STRIP_UFID ], [0], [dnl
7135 dpif_netdev|DBG|flow_add: recirc_id=0,in_port=1,vlan_tci=0x0000,dl_type=0x1234, actions:100
7136 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)
7137 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
7138 dpif_netdev|DBG|flow_add: recirc_id=0,in_port=1,vlan_tci=0xf063/0x1000,dl_type=0x1234, actions:drop