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=1,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=1,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-group br0 'group_id=5,type=all,bucket=output:1'])
653 AT_CHECK([ovs-ofctl -O OpenFlow13 add-flows br0 flows.txt])
654 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])
655 AT_CHECK([tail -1 stdout], [0], [Datapath actions: 4,6,8,10,12,2
659 AT_SETUP([ofproto-dpif - push-pop])
661 ADD_OF_PORTS([br0], [20], [21], [22], [33], [90])
662 AT_DATA([flows.txt], [dnl
663 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
664 in_port=2 actions=pop:NXM_NX_REG0[[0..7]],output:NXM_NX_REG0[[]]
665 in_port=3 actions=pop:NXM_NX_REG1[[0..7]],output:NXM_NX_REG1[[]]
666 in_port=4 actions=pop:NXM_NX_REG2[[0..15]],output:NXM_NX_REG2[[]]
667 in_port=5 actions=pop:NXM_NX_REG3[[]],output:NXM_NX_REG3[[]]
670 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
671 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])
672 AT_CHECK([tail -1 stdout], [0],
673 [Datapath actions: 33,22,21,20
678 AT_SETUP([ofproto-dpif - output])
680 ADD_OF_PORTS([br0], [1], [9], [10], [11], [55], [66], [77], [88])
681 AT_DATA([flows.txt], [dnl
682 in_port=1 actions=resubmit:2,resubmit:3,resubmit:4,resubmit:5,resubmit:6,resubmit:7,resubmit:8
683 in_port=2 actions=output:9
684 in_port=3 actions=load:55->NXM_NX_REG0[[]],output:NXM_NX_REG0[[]],load:66->NXM_NX_REG1[[]]
685 in_port=4 actions=output:10,output:NXM_NX_REG0[[]],output:NXM_NX_REG1[[]],output:11
686 in_port=5 actions=load:77->NXM_NX_REG0[[0..15]],load:88->NXM_NX_REG0[[16..31]]
687 in_port=6 actions=output:NXM_NX_REG0[[0..15]],output:NXM_NX_REG0[[16..31]]
688 in_port=7 actions=load:0x110000ff->NXM_NX_REG0[[]],output:NXM_NX_REG0[[]]
689 in_port=8 actions=1,9,load:9->NXM_OF_IN_PORT[[]],1,9
691 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
692 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])
693 AT_CHECK([tail -1 stdout], [0],
694 [Datapath actions: 9,55,10,55,66,11,77,88,9,1
699 AT_SETUP([ofproto-dpif - dec_ttl])
701 ADD_OF_PORTS([br0], [1], [2], [3], [4])
702 AT_DATA([flows.txt], [dnl
703 table=0 in_port=1 action=dec_ttl,output:2,resubmit(1,1),output:4
704 table=1 in_port=1 action=dec_ttl,output:3
706 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
707 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])
708 AT_CHECK([tail -4 stdout], [0],
709 [Megaflow: recirc_id=0,ip,in_port=1,nw_ttl=2,nw_frag=no
710 Datapath actions: set(ipv4(ttl=1)),2,4
711 This flow is handled by the userspace slow path because it:
712 - Sends "packet-in" messages to the OpenFlow controller.
714 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])
715 AT_CHECK([tail -2 stdout], [0],
716 [Megaflow: recirc_id=0,ip,in_port=1,nw_ttl=3,nw_frag=no
717 Datapath actions: set(ipv4(ttl=2)),2,set(ipv4(ttl=1)),3,4
719 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])
720 AT_CHECK([tail -2 stdout], [0],
721 [Megaflow: recirc_id=0,ipv6,in_port=1,nw_ttl=128,nw_frag=no
722 Datapath actions: set(ipv6(hlimit=127)),2,set(ipv6(hlimit=126)),3,4
725 AT_CAPTURE_FILE([ofctl_monitor.log])
726 AT_CHECK([ovs-ofctl monitor br0 65534 invalid_ttl --detach --no-chdir --pidfile 2> ofctl_monitor.log])
727 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])
728 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
729 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
730 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=34 in_port=1 (via invalid_ttl) data_len=34 (unbuffered)
731 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
736 dnl A dec_ttl action at offset 32 in ofpacts will cause the ofpacts
737 dnl buffer to be resized just before pushing the id of the dec_ttl action.
738 dnl Thus the implementation must account for this by using the
739 dnl reallocated buffer rather than the original buffer.
741 dnl A number of similar rules are added to try and exercise
742 dnl xrealloc sufficiently that it returns a different base pointer
743 AT_SETUP([ofproto-dpif - dec_ttl without arguments at offset 32 in ofpacts])
745 ADD_OF_PORTS([br0], [1])
746 (for i in `seq 0 255`; do
747 printf "dl_src=10:11:11:11:11:%02x actions=output:1,output:1,output:1,dec_ttl,controller\n" $i
749 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
753 dnl A dec_ttl action at offset 32 in ofpacts will cause the ofpacts
754 dnl buffer to be resized just before pushing the id of the dec_ttl action.
755 dnl Thus the implementation must account for this by using the
756 dnl reallocated buffer rather than the original buffer.
758 dnl A number of similar rules are added to try and exercise
759 dnl xrealloc sufficiently that it returns a different base pointer
760 AT_SETUP([ofproto-dpif - dec_ttl with arguments at offset 32 in ofpacts])
762 ADD_OF_PORTS([br0], [1])
763 (for i in `seq 0 255`; do
764 printf "dl_src=10:11:11:11:11:%02x actions=output:1,output:1,output:1,dec_ttl(1),controller\n" $i
766 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
770 dnl A note action at offset 24 in ofpacts will cause the ofpacts
771 dnl buffer to be resized just before pushing the id of the dec_ttl action.
772 dnl Thus the implementation must account for this by using the
773 dnl reallocated buffer rather than the original buffer.
775 dnl A number of similar rules are added to try and exercise
776 dnl xrealloc sufficiently that it returns a different base pointer
777 AT_SETUP([ofproto-dpif - note at offset 24 in ofpacts])
779 ADD_OF_PORTS([br0], [1])
780 (for i in `seq 0 255`; do
781 printf "dl_src=10:11:11:11:11:%02x actions=output:1,output:1,note:ff,controller\n" $i
783 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
787 AT_SETUP([ofproto-dpif - output, OFPP_NONE ingress port])
789 ADD_OF_PORTS([br0], [1], [2])
791 AT_CHECK([ovs-ofctl add-flow br0 action=normal])
793 # "in_port" defaults to OFPP_NONE if it's not specified.
794 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"
795 AT_CHECK([ovs-appctl ofproto/trace br0 "$flow"], [0], [stdout])
796 AT_CHECK([tail -1 stdout | sed 's/Datapath actions: //' | tr "," "\n" | sort -n], [0], [dnl
805 AT_SETUP([ofproto-dpif - DSCP])
806 OVS_VSWITCHD_START([add-port br0 p1 -- set Interface p1 type=dummy])
807 ADD_OF_PORTS([br0], [9])
808 AT_DATA([flows.txt], [dnl
809 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
811 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
812 AT_CHECK([ovs-vsctl -- \
813 set Port p1 qos=@newqos --\
814 --id=@newqos create QoS type=linux-htb queues=1=@q1,2=@q2 --\
815 --id=@q1 create Queue dscp=1 --\
816 --id=@q2 create Queue dscp=2], [0], [ignore])
817 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])
818 AT_CHECK([tail -2 stdout], [0],
819 [Megaflow: recirc_id=0,skb_priority=0,ip,in_port=9,nw_tos=252,nw_frag=no
820 Datapath actions: dnl
822 set(ipv4(tos=0x4/0xfc)),set(skb_priority(0x1)),1,dnl
823 set(ipv4(tos=0x8/0xfc)),set(skb_priority(0x2)),1,dnl
825 set(ipv4(tos=0x4/0xfc)),set(skb_priority(0x1)),1,dnl
826 set(ipv4(tos=0xfc/0xfc)),set(skb_priority(0)),1,dnl
827 set(ipv4(tos=0/0xfc)),1,100
832 AT_SETUP([ofproto-dpif - output/flood flags])
834 ADD_OF_PORTS([br0], [1], [2], [3], [4], [5], [6], [7])
836 AT_DATA([flows.txt], [dnl
837 in_port=local actions=local,flood
838 in_port=1 actions=flood
839 in_port=2 actions=all
840 in_port=3 actions=output:LOCAL,output:1,output:2,output:3,output:4,output:5,output:6,output:7
841 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
843 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
844 AT_CHECK([ovs-ofctl mod-port br0 5 noforward])
845 AT_CHECK([ovs-ofctl mod-port br0 6 noflood])
847 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])
848 AT_CHECK([tail -1 stdout \
849 | sed -e 's/Datapath actions: //' | tr ',' '\n' | sort], [0], [dnl
857 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])
858 AT_CHECK([tail -1 stdout \
859 | sed -e 's/Datapath actions: //' | tr ',' '\n' | sort], [0], [dnl
867 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])
868 AT_CHECK([tail -1 stdout \
869 | sed -e 's/Datapath actions: //' | tr ',' '\n' | sort], [0], [dnl
878 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])
879 AT_CHECK([tail -1 stdout], [0],
880 [Datapath actions: 100,1,2,4,6,7
883 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])
884 AT_CHECK([tail -1 stdout], [0],
885 [Datapath actions: set(skb_priority(0x1)),100,1,2,set(skb_priority(0x2)),3,set(skb_priority(0x1)),6,7
890 AT_SETUP([ofproto-dpif - Default Table Miss - OF1.0 (OFPTC_TABLE_MISS_CONTROLLER)])
891 OVS_VSWITCHD_START([dnl
892 add-port br0 p1 -- set Interface p1 type=dummy
894 on_exit 'kill `cat ovs-ofctl.pid`'
896 AT_CAPTURE_FILE([ofctl_monitor.log])
898 AT_CHECK([ovs-ofctl monitor br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
901 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)'
903 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
904 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
905 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
906 NXT_PACKET_IN (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
907 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
909 NXT_PACKET_IN (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
910 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
912 NXT_PACKET_IN (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
913 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
916 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
917 AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
924 AT_SETUP([ofproto-dpif - Default Table Miss - OF1.3 (OFPTC_TABLE_MISS_DROP)])
925 OVS_VSWITCHD_START([dnl
926 add-port br0 p1 -- set Interface p1 type=dummy
928 on_exit 'kill `cat ovs-ofctl.pid`'
930 AT_CAPTURE_FILE([ofctl_monitor.log])
931 AT_CHECK([ovs-ofctl del-flows br0])
933 AT_CHECK([ovs-ofctl monitor -OOpenFlow13 -P openflow10 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
935 dnl Test that missed packets are droped
937 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)'
939 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
941 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
944 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
945 AT_CHECK([ovs-ofctl -OOpenFlow13 dump-flows br0 | ofctl_strip | sort], [0], [dnl
946 OFPST_FLOW reply (OF1.3):
952 AT_SETUP([ofproto-dpif - Table Miss - goto table and OFPTC_TABLE_MISS_CONTROLLER])
953 OVS_VSWITCHD_START([dnl
954 add-port br0 p1 -- set Interface p1 type=dummy
956 on_exit 'kill `cat ovs-ofctl.pid`'
958 AT_CAPTURE_FILE([ofctl_monitor.log])
959 AT_CHECK([ovs-ofctl -OOpenFlow12 add-flow br0 'table=0 actions=goto_table(1)'])
961 AT_CHECK([ovs-ofctl monitor -P openflow10 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
964 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)'
966 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
967 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
968 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
969 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
970 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
972 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
973 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
975 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
976 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
979 AT_CHECK([ovs-appctl revalidator/purge], [0])
980 AT_CHECK([ovs-ofctl -OOpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
981 n_packets=3, n_bytes=180, actions=goto_table:1
982 OFPST_FLOW reply (OF1.2):
988 AT_SETUP([ofproto-dpif - Table Miss - resubmit and OFPTC_TABLE_MISS_CONTROLLER])
989 OVS_VSWITCHD_START([dnl
990 add-port br0 p1 -- set Interface p1 type=dummy
992 on_exit 'kill `cat ovs-ofctl.pid`'
994 AT_CAPTURE_FILE([ofctl_monitor.log])
995 AT_CHECK([ovs-ofctl -OOpenFlow12 add-flow br0 'table=0 actions=resubmit(1,1)'])
997 AT_CHECK([ovs-ofctl monitor -P openflow10 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1000 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)'
1003 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
1004 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1007 AT_CHECK([ovs-appctl revalidator/purge], [0])
1008 AT_CHECK([ovs-ofctl -OOpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
1009 n_packets=3, n_bytes=180, actions=resubmit(1,1)
1010 OFPST_FLOW reply (OF1.2):
1016 AT_SETUP([ofproto-dpif - Table Miss - OFPTC_TABLE_MISS_CONTINUE])
1017 OVS_VSWITCHD_START([dnl
1018 add-port br0 p1 -- set Interface p1 type=dummy
1020 on_exit 'kill `cat ovs-ofctl.pid`'
1022 AT_CAPTURE_FILE([ofctl_monitor.log])
1023 AT_CHECK([ovs-ofctl add-flow br0 'table=1 dl_src=10:11:11:11:11:11 actions=controller'])
1024 AT_CHECK([ovs-ofctl -OOpenFlow11 mod-table br0 all continue])
1026 dnl Miss table 0, Hit table 1
1027 AT_CHECK([ovs-ofctl monitor br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1030 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)'
1032 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1033 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
1035 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1036 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1037 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
1039 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1040 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
1042 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1043 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
1046 dnl Hit table 0, Miss all other tables, sent to controller
1047 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1050 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)'
1052 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1053 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
1055 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1056 NXT_PACKET_IN (xid=0x0): table_id=253 cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
1057 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
1059 NXT_PACKET_IN (xid=0x0): table_id=253 cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
1060 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
1062 NXT_PACKET_IN (xid=0x0): table_id=253 cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
1063 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
1066 AT_CHECK([ovs-appctl revalidator/purge], [0])
1067 AT_CHECK([ovs-ofctl -OOpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
1068 table=1, n_packets=3, n_bytes=180, dl_src=10:11:11:11:11:11 actions=CONTROLLER:65535
1069 OFPST_FLOW reply (OF1.2):
1075 AT_SETUP([ofproto-dpif - Table Miss - goto table and OFPTC_TABLE_MISS_CONTINUE])
1076 OVS_VSWITCHD_START([dnl
1077 add-port br0 p1 -- set Interface p1 type=dummy
1079 on_exit 'kill `cat ovs-ofctl.pid`'
1081 AT_CAPTURE_FILE([ofctl_monitor.log])
1082 AT_DATA([flows.txt], [dnl
1083 table=0 actions=goto_table(1)
1084 table=2 dl_src=10:11:11:11:11:11 actions=controller
1086 AT_CHECK([ovs-ofctl -OOpenFlow12 add-flows br0 flows.txt])
1087 AT_CHECK([ovs-ofctl -OOpenFlow11 mod-table br0 all continue])
1089 dnl Hit table 0, Miss table 1, Hit table 2
1090 AT_CHECK([ovs-ofctl monitor br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1093 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)'
1095 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1096 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1098 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1099 NXT_PACKET_IN (xid=0x0): table_id=2 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1100 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
1102 NXT_PACKET_IN (xid=0x0): table_id=2 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1103 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
1105 NXT_PACKET_IN (xid=0x0): table_id=2 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1106 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
1109 dnl Hit table 1, Miss all other tables, sent to controller
1110 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1113 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)'
1115 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1116 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
1118 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1119 NXT_PACKET_IN (xid=0x0): table_id=253 cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
1120 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
1122 NXT_PACKET_IN (xid=0x0): table_id=253 cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
1123 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
1125 NXT_PACKET_IN (xid=0x0): table_id=253 cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
1126 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
1129 AT_CHECK([ovs-appctl revalidator/purge], [0])
1130 AT_CHECK([ovs-ofctl -OOpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
1131 n_packets=6, n_bytes=360, actions=goto_table:1
1132 table=2, n_packets=3, n_bytes=180, dl_src=10:11:11:11:11:11 actions=CONTROLLER:65535
1133 OFPST_FLOW reply (OF1.2):
1139 AT_SETUP([ofproto-dpif - Table Miss - resubmit and OFPTC_TABLE_MISS_CONTINUE])
1140 OVS_VSWITCHD_START([dnl
1141 add-port br0 p1 -- set Interface p1 type=dummy
1143 on_exit 'kill `cat ovs-ofctl.pid`'
1145 AT_CAPTURE_FILE([ofctl_monitor.log])
1146 AT_DATA([flows.txt], [dnl
1147 table=0 actions=resubmit(1,1)
1148 table=2 dl_src=10:11:11:11:11:11 actions=controller
1150 AT_CHECK([ovs-ofctl -OOpenFlow12 add-flows br0 flows.txt])
1151 AT_CHECK([ovs-ofctl -OOpenFlow11 mod-table br0 all continue])
1153 dnl Hit table 0, Miss table 1, Dropped
1154 AT_CHECK([ovs-ofctl monitor br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1157 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)'
1159 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1161 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1164 dnl Hit table 1, Dropped
1165 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1168 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)'
1170 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
1172 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1175 AT_CHECK([ovs-appctl revalidator/purge], [0])
1176 AT_CHECK([ovs-ofctl -OOpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
1177 n_packets=6, n_bytes=360, actions=resubmit(1,1)
1178 table=2, dl_src=10:11:11:11:11:11 actions=CONTROLLER:65535
1179 OFPST_FLOW reply (OF1.2):
1185 AT_SETUP([ofproto-dpif - Table Miss - OFPTC_TABLE_MISS_DROP])
1186 OVS_VSWITCHD_START([dnl
1187 add-port br0 p1 -- set Interface p1 type=dummy
1189 on_exit 'kill `cat ovs-ofctl.pid`'
1191 AT_CAPTURE_FILE([ofctl_monitor.log])
1192 AT_CHECK([ovs-ofctl -OOpenFlow11 mod-table br0 all drop])
1194 AT_CHECK([ovs-ofctl monitor -P openflow10 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1196 dnl Test that missed packets are droped
1198 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)'
1200 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
1202 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1205 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1206 AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
1213 AT_SETUP([ofproto-dpif - Table Miss - goto table and OFPTC_TABLE_MISS_DROP])
1214 OVS_VSWITCHD_START([dnl
1215 add-port br0 p1 -- set Interface p1 type=dummy
1217 on_exit 'kill `cat ovs-ofctl.pid`'
1219 AT_CAPTURE_FILE([ofctl_monitor.log])
1220 AT_CHECK([ovs-ofctl del-flows br0])
1221 AT_CHECK([ovs-ofctl -OOpenFlow12 add-flow br0 'table=0 actions=goto_table(1)'])
1222 AT_CHECK([ovs-ofctl -OOpenFlow11 mod-table br0 all drop])
1224 AT_CHECK([ovs-ofctl monitor -P openflow10 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1226 dnl Test that missed packets are droped
1228 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)'
1230 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
1232 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1235 AT_CHECK([ovs-appctl revalidator/purge], [0])
1236 AT_CHECK([ovs-ofctl -OOpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
1237 n_packets=3, n_bytes=180, actions=goto_table:1
1238 OFPST_FLOW reply (OF1.2):
1244 AT_SETUP([ofproto-dpif - Table Miss - resubmit and OFPTC_TABLE_MISS_DROP])
1245 OVS_VSWITCHD_START([dnl
1246 add-port br0 p1 -- set Interface p1 type=dummy
1248 on_exit 'kill `cat ovs-ofctl.pid`'
1250 AT_CAPTURE_FILE([ofctl_monitor.log])
1251 AT_CHECK([ovs-ofctl del-flows br0])
1252 AT_CHECK([ovs-ofctl -OOpenFlow12 add-flow br0 'table=0 actions=resubmit(1,1)'])
1253 AT_CHECK([ovs-ofctl -OOpenFlow11 mod-table br0 all drop])
1255 AT_CHECK([ovs-ofctl monitor -P openflow10 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1257 dnl Test that missed packets are droped
1259 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)'
1261 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
1263 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1266 AT_CHECK([ovs-appctl revalidator/purge], [0])
1267 AT_CHECK([ovs-ofctl -OOpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
1268 n_packets=3, n_bytes=180, actions=resubmit(1,1)
1269 OFPST_FLOW reply (OF1.2):
1275 AT_SETUP([ofproto-dpif - controller])
1276 OVS_VSWITCHD_START([dnl
1277 add-port br0 p1 -- set Interface p1 type=dummy
1279 on_exit 'kill `cat ovs-ofctl.pid`'
1281 AT_CAPTURE_FILE([ofctl_monitor.log])
1282 AT_DATA([flows.txt], [dnl
1283 cookie=0x0 dl_src=10:11:11:11:11:11 actions=controller
1284 cookie=0x1 dl_src=20:22:22:22:22:22 actions=controller,resubmit(80,1)
1285 cookie=0x2 dl_src=30:33:33:33:33:33 actions=mod_vlan_vid:15,controller
1287 cookie=0x3 table=1 in_port=80 actions=load:1->NXM_NX_REG0[[]],mod_vlan_vid:80,controller,resubmit(81,2)
1288 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)
1289 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)
1290 cookie=0x6 table=4 in_port=83 actions=load:4->NXM_NX_REG3[[]],mod_nw_src:83.83.83.83,controller,resubmit(84,5)
1291 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)
1292 cookie=0x8 table=6 in_port=85 actions=mod_tp_src:85,controller,resubmit(86,7)
1293 cookie=0x9 table=7 in_port=86 actions=mod_tp_dst:86,controller,controller
1294 cookie=0xa dl_src=40:44:44:44:44:41 actions=mod_vlan_vid:99,mod_vlan_pcp:1,controller
1295 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
1297 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
1300 AT_CHECK([ovs-ofctl monitor -P openflow10 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1303 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)'
1305 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1306 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1308 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1309 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
1310 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
1312 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
1313 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
1315 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
1316 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
1319 dnl Singleton controller action.
1320 AT_CHECK([ovs-ofctl monitor -P openflow10 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1323 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)'
1325 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1326 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1328 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1329 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1330 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
1332 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1333 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
1335 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1336 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
1339 dnl Modified controller action.
1340 AT_CHECK([ovs-ofctl monitor -P openflow10 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1343 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)'
1345 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1346 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1348 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1349 OFPT_PACKET_IN (xid=0x0): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1350 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
1352 OFPT_PACKET_IN (xid=0x0): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1353 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
1355 OFPT_PACKET_IN (xid=0x0): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1356 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
1359 dnl Modified VLAN controller action.
1360 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1363 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)'
1365 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1366 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1368 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1369 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1370 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
1372 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1373 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
1375 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1376 ip,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:44:41,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_proto=16,nw_tos=0,nw_ecn=0,nw_ttl=64
1380 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1383 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)'
1385 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 18])
1386 ovs-appctl -t ovs-ofctl exit
1388 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1389 NXT_PACKET_IN (xid=0x0): cookie=0x1 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1390 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
1392 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x3 total_len=64 reg0=0x1,in_port=1 (via action) data_len=64 (unbuffered)
1393 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
1395 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)
1396 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
1398 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)
1399 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
1401 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)
1402 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
1404 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)
1405 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
1407 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)
1408 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
1410 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)
1411 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
1413 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)
1414 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
1418 AT_CHECK([ovs-ofctl monitor br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1421 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'
1423 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 18])
1424 ovs-appctl -t ovs-ofctl exit
1426 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1427 NXT_PACKET_IN (xid=0x0): cookie=0x1 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1428 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
1430 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x3 total_len=64 reg0=0x1,in_port=1 (via action) data_len=64 (unbuffered)
1431 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
1433 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)
1434 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
1436 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)
1437 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
1439 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)
1440 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
1442 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)
1443 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
1445 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)
1446 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
1448 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)
1449 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
1451 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)
1452 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
1455 dnl Modified ARP controller action.
1456 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1459 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)'
1462 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 18])
1463 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
1464 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1465 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1466 arp,vlan_tci=0x0000,dl_src=80:88:88:88:88:88,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=192.168.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
1467 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1468 arp,vlan_tci=0x0000,dl_src=80:88:88:88:88:88,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=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
1469 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1470 arp,vlan_tci=0x0000,dl_src=80:88:88:88:88:88,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=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
1471 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1472 arp,vlan_tci=0x0000,dl_src=80:88:88:88:88:88,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=192.168.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
1473 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1474 arp,vlan_tci=0x0000,dl_src=80:88:88:88:88:88,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=192.168.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
1475 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1476 arp,vlan_tci=0x0000,dl_src=80:88:88:88:88:88,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=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
1477 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1478 arp,vlan_tci=0x0000,dl_src=80:88:88:88:88:88,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=192.168.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
1479 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1480 arp,vlan_tci=0x0000,dl_src=80:88:88:88:88:88,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=192.168.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
1481 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1482 arp,vlan_tci=0x0000,dl_src=80:88:88:88:88:88,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=1.1.1.1,arp_tpa=2.2.2.2,arp_op=2,arp_sha=50:54:00:00:00:05,arp_tha=40:44:44:44:44:41
1485 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1488 AT_CHECK([ovs-ofctl monitor br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1491 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'
1494 AT_CHECK([ovs-appctl time/warp 1000], [0], [ignore])
1495 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 18])
1496 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
1497 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1498 NXT_PACKET_IN (xid=0x0): cookie=0x1 total_len=98 in_port=1 (via action) data_len=98 (unbuffered)
1499 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
1501 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x3 total_len=102 reg0=0x1,in_port=1 (via action) data_len=102 (unbuffered)
1502 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
1504 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)
1505 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
1507 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)
1508 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
1510 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)
1511 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
1513 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)
1514 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
1516 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)
1517 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
1519 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)
1520 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
1522 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)
1523 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
1526 AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
1527 cookie=0x1, n_packets=3, n_bytes=218, dl_src=20:22:22:22:22:22 actions=CONTROLLER:65535,resubmit(80,1)
1528 cookie=0x2, n_packets=3, n_bytes=180, dl_src=30:33:33:33:33:33 actions=mod_vlan_vid:15,CONTROLLER:65535
1529 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)
1530 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)
1531 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)
1532 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)
1533 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)
1534 cookie=0x8, table=6, n_packets=3, n_bytes=218, in_port=85 actions=mod_tp_src:85,CONTROLLER:65535,resubmit(86,7)
1535 cookie=0x9, table=7, n_packets=3, n_bytes=218, in_port=86 actions=mod_tp_dst:86,CONTROLLER:65535,CONTROLLER:65535
1536 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
1537 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
1538 n_packets=3, n_bytes=180, dl_src=10:11:11:11:11:11 actions=CONTROLLER:65535
1545 AT_SETUP([ofproto-dpif - MPLS handling])
1546 OVS_VSWITCHD_START([dnl
1547 add-port br0 p1 -- set Interface p1 type=dummy
1549 on_exit 'kill `cat ovs-ofctl.pid`'
1551 AT_CAPTURE_FILE([ofctl_monitor.log])
1552 AT_DATA([flows.txt], [dnl
1553 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
1554 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
1555 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
1556 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
1557 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
1558 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
1559 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
1560 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
1561 cookie=0xa mpls,dl_src=40:44:44:44:44:49 actions=push_mpls:0x8848,load:10->OXM_OF_MPLS_LABEL[[]],CONTROLLER:65535
1562 cookie=0xb dl_src=50:55:55:55:55:55 dl_type=0x8847 actions=load:1000->OXM_OF_MPLS_LABEL[[]],controller
1563 cookie=0xd dl_src=60:66:66:66:66:66 actions=pop_mpls:0x0800,controller
1564 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
1566 cookie=0xd dl_src=60:66:66:66:00:01 actions=pop_mpls:0x0800,dec_ttl,controller
1567 cookie=0xd dl_src=60:66:66:66:00:02 actions=pop_mpls:0x0800,load:0xa000001->OXM_OF_IPV4_DST[[]],controller
1568 cookie=0xd dl_src=60:66:66:66:00:03 actions=pop_mpls:0x0800,move:OXM_OF_IPV4_DST[[]]->OXM_OF_IPV4_SRC[[]],controller
1569 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
1570 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
1571 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
1572 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
1574 cookie=0xd dl_src=60:66:66:66:00:08 actions=pop_mpls:0x0806,resubmit(1,1)
1575 cookie=0xd table=1 arp actions=controller
1577 cookie=0xdeadbeef table=2 dl_src=60:66:66:66:00:09 actions=pop_mpls:0x0800,mod_nw_tos:48
1578 cookie=0xd dl_src=60:66:66:66:00:09 actions=resubmit(,2),controller
1579 cookie=0xd dl_src=60:66:66:66:00:0a actions=pop_mpls:0x0800,mod_nw_dst:10.0.0.1,controller
1580 cookie=0xd dl_src=60:66:66:66:00:0b actions=pop_mpls:0x0800,mod_nw_src:10.0.0.1,controller
1582 cookie=0xd dl_src=60:66:66:66:01:00 actions=pop_mpls:0x8848,controller
1583 cookie=0xd dl_src=60:66:66:66:01:01 actions=pop_mpls:0x8847,dec_mpls_ttl,controller
1584 cookie=0xd dl_src=60:66:66:66:01:02 actions=pop_mpls:0x8848,load:3->OXM_OF_MPLS_TC[[]],controller
1586 cookie=0xd dl_src=60:66:66:66:02:00 actions=pop_mpls:0x8847,pop_mpls:0x0800,controller
1587 cookie=0xe dl_src=60:66:66:66:02:01 actions=pop_mpls:0x8848,pop_mpls:0x0800,dec_ttl,controller
1588 cookie=0xe dl_src=60:66:66:66:02:10 actions=pop_mpls:0x8847,dec_mpls_ttl,pop_mpls:0x0800,dec_ttl,controller
1590 cookie=0xe dl_src=60:66:66:66:03:00 actions=pop_mpls:0x8848,pop_mpls:0x8848,controller
1591 cookie=0xe dl_src=60:66:66:66:03:01 actions=pop_mpls:0x8847,pop_mpls:0x8847,dec_mpls_ttl,controller
1592 cookie=0xe dl_src=60:66:66:66:03:10 actions=pop_mpls:0x8848,dec_mpls_ttl,pop_mpls:0x8848,dec_mpls_ttl,controller
1594 cookie=0xf dl_src=60:66:66:66:04:00 actions=pop_mpls:0x0800,push_mpls:0x8847,controller
1595 cookie=0xf dl_src=60:66:66:66:04:01 actions=pop_mpls:0x0800,push_mpls:0x8848,dec_mpls_ttl,controller
1596 cookie=0xf dl_src=60:66:66:66:04:10 actions=pop_mpls:0x0800,dec_ttl,push_mpls:0x8848,dec_mpls_ttl,controller
1598 cookie=0x5 dl_src=60:66:66:66:05:00 actions=push_mpls:0x8848,pop_mpls:0x8847,controller
1599 cookie=0x5 dl_src=60:66:66:66:05:01 actions=push_mpls:0x8847,pop_mpls:0x8848,dec_mpls_ttl,controller
1600 cookie=0x5 dl_src=60:66:66:66:05:10 actions=push_mpls:0x8848,dec_mpls_ttl,pop_mpls:0x8847,dec_mpls_ttl,controller
1602 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
1604 dnl Modified MPLS controller action.
1605 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1608 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)'
1610 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1611 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1613 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1614 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1615 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
1617 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1618 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
1620 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1621 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
1624 dnl Modified MPLS controller action.
1625 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1628 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)'
1630 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1631 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1633 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1634 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1635 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
1637 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1638 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
1640 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1641 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
1644 dnl Modified MPLS controller action.
1645 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1647 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)
1650 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)'
1652 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1653 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1655 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1656 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1657 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
1659 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1660 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
1662 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1663 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
1666 dnl Modified MPLS controller action.
1667 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1670 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))'
1672 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1673 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1675 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1676 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1677 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
1679 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1680 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
1682 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1683 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
1686 dnl Modified MPLS controller action.
1687 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1690 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)'
1692 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1693 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1695 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1696 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1697 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
1699 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1700 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
1702 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1703 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
1706 dnl Modified MPLS controller action.
1707 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1710 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)'
1712 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1713 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1715 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1716 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1717 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
1719 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1720 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
1722 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1723 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
1726 dnl Modified MPLS controller action.
1727 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1730 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)'
1732 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1733 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1735 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1736 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1737 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
1739 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1740 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
1742 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1743 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
1746 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1748 dnl Modified MPLS controller action.
1749 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1752 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)'
1754 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1755 ovs-appctl -t ovs-ofctl exit
1757 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1758 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1759 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
1761 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1762 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
1764 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1765 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
1768 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1770 dnl Modified MPLS controller action.
1771 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1774 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)'
1776 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1777 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1779 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1780 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1781 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
1783 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1784 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
1786 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1787 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
1790 dnl Modified MPLS actions.
1791 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1794 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)'
1796 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1797 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1799 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1800 NXT_PACKET_IN (xid=0x0): cookie=0xb total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1801 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
1803 NXT_PACKET_IN (xid=0x0): cookie=0xb total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1804 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
1806 NXT_PACKET_IN (xid=0x0): cookie=0xb total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1807 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
1810 dnl Modified MPLS ipv6 controller action.
1811 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1814 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)'
1816 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1817 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1819 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1820 NXT_PACKET_IN (xid=0x0): cookie=0xc total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1821 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
1823 NXT_PACKET_IN (xid=0x0): cookie=0xc total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1824 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
1826 NXT_PACKET_IN (xid=0x0): cookie=0xc total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1827 mplsm,vlan_tci=0x0000,dl_src=70:77:77:77:77:77,dl_dst=50:54:00:00:00:07,mpls_label=1000,mpls_tc=7,mpls_ttl=128,mpls_bos=1
1831 dnl Modified MPLS pop action.
1832 dnl The input is a frame with two MPLS headers which tcpdump -vve shows as:
1833 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)
1834 dnl (tos 0x0, ttl 64, id 0, offset 0, flags [none], proto TCP (6), length 44)
1836 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1839 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'
1842 # 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)'
1844 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1845 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1847 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1848 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1849 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
1851 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1852 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
1854 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1855 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
1858 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1860 dnl Modified MPLS pop action.
1861 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
1862 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)
1863 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
1864 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
1865 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1868 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'
1870 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1871 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1873 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
1874 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1875 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
1877 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1878 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
1880 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1881 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
1884 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1886 dnl Modified MPLS pop action.
1887 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
1888 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)
1889 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
1890 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
1891 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1894 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'
1896 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1897 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1899 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
1900 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1901 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
1903 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1904 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
1906 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1907 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
1910 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1912 dnl Modified MPLS pop action.
1913 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
1914 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)
1915 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
1916 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
1917 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1920 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'
1922 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1923 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1925 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
1926 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1927 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
1929 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1930 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
1932 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1933 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
1936 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1938 dnl Modified MPLS pop action.
1939 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
1940 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)
1941 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
1942 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
1943 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1946 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'
1948 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1949 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1951 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
1952 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1953 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
1955 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1956 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
1958 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1959 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
1962 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1964 dnl Modified MPLS pop action.
1965 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
1966 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)
1967 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
1968 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
1969 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1972 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'
1974 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1975 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1977 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
1978 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1979 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
1981 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1982 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
1984 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1985 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
1988 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1990 dnl Modified MPLS pop action.
1991 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
1992 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)
1993 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
1994 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
1995 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1998 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'
2000 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2001 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2003 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
2004 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2005 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
2007 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2008 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
2010 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2011 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
2014 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2016 dnl Modified MPLS pop action.
2017 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
2018 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)
2019 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
2020 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
2021 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2024 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'
2026 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2027 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2029 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
2030 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2031 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
2033 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2034 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
2036 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2037 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
2040 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2042 dnl Modified MPLS pop action.
2043 dnl The input is an ARP frame with a single MPLS label stack entry which tcpdump -vve shows as:
2044 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)
2045 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2048 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'
2050 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2051 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2053 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
2054 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0xd total_len=56 in_port=1 (via action) data_len=56 (unbuffered)
2055 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
2057 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0xd total_len=56 in_port=1 (via action) data_len=56 (unbuffered)
2058 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
2060 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0xd total_len=56 in_port=1 (via action) data_len=56 (unbuffered)
2061 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
2064 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2066 dnl Modified MPLS pop action.
2067 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
2068 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)
2069 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
2070 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
2071 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2074 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'
2076 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2077 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2079 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
2080 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2081 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
2083 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2084 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
2086 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2087 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
2090 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2092 dnl Modified MPLS pop action.
2093 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
2094 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)
2095 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
2096 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
2097 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2100 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'
2102 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2103 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2105 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
2106 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2107 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
2109 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2110 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
2112 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2113 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
2116 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2118 dnl Modified MPLS pop action.
2119 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
2120 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)
2121 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
2122 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
2123 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2126 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'
2128 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2129 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2131 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
2132 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2133 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
2135 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2136 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
2138 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2139 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
2142 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2144 dnl Modified MPLS pop action.
2145 dnl The input is a frame with two MPLS label stack entries which tcpdump -vve shows as:
2146 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)
2147 dnl (label 20, exp 0, [S], ttl 31)
2148 dnl (tos 0x0, ttl 254, id 0, offset 0, flags [none], proto TCP (6), length 44)
2149 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
2150 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2153 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'
2155 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2156 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2158 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2159 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2160 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
2162 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2163 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
2165 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2166 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
2169 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2171 dnl Modified MPLS pop action.
2172 dnl The input is a frame with two MPLS label stack entries which tcpdump -vve shows as:
2173 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)
2174 dnl (label 20, exp 0, [S], ttl 31)
2175 dnl (tos 0x0, ttl 254, id 0, offset 0, flags [none], proto TCP (6), length 44)
2176 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
2177 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2180 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'
2182 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2183 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2185 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2186 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2187 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
2189 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2190 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
2192 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2193 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
2196 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2198 dnl Modified MPLS pop action.
2199 dnl The input is a frame with two MPLS label stack entries which tcpdump -vve shows as:
2200 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)
2201 dnl (label 20, exp 0, [S], ttl 31)
2202 dnl (tos 0x0, ttl 254, id 0, offset 0, flags [none], proto TCP (6), length 44)
2203 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
2204 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2207 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'
2209 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2210 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2212 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2213 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2214 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
2216 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2217 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
2219 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2220 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
2223 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2225 dnl Modified MPLS pop action.
2226 dnl The input is a frame with two MPLS label stack entries which tcpdump -vve shows as:
2227 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)
2228 dnl (label 20, exp 0, [S], ttl 31)
2229 dnl (tos 0x0, ttl 254, id 0, offset 0, flags [none], proto TCP (6), length 44)
2230 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
2231 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2234 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'
2236 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2237 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2239 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2240 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2241 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
2243 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2244 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
2246 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2247 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
2250 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2252 dnl Modified MPLS pop action.
2253 dnl The input is a frame with two MPLS label stack entries which tcpdump -vve shows as:
2254 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)
2255 dnl (label 20, exp 0, [S], ttl 31)
2256 dnl (tos 0x0, ttl 254, id 0, offset 0, flags [none], proto TCP (6), length 44)
2257 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
2258 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2261 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'
2264 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2265 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2267 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
2268 NXT_PACKET_IN (xid=0x0): cookie=0xe total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2269 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
2271 NXT_PACKET_IN (xid=0x0): cookie=0xe total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2272 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
2274 NXT_PACKET_IN (xid=0x0): cookie=0xe total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2275 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
2278 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2280 dnl Modified MPLS pop action.
2281 dnl The input is a frame with two MPLS label stack entries which tcpdump -vve shows as:
2282 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)
2283 dnl (label 20, exp 0, [S], ttl 31)
2284 dnl (tos 0x0, ttl 254, id 0, offset 0, flags [none], proto TCP (6), length 44)
2285 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
2286 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2289 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'
2291 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2292 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2294 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
2295 NXT_PACKET_IN (xid=0x0): cookie=0xe total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2296 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
2298 NXT_PACKET_IN (xid=0x0): cookie=0xe total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2299 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
2301 NXT_PACKET_IN (xid=0x0): cookie=0xe total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2302 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
2305 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2307 dnl Modified MPLS pop action.
2308 dnl The input is a frame with three MPLS label stack entries which tcpdump -vve shows as:
2309 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)
2310 dnl (label 20, exp 0, ttl 31)
2311 dnl (label 20, exp 0, [S], ttl 30)
2312 dnl (tos 0x0, ttl 254, id 0, offset 0, flags [none], proto TCP (6), length 44)
2313 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
2314 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2317 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'
2319 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2320 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2322 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2323 NXT_PACKET_IN (xid=0x0): cookie=0xe total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2324 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
2326 NXT_PACKET_IN (xid=0x0): cookie=0xe total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2327 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
2329 NXT_PACKET_IN (xid=0x0): cookie=0xe total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2330 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
2333 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2335 dnl Modified MPLS pop action.
2336 dnl The input is a frame with three MPLS label stack entries which tcpdump -vve shows as:
2337 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)
2338 dnl (label 20, exp 0, ttl 31)
2339 dnl (label 20, exp 0, [S], ttl 30)
2340 dnl (tos 0x0, ttl 254, id 0, offset 0, flags [none], proto TCP (6), length 44)
2341 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
2342 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2345 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'
2347 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2348 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2350 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2351 NXT_PACKET_IN (xid=0x0): cookie=0xe total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2352 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
2354 NXT_PACKET_IN (xid=0x0): cookie=0xe total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2355 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
2357 NXT_PACKET_IN (xid=0x0): cookie=0xe total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2358 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
2361 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2363 dnl Modified MPLS pop action.
2364 dnl The input is a frame with three MPLS label stack entries which tcpdump -vve shows as:
2365 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)
2366 dnl (label 20, exp 0, ttl 31)
2367 dnl (label 20, exp 0, [S], ttl 30)
2368 dnl (tos 0x0, ttl 254, id 0, offset 0, flags [none], proto TCP (6), length 44)
2369 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
2370 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2373 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'
2375 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2376 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2378 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2379 NXT_PACKET_IN (xid=0x0): cookie=0xe total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2380 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
2382 NXT_PACKET_IN (xid=0x0): cookie=0xe total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2383 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
2385 NXT_PACKET_IN (xid=0x0): cookie=0xe total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2386 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
2389 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2391 dnl Modified MPLS pop action.
2392 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
2393 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)
2394 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
2395 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
2396 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2399 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'
2401 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2402 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2404 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
2405 NXT_PACKET_IN (xid=0x0): cookie=0xf total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2406 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
2408 NXT_PACKET_IN (xid=0x0): cookie=0xf total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2409 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
2411 NXT_PACKET_IN (xid=0x0): cookie=0xf total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2412 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
2415 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2417 dnl Modified MPLS pop action.
2418 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
2419 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)
2420 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
2421 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
2422 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2425 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'
2427 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2428 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2430 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
2431 NXT_PACKET_IN (xid=0x0): cookie=0xf total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2432 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
2434 NXT_PACKET_IN (xid=0x0): cookie=0xf total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2435 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
2437 NXT_PACKET_IN (xid=0x0): cookie=0xf total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2438 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
2441 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2443 dnl Modified MPLS pop action.
2444 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
2445 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)
2446 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
2447 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
2448 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2451 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'
2453 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2454 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2456 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
2457 NXT_PACKET_IN (xid=0x0): cookie=0xf total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2458 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
2460 NXT_PACKET_IN (xid=0x0): cookie=0xf total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2461 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
2463 NXT_PACKET_IN (xid=0x0): cookie=0xf total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2464 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
2467 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2469 dnl Modified MPLS pop action.
2470 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
2471 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)
2472 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
2473 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
2474 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2477 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'
2480 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2481 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2483 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2484 NXT_PACKET_IN (xid=0x0): cookie=0x5 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2485 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
2487 NXT_PACKET_IN (xid=0x0): cookie=0x5 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2488 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
2490 NXT_PACKET_IN (xid=0x0): cookie=0x5 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2491 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
2494 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2496 dnl Modified MPLS pop action.
2497 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
2498 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)
2499 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
2500 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
2501 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2504 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'
2506 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2507 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2509 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2510 NXT_PACKET_IN (xid=0x0): cookie=0x5 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2511 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
2513 NXT_PACKET_IN (xid=0x0): cookie=0x5 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2514 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
2516 NXT_PACKET_IN (xid=0x0): cookie=0x5 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2517 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
2520 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2522 dnl Modified MPLS pop action.
2523 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
2524 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)
2525 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
2526 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
2527 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2530 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'
2533 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2534 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2536 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2537 NXT_PACKET_IN (xid=0x0): cookie=0x5 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2538 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
2540 NXT_PACKET_IN (xid=0x0): cookie=0x5 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2541 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
2543 NXT_PACKET_IN (xid=0x0): cookie=0x5 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2544 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
2547 AT_CHECK([ovs-appctl revalidator/purge], [0])
2548 AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
2549 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
2550 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
2551 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
2552 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
2553 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
2554 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
2555 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
2556 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
2557 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
2558 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
2559 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
2560 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
2561 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
2562 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
2563 cookie=0xd, n_packets=3, n_bytes=180, dl_src=60:66:66:66:00:08 actions=pop_mpls:0x0806,resubmit(1,1)
2564 cookie=0xd, n_packets=3, n_bytes=186, dl_src=60:66:66:66:00:01 actions=pop_mpls:0x0800,dec_ttl,CONTROLLER:65535
2565 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
2566 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
2567 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
2568 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
2569 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
2570 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
2571 cookie=0xd, n_packets=3, n_bytes=186, dl_src=60:66:66:66:00:09 actions=resubmit(,2),CONTROLLER:65535
2572 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
2573 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
2574 cookie=0xd, n_packets=3, n_bytes=186, dl_src=60:66:66:66:66:66 actions=pop_mpls:0x0800,CONTROLLER:65535
2575 cookie=0xd, n_packets=3, n_bytes=198, dl_src=60:66:66:66:01:00 actions=pop_mpls:0x8848,CONTROLLER:65535
2576 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
2577 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
2578 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
2579 cookie=0xd, table=1, n_packets=3, n_bytes=168, arp actions=CONTROLLER:65535
2580 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
2581 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
2582 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
2583 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
2584 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
2585 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
2586 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
2587 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
2588 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
2595 AT_SETUP([ofproto-dpif - MPLS handling with goto_table])
2596 OVS_VSWITCHD_START([dnl
2597 add-port br0 p1 -- set Interface p1 type=dummy
2599 on_exit 'kill `cat ovs-ofctl.pid`'
2601 AT_CAPTURE_FILE([ofctl_monitor.log])
2602 AT_DATA([flows.txt], [dnl
2603 table=0 mplsm actions=pop_mpls:0x800,goto_table(1)
2604 table=1 ip,ip_dscp=8 actions=controller
2606 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flows br0 flows.txt])
2609 dnl Modified MPLS pop action.
2610 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
2611 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)
2612 dnl (tos 0x20, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
2613 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
2614 AT_CHECK([ovs-ofctl -O OpenFlow12 monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2617 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'
2619 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2620 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2622 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
2623 OFPT_PACKET_IN (OF1.2) (xid=0x0): table_id=1 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2624 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
2626 OFPT_PACKET_IN (OF1.2) (xid=0x0): table_id=1 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2627 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
2629 OFPT_PACKET_IN (OF1.2) (xid=0x0): table_id=1 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2630 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
2633 AT_CHECK([ovs-appctl revalidator/purge], [0])
2634 AT_CHECK([ovs-ofctl -O OpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
2635 n_packets=3, n_bytes=186, mplsm actions=pop_mpls:0x0800,goto_table:1
2636 table=1, n_packets=3, n_bytes=174, ip,nw_tos=32 actions=CONTROLLER:65535
2637 OFPST_FLOW reply (OF1.2):
2643 AT_SETUP([ofproto-dpif - MPLS handling with write_actions])
2644 OVS_VSWITCHD_START([dnl
2645 add-port br0 p1 -- set Interface p1 type=dummy
2647 on_exit 'kill `cat ovs-ofctl.pid`'
2649 dnl N.B: The first (and only) action that accesses L3 data after the
2650 dnl pop_mpls action is present in write_actions. This exercises recirculation
2651 dnl triggered in write_actions due to a previous action not in write actions.
2652 AT_CAPTURE_FILE([ofctl_monitor.log])
2653 AT_DATA([flows.txt], [dnl
2654 mplsm actions=pop_mpls:0x800,write_actions(dec_ttl,controller)
2656 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flows br0 flows.txt])
2658 dnl Modified MPLS pop action.
2659 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
2660 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)
2661 dnl (tos 0x20, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
2662 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
2663 AT_CHECK([ovs-ofctl -O OpenFlow12 monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2666 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'
2668 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2669 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2671 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
2672 OFPT_PACKET_IN (OF1.2) (xid=0x0): total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2673 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
2675 OFPT_PACKET_IN (OF1.2) (xid=0x0): total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2676 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
2678 OFPT_PACKET_IN (OF1.2) (xid=0x0): total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2679 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
2682 AT_CHECK([ovs-appctl revalidator/purge], [0])
2683 AT_CHECK([ovs-ofctl -O OpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
2684 n_packets=3, n_bytes=186, mplsm actions=pop_mpls:0x0800,write_actions(dec_ttl,CONTROLLER:65535)
2685 OFPST_FLOW reply (OF1.2):
2691 AT_SETUP([ofproto-dpif - table-miss flow (OpenFlow 1.0)])
2692 OVS_VSWITCHD_START([dnl
2693 add-port br0 p1 -- set Interface p1 type=dummy
2695 on_exit 'kill `cat ovs-ofctl.pid`'
2697 AT_CAPTURE_FILE([ofctl_monitor.log])
2698 # A table-miss flow has priority 0 and no match
2699 AT_CHECK([ovs-ofctl --protocols=OpenFlow10 add-flow br0 'priority=0 actions=output:CONTROLLER'])
2701 dnl Singleton controller action.
2702 AT_CHECK([ovs-ofctl monitor -P openflow10 --protocols=OpenFlow10 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
2705 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)'
2707 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2708 ovs-appctl -t ovs-ofctl exit
2710 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2711 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
2712 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
2714 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
2715 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
2717 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
2718 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
2721 AT_CHECK([ovs-appctl revalidator/purge], [0])
2722 AT_CHECK([ovs-ofctl --protocols=OpenFlow10 dump-flows br0 | ofctl_strip | sort], [0], [dnl
2723 n_packets=3, n_bytes=180, priority=0 actions=CONTROLLER:65535
2731 AT_SETUP([ofproto-dpif - table-miss flow (OpenFlow 1.3)])
2732 OVS_VSWITCHD_START([dnl
2733 add-port br0 p1 -- set Interface p1 type=dummy
2735 on_exit 'kill `cat ovs-ofctl.pid`'
2737 AT_CAPTURE_FILE([ofctl_monitor.log])
2738 # A table-miss flow has priority 0 and no match
2739 AT_CHECK([ovs-ofctl --protocols=OpenFlow13 add-flow br0 'priority=0 actions=output:CONTROLLER'])
2741 dnl Singleton controller action.
2742 AT_CHECK([ovs-ofctl monitor -P openflow10 --protocols=OpenFlow13 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
2745 ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=10:11:11:11:11:11,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=10),tcp_flags(0x002)'
2747 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2748 ovs-appctl -t ovs-ofctl exit
2750 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2752 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2753 OFPT_PACKET_IN (OF1.3) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
2754 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
2756 OFPT_PACKET_IN (OF1.3) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
2757 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
2759 OFPT_PACKET_IN (OF1.3) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
2760 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
2763 AT_CHECK([ovs-appctl revalidator/purge], [0])
2764 AT_CHECK([ovs-ofctl --protocols=OpenFlow13 dump-flows br0 | ofctl_strip | sort], [0], [dnl
2765 n_packets=3, n_bytes=180, priority=0 actions=CONTROLLER:65535
2766 OFPST_FLOW reply (OF1.3):
2772 AT_SETUP([ofproto-dpif - table-miss flow with async config (OpenFlow 1.3)])
2773 OVS_VSWITCHD_START([dnl
2774 add-port br0 p1 -- set Interface p1 type=dummy
2776 on_exit 'kill `cat ovs-ofctl.pid`'
2778 ovs-appctl time/stop
2780 AT_CAPTURE_FILE([ofctl_monitor.log])
2781 # A table-miss flow has priority 0 and no match
2782 AT_CHECK([ovs-ofctl --protocols=OpenFlow13 add-flow br0 'priority=0 actions=output:CONTROLLER'])
2784 dnl Singleton controller action.
2785 AT_CHECK([ovs-ofctl monitor -P openflow10 --protocols=OpenFlow13 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
2787 # Become slave (OF 1.3), which should disable everything except port status.
2788 ovs-appctl -t ovs-ofctl ofctl/send 041800180000000200000003000000000000000000000001
2790 # Ensure that ovs-vswitchd gets a chance to reply before sending another command.
2791 ovs-appctl time/warp 500 100
2793 # Use OF 1.3 OFPT_SET_ASYNC to enable OFPR_NO_MATCH for slave only.
2794 ovs-appctl -t ovs-ofctl ofctl/send 041c002000000002000000000000000100000000000000000000000000000000
2796 ovs-appctl time/warp 500 100
2798 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)'
2800 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2801 ovs-appctl -t ovs-ofctl exit
2803 AT_CHECK([ovs-appctl revalidator/purge], [0])
2804 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2805 send: OFPT_ROLE_REQUEST (OF1.3) (xid=0x2): role=slave generation_id=1
2806 OFPT_ROLE_REPLY (OF1.3) (xid=0x2): role=slave generation_id=1
2808 send: OFPT_SET_ASYNC (OF1.3) (xid=0x2):
2815 REQUESTFORWARD: (off)
2823 REQUESTFORWARD: (off)
2825 OFPT_PACKET_IN (OF1.3) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
2826 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 OFPT_PACKET_IN (OF1.3) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
2829 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
2831 OFPT_PACKET_IN (OF1.3) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
2832 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
2835 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2837 AT_CHECK([ovs-ofctl --protocols=OpenFlow13 dump-flows br0 | ofctl_strip | sort], [0], [dnl
2838 n_packets=3, n_bytes=180, priority=0 actions=CONTROLLER:65535
2839 OFPST_FLOW reply (OF1.3):
2846 AT_SETUP([ofproto-dpif - table-miss flow (OpenFlow 1.4)])
2847 OVS_VSWITCHD_START([dnl
2848 add-port br0 p1 -- set Interface p1 type=dummy
2850 on_exit 'kill `cat ovs-ofctl.pid`'
2852 AT_CAPTURE_FILE([ofctl_monitor.log])
2853 # A table-miss flow has priority 0 and no match
2854 AT_CHECK([ovs-ofctl --protocols=OpenFlow14 add-flow br0 'priority=0 actions=output:CONTROLLER'])
2856 dnl Singleton controller action.
2857 AT_CHECK([ovs-ofctl monitor -P openflow10 --protocols=OpenFlow14 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
2860 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)'
2862 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2863 ovs-appctl -t ovs-ofctl exit
2865 AT_CHECK([ovs-appctl revalidator/purge], [0])
2866 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2867 OFPT_PACKET_IN (OF1.4) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
2868 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 OFPT_PACKET_IN (OF1.4) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
2871 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
2873 OFPT_PACKET_IN (OF1.4) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
2874 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
2877 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2879 AT_CHECK([ovs-ofctl --protocols=OpenFlow14 dump-flows br0 | ofctl_strip | sort], [0], [dnl
2880 n_packets=3, n_bytes=180, priority=0 actions=CONTROLLER:65535
2881 OFPST_FLOW reply (OF1.4):
2888 AT_SETUP([ofproto-dpif - packet-in reasons (Openflow 1.3)])
2889 OVS_VSWITCHD_START([dnl
2890 add-port br0 p1 -- set Interface p1 type=dummy
2892 on_exit 'kill `cat ovs-ofctl.pid`'
2894 AT_CAPTURE_FILE([ofctl_monitor.log])
2895 AT_DATA([flows.txt], [dnl
2896 table=0 in_port=1 actions=write_actions(output(CONTROLLER)),goto_table(1)
2897 table=1 actions=output(CONTROLLER),goto_table(2)
2898 table=2 actions=group:1234
2900 AT_CHECK([ovs-ofctl --protocols=OpenFlow13 add-group br0 'group_id=1234,type=all,bucket=output:10,bucket=output:CONTROLLER'])
2901 AT_CHECK([ovs-ofctl --protocols=OpenFlow13 add-flows br0 flows.txt])
2903 dnl Singleton controller action.
2904 AT_CHECK([ovs-ofctl monitor -P openflow10 --protocols=OpenFlow13 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
2907 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)'
2909 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2910 ovs-appctl -t ovs-ofctl exit
2912 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2914 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2915 OFPT_PACKET_IN (OF1.3) (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
2916 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
2918 OFPT_PACKET_IN (OF1.3) (xid=0x0): table_id=2 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
2919 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
2921 OFPT_PACKET_IN (OF1.3) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
2922 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
2924 OFPT_PACKET_IN (OF1.3) (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
2925 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
2927 OFPT_PACKET_IN (OF1.3) (xid=0x0): table_id=2 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
2928 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
2930 OFPT_PACKET_IN (OF1.3) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
2931 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
2933 OFPT_PACKET_IN (OF1.3) (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
2934 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 OFPT_PACKET_IN (OF1.3) (xid=0x0): table_id=2 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
2937 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
2939 OFPT_PACKET_IN (OF1.3) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
2940 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
2943 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2945 AT_CHECK([ovs-ofctl --protocols=OpenFlow13 dump-flows br0 | ofctl_strip | sort], [0], [dnl
2946 n_packets=3, n_bytes=180, in_port=1 actions=write_actions(CONTROLLER:65535),goto_table:1
2947 table=1, n_packets=3, n_bytes=180, actions=CONTROLLER:65535,goto_table:2
2948 table=2, n_packets=3, n_bytes=180, actions=group:1234
2949 OFPST_FLOW reply (OF1.3):
2956 AT_SETUP([ofproto-dpif - packet-in reasons (Openflow 1.4)])
2957 OVS_VSWITCHD_START([dnl
2958 add-port br0 p1 -- set Interface p1 type=dummy
2960 on_exit 'kill `cat ovs-ofctl.pid`'
2962 AT_CAPTURE_FILE([ofctl_monitor.log])
2963 AT_DATA([flows.txt], [dnl
2964 table=0 in_port=1 actions=write_actions(output(CONTROLLER)),goto_table(1)
2965 table=1 actions=output(CONTROLLER),goto_table(2)
2966 table=2 actions=group:1234
2968 AT_CHECK([ovs-ofctl --protocols=OpenFlow14 add-group br0 'group_id=1234,type=all,bucket=output:10,bucket=output:CONTROLLER'])
2969 AT_CHECK([ovs-ofctl --protocols=OpenFlow14 add-flows br0 flows.txt])
2971 dnl Singleton controller action.
2972 AT_CHECK([ovs-ofctl monitor -P openflow10 --protocols=OpenFlow14 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
2975 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)'
2977 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2978 ovs-appctl -t ovs-ofctl exit
2980 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2982 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2983 OFPT_PACKET_IN (OF1.4) (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
2984 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
2986 OFPT_PACKET_IN (OF1.4) (xid=0x0): table_id=2 cookie=0x0 total_len=60 in_port=1 (via group) data_len=60 (unbuffered)
2987 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
2989 OFPT_PACKET_IN (OF1.4) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via action_set) data_len=60 (unbuffered)
2990 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
2992 OFPT_PACKET_IN (OF1.4) (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
2993 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
2995 OFPT_PACKET_IN (OF1.4) (xid=0x0): table_id=2 cookie=0x0 total_len=60 in_port=1 (via group) data_len=60 (unbuffered)
2996 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
2998 OFPT_PACKET_IN (OF1.4) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via action_set) data_len=60 (unbuffered)
2999 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
3001 OFPT_PACKET_IN (OF1.4) (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
3002 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 OFPT_PACKET_IN (OF1.4) (xid=0x0): table_id=2 cookie=0x0 total_len=60 in_port=1 (via group) data_len=60 (unbuffered)
3005 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
3007 OFPT_PACKET_IN (OF1.4) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via action_set) data_len=60 (unbuffered)
3008 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
3011 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
3013 AT_CHECK([ovs-ofctl --protocols=OpenFlow14 dump-flows br0 | ofctl_strip | sort], [0], [dnl
3014 n_packets=3, n_bytes=180, in_port=1 actions=write_actions(CONTROLLER:65535),goto_table:1
3015 table=1, n_packets=3, n_bytes=180, actions=CONTROLLER:65535,goto_table:2
3016 table=2, n_packets=3, n_bytes=180, actions=group:1234
3017 OFPST_FLOW reply (OF1.4):
3024 AT_SETUP([ofproto-dpif - ARP modification slow-path])
3026 ADD_OF_PORTS([br0], [1], [2])
3028 ovs-vsctl -- set Interface p2 type=dummy options:pcap=p2.pcap
3029 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'
3031 # Input some packets that should follow the arp modification slow-path.
3033 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)'
3035 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
3037 # Check the packets that were output.
3038 AT_CHECK([ovs-ofctl parse-pcap p2.pcap], [0], [dnl
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.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
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=00:00:00:00:00:00
3041 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
3042 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
3043 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
3044 arp,in_port=ANY,vlan_tci=0x0000,dl_src=80:88:88:88:88:88,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=192.168.128.1,arp_tpa=192.168.0.2,arp_op=2,arp_sha=50:54:00:00:00:05,arp_tha=40:44:44:44:44:41
3045 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
3046 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
3047 arp,in_port=ANY,vlan_tci=0x0000,dl_src=80:88:88:88:88:88,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=192.168.128.1,arp_tpa=192.168.0.2,arp_op=2,arp_sha=50:54:00:00:00:05,arp_tha=40:44:44:44:44:41
3053 AT_SETUP([ofproto-dpif - VLAN handling])
3055 [set Bridge br0 fail-mode=standalone -- \
3056 add-port br0 p1 trunks=10,12 -- \
3057 add-port br0 p2 tag=10 -- \
3058 add-port br0 p3 tag=12 \
3059 other-config:priority-tags=true -- \
3060 add-port br0 p4 tag=12 -- \
3061 add-port br0 p5 vlan_mode=native-tagged tag=10 -- \
3062 add-port br0 p6 vlan_mode=native-tagged tag=10 trunks=10,12 -- \
3063 add-port br0 p7 vlan_mode=native-untagged tag=12 -- \
3064 add-port br0 p8 vlan_mode=native-untagged tag=12 trunks=10,12 \
3065 other-config:priority-tags=true -- \
3066 set Interface p1 type=dummy -- \
3067 set Interface p2 type=dummy -- \
3068 set Interface p3 type=dummy -- \
3069 set Interface p4 type=dummy -- \
3070 set Interface p5 type=dummy -- \
3071 set Interface p6 type=dummy -- \
3072 set Interface p7 type=dummy -- \
3073 set Interface p8 type=dummy --])
3075 dnl Each of these specifies an in_port by number, a VLAN VID (or "none"),
3076 dnl a VLAN PCP (used if the VID isn't "none") and the expected set of datapath
3082 "100 10 0 1,5,6,7,8,pop_vlan,2" \
3083 "100 10 1 1,5,6,7,8,pop_vlan,2" \
3086 "100 12 0 1,5,6,pop_vlan,3,4,7,8" \
3087 "100 12 1 1,5,6,pop_vlan,4,7,push_vlan(vid=0,pcp=1),3,8" \
3091 "1 10 0 5,6,7,8,100,pop_vlan,2" \
3092 "1 10 1 5,6,7,8,100,pop_vlan,2" \
3095 "1 12 0 5,6,100,pop_vlan,3,4,7,8" \
3096 "1 12 1 5,6,100,pop_vlan,4,7,push_vlan(vid=0,pcp=1),3,8" \
3097 "2 none 0 push_vlan(vid=10,pcp=0),1,5,6,7,8,100" \
3098 "2 0 0 pop_vlan,push_vlan(vid=10,pcp=0),1,5,6,7,8,100" \
3099 "2 0 1 pop_vlan,push_vlan(vid=10,pcp=1),1,5,6,7,8,100" \
3106 "3 none 0 4,7,8,push_vlan(vid=12,pcp=0),1,5,6,100" \
3107 "3 0 0 pop_vlan,4,7,8,push_vlan(vid=12,pcp=0),1,5,6,100" \
3108 "3 0 1 8,pop_vlan,4,7,push_vlan(vid=12,pcp=1),1,5,6,100" \
3115 "4 none 0 3,7,8,push_vlan(vid=12,pcp=0),1,5,6,100" \
3116 "4 0 0 pop_vlan,3,7,8,push_vlan(vid=12,pcp=0),1,5,6,100" \
3117 "4 0 1 3,8,pop_vlan,7,push_vlan(vid=12,pcp=1),1,5,6,100" \
3124 "5 none 0 2,push_vlan(vid=10,pcp=0),1,6,7,8,100" \
3125 "5 0 0 pop_vlan,2,push_vlan(vid=10,pcp=0),1,6,7,8,100" \
3126 "5 0 1 pop_vlan,2,push_vlan(vid=10,pcp=1),1,6,7,8,100" \
3127 "5 10 0 1,6,7,8,100,pop_vlan,2" \
3128 "5 10 1 1,6,7,8,100,pop_vlan,2" \
3131 "5 12 0 1,6,100,pop_vlan,3,4,7,8" \
3132 "5 12 1 1,6,100,pop_vlan,4,7,push_vlan(vid=0,pcp=1),3,8" \
3133 "6 none 0 2,push_vlan(vid=10,pcp=0),1,5,7,8,100" \
3134 "6 0 0 pop_vlan,2,push_vlan(vid=10,pcp=0),1,5,7,8,100" \
3135 "6 0 1 pop_vlan,2,push_vlan(vid=10,pcp=1),1,5,7,8,100" \
3136 "6 10 0 1,5,7,8,100,pop_vlan,2" \
3137 "6 10 1 1,5,7,8,100,pop_vlan,2" \
3140 "6 12 0 1,5,100,pop_vlan,3,4,7,8" \
3141 "6 12 1 1,5,100,pop_vlan,4,7,push_vlan(vid=0,pcp=1),3,8" \
3142 "7 none 0 3,4,8,push_vlan(vid=12,pcp=0),1,5,6,100" \
3143 "7 0 0 pop_vlan,3,4,8,push_vlan(vid=12,pcp=0),1,5,6,100" \
3144 "7 0 1 3,8,pop_vlan,4,push_vlan(vid=12,pcp=1),1,5,6,100" \
3145 "7 10 0 1,5,6,8,100,pop_vlan,2" \
3146 "7 10 1 1,5,6,8,100,pop_vlan,2" \
3149 "7 12 0 1,5,6,100,pop_vlan,3,4,8" \
3150 "7 12 1 1,5,6,100,pop_vlan,4,push_vlan(vid=0,pcp=1),3,8" \
3151 "8 none 0 3,4,7,push_vlan(vid=12,pcp=0),1,5,6,100" \
3152 "8 0 0 pop_vlan,3,4,7,push_vlan(vid=12,pcp=0),1,5,6,100" \
3153 "8 0 1 3,pop_vlan,4,7,push_vlan(vid=12,pcp=1),1,5,6,100" \
3154 "8 10 0 1,5,6,7,100,pop_vlan,2" \
3155 "8 10 1 1,5,6,7,100,pop_vlan,2" \
3158 "8 12 0 1,5,6,100,pop_vlan,3,4,7" \
3159 "8 12 1 1,5,6,100,pop_vlan,4,7,push_vlan(vid=0,pcp=1),3"
3167 if test $vlan = none; then
3168 flow="in_port($in_port),eth(src=50:54:00:00:00:01,dst=ff:ff:ff:ff:ff:ff),eth_type(0xabcd)"
3170 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))"
3173 echo "----------------------------------------------------------------------"
3174 echo "in_port=$in_port vlan=$vlan pcp=$pcp"
3176 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
3177 actual=`tail -1 stdout | sed 's/Datapath actions: //'`
3179 AT_CHECK([ovs-dpctl normalize-actions "$flow" "$expected"], [0], [stdout])
3181 AT_CHECK([ovs-dpctl normalize-actions "$flow" "$actual"], [0], [expout])
3187 AT_SETUP([ofproto-dpif - MPLS handling])
3188 OVS_VSWITCHD_START([dnl
3189 add-port br0 p1 -- set Interface p1 type=dummy
3191 on_exit 'kill `cat ovs-ofctl.pid`'
3193 AT_CAPTURE_FILE([ofctl_monitor.log])
3194 AT_DATA([flows.txt], [dnl
3195 dl_src=40:44:44:44:00:00 actions=push_mpls:0x8847,controller
3196 dl_src=40:44:44:44:00:01,mpls actions=push_mpls:0x8847,controller
3197 dl_src=40:44:44:44:00:02,mpls actions=push_mpls:0x8848,controller
3199 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 add-flows br0 flows.txt])
3201 dnl In this test, we push an MPLS tag to an ethernet packet.
3202 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
3205 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)'
3207 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3208 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
3210 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
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
3225 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3226 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
3227 00000000 50 54 00 00 00 07 40 44-44 44 00 00 88 47 00 00
3228 00000010 01 40 45 00 00 28 00 00-00 00 40 06 f9 7c c0 a8
3229 00000020 00 01 c0 a8 00 02 00 00-00 00 00 00 00 00 00 00
3230 00000030 00 00 50 00 00 00 00 00-00 00 00 00 00 00 00 00
3233 dnl In this test, we push an MPLS tag to an MPLS packet. The LSE should be
3234 dnl copied exactly, except for the BOS bit.
3235 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
3238 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)'
3240 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3241 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
3243 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
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
3258 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3259 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
3260 00000000 50 54 00 00 00 07 40 44-44 44 00 01 88 47 00 00
3261 00000010 a0 40 00 00 a1 40 00 00-00 00 00 00 00 00 00 00
3262 00000020 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
3263 00000030 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
3266 dnl In this test, we push an MPLS tag to an MPLS packet. The LSE should be
3267 dnl copied exactly, except for the BOS bit. The ethertype should be updated
3268 dnl to the MPLS ethertype of the MPLS push action which differs to that
3269 dnl of the input packet.
3270 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
3273 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)'
3275 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3276 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
3278 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
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
3293 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3294 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
3295 00000000 50 54 00 00 00 07 40 44-44 44 00 02 88 48 00 00
3296 00000010 a0 40 00 00 a1 40 00 00-00 00 00 00 00 00 00 00
3297 00000020 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
3298 00000030 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
3304 AT_SETUP([ofproto-dpif - VLAN+MPLS handling])
3305 OVS_VSWITCHD_START([dnl
3306 add-port br0 p1 -- set Interface p1 type=dummy
3308 on_exit 'kill `cat ovs-ofctl.pid`'
3310 AT_CAPTURE_FILE([ofctl_monitor.log])
3311 AT_DATA([flows.txt], [dnl
3312 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
3313 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
3314 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
3315 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
3316 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
3317 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
3318 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
3319 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
3320 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
3321 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
3323 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 add-flows br0 flows.txt])
3325 dnl Modified MPLS controller action.
3326 dnl In this test, we push the MPLS tag before pushing a VLAN tag, so we see
3327 dnl both of these in the final flow
3328 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
3331 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)'
3333 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3334 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
3336 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
3337 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3338 mpls,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:54:50,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1
3339 00000000 50 54 00 00 00 07 40 44-44 44 54 50 81 00 20 63
3340 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3341 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3342 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3343 00000040 00 00 00 00
3345 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3346 mpls,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:54:50,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1
3347 00000000 50 54 00 00 00 07 40 44-44 44 54 50 81 00 20 63
3348 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3349 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3350 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3351 00000040 00 00 00 00
3353 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3354 mpls,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:54:50,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1
3355 00000000 50 54 00 00 00 07 40 44-44 44 54 50 81 00 20 63
3356 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3357 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3358 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3359 00000040 00 00 00 00
3362 dnl Modified MPLS controller action.
3363 dnl In this test, the input packet is vlan-tagged, which should be stripped
3364 dnl before we push the MPLS and VLAN tags.
3365 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
3368 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))'
3370 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3371 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
3373 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
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
3388 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3389 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
3390 00000000 50 54 00 00 00 07 40 44-44 44 54 51 81 00 20 63
3391 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3392 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3393 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3396 dnl Modified MPLS controller action.
3397 dnl In this test, we push the MPLS tag before pushing a VLAN tag, so we see
3398 dnl both of these in the final flow
3399 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
3402 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)'
3404 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3405 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
3407 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
3408 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3409 mpls,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:54:52,dl_dst=52:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1
3410 00000000 52 54 00 00 00 07 40 44-44 44 54 52 81 00 20 63
3411 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3412 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3413 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3414 00000040 00 00 00 00
3416 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3417 mpls,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:54:52,dl_dst=52:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1
3418 00000000 52 54 00 00 00 07 40 44-44 44 54 52 81 00 20 63
3419 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3420 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3421 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3422 00000040 00 00 00 00
3424 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3425 mpls,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:54:52,dl_dst=52:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1
3426 00000000 52 54 00 00 00 07 40 44-44 44 54 52 81 00 20 63
3427 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3428 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3429 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3430 00000040 00 00 00 00
3433 dnl Modified MPLS controller action.
3434 dnl In this test, the input packet is vlan-tagged, which should be stripped
3435 dnl before we push the MPLS and VLAN tags.
3436 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
3439 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))'
3441 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3442 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
3444 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
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
3459 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3460 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
3461 00000000 50 54 00 00 00 07 40 44-44 44 54 53 81 00 20 63
3462 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3463 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3464 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3467 dnl Modified MPLS controller action.
3468 dnl In this test, we push the VLAN tag before pushing a MPLS tag, but these
3469 dnl actions are reordered, so we see both of these in the final flow.
3470 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
3473 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)'
3475 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3476 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
3478 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
3479 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3480 mpls,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:54:54,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1
3481 00000000 50 54 00 00 00 07 40 44-44 44 54 54 81 00 20 63
3482 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3483 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3484 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3485 00000040 00 00 00 00
3487 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3488 mpls,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:54:54,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1
3489 00000000 50 54 00 00 00 07 40 44-44 44 54 54 81 00 20 63
3490 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3491 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3492 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3493 00000040 00 00 00 00
3495 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3496 mpls,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:54:54,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1
3497 00000000 50 54 00 00 00 07 40 44-44 44 54 54 81 00 20 63
3498 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3499 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3500 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3501 00000040 00 00 00 00
3504 dnl Modified MPLS controller action.
3505 dnl In this test, the input packet is vlan-tagged, which should be stripped
3506 dnl before we push the MPLS and VLAN tags.
3507 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
3510 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))'
3512 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3513 OVS_APP_EXIT_AND_WAIT([ovs-ofctl])
3515 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
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
3530 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3531 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
3532 00000000 50 54 00 00 00 07 40 44-44 44 54 55 81 00 20 63
3533 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3534 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3535 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3538 dnl Modified MPLS controller action.
3539 dnl In this test, we push the VLAN tag before pushing a MPLS tag, but these
3540 dnl actions are reordered, so we see both of these in the final flow.
3541 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
3544 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)'
3546 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3547 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
3549 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
3550 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3551 mpls,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:54:56,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1
3552 00000000 50 54 00 00 00 07 40 44-44 44 54 56 81 00 20 63
3553 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3554 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3555 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3556 00000040 00 00 00 00
3558 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3559 mpls,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:54:56,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1
3560 00000000 50 54 00 00 00 07 40 44-44 44 54 56 81 00 20 63
3561 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3562 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3563 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3564 00000040 00 00 00 00
3566 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3567 mpls,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:54:56,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1
3568 00000000 50 54 00 00 00 07 40 44-44 44 54 56 81 00 20 63
3569 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3570 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3571 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3572 00000040 00 00 00 00
3575 dnl Modified MPLS controller action.
3576 dnl In this test, the input packet is vlan-tagged, which should be stripped
3577 dnl before we push the MPLS and VLAN tags.
3578 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 -m 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
3581 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))'
3583 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3584 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
3586 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
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
3601 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3602 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
3603 00000000 50 54 00 00 00 07 40 44-44 44 54 57 81 00 20 63
3604 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3605 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3606 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3609 dnl Modified MPLS controller action.
3610 dnl In this test, the input packet is vlan-tagged, which should be stripped
3611 dnl before we push the MPLS and VLAN tags.
3612 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
3615 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))'
3617 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3618 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
3620 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
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
3635 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3636 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
3637 00000000 50 54 00 00 00 07 40 44-44 44 54 58 81 00 20 63
3638 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3639 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3640 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3643 dnl Modified MPLS controller action.
3644 dnl In this test, the input packet is vlan-tagged, which should be modified
3645 dnl before we push MPLS and VLAN tags.
3646 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
3649 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))'
3651 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3652 ovs-appctl -t ovs-ofctl exit
3654 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
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
3669 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3670 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
3671 00000000 50 54 00 00 00 07 40 44-44 44 54 59 81 00 20 63
3672 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3673 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3674 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3677 AT_CHECK([ovs-appctl revalidator/purge], [0])
3678 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
3679 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
3680 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
3681 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
3682 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
3683 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
3684 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
3685 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
3686 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
3687 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
3688 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
3689 OFPST_FLOW reply (OF1.2):
3695 AT_SETUP([ofproto-dpif - fragment handling - trace])
3697 ADD_OF_PORTS([br0], [1], [2], [3], [4], [5], [6], [90])
3698 AT_DATA([flows.txt], [dnl
3699 priority=75 tcp ip_frag=no tp_dst=80 actions=move:OXM_OF_TCP_DST[[]]->OXM_OF_TCP_SRC[[]],output:1
3700 priority=75 tcp ip_frag=first tp_dst=80 actions=move:OXM_OF_TCP_DST[[]]->OXM_OF_TCP_SRC[[]],output:2
3701 priority=50 tcp ip_frag=no actions=move:OXM_OF_TCP_DST[[]]->OXM_OF_TCP_SRC[[]],output:4
3702 priority=50 tcp ip_frag=first actions=move:OXM_OF_TCP_DST[[]]->OXM_OF_TCP_SRC[[]],output:5
3703 priority=50 tcp ip_frag=later actions=output:6
3705 AT_CHECK([ovs-ofctl replace-flows br0 flows.txt])
3707 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"
3708 no_flow="$base_flow,frag=no),tcp(src=12345,dst=80)"
3709 first_flow="$base_flow,frag=first),tcp(src=12345,dst=80)"
3710 later_flow="$base_flow,frag=later)"
3712 # mode no first later
3715 'drop 1 drop drop' \
3724 AT_CHECK([ovs-ofctl set-frags br0 $mode])
3725 for type in no first later; do
3726 eval flow=\$${type}_flow exp_output=\$$type
3727 printf "\n%s\n" "----$mode $type-----"
3728 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
3730 if test $mode = drop && test $type != no; then
3731 echo 'Packets dropped because they are IP fragments and the fragment handling mode is "drop".' >> expout
3732 echo "Datapath actions: $exp_output" >> expout
3733 elif test $type = later; then
3734 echo "Datapath actions: $exp_output" >> expout
3736 echo "Datapath actions: set(tcp(src=80,dst=80)),$exp_output" >> expout
3738 AT_CHECK([grep 'IP fragments' stdout; tail -1 stdout], [0], [expout])
3744 AT_SETUP([ofproto-dpif - fragment handling - upcall])
3746 ADD_OF_PORTS([br0], [1], [2], [3], [4], [5], [6], [90])
3747 AT_DATA([flows.txt], [dnl
3748 priority=75 tcp ip_frag=no tp_dst=80 actions=set_field:81->tcp_dst,output:1
3749 priority=75 tcp ip_frag=first tp_dst=80 actions=set_field:81->tcp_dst,output:2
3750 priority=50 tcp ip_frag=no actions=set_field:81->tcp_dst,output:4
3751 priority=50 tcp ip_frag=first actions=set_field:81->tcp_dst,output:5
3752 priority=50 tcp ip_frag=later actions=output:6
3754 AT_CHECK([ovs-ofctl replace-flows br0 flows.txt])
3756 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"
3757 no_flow="$base_flow,frag=no),tcp(src=12345,dst=80)"
3758 first_flow="$base_flow,frag=first),tcp(src=12345,dst=80)"
3759 later_flow="$base_flow,frag=later)"
3761 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
3765 AT_CHECK([ovs-ofctl set-frags br0 $mode])
3766 for type in no first later; do
3767 eval flow=\$${type}_flow
3768 printf "\n%s\n" "----$mode $type-----"
3770 AT_CHECK([ovs-appctl netdev-dummy/receive p90 "$flow"], [0], [stdout])
3773 AT_CHECK([ovs-appctl dpctl/dump-flows], [0], [dnl
3774 flow-dump from non-dpdk interfaces:
3775 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
3776 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
3777 recirc_id(0),in_port(90),eth_type(0x0800),ipv4(proto=6,frag=later), packets:0, bytes:0, used:never, actions:6
3782 AT_CHECK([ovs-appctl revalidator/purge], [0])
3783 AT_CHECK([ovs-ofctl set-frags br0 $mode])
3784 for type in no first later; do
3785 eval flow=\$${type}_flow
3786 printf "\n%s\n" "----$mode $type-----"
3788 AT_CHECK([ovs-appctl netdev-dummy/receive p90 "$flow"], [0], [stdout])
3791 AT_CHECK([ovs-appctl dpctl/dump-flows], [0], [dnl
3792 flow-dump from non-dpdk interfaces:
3793 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
3794 recirc_id(0),in_port(90),eth_type(0x0800),ipv4(frag=first), packets:0, bytes:0, used:never, actions:drop
3795 recirc_id(0),in_port(90),eth_type(0x0800),ipv4(frag=later), packets:0, bytes:0, used:never, actions:drop
3800 AT_CHECK([ovs-appctl revalidator/purge], [0])
3801 AT_CHECK([ovs-ofctl set-frags br0 $mode])
3802 for type in no first later; do
3803 eval flow=\$${type}_flow
3804 printf "\n%s\n" "----$mode $type-----"
3806 AT_CHECK([ovs-appctl netdev-dummy/receive p90 "$flow"], [0], [stdout])
3809 AT_CHECK([ovs-appctl dpctl/dump-flows], [0], [dnl
3810 flow-dump from non-dpdk interfaces:
3811 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
3812 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
3813 recirc_id(0),in_port(90),eth_type(0x0800),ipv4(proto=6,frag=later), packets:0, bytes:0, used:never, actions:6
3819 AT_SETUP([ofproto-dpif - fragment handling - actions])
3821 ADD_OF_PORTS([br0], [1], [2], [3], [4], [5], [6], [90])
3823 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])
3824 AT_CHECK([tail -2 stderr | sed 's/^.*|WARN|//'], [0], [dnl
3825 source field tcp_dst lacks correct prerequisites
3826 ovs-ofctl: actions are invalid with specified match (OFPBAC_MATCH_INCONSISTENT)
3829 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])
3830 AT_CHECK([tail -2 stderr | sed 's/^.*|WARN|//'], [0], [dnl
3831 destination field tcp_src lacks correct prerequisites
3832 ovs-ofctl: actions are invalid with specified match (OFPBAC_MATCH_INCONSISTENT)
3835 AT_CHECK([ovs-ofctl add-flow br0 "udp,ip_frag=later actions=set_field:8888->udp_src,output:1"], [1], [], [stderr])
3836 AT_CHECK([tail -2 stderr | sed 's/^.*|WARN|//'], [0], [dnl
3837 set_field udp_src lacks correct prerequisities
3838 ovs-ofctl: actions are invalid with specified match (OFPBAC_MATCH_INCONSISTENT)
3841 AT_CHECK([ovs-ofctl add-flow br0 "udp,ip_frag=later actions=load:8888->NXM_OF_UDP_DST[[]],output:1"], [1], [], [stderr])
3842 AT_CHECK([tail -2 stderr | sed 's/^.*|WARN|//'], [0], [dnl
3843 set_field udp_dst lacks correct prerequisities
3844 ovs-ofctl: actions are invalid with specified match (OFPBAC_MATCH_INCONSISTENT)
3847 AT_CHECK([ovs-ofctl add-flow br0 "sctp,ip_frag=later actions=set_field:8888->sctp_src,output:1"], [1], [], [stderr])
3848 AT_CHECK([tail -2 stderr | sed 's/^.*|WARN|//'], [0], [dnl
3849 set_field sctp_src lacks correct prerequisities
3850 ovs-ofctl: actions are invalid with specified match (OFPBAC_MATCH_INCONSISTENT)
3853 AT_CHECK([ovs-ofctl add-flow br0 "sctp,ip_frag=later actions=set_field:8888->sctp_dst,output:1"], [1], [], [stderr])
3854 AT_CHECK([tail -2 stderr | sed 's/^.*|WARN|//'], [0], [dnl
3855 set_field sctp_dst lacks correct prerequisities
3856 ovs-ofctl: actions are invalid with specified match (OFPBAC_MATCH_INCONSISTENT)
3859 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])
3860 AT_CHECK([tail -2 stderr | sed 's/^.*|WARN|//'], [0], [dnl
3861 source field tcp_dst lacks correct prerequisites
3862 ovs-ofctl: actions are invalid with specified match (OFPBAC_MATCH_INCONSISTENT)
3865 AT_DATA([flows.txt], [dnl
3866 priority=75 tcp actions=load:42->OXM_OF_TCP_SRC[[0..7]],output:1
3868 AT_CHECK([ovs-ofctl -O OpenFlow12 replace-flows br0 flows.txt])
3870 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
3874 AT_CHECK([ovs-ofctl set-frags br0 $mode])
3875 for frag in 4000 6000 6008 4010; do
3876 printf "\n%s\n" "----$mode $frag-----"
3878 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"])
3881 AT_CHECK([ovs-appctl dpctl/dump-flows | sed 's/used:[[0-9]].[[0-9]]*s/used:0.001s/'], [0], [dnl
3882 flow-dump from non-dpdk interfaces:
3883 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
3884 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
3885 recirc_id(0),in_port(90),eth_type(0x0800),ipv4(proto=6,frag=later), packets:1, bytes:74, used:0.001s, actions:1
3888 AT_CHECK([ovs-appctl revalidator/purge], [0])
3889 AT_CHECK([ovs-ofctl set-frags br0 $mode])
3890 for frag in 4000 6000 6008 4010; do
3891 printf "\n%s\n" "----$mode $frag truncated transport header -----"
3893 AT_CHECK([ovs-appctl netdev-dummy/receive p90 "0021853763af 0026b98cb0f9 0800 4500 0018 2e24 $frag 40 06 465d ac11370d ac11370b 828b 0016"])
3896 AT_CHECK([ovs-appctl dpctl/dump-flows | sed 's/used:[[0-9]].[[0-9]]*s/used:0.001s/'], [0], [dnl
3897 flow-dump from non-dpdk interfaces:
3898 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
3899 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
3900 recirc_id(0),in_port(90),eth_type(0x0800),ipv4(proto=6,frag=later), packets:1, bytes:60, used:0.001s, actions:1
3903 AT_CHECK([ovs-appctl revalidator/purge], [0])
3904 AT_CHECK([ovs-ofctl set-frags br0 $mode])
3905 for frag in 4000 6000 6001 4002; do
3906 printf "\n%s\n" "----$mode $frag missing transport header-----"
3908 AT_CHECK([ovs-appctl netdev-dummy/receive p90 "0021853763af 0026b98cb0f9 0800 4500 0014 2e24 $frag 40 06 465d ac11370d ac11370b"])
3911 AT_CHECK([ovs-appctl dpctl/dump-flows | sed 's/used:[[0-9]].[[0-9]]*s/used:0.001s/'], [0], [dnl
3912 flow-dump from non-dpdk interfaces:
3913 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
3914 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
3915 recirc_id(0),in_port(90),eth_type(0x0800),ipv4(proto=6,frag=later), packets:1, bytes:60, used:0.001s, actions:1
3921 AT_SETUP([ofproto-dpif - exit])
3923 ADD_OF_PORTS([br0], [1], [2], [3], [10], [11], [12], [13], [14])
3924 AT_DATA([flows.txt], [dnl
3925 in_port=1 actions=output:10,exit,output:11
3926 in_port=2 actions=output:12,resubmit:1,output:12
3927 in_port=3 actions=output:13,resubmit:2,output:14
3929 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
3930 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])
3931 AT_CHECK([tail -1 stdout], [0],
3932 [Datapath actions: 10
3934 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])
3935 AT_CHECK([tail -1 stdout], [0],
3936 [Datapath actions: 12,10
3938 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])
3939 AT_CHECK([tail -1 stdout], [0],
3940 [Datapath actions: 13,12,10
3946 AT_SETUP([ofproto-dpif - mirroring, select_all])
3948 ADD_OF_PORTS([br0], 1, 2, 3)
3950 set Bridge br0 mirrors=@m --\
3951 --id=@p3 get Port p3 --\
3952 --id=@m create Mirror name=mymirror select_all=true output_port=@p3
3954 AT_DATA([flows.txt], [dnl
3955 in_port=1 actions=output:2
3956 in_port=2 actions=output:1
3958 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
3960 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)"
3961 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
3962 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
3963 [Datapath actions: 3,2
3966 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)"
3967 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
3968 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
3969 [Datapath actions: 3,1
3976 AT_SETUP([ofproto-dpif - mirroring, select_src])
3978 ADD_OF_PORTS([br0], 1, 2, 3)
3980 set Bridge br0 mirrors=@m --\
3981 --id=@p1 get Port p1 -- --id=@p3 get Port p3 --\
3982 --id=@m create Mirror name=mymirror select_src_port=@p1 output_port=@p3
3984 AT_DATA([flows.txt], [dnl
3985 in_port=1 actions=output:2
3986 in_port=2 actions=output:1
3988 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
3990 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)"
3991 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
3992 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
3993 [Datapath actions: 3,2
3996 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)"
3997 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
3998 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
3999 [Datapath actions: 1
4004 AT_SETUP([ofproto-dpif - mirroring, OFPP_NONE ingress port])
4006 ADD_OF_PORTS([br0], 1, 2)
4008 set Bridge br0 mirrors=@m --\
4009 --id=@p2 get Port p2 --\
4010 --id=@m create Mirror name=mymirror select_all=true output_port=@p2
4012 AT_CHECK([ovs-ofctl add-flow br0 action=output:1])
4014 # "in_port" defaults to OFPP_NONE if it's not specified.
4015 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"
4016 AT_CHECK([ovs-appctl ofproto/trace br0 "$flow"], [0], [stdout])
4017 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
4018 [Datapath actions: 1,2
4025 AT_SETUP([ofproto-dpif - mirroring, select_dst])
4027 ADD_OF_PORTS([br0], 1, 2, 3)
4029 set Bridge br0 mirrors=@m --\
4030 --id=@p2 get Port p2 -- --id=@p3 get Port p3 --\
4031 --id=@m create Mirror name=mymirror select_dst_port=@p2 output_port=@p3
4033 AT_DATA([flows.txt], [dnl
4034 in_port=1 actions=output:2
4035 in_port=2 actions=output:1
4037 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
4039 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)"
4040 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
4041 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
4042 [Datapath actions: 2,3
4045 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)"
4046 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
4047 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
4048 [Datapath actions: 1
4055 AT_SETUP([ofproto-dpif - mirroring, select_vlan])
4057 ADD_OF_PORTS([br0], 1, 2, 3)
4059 set Bridge br0 mirrors=@m --\
4060 --id=@p2 get Port p2 -- --id=@p3 get Port p3 --\
4061 --id=@m create Mirror name=mymirror select_all=true select_vlan=11 output_port=@p3
4063 AT_DATA([flows.txt], [dnl
4064 in_port=1, actions=output:2
4066 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
4068 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)"
4069 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
4070 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
4071 [Datapath actions: 2
4074 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))"
4075 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
4076 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
4077 [Datapath actions: 2
4080 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))"
4081 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
4082 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
4083 [Datapath actions: 3,2
4090 AT_SETUP([ofproto-dpif - mirroring, output_port])
4092 ADD_OF_PORTS([br0], 1, 2, 3)
4094 set Bridge br0 mirrors=@m --\
4095 --id=@p3 get Port p3 --\
4096 --id=@m create Mirror name=mymirror select_all=true output_port=@p3
4098 AT_DATA([flows.txt], [dnl
4099 in_port=1 actions=mod_vlan_vid:17,output:2
4100 in_port=2 actions=output:1
4102 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
4104 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)"
4105 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
4106 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
4107 [Datapath actions: 3,push_vlan(vid=17,pcp=0),2
4110 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)"
4111 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
4112 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
4113 [Datapath actions: 3,1
4119 AT_SETUP([ofproto-dpif - mirroring, output_vlan])
4121 ADD_OF_PORTS([br0], 1, 2)
4123 set Bridge br0 mirrors=@m --\
4124 --id=@m create Mirror name=mymirror select_all=true output_vlan=12
4126 AT_DATA([flows.txt], [dnl
4127 in_port=1 actions=output:2
4128 in_port=2 actions=mod_vlan_vid:17,output:1
4130 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
4132 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)"
4133 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
4134 actual=`tail -1 stdout | sed 's/Datapath actions: //'`
4136 expected="2,push_vlan(vid=12,pcp=0),1,2,100"
4137 AT_CHECK([ovs-dpctl normalize-actions "$flow" "$expected"], [0], [stdout])
4139 AT_CHECK([ovs-dpctl normalize-actions "$flow" "$actual"], [0], [expout])
4141 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)"
4142 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
4143 actual=`tail -1 stdout | sed 's/Datapath actions: //'`
4145 expected="push_vlan(vid=17,pcp=0),1,pop_vlan,push_vlan(vid=12,pcp=0),1,2,100"
4146 AT_CHECK([ovs-dpctl normalize-actions "$flow" "$expected"], [0], [stdout])
4148 AT_CHECK([ovs-dpctl normalize-actions "$flow" "$actual"], [0], [expout])
4153 # This test verifies that mirror state is preserved across recirculation.
4155 # Otherwise, post-recirculation the ingress and the output to port 4
4156 # would cause the packet to be mirrored to port 3 a second time.
4157 AT_SETUP([ofproto-dpif - mirroring with recirculation])
4159 ADD_OF_PORTS([br0], 1, 2, 3, 4)
4161 set Bridge br0 mirrors=@m --\
4162 --id=@p3 get Port p3 --\
4163 --id=@m create Mirror name=mymirror select_all=true output_port=@p3
4165 AT_DATA([flows.txt], [dnl
4166 in_port=1 actions=2,debug_recirc,4
4168 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
4170 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)"
4171 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow" -generate], [0], [stdout])
4172 AT_CHECK_UNQUOTED([tail -1 stdout], [0], [Datapath actions: 3,2,recirc(0x1)
4174 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow,recirc_id(1)" -generate], [0], [stdout])
4175 AT_CHECK_UNQUOTED([tail -1 stdout], [0], [Datapath actions: 4
4181 # This test verifies that the table ID is preserved across recirculation
4182 # when a resubmit action requires it (because the action is relative to
4183 # the current table rather than specifying a table).
4184 AT_SETUP([ofproto-dpif - resubmit with recirculation])
4186 ADD_OF_PORTS([br0], [1], [2], [3])
4188 AT_DATA([flows.txt], [dnl
4189 table=0 in_port=1 actions=2,resubmit(,1)
4190 table=1 in_port=1 actions=debug_recirc,resubmit:55
4191 table=1 in_port=55 actions=3
4193 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
4195 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)"
4196 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow" -generate], [0], [stdout])
4197 AT_CHECK_UNQUOTED([tail -1 stdout], [0], [Datapath actions: 2,recirc(0x1)
4199 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow,recirc_id(1)" -generate], [0], [stdout])
4200 AT_CHECK_UNQUOTED([tail -1 stdout], [0], [Datapath actions: 3
4206 # Two testcases below are for the ofproto/trace command
4207 # The first one tests all correct syntax:
4208 # ofproto/trace [dp_name] odp_flow [-generate|packet]
4209 # ofproto/trace br_name br_flow [-generate|packet]
4210 AT_SETUP([ofproto-dpif - ofproto/trace command 1])
4211 OVS_VSWITCHD_START([set bridge br0 fail-mode=standalone])
4212 ADD_OF_PORTS([br0], 1, 2, 3)
4214 AT_DATA([flows.txt], [dnl
4215 in_port=1 actions=output:2
4216 in_port=2 actions=output:1
4218 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
4220 odp_flow="in_port(p1)"
4222 # Test command: ofproto/trace odp_flow with in_port as a name.
4223 AT_CHECK([ovs-appctl ofproto/trace "$odp_flow"], [0], [stdout])
4224 AT_CHECK([tail -1 stdout], [0], [dnl
4228 odp_flow="in_port(1)"
4229 # Test command: ofproto/trace odp_flow
4230 AT_CHECK([ovs-appctl ofproto/trace "$odp_flow"], [0], [stdout])
4231 AT_CHECK([tail -1 stdout], [0], [dnl
4235 # Test command: ofproto/trace dp_name odp_flow
4236 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$odp_flow"], [0], [stdout])
4237 AT_CHECK([tail -1 stdout], [0], [dnl
4240 # Test commmand: ofproto/trace br_name br_flow
4241 AT_CHECK([ovs-appctl ofproto/trace br0 "$br_flow"], [0], [stdout])
4242 AT_CHECK([tail -1 stdout], [0], [dnl
4246 # Delete the inserted flows
4247 AT_CHECK([ovs-ofctl del-flows br0 "in_port=1"], [0], [stdout])
4248 AT_CHECK([ovs-ofctl del-flows br0 "in_port=2"], [0], [stdout])
4250 # This section below tests the [-generate] option
4251 odp_flow="in_port(3),eth(src=50:54:00:00:00:05,dst=ff:ff:ff:ff:ff:ff)"
4252 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"
4254 # Test command: ofproto/trace odp_flow
4255 AT_CHECK([ovs-appctl ofproto/trace "$odp_flow"], [0], [stdout])
4256 # Check for no MAC learning entry
4257 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
4261 # Test command: ofproto/trace br_name br_flow
4262 AT_CHECK([ovs-appctl ofproto/trace br0 "$br_flow"], [0], [stdout])
4263 # Check for no MAC learning entry
4264 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
4268 # Test command: ofproto/trace odp_flow -generate
4269 AT_CHECK([ovs-appctl ofproto/trace "$odp_flow" -generate], [0], [stdout])
4270 # Check for the MAC learning entry
4271 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
4273 3 0 50:54:00:00:00:05 ?
4276 # Test command: ofproto/trace dp_name odp_flow -generate
4277 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy \
4278 "in_port(1),eth(src=50:54:00:00:00:06,dst=50:54:00:00:00:05)" \
4279 -generate], [0], [stdout])
4280 # Check for both MAC learning entries
4281 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
4283 3 0 50:54:00:00:00:05 ?
4284 1 0 50:54:00:00:00:06 ?
4287 # Test command: ofproto/trace br_name br_flow -generate
4288 AT_CHECK([ovs-appctl ofproto/trace br0 \
4289 "in_port=2,dl_src=50:54:00:00:00:07,dl_dst=50:54:00:00:00:06" \
4290 -generate], [0], [stdout])
4291 # Check for both MAC learning entries.
4292 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
4294 3 0 50:54:00:00:00:05 ?
4295 1 0 50:54:00:00:00:06 ?
4296 2 0 50:54:00:00:00:07 ?
4299 # This section beflow tests the [packet] option
4300 # The ovs-tcpundump of packets between port1 and port2
4301 pkt1to2="50540000000250540000000108064500001C000100004001F98CC0A80001C0A800020800F7FF00000000"
4302 pkt2to1="50540000000150540000000208064500001C000100004001F98CC0A80002C0A800010800F7FF00000000"
4304 # Construct the MAC learning table
4305 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy \
4306 "in_port(1),eth(src=50:54:00:00:00:01,dst=ff:ff:ff:ff:ff:ff)" \
4307 -generate], [0], [stdout])
4309 # Construct the MAC learning table
4310 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy \
4311 "in_port(2),eth(src=50:54:00:00:00:02,dst=ff:ff:ff:ff:ff:ff)" \
4312 -generate], [0], [stdout])
4314 # Test command: ofproto/trace odp_flow packet
4315 AT_CHECK([ovs-appctl ofproto/trace \
4316 "in_port(1),skb_priority(1),skb_mark(2)" "$pkt1to2"], [0], [stdout])
4317 AT_CHECK([tail -1 stdout], [0], [dnl
4320 AT_CHECK([head -n 2 stdout], [0], [dnl
4322 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
4325 # Test command: ofproto/trace dp_name odp_flow packet
4326 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy \
4327 "in_port(1),skb_priority(1),skb_mark(2)" "$pkt1to2"], [0], [stdout])
4328 AT_CHECK([tail -1 stdout], [0], [dnl
4331 AT_CHECK([head -n 2 stdout], [0], [dnl
4333 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
4336 # Test command: ofproto/trace br_name br_flow packet
4337 AT_CHECK([ovs-appctl ofproto/trace br0 \
4338 "in_port=2,skb_priority=2,pkt_mark=1" "$pkt2to1"], [0], [stdout],[stderr])
4339 AT_CHECK([tail -1 stdout], [0], [dnl
4342 AT_CHECK([head -n 2 stdout], [0], [dnl
4344 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
4350 # The second test tests the corner cases
4351 AT_SETUP([ofproto-dpif - ofproto/trace command 2])
4353 ADD_OF_PORTS([br0], 1, 2)
4356 odp_flow="in_port(1),eth(src=50:54:00:00:00:01,dst=50:54:00:00:00:02)"
4357 br_flow="in_port=1,dl_src=50:54:00:00:00:01,dl_dst=50:54:00:00:00:02"
4359 generate="-generate"
4360 pkt="50540000000250540000000108064500001C000100004001F98CC0A80001C0A800020800F7FF00000000"
4362 # Test incorrect command: ofproto/trace wrong_name odp_flow [-generate|packet]
4368 [AT_CHECK([ovs-appctl ofproto/trace wrong_name "$odp_flow" option],
4370 AT_CHECK([tail -2 stderr], [0], [dnl
4371 Cannot find the datapath
4372 ovs-appctl: ovs-vswitchd: server returned an error
4375 # Test incorrect command: ofproto/trace empty_string odp_flow [-generate|packet]
4381 [AT_CHECK([ovs-appctl ofproto/trace "" "$odp_flow" option],
4383 AT_CHECK([tail -2 stderr], [0], [dnl
4384 Cannot find the datapath
4385 ovs-appctl: ovs-vswitchd: server returned an error
4388 # Test incorrect command: ofproto/trace nonexist_dp_name odp_flow [-generate|packet]
4394 [AT_CHECK([ovs-appctl ofproto/trace ovs-system "$odp_flow" option],
4396 AT_CHECK([tail -2 stderr], [0], [dnl
4397 Cannot find the datapath
4398 ovs-appctl: ovs-vswitchd: server returned an error
4401 # Test incorrect command: ofproto/trace br_name odp_flow [-generate|packet]
4407 [AT_CHECK([ovs-appctl ofproto/trace br0 "$odp_flow" option],
4409 AT_CHECK([tail -2 stderr], [0], [dnl
4410 Cannot find the datapath
4411 ovs-appctl: ovs-vswitchd: server returned an error
4414 # Test incorrect command: ofproto/trace dp_name br_flow [-generate|packet]
4420 [AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$br_flow" option],
4422 AT_CHECK([tail -2 stderr], [0], [dnl
4424 ovs-appctl: ovs-vswitchd: server returned an error
4427 # Test incorrect command: ofproto/trace br_flow [-generate|packet]
4433 [AT_CHECK([ovs-appctl ofproto/trace "$br_flow" option],
4435 AT_CHECK([tail -2 stderr], [0], [dnl
4436 Must specify bridge name
4437 ovs-appctl: ovs-vswitchd: server returned an error
4440 # Test incorrect command: ofproto/trace dp_name odp_flow garbage_option
4441 AT_CHECK([ovs-appctl ofproto/trace \
4442 ovs-dummy "$odp_flow" garbage_option],
4443 [2], [stdout],[stderr])
4444 AT_CHECK([tail -2 stderr], [0], [dnl
4445 Trailing garbage in packet data
4446 ovs-appctl: ovs-vswitchd: server returned an error
4449 # Test incorrect command: ofproto/trace with 4 arguments
4450 AT_CHECK([ovs-appctl ofproto/trace \
4451 arg1, arg2, arg3, arg4], [2], [stdout],[stderr])
4452 AT_CHECK([tail -2 stderr], [0], [dnl
4453 "ofproto/trace" command takes at most 3 arguments
4454 ovs-appctl: ovs-vswitchd: server returned an error
4457 # Test incorrect command: ofproto/trace with 0 argument
4458 AT_CHECK([ovs-appctl ofproto/trace ], [2], [stdout],[stderr])
4459 AT_CHECK([tail -2 stderr], [0], [dnl
4460 "ofproto/trace" command requires at least 1 arguments
4461 ovs-appctl: ovs-vswitchd: server returned an error
4467 # The third test checks that the output of "ovs-dpctl -m" is valid to trace.
4468 AT_SETUP([ofproto-dpif - ofproto/trace from dpctl output])
4469 OVS_VSWITCHD_START([dnl
4470 set Open_vSwitch . other_config:max-idle=10000 \
4471 -- add-port br0 p1 -- set Interface p1 type=dummy])
4473 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)'])
4474 ovs-appctl revalidator/wait
4475 AT_CHECK([ovs-appctl dpif/dump-flows -m br0 | sed 's/, packets.*$//' > dp_flows1.txt])
4477 odp_flow=`cat dp_flows1.txt`
4478 AT_CHECK([ovs-appctl ofproto/trace "$odp_flow" | sed 's/\([[Ff]]low:\).*/\1 <cleared>/'], [0], [dnl
4481 No match, packets dropped because OFPPC_NO_PACKET_IN is set on in_port.
4483 Rule: table=254 cookie=0 priority=0,reg0=0x2
4484 OpenFlow actions=drop
4486 Final flow: <cleared>
4488 Datapath actions: drop
4491 dnl Now, try again without megaflows:
4492 ovs-appctl upcall/disable-megaflows
4494 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)'])
4495 ovs-appctl revalidator/wait
4496 AT_CHECK([ovs-appctl dpif/dump-flows -m br0 | sed 's/, packets.*$//' > dp_flows2.txt])
4498 odp_flow=`cat dp_flows2.txt`
4499 AT_CHECK([ovs-appctl ofproto/trace "$odp_flow" | sed 's/\([[Ff]]low:\).*/\1 <cleared>/'], [0], [dnl
4502 No match, packets dropped because OFPPC_NO_PACKET_IN is set on in_port.
4504 Rule: table=254 cookie=0 priority=0,reg0=0x2
4505 OpenFlow actions=drop
4507 Final flow: <cleared>
4509 Datapath actions: drop
4515 AT_SETUP([ofproto-dpif - ofproto/trace-packet-out])
4517 ADD_OF_PORTS([br0], 1, 2, 3)
4519 AT_DATA([flows.txt], [dnl
4520 in_port=1 actions=output:2
4521 in_port=2 actions=output:1
4523 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
4525 AT_CHECK([ovs-appctl ofproto/trace-packet-out br0 in_port=1 'mod_vlan_vid:123,resubmit(,0)'], [0], [stdout])
4526 AT_CHECK([tail -1 stdout], [0], [dnl
4527 Datapath actions: push_vlan(vid=123,pcp=0),2
4534 m4_define([OFPROTO_TRACE],
4536 AT_CHECK([ovs-appctl ofproto/trace $1 "$flow" $3], [0], [stdout])
4537 actual=`tail -1 stdout | sed 's/Datapath actions: //'`
4539 AT_CHECK([ovs-dpctl normalize-actions "$flow" "$expected" $5],
4542 AT_CHECK([ovs-dpctl normalize-actions "$flow" "$actual" $5],
4545 AT_SETUP([ofproto-dpif - MAC learning])
4546 OVS_VSWITCHD_START([set bridge br0 fail-mode=standalone])
4547 ADD_OF_PORTS([br0], 1, 2, 3)
4549 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)'
4551 # Trace an ARP packet arriving on p3, to create a MAC learning entry.
4554 [in_port(3),eth(src=50:54:00:00:00:05,dst=ff:ff:ff:ff:ff:ff),$arp],
4558 # Check for the MAC learning entry.
4559 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
4561 3 0 50:54:00:00:00:05 ?
4564 # Trace a packet arrival destined for the learned MAC.
4565 # (This will also learn a MAC.)
4568 [in_port(1),eth(src=50:54:00:00:00:06,dst=50:54:00:00:00:05),$arp],
4572 # Check for both MAC learning entries.
4573 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
4575 3 0 50:54:00:00:00:05 ?
4576 1 0 50:54:00:00:00:06 ?
4579 # Trace a packet arrival that updates the first learned MAC entry.
4582 [in_port(2),eth(src=50:54:00:00:00:05,dst=ff:ff:ff:ff:ff:ff),$arp],
4586 # Check that the MAC learning entry was updated.
4587 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
4589 1 0 50:54:00:00:00:06 ?
4590 2 0 50:54:00:00:00:05 ?
4593 # Add another bridge.
4597 -- set bridge br1 datapath-type=dummy])
4598 ADD_OF_PORTS([br1], 4, 5)
4600 # Trace some packet arrivals in br1 to create MAC learning entries there too.
4603 [in_port(4),eth(src=50:54:00:00:00:06,dst=ff:ff:ff:ff:ff:ff),$arp],
4608 [in_port(5),eth(src=50:54:00:00:00:07,dst=ff:ff:ff:ff:ff:ff),$arp],
4612 # Check that the MAC learning entries were added.
4613 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br1 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
4615 4 0 50:54:00:00:00:06 ?
4616 5 0 50:54:00:00:00:07 ?
4619 # Delete port p1 and see that its MAC learning entry disappeared, and
4620 # that the MAC learning entry for the same MAC was also deleted from br1.
4621 AT_CHECK([ovs-vsctl del-port p1])
4622 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
4624 2 0 50:54:00:00:00:05 ?
4626 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br1 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
4628 5 0 50:54:00:00:00:07 ?
4634 AT_SETUP([ofproto-dpif - MAC table overflow])
4636 [set bridge br0 fail-mode=standalone other-config:mac-table-size=10])
4637 ADD_OF_PORTS([br0], 1, 2, 3)
4639 arp='eth_type(0x0806),arp(sip=192.168.0.1,tip=192.168.0.2,op=1,sha=50:54:00:00:00:05,tha=00:00:00:00:00:00)'
4641 AT_CHECK([ovs-appctl time/stop])
4643 # Trace 10 ARP packets arriving on p3, to create MAC learning entries.
4644 for i in 0 1 2 3 4 5 6 7 8 9; do
4647 [in_port(3),eth(src=50:54:00:00:00:0$i,dst=ff:ff:ff:ff:ff:ff),$arp],
4650 ovs-appctl time/warp 1000
4653 # Check for the MAC learning entries.
4654 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/ *[[0-9]]\{1,\}$//' | sort],
4656 3 0 50:54:00:00:00:00
4657 3 0 50:54:00:00:00:01
4658 3 0 50:54:00:00:00:02
4659 3 0 50:54:00:00:00:03
4660 3 0 50:54:00:00:00:04
4661 3 0 50:54:00:00:00:05
4662 3 0 50:54:00:00:00:06
4663 3 0 50:54:00:00:00:07
4664 3 0 50:54:00:00:00:08
4665 3 0 50:54:00:00:00:09
4669 # Trace another ARP packet on another MAC.
4672 [in_port(3),eth(src=50:54:00:00:00:10,dst=ff:ff:ff:ff:ff:ff),$arp],
4676 # Check that the new one chased the oldest one out of the table.
4677 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/' | sort],
4679 3 0 50:54:00:00:00:01 ?
4680 3 0 50:54:00:00:00:02 ?
4681 3 0 50:54:00:00:00:03 ?
4682 3 0 50:54:00:00:00:04 ?
4683 3 0 50:54:00:00:00:05 ?
4684 3 0 50:54:00:00:00:06 ?
4685 3 0 50:54:00:00:00:07 ?
4686 3 0 50:54:00:00:00:08 ?
4687 3 0 50:54:00:00:00:09 ?
4688 3 0 50:54:00:00:00:10 ?
4694 AT_SETUP([ofproto-dpif - MAC table overflow fairness])
4696 [set bridge br0 fail-mode=standalone other-config:mac-table-size=10])
4697 ADD_OF_PORTS([br0], 1, 2, 3, 4, 5, 6)
4699 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)'
4701 AT_CHECK([ovs-appctl time/stop])
4703 # Trace packets with 2 different source MACs arriving on each of the 5
4704 # ports, filling up the 10-entry learning table.
4705 for i in 0 1 2 3 4 5 6 7 8 9; do
4707 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
4708 ovs-appctl time/warp 1000
4711 # Check for the MAC learning entries.
4712 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/ *[[0-9]]\{1,\}$//' | sort],
4714 1 0 50:54:00:00:00:00
4715 1 0 50:54:00:00:00:01
4716 2 0 50:54:00:00:00:02
4717 2 0 50:54:00:00:00:03
4718 3 0 50:54:00:00:00:04
4719 3 0 50:54:00:00:00:05
4720 4 0 50:54:00:00:00:06
4721 4 0 50:54:00:00:00:07
4722 5 0 50:54:00:00:00:08
4723 5 0 50:54:00:00:00:09
4727 # Now trace 16 new MACs on another port.
4728 for i in 0 1 2 3 4 5 6 7 8 9 a b c d e f; do
4729 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
4730 ovs-appctl time/warp 1000
4733 # Check the results.
4735 # Our eviction algorithm on overflow is that an arbitrary (but deterministic)
4736 # one of the ports with the most learned MACs loses the least recently used
4737 # one. Thus, the new port will end up with 3 MACs, 3 of the old ports with 1
4738 # MAC each, and the other 2 of the old ports with 2 MACs each.
4740 # (If someone changes lib/heap.c to do something different with equal-priority
4741 # nodes, then the output below could change, but it would still follow the
4742 # rules explained above.)
4743 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/ *[[0-9]]\{1,\}$//' | sort],
4745 1 0 50:54:00:00:00:01
4746 2 0 50:54:00:00:00:03
4747 3 0 50:54:00:00:00:04
4748 3 0 50:54:00:00:00:05
4749 4 0 50:54:00:00:00:07
4750 5 0 50:54:00:00:00:08
4751 5 0 50:54:00:00:00:09
4752 6 0 50:54:00:00:0d:ff
4753 6 0 50:54:00:00:0e:ff
4754 6 0 50:54:00:00:0f:ff
4760 # CHECK_SFLOW_SAMPLING_PACKET(LOOPBACK_ADDR)
4762 # Test that sFlow samples packets correctly using IPv4/IPv6 sFlow collector
4763 m4_define([CHECK_SFLOW_SAMPLING_PACKET],
4764 [AT_XFAIL_IF([test "$IS_WIN32" = "yes"])
4765 OVS_VSWITCHD_START([set Bridge br0 fail-mode=standalone])
4767 on_exit 'kill `cat test-sflow.pid`'
4768 AT_CHECK([ovstest test-sflow --log-file --detach --no-chdir --pidfile 0:$1 > sflow.log], [0], [], [ignore])
4769 AT_CAPTURE_FILE([sflow.log])
4770 PARSE_LISTENING_PORT([test-sflow.log], [SFLOW_PORT])
4771 ovs-appctl time/stop
4773 ADD_OF_PORTS([br0], 1, 2)
4775 set Interface br0 options:ifindex=1002 -- \
4776 set Interface p1 options:ifindex=1004 -- \
4777 set Interface p2 options:ifindex=1003 -- \
4778 set Bridge br0 sflow=@sf -- \
4779 --id=@sf create sflow targets=\"$1:$SFLOW_PORT\" \
4780 header=128 sampling=1 polling=1 agent=$LOOPBACK_INTERFACE
4782 dnl open with ARP packets to seed the bridge-learning. The output
4783 dnl ifIndex numbers should be reported predictably after that.
4784 dnl Since we set sampling=1 we should see all of these packets
4785 dnl reported. Sorting the output by data-source and seqNo makes
4786 dnl it deterministic. Ensuring that we send at least two packets
4787 dnl into each port means we get to check the seq nos are
4788 dnl incrementing correctly.
4789 dnl because packets from different ports can be handled by separate
4790 dnl threads, put some sleeps
4792 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)'
4794 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)'
4796 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)'
4798 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)'
4799 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)'
4801 dnl sleep long enough to get more than one counter sample
4802 dnl from each datasource so we can check sequence numbers
4803 ovs-appctl time/warp 3000 100
4805 ovs-appctl -t test-sflow exit
4807 AT_CHECK_UNQUOTED([[sort sflow.log | $EGREP 'HEADER|ERROR' | sed 's/ /\
4828 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
4848 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
4868 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
4888 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
4908 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
4911 AT_CHECK_UNQUOTED([[sort sflow.log | $EGREP 'IFCOUNTERS|ERROR|PORTNAME|OPENFLOWPORT' | head -18 | sed 's/ /\
4925 in_broadcasts=4294967295
4928 in_unknownprotos=4294967295
4931 out_multicasts=4294967295
4932 out_broadcasts=4294967295
4948 in_broadcasts=4294967295
4951 in_unknownprotos=4294967295
4954 out_multicasts=4294967295
4955 out_broadcasts=4294967295
4971 in_broadcasts=4294967295
4974 in_unknownprotos=4294967295
4977 out_multicasts=4294967295
4978 out_broadcasts=4294967295
4994 in_broadcasts=4294967295
4997 in_unknownprotos=4294967295
5000 out_multicasts=4294967295
5001 out_broadcasts=4294967295
5017 in_broadcasts=4294967295
5020 in_unknownprotos=4294967295
5023 out_multicasts=4294967295
5024 out_broadcasts=4294967295
5040 in_broadcasts=4294967295
5043 in_unknownprotos=4294967295
5046 out_multicasts=4294967295
5047 out_broadcasts=4294967295
5052 datapath_id=18364758544493064720
5055 datapath_id=18364758544493064720
5058 datapath_id=18364758544493064720
5061 datapath_id=18364758544493064720
5064 datapath_id=18364758544493064720
5067 datapath_id=18364758544493064720
5083 AT_SETUP([ofproto-dpif - sFlow packet sampling - IPv4 collector])
5084 CHECK_SFLOW_SAMPLING_PACKET([127.0.0.1])
5087 AT_SETUP([ofproto-dpif - sFlow packet sampling - IPv6 collector])
5088 AT_SKIP_IF([test $HAVE_IPV6 = no])
5089 CHECK_SFLOW_SAMPLING_PACKET([[[::1]]])
5092 dnl Test sFlow LAG structures
5093 AT_SETUP([ofproto-dpif - sFlow packet sampling - LACP structures])
5094 AT_SKIP_IF([test "$IS_WIN32" = "yes"])
5095 OVS_VSWITCHD_START([dnl
5096 add-bond br0 bond p1 p2 -- \
5097 set Port bond lacp=active bond-mode=active-backup \
5098 other_config:lacp-time="fast" \
5099 other_config:lacp-system-id=11:22:33:44:55:66 \
5100 other_config:lacp-system-priority=54321 -- \
5101 set Interface p1 type=dummy \
5102 other_config:lacp-port-id=11 \
5103 other_config:lacp-port-priority=111 \
5104 other_config:lacp-aggregation-key=3333 -- \
5105 set Interface p2 type=dummy \
5106 other_config:lacp-port-id=22 \
5107 other_config:lacp-port-priority=222 \
5108 other_config:lacp-aggregation-key=3333 ])
5110 on_exit 'kill `cat test-sflow.pid`'
5111 AT_CHECK([ovstest test-sflow --log-file --detach --no-chdir --pidfile 0:127.0.0.1 > sflow.log], [0], [], [ignore])
5112 AT_CAPTURE_FILE([sflow.log])
5113 PARSE_LISTENING_PORT([test-sflow.log], [SFLOW_PORT])
5115 ovs-appctl time/stop
5118 set Interface p1 options:ifindex=1003 -- \
5119 set Bridge br0 sflow=@sf -- \
5120 --id=@sf create sflow targets=\"127.0.0.1:$SFLOW_PORT\" \
5121 header=128 sampling=1 polling=1
5123 dnl sleep long enough to get the sFlow datagram flushed out (may be delayed for up to 1 second)
5124 AT_CHECK([ovs-appctl time/warp 2000 100], [0], [ignore])
5125 AT_CHECK([ovs-appctl revalidator/purge], [0])
5127 ovs-appctl -t test-sflow exit
5128 AT_CHECK([[sort sflow.log | $EGREP 'LACPCOUNTERS|ERROR' | head -n 1 | sed 's/ /\
5131 sysID=11:22:33:44:55:66
5132 partnerID=00:00:00:00:00:00
5139 markerPDUsRx=4294967295
5140 markerRespPDUsRx=4294967295
5141 unknownRx=4294967295
5144 markerPDUsTx=4294967295
5145 markerRespPDUsTx=4294967295
5150 AT_SETUP([ofproto-dpif - sFlow packet sampling - tunnel set])
5151 AT_XFAIL_IF([test "$IS_WIN32" = "yes"])
5152 OVS_VSWITCHD_START([set Bridge br0 fail-mode=standalone])
5154 dnl set up sFlow logging
5155 AT_CHECK([ovstest test-sflow --log-file --detach --no-chdir --pidfile 0:127.0.0.1 > sflow.log], [0], [], [ignore])
5156 AT_CAPTURE_FILE([sflow.log])
5157 PARSE_LISTENING_PORT([test-sflow.log], [SFLOW_PORT])
5158 ovs-appctl time/stop
5160 OVS_VSWITCHD_DISABLE_TUNNEL_PUSH_POP
5161 AT_CHECK([ovs-vsctl add-port br0 gre0 -- set Interface gre0 type=gre \
5162 options:remote_ip=1.1.1.1 options:key=456 ofport_request=3])
5163 AT_CHECK([ovs-vsctl add-port br0 p1 -- set Interface p1 type=dummy ofport_request=4])
5165 AT_CHECK([ovs-ofctl add-flow br0 action=3])
5169 set Bridge br0 sflow=@sf -- \
5170 --id=@sf create sflow targets=\"127.0.0.1:$SFLOW_PORT\" \
5171 header=128 sampling=1 polling=0
5173 dnl introduce a packet that will be flooded to the tunnel
5174 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)'])
5176 dnl sleep long enough to get the sFlow datagram flushed out (may be delayed for up to 1 second)
5177 for i in `seq 1 30`; do
5178 ovs-appctl time/warp 100
5181 ovs-appctl -t test-sflow exit
5183 AT_CHECK_UNQUOTED([[sort sflow.log | $EGREP 'HEADER|ERROR' | sed 's/ /\
5189 tunnel4_out_length=0
5190 tunnel4_out_protocol=47
5191 tunnel4_out_src=0.0.0.0
5192 tunnel4_out_dst=1.1.1.1
5193 tunnel4_out_src_port=0
5194 tunnel4_out_dst_port=0
5195 tunnel4_out_tcp_flags=0
5213 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
5219 AT_SETUP([ofproto-dpif - sFlow packet sampling - tunnel push])
5220 AT_XFAIL_IF([test "$IS_WIN32" = "yes"])
5222 OVS_VSWITCHD_START([add-port br0 p0 -- set Interface p0 type=dummy ofport_request=1 options:ifindex=1010])
5224 dnl set up sFlow logging
5225 AT_CHECK([ovstest test-sflow --log-file --detach --no-chdir --pidfile 0:127.0.0.1 > sflow.log], [0], [], [ignore])
5226 AT_CAPTURE_FILE([sflow.log])
5227 PARSE_LISTENING_PORT([test-sflow.log], [SFLOW_PORT])
5228 ovs-appctl time/stop
5230 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5231 AT_CHECK([ovs-vsctl add-br int-br -- set bridge int-br datapath_type=dummy], [0])
5232 AT_CHECK([ovs-vsctl -- add-port int-br t1 -- set Interface t1 type=gre \
5233 options:remote_ip=1.1.2.92 options:key=456 ofport_request=4\
5234 -- add-port int-br vm1 -- set Interface vm1 type=dummy \
5235 options:ifindex=2011 ofport_request=5
5238 AT_CHECK([ovs-appctl dpif/show], [0], [dnl
5239 dummy@ovs-dummy: hit:0 missed:0
5241 br0 65534/100: (dummy)
5242 p0 1/1: (dummy: ifindex=1010)
5244 int-br 65534/2: (dummy)
5245 t1 4/4: (gre: key=456, remote_ip=1.1.2.92)
5246 vm1 5/3: (dummy: ifindex=2011)
5249 dnl set up route to 1.1.2.92 via br0 and action=normal
5250 AT_CHECK([ovs-appctl ovs/route/add 1.1.2.92/24 br0], [0], [OK
5252 AT_CHECK([ovs-appctl ovs/route/add 192.168.0.0/16 br0], [0], [OK
5254 AT_CHECK([ovs-appctl netdev-dummy/ip4addr br0 1.1.2.88/24], [0], [OK
5256 AT_CHECK([ovs-ofctl add-flow br0 action=normal])
5258 dnl Prime ARP Cache for 1.1.2.92
5259 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)'])
5261 dnl configure sflow on int-br only
5263 set Bridge int-br sflow=@sf -- \
5264 --id=@sf create sflow targets=\"127.0.0.1:$SFLOW_PORT\" \
5265 header=128 sampling=1 polling=0
5267 dnl add rule for int-br to force packet onto tunnel. There is no ifindex
5268 dnl for this port so the sFlow output will just report that it went to
5269 dnl 1 output (out_format=2, out_ifindex=1)
5270 AT_CHECK([ovs-ofctl add-flow int-br "actions=4"])
5272 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)'])
5274 dnl sleep long enough to get the sFlow datagram flushed out (may be delayed for up to 1 second)
5275 for i in `seq 1 30`; do
5276 ovs-appctl time/warp 100
5279 ovs-appctl -t test-sflow exit
5281 AT_CHECK_UNQUOTED([[sort sflow.log | $EGREP 'HEADER|ERROR' | sed 's/ /\
5287 tunnel4_out_length=0
5288 tunnel4_out_protocol=47
5289 tunnel4_out_src=1.1.2.88
5290 tunnel4_out_dst=1.1.2.92
5291 tunnel4_out_src_port=0
5292 tunnel4_out_dst_port=0
5293 tunnel4_out_tcp_flags=0
5311 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
5317 AT_SETUP([ofproto-dpif - sFlow packet sampling - MPLS])
5318 AT_XFAIL_IF([test "$IS_WIN32" = "yes"])
5320 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5321 ADD_OF_PORTS([br0], [1], [2])
5322 AT_DATA([flows.txt], [dnl
5323 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
5324 table=0 dl_src=50:54:00:00:00:0b actions=pop_mpls:0x0800,2
5326 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5328 dnl set up sFlow logging
5329 AT_CHECK([ovstest test-sflow --log-file --detach --no-chdir --pidfile 0:127.0.0.1 > sflow.log], [0], [], [ignore])
5330 AT_CAPTURE_FILE([sflow.log])
5331 PARSE_LISTENING_PORT([test-sflow.log], [SFLOW_PORT])
5332 ovs-appctl time/stop
5336 set Bridge br0 sflow=@sf -- \
5337 --id=@sf create sflow targets=\"127.0.0.1:$SFLOW_PORT\" \
5338 header=128 sampling=1 polling=0
5340 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)'])
5341 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)'])
5343 dnl sleep long enough to get the sFlow datagram flushed out (may be delayed for up to 1 second)
5344 for i in `seq 1 30`; do
5345 ovs-appctl time/warp 100
5348 ovs-appctl -t test-sflow exit
5350 AT_CHECK_UNQUOTED([[sort sflow.log | $EGREP 'HEADER|ERROR' | sed 's/ /\
5379 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
5403 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
5410 # CHECK_NETFLOW_EXPIRATION(LOOPBACK_ADDR)
5412 # Test that basic NetFlow reports flow statistics correctly:
5413 # The initial packet of a flow are correctly accounted.
5414 # Later packets within a flow are correctly accounted.
5415 # Flow actions changing (in this case, due to MAC learning)
5416 # cause a record to be sent.
5417 m4_define([CHECK_NETFLOW_EXPIRATION],
5418 [OVS_VSWITCHD_START([set Bridge br0 fail-mode=standalone])
5419 ADD_OF_PORTS([br0], 1, 2)
5421 ovs-appctl time/stop
5422 on_exit 'kill `cat test-netflow.pid`'
5423 AT_CHECK([ovstest test-netflow --log-file --detach --no-chdir --pidfile 0:$1 > netflow.log], [0], [], [ignore])
5424 AT_CAPTURE_FILE([netflow.log])
5425 PARSE_LISTENING_PORT([test-netflow.log], [NETFLOW_PORT])
5428 set Bridge br0 netflow=@nf -- \
5429 --id=@nf create NetFlow targets=\"$1:$NETFLOW_PORT\" \
5430 engine_id=1 engine_type=2 active_timeout=30 add-id-to-interface=false
5432 for delay in 1000 30000; do
5433 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)'
5434 sleep 1 # ensure the order in which these two packets are processed
5435 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)'
5437 ovs-appctl time/warp $delay
5440 ovs-appctl time/warp 6000
5441 ovs-appctl revalidator/wait
5443 ovs-appctl -t test-netflow exit
5445 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])
5447 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])
5449 combined=`grep "192.168.0.2 > 192.168.0.1, if 2 > 1, 2 pkts, 120 bytes, ICMP 0:0" netflow.log | wc -l`
5450 separate=`grep "192.168.0.2 > 192.168.0.1, if 2 > 1, 1 pkts, 60 bytes, ICMP 0:0" netflow.log | wc -l`
5451 AT_CHECK([test $separate = 2 || test $combined = 1], [0])])
5453 AT_SETUP([ofproto-dpif - NetFlow flow expiration - IPv4 collector])
5454 CHECK_NETFLOW_EXPIRATION([127.0.0.1])
5457 AT_SETUP([ofproto-dpif - NetFlow flow expiration - IPv6 collector])
5458 AT_SKIP_IF([test $HAVE_IPV6 = no])
5459 CHECK_NETFLOW_EXPIRATION([[[::1]]])
5462 # CHECK_NETFLOW_ACTIVE_EXPIRATION(LOOPBACK_ADDR)
5464 # Test that basic NetFlow reports active expirations correctly.
5465 m4_define([CHECK_NETFLOW_ACTIVE_EXPIRATION],
5466 [OVS_VSWITCHD_START([set Bridge br0 fail-mode=standalone])
5467 ADD_OF_PORTS([br0], 1, 2)
5469 on_exit 'kill `cat test-netflow.pid`'
5470 AT_CHECK([ovstest test-netflow --log-file --detach --no-chdir --pidfile 0:$1 > netflow.log], [0], [], [ignore])
5471 AT_CAPTURE_FILE([netflow.log])
5472 PARSE_LISTENING_PORT([test-netflow.log], [NETFLOW_PORT])
5475 set Bridge br0 netflow=@nf -- \
5476 --id=@nf create NetFlow targets=\"$1:$NETFLOW_PORT\" \
5477 engine_id=1 engine_type=2 active_timeout=10 add-id-to-interface=false
5479 AT_CHECK([ovs-appctl time/stop])
5481 while test $n -le 60; do
5484 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)'
5485 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)'
5487 ovs-appctl time/warp 1000
5490 ovs-appctl time/warp 10000
5492 ovs-appctl revalidator/wait
5494 ovs-appctl -t test-netflow exit
5496 # Count the number of reported packets:
5497 # - From source to destination before MAC learning kicks in (just one).
5498 # - From source to destination after that.
5499 # - From destination to source.
5507 pkts=`echo "$line" | sed 's/.*, \([[0-9]]*\) pkts,.*/\1/'`
5514 "seq "*": 192.168.0.1 > 192.168.0.2, if 1 > 65535, "*" pkts, "*" bytes, TCP 1234 > 80, time "*)
5517 "seq "*": 192.168.0.1 > 192.168.0.2, if 1 > 2, "*" pkts, "*" bytes, TCP 1234 > 80, time "*)
5520 "seq "*": 192.168.0.2 > 192.168.0.1, if 2 > 1, "*" pkts, "*" bytes, TCP 80 > 1234, time "*)
5527 eval $counter=\`expr \$$counter + \$pkts\`
5528 n_recs=`expr $n_recs + 1`
5531 # There should be exactly 1 MAC learning packet,
5532 # exactly 59 other packets in that direction,
5533 # and exactly 60 packets in the other direction.
5534 AT_CHECK([echo $n_learn $n_in $n_out $n_other], [0], [1 59 60 0
5537 AT_SETUP([ofproto-dpif - NetFlow active expiration - IPv4 collector])
5538 CHECK_NETFLOW_ACTIVE_EXPIRATION([127.0.0.1])
5541 AT_SETUP([ofproto-dpif - NetFlow active expiration - IPv6 collector])
5542 AT_SKIP_IF([test $HAVE_IPV6 = no])
5543 CHECK_NETFLOW_ACTIVE_EXPIRATION([[[::1]]])
5546 dnl In the absence of an IPFIX collector to verify protocol correctness, simply
5547 dnl configure IPFIX and ensure that sample action generation works at the
5549 AT_SETUP([ofproto-dpif - Basic IPFIX sanity check])
5551 ADD_OF_PORTS([br0], 1, 2)
5553 dnl Sample every packet using bridge-based sampling
5554 AT_CHECK([ovs-vsctl -- set bridge br0 ipfix=@fix -- \
5555 --id=@fix create ipfix targets=\"127.0.0.1:4739\" \
5556 sampling=1], [0], [ignore])
5558 dnl Send some packets that should be sampled
5559 for i in `seq 1 3`; do
5560 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)'])
5562 AT_CHECK([ovs-appctl dpctl/dump-flows | sed 's/.*\(packets:\)/\1/' | sed 's/used:[[0-9]].[[0-9]]*s/used:0.001s/'], [0], [dnl
5563 flow-dump from non-dpdk interfaces:
5564 packets:2, bytes:120, used:0.001s, actions:sample(sample=100.0%,actions(userspace(pid=0,ipfix(output_port=4294967295))))
5567 dnl Remove the IPFIX configuration
5568 AT_CHECK([ovs-vsctl clear bridge br0 ipfix])
5569 AT_CHECK([ovs-appctl revalidator/purge])
5571 dnl Send some more packets, to ensure that these are not sampled.
5572 for i in `seq 1 3`; do
5573 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)'])
5575 AT_CHECK([ovs-appctl dpctl/dump-flows | sed 's/.*\(packets:\)/\1/' | sed 's/used:[[0-9]].[[0-9]]*s/used:0.001s/'], [0], [dnl
5576 flow-dump from non-dpdk interfaces:
5577 packets:2, bytes:120, used:0.001s, actions:drop
5580 OVS_VSWITCHD_STOP(["/sending to collector failed/d"])
5583 AT_SETUP([ofproto-dpif - flow stats])
5585 AT_CHECK([ovs-ofctl add-flow br0 "ip,actions=NORMAL"])
5586 AT_CHECK([ovs-ofctl add-flow br0 "icmp,actions=NORMAL"])
5588 ovs-appctl time/stop
5590 for i in `seq 1 10`; do
5591 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)'
5594 AT_CHECK([ovs-appctl time/warp 1000], [0], [ignore])
5595 AT_CHECK([ovs-appctl revalidator/purge], [0])
5596 AT_CHECK([ovs-ofctl dump-flows br0], [0], [stdout])
5597 AT_CHECK([STRIP_XIDS stdout | sed -n 's/duration=[[0-9]]*\.[[0-9]]*s/duration=0.0s/p' | sort], [0], [dnl
5598 cookie=0x0, duration=0.0s, table=0, n_packets=0, n_bytes=0, idle_age=1, icmp actions=NORMAL
5599 cookie=0x0, duration=0.0s, table=0, n_packets=10, n_bytes=600, idle_age=1, ip actions=NORMAL
5604 AT_SETUP([ofproto-dpif - flow stats, set-n-threads])
5606 AT_CHECK([ovs-ofctl add-flow br0 "ip,actions=NORMAL"])
5607 AT_CHECK([ovs-ofctl add-flow br0 "icmp,actions=NORMAL"])
5609 ovs-appctl time/stop
5611 for i in `seq 1 10`; do
5612 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)'
5615 ovs-appctl time/warp 100
5616 AT_CHECK([ovs-vsctl set Open_vSwitch . other-config:n-revalidator-threads=2])
5617 ovs-appctl time/warp 1000
5619 AT_CHECK([ovs-ofctl dump-flows br0], [0], [stdout])
5620 AT_CHECK([STRIP_XIDS stdout | sed -n 's/duration=[[0-9]]*\.[[0-9]]*s/duration=0.0s/p' | sort], [0], [dnl
5621 cookie=0x0, duration=0.0s, table=0, n_packets=0, n_bytes=0, idle_age=1, icmp actions=NORMAL
5622 cookie=0x0, duration=0.0s, table=0, n_packets=10, n_bytes=600, idle_age=1, ip actions=NORMAL
5627 AT_SETUP([ofproto-dpif - idle_age and hard_age increase over time])
5630 # get_ages DURATION HARD IDLE
5632 # Fetch the flow duration, hard age, and idle age into the variables
5633 # whose names are given as arguments. Rounds DURATION down to the
5634 # nearest integer. If hard_age doesn't appear in the output, sets
5635 # HARD to "none". If idle_age doesn't appear in the output, sets IDLE
5638 AT_CHECK([ovs-ofctl dump-flows br0], [0], [stdout])
5640 duration=`sed -n 's/.*duration=\([[0-9]]*\)\(\.[[0-9]]*\)\{0,1\}s.*/\1/p' stdout`
5641 AT_CHECK([[expr X"$duration" : 'X[0-9][0-9]*$']], [0], [ignore])
5642 AS_VAR_COPY([$1], [duration])
5644 hard=`sed -n 's/.*hard_age=\([[0-9]]*\),.*/\1/p' stdout`
5645 if test X"$hard" = X; then
5648 AT_CHECK([[expr X"$hard" : 'X[0-9][0-9]*$']], [0], [ignore])
5650 AS_VAR_COPY([$2], [hard])
5652 idle=`sed -n 's/.*idle_age=\([[0-9]]*\),.*/\1/p' stdout`
5653 if test X"$idle" = X; then
5656 AT_CHECK([[expr X"$idle" : 'X[0-9][0-9]*$']], [0], [ignore])
5658 AS_VAR_COPY([$3], [idle])
5661 # Add a flow and get its initial hard and idle age.
5662 AT_CHECK([ovs-ofctl add-flow br0 hard_timeout=199,idle_timeout=188,actions=drop])
5663 get_ages duration1 hard1 idle1
5665 ovs-appctl time/stop
5666 # Warp time forward by 10 seconds, then modify the flow's actions.
5667 ovs-appctl time/warp 10000
5668 get_ages duration2 hard2 idle2
5669 AT_CHECK([ovs-ofctl mod-flows br0 actions=flood])
5671 # Warp time forward by 10 seconds.
5672 ovs-appctl time/warp 10000
5673 get_ages duration3 hard3 idle3
5675 # Warp time forward 10 more seconds, then pass some packets through the flow,
5676 # then warp forward a few more times because idle times are only updated
5678 ovs-appctl time/warp 10000
5679 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)'
5680 ovs-appctl time/warp 3000 1000
5682 get_ages duration4 hard4 idle4
5684 printf "duration: %4s => %4s => %4s => %4s\n" $duration1 $duration2 $duration3 $duration4
5685 printf "hard_age: %4s => %4s => %4s => %4s\n" $hard1 $hard2 $hard3 $hard4
5686 printf "idle_age: %4s => %4s => %4s => %4s\n" $idle1 $idle2 $idle3 $idle4
5688 # Duration should increase steadily over time.
5689 AT_CHECK([test $duration1 -lt $duration2])
5690 AT_CHECK([test $duration2 -lt $duration3])
5691 AT_CHECK([test $duration3 -lt $duration4])
5693 # Hard age should be "none" initially because it's the same as flow_duration,
5694 # then it should increase.
5695 AT_CHECK([test $hard1 = none])
5696 AT_CHECK([test $hard2 = none])
5697 AT_CHECK([test $hard3 != none])
5698 AT_CHECK([test $hard4 != none])
5699 AT_CHECK([test $hard3 -lt $hard4])
5701 # Idle age should increase from 1 to 2 to 3, then decrease.
5702 AT_CHECK([test $idle1 -lt $idle2])
5703 AT_CHECK([test $idle2 -lt $idle3])
5704 AT_CHECK([test $idle3 -gt $idle4])
5706 # Check some invariant relationships.
5707 AT_CHECK([test $duration1 = $idle1])
5708 AT_CHECK([test $duration2 = $idle2])
5709 AT_CHECK([test $duration3 = $idle3])
5710 AT_CHECK([test $idle3 -gt $hard3])
5711 AT_CHECK([test $idle4 -lt $hard4])
5712 AT_CHECK([test $hard4 -lt $duration4])
5717 AT_SETUP([ofproto-dpif - fin_timeout])
5719 ovs-appctl time/stop
5720 AT_CHECK([ovs-ofctl add-flow br0 'idle_timeout=60,actions=fin_timeout(idle_timeout=5)'])
5721 AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip], [0],
5723 idle_timeout=60, actions=fin_timeout(idle_timeout=5)
5726 # Check that a TCP SYN packet does not change the timeout. (Because
5727 # flow stats updates are mainly what implements the fin_timeout
5728 # feature, we warp forward a couple of times to ensure that flow stats
5729 # run before re-checking the flow table.)
5730 AT_CHECK([ovs-appctl netdev-dummy/receive br0 0021853763af0026b98cb0f908004500003c2e2440004006465dac11370dac11370b828b0016751e267b00000000a00216d017360000020405b40402080a2d25085f0000000001030307])
5731 AT_CHECK([ovs-appctl time/warp 1000 && ovs-appctl time/warp 1000], [0], [warped
5734 AT_CHECK([ovs-appctl revalidator/purge], [0])
5735 AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip], [0],
5737 n_packets=1, n_bytes=74, idle_timeout=60, actions=fin_timeout(idle_timeout=5)
5739 # Check that a TCP FIN packet does change the timeout.
5740 AT_CHECK([ovs-appctl netdev-dummy/receive br0 0021853763af0026b98cb0f90800451000342e3e40004006463bac11370dac11370b828b0016751e319dfc96399b801100717ae800000101080a2d250a9408579588])
5741 AT_CHECK([ovs-appctl time/warp 1000 && ovs-appctl time/warp 1000], [0], [warped
5744 AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip], [0],
5746 n_packets=2, n_bytes=140, idle_timeout=5, actions=fin_timeout(idle_timeout=5)
5751 AT_SETUP([ofproto-dpif - ovs-appctl dpif/dump-dps])
5752 OVS_VSWITCHD_START([add-br br1 -- set bridge br1 datapath-type=dummy])
5753 ADD_OF_PORTS([br0], [1], [2])
5754 ADD_OF_PORTS([br1], [3])
5756 AT_CHECK([ovs-appctl dpif/dump-dps], [0], [dnl
5763 AT_SETUP([ofproto-dpif - ovs-appctl dpif/show])
5764 OVS_VSWITCHD_START([add-br br1 -- set bridge br1 datapath-type=dummy])
5765 ADD_OF_PORTS([br0], [1], [2])
5766 ADD_OF_PORTS([br1], [3])
5768 AT_CHECK([ovs-appctl dpif/show], [0], [dnl
5769 dummy@ovs-dummy: hit:0 missed:0
5771 br0 65534/100: (dummy)
5775 br1 65534/101: (dummy)
5781 AT_SETUP([ofproto-dpif - ovs-appctl dpif/dump-flows])
5782 # bump max-idle to avoid the flows being reclaimed behind us
5783 OVS_VSWITCHD_START([add-br br1 -- \
5784 set bridge br1 datapath-type=dummy fail-mode=secure -- \
5785 set Open_vSwitch . other_config:max-idle=10000])
5786 ADD_OF_PORTS([br0], [1], [2])
5787 ADD_OF_PORTS([br1], [3])
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 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)'])
5791 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)'])
5792 ovs-appctl revalidator/wait
5793 AT_CHECK([ovs-appctl dpif/dump-flows br0 | STRIP_UFID | STRIP_USED | sort], [0], [dnl
5794 recirc_id(0),in_port(1),eth_type(0x0800),ipv4(frag=no), packets:0, bytes:0, used:never, actions:drop
5795 recirc_id(0),in_port(2),eth_type(0x0800),ipv4(frag=no), packets:0, bytes:0, used:never, actions:drop
5798 AT_CHECK([ovs-appctl dpif/dump-flows br1 | STRIP_UFID | STRIP_USED | sort], [0], [dnl
5799 recirc_id(0),in_port(3),eth_type(0x0800),ipv4(frag=no), packets:0, bytes:0, used:never, actions:drop
5802 AT_CHECK([ovs-appctl dpif/dump-flows -m br0 | STRIP_UFID | STRIP_USED | sort], [0], [dnl
5803 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
5804 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
5807 AT_CHECK([ovs-appctl dpif/dump-flows -m br1 | STRIP_UFID | STRIP_USED | sort], [0], [dnl
5808 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
5814 AT_SETUP([ofproto-dpif - ovs-appctl dpif/get-flow])
5816 OVS_VSWITCHD_START([add-br br1 -- \
5817 set bridge br1 datapath-type=dummy fail-mode=secure -- \
5818 set Open_vSwitch . other_config:max-idle=10000])
5819 ADD_OF_PORTS([br0], [1], [2])
5821 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)'])
5822 ovs-appctl revalidator/wait
5823 AT_CHECK([ovs-appctl dpif/dump-flows -m br0], [0], [stdout])
5825 UFID=`sed -n 's/\(ufid:[[-0-9a-fA-F]]*\).*/\1/p' stdout`
5826 AT_CHECK([ovs-appctl dpctl/get-flow $UFID], [0], [dnl
5827 recirc_id(0),in_port(1),eth_type(0x0800),ipv4(frag=no), packets:0, bytes:0, used:never, actions:drop
5833 AT_SETUP([ofproto-dpif - MPLS actions that result in a userspace action])
5834 OVS_VSWITCHD_START([dnl
5835 add-port br0 p1 -- set Interface p1 type=dummy
5837 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5838 on_exit 'kill `cat ovs-ofctl.pid`'
5840 AT_CAPTURE_FILE([ofctl_monitor.log])
5841 AT_DATA([flows.txt], [dnl
5842 dl_src=60:66:66:66:66:00 actions=push_mpls:0x8847,controller
5843 dl_src=60:66:66:66:66:01 actions=pop_mpls:0x8849,controller
5845 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5847 dnl Packet is sent to userspace because a MPLS push or pop action is applied to
5848 dnl a packet with 2 MPLS LSEs but dpif-netdev can't handle any labels.
5850 dnl The input is a frame with two MPLS labels which tcpdump -vve shows as:
5851 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)
5852 dnl (label 20, exp 0, [S], ttl 32)
5853 dnl (tos 0x0, ttl 64, id 0, offset 0, flags [none], proto TCP (6), length 44, bad cksum 3b78 (->f978)!)
5854 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
5856 for dl_src in 00 01; do
5857 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"])
5859 sleep 1 # wait for the datapath flow installed
5860 AT_CHECK_UNQUOTED([cat ovs-vswitchd.log | STRIP_UFID | FILTER_FLOW_INSTALL | STRIP_USED], [0], [dnl
5861 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))
5862 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))
5869 AT_SETUP([ofproto-dpif - MPLS actions that result in a drop])
5870 OVS_VSWITCHD_START([dnl
5871 add-port br0 p1 -- set Interface p1 type=dummy
5873 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5874 on_exit 'kill `cat ovs-ofctl.pid`'
5876 AT_CAPTURE_FILE([ofctl_monitor.log])
5877 AT_DATA([flows.txt], [dnl
5878 dl_src=60:66:66:66:66:00 actions=push_mpls:0x8847,controller
5879 dl_src=60:66:66:66:66:01 actions=pop_mpls:0x8849,controller
5881 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5883 dnl Packet is dropped because an MPLS PUSH action is applied to a packet with
5884 dnl 4 MPLS LSEs but ovs-vswtichd can only handle up to 3 MPLS LSEs and thus
5885 dnl can't determine the resulting MPLS label after MPLS push/pop actions.
5887 dnl The input is a frame with two MPLS headers which tcpdump -vve shows as:
5888 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)
5889 dnl (label 20, exp 0, ttl 32)
5890 dnl (label 20, exp 0, ttl 32)
5891 dnl (label 20, exp 0, [S], ttl 32)
5892 dnl (tos 0x0, ttl 64, id 0, offset 0, flags [none], proto TCP (6), length 44, bad cksum 3b78 (->f978)!)
5893 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
5895 for dl_src in 00 01; do
5896 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"])
5898 sleep 1 # wait for the datapath flow installed
5899 AT_CHECK_UNQUOTED([cat ovs-vswitchd.log | STRIP_UFID | FILTER_FLOW_INSTALL | STRIP_USED], [0], [dnl
5900 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))
5901 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))
5907 AT_SETUP([ofproto-dpif - patch ports])
5908 OVS_VSWITCHD_START([add-br br1 \
5909 -- set bridge br1 datapath-type=dummy fail-mode=secure \
5910 -- add-port br1 pbr1 -- set int pbr1 type=patch options:peer=pbr0 \
5911 -- add-port br0 pbr0 -- set int pbr0 type=patch options:peer=pbr1])
5913 ADD_OF_PORTS([br0], [2])
5914 ADD_OF_PORTS([br1], [3])
5916 AT_CHECK([ovs-appctl upcall/disable-ufid], [0], [Datapath dumping tersely using UFID disabled
5918 AT_CHECK([ovs-appctl time/stop])
5919 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5921 AT_CHECK([ovs-ofctl add-flow br0 actions=LOCAL,output:1,output:2])
5922 AT_CHECK([ovs-ofctl add-flow br1 actions=LOCAL,output:1,output:3])
5924 for i in $(seq 1 10); do
5925 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)'
5926 if [[ $i -eq 1 ]]; then
5931 for i in $(seq 1 5); do
5932 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)'
5933 if [[ $i -eq 1 ]]; then
5938 AT_CHECK([ovs-appctl time/warp 500], [0],
5941 sleep 1 # wait for log writer
5943 AT_CHECK([ovs-appctl dpif/show], [0], [dnl
5944 dummy@ovs-dummy: hit:13 missed:2
5946 br0 65534/100: (dummy)
5948 pbr0 1/none: (patch: peer=pbr1)
5950 br1 65534/101: (dummy)
5952 pbr1 1/none: (patch: peer=pbr0)
5955 AT_CHECK([cat ovs-vswitchd.log | STRIP_UFID | FILTER_FLOW_INSTALL | STRIP_USED], [0], [dnl
5956 recirc_id=0,ip,in_port=100,vlan_tci=0x0000,nw_frag=no, actions:101,3,2
5957 recirc_id=0,ip,in_port=101,vlan_tci=0x0000,nw_frag=no, actions:100,2,3
5960 AT_CHECK([cat ovs-vswitchd.log | grep -e 'in_port(100).*packets:9' | STRIP_UFID | FILTER_FLOW_DUMP], [0], [dnl
5961 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
5963 AT_CHECK([cat ovs-vswitchd.log | grep -e 'in_port(101).*packets:4' | STRIP_UFID | FILTER_FLOW_DUMP], [0], [dnl
5964 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
5967 AT_CHECK([ovs-ofctl dump-ports br0 pbr0], [0], [dnl
5968 OFPST_PORT reply (xid=0x4): 1 ports
5969 port 1: rx pkts=5, bytes=300, drop=0, errs=0, frame=0, over=0, crc=0
5970 tx pkts=10, bytes=600, drop=0, errs=0, coll=0
5973 AT_CHECK([ovs-ofctl dump-ports br1 pbr1], [0], [dnl
5974 OFPST_PORT reply (xid=0x4): 1 ports
5975 port 1: rx pkts=10, bytes=600, drop=0, errs=0, frame=0, over=0, crc=0
5976 tx pkts=5, bytes=300, drop=0, errs=0, coll=0
5982 AT_SETUP([ofproto-dpif - patch ports - stack])
5983 OVS_VSWITCHD_START([add-br br1 \
5984 -- set bridge br1 datapath-type=dummy fail-mode=secure \
5985 -- add-port br1 pbr1 -- set int pbr1 type=patch options:peer=pbr0 \
5986 -- add-port br0 pbr0 -- set int pbr0 type=patch options:peer=pbr1])
5988 ADD_OF_PORTS([br0], [2])
5989 ADD_OF_PORTS([br1], [3])
5991 AT_CHECK([ovs-appctl upcall/disable-ufid], [0], [Datapath dumping tersely using UFID disabled
5993 AT_CHECK([ovs-appctl time/stop])
5994 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5996 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"])
5997 # Try to pop from empty stack, and push and leave data to stack.
5998 AT_CHECK([ovs-ofctl add-flow br1 "ip actions=pop:OXM_OF_IPV4_DST[[0..31]],push:NXM_NX_REG1[[0..31]],LOCAL"])
6000 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)'
6002 AT_CHECK([ovs-appctl time/warp 500], [0],
6006 OVS_WAIT_UNTIL([test `grep flow_add ovs-vswitchd.log | wc -l` -ge 1])
6008 AT_CHECK([ovs-appctl dpif/show], [0], [dnl
6009 dummy@ovs-dummy: hit:0 missed:1
6011 br0 65534/100: (dummy)
6013 pbr0 1/none: (patch: peer=pbr1)
6015 br1 65534/101: (dummy)
6017 pbr1 1/none: (patch: peer=pbr0)
6020 AT_CHECK([cat ovs-vswitchd.log | STRIP_UFID | FILTER_FLOW_INSTALL | STRIP_USED], [0], [dnl
6021 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
6024 AT_CHECK([cat ovs-vswitchd.log | grep -e '|nx_match|WARN|' | sed "s/^.*|WARN|//"], [0], [dnl
6025 Failed to pop from an empty stack. On flow
6028 OVS_VSWITCHD_STOP(["/Failed to pop from an empty stack/d"])
6031 AT_SETUP([ofproto-dpif - port duration])
6032 OVS_VSWITCHD_START([set Bridge br0 protocols=OpenFlow13])
6033 ADD_OF_PORTS([br0], 1, 2)
6035 ovs-appctl time/stop
6036 ovs-appctl time/warp 10000
6038 AT_CHECK([ovs-ofctl -O openflow13 dump-ports br0], [0], [stdout])
6039 AT_CHECK([sed -n 's/=[[0-9]][[0-9]]\(\.[[0-9]][[0-9]]*\)\{0,1\}s/=?s/p' stdout], [0],
6048 dnl ----------------------------------------------------------------------
6049 AT_BANNER([ofproto-dpif -- megaflows])
6051 AT_SETUP([ofproto-dpif megaflow - port classification])
6053 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
6054 ADD_OF_PORTS([br0], [1], [2])
6055 AT_DATA([flows.txt], [dnl
6056 table=0 in_port=1 actions=output(2)
6058 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
6059 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)'])
6061 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)'])
6063 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
6064 recirc_id=0,ip,in_port=1,vlan_tci=0x0000,nw_frag=no, actions: <del>
6069 AT_SETUP([ofproto-dpif megaflow - L2 classification])
6071 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
6072 ADD_OF_PORTS([br0], [1], [2])
6073 AT_DATA([flows.txt], [dnl
6074 table=0 in_port=1,dl_src=50:54:00:00:00:09 actions=output(2)
6076 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
6077 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)'])
6078 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)'])
6080 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
6081 recirc_id=0,ip,in_port=1,vlan_tci=0x0000,dl_src=50:54:00:00:00:09,nw_frag=no, actions: <del>
6082 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>
6087 AT_SETUP([ofproto-dpif megaflow - L3 classification])
6089 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
6090 ADD_OF_PORTS([br0], [1], [2])
6091 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], [])
6092 AT_DATA([flows.txt], [dnl
6093 table=0 in_port=1,icmp,nw_src=10.0.0.4 actions=output(2)
6095 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
6096 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)'])
6097 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)'])
6099 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
6100 recirc_id=0,icmp,in_port=1,vlan_tci=0x0000,nw_src=10.0.0.4,nw_frag=no, actions: <del>
6101 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>
6106 AT_SETUP([ofproto-dpif megaflow - IPv6 classification])
6108 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
6109 ADD_OF_PORTS([br0], [1], [2])
6110 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], [])
6111 AT_DATA([flows.txt], [dnl
6112 table=0 in_port=1,ipv6,ipv6_src=2001:db8:3c4d:1:2:3:4:5 actions=output(2)
6114 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
6115 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)'])
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(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)'])
6118 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
6119 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>
6120 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>
6125 AT_SETUP([ofproto-dpif megaflow - L4 classification])
6127 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
6128 ADD_OF_PORTS([br0], [1], [2])
6129 AT_DATA([flows.txt], [dnl
6130 table=0 in_port=1,icmp,icmp_type=8 actions=output(2)
6132 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
6133 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)'])
6135 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)'])
6137 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
6138 recirc_id=0,icmp,in_port=1,vlan_tci=0x0000,nw_frag=no,icmp_type=0x8/0xff, actions: <del>
6143 AT_SETUP([ofproto-dpif megaflow - normal])
6145 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
6146 ADD_OF_PORTS([br0], [1], [2])
6147 AT_CHECK([ovs-ofctl add-flow br0 action=normal])
6148 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)'])
6149 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)'])
6151 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
6152 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>
6153 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>
6158 AT_SETUP([ofproto-dpif megaflow - mpls])
6160 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
6161 ADD_OF_PORTS([br0], [1], [2])
6162 AT_DATA([flows.txt], [dnl
6163 table=0 dl_src=50:54:00:00:00:09 actions=push_mpls:0x8847,2
6164 table=0 dl_src=50:54:00:00:00:0b actions=pop_mpls:0x0800,2
6166 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
6167 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)'])
6168 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)'])
6170 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
6171 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>
6172 recirc_id=0,mpls,in_port=1,vlan_tci=0x0000,dl_src=50:54:00:00:00:0b,mpls_bos=1, actions: <del>
6177 # CHECK_MEGAFLOW_NETFLOW(LOOPBACK_ADDR)
6178 m4_define([CHECK_MEGAFLOW_NETFLOW],
6180 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
6181 ADD_OF_PORTS([br0], [1], [2])
6183 dnl NetFlow configuration disables wildcarding relevant fields
6184 on_exit 'kill `cat test-netflow.pid`'
6185 AT_CHECK([ovstest test-netflow --log-file --detach --no-chdir --pidfile 0:$1 > netflow.log], [0], [], [ignore])
6186 AT_CAPTURE_FILE([netflow.log])
6187 PARSE_LISTENING_PORT([test-netflow.log], [NETFLOW_PORT])
6189 set Bridge br0 netflow=@nf -- \
6190 --id=@nf create NetFlow targets=\"$1:$NETFLOW_PORT\" \
6191 engine_id=1 engine_type=2 active_timeout=30 add-id-to-interface=false
6193 AT_CHECK([ovs-ofctl add-flow br0 action=normal])
6194 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)'])
6195 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)'])
6197 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
6198 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>
6199 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>
6203 AT_SETUP([ofproto-dpif megaflow - netflow - IPv4 collector])
6204 CHECK_MEGAFLOW_NETFLOW([127.0.0.1], [IPv4])
6207 AT_SETUP([ofproto-dpif megaflow - netflow - IPv6 collector])
6208 AT_SKIP_IF([test $HAVE_IPV6 = no])
6209 CHECK_MEGAFLOW_NETFLOW([[[::1]]], [IPv6])
6212 AT_SETUP([ofproto-dpif megaflow - normal, active-backup bonding])
6214 [add-port br0 p1 -- set Interface p1 type=dummy ofport_request=1 -- \
6215 add-bond br0 bond0 p2 p3 bond_mode=active-backup -- \
6216 set interface p2 type=dummy ofport_request=2 -- \
6217 set interface p3 type=dummy ofport_request=3])
6218 AT_CHECK([ovs-appctl netdev-dummy/set-admin-state up], 0, [OK
6220 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
6222 AT_CHECK([ovs-ofctl add-flow br0 action=normal])
6223 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)'])
6224 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)'])
6226 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
6227 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>
6228 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>
6233 AT_SETUP([ofproto-dpif megaflow - normal, balance-slb bonding])
6235 [add-port br0 p1 -- set Interface p1 type=dummy ofport_request=1 -- \
6236 add-bond br0 bond0 p2 p3 bond_mode=balance-slb -- \
6237 set interface p2 type=dummy ofport_request=2 -- \
6238 set interface p3 type=dummy ofport_request=3])
6239 AT_CHECK([ovs-appctl netdev-dummy/set-admin-state up], 0, [OK
6241 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
6243 AT_CHECK([ovs-ofctl add-flow br0 action=normal])
6244 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)'])
6245 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)'])
6247 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
6248 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>
6249 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>
6254 AT_SETUP([ofproto-dpif megaflow - normal, balance-tcp bonding])
6255 # Create bond0 on br0 with interfaces p0 and p1
6256 # and bond1 on br1 with interfaces p2 and p3
6257 # with p0 patched to p2 and p1 patched to p3.
6259 [add-bond br0 bond0 p0 p1 bond_mode=balance-tcp lacp=active \
6260 other-config:lacp-time=fast \
6261 other-config:bond-rebalance-interval=0 -- \
6262 set interface p0 type=patch options:peer=p2 ofport_request=1 -- \
6263 set interface p1 type=patch options:peer=p3 ofport_request=2 -- \
6265 set bridge br1 other-config:hwaddr=aa:66:aa:66:00:00 -- \
6266 set bridge br1 datapath-type=dummy other-config:datapath-id=1234 \
6267 fail-mode=secure -- \
6268 add-bond br1 bond1 p2 p3 bond_mode=balance-tcp lacp=active \
6269 other-config:lacp-time=fast \
6270 other-config:bond-rebalance-interval=0 -- \
6271 set interface p2 type=patch options:peer=p0 ofport_request=3 -- \
6272 set interface p3 type=patch options:peer=p1 ofport_request=4 --])
6274 AT_CHECK([ovs-appctl netdev-dummy/set-admin-state up], 0, [OK
6276 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
6277 ADD_OF_PORTS([br0], [7])
6278 AT_CHECK([ovs-ofctl add-flow br0 action=normal])
6279 AT_CHECK([ovs-ofctl add-flow br1 action=normal])
6280 ovs-appctl time/stop
6281 ovs-appctl time/warp 5000
6282 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)'])
6283 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)'])
6285 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
6286 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>
6287 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>
6292 AT_SETUP([ofproto-dpif megaflow - resubmit port action])
6294 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
6295 ADD_OF_PORTS([br0], [1], [2])
6296 AT_DATA([flows.txt], [dnl
6297 table=0 in_port=1,ip actions=resubmit(90)
6298 table=0 in_port=90,dl_src=50:54:00:00:00:09 actions=output(2)
6300 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
6301 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)'])
6302 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)'])
6304 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
6305 recirc_id=0,ip,in_port=1,vlan_tci=0x0000,dl_src=50:54:00:00:00:09,nw_frag=no, actions: <del>
6306 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>
6311 AT_SETUP([ofproto-dpif megaflow - resubmit table action])
6313 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
6314 ADD_OF_PORTS([br0], [1], [2])
6315 AT_DATA([flows.txt], [dnl
6316 table=0 in_port=1,ip actions=resubmit(,1)
6317 table=1 dl_src=50:54:00:00:00:09 actions=output(2)
6319 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
6320 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)'])
6321 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=
6322 1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
6324 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
6325 recirc_id=0,ip,in_port=1,vlan_tci=0x0000,dl_src=50:54:00:00:00:09,nw_frag=no, actions: <del>
6326 recirc_id=0,ip,in_port=1,vlan_tci=0x0000,dl_src=50:54:00:00:00:0b,nw_frag=no, actions: <del>
6331 AT_SETUP([ofproto-dpif megaflow - goto_table action])
6333 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
6334 ADD_OF_PORTS([br0], [1], [2])
6335 AT_DATA([flows.txt], [dnl
6336 table=0 in_port=1,ip actions=goto_table(1)
6337 table=1 dl_src=50:54:00:00:00:09 actions=output(2)
6339 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flows br0 flows.txt])
6340 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)'])
6341 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)'])
6343 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
6344 recirc_id=0,ip,in_port=1,vlan_tci=0x0000,dl_src=50:54:00:00:00:09,nw_frag=no, actions: <del>
6345 recirc_id=0,ip,in_port=1,vlan_tci=0x0000,dl_src=50:54:00:00:00:0b,nw_frag=no, actions: <del>
6350 AT_SETUP([ofproto-dpif megaflow - mirroring, select_all])
6352 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
6353 ADD_OF_PORTS([br0], [1], [2], [3])
6355 set Bridge br0 mirrors=@m --\
6356 --id=@p3 get Port p3 --\
6357 --id=@m create Mirror name=mymirror select_all=true output_port=@p3
6359 AT_DATA([flows.txt], [dnl
6360 in_port=1 actions=output:2
6362 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
6363 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)'])
6365 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)'])
6367 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
6368 recirc_id=0,ip,in_port=1,vlan_tci=0x0000,nw_frag=no, actions: <del>
6373 AT_SETUP([ofproto-dpif megaflow - mirroring, select_vlan])
6375 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
6376 ADD_OF_PORTS([br0], [1], [2], [3])
6378 set Bridge br0 mirrors=@m --\
6379 --id=@p2 get Port p2 -- --id=@p3 get Port p3 --\
6380 --id=@m create Mirror name=mymirror select_all=true select_vlan=11 output_port=@p3
6382 AT_DATA([flows.txt], [dnl
6383 in_port=1 actions=output:2
6385 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
6386 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))'])
6387 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)'])
6389 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
6390 recirc_id=0,ip,in_port=1,dl_vlan=11,nw_frag=no, actions: <del>
6391 recirc_id=0,ip,in_port=1,vlan_tci=0x0000/0x1fff,nw_frag=no, actions: <del>
6396 AT_SETUP([ofproto-dpif megaflow - move action])
6398 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
6399 ADD_OF_PORTS([br0], [1], [2])
6400 AT_DATA([flows.txt], [dnl
6401 table=0 in_port=1 ip,actions=move:NXM_OF_IP_SRC[[]]->NXM_NX_REG0[[]],resubmit(90)
6402 table=0 in_port=90 ip,actions=move:NXM_NX_REG0[[]]->NXM_NX_REG1[[]],resubmit(91)
6403 table=0 in_port=91 reg0=0x0a000002,actions=output(2)
6405 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
6406 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)'])
6407 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)'])
6409 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
6410 recirc_id=0,ip,in_port=1,vlan_tci=0x0000,nw_src=10.0.0.2,nw_frag=no, actions: <del>
6411 recirc_id=0,ip,in_port=1,vlan_tci=0x0000,nw_src=10.0.0.4,nw_frag=no, actions: <del>
6416 AT_SETUP([ofproto-dpif megaflow - push action])
6418 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
6419 ADD_OF_PORTS([br0], [1], [2])
6420 AT_DATA([flows.txt], [dnl
6421 table=0 in_port=1 ip,actions=push:NXM_OF_IP_SRC[[]],output(2)
6423 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
6424 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)'])
6425 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)'])
6427 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
6428 recirc_id=0,ip,in_port=1,vlan_tci=0x0000,nw_src=10.0.0.2,nw_frag=no, actions: <del>
6429 recirc_id=0,ip,in_port=1,vlan_tci=0x0000,nw_src=10.0.0.4,nw_frag=no, actions: <del>
6434 AT_SETUP([ofproto-dpif megaflow - learning])
6436 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
6437 ADD_OF_PORTS([br0], [1], [2])
6438 AT_DATA([flows.txt], [dnl
6439 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
6441 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
6442 ovs-appctl time/stop
6443 # We send each packet twice because the first packet in each flow causes the
6444 # flow table to change and thus revalidations, which (depending on timing)
6445 # can keep a megaflow from being installed. The revalidations are done by
6446 # the second iteration, allowing the flows to be installed.
6448 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)'])
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=0,ttl=64,frag=no),icmp(type=8,code=0)'])
6450 ovs-appctl time/warp 100
6453 dnl The original flow is missing due to a revalidation.
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/0x1fff,dl_src=50:54:00:00:00:09,nw_frag=no, actions: <del>
6456 recirc_id=0,ip,in_port=1,vlan_tci=0x0000/0x1fff,dl_src=50:54:00:00:00:0b,nw_frag=no, actions: <del>
6461 AT_SETUP([ofproto-dpif megaflow - tunnels])
6463 [add-port br0 p1 -- set Interface p1 type=dummy ofport_request=1])
6464 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
6465 AT_CHECK([ovs-vsctl add-port br0 p2 -- set Interface p2 type=gre \
6466 options:remote_ip=1.1.1.1 ofport_request=2 options:key=flow])
6467 AT_CHECK([ovs-vsctl add-port br0 p3 -- set Interface p3 type=dummy \
6469 AT_CHECK([ovs-vsctl add-port br0 p4 -- set Interface p4 type=gre \
6470 options:remote_ip=1.1.1.2 options:tos=inherit options:ttl=inherit \
6471 ofport_request=4 options:key=flow])
6472 AT_DATA([flows.txt], [dnl
6473 in_port=1,actions=output(2)
6474 in_port=3,actions=output(4)
6476 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
6477 dnl ECN bits are always copied out, but don't use 0x3 (CE), since that
6478 dnl will cause the packet to be dropped.
6479 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)'])
6481 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)'])
6482 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)'])
6484 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)'])
6486 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
6487 recirc_id=0,ip,in_port=1,vlan_tci=0x0000,nw_ecn=1,nw_frag=no, actions: <del>
6488 recirc_id=0,ip,in_port=3,vlan_tci=0x0000,nw_tos=0,nw_ecn=1,nw_ttl=64,nw_frag=no, actions: <del>
6489 recirc_id=0,ip,in_port=3,vlan_tci=0x0000,nw_tos=252,nw_ecn=1,nw_ttl=128,nw_frag=no, actions: <del>
6494 AT_SETUP([ofproto-dpif megaflow - dec_ttl])
6496 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
6497 ADD_OF_PORTS([br0], [1], [2])
6498 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], [])
6499 AT_DATA([flows.txt], [dnl
6500 table=0 in_port=1,icmp,nw_src=10.0.0.4 actions=dec_ttl,output(2)
6502 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
6503 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)'])
6504 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)'])
6506 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
6507 recirc_id=0,icmp,in_port=1,vlan_tci=0x0000,nw_src=10.0.0.4,nw_ttl=64,nw_frag=no, actions: <del>
6508 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>
6513 AT_SETUP([ofproto-dpif megaflow - set dl_dst])
6515 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
6516 ADD_OF_PORTS([br0], [1], [2])
6517 AT_DATA([flows.txt], [dnl
6518 table=0 in_port=1 actions=mod_dl_dst(50:54:00:00:00:0a),output(2)
6520 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
6521 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)'])
6522 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)'])
6524 dnl The first packet is essentially a no-op, as the new destination MAC is the
6525 dnl same as the original. The second entry actually updates the destination
6527 AT_CHECK([cat ovs-vswitchd.log | STRIP_UFID | FILTER_FLOW_INSTALL | STRIP_USED], [0], [dnl
6528 recirc_id=0,ip,in_port=1,vlan_tci=0x0000,dl_dst=50:54:00:00:00:0a,nw_frag=no, actions:2
6529 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
6534 AT_SETUP([ofproto-dpif megaflow - disabled])
6536 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
6537 ADD_OF_PORTS([br0], [1], [2])
6538 AT_DATA([flows.txt], [dnl
6539 table=0 in_port=1,ip,nw_dst=10.0.0.1 actions=output(2)
6540 table=0 in_port=1,ip,nw_dst=10.0.0.3 actions=drop
6542 AT_CHECK([ovs-appctl upcall/disable-megaflows], [0], [megaflows disabled
6544 AT_CHECK([ovs-appctl upcall/disable-ufid], [0], [Datapath dumping tersely using UFID disabled
6546 AT_CHECK([ovs-appctl vlog/set dpif_netdev:dbg], [0], [], [])
6547 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
6548 for i in 1 2 3 4; do
6549 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)'])
6550 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)'])
6551 if [[ $i -eq 1 ]]; then
6556 AT_CHECK([cat ovs-vswitchd.log | STRIP_UFID | FILTER_FLOW_INSTALL | STRIP_USED], [0], [dnl
6557 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
6558 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
6560 AT_CHECK([cat ovs-vswitchd.log | STRIP_UFID | FILTER_FLOW_DUMP | grep 'packets:3'], [0], [dnl
6561 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
6562 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
6567 AT_SETUP([ofproto-dpif - datapath port number change])
6568 OVS_VSWITCHD_START([set Bridge br0 fail-mode=standalone])
6569 ADD_OF_PORTS([br0], 1)
6571 # Trace a flow that should output to p1.
6572 AT_CHECK([ovs-appctl ofproto/trace br0 in_port=LOCAL,dl_src=10:20:30:40:50:60],
6574 AT_CHECK([tail -1 stdout], [0], [Datapath actions: 1
6577 # Change p1's port number to 5.
6578 AT_CHECK([ovs-appctl dpif-dummy/change-port-number ovs-dummy p1 5])
6580 # Trace a flow that should output to p1 in its new location.
6581 AT_CHECK([ovs-appctl ofproto/trace br0 in_port=LOCAL,dl_src=10:20:30:40:50:60],
6583 AT_CHECK([tail -1 stdout], [0], [Datapath actions: 5
6588 # Tests the bundling with various bfd and cfm configurations.
6589 AT_SETUP([ofproto - bundle with variable bfd/cfm config])
6590 OVS_VSWITCHD_START([add-br br1 -- set bridge br1 datapath-type=dummy -- \
6591 add-bond br0 br0bond p0 p2 bond-mode=active-backup -- \
6592 add-bond br1 br1bond p1 p3 bond-mode=active-backup -- \
6593 set Interface p1 type=patch options:peer=p0 ofport_request=2 -- \
6594 set Interface p3 type=patch options:peer=p2 ofport_request=4 -- \
6595 set Interface p0 type=patch options:peer=p1 ofport_request=1 -- \
6596 set Interface p2 type=patch options:peer=p3 ofport_request=3 -- \
6597 set Interface p0 bfd:enable=true bfd:min_tx=300 bfd:min_rx=300 -- \
6598 set Interface p0 cfm_mpid=1 -- \
6599 set Interface p1 bfd:enable=true bfd:min_tx=500 bfd:min_rx=500])
6601 ovs-appctl time/stop
6602 # advance the clock to stablize everything.
6603 ovs-appctl time/warp 5000 100
6604 # cfm/show should show 'recv' fault.
6605 AT_CHECK([ovs-appctl cfm/show | sed -n '/^.*fault:.*/p'], [0], [dnl
6608 # bfd/show should show 'up'.
6609 AT_CHECK([ovs-appctl bfd/show | sed -n '/^.*Session State:.*/p'], [0], [dnl
6610 Local Session State: up
6611 Remote Session State: up
6612 Local Session State: up
6613 Remote Session State: up
6615 # bond/show should show 'may-enable: true' for all slaves.
6616 AT_CHECK([ovs-appctl bond/show | sed -n '/^.*may_enable:.*/p'], [0], [dnl
6623 # now disable the bfd on p1.
6624 AT_CHECK([ovs-vsctl set Interface p1 bfd:enable=false])
6625 # advance the clock to stablize everything.
6626 ovs-appctl time/warp 5000 100
6627 # cfm/show should show 'recv' fault.
6628 AT_CHECK([ovs-appctl cfm/show | sed -n '/^.*fault:.*/p'], [0], [dnl
6631 # bfd/show should show 'down'.
6632 AT_CHECK([ovs-appctl bfd/show | sed -n '/^.*Session State:.*/p'], [0], [dnl
6633 Local Session State: down
6634 Remote Session State: down
6636 # bond/show should show 'may-enable: false' for p0.
6637 AT_CHECK([ovs-appctl bond/show br0bond | sed -n '/^.*may_enable:.*/p'], [0], [dnl
6642 # now enable the bfd on p1 and disable bfd on p0.
6643 AT_CHECK([ovs-vsctl set Interface p1 bfd:enable=true])
6644 AT_CHECK([ovs-vsctl set Interface p0 bfd:enable=false])
6645 # advance the clock to stablize everything.
6646 ovs-appctl time/warp 5000 100
6647 # cfm/show should show 'recv' fault.
6648 AT_CHECK([ovs-appctl cfm/show | sed -n '/^.*fault:.*/p'], [0], [dnl
6651 # bfd/show should show 'down'.
6652 AT_CHECK([ovs-appctl bfd/show | sed -n '/^.*Session State:.*/p'], [0], [dnl
6653 Local Session State: down
6654 Remote Session State: down
6656 # bond/show should show 'may-enable: false' for p0 and p1.
6657 AT_CHECK([ovs-appctl bond/show | sed -n '/^.*may_enable:.*/p'], [0], [dnl
6667 AT_SETUP([ofproto-dpif - ofproto-dpif-monitor 1])
6668 OVS_VSWITCHD_START([add-port br0 p0 -- set interface p0 type=gre options:remote_ip=1.2.3.4])
6671 AT_CHECK([ovs-vsctl set interface p0 bfd:enable=true])
6673 OVS_WAIT_UNTIL([grep "monitor thread created" ovs-vswitchd.log])
6674 # disable bfd on p0.
6675 AT_CHECK([ovs-vsctl set interface p0 bfd:enable=false])
6677 OVS_WAIT_UNTIL([grep "monitor thread terminated" ovs-vswitchd.log])
6678 AT_CHECK([cat ovs-vswitchd.log | sed -e '/^.*ofproto_dpif_monitor.*$/d' > ovs-vswitchd.log])
6681 AT_CHECK([ovs-vsctl set interface p0 cfm_mpid=10])
6683 OVS_WAIT_UNTIL([grep "monitor thread created" ovs-vswitchd.log])
6684 # disable cfm on p0.
6685 AT_CHECK([ovs-vsctl remove interface p0 cfm_mpid 10])
6687 OVS_WAIT_UNTIL([grep "monitor thread terminated" ovs-vswitchd.log])
6688 AT_CHECK([cat ovs-vswitchd.log | sed -e '/^.*ofproto_dpif_monitor.*$/d' > ovs-vswitchd.log])
6690 # enable both bfd and cfm on p0.
6691 AT_CHECK([ovs-vsctl set interface p0 bfd:enable=true cfm_mpid=10])
6693 OVS_WAIT_UNTIL([grep "monitor thread created" ovs-vswitchd.log])
6694 # disable bfd on p0.
6695 AT_CHECK([ovs-vsctl set interface p0 bfd:enable=false])
6696 # check log, there should not be the log of thread terminated.
6697 AT_CHECK([sed -n "s/^.*|ofproto_dpif_monitor(monitor[[0-9]]*)|INFO|\(.* terminated\)$/\1/p" ovs-vswitchd.log], [0], [dnl
6699 # reenable bfd on p0.
6700 AT_CHECK([ovs-vsctl set interface p0 bfd:enable=true])
6701 # check log, should still be on log of thread created.
6702 AT_CHECK([sed -n "s/^.*|ofproto_dpif_monitor(monitor[[0-9]]*)|INFO|\(.* created\)$/\1/p" ovs-vswitchd.log], [0], [dnl
6703 monitor thread created
6705 # disable bfd and cfm together.
6706 AT_CHECK([ovs-vsctl set interface p0 bfd:enable=false -- remove interface p0 cfm_mpid 10])
6708 OVS_WAIT_UNTIL([grep "monitor thread terminated" ovs-vswitchd.log])
6713 # this test helps avoid the deadlock between the main thread and monitor thread.
6714 AT_SETUP([ofproto-dpif - ofproto-dpif-monitor 2])
6717 for i in `seq 1 199`
6719 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])
6725 AT_BANNER([ofproto-dpif - flow translation resource limits])
6727 AT_SETUP([ofproto-dpif - infinite resubmit])
6729 AT_CHECK([ovs-ofctl add-flow br0 actions=resubmit:1,resubmit:2,output:3])
6730 AT_CHECK([ovs-appctl -vpoll_loop:off ofproto/trace br0 'eth_dst=ff:ff:ff:ff:ff:ff'],
6732 AT_CHECK([tail -1 stdout], [0],
6733 [Translation failed (Recursion too deep), packet is dropped.
6735 AT_CHECK([grep -c 'resubmit actions recursed over 64 times' stdout],
6738 OVS_VSWITCHD_STOP(["/resubmit actions recursed/d"])
6741 AT_SETUP([ofproto-dpif - exponential resubmit chain])
6743 ADD_OF_PORTS([br0], 1)
6744 (for i in `seq 1 64`; do
6746 echo "in_port=$i, actions=resubmit:$j, resubmit:$j, local"
6748 echo "in_port=65, actions=local") > flows
6749 AT_CHECK([ovs-ofctl add-flows br0 flows])
6750 AT_CHECK([ovs-appctl -vpoll_loop:off ofproto/trace br0 'in_port=1'], [0], [stdout])
6751 AT_CHECK([tail -1 stdout], [0],
6752 [Translation failed (Too many resubmits), packet is dropped.
6754 AT_CHECK([grep -c 'over 4096 resubmit actions' stdout], [0], [1
6756 OVS_VSWITCHD_STOP(["/over.*resubmit actions/d"])
6759 AT_SETUP([ofproto-dpif - too many output actions])
6761 ADD_OF_PORTS([br0], 1)
6762 (for i in `seq 1 12`; do
6764 echo "in_port=$i, actions=resubmit:$j, resubmit:$j, local"
6766 echo "in_port=13, actions=local,local,local,local,local,local,local,local") > flows
6767 AT_CHECK([ovs-ofctl add-flows br0 flows])
6768 AT_CHECK([ovs-appctl -vpoll_loop:off ofproto/trace br0 'in_port=1'], [0], [stdout])
6769 AT_CHECK([grep -c -e '- Uses action(s) not supported by datapath' stdout],
6772 AT_CHECK([grep -c 'resubmits yielded over 64 kB of actions' stdout], [0], [1
6774 OVS_VSWITCHD_STOP(["/resubmits yielded over 64 kB of actions/d"])
6777 AT_SETUP([ofproto-dpif - stack too deep])
6779 ADD_OF_PORTS([br0], 1)
6780 (for i in `seq 1 12`; do
6782 echo "in_port=$i, actions=resubmit:$j, resubmit:$j, local"
6784 push="push:NXM_NX_REG0[[]]"
6785 echo "in_port=13, actions=$push,$push,$push,$push,$push,$push,$push,$push") > flows
6786 AT_CHECK([ovs-ofctl add-flows br0 flows])
6787 AT_CHECK([ovs-appctl -vpoll_loop:off ofproto/trace br0 'in_port=1'], [0], [stdout])
6788 AT_CHECK([tail -1 stdout], [0],
6789 [Translation failed (Stack too deep), packet is dropped.
6791 AT_CHECK([grep -c 'resubmits yielded over 64 kB of stack' stdout], [0], [1
6793 OVS_VSWITCHD_STOP(["/resubmits yielded over 64 kB of stack/d"])
6797 AT_SETUP([ofproto-dpif packet-out controller])
6799 ADD_OF_PORTS([br0], 1, 2)
6801 AT_CHECK([ovs-ofctl add-flow br0 'dl_dst=50:54:00:00:00:0a actions=controller'])
6803 AT_CAPTURE_FILE([ofctl_monitor.log])
6804 AT_CHECK([ovs-ofctl monitor br0 65534 invalid_ttl --detach --no-chdir --pidfile 2> ofctl_monitor.log])
6807 AT_CHECK([ovs-ofctl -O OpenFlow13 packet-out br0 CONTROLLER controller '50540000000a5054000000091234'])
6810 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
6811 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
6812 NXT_PACKET_IN (xid=0x0): total_len=14 in_port=CONTROLLER (via action) data_len=14 (unbuffered)
6813 vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,dl_type=0x1234
6815 NXT_PACKET_IN (xid=0x0): total_len=14 in_port=CONTROLLER (via action) data_len=14 (unbuffered)
6816 vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,dl_type=0x1234
6818 NXT_PACKET_IN (xid=0x0): total_len=14 in_port=CONTROLLER (via action) data_len=14 (unbuffered)
6819 vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,dl_type=0x1234
6822 AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
6823 dl_dst=50:54:00:00:00:0a actions=CONTROLLER:65535
6827 (echo "OFPST_TABLE reply (OF1.3) (xid=0x2):
6829 active=1, lookup=0, matched=0
6832 active=0, lookup=0, matched=0
6834 for i in `seq 2 253`; do
6835 printf ' table %d: ditto\n' $i
6837 AT_CHECK([ovs-ofctl -O OpenFlow13 dump-tables br0 ], [0], [expout])
6842 AT_SETUP([ofproto-dpif packet-out controller (patch port)])
6845 add-port br0 p1 -- \
6846 set interface p1 type=patch options:peer=p2 -- \
6848 set bridge br1 datapath-type=dummy -- \
6849 set bridge br1 fail-mode=secure -- \
6850 set bridge br1 protocols='[OpenFlow10,OpenFlow11,OpenFlow12,OpenFlow13]' -- \
6851 add-port br1 p2 -- \
6852 set interface p2 type=patch options:peer=p1 --])
6854 AT_CAPTURE_FILE([ofctl_monitor.log])
6855 AT_CHECK([ovs-ofctl monitor br1 65534 invalid_ttl --detach --no-chdir --pidfile 2> ofctl_monitor.log])
6858 AT_CHECK([ovs-ofctl -O OpenFlow13 packet-out br0 CONTROLLER output:1 '50540000000a5054000000091234'])
6861 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
6862 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
6863 NXT_PACKET_IN (xid=0x0): cookie=0x0 total_len=14 in_port=1 (via no_match) data_len=14 (unbuffered)
6864 vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,dl_type=0x1234
6866 NXT_PACKET_IN (xid=0x0): cookie=0x0 total_len=14 in_port=1 (via no_match) data_len=14 (unbuffered)
6867 vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,dl_type=0x1234
6869 NXT_PACKET_IN (xid=0x0): cookie=0x0 total_len=14 in_port=1 (via no_match) data_len=14 (unbuffered)
6870 vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,dl_type=0x1234
6873 (echo "OFPST_TABLE reply (OF1.3) (xid=0x2):
6875 active=0, lookup=0, matched=0
6877 for i in `seq 1 253`; do
6878 printf ' table %d: ditto\n' $i
6880 AT_CHECK([ovs-ofctl -O OpenFlow13 dump-tables br0 ], [0], [expout])
6882 (echo "OFPST_TABLE reply (OF1.3) (xid=0x2):
6884 active=0, lookup=3, matched=0
6887 active=0, lookup=0, matched=0
6889 for i in `seq 2 253`; do
6890 printf ' table %d: ditto\n' $i
6892 AT_CHECK([ovs-ofctl -O OpenFlow13 dump-tables br1 ], [0], [expout])
6898 AT_SETUP([ofproto-dpif packet-out goto_table])
6900 ADD_OF_PORTS([br0], 1, 2)
6902 AT_DATA([flows.txt], [dnl
6903 table=0 dl_dst=50:54:00:00:00:0a actions=goto_table(1)
6904 table=1 dl_dst=50:54:00:00:00:0a actions=controller
6906 AT_CHECK([ovs-ofctl -O OpenFlow13 add-flows br0 flows.txt])
6908 AT_CAPTURE_FILE([ofctl_monitor.log])
6909 AT_CHECK([ovs-ofctl monitor br0 65534 invalid_ttl --detach --no-chdir --pidfile 2> ofctl_monitor.log])
6912 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)'
6915 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
6916 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
6917 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
6918 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
6919 vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,dl_type=0x1234
6921 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
6922 vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,dl_type=0x1234
6924 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
6925 vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,dl_type=0x1234
6928 AT_CHECK([ovs-appctl revalidator/purge], [0])
6929 AT_CHECK([ovs-ofctl -O OpenFlow13 dump-flows br0 | ofctl_strip | sort], [0], [dnl
6930 n_packets=3, n_bytes=180, dl_dst=50:54:00:00:00:0a actions=goto_table:1
6931 table=1, n_packets=3, n_bytes=180, dl_dst=50:54:00:00:00:0a actions=CONTROLLER:65535
6932 OFPST_FLOW reply (OF1.3):
6935 (echo "OFPST_TABLE reply (OF1.3) (xid=0x2):
6937 active=1, lookup=3, matched=3
6941 active=0, lookup=0, matched=0
6943 for i in `seq 3 253`; do
6944 printf ' table %d: ditto\n' $i
6946 AT_CHECK([ovs-ofctl -O OpenFlow13 dump-tables br0 ], [0], [expout])
6952 AT_SETUP([ofproto-dpif packet-out table-miss (continue)])
6954 ADD_OF_PORTS([br0], 1, 2)
6956 AT_CHECK([ovs-ofctl -O OpenFlow11 add-flow br0 'table=1 dl_dst=50:54:00:00:00:0a actions=controller'])
6957 AT_CHECK([ovs-ofctl -O OpenFlow11 mod-table br0 all continue])
6959 AT_CAPTURE_FILE([ofctl_monitor.log])
6960 AT_CHECK([ovs-ofctl monitor br0 65534 invalid_ttl --detach --no-chdir --pidfile 2> ofctl_monitor.log])
6963 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)'
6966 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
6967 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
6968 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
6969 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
6970 vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,dl_type=0x1234
6972 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
6973 vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,dl_type=0x1234
6975 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
6976 vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,dl_type=0x1234
6979 AT_CHECK([ovs-appctl revalidator/purge], [0])
6980 AT_CHECK([ovs-ofctl -O OpenFlow11 dump-flows br0 | ofctl_strip | sort], [0], [dnl
6981 table=1, n_packets=3, n_bytes=180, dl_dst=50:54:00:00:00:0a actions=CONTROLLER:65535
6982 OFPST_FLOW reply (OF1.1):
6985 (echo "OFPST_TABLE reply (OF1.3) (xid=0x2):
6987 active=0, lookup=3, matched=0
6990 active=1, lookup=3, matched=3
6993 active=0, lookup=0, matched=0
6995 for i in `seq 3 253`; do
6996 printf ' table %d: ditto\n' $i
6998 AT_CHECK([ovs-ofctl -O OpenFlow13 dump-tables br0 ], [0], [expout])
7003 AT_SETUP([ofproto-dpif - ICMPv6])
7005 ADD_OF_PORTS([br0], 1)
7007 AT_CAPTURE_FILE([ofctl_monitor.log])
7009 AT_CHECK([ovs-ofctl monitor br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
7011 ovs-appctl netdev-dummy/receive p1 '0060970769ea0000860580da86dd6000000000203afffe80000000000000020086fffe0580dafe80000000000000026097fffe0769ea870068bd00000000fe80000000000000026097fffe0769ea01010000860580da'
7013 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
7015 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
7016 NXT_PACKET_IN (xid=0x0): cookie=0x0 total_len=86 in_port=1 (via no_match) data_len=86 (unbuffered)
7017 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
7023 AT_SETUP([ofproto-dpif - Neighbor Discovery set-field with checksum update])
7025 ADD_OF_PORTS([br0], 1)
7026 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])
7028 AT_CAPTURE_FILE([ofctl_monitor.log])
7030 AT_CHECK([ovs-ofctl monitor br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
7032 ovs-appctl netdev-dummy/receive p1 '0060970769ea0000860580da86dd6000000000203afffe80000000000000020086fffe0580dafe80000000000000026097fffe0769ea870068bd00000000fe80000000000000026097fffe0769ea01010000860580da'
7034 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
7036 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
7037 NXT_PACKET_IN (xid=0x0): cookie=0x0 total_len=86 in_port=1 (via action) data_len=86 (unbuffered)
7038 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
7044 # Tests the exact match of CFI bit in installed datapath flows matching VLAN.
7045 AT_SETUP([ofproto-dpif - vlan matching])
7047 [add-port br0 p0 -- set Interface p0 type=dummy ofport_request=1])
7048 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
7050 AT_CHECK([ovs-ofctl del-flows br0])
7051 AT_CHECK([ovs-ofctl add-flow br0 "vlan_tci=0x000a/0x0fff,action=output:local"])
7053 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))'])
7055 OVS_WAIT_UNTIL([grep flow_add: ovs-vswitchd.log])
7056 AT_CHECK([cat ovs-vswitchd.log | grep 'in_port=[[1]]' | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
7057 recirc_id=0,ip,in_port=1,dl_vlan=10,nw_frag=no, actions: <del>
7062 # Tests in place modification of installed datapath flows.
7063 AT_SETUP([ofproto-dpif - in place modification])
7065 [add-port br0 p1 -- set Interface p1 type=dummy ofport_request=1])
7066 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
7068 AT_CHECK([ovs-ofctl del-flows br0])
7069 AT_CHECK([ovs-ofctl add-flow br0 in_port=1,actions=mod_vlan_vid:3,output:local])
7071 ovs-appctl vlog/set PATTERN:ANY:'%c|%p|%m'
7073 ovs-appctl time/stop
7076 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)'
7079 AT_CHECK([ovs-appctl dpif/dump-flows br0 | STRIP_UFID | STRIP_USED | sort], [0], [dnl
7080 recirc_id(0),in_port(1),eth_type(0x1234), packets:2, bytes:120, used:0.0s, actions:push_vlan(vid=3,pcp=0),100
7083 AT_CHECK([ovs-ofctl add-flow br0 priority=60000,in_port=1,actions=mod_vlan_vid:4,output:local])
7085 ovs-appctl time/warp 500
7086 ovs-appctl time/warp 500
7089 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)'
7092 AT_CHECK([ovs-appctl dpif/dump-flows br0 | STRIP_UFID | STRIP_USED | sort], [0], [dnl
7093 recirc_id(0),in_port(1),eth_type(0x1234), packets:5, bytes:300, used:0.0s, actions:push_vlan(vid=4,pcp=0),100
7096 AT_CHECK([cat ovs-vswitchd.log | grep 'modify' | STRIP_UFID ], [0], [dnl
7097 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
7102 # Tests in place modification of installed datapath flows with vlans.
7103 AT_SETUP([ofproto-dpif - in place modification (vlan)])
7105 [add-port br0 p1 -- set Interface p1 type=dummy ofport_request=1])
7106 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
7108 AT_CHECK([ovs-ofctl del-flows br0])
7109 AT_CHECK([ovs-ofctl add-flow br0 in_port=1,actions=output:local])
7111 ovs-appctl vlog/set PATTERN:ANY:'%c|%p|%m'
7113 ovs-appctl time/stop
7115 # Check that a correct datapath flow is created.
7117 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)'
7120 AT_CHECK([ovs-appctl dpif/dump-flows br0 | STRIP_UFID | STRIP_USED | sort], [0], [dnl
7121 recirc_id(0),in_port(1),eth_type(0x1234), packets:2, bytes:120, used:0.0s, actions:100
7124 # Delete the flow. Then check that the datapath flow is modified to
7125 # drop the packets. A modified flow inherits the stats, a new
7126 # datapath flow would start from sero.
7127 AT_CHECK([ovs-ofctl del-flows br0])
7129 ovs-appctl time/warp 500
7130 ovs-appctl time/warp 500
7133 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)'
7136 AT_CHECK([ovs-appctl dpif/dump-flows br0 | STRIP_UFID | STRIP_USED | sort], [0], [dnl
7137 recirc_id(0),in_port(1),eth_type(0x1234), packets:5, bytes:300, used:0.0s, actions:drop
7140 # Add a flow that matches the non-presence of a vlan tag, and check
7141 # that the datapath flow is modified accordingly.
7142 AT_CHECK([ovs-ofctl add-flow br0 in_port=1,vlan_tci=0x0000/0x1fff,actions=output:local])
7144 ovs-appctl time/warp 500
7145 ovs-appctl time/warp 500
7148 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)'
7151 AT_CHECK([ovs-appctl dpif/dump-flows br0 | STRIP_UFID | STRIP_USED | sort], [0], [dnl
7152 recirc_id(0),in_port(1),eth_type(0x1234), packets:8, bytes:480, used:0.0s, actions:100
7155 # Check that VLAN packets will not hit the same datapath megaflow.
7157 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))'
7160 AT_CHECK([ovs-appctl dpif/dump-flows br0 | STRIP_UFID | STRIP_USED | sort], [0], [dnl
7161 recirc_id(0),in_port(1),eth_type(0x1234), packets:8, bytes:480, used:0.0s, actions:100
7162 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
7165 # Check that the new flow matches the CFI bit, while both vid and pcp
7167 AT_CHECK([cat ovs-vswitchd.log | grep '\(modify\)\|\(flow_add\)' | STRIP_UFID ], [0], [dnl
7168 dpif_netdev|DBG|flow_add: recirc_id=0,in_port=1,vlan_tci=0x0000,dl_type=0x1234, actions:100
7169 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)
7170 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
7171 dpif_netdev|DBG|flow_add: recirc_id=0,in_port=1,vlan_tci=0xf063/0x1000,dl_type=0x1234, actions:drop