1 AT_BANNER([ofproto-dpif])
3 AT_SETUP([ofproto-dpif - revalidator/wait])
5 AT_CHECK([ovs-appctl revalidator/wait])
9 AT_SETUP([ofproto-dpif, active-backup bonding])
10 # Create br0 with interfaces p1, p2 and p7, creating bond0 with p1 and p2
11 # and br1 with interfaces p3, p4 and p8.
12 # toggle p1,p2 of bond0 up and down to test bonding in active-backup mode.
14 [add-bond br0 bond0 p1 p2 bond_mode=active-backup --\
15 set interface p1 type=dummy options:pstream=punix:$OVS_RUNDIR/p1.sock ofport_request=1 -- \
16 set interface p2 type=dummy options:pstream=punix:$OVS_RUNDIR/p2.sock ofport_request=2 -- \
17 add-port br0 p7 -- set interface p7 ofport_request=7 type=dummy -- \
19 set bridge br1 other-config:hwaddr=aa:66:aa:66:00:00 -- \
20 set bridge br1 datapath-type=dummy other-config:datapath-id=1234 \
22 add-port br1 p3 -- set interface p3 type=dummy options:stream=unix:$OVS_RUNDIR/p1.sock ofport_request=3 -- \
23 add-port br1 p4 -- set interface p4 type=dummy options:stream=unix:$OVS_RUNDIR/p2.sock ofport_request=4 -- \
24 add-port br1 p8 -- set interface p8 ofport_request=8 type=dummy --])
25 WAIT_FOR_DUMMY_PORTS([p3], [p4])
26 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
28 AT_CHECK([ovs-ofctl add-flow br0 action=normal])
29 AT_CHECK([ovs-ofctl add-flow br1 action=normal])
30 ovs-appctl netdev-dummy/set-admin-state up
31 ovs-appctl time/warp 100
32 ovs-appctl netdev-dummy/set-admin-state p2 down
34 ovs-appctl time/warp 100
35 AT_CHECK([ovs-appctl netdev-dummy/receive p7 'in_port(7),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
36 AT_CHECK([ovs-appctl netdev-dummy/receive p7 'in_port(7),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.3,dst=10.0.0.4,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
37 ovs-appctl time/warp 100
38 ovs-appctl netdev-dummy/set-admin-state p2 up
39 ovs-appctl netdev-dummy/set-admin-state p1 down
40 ovs-appctl time/warp 100
41 AT_CHECK([ovs-appctl netdev-dummy/receive p7 'in_port(7),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0d),eth_type(0x0800),ipv4(src=10.0.0.5,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
42 AT_CHECK([ovs-appctl netdev-dummy/receive p7 'in_port(7),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0e),eth_type(0x0800),ipv4(src=10.0.0.6,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
43 ovs-appctl time/warp 200 100
45 AT_CHECK([cat ovs-vswitchd.log | grep 'in_port=[[348]]' | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
46 recirc_id=0,ip,in_port=3,vlan_tci=0x0000/0x1fff,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,nw_frag=no, actions: <del>
47 recirc_id=0,ip,in_port=3,vlan_tci=0x0000/0x1fff,dl_src=50:54:00:00:00:0b,dl_dst=50:54:00:00:00:0c,nw_frag=no, actions: <del>
48 recirc_id=0,ip,in_port=4,vlan_tci=0x0000/0x1fff,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0d,nw_frag=no, actions: <del>
49 recirc_id=0,ip,in_port=4,vlan_tci=0x0000/0x1fff,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0e,nw_frag=no, actions: <del>
50 recirc_id=0,rarp,in_port=4,vlan_tci=0x0000/0x1fff,dl_src=50:54:00:00:00:09,dl_dst=ff:ff:ff:ff:ff:ff, actions: <del>
51 recirc_id=0,rarp,in_port=4,vlan_tci=0x0000/0x1fff,dl_src=50:54:00:00:00:0b,dl_dst=ff:ff:ff:ff:ff:ff, actions: <del>
56 AT_SETUP([ofproto-dpif, balance-slb bonding])
57 # Create br0 with interfaces bond0(p1, p2, p3) and p7,
58 # and br1 with interfaces p4, p5, p6 and p8.
59 # p1 <-> p4, p2 <-> p5, p3 <-> p6
60 # Send some traffic, make sure the traffic are spread based on source mac.
62 [add-bond br0 bond0 p1 p2 p3 bond_mode=balance-slb --\
63 set interface p1 type=dummy options:pstream=punix:$OVS_RUNDIR/p1.sock ofport_request=1 -- \
64 set interface p2 type=dummy options:pstream=punix:$OVS_RUNDIR/p2.sock ofport_request=2 -- \
65 set interface p3 type=dummy options:pstream=punix:$OVS_RUNDIR/p3.sock ofport_request=3 -- \
66 add-port br0 p7 -- set interface p7 ofport_request=7 type=dummy -- \
68 set bridge br1 other-config:hwaddr=aa:66:aa:66:00:00 -- \
69 set bridge br1 datapath-type=dummy other-config:datapath-id=1234 \
71 add-port br1 p4 -- set interface p4 type=dummy options:stream=unix:$OVS_RUNDIR/p1.sock ofport_request=4 -- \
72 add-port br1 p5 -- set interface p5 type=dummy options:stream=unix:$OVS_RUNDIR/p2.sock ofport_request=5 -- \
73 add-port br1 p6 -- set interface p6 type=dummy options:stream=unix:$OVS_RUNDIR/p3.sock ofport_request=6 -- \
74 add-port br1 p8 -- set interface p8 ofport_request=8 type=dummy --])
75 WAIT_FOR_DUMMY_PORTS([p4], [p5], [p6])
76 AT_CHECK([ovs-ofctl add-flow br0 action=normal])
77 AT_CHECK([ovs-ofctl add-flow br1 action=normal])
78 AT_CHECK([ovs-appctl netdev-dummy/set-admin-state up], 0, [OK
81 ovs-appctl time/warp 100
83 for i in `seq 0 100 |xargs printf '%02x\n'`;
85 pkt="in_port(7),eth(src=50:54:00:00:00:$i,dst=50:54:00:00:01:00),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)"
86 AT_CHECK([ovs-appctl netdev-dummy/receive p7 $pkt])
89 ovs-appctl time/warp 100
90 AT_CHECK([ovs-appctl dpif/dump-flows br1 > br1_flows.txt])
91 # Make sure there is resonable distribution to all three ports.
92 # We don't want to make this check precise, in case hash function changes.
93 AT_CHECK([test `egrep 'in_port\(4\)' br1_flows.txt |wc -l` -gt 3])
94 AT_CHECK([test `egrep 'in_port\(5\)' br1_flows.txt |wc -l` -gt 3])
95 AT_CHECK([test `egrep 'in_port\(6\)' br1_flows.txt |wc -l` -gt 3])
99 AT_SETUP([ofproto-dpif, balance-tcp bonding])
100 # Create br0 with interfaces bond0(p1, p2, p3) and p7,
101 # and br1 with interfaces bond1(p4, p5, p6) and p8.
103 # Send some traffic, make sure the traffic are spread based on L4 headers.
105 [add-bond br0 bond0 p1 p2 p3 bond_mode=balance-tcp lacp=active \
106 other-config:lacp-time=fast other-config:bond-rebalance-interval=0 --\
107 set interface p1 type=dummy options:pstream=punix:$OVS_RUNDIR/p1.sock ofport_request=1 -- \
108 set interface p2 type=dummy options:pstream=punix:$OVS_RUNDIR/p2.sock ofport_request=2 -- \
109 set interface p3 type=dummy options:pstream=punix:$OVS_RUNDIR/p3.sock ofport_request=3 -- \
110 add-port br0 p7 -- set interface p7 ofport_request=7 type=dummy -- \
112 set bridge br1 other-config:hwaddr=aa:66:aa:66:00:00 -- \
113 set bridge br1 datapath-type=dummy other-config:datapath-id=1234 \
114 fail-mode=secure -- \
115 add-bond br1 bond1 p4 p5 p6 bond_mode=balance-tcp lacp=active \
116 other-config:lacp-time=fast other-config:bond-rebalance-interval=0 --\
117 set interface p4 type=dummy options:stream=unix:$OVS_RUNDIR/p1.sock ofport_request=4 -- \
118 set interface p5 type=dummy options:stream=unix:$OVS_RUNDIR/p2.sock ofport_request=5 -- \
119 set interface p6 type=dummy options:stream=unix:$OVS_RUNDIR/p3.sock ofport_request=6 -- \
120 add-port br1 p8 -- set interface p8 ofport_request=8 type=dummy --])
121 AT_CHECK([ovs-appctl netdev-dummy/set-admin-state up], 0, [OK
123 AT_CHECK([ovs-ofctl add-flow br0 action=normal])
124 AT_CHECK([ovs-ofctl add-flow br1 action=normal])
125 AT_CHECK([ovs-appctl upcall/disable-megaflows], [0], [megaflows disabled
127 OVS_WAIT_WHILE([ovs-appctl bond/show | grep "may_enable: false"])
129 ovs-appctl time/warp 100
130 ovs-appctl lacp/show > lacp.txt
131 ovs-appctl bond/show > bond.txt
133 for i in `seq 0 255` ;
135 pkt="in_port(7),eth(src=50:54:00:00:00:05,dst=50:54:00:00:01:00),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=$i),tcp_flags(ack)"
136 AT_CHECK([ovs-appctl netdev-dummy/receive p7 $pkt])
139 ovs-appctl time/warp 300 100
140 AT_CHECK([ovs-appctl dpif/dump-flows br0 |grep tcp > br0_flows.txt])
141 AT_CHECK([ovs-appctl dpif/dump-flows br1 |grep tcp > br1_flows.txt])
142 # Make sure there is resonable distribution to all three ports.
143 # We don't want to make this check precise, in case hash function changes.
144 AT_CHECK([test `grep in_port.4 br1_flows.txt |wc -l` -gt 24])
145 AT_CHECK([test `grep in_port.5 br1_flows.txt |wc -l` -gt 24])
146 AT_CHECK([test `grep in_port.6 br1_flows.txt |wc -l` -gt 24])
151 # Makes sure recirculation does not change the way packet is handled.
152 AT_SETUP([ofproto-dpif, balance-tcp bonding, different recirc flow ])
154 [add-bond br0 bond0 p1 p2 bond_mode=balance-tcp lacp=active \
155 other-config:lacp-time=fast other-config:bond-rebalance-interval=0 -- \
156 set interface p1 type=dummy options:pstream=punix:$OVS_RUNDIR/p1.sock ofport_request=1 -- \
157 set interface p2 type=dummy options:pstream=punix:$OVS_RUNDIR/p2.sock ofport_request=2 -- \
159 set bridge br1 other-config:hwaddr=aa:66:aa:66:00:00 -- \
160 set bridge br1 datapath-type=dummy other-config:datapath-id=1234 \
161 fail-mode=standalone -- \
162 add-bond br1 bond1 p3 p4 bond_mode=balance-tcp lacp=active \
163 other-config:lacp-time=fast other-config:bond-rebalance-interval=0 -- \
164 set interface p3 type=dummy options:stream=unix:$OVS_RUNDIR/p1.sock ofport_request=3 -- \
165 set interface p4 type=dummy options:stream=unix:$OVS_RUNDIR/p2.sock ofport_request=4 -- \
166 add-port br1 br1- -- set interface br1- type=patch options:peer=br1+ ofport_request=100 -- \
168 set bridge br-int other-config:hwaddr=aa:77:aa:77:00:00 -- \
169 set bridge br-int datapath-type=dummy other-config:datapath-id=1235 \
170 fail-mode=secure -- \
171 add-port br-int br1+ -- set interface br1+ type=patch options:peer=br1- ofport_request=101 -- \
172 add-port br-int p5 -- set interface p5 ofport_request=5 type=dummy
174 AT_CHECK([ovs-appctl netdev-dummy/set-admin-state up], 0, [OK
177 # Waits for all ifaces enabled.
178 OVS_WAIT_UNTIL([test `ovs-appctl bond/show | grep -- "may_enable: true" | wc -l` -ge 4])
180 # The dl_vlan flow should not be ever matched,
181 # since recirculation should not change the flow handling.
182 AT_DATA([flows.txt], [dnl
183 table=0 priority=1 in_port=5 actions=mod_vlan_vid:1,output(101)
184 table=0 priority=2 in_port=5 dl_vlan=1 actions=drop
186 AT_CHECK([ovs-ofctl add-flows br-int flows.txt])
188 # Sends a packet to trigger recirculation.
189 # Should generate recirc_id(0x12d),dp_hash(0xc1261ba2/0xff).
190 AT_CHECK([ovs-appctl netdev-dummy/receive p5 "in_port(5),eth(src=50:54:00:00:00:05,dst=50:54:00:00:01:00),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1)"])
192 # Collects flow stats.
193 AT_CHECK([ovs-appctl revalidator/purge], [0])
195 # Checks the flow stats in br1, should only be one flow with non-zero
196 # 'n_packets' from internal table.
197 AT_CHECK([ovs-appctl bridge/dump-flows br1 | ofctl_strip | grep -- "n_packets" | grep -- "table_id" | sed -e 's/dp_hash=0x[[0-9a-f]][[0-9a-f]]*/dp_hash=0x0/' -e 's/output:[[0-9]][[0-9]]*/output/'], [0], [dnl
198 table_id=254, n_packets=1, n_bytes=64, priority=20,recirc_id=0x12d,dp_hash=0x0/0xff,actions=output
201 # Checks the flow stats in br-int, should be only one match.
202 AT_CHECK([ovs-ofctl dump-flows br-int | ofctl_strip | sort], [0], [dnl
203 n_packets=1, n_bytes=60, priority=1,in_port=5 actions=mod_vlan_vid:1,output:101
204 priority=2,in_port=5,dl_vlan=1 actions=drop
211 AT_SETUP([ofproto-dpif - resubmit])
213 ADD_OF_PORTS([br0], [1], [10], [11], [12], [13], [14], [15],
214 [16], [17], [18], [19], [20], [21])
215 AT_DATA([flows.txt], [dnl
216 table=0 in_port=1 priority=1000 icmp actions=output(10),resubmit(2),output(19),resubmit(3),output(21)
217 table=0 in_port=2 priority=1500 icmp actions=output(11),resubmit(,1),output(16),resubmit(2,1),output(18)
218 table=0 in_port=3 priority=2000 icmp actions=output(20)
219 table=1 in_port=1 priority=1000 icmp actions=output(12),resubmit(4,1),output(13),resubmit(3),output(15)
220 table=1 in_port=2 priority=1500 icmp actions=output(17),resubmit(,2)
221 table=1 in_port=3 priority=1500 icmp actions=output(14),resubmit(,2)
223 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
224 AT_CHECK([ovs-appctl ofproto/trace br0 'in_port=1,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,dl_type=0x0800,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_proto=1,nw_tos=0,nw_ttl=128,icmp_type=8,icmp_code=0'], [0], [stdout])
225 AT_CHECK([tail -1 stdout], [0],
226 [Datapath actions: 10,11,12,13,14,15,16,17,18,19,20,21
231 AT_SETUP([ofproto-dpif - goto table])
233 ADD_OF_PORTS([br0], [1], [10], [11])
234 echo "table=0 in_port=1 actions=output(10),goto_table(1)" > flows.txt
235 for i in `seq 1 63`; do echo "table=$i actions=goto_table($(($i+1)))"; done >> flows.txt
236 echo "table=64 actions=output(11)" >> flows.txt
237 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flows br0 flows.txt])
238 AT_CHECK([ovs-appctl ofproto/trace br0 'in_port=1,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,dl_type=0x0800,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_proto=1,nw_tos=0,nw_ttl=128,icmp_type=8,icmp_code=0'], [0], [stdout])
239 AT_CHECK([tail -1 stdout], [0],
240 [Datapath actions: 10,11
245 AT_SETUP([ofproto-dpif - write actions])
247 ADD_OF_PORTS([br0], [1], [10], [11], [12], [13])
248 AT_DATA([flows.txt], [dnl
249 table=0 in_port=1,ip actions=output(10),write_actions(set_field:192.168.3.90->ip_src,output(12)),goto_table(1)
250 table=1 ip actions=write_actions(output(13)),goto_table(2)
251 table=2 ip actions=set_field:192.168.3.91->ip_src,output(11)
253 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flows br0 flows.txt])
254 AT_CHECK([ovs-appctl ofproto/trace br0 'in_port=1,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,dl_type=0x0800,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_proto=1,nw_tos=0,nw_ttl=128,icmp_type=8,icmp_code=0'], [0], [stdout])
255 AT_CHECK([tail -2 stdout], [0],
256 [Megaflow: recirc_id=0,ip,in_port=1,nw_src=192.168.0.1,nw_frag=no
257 Datapath actions: 10,set(ipv4(src=192.168.3.91)),11,set(ipv4(src=192.168.3.90)),13
262 AT_SETUP([ofproto-dpif - modify IPv6 Neighbor Solitication (ND)])
264 ADD_OF_PORTS([br0], [1], [10], [11], [12], [13])
265 AT_DATA([flows.txt], [dnl
266 table=0 in_port=1,icmp6,icmpv6_type=135 actions=output(10),write_actions(set_field:fe80::3->nd_target,set_field:aa:aa:aa:aa:aa:aa->nd_sll,output(12)),goto_table(1)
267 table=1 icmp6 actions=write_actions(output(13)),goto_table(2)
268 table=2 in_port=1,icmp6,icmpv6_type=135 actions=set_field:fe80::4->nd_target,set_field:cc:cc:cc:cc:cc:cc->nd_sll,output(11)
270 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flows br0 flows.txt])
271 AT_CHECK([ovs-appctl ofproto/trace br0 'in_port=1,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,icmp6,ipv6_src=fe80::1,ipv6_dst=fe80::2,nw_tos=0,nw_ttl=128,icmpv6_type=135,nd_target=fe80::2020,nd_sll=66:55:44:33:22:11'], [0], [stdout])
272 AT_CHECK([tail -4 stdout], [0],
273 [Megaflow: recirc_id=0,icmp6,in_port=1,nw_frag=no,icmp_type=135,icmp_code=0x0/0xff,nd_target=fe80::2020,nd_sll=66:55:44:33:22:11
274 Datapath actions: 10,set(nd(target=fe80::4,sll=cc:cc:cc:cc:cc:cc)),11,set(nd(target=fe80::3,sll=aa:aa:aa:aa:aa:aa)),13
275 This flow is handled by the userspace slow path because it:
276 - Uses action(s) not supported by datapath.
281 AT_SETUP([ofproto-dpif - clear actions])
283 ADD_OF_PORTS([br0], [1], [10], [11], [12])
284 AT_DATA([flows.txt], [dnl
285 table=0 in_port=1,ip actions=output(10),write_actions(set_field:192.168.3.90->ip_src,output(12)),goto_table(1)
286 table=1 tcp actions=set_field:91->tp_src,output(11),clear_actions
288 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flows br0 flows.txt])
289 AT_CHECK([ovs-appctl ofproto/trace br0 'in_port=1,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,dl_type=0x0800,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_proto=6,nw_tos=0,nw_ttl=128,tp_src=8,tp_dst=9'], [0], [stdout])
290 AT_CHECK([tail -2 stdout], [0],
291 [Megaflow: recirc_id=0,tcp,in_port=1,nw_frag=no,tp_src=8
292 Datapath actions: 10,set(tcp(src=91)),11
297 AT_SETUP([ofproto-dpif - group chaining not supported])
299 ADD_OF_PORTS([br0], [1], [10], [11])
300 AT_CHECK([ovs-ofctl -O OpenFlow12 add-group br0 'group_id=1234,type=all,bucket=output:10,set_field:192.168.3.90->ip_src,group:123,bucket=output:11'],
302 AT_CHECK([STRIP_XIDS stderr | sed 1q], [0],
303 [OFPT_ERROR (OF1.2): OFPGMFC_CHAINING_UNSUPPORTED
308 AT_SETUP([ofproto-dpif - all group in action list])
310 ADD_OF_PORTS([br0], [1], [10], [11])
311 AT_CHECK([ovs-ofctl -O OpenFlow12 add-group br0 'group_id=1234,type=all,bucket=output:10,set_field:192.168.3.90->ip_src,bucket=output:11'])
312 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=group:1234'])
313 AT_CHECK([ovs-appctl ofproto/trace br0 'in_port=1,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,dl_type=0x0800,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_proto=1,nw_tos=0,nw_ttl=128,icmp_type=8,icmp_code=0'], [0], [stdout])
314 # Must match on the source address to be able to restore it's value for
316 AT_CHECK([tail -2 stdout], [0],
317 [Megaflow: recirc_id=0,ip,in_port=1,nw_src=192.168.0.1,nw_frag=no
318 Datapath actions: set(ipv4(src=192.168.3.90)),10,set(ipv4(src=192.168.0.1)),11
323 AT_SETUP([ofproto-dpif - indirect group in action list])
325 ADD_OF_PORTS([br0], [1], [10])
326 AT_CHECK([ovs-ofctl -O OpenFlow12 add-group br0 group_id=1234,type=indirect,bucket=output:10])
327 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=group:1234'])
328 AT_CHECK([ovs-appctl ofproto/trace br0 'in_port=1,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,dl_type=0x0800,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_proto=1,nw_tos=0,nw_ttl=128,icmp_type=8,icmp_code=0'], [0], [stdout])
329 AT_CHECK([tail -1 stdout], [0],
330 [Datapath actions: 10
335 AT_SETUP([ofproto-dpif - all group in action set])
337 ADD_OF_PORTS([br0], [1], [10], [11])
338 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'])
339 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=write_actions(group:1234)'])
340 AT_CHECK([ovs-appctl ofproto/trace br0 'in_port=1,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,dl_type=0x0800,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_proto=1,nw_tos=0,nw_ttl=128,icmp_type=8,icmp_code=0'], [0], [stdout])
341 # Must match on the source address to be able to restore it's value for
343 AT_CHECK([tail -2 stdout], [0],
344 [Megaflow: recirc_id=0,ip,in_port=1,nw_src=192.168.0.1,nw_frag=no
345 Datapath actions: set(ipv4(src=192.168.3.90)),10,set(ipv4(src=192.168.0.1)),11
350 AT_SETUP([ofproto-dpif - indirect group in action set])
352 ADD_OF_PORTS([br0], [1], [10])
353 AT_CHECK([ovs-ofctl -O OpenFlow12 add-group br0 group_id=1234,type=indirect,bucket=output:10])
354 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=write_actions(group:1234)'])
355 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])
356 AT_CHECK([tail -1 stdout], [0],
357 [Datapath actions: 10
362 AT_SETUP([ofproto-dpif - select group])
364 ADD_OF_PORTS([br0], [1], [10], [11])
365 AT_CHECK([ovs-ofctl -O OpenFlow12 add-group br0 'group_id=1234,type=select,bucket=output:10,bucket=output:11'])
366 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=write_actions(group:1234)'])
368 # Try a bunch of different flows and make sure that they get distributed
370 for d in 0 1 2 3 4 5 6 7 8 9 a b c d e f; do
371 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])
372 tail -1 stdout >> results
374 sort results | uniq -c
375 AT_CHECK([sort results | uniq], [0],
376 [Datapath actions: 10
382 AT_SETUP([ofproto-dpif - select group with watch port])
384 ADD_OF_PORTS([br0], [1], [10], [11])
385 AT_CHECK([ovs-ofctl -O OpenFlow12 add-group br0 'group_id=1234,type=select,bucket=watch_port:10,output:10,bucket=output:11'])
386 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=write_actions(group:1234)'])
387 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])
388 AT_CHECK([tail -1 stdout], [0],
389 [Datapath actions: 11
394 AT_SETUP([ofproto-dpif - select group with weight])
396 ADD_OF_PORTS([br0], [1], [10], [11], [12])
397 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'])
398 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=write_actions(group:1234)'])
399 AT_CHECK([ovs-appctl ofproto/trace br0 'in_port=1,dl_src=50:54:00:00:00:07,dl_dst=50:54:00:00:00:07,dl_type=0x0800,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_proto=1,nw_tos=0,nw_ttl=128,icmp_type=8,icmp_code=0'], [0], [stdout])
400 AT_CHECK([tail -1 stdout], [0],
401 [Datapath actions: 11
406 AT_SETUP([ofproto-dpif - select group with hash selection method])
408 ADD_OF_PORTS([br0], [1], [10], [11])
409 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'])
410 AT_CHECK([ovs-ofctl -O OpenFlow15 add-flow br0 'ip actions=write_actions(group:1234)'])
412 # Try a bunch of different flows and make sure that they get distributed
414 for d in 0 1 2 3 4 5 6 7 8 9 a b c d e f; do
415 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])
416 tail -1 stdout >> results
418 sort results | uniq -c
419 AT_CHECK([sort results | uniq], [0],
420 [Datapath actions: 10
425 # Try a bunch of different flows and make sure that they are not distributed
426 # as they only vary a field that is not hashed
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:$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])
429 tail -1 stdout >> results
431 sort results | uniq -c
432 AT_CHECK([sort results | uniq], [0],
433 [Datapath actions: 10
439 AT_SETUP([ofproto-dpif - fast failover group])
441 ADD_OF_PORTS([br0], [1], [10], [11])
442 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'])
443 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=write_actions(group:1234)'])
444 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])
445 AT_CHECK([tail -1 stdout], [0],
446 [Datapath actions: drop
451 AT_SETUP([ofproto-dpif - group stats single bucket])
453 ADD_OF_PORTS([br0], [1], [10], [11])
454 AT_CHECK([ovs-ofctl -O OpenFlow12 add-group br0 'group_id=1234,type=select,bucket=output:10,weight=2000,bucket=output:11,weight=0'])
455 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=write_actions(group:1234)'])
459 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)"
460 AT_CHECK([ovs-appctl netdev-dummy/receive p1 $pkt])
463 AT_CHECK([ovs-appctl revalidator/purge], [0])
464 AT_CHECK([ovs-ofctl -O OpenFlow12 -vwarn dump-group-stats br0], [0], [stdout])
465 AT_CHECK([STRIP_XIDS stdout | sort], [0], [dnl
466 group_id=1234,ref_count=0,packet_count=3,byte_count=180,bucket0:packet_count=3,byte_count=180,bucket1:packet_count=0,byte_count=0
467 OFPST_GROUP reply (OF1.2):
472 AT_SETUP([ofproto-dpif - group stats all buckets])
474 ADD_OF_PORTS([br0], [1], [10], [11])
475 AT_CHECK([ovs-ofctl -O OpenFlow12 add-group br0 'group_id=1234,type=all,bucket=output:10,bucket=output:11'])
476 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=write_actions(group:1234)'])
480 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)"
481 AT_CHECK([ovs-appctl netdev-dummy/receive p1 $pkt])
484 AT_CHECK([ovs-appctl revalidator/purge], [0])
485 AT_CHECK([ovs-ofctl -O OpenFlow12 -vwarn dump-group-stats br0], [0], [stdout])
486 AT_CHECK([STRIP_XIDS stdout | sort], [0], [dnl
487 group_id=1234,ref_count=0,packet_count=3,byte_count=180,bucket0:packet_count=3,byte_count=180,bucket1:packet_count=3,byte_count=180
488 OFPST_GROUP reply (OF1.2):
493 AT_SETUP([ofproto-dpif - registers])
495 ADD_OF_PORTS([br0], [20], [21], [22], [33], [90])
496 AT_DATA([flows.txt], [dnl
497 in_port=90 actions=resubmit:2,resubmit:3,resubmit:4,resubmit:91
498 in_port=91 actions=resubmit:5,resubmit:6,resubmit:7,resubmit:92
499 in_port=92 actions=resubmit:8,resubmit:9,resubmit:10,resubmit:11,resubmit:93
500 in_port=93 actions=resubmit:12,resubmit:13,resubmit:14,resubmit:15
502 in_port=2 actions=load:0x000db000->NXM_NX_REG0[[]]
503 in_port=3 actions=load:0xdea->NXM_NX_REG0[[20..31]]
504 in_port=4 actions=load:0xeef->NXM_NX_REG0[[0..11]]
505 in_port=5 actions=move:NXM_NX_REG0[[]]->NXM_NX_REG1[[]]
506 in_port=6 actions=load:0x22222222->NXM_NX_REG2[[]]
507 in_port=7 actions=move:NXM_NX_REG1[[20..31]]->NXM_NX_REG2[[0..11]]
508 in_port=8 actions=move:NXM_NX_REG1[[0..11]]->NXM_NX_REG2[[20..31]]
509 in_port=9,reg0=0xdeadbeef actions=output:20
510 in_port=10,reg1=0xdeadbeef actions=output:21
511 in_port=11,reg2=0xeef22dea actions=output:22
513 dnl Sanilty check all registers
514 in_port=12 actions=load:0x10->NXM_NX_REG0[[]],load:0x11->NXM_NX_REG1[[]],load:0x12->NXM_NX_REG2[[]]
515 in_port=13 actions=load:0x13->NXM_NX_REG3[[]],load:0x14->NXM_NX_REG4[[]],load:0x15->NXM_NX_REG5[[]]
516 in_port=14 actions=load:0x16->NXM_NX_REG6[[]],load:0x17->NXM_NX_REG7[[]]
517 in_port=15,reg0=0x10,reg1=0x11,reg2=0x12,reg3=0x13,reg4=0x14,reg5=0x15,reg6=0x16,reg7=0x17 actions=output:33
520 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
521 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])
522 AT_CHECK([tail -1 stdout], [0],
523 [Datapath actions: 20,21,22,33
528 dnl Tests that the standardized xregs are mapped onto the legacy OVS registers
529 dnl in the manner documented in ovs-ofctl(8).
530 AT_SETUP([ofproto-dpif - extended registers])
532 ADD_OF_PORTS([br0], [1], [2], [3])
533 AT_DATA([flows.txt], [dnl
534 table=0 actions=load:0xfedcba9876543210->OXM_OF_PKT_REG1[[]],resubmit(,1)
535 table=1,reg2=0xfedcba98,reg3=0x76543210 actions=2
537 # These low-priority rules shouldn't match. They're here only to make really
538 # sure that the test fails if either of the above rules fails to match.
539 table=0,priority=0 actions=3
540 table=1,priority=0 actions=3
542 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
543 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])
544 AT_CHECK([tail -1 stdout], [0], [Datapath actions: 2
549 AT_SETUP([ofproto-dpif - load and move order])
551 ADD_OF_PORTS([br0], [1], [10], [11])
552 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'])
553 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)'])
554 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])
555 AT_CHECK([tail -2 stdout], [0],
556 [Megaflow: recirc_id=0,ip,in_port=1,nw_src=192.168.0.1,nw_frag=no
557 Datapath actions: set(ipv4(src=255.255.255.255)),10,set(ipv4(src=192.168.0.1)),11
562 dnl Tests that 1.5 copy-field can copy into the standardized xregs.
563 AT_SETUP([ofproto-dpif - copy-field into extended registers])
565 ADD_OF_PORTS([br0], [1], [2], [3])
566 AT_DATA([flows.txt], [dnl
567 table=0 actions=move:OXM_OF_ETH_SRC[[0..47]]->OXM_OF_PKT_REG0[[0..47]],goto_table(1)
568 table=1,xreg0=0x0000505400000005 actions=2
570 # These low-priority rules shouldn't match. They're here only to make really
571 # sure that the test fails if either of the above rules fails to match.
572 table=0,priority=0 actions=3
573 table=1,priority=0 actions=3
575 AT_CHECK([ovs-ofctl -O OpenFlow15 add-flows br0 flows.txt])
576 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])
577 AT_CHECK([tail -1 stdout], [0], [Datapath actions: 2
582 dnl Tests that 1.5 set-field with mask in the metadata register.
583 AT_SETUP([ofproto-dpif - masked set-field into metadata])
585 ADD_OF_PORTS([br0], [1], [2], [3])
586 AT_DATA([flows.txt], [dnl
587 table=0 actions=set_field:0xfafafafa5a5a5a5a->metadata,goto_table(1)
588 table=1 actions=set_field:0x6b/0xff->metadata,goto_table(2)
589 table=2,metadata=0xfafafafa5a5a5a6b actions=2
591 # These low-priority rules shouldn't match. They're here only to make really
592 # sure that the test fails if either of the above rules fails to match.
593 table=0,priority=0 actions=3
594 table=1,priority=0 actions=3
595 table=2,priority=0 actions=3
597 AT_CHECK([ovs-ofctl -O OpenFlow15 add-flows br0 flows.txt])
598 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])
599 AT_CHECK([tail -1 stdout], [0], [Datapath actions: 2
605 AT_SETUP([ofproto-dpif - actset_output])
608 [br0], [1], [2], [3], [4], [5], [6], [7], [8], [9], [10], [11], [12], [13])
609 AT_DATA([flows.txt], [dnl
610 table=0,actset_output=unset actions=write_actions(output(2)),goto_table(1)
611 table=1 actions=move:ONFOXM_ET_ACTSET_OUTPUT[[0..31]]->OXM_OF_PKT_REG0[[0..31]],goto_table(2)
613 # Verify that actset_output got set.
614 table=2,priority=20,actset_output=2 actions=4,goto_table(3)
615 table=2,priority=10 actions=5,goto_table(3)
617 # Verify that xreg0 got copied properly from actset_output.
618 table=3,priority=20,xreg0=2 actions=6,goto_table(4)
619 table=3,priority=10 actions=7,goto_table(4)
621 # Verify that adding a group action unsets actset_output.
622 table=4 actions=write_actions(group(5)),goto_table(5)
623 table=5,priority=20,actset_output=unset actions=8,goto_table(6)
624 table=5,priority=10 actions=9,goto_table(6)
626 # Verify that adding another output action doesn't change actset_output
627 # (since there's still a group).
628 table=6 actions=write_actions(output(3)),goto_table(7)
629 table=7,priority=20,actset_output=unset actions=10,goto_table(8)
630 table=7,priority=10 actions=11,goto_table(8)
632 # Verify that clearing the action set, then writing an output action,
633 # causes actset_output to be set again.
634 table=8,actions=clear_actions,write_actions(output(3),output(2)),goto_table(9)
635 table=9,priority=20,actset_output=2 actions=12
636 table=9,priority=10 actions=13
638 AT_CHECK([ovs-ofctl -O OpenFlow13 add-flows br0 flows.txt])
639 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])
640 AT_CHECK([tail -1 stdout], [0], [Datapath actions: 4,6,8,10,12,2
644 AT_SETUP([ofproto-dpif - push-pop])
646 ADD_OF_PORTS([br0], [20], [21], [22], [33], [90])
647 AT_DATA([flows.txt], [dnl
648 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
649 in_port=2 actions=pop:NXM_NX_REG0[[0..7]],output:NXM_NX_REG0[[]]
650 in_port=3 actions=pop:NXM_NX_REG1[[0..7]],output:NXM_NX_REG1[[]]
651 in_port=4 actions=pop:NXM_NX_REG2[[0..15]],output:NXM_NX_REG2[[]]
652 in_port=5 actions=pop:NXM_NX_REG3[[]],output:NXM_NX_REG3[[]]
655 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
656 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])
657 AT_CHECK([tail -1 stdout], [0],
658 [Datapath actions: 33,22,21,20
663 AT_SETUP([ofproto-dpif - output])
665 ADD_OF_PORTS([br0], [1], [9], [10], [11], [55], [66], [77], [88])
666 AT_DATA([flows.txt], [dnl
667 in_port=1 actions=resubmit:2,resubmit:3,resubmit:4,resubmit:5,resubmit:6,resubmit:7,resubmit:8
668 in_port=2 actions=output:9
669 in_port=3 actions=load:55->NXM_NX_REG0[[]],output:NXM_NX_REG0[[]],load:66->NXM_NX_REG1[[]]
670 in_port=4 actions=output:10,output:NXM_NX_REG0[[]],output:NXM_NX_REG1[[]],output:11
671 in_port=5 actions=load:77->NXM_NX_REG0[[0..15]],load:88->NXM_NX_REG0[[16..31]]
672 in_port=6 actions=output:NXM_NX_REG0[[0..15]],output:NXM_NX_REG0[[16..31]]
673 in_port=7 actions=load:0x110000ff->NXM_NX_REG0[[]],output:NXM_NX_REG0[[]]
674 in_port=8 actions=1,9,load:9->NXM_OF_IN_PORT[[]],1,9
676 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
677 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])
678 AT_CHECK([tail -1 stdout], [0],
679 [Datapath actions: 9,55,10,55,66,11,77,88,9,1
684 AT_SETUP([ofproto-dpif - dec_ttl])
686 ADD_OF_PORTS([br0], [1], [2], [3], [4])
687 AT_DATA([flows.txt], [dnl
688 table=0 in_port=1 action=dec_ttl,output:2,resubmit(1,1),output:4
689 table=1 in_port=1 action=dec_ttl,output:3
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=111,tos=0,ttl=2,frag=no)' -generate], [0], [stdout])
693 AT_CHECK([tail -4 stdout], [0],
694 [Megaflow: recirc_id=0,ip,in_port=1,nw_ttl=2,nw_frag=no
695 Datapath actions: set(ipv4(ttl=1)),2,4
696 This flow is handled by the userspace slow path because it:
697 - Sends "packet-in" messages to the OpenFlow controller.
699 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])
700 AT_CHECK([tail -2 stdout], [0],
701 [Megaflow: recirc_id=0,ip,in_port=1,nw_ttl=3,nw_frag=no
702 Datapath actions: set(ipv4(ttl=2)),2,set(ipv4(ttl=1)),3,4
704 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])
705 AT_CHECK([tail -2 stdout], [0],
706 [Megaflow: recirc_id=0,ipv6,in_port=1,nw_ttl=128,nw_frag=no
707 Datapath actions: set(ipv6(hlimit=127)),2,set(ipv6(hlimit=126)),3,4
710 AT_CAPTURE_FILE([ofctl_monitor.log])
711 AT_CHECK([ovs-ofctl monitor br0 65534 invalid_ttl --detach --no-chdir --pidfile 2> ofctl_monitor.log])
712 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=111,tos=0,ttl=2,frag=no)' -generate], [0], [stdout])
713 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
714 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
715 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=34 in_port=1 (via invalid_ttl) data_len=34 (unbuffered)
716 ip,in_port=0,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
721 dnl A dec_ttl action at offset 32 in ofpacts will cause the ofpacts
722 dnl buffer to be resized just before pushing the id of the dec_ttl action.
723 dnl Thus the implementation must account for this by using the
724 dnl reallocated buffer rather than the original buffer.
726 dnl A number of similar rules are added to try and exercise
727 dnl xrealloc sufficiently that it returns a different base pointer
728 AT_SETUP([ofproto-dpif - dec_ttl without arguments at offset 32 in ofpacts])
730 ADD_OF_PORTS([br0], [1])
731 (for i in `seq 0 255`; do
732 printf "dl_src=10:11:11:11:11:%02x actions=output:1,output:1,output:1,dec_ttl,controller\n" $i
734 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
738 dnl A dec_ttl action at offset 32 in ofpacts will cause the ofpacts
739 dnl buffer to be resized just before pushing the id of the dec_ttl action.
740 dnl Thus the implementation must account for this by using the
741 dnl reallocated buffer rather than the original buffer.
743 dnl A number of similar rules are added to try and exercise
744 dnl xrealloc sufficiently that it returns a different base pointer
745 AT_SETUP([ofproto-dpif - dec_ttl with arguments at offset 32 in ofpacts])
747 ADD_OF_PORTS([br0], [1])
748 (for i in `seq 0 255`; do
749 printf "dl_src=10:11:11:11:11:%02x actions=output:1,output:1,output:1,dec_ttl(1),controller\n" $i
751 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
755 dnl A note action at offset 24 in ofpacts will cause the ofpacts
756 dnl buffer to be resized just before pushing the id of the dec_ttl action.
757 dnl Thus the implementation must account for this by using the
758 dnl reallocated buffer rather than the original buffer.
760 dnl A number of similar rules are added to try and exercise
761 dnl xrealloc sufficiently that it returns a different base pointer
762 AT_SETUP([ofproto-dpif - note at offset 24 in ofpacts])
764 ADD_OF_PORTS([br0], [1])
765 (for i in `seq 0 255`; do
766 printf "dl_src=10:11:11:11:11:%02x actions=output:1,output:1,note:ff,controller\n" $i
768 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
772 AT_SETUP([ofproto-dpif - output, OFPP_NONE ingress port])
774 ADD_OF_PORTS([br0], [1], [2])
776 AT_CHECK([ovs-ofctl add-flow br0 action=normal])
778 # "in_port" defaults to OFPP_NONE if it's not specified.
779 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"
780 AT_CHECK([ovs-appctl ofproto/trace br0 "$flow"], [0], [stdout])
781 AT_CHECK([tail -1 stdout | sed 's/Datapath actions: //' | tr "," "\n" | sort -n], [0], [dnl
790 AT_SETUP([ofproto-dpif - DSCP])
791 OVS_VSWITCHD_START([add-port br0 p1 -- set Interface p1 type=dummy])
792 ADD_OF_PORTS([br0], [9])
793 AT_DATA([flows.txt], [dnl
794 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
796 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
797 AT_CHECK([ovs-vsctl -- \
798 set Port p1 qos=@newqos --\
799 --id=@newqos create QoS type=linux-htb queues=1=@q1,2=@q2 --\
800 --id=@q1 create Queue dscp=1 --\
801 --id=@q2 create Queue dscp=2], [0], [ignore])
802 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])
803 AT_CHECK([tail -2 stdout], [0],
804 [Megaflow: recirc_id=0,skb_priority=0,ip,in_port=9,nw_tos=252,nw_frag=no
805 Datapath actions: dnl
807 set(ipv4(tos=0x4/0xfc)),set(skb_priority(0x1)),1,dnl
808 set(ipv4(tos=0x8/0xfc)),set(skb_priority(0x2)),1,dnl
810 set(ipv4(tos=0x4/0xfc)),set(skb_priority(0x1)),1,dnl
811 set(ipv4(tos=0xfc/0xfc)),set(skb_priority(0)),1,dnl
812 set(ipv4(tos=0/0xfc)),1,100
817 AT_SETUP([ofproto-dpif - output/flood flags])
819 ADD_OF_PORTS([br0], [1], [2], [3], [4], [5], [6], [7])
821 AT_DATA([flows.txt], [dnl
822 in_port=local actions=local,flood
823 in_port=1 actions=flood
824 in_port=2 actions=all
825 in_port=3 actions=output:LOCAL,output:1,output:2,output:3,output:4,output:5,output:6,output:7
826 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
828 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
829 AT_CHECK([ovs-ofctl mod-port br0 5 noforward])
830 AT_CHECK([ovs-ofctl mod-port br0 6 noflood])
832 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])
833 AT_CHECK([tail -1 stdout \
834 | sed -e 's/Datapath actions: //' | tr ',' '\n' | sort], [0], [dnl
842 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])
843 AT_CHECK([tail -1 stdout \
844 | sed -e 's/Datapath actions: //' | tr ',' '\n' | sort], [0], [dnl
852 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])
853 AT_CHECK([tail -1 stdout \
854 | sed -e 's/Datapath actions: //' | tr ',' '\n' | sort], [0], [dnl
863 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])
864 AT_CHECK([tail -1 stdout], [0],
865 [Datapath actions: 100,1,2,4,6,7
868 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])
869 AT_CHECK([tail -1 stdout], [0],
870 [Datapath actions: set(skb_priority(0x1)),100,1,2,set(skb_priority(0x2)),3,set(skb_priority(0x1)),6,7
875 AT_SETUP([ofproto-dpif - Default Table Miss - OF1.0 (OFPTC_TABLE_MISS_CONTROLLER)])
876 OVS_VSWITCHD_START([dnl
877 add-port br0 p1 -- set Interface p1 type=dummy
879 ON_EXIT([kill `cat ovs-ofctl.pid`])
881 AT_CAPTURE_FILE([ofctl_monitor.log])
883 AT_CHECK([ovs-ofctl monitor br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
886 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)'
888 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
889 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
890 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
891 NXT_PACKET_IN (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
892 tcp,in_port=0,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
894 NXT_PACKET_IN (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
895 tcp,in_port=0,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
897 NXT_PACKET_IN (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
898 tcp,in_port=0,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
901 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
902 AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
909 AT_SETUP([ofproto-dpif - Default Table Miss - OF1.3 (OFPTC_TABLE_MISS_DROP)])
910 OVS_VSWITCHD_START([dnl
911 add-port br0 p1 -- set Interface p1 type=dummy
913 ON_EXIT([kill `cat ovs-ofctl.pid`])
915 AT_CAPTURE_FILE([ofctl_monitor.log])
916 AT_CHECK([ovs-ofctl del-flows br0])
918 AT_CHECK([ovs-ofctl monitor -OOpenFlow13 -P openflow10 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
920 dnl Test that missed packets are droped
922 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)'
924 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
926 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
929 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
930 AT_CHECK([ovs-ofctl -OOpenFlow13 dump-flows br0 | ofctl_strip | sort], [0], [dnl
931 OFPST_FLOW reply (OF1.3):
937 AT_SETUP([ofproto-dpif - Table Miss - goto table and OFPTC_TABLE_MISS_CONTROLLER])
938 OVS_VSWITCHD_START([dnl
939 add-port br0 p1 -- set Interface p1 type=dummy
941 ON_EXIT([kill `cat ovs-ofctl.pid`])
943 AT_CAPTURE_FILE([ofctl_monitor.log])
944 AT_CHECK([ovs-ofctl -OOpenFlow12 add-flow br0 'table=0 actions=goto_table(1)'])
946 AT_CHECK([ovs-ofctl monitor -P openflow10 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
949 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)'
951 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
952 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
953 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
954 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
955 tcp,in_port=0,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
957 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
958 tcp,in_port=0,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
960 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
961 tcp,in_port=0,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
964 AT_CHECK([ovs-appctl revalidator/purge], [0])
965 AT_CHECK([ovs-ofctl -OOpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
966 n_packets=3, n_bytes=180, actions=goto_table:1
967 OFPST_FLOW reply (OF1.2):
973 AT_SETUP([ofproto-dpif - Table Miss - resubmit and OFPTC_TABLE_MISS_CONTROLLER])
974 OVS_VSWITCHD_START([dnl
975 add-port br0 p1 -- set Interface p1 type=dummy
977 ON_EXIT([kill `cat ovs-ofctl.pid`])
979 AT_CAPTURE_FILE([ofctl_monitor.log])
980 AT_CHECK([ovs-ofctl -OOpenFlow12 add-flow br0 'table=0 actions=resubmit(1,1)'])
982 AT_CHECK([ovs-ofctl monitor -P openflow10 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
985 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)'
988 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
989 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
992 AT_CHECK([ovs-appctl revalidator/purge], [0])
993 AT_CHECK([ovs-ofctl -OOpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
994 n_packets=3, n_bytes=180, actions=resubmit(1,1)
995 OFPST_FLOW reply (OF1.2):
1001 AT_SETUP([ofproto-dpif - Table Miss - OFPTC_TABLE_MISS_CONTINUE])
1002 OVS_VSWITCHD_START([dnl
1003 add-port br0 p1 -- set Interface p1 type=dummy
1005 ON_EXIT([kill `cat ovs-ofctl.pid`])
1007 AT_CAPTURE_FILE([ofctl_monitor.log])
1008 AT_CHECK([ovs-ofctl add-flow br0 'table=1 dl_src=10:11:11:11:11:11 actions=controller'])
1009 AT_CHECK([ovs-ofctl -OOpenFlow11 mod-table br0 all continue])
1011 dnl Miss table 0, Hit table 1
1012 AT_CHECK([ovs-ofctl monitor br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1015 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)'
1017 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1018 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
1020 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1021 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1022 tcp,in_port=0,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
1024 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1025 tcp,in_port=0,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
1027 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1028 tcp,in_port=0,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
1031 dnl Hit table 0, Miss all other tables, sent to controller
1032 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1035 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)'
1037 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1038 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
1040 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1041 NXT_PACKET_IN (xid=0x0): table_id=253 cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
1042 tcp,in_port=0,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
1044 NXT_PACKET_IN (xid=0x0): table_id=253 cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
1045 tcp,in_port=0,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
1047 NXT_PACKET_IN (xid=0x0): table_id=253 cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
1048 tcp,in_port=0,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
1051 AT_CHECK([ovs-appctl revalidator/purge], [0])
1052 AT_CHECK([ovs-ofctl -OOpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
1053 table=1, n_packets=3, n_bytes=180, dl_src=10:11:11:11:11:11 actions=CONTROLLER:65535
1054 OFPST_FLOW reply (OF1.2):
1060 AT_SETUP([ofproto-dpif - Table Miss - goto table and OFPTC_TABLE_MISS_CONTINUE])
1061 OVS_VSWITCHD_START([dnl
1062 add-port br0 p1 -- set Interface p1 type=dummy
1064 ON_EXIT([kill `cat ovs-ofctl.pid`])
1066 AT_CAPTURE_FILE([ofctl_monitor.log])
1067 AT_DATA([flows.txt], [dnl
1068 table=0 actions=goto_table(1)
1069 table=2 dl_src=10:11:11:11:11:11 actions=controller
1071 AT_CHECK([ovs-ofctl -OOpenFlow12 add-flows br0 flows.txt])
1072 AT_CHECK([ovs-ofctl -OOpenFlow11 mod-table br0 all continue])
1074 dnl Hit table 0, Miss table 1, Hit table 2
1075 AT_CHECK([ovs-ofctl monitor br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1078 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)'
1080 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1081 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1083 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1084 NXT_PACKET_IN (xid=0x0): table_id=2 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1085 tcp,in_port=0,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
1087 NXT_PACKET_IN (xid=0x0): table_id=2 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1088 tcp,in_port=0,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
1090 NXT_PACKET_IN (xid=0x0): table_id=2 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1091 tcp,in_port=0,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
1094 dnl Hit table 1, Miss all other tables, sent to controller
1095 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1098 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)'
1100 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1101 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
1103 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1104 NXT_PACKET_IN (xid=0x0): table_id=253 cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
1105 tcp,in_port=0,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
1107 NXT_PACKET_IN (xid=0x0): table_id=253 cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
1108 tcp,in_port=0,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
1110 NXT_PACKET_IN (xid=0x0): table_id=253 cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
1111 tcp,in_port=0,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
1114 AT_CHECK([ovs-appctl revalidator/purge], [0])
1115 AT_CHECK([ovs-ofctl -OOpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
1116 n_packets=6, n_bytes=360, actions=goto_table:1
1117 table=2, n_packets=3, n_bytes=180, dl_src=10:11:11:11:11:11 actions=CONTROLLER:65535
1118 OFPST_FLOW reply (OF1.2):
1124 AT_SETUP([ofproto-dpif - Table Miss - resubmit and OFPTC_TABLE_MISS_CONTINUE])
1125 OVS_VSWITCHD_START([dnl
1126 add-port br0 p1 -- set Interface p1 type=dummy
1128 ON_EXIT([kill `cat ovs-ofctl.pid`])
1130 AT_CAPTURE_FILE([ofctl_monitor.log])
1131 AT_DATA([flows.txt], [dnl
1132 table=0 actions=resubmit(1,1)
1133 table=2 dl_src=10:11:11:11:11:11 actions=controller
1135 AT_CHECK([ovs-ofctl -OOpenFlow12 add-flows br0 flows.txt])
1136 AT_CHECK([ovs-ofctl -OOpenFlow11 mod-table br0 all continue])
1138 dnl Hit table 0, Miss table 1, Dropped
1139 AT_CHECK([ovs-ofctl monitor br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1142 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)'
1144 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1146 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1149 dnl Hit table 1, Dropped
1150 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1153 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)'
1155 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
1157 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1160 AT_CHECK([ovs-appctl revalidator/purge], [0])
1161 AT_CHECK([ovs-ofctl -OOpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
1162 n_packets=6, n_bytes=360, actions=resubmit(1,1)
1163 table=2, dl_src=10:11:11:11:11:11 actions=CONTROLLER:65535
1164 OFPST_FLOW reply (OF1.2):
1170 AT_SETUP([ofproto-dpif - Table Miss - OFPTC_TABLE_MISS_DROP])
1171 OVS_VSWITCHD_START([dnl
1172 add-port br0 p1 -- set Interface p1 type=dummy
1174 ON_EXIT([kill `cat ovs-ofctl.pid`])
1176 AT_CAPTURE_FILE([ofctl_monitor.log])
1177 AT_CHECK([ovs-ofctl -OOpenFlow11 mod-table br0 all drop])
1179 AT_CHECK([ovs-ofctl monitor -P openflow10 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1181 dnl Test that missed packets are droped
1183 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)'
1185 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
1187 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1190 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1191 AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
1198 AT_SETUP([ofproto-dpif - Table Miss - goto table and OFPTC_TABLE_MISS_DROP])
1199 OVS_VSWITCHD_START([dnl
1200 add-port br0 p1 -- set Interface p1 type=dummy
1202 ON_EXIT([kill `cat ovs-ofctl.pid`])
1204 AT_CAPTURE_FILE([ofctl_monitor.log])
1205 AT_CHECK([ovs-ofctl del-flows br0])
1206 AT_CHECK([ovs-ofctl -OOpenFlow12 add-flow br0 'table=0 actions=goto_table(1)'])
1207 AT_CHECK([ovs-ofctl -OOpenFlow11 mod-table br0 all drop])
1209 AT_CHECK([ovs-ofctl monitor -P openflow10 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1211 dnl Test that missed packets are droped
1213 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)'
1215 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
1217 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1220 AT_CHECK([ovs-appctl revalidator/purge], [0])
1221 AT_CHECK([ovs-ofctl -OOpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
1222 n_packets=3, n_bytes=180, actions=goto_table:1
1223 OFPST_FLOW reply (OF1.2):
1229 AT_SETUP([ofproto-dpif - Table Miss - resubmit and OFPTC_TABLE_MISS_DROP])
1230 OVS_VSWITCHD_START([dnl
1231 add-port br0 p1 -- set Interface p1 type=dummy
1233 ON_EXIT([kill `cat ovs-ofctl.pid`])
1235 AT_CAPTURE_FILE([ofctl_monitor.log])
1236 AT_CHECK([ovs-ofctl del-flows br0])
1237 AT_CHECK([ovs-ofctl -OOpenFlow12 add-flow br0 'table=0 actions=resubmit(1,1)'])
1238 AT_CHECK([ovs-ofctl -OOpenFlow11 mod-table br0 all drop])
1240 AT_CHECK([ovs-ofctl monitor -P openflow10 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1242 dnl Test that missed packets are droped
1244 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)'
1246 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
1248 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1251 AT_CHECK([ovs-appctl revalidator/purge], [0])
1252 AT_CHECK([ovs-ofctl -OOpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
1253 n_packets=3, n_bytes=180, actions=resubmit(1,1)
1254 OFPST_FLOW reply (OF1.2):
1260 AT_SETUP([ofproto-dpif - controller])
1261 OVS_VSWITCHD_START([dnl
1262 add-port br0 p1 -- set Interface p1 type=dummy
1264 ON_EXIT([kill `cat ovs-ofctl.pid`])
1266 AT_CAPTURE_FILE([ofctl_monitor.log])
1267 AT_DATA([flows.txt], [dnl
1268 cookie=0x0 dl_src=10:11:11:11:11:11 actions=controller
1269 cookie=0x1 dl_src=20:22:22:22:22:22 actions=controller,resubmit(80,1)
1270 cookie=0x2 dl_src=30:33:33:33:33:33 actions=mod_vlan_vid:15,controller
1272 cookie=0x3 table=1 in_port=80 actions=load:1->NXM_NX_REG0[[]],mod_vlan_vid:80,controller,resubmit(81,2)
1273 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)
1274 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)
1275 cookie=0x6 table=4 in_port=83 actions=load:4->NXM_NX_REG3[[]],mod_nw_src:83.83.83.83,controller,resubmit(84,5)
1276 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)
1277 cookie=0x8 table=6 in_port=85 actions=mod_tp_src:85,controller,resubmit(86,7)
1278 cookie=0x9 table=7 in_port=86 actions=mod_tp_dst:86,controller,controller
1279 cookie=0xa dl_src=40:44:44:44:44:41 actions=mod_vlan_vid:99,mod_vlan_pcp:1,controller
1280 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
1282 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
1285 AT_CHECK([ovs-ofctl monitor -P openflow10 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1288 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)'
1290 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1291 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1293 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1294 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
1295 tcp,in_port=0,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
1297 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
1298 tcp,in_port=0,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
1300 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
1301 tcp,in_port=0,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
1304 dnl Singleton controller action.
1305 AT_CHECK([ovs-ofctl monitor -P openflow10 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1308 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)'
1310 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1311 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1313 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1314 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1315 tcp,in_port=0,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
1317 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1318 tcp,in_port=0,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
1320 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1321 tcp,in_port=0,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
1324 dnl Modified controller action.
1325 AT_CHECK([ovs-ofctl monitor -P openflow10 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1328 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)'
1330 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1331 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1333 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1334 OFPT_PACKET_IN (xid=0x0): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1335 tcp,in_port=0,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
1337 OFPT_PACKET_IN (xid=0x0): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1338 tcp,in_port=0,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
1340 OFPT_PACKET_IN (xid=0x0): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1341 tcp,in_port=0,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
1344 dnl Modified VLAN controller action.
1345 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1348 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)'
1350 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1351 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1353 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1354 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1355 ip,in_port=0,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
1357 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1358 ip,in_port=0,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
1360 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1361 ip,in_port=0,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
1365 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1368 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)'
1370 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 18])
1371 ovs-appctl -t ovs-ofctl exit
1373 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1374 NXT_PACKET_IN (xid=0x0): cookie=0x1 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1375 tcp,in_port=0,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
1377 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x3 total_len=64 in_port=1 reg0=0x1 (via action) data_len=64 (unbuffered)
1378 tcp,in_port=0,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
1380 NXT_PACKET_IN (xid=0x0): table_id=2 cookie=0x4 total_len=64 in_port=1 reg0=0x1 reg1=0x2 (via action) data_len=64 (unbuffered)
1381 tcp,in_port=0,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
1383 NXT_PACKET_IN (xid=0x0): table_id=3 cookie=0x5 total_len=64 in_port=1 reg0=0x1 reg1=0x2 reg2=0x3 (via action) data_len=64 (unbuffered)
1384 tcp,in_port=0,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
1386 NXT_PACKET_IN (xid=0x0): table_id=4 cookie=0x6 total_len=64 in_port=1 reg0=0x1 reg1=0x2 reg2=0x3 reg3=0x4 (via action) data_len=64 (unbuffered)
1387 tcp,in_port=0,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
1389 NXT_PACKET_IN (xid=0x0): table_id=5 cookie=0x7 total_len=64 in_port=1 tun_id=0x6 reg0=0x1 reg1=0x2 reg2=0x3 reg3=0x4 reg4=0x5 (via action) data_len=64 (unbuffered)
1390 tcp,in_port=0,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
1392 NXT_PACKET_IN (xid=0x0): table_id=6 cookie=0x8 total_len=64 in_port=1 tun_id=0x6 reg0=0x1 reg1=0x2 reg2=0x3 reg3=0x4 reg4=0x5 (via action) data_len=64 (unbuffered)
1393 tcp,in_port=0,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
1395 NXT_PACKET_IN (xid=0x0): table_id=7 cookie=0x9 total_len=64 in_port=1 tun_id=0x6 reg0=0x1 reg1=0x2 reg2=0x3 reg3=0x4 reg4=0x5 (via action) data_len=64 (unbuffered)
1396 tcp,in_port=0,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
1398 NXT_PACKET_IN (xid=0x0): table_id=7 cookie=0x9 total_len=64 in_port=1 tun_id=0x6 reg0=0x1 reg1=0x2 reg2=0x3 reg3=0x4 reg4=0x5 (via action) data_len=64 (unbuffered)
1399 tcp,in_port=0,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
1403 AT_CHECK([ovs-ofctl monitor br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1406 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'
1408 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 18])
1409 ovs-appctl -t ovs-ofctl exit
1411 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1412 NXT_PACKET_IN (xid=0x0): cookie=0x1 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1413 udp,in_port=0,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
1415 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x3 total_len=64 in_port=1 reg0=0x1 (via action) data_len=64 (unbuffered)
1416 udp,in_port=0,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
1418 NXT_PACKET_IN (xid=0x0): table_id=2 cookie=0x4 total_len=64 in_port=1 reg0=0x1 reg1=0x2 (via action) data_len=64 (unbuffered)
1419 udp,in_port=0,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
1421 NXT_PACKET_IN (xid=0x0): table_id=3 cookie=0x5 total_len=64 in_port=1 reg0=0x1 reg1=0x2 reg2=0x3 (via action) data_len=64 (unbuffered)
1422 udp,in_port=0,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
1424 NXT_PACKET_IN (xid=0x0): table_id=4 cookie=0x6 total_len=64 in_port=1 reg0=0x1 reg1=0x2 reg2=0x3 reg3=0x4 (via action) data_len=64 (unbuffered)
1425 udp,in_port=0,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
1427 NXT_PACKET_IN (xid=0x0): table_id=5 cookie=0x7 total_len=64 in_port=1 tun_id=0x6 reg0=0x1 reg1=0x2 reg2=0x3 reg3=0x4 reg4=0x5 (via action) data_len=64 (unbuffered)
1428 udp,in_port=0,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
1430 NXT_PACKET_IN (xid=0x0): table_id=6 cookie=0x8 total_len=64 in_port=1 tun_id=0x6 reg0=0x1 reg1=0x2 reg2=0x3 reg3=0x4 reg4=0x5 (via action) data_len=64 (unbuffered)
1431 udp,in_port=0,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
1433 NXT_PACKET_IN (xid=0x0): table_id=7 cookie=0x9 total_len=64 in_port=1 tun_id=0x6 reg0=0x1 reg1=0x2 reg2=0x3 reg3=0x4 reg4=0x5 (via action) data_len=64 (unbuffered)
1434 udp,in_port=0,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
1436 NXT_PACKET_IN (xid=0x0): table_id=7 cookie=0x9 total_len=64 in_port=1 tun_id=0x6 reg0=0x1 reg1=0x2 reg2=0x3 reg3=0x4 reg4=0x5 (via action) data_len=64 (unbuffered)
1437 udp,in_port=0,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
1440 dnl Modified ARP controller action.
1441 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1444 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)'
1447 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 18])
1448 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
1449 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1450 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1451 arp,in_port=0,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
1452 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1453 arp,in_port=0,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
1454 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1455 arp,in_port=0,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
1456 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1457 arp,in_port=0,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
1458 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1459 arp,in_port=0,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
1460 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1461 arp,in_port=0,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
1462 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1463 arp,in_port=0,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
1464 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1465 arp,in_port=0,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
1466 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1467 arp,in_port=0,vlan_tci=0x0000,dl_src=80:88:88:88:88:88,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=1.1.1.1,arp_tpa=2.2.2.2,arp_op=2,arp_sha=50:54:00:00:00:05,arp_tha=40:44:44:44:44:41
1470 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1473 AT_CHECK([ovs-ofctl monitor br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1476 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'
1479 AT_CHECK([ovs-appctl time/warp 1000], [0], [ignore])
1480 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 18])
1481 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
1482 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1483 NXT_PACKET_IN (xid=0x0): cookie=0x1 total_len=98 in_port=1 (via action) data_len=98 (unbuffered)
1484 sctp,in_port=0,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
1486 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x3 total_len=102 in_port=1 reg0=0x1 (via action) data_len=102 (unbuffered)
1487 sctp,in_port=0,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
1489 NXT_PACKET_IN (xid=0x0): table_id=2 cookie=0x4 total_len=102 in_port=1 reg0=0x1 reg1=0x2 (via action) data_len=102 (unbuffered)
1490 sctp,in_port=0,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
1492 NXT_PACKET_IN (xid=0x0): table_id=3 cookie=0x5 total_len=102 in_port=1 reg0=0x1 reg1=0x2 reg2=0x3 (via action) data_len=102 (unbuffered)
1493 sctp,in_port=0,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
1495 NXT_PACKET_IN (xid=0x0): table_id=4 cookie=0x6 total_len=102 in_port=1 reg0=0x1 reg1=0x2 reg2=0x3 reg3=0x4 (via action) data_len=102 (unbuffered)
1496 sctp,in_port=0,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
1498 NXT_PACKET_IN (xid=0x0): table_id=5 cookie=0x7 total_len=102 in_port=1 tun_id=0x6 reg0=0x1 reg1=0x2 reg2=0x3 reg3=0x4 reg4=0x5 (via action) data_len=102 (unbuffered)
1499 sctp,in_port=0,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
1501 NXT_PACKET_IN (xid=0x0): table_id=6 cookie=0x8 total_len=102 in_port=1 tun_id=0x6 reg0=0x1 reg1=0x2 reg2=0x3 reg3=0x4 reg4=0x5 (via action) data_len=102 (unbuffered)
1502 sctp,in_port=0,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
1504 NXT_PACKET_IN (xid=0x0): table_id=7 cookie=0x9 total_len=102 in_port=1 tun_id=0x6 reg0=0x1 reg1=0x2 reg2=0x3 reg3=0x4 reg4=0x5 (via action) data_len=102 (unbuffered)
1505 sctp,in_port=0,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
1507 NXT_PACKET_IN (xid=0x0): table_id=7 cookie=0x9 total_len=102 in_port=1 tun_id=0x6 reg0=0x1 reg1=0x2 reg2=0x3 reg3=0x4 reg4=0x5 (via action) data_len=102 (unbuffered)
1508 sctp,in_port=0,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
1511 AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
1512 cookie=0x1, n_packets=3, n_bytes=218, dl_src=20:22:22:22:22:22 actions=CONTROLLER:65535,resubmit(80,1)
1513 cookie=0x2, n_packets=3, n_bytes=180, dl_src=30:33:33:33:33:33 actions=mod_vlan_vid:15,CONTROLLER:65535
1514 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)
1515 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)
1516 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)
1517 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)
1518 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)
1519 cookie=0x8, table=6, n_packets=3, n_bytes=218, in_port=85 actions=mod_tp_src:85,CONTROLLER:65535,resubmit(86,7)
1520 cookie=0x9, table=7, n_packets=3, n_bytes=218, in_port=86 actions=mod_tp_dst:86,CONTROLLER:65535,CONTROLLER:65535
1521 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
1522 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
1523 n_packets=3, n_bytes=180, dl_src=10:11:11:11:11:11 actions=CONTROLLER:65535
1530 AT_SETUP([ofproto-dpif - MPLS handling])
1531 OVS_VSWITCHD_START([dnl
1532 add-port br0 p1 -- set Interface p1 type=dummy
1534 ON_EXIT([kill `cat ovs-ofctl.pid`])
1536 AT_CAPTURE_FILE([ofctl_monitor.log])
1537 AT_DATA([flows.txt], [dnl
1538 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
1539 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
1540 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
1541 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
1542 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
1543 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
1544 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
1545 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
1546 cookie=0xa mpls,dl_src=40:44:44:44:44:49 actions=push_mpls:0x8848,load:10->OXM_OF_MPLS_LABEL[[]],CONTROLLER:65535
1547 cookie=0xb dl_src=50:55:55:55:55:55 dl_type=0x8847 actions=load:1000->OXM_OF_MPLS_LABEL[[]],controller
1548 cookie=0xd dl_src=60:66:66:66:66:66 actions=pop_mpls:0x0800,controller
1549 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
1551 cookie=0xd dl_src=60:66:66:66:00:01 actions=pop_mpls:0x0800,dec_ttl,controller
1552 cookie=0xd dl_src=60:66:66:66:00:02 actions=pop_mpls:0x0800,load:0xa000001->OXM_OF_IPV4_DST[[]],controller
1553 cookie=0xd dl_src=60:66:66:66:00:03 actions=pop_mpls:0x0800,move:OXM_OF_IPV4_DST[[]]->OXM_OF_IPV4_SRC[[]],controller
1554 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
1555 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
1556 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
1557 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
1559 cookie=0xd dl_src=60:66:66:66:00:08 actions=pop_mpls:0x0806,resubmit(1,1)
1560 cookie=0xd table=1 arp actions=controller
1562 cookie=0xd dl_src=60:66:66:66:00:09 actions=pop_mpls:0x0800,mod_nw_tos:48,controller
1563 cookie=0xd dl_src=60:66:66:66:00:0a actions=pop_mpls:0x0800,mod_nw_dst:10.0.0.1,controller
1564 cookie=0xd dl_src=60:66:66:66:00:0b actions=pop_mpls:0x0800,mod_nw_src:10.0.0.1,controller
1566 cookie=0xd dl_src=60:66:66:66:01:00 actions=pop_mpls:0x8848,controller
1567 cookie=0xd dl_src=60:66:66:66:01:01 actions=pop_mpls:0x8847,dec_mpls_ttl,controller
1568 cookie=0xd dl_src=60:66:66:66:01:02 actions=pop_mpls:0x8848,load:3->OXM_OF_MPLS_TC[[]],controller
1570 cookie=0xd dl_src=60:66:66:66:02:00 actions=pop_mpls:0x8847,pop_mpls:0x0800,controller
1571 cookie=0xd dl_src=60:66:66:66:02:01 actions=pop_mpls:0x8848,pop_mpls:0x0800,dec_ttl,controller
1572 cookie=0xd dl_src=60:66:66:66:02:10 actions=pop_mpls:0x8847,dec_mpls_ttl,pop_mpls:0x0800,dec_ttl,controller
1574 cookie=0xd dl_src=60:66:66:66:03:00 actions=pop_mpls:0x8848,pop_mpls:0x8848,controller
1575 cookie=0xd dl_src=60:66:66:66:03:01 actions=pop_mpls:0x8847,pop_mpls:0x8847,dec_mpls_ttl,controller
1576 cookie=0xd dl_src=60:66:66:66:03:10 actions=pop_mpls:0x8848,dec_mpls_ttl,pop_mpls:0x8848,dec_mpls_ttl,controller
1578 cookie=0xd dl_src=60:66:66:66:04:00 actions=pop_mpls:0x0800,push_mpls:0x8847,controller
1579 cookie=0xd dl_src=60:66:66:66:04:01 actions=pop_mpls:0x0800,push_mpls:0x8848,dec_mpls_ttl,controller
1580 cookie=0xd dl_src=60:66:66:66:04:10 actions=pop_mpls:0x0800,dec_ttl,push_mpls:0x8848,dec_mpls_ttl,controller
1582 cookie=0xd dl_src=60:66:66:66:05:00 actions=push_mpls:0x8848,pop_mpls:0x8847,controller
1583 cookie=0xd dl_src=60:66:66:66:05:01 actions=push_mpls:0x8847,pop_mpls:0x8848,dec_mpls_ttl,controller
1584 cookie=0xd dl_src=60:66:66:66:05:10 actions=push_mpls:0x8848,dec_mpls_ttl,pop_mpls:0x8847,dec_mpls_ttl,controller
1586 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
1588 dnl Modified MPLS controller action.
1589 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1592 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)'
1594 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1595 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1597 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1598 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1599 mpls,in_port=0,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
1601 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1602 mpls,in_port=0,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
1604 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1605 mpls,in_port=0,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
1608 dnl Modified MPLS controller action.
1609 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1612 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)'
1614 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1615 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1617 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1618 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1619 ip,in_port=0,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
1621 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1622 ip,in_port=0,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
1624 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1625 ip,in_port=0,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
1628 dnl Modified MPLS controller action.
1629 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1631 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)
1634 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)'
1636 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1637 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1639 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1640 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1641 mpls,in_port=0,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
1643 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1644 mpls,in_port=0,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
1646 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1647 mpls,in_port=0,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
1650 dnl Modified MPLS controller action.
1651 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1654 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))'
1656 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1657 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1659 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1660 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1661 mpls,in_port=0,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
1663 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1664 mpls,in_port=0,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
1666 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1667 mpls,in_port=0,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
1670 dnl Modified MPLS controller action.
1671 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1674 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)'
1676 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1677 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1679 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1680 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1681 mpls,in_port=0,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
1683 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1684 mpls,in_port=0,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
1686 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1687 mpls,in_port=0,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
1690 dnl Modified MPLS controller action.
1691 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1694 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)'
1696 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1697 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1699 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1700 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1701 mpls,in_port=0,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
1703 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1704 mpls,in_port=0,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
1706 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1707 mpls,in_port=0,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
1710 dnl Modified MPLS controller action.
1711 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1714 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)'
1716 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1717 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1719 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1720 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1721 mpls,in_port=0,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
1723 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1724 mpls,in_port=0,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
1726 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1727 mpls,in_port=0,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
1730 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1732 dnl Modified MPLS controller action.
1733 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1736 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)'
1738 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1739 ovs-appctl -t ovs-ofctl exit
1741 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1742 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1743 mplsm,in_port=0,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
1745 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1746 mplsm,in_port=0,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
1748 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1749 mplsm,in_port=0,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
1752 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1754 dnl Modified MPLS controller action.
1755 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1758 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)'
1760 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1761 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1763 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1764 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1765 mpls,in_port=0,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
1767 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1768 mpls,in_port=0,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
1770 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1771 mpls,in_port=0,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
1774 dnl Modified MPLS actions.
1775 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1778 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)'
1780 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1781 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1783 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1784 NXT_PACKET_IN (xid=0x0): cookie=0xb total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1785 mpls,in_port=0,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
1787 NXT_PACKET_IN (xid=0x0): cookie=0xb total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1788 mpls,in_port=0,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
1790 NXT_PACKET_IN (xid=0x0): cookie=0xb total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1791 mpls,in_port=0,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
1794 dnl Modified MPLS ipv6 controller action.
1795 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1798 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)'
1800 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1801 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1803 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1804 NXT_PACKET_IN (xid=0x0): cookie=0xc total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1805 mplsm,in_port=0,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
1807 NXT_PACKET_IN (xid=0x0): cookie=0xc total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1808 mplsm,in_port=0,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
1810 NXT_PACKET_IN (xid=0x0): cookie=0xc total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1811 mplsm,in_port=0,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
1815 dnl Modified MPLS pop action.
1816 dnl The input is a frame with two MPLS headers which tcpdump -vve shows as:
1817 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)
1818 dnl (tos 0x0, ttl 64, id 0, offset 0, flags [none], proto TCP (6), length 44)
1820 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1823 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'
1826 # 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)'
1828 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1829 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1831 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1832 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1833 tcp,in_port=0,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
1835 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1836 tcp,in_port=0,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
1838 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1839 tcp,in_port=0,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
1842 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1844 dnl Modified MPLS pop action.
1845 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
1846 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)
1847 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
1848 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
1849 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1852 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'
1854 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1855 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1857 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
1858 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1859 tcp,in_port=0,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
1861 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1862 tcp,in_port=0,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
1864 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1865 tcp,in_port=0,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
1868 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1870 dnl Modified MPLS pop action.
1871 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
1872 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)
1873 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
1874 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
1875 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1878 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'
1880 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1881 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1883 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
1884 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1885 tcp,in_port=0,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
1887 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1888 tcp,in_port=0,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
1890 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1891 tcp,in_port=0,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
1894 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1896 dnl Modified MPLS pop action.
1897 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
1898 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)
1899 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
1900 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
1901 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1904 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'
1906 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1907 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1909 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
1910 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1911 tcp,in_port=0,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
1913 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1914 tcp,in_port=0,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
1916 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1917 tcp,in_port=0,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
1920 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1922 dnl Modified MPLS pop action.
1923 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
1924 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)
1925 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
1926 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
1927 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1930 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'
1932 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1933 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1935 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
1936 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1937 tcp,in_port=0,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
1939 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1940 tcp,in_port=0,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
1942 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1943 tcp,in_port=0,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
1946 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1948 dnl Modified MPLS pop action.
1949 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
1950 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)
1951 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
1952 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
1953 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1956 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'
1958 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1959 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1961 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
1962 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1963 tcp,in_port=0,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
1965 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1966 tcp,in_port=0,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
1968 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1969 tcp,in_port=0,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
1972 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1974 dnl Modified MPLS pop action.
1975 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
1976 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)
1977 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
1978 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
1979 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1982 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'
1984 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1985 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1987 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
1988 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1989 tcp,in_port=0,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
1991 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1992 tcp,in_port=0,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
1994 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1995 tcp,in_port=0,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
1998 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2000 dnl Modified MPLS pop action.
2001 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
2002 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)
2003 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
2004 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
2005 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2008 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'
2010 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2011 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2013 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
2014 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2015 tcp,in_port=0,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
2017 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2018 tcp,in_port=0,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
2020 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2021 tcp,in_port=0,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
2024 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2026 dnl Modified MPLS pop action.
2027 dnl The input is an ARP frame with a single MPLS label stack entry which tcpdump -vve shows as:
2028 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)
2029 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2032 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'
2034 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2035 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2037 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
2038 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0xd total_len=56 in_port=1 (via action) data_len=56 (unbuffered)
2039 arp,in_port=0,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
2041 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0xd total_len=56 in_port=1 (via action) data_len=56 (unbuffered)
2042 arp,in_port=0,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
2044 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0xd total_len=56 in_port=1 (via action) data_len=56 (unbuffered)
2045 arp,in_port=0,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
2048 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2050 dnl Modified MPLS pop action.
2051 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
2052 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)
2053 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
2054 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
2055 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2058 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'
2060 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2061 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2063 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
2064 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2065 tcp,in_port=0,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
2067 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2068 tcp,in_port=0,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
2070 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2071 tcp,in_port=0,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
2074 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2076 dnl Modified MPLS pop action.
2077 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
2078 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)
2079 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
2080 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
2081 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2084 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'
2086 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2087 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2089 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
2090 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2091 tcp,in_port=0,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
2093 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2094 tcp,in_port=0,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
2096 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2097 tcp,in_port=0,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
2100 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2102 dnl Modified MPLS pop action.
2103 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
2104 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)
2105 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
2106 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
2107 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2110 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'
2112 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2113 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2115 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
2116 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2117 tcp,in_port=0,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
2119 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2120 tcp,in_port=0,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
2122 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2123 tcp,in_port=0,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
2126 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2128 dnl Modified MPLS pop action.
2129 dnl The input is a frame with two MPLS label stack entries which tcpdump -vve shows as:
2130 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)
2131 dnl (label 20, exp 0, [S], ttl 31)
2132 dnl (tos 0x0, ttl 254, id 0, offset 0, flags [none], proto TCP (6), length 44)
2133 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
2134 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2137 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'
2139 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2140 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2142 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2143 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2144 mplsm,in_port=0,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
2146 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2147 mplsm,in_port=0,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
2149 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2150 mplsm,in_port=0,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
2153 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2155 dnl Modified MPLS pop action.
2156 dnl The input is a frame with two MPLS label stack entries which tcpdump -vve shows as:
2157 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)
2158 dnl (label 20, exp 0, [S], ttl 31)
2159 dnl (tos 0x0, ttl 254, id 0, offset 0, flags [none], proto TCP (6), length 44)
2160 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
2161 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2164 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'
2166 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2167 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2169 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2170 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2171 mpls,in_port=0,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
2173 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2174 mpls,in_port=0,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
2176 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2177 mpls,in_port=0,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
2180 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2182 dnl Modified MPLS pop action.
2183 dnl The input is a frame with two MPLS label stack entries which tcpdump -vve shows as:
2184 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)
2185 dnl (label 20, exp 0, [S], ttl 31)
2186 dnl (tos 0x0, ttl 254, id 0, offset 0, flags [none], proto TCP (6), length 44)
2187 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
2188 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2191 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'
2193 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2194 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2196 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2197 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2198 mplsm,in_port=0,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
2200 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2201 mplsm,in_port=0,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
2203 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2204 mplsm,in_port=0,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
2207 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2209 dnl Modified MPLS pop action.
2210 dnl The input is a frame with two MPLS label stack entries which tcpdump -vve shows as:
2211 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)
2212 dnl (label 20, exp 0, [S], ttl 31)
2213 dnl (tos 0x0, ttl 254, id 0, offset 0, flags [none], proto TCP (6), length 44)
2214 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
2215 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2218 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'
2220 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2221 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2223 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2224 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2225 tcp,in_port=0,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
2227 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2228 tcp,in_port=0,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
2230 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2231 tcp,in_port=0,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
2234 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2236 dnl Modified MPLS pop action.
2237 dnl The input is a frame with two MPLS label stack entries which tcpdump -vve shows as:
2238 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)
2239 dnl (label 20, exp 0, [S], ttl 31)
2240 dnl (tos 0x0, ttl 254, id 0, offset 0, flags [none], proto TCP (6), length 44)
2241 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
2242 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2245 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'
2247 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2248 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2250 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
2251 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2252 tcp,in_port=0,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
2254 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2255 tcp,in_port=0,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
2257 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2258 tcp,in_port=0,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
2261 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2263 dnl Modified MPLS pop action.
2264 dnl The input is a frame with two MPLS label stack entries which tcpdump -vve shows as:
2265 dnl 60:66:66:66:02:10 > 50:54:00:00:02:10, ethertype MPLS unicast (0x8847), length 66: MPLS (label 20, exp 0, ttl 32)
2266 dnl (label 20, exp 0, [S], ttl 31)
2267 dnl (tos 0x0, ttl 254, id 0, offset 0, flags [none], proto TCP (6), length 44)
2268 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
2269 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2272 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'
2274 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2275 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2277 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
2278 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2279 tcp,in_port=0,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
2281 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2282 tcp,in_port=0,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
2284 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2285 tcp,in_port=0,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
2288 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2290 dnl Modified MPLS pop action.
2291 dnl The input is a frame with three MPLS label stack entries which tcpdump -vve shows as:
2292 dnl 60:66:66:66:03:00 > 50:54:00:00:00:00, ethertype MPLS unicast (0x8847), length 66: MPLS (label 20, exp 0, ttl 32)
2293 dnl (label 20, exp 0, ttl 31)
2294 dnl (label 20, exp 0, [S], ttl 30)
2295 dnl (tos 0x0, ttl 254, id 0, offset 0, flags [none], proto TCP (6), length 44)
2296 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
2297 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2300 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'
2302 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2303 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2305 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2306 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2307 mplsm,in_port=0,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
2309 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2310 mplsm,in_port=0,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
2312 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2313 mplsm,in_port=0,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
2316 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2318 dnl Modified MPLS pop action.
2319 dnl The input is a frame with three MPLS label stack entries which tcpdump -vve shows as:
2320 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)
2321 dnl (label 20, exp 0, ttl 31)
2322 dnl (label 20, exp 0, [S], ttl 30)
2323 dnl (tos 0x0, ttl 254, id 0, offset 0, flags [none], proto TCP (6), length 44)
2324 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
2325 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2328 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'
2330 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2331 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2333 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2334 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2335 mpls,in_port=0,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
2337 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2338 mpls,in_port=0,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
2340 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2341 mpls,in_port=0,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
2344 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2346 dnl Modified MPLS pop action.
2347 dnl The input is a frame with three MPLS label stack entries which tcpdump -vve shows as:
2348 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)
2349 dnl (label 20, exp 0, ttl 31)
2350 dnl (label 20, exp 0, [S], ttl 30)
2351 dnl (tos 0x0, ttl 254, id 0, offset 0, flags [none], proto TCP (6), length 44)
2352 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
2353 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2356 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'
2358 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2359 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2361 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2362 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2363 mplsm,in_port=0,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
2365 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2366 mplsm,in_port=0,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
2368 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2369 mplsm,in_port=0,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
2372 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2374 dnl Modified MPLS pop action.
2375 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
2376 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)
2377 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
2378 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
2379 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2382 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'
2384 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2385 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2387 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
2388 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2389 mpls,in_port=0,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
2391 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2392 mpls,in_port=0,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
2394 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2395 mpls,in_port=0,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
2398 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2400 dnl Modified MPLS pop action.
2401 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
2402 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)
2403 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
2404 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
2405 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2408 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'
2410 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2411 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2413 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
2414 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2415 mplsm,in_port=0,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
2417 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2418 mplsm,in_port=0,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
2420 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2421 mplsm,in_port=0,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
2424 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2426 dnl Modified MPLS pop action.
2427 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
2428 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)
2429 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
2430 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
2431 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2434 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'
2436 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2437 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2439 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
2440 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2441 mplsm,in_port=0,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
2443 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2444 mplsm,in_port=0,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
2446 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2447 mplsm,in_port=0,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
2450 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2452 dnl Modified MPLS pop action.
2453 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
2454 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)
2455 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
2456 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
2457 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2460 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'
2462 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2463 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2465 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2466 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2467 mpls,in_port=0,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
2469 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2470 mpls,in_port=0,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
2472 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2473 mpls,in_port=0,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
2476 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2478 dnl Modified MPLS pop action.
2479 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
2480 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)
2481 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
2482 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
2483 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2486 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'
2488 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2489 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2491 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2492 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2493 mplsm,in_port=0,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
2495 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2496 mplsm,in_port=0,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
2498 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2499 mplsm,in_port=0,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
2502 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2504 dnl Modified MPLS pop action.
2505 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
2506 dnl 60:66:66:66:05:10 > 50:54:00:00:00:07, ethertype MPLS unicast (0x8847), length 62: MPLS (label 20, exp 0, [S], ttl 32)
2507 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
2508 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
2509 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2512 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'
2514 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2515 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2517 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2518 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2519 mpls,in_port=0,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
2521 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2522 mpls,in_port=0,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
2524 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2525 mpls,in_port=0,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
2528 AT_CHECK([ovs-appctl revalidator/purge], [0])
2529 AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
2530 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
2531 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
2532 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
2533 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
2534 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
2535 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
2536 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
2537 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
2538 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
2539 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
2540 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
2541 cookie=0xd, n_packets=3, n_bytes=180, dl_src=60:66:66:66:00:08 actions=pop_mpls:0x0806,resubmit(1,1)
2542 cookie=0xd, n_packets=3, n_bytes=186, dl_src=60:66:66:66:00:01 actions=pop_mpls:0x0800,dec_ttl,CONTROLLER:65535
2543 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
2544 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
2545 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
2546 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
2547 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
2548 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
2549 cookie=0xd, n_packets=3, n_bytes=186, dl_src=60:66:66:66:00:09 actions=pop_mpls:0x0800,mod_nw_tos:48,CONTROLLER:65535
2550 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
2551 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
2552 cookie=0xd, n_packets=3, n_bytes=186, dl_src=60:66:66:66:04:00 actions=pop_mpls:0x0800,push_mpls:0x8847,CONTROLLER:65535
2553 cookie=0xd, 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
2554 cookie=0xd, 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
2555 cookie=0xd, n_packets=3, n_bytes=186, dl_src=60:66:66:66:05:00 actions=push_mpls:0x8848,pop_mpls:0x8847,CONTROLLER:65535
2556 cookie=0xd, 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
2557 cookie=0xd, 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
2558 cookie=0xd, n_packets=3, n_bytes=186, dl_src=60:66:66:66:66:66 actions=pop_mpls:0x0800,CONTROLLER:65535
2559 cookie=0xd, n_packets=3, n_bytes=198, dl_src=60:66:66:66:01:00 actions=pop_mpls:0x8848,CONTROLLER:65535
2560 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
2561 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
2562 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
2563 cookie=0xd, 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
2564 cookie=0xd, 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
2565 cookie=0xd, n_packets=3, n_bytes=210, dl_src=60:66:66:66:03:00 actions=pop_mpls:0x8848,pop_mpls:0x8848,CONTROLLER:65535
2566 cookie=0xd, 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
2567 cookie=0xd, 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
2568 cookie=0xd, table=1, n_packets=3, n_bytes=168, arp actions=CONTROLLER:65535
2575 AT_SETUP([ofproto-dpif - MPLS handling with goto_table])
2576 OVS_VSWITCHD_START([dnl
2577 add-port br0 p1 -- set Interface p1 type=dummy
2579 ON_EXIT([kill `cat ovs-ofctl.pid`])
2581 AT_CAPTURE_FILE([ofctl_monitor.log])
2582 AT_DATA([flows.txt], [dnl
2583 table=0 mplsm actions=pop_mpls:0x800,goto_table(1)
2584 table=1 ip,ip_dscp=8 actions=controller
2586 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flows br0 flows.txt])
2589 dnl Modified MPLS pop action.
2590 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
2591 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)
2592 dnl (tos 0x20, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
2593 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
2594 AT_CHECK([ovs-ofctl -O OpenFlow12 monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2597 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'
2599 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2600 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2602 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
2603 OFPT_PACKET_IN (OF1.2) (xid=0x0): table_id=1 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2604 tcp,in_port=0,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
2606 OFPT_PACKET_IN (OF1.2) (xid=0x0): table_id=1 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2607 tcp,in_port=0,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
2609 OFPT_PACKET_IN (OF1.2) (xid=0x0): table_id=1 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2610 tcp,in_port=0,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
2613 AT_CHECK([ovs-appctl revalidator/purge], [0])
2614 AT_CHECK([ovs-ofctl -O OpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
2615 n_packets=3, n_bytes=186, mplsm actions=pop_mpls:0x0800,goto_table:1
2616 table=1, n_packets=3, n_bytes=174, ip,nw_tos=32 actions=CONTROLLER:65535
2617 OFPST_FLOW reply (OF1.2):
2623 AT_SETUP([ofproto-dpif - MPLS handling with write_actions])
2624 OVS_VSWITCHD_START([dnl
2625 add-port br0 p1 -- set Interface p1 type=dummy
2627 ON_EXIT([kill `cat ovs-ofctl.pid`])
2629 dnl N.B: The first (and only) action that accesses L3 data after the
2630 dnl pop_mpls action is present in write_actions. This exercises recirculation
2631 dnl triggered in write_actions due to a previous action not in write actions.
2632 AT_CAPTURE_FILE([ofctl_monitor.log])
2633 AT_DATA([flows.txt], [dnl
2634 mplsm actions=pop_mpls:0x800,write_actions(dec_ttl,controller)
2636 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flows br0 flows.txt])
2638 dnl Modified MPLS pop action.
2639 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
2640 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)
2641 dnl (tos 0x20, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
2642 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
2643 AT_CHECK([ovs-ofctl -O OpenFlow12 monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2646 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'
2648 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2649 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2651 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
2652 OFPT_PACKET_IN (OF1.2) (xid=0x0): table_id=254 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2653 tcp,in_port=0,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
2655 OFPT_PACKET_IN (OF1.2) (xid=0x0): table_id=254 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2656 tcp,in_port=0,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
2658 OFPT_PACKET_IN (OF1.2) (xid=0x0): table_id=254 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2659 tcp,in_port=0,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
2662 AT_CHECK([ovs-appctl revalidator/purge], [0])
2663 AT_CHECK([ovs-ofctl -O OpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
2664 n_packets=3, n_bytes=186, mplsm actions=pop_mpls:0x0800,write_actions(dec_ttl,CONTROLLER:65535)
2665 OFPST_FLOW reply (OF1.2):
2671 AT_SETUP([ofproto-dpif - table-miss flow (OpenFlow 1.0)])
2672 OVS_VSWITCHD_START([dnl
2673 add-port br0 p1 -- set Interface p1 type=dummy
2675 ON_EXIT([kill `cat ovs-ofctl.pid`])
2677 AT_CAPTURE_FILE([ofctl_monitor.log])
2678 # A table-miss flow has priority 0 and no match
2679 AT_CHECK([ovs-ofctl --protocols=OpenFlow10 add-flow br0 'priority=0 actions=output:CONTROLLER'])
2681 dnl Singleton controller action.
2682 AT_CHECK([ovs-ofctl monitor -P openflow10 --protocols=OpenFlow10 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
2685 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)'
2687 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2688 ovs-appctl -t ovs-ofctl exit
2690 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2691 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
2692 tcp,in_port=0,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
2694 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
2695 tcp,in_port=0,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
2697 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
2698 tcp,in_port=0,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
2701 AT_CHECK([ovs-appctl revalidator/purge], [0])
2702 AT_CHECK([ovs-ofctl --protocols=OpenFlow10 dump-flows br0 | ofctl_strip | sort], [0], [dnl
2703 n_packets=3, n_bytes=180, priority=0 actions=CONTROLLER:65535
2711 AT_SETUP([ofproto-dpif - table-miss flow (OpenFlow 1.3)])
2712 OVS_VSWITCHD_START([dnl
2713 add-port br0 p1 -- set Interface p1 type=dummy
2715 ON_EXIT([kill `cat ovs-ofctl.pid`])
2717 AT_CAPTURE_FILE([ofctl_monitor.log])
2718 # A table-miss flow has priority 0 and no match
2719 AT_CHECK([ovs-ofctl --protocols=OpenFlow13 add-flow br0 'priority=0 actions=output:CONTROLLER'])
2721 dnl Singleton controller action.
2722 AT_CHECK([ovs-ofctl monitor -P openflow10 --protocols=OpenFlow13 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
2725 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)'
2727 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2728 ovs-appctl -t ovs-ofctl exit
2730 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2732 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2733 OFPT_PACKET_IN (OF1.3) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
2734 tcp,in_port=0,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
2736 OFPT_PACKET_IN (OF1.3) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
2737 tcp,in_port=0,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
2739 OFPT_PACKET_IN (OF1.3) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
2740 tcp,in_port=0,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
2743 AT_CHECK([ovs-appctl revalidator/purge], [0])
2744 AT_CHECK([ovs-ofctl --protocols=OpenFlow13 dump-flows br0 | ofctl_strip | sort], [0], [dnl
2745 n_packets=3, n_bytes=180, priority=0 actions=CONTROLLER:65535
2746 OFPST_FLOW reply (OF1.3):
2752 AT_SETUP([ofproto-dpif - table-miss flow with async config (OpenFlow 1.3)])
2753 OVS_VSWITCHD_START([dnl
2754 add-port br0 p1 -- set Interface p1 type=dummy
2756 ON_EXIT([kill `cat ovs-ofctl.pid`])
2758 ovs-appctl time/stop
2760 AT_CAPTURE_FILE([ofctl_monitor.log])
2761 # A table-miss flow has priority 0 and no match
2762 AT_CHECK([ovs-ofctl --protocols=OpenFlow13 add-flow br0 'priority=0 actions=output:CONTROLLER'])
2764 dnl Singleton controller action.
2765 AT_CHECK([ovs-ofctl monitor -P openflow10 --protocols=OpenFlow13 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
2767 # Become slave (OF 1.3), which should disable everything except port status.
2768 ovs-appctl -t ovs-ofctl ofctl/send 041800180000000200000003000000000000000000000001
2770 # Ensure that ovs-vswitchd gets a chance to reply before sending another command.
2771 ovs-appctl time/warp 500 100
2773 # Use OF 1.3 OFPT_SET_ASYNC to enable OFPR_NO_MATCH for slave only.
2774 ovs-appctl -t ovs-ofctl ofctl/send 041c002000000002000000000000000100000000000000000000000000000000
2776 ovs-appctl time/warp 500 100
2778 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)'
2780 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2781 ovs-appctl -t ovs-ofctl exit
2783 AT_CHECK([ovs-appctl revalidator/purge], [0])
2784 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2785 send: OFPT_ROLE_REQUEST (OF1.3) (xid=0x2): role=slave generation_id=1
2786 OFPT_ROLE_REPLY (OF1.3) (xid=0x2): role=slave generation_id=1
2788 send: OFPT_SET_ASYNC (OF1.3) (xid=0x2):
2799 OFPT_PACKET_IN (OF1.3) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
2800 tcp,in_port=0,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
2802 OFPT_PACKET_IN (OF1.3) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
2803 tcp,in_port=0,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
2805 OFPT_PACKET_IN (OF1.3) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
2806 tcp,in_port=0,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
2809 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2811 AT_CHECK([ovs-ofctl --protocols=OpenFlow13 dump-flows br0 | ofctl_strip | sort], [0], [dnl
2812 n_packets=3, n_bytes=180, priority=0 actions=CONTROLLER:65535
2813 OFPST_FLOW reply (OF1.3):
2820 AT_SETUP([ofproto-dpif - table-miss flow (OpenFlow 1.4)])
2821 OVS_VSWITCHD_START([dnl
2822 add-port br0 p1 -- set Interface p1 type=dummy
2824 ON_EXIT([kill `cat ovs-ofctl.pid`])
2826 AT_CAPTURE_FILE([ofctl_monitor.log])
2827 # A table-miss flow has priority 0 and no match
2828 AT_CHECK([ovs-ofctl --protocols=OpenFlow14 add-flow br0 'priority=0 actions=output:CONTROLLER'])
2830 dnl Singleton controller action.
2831 AT_CHECK([ovs-ofctl monitor -P openflow10 --protocols=OpenFlow14 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
2834 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)'
2836 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2837 ovs-appctl -t ovs-ofctl exit
2839 AT_CHECK([ovs-appctl revalidator/purge], [0])
2840 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2841 OFPT_PACKET_IN (OF1.4) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
2842 tcp,in_port=0,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
2844 OFPT_PACKET_IN (OF1.4) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
2845 tcp,in_port=0,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
2847 OFPT_PACKET_IN (OF1.4) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
2848 tcp,in_port=0,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
2851 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2853 AT_CHECK([ovs-ofctl --protocols=OpenFlow14 dump-flows br0 | ofctl_strip | sort], [0], [dnl
2854 n_packets=3, n_bytes=180, priority=0 actions=CONTROLLER:65535
2855 OFPST_FLOW reply (OF1.4):
2862 AT_SETUP([ofproto-dpif - packet-in reasons (Openflow 1.3)])
2863 OVS_VSWITCHD_START([dnl
2864 add-port br0 p1 -- set Interface p1 type=dummy
2866 ON_EXIT([kill `cat ovs-ofctl.pid`])
2868 AT_CAPTURE_FILE([ofctl_monitor.log])
2869 AT_DATA([flows.txt], [dnl
2870 table=0 in_port=1 actions=write_actions(output(CONTROLLER)),goto_table(1)
2871 table=1 actions=output(CONTROLLER),goto_table(2)
2872 table=2 actions=group:1234
2874 AT_CHECK([ovs-ofctl --protocols=OpenFlow13 add-group br0 'group_id=1234,type=all,bucket=output:10,bucket=output:CONTROLLER'])
2875 AT_CHECK([ovs-ofctl --protocols=OpenFlow13 add-flows br0 flows.txt])
2877 dnl Singleton controller action.
2878 AT_CHECK([ovs-ofctl monitor -P openflow10 --protocols=OpenFlow13 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
2881 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)'
2883 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2884 ovs-appctl -t ovs-ofctl exit
2886 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2888 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2889 OFPT_PACKET_IN (OF1.3) (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
2890 tcp,in_port=0,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
2892 OFPT_PACKET_IN (OF1.3) (xid=0x0): table_id=2 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
2893 tcp,in_port=0,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
2895 OFPT_PACKET_IN (OF1.3) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
2896 tcp,in_port=0,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
2898 OFPT_PACKET_IN (OF1.3) (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
2899 tcp,in_port=0,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
2901 OFPT_PACKET_IN (OF1.3) (xid=0x0): table_id=2 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
2902 tcp,in_port=0,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
2904 OFPT_PACKET_IN (OF1.3) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
2905 tcp,in_port=0,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
2907 OFPT_PACKET_IN (OF1.3) (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
2908 tcp,in_port=0,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:0
2910 OFPT_PACKET_IN (OF1.3) (xid=0x0): table_id=2 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
2911 tcp,in_port=0,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:0
2913 OFPT_PACKET_IN (OF1.3) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
2914 tcp,in_port=0,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:0
2917 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2919 AT_CHECK([ovs-ofctl --protocols=OpenFlow13 dump-flows br0 | ofctl_strip | sort], [0], [dnl
2920 n_packets=3, n_bytes=180, in_port=1 actions=write_actions(CONTROLLER:65535),goto_table:1
2921 table=1, n_packets=3, n_bytes=180, actions=CONTROLLER:65535,goto_table:2
2922 table=2, n_packets=3, n_bytes=180, actions=group:1234
2923 OFPST_FLOW reply (OF1.3):
2930 AT_SETUP([ofproto-dpif - packet-in reasons (Openflow 1.4)])
2931 OVS_VSWITCHD_START([dnl
2932 add-port br0 p1 -- set Interface p1 type=dummy
2934 ON_EXIT([kill `cat ovs-ofctl.pid`])
2936 AT_CAPTURE_FILE([ofctl_monitor.log])
2937 AT_DATA([flows.txt], [dnl
2938 table=0 in_port=1 actions=write_actions(output(CONTROLLER)),goto_table(1)
2939 table=1 actions=output(CONTROLLER),goto_table(2)
2940 table=2 actions=group:1234
2942 AT_CHECK([ovs-ofctl --protocols=OpenFlow14 add-group br0 'group_id=1234,type=all,bucket=output:10,bucket=output:CONTROLLER'])
2943 AT_CHECK([ovs-ofctl --protocols=OpenFlow14 add-flows br0 flows.txt])
2945 dnl Singleton controller action.
2946 AT_CHECK([ovs-ofctl monitor -P openflow10 --protocols=OpenFlow14 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
2949 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)'
2951 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2952 ovs-appctl -t ovs-ofctl exit
2954 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2956 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2957 OFPT_PACKET_IN (OF1.4) (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
2958 tcp,in_port=0,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
2960 OFPT_PACKET_IN (OF1.4) (xid=0x0): table_id=2 cookie=0x0 total_len=60 in_port=1 (via group) data_len=60 (unbuffered)
2961 tcp,in_port=0,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
2963 OFPT_PACKET_IN (OF1.4) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via action_set) data_len=60 (unbuffered)
2964 tcp,in_port=0,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
2966 OFPT_PACKET_IN (OF1.4) (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
2967 tcp,in_port=0,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
2969 OFPT_PACKET_IN (OF1.4) (xid=0x0): table_id=2 cookie=0x0 total_len=60 in_port=1 (via group) data_len=60 (unbuffered)
2970 tcp,in_port=0,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
2972 OFPT_PACKET_IN (OF1.4) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via action_set) data_len=60 (unbuffered)
2973 tcp,in_port=0,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
2975 OFPT_PACKET_IN (OF1.4) (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
2976 tcp,in_port=0,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:0
2978 OFPT_PACKET_IN (OF1.4) (xid=0x0): table_id=2 cookie=0x0 total_len=60 in_port=1 (via group) data_len=60 (unbuffered)
2979 tcp,in_port=0,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:0
2981 OFPT_PACKET_IN (OF1.4) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via action_set) data_len=60 (unbuffered)
2982 tcp,in_port=0,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:0
2985 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2987 AT_CHECK([ovs-ofctl --protocols=OpenFlow14 dump-flows br0 | ofctl_strip | sort], [0], [dnl
2988 n_packets=3, n_bytes=180, in_port=1 actions=write_actions(CONTROLLER:65535),goto_table:1
2989 table=1, n_packets=3, n_bytes=180, actions=CONTROLLER:65535,goto_table:2
2990 table=2, n_packets=3, n_bytes=180, actions=group:1234
2991 OFPST_FLOW reply (OF1.4):
2998 AT_SETUP([ofproto-dpif - ARP modification slow-path])
3000 ADD_OF_PORTS([br0], [1], [2])
3002 ovs-vsctl -- set Interface p2 type=dummy options:pcap=p2.pcap
3003 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'
3005 # Input some packets that should follow the arp modification slow-path.
3007 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)'
3009 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
3011 # Check the packets that were output.
3012 AT_CHECK([ovs-ofctl parse-pcap p2.pcap], [0], [dnl
3013 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
3014 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
3015 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
3016 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
3017 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
3018 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
3019 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
3020 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
3021 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
3027 AT_SETUP([ofproto-dpif - VLAN handling])
3029 [set Bridge br0 fail-mode=standalone -- \
3030 add-port br0 p1 trunks=10,12 -- \
3031 add-port br0 p2 tag=10 -- \
3032 add-port br0 p3 tag=12 \
3033 other-config:priority-tags=true -- \
3034 add-port br0 p4 tag=12 -- \
3035 add-port br0 p5 vlan_mode=native-tagged tag=10 -- \
3036 add-port br0 p6 vlan_mode=native-tagged tag=10 trunks=10,12 -- \
3037 add-port br0 p7 vlan_mode=native-untagged tag=12 -- \
3038 add-port br0 p8 vlan_mode=native-untagged tag=12 trunks=10,12 \
3039 other-config:priority-tags=true -- \
3040 set Interface p1 type=dummy -- \
3041 set Interface p2 type=dummy -- \
3042 set Interface p3 type=dummy -- \
3043 set Interface p4 type=dummy -- \
3044 set Interface p5 type=dummy -- \
3045 set Interface p6 type=dummy -- \
3046 set Interface p7 type=dummy -- \
3047 set Interface p8 type=dummy --])
3049 dnl Each of these specifies an in_port by number, a VLAN VID (or "none"),
3050 dnl a VLAN PCP (used if the VID isn't "none") and the expected set of datapath
3056 "100 10 0 1,5,6,7,8,pop_vlan,2" \
3057 "100 10 1 1,5,6,7,8,pop_vlan,2" \
3060 "100 12 0 1,5,6,pop_vlan,3,4,7,8" \
3061 "100 12 1 1,5,6,pop_vlan,4,7,push_vlan(vid=0,pcp=1),3,8" \
3065 "1 10 0 5,6,7,8,100,pop_vlan,2" \
3066 "1 10 1 5,6,7,8,100,pop_vlan,2" \
3069 "1 12 0 5,6,100,pop_vlan,3,4,7,8" \
3070 "1 12 1 5,6,100,pop_vlan,4,7,push_vlan(vid=0,pcp=1),3,8" \
3071 "2 none 0 push_vlan(vid=10,pcp=0),1,5,6,7,8,100" \
3072 "2 0 0 pop_vlan,push_vlan(vid=10,pcp=0),1,5,6,7,8,100" \
3073 "2 0 1 pop_vlan,push_vlan(vid=10,pcp=1),1,5,6,7,8,100" \
3080 "3 none 0 4,7,8,push_vlan(vid=12,pcp=0),1,5,6,100" \
3081 "3 0 0 pop_vlan,4,7,8,push_vlan(vid=12,pcp=0),1,5,6,100" \
3082 "3 0 1 8,pop_vlan,4,7,push_vlan(vid=12,pcp=1),1,5,6,100" \
3089 "4 none 0 3,7,8,push_vlan(vid=12,pcp=0),1,5,6,100" \
3090 "4 0 0 pop_vlan,3,7,8,push_vlan(vid=12,pcp=0),1,5,6,100" \
3091 "4 0 1 3,8,pop_vlan,7,push_vlan(vid=12,pcp=1),1,5,6,100" \
3098 "5 none 0 2,push_vlan(vid=10,pcp=0),1,6,7,8,100" \
3099 "5 0 0 pop_vlan,2,push_vlan(vid=10,pcp=0),1,6,7,8,100" \
3100 "5 0 1 pop_vlan,2,push_vlan(vid=10,pcp=1),1,6,7,8,100" \
3101 "5 10 0 1,6,7,8,100,pop_vlan,2" \
3102 "5 10 1 1,6,7,8,100,pop_vlan,2" \
3105 "5 12 0 1,6,100,pop_vlan,3,4,7,8" \
3106 "5 12 1 1,6,100,pop_vlan,4,7,push_vlan(vid=0,pcp=1),3,8" \
3107 "6 none 0 2,push_vlan(vid=10,pcp=0),1,5,7,8,100" \
3108 "6 0 0 pop_vlan,2,push_vlan(vid=10,pcp=0),1,5,7,8,100" \
3109 "6 0 1 pop_vlan,2,push_vlan(vid=10,pcp=1),1,5,7,8,100" \
3110 "6 10 0 1,5,7,8,100,pop_vlan,2" \
3111 "6 10 1 1,5,7,8,100,pop_vlan,2" \
3114 "6 12 0 1,5,100,pop_vlan,3,4,7,8" \
3115 "6 12 1 1,5,100,pop_vlan,4,7,push_vlan(vid=0,pcp=1),3,8" \
3116 "7 none 0 3,4,8,push_vlan(vid=12,pcp=0),1,5,6,100" \
3117 "7 0 0 pop_vlan,3,4,8,push_vlan(vid=12,pcp=0),1,5,6,100" \
3118 "7 0 1 3,8,pop_vlan,4,push_vlan(vid=12,pcp=1),1,5,6,100" \
3119 "7 10 0 1,5,6,8,100,pop_vlan,2" \
3120 "7 10 1 1,5,6,8,100,pop_vlan,2" \
3123 "7 12 0 1,5,6,100,pop_vlan,3,4,8" \
3124 "7 12 1 1,5,6,100,pop_vlan,4,push_vlan(vid=0,pcp=1),3,8" \
3125 "8 none 0 3,4,7,push_vlan(vid=12,pcp=0),1,5,6,100" \
3126 "8 0 0 pop_vlan,3,4,7,push_vlan(vid=12,pcp=0),1,5,6,100" \
3127 "8 0 1 3,pop_vlan,4,7,push_vlan(vid=12,pcp=1),1,5,6,100" \
3128 "8 10 0 1,5,6,7,100,pop_vlan,2" \
3129 "8 10 1 1,5,6,7,100,pop_vlan,2" \
3132 "8 12 0 1,5,6,100,pop_vlan,3,4,7" \
3133 "8 12 1 1,5,6,100,pop_vlan,4,7,push_vlan(vid=0,pcp=1),3"
3141 if test $vlan = none; then
3142 flow="in_port($in_port),eth(src=50:54:00:00:00:01,dst=ff:ff:ff:ff:ff:ff),eth_type(0xabcd)"
3144 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))"
3147 echo "----------------------------------------------------------------------"
3148 echo "in_port=$in_port vlan=$vlan pcp=$pcp"
3150 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
3151 actual=`tail -1 stdout | sed 's/Datapath actions: //'`
3153 AT_CHECK([ovs-dpctl normalize-actions "$flow" "$expected"], [0], [stdout])
3155 AT_CHECK([ovs-dpctl normalize-actions "$flow" "$actual"], [0], [expout])
3161 AT_SETUP([ofproto-dpif - MPLS handling])
3162 OVS_VSWITCHD_START([dnl
3163 add-port br0 p1 -- set Interface p1 type=dummy
3165 ON_EXIT([kill `cat ovs-ofctl.pid`])
3167 AT_CAPTURE_FILE([ofctl_monitor.log])
3168 AT_DATA([flows.txt], [dnl
3169 dl_src=40:44:44:44:00:00 actions=push_mpls:0x8847,controller
3170 dl_src=40:44:44:44:00:01,mpls actions=push_mpls:0x8847,controller
3171 dl_src=40:44:44:44:00:02,mpls actions=push_mpls:0x8848,controller
3173 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 add-flows br0 flows.txt])
3175 dnl In this test, we push an MPLS tag to an ethernet packet.
3176 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
3179 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)'
3181 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3182 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
3184 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
3185 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3186 mpls,in_port=0,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
3187 00000000 50 54 00 00 00 07 40 44-44 44 00 00 88 47 00 00
3188 00000010 01 40 45 00 00 28 00 00-00 00 40 06 f9 7c c0 a8
3189 00000020 00 01 c0 a8 00 02 00 00-00 00 00 00 00 00 00 00
3190 00000030 00 00 50 00 00 00 00 00-00 00 00 00 00 00 00 00
3192 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3193 mpls,in_port=0,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
3194 00000000 50 54 00 00 00 07 40 44-44 44 00 00 88 47 00 00
3195 00000010 01 40 45 00 00 28 00 00-00 00 40 06 f9 7c c0 a8
3196 00000020 00 01 c0 a8 00 02 00 00-00 00 00 00 00 00 00 00
3197 00000030 00 00 50 00 00 00 00 00-00 00 00 00 00 00 00 00
3199 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3200 mpls,in_port=0,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
3201 00000000 50 54 00 00 00 07 40 44-44 44 00 00 88 47 00 00
3202 00000010 01 40 45 00 00 28 00 00-00 00 40 06 f9 7c c0 a8
3203 00000020 00 01 c0 a8 00 02 00 00-00 00 00 00 00 00 00 00
3204 00000030 00 00 50 00 00 00 00 00-00 00 00 00 00 00 00 00
3207 dnl In this test, we push an MPLS tag to an MPLS packet. The LSE should be
3208 dnl copied exactly, except for the BOS bit.
3209 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
3212 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)'
3214 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3215 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
3217 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
3218 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3219 mpls,in_port=0,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
3220 00000000 50 54 00 00 00 07 40 44-44 44 00 01 88 47 00 00
3221 00000010 a0 40 00 00 a1 40 00 00-00 00 00 00 00 00 00 00
3222 00000020 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
3223 00000030 00 00 00 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,in_port=0,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
3227 00000000 50 54 00 00 00 07 40 44-44 44 00 01 88 47 00 00
3228 00000010 a0 40 00 00 a1 40 00 00-00 00 00 00 00 00 00 00
3229 00000020 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
3230 00000030 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
3232 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3233 mpls,in_port=0,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
3234 00000000 50 54 00 00 00 07 40 44-44 44 00 01 88 47 00 00
3235 00000010 a0 40 00 00 a1 40 00 00-00 00 00 00 00 00 00 00
3236 00000020 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
3237 00000030 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
3240 dnl In this test, we push an MPLS tag to an MPLS packet. The LSE should be
3241 dnl copied exactly, except for the BOS bit. The ethertype should be updated
3242 dnl to the MPLS ethertype of the MPLS push action which differs to that
3243 dnl of the input packet.
3244 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
3247 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)'
3249 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3250 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
3252 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
3253 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3254 mplsm,in_port=0,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
3255 00000000 50 54 00 00 00 07 40 44-44 44 00 02 88 48 00 00
3256 00000010 a0 40 00 00 a1 40 00 00-00 00 00 00 00 00 00 00
3257 00000020 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
3258 00000030 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
3260 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3261 mplsm,in_port=0,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
3262 00000000 50 54 00 00 00 07 40 44-44 44 00 02 88 48 00 00
3263 00000010 a0 40 00 00 a1 40 00 00-00 00 00 00 00 00 00 00
3264 00000020 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
3265 00000030 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
3267 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3268 mplsm,in_port=0,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
3269 00000000 50 54 00 00 00 07 40 44-44 44 00 02 88 48 00 00
3270 00000010 a0 40 00 00 a1 40 00 00-00 00 00 00 00 00 00 00
3271 00000020 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
3272 00000030 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
3278 AT_SETUP([ofproto-dpif - VLAN+MPLS handling])
3279 OVS_VSWITCHD_START([dnl
3280 add-port br0 p1 -- set Interface p1 type=dummy
3282 ON_EXIT([kill `cat ovs-ofctl.pid`])
3284 AT_CAPTURE_FILE([ofctl_monitor.log])
3285 AT_DATA([flows.txt], [dnl
3286 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
3287 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
3288 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
3289 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
3290 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
3291 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
3292 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
3293 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
3294 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
3295 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
3297 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 add-flows br0 flows.txt])
3299 dnl Modified MPLS controller action.
3300 dnl In this test, we push the MPLS tag before pushing a VLAN tag, so we see
3301 dnl both of these in the final flow
3302 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
3305 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)'
3307 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3308 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
3310 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
3311 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3312 mpls,in_port=0,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
3313 00000000 50 54 00 00 00 07 40 44-44 44 54 50 81 00 20 63
3314 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3315 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3316 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3317 00000040 00 00 00 00
3319 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3320 mpls,in_port=0,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
3321 00000000 50 54 00 00 00 07 40 44-44 44 54 50 81 00 20 63
3322 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3323 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3324 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3325 00000040 00 00 00 00
3327 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3328 mpls,in_port=0,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
3329 00000000 50 54 00 00 00 07 40 44-44 44 54 50 81 00 20 63
3330 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3331 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3332 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3333 00000040 00 00 00 00
3336 dnl Modified MPLS controller action.
3337 dnl In this test, the input packet in vlan-tagged, which should be stripped
3338 dnl before we push the MPLS and VLAN tags.
3339 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
3342 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))'
3344 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3345 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
3347 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
3348 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3349 mpls,in_port=0,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
3350 00000000 50 54 00 00 00 07 40 44-44 44 54 51 81 00 20 63
3351 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3352 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3353 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3355 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3356 mpls,in_port=0,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
3357 00000000 50 54 00 00 00 07 40 44-44 44 54 51 81 00 20 63
3358 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3359 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3360 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3362 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3363 mpls,in_port=0,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
3364 00000000 50 54 00 00 00 07 40 44-44 44 54 51 81 00 20 63
3365 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3366 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3367 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3370 dnl Modified MPLS controller action.
3371 dnl In this test, we push the MPLS tag before pushing a VLAN tag, so we see
3372 dnl both of these in the final flow
3373 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
3376 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)'
3378 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3379 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
3381 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
3382 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3383 mpls,in_port=0,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
3384 00000000 52 54 00 00 00 07 40 44-44 44 54 52 81 00 20 63
3385 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3386 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3387 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3388 00000040 00 00 00 00
3390 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3391 mpls,in_port=0,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
3392 00000000 52 54 00 00 00 07 40 44-44 44 54 52 81 00 20 63
3393 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3394 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3395 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3396 00000040 00 00 00 00
3398 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3399 mpls,in_port=0,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
3400 00000000 52 54 00 00 00 07 40 44-44 44 54 52 81 00 20 63
3401 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3402 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3403 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3404 00000040 00 00 00 00
3407 dnl Modified MPLS controller action.
3408 dnl In this test, the input packet in vlan-tagged, which should be stripped
3409 dnl before we push the MPLS and VLAN tags.
3410 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
3413 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))'
3415 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3416 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
3418 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
3419 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3420 mpls,in_port=0,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
3421 00000000 50 54 00 00 00 07 40 44-44 44 54 53 81 00 20 63
3422 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3423 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3424 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3426 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3427 mpls,in_port=0,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
3428 00000000 50 54 00 00 00 07 40 44-44 44 54 53 81 00 20 63
3429 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3430 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3431 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3433 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3434 mpls,in_port=0,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
3435 00000000 50 54 00 00 00 07 40 44-44 44 54 53 81 00 20 63
3436 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3437 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3438 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3441 dnl Modified MPLS controller action.
3442 dnl In this test, we push the VLAN tag before pushing a MPLS tag, but these
3443 dnl actions are reordered, so we see both of these in the final flow.
3444 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
3447 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)'
3449 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3450 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
3452 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
3453 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3454 mpls,in_port=0,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
3455 00000000 50 54 00 00 00 07 40 44-44 44 54 54 81 00 20 63
3456 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3457 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3458 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3459 00000040 00 00 00 00
3461 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3462 mpls,in_port=0,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
3463 00000000 50 54 00 00 00 07 40 44-44 44 54 54 81 00 20 63
3464 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3465 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3466 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3467 00000040 00 00 00 00
3469 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3470 mpls,in_port=0,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
3471 00000000 50 54 00 00 00 07 40 44-44 44 54 54 81 00 20 63
3472 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3473 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3474 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3475 00000040 00 00 00 00
3478 dnl Modified MPLS controller action.
3479 dnl In this test, the input packet in vlan-tagged, which should be stripped
3480 dnl before we push the MPLS and VLAN tags.
3481 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
3484 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))'
3486 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3487 OVS_APP_EXIT_AND_WAIT([ovs-ofctl])
3489 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
3490 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3491 mpls,in_port=0,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
3492 00000000 50 54 00 00 00 07 40 44-44 44 54 55 81 00 20 63
3493 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3494 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3495 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3497 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3498 mpls,in_port=0,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
3499 00000000 50 54 00 00 00 07 40 44-44 44 54 55 81 00 20 63
3500 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3501 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3502 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3504 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3505 mpls,in_port=0,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
3506 00000000 50 54 00 00 00 07 40 44-44 44 54 55 81 00 20 63
3507 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3508 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3509 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3512 dnl Modified MPLS controller action.
3513 dnl In this test, we push the VLAN tag before pushing a MPLS tag, but these
3514 dnl actions are reordered, so we see both of these in the final flow.
3515 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
3518 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)'
3520 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3521 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
3523 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
3524 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3525 mpls,in_port=0,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
3526 00000000 50 54 00 00 00 07 40 44-44 44 54 56 81 00 20 63
3527 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3528 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3529 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3530 00000040 00 00 00 00
3532 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3533 mpls,in_port=0,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
3534 00000000 50 54 00 00 00 07 40 44-44 44 54 56 81 00 20 63
3535 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3536 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3537 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3538 00000040 00 00 00 00
3540 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3541 mpls,in_port=0,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
3542 00000000 50 54 00 00 00 07 40 44-44 44 54 56 81 00 20 63
3543 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3544 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3545 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3546 00000040 00 00 00 00
3549 dnl Modified MPLS controller action.
3550 dnl In this test, the input packet in vlan-tagged, which should be stripped
3551 dnl before we push the MPLS and VLAN tags.
3552 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 -m 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
3555 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))'
3557 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3558 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
3560 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
3561 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3562 mpls,in_port=0,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
3563 00000000 50 54 00 00 00 07 40 44-44 44 54 57 81 00 20 63
3564 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3565 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3566 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3568 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3569 mpls,in_port=0,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
3570 00000000 50 54 00 00 00 07 40 44-44 44 54 57 81 00 20 63
3571 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3572 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3573 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3575 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3576 mpls,in_port=0,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
3577 00000000 50 54 00 00 00 07 40 44-44 44 54 57 81 00 20 63
3578 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3579 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3580 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3583 dnl Modified MPLS controller action.
3584 dnl In this test, the input packet in vlan-tagged, which should be stripped
3585 dnl before we push the MPLS and VLAN tags.
3586 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
3589 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))'
3591 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3592 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
3594 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
3595 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3596 mpls,in_port=0,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
3597 00000000 50 54 00 00 00 07 40 44-44 44 54 58 81 00 20 63
3598 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3599 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3600 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3602 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3603 mpls,in_port=0,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
3604 00000000 50 54 00 00 00 07 40 44-44 44 54 58 81 00 20 63
3605 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3606 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3607 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3609 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3610 mpls,in_port=0,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
3611 00000000 50 54 00 00 00 07 40 44-44 44 54 58 81 00 20 63
3612 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3613 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3614 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3617 dnl Modified MPLS controller action.
3618 dnl In this test, the input packet in vlan-tagged, which should be modified
3619 dnl before we push MPLS and VLAN tags.
3620 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
3623 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))'
3625 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3626 ovs-appctl -t ovs-ofctl exit
3628 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
3629 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3630 mpls,in_port=0,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
3631 00000000 50 54 00 00 00 07 40 44-44 44 54 59 81 00 20 63
3632 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3633 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3634 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3636 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3637 mpls,in_port=0,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
3638 00000000 50 54 00 00 00 07 40 44-44 44 54 59 81 00 20 63
3639 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3640 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3641 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3643 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3644 mpls,in_port=0,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
3645 00000000 50 54 00 00 00 07 40 44-44 44 54 59 81 00 20 63
3646 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3647 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3648 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3651 AT_CHECK([ovs-appctl revalidator/purge], [0])
3652 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
3653 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
3654 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
3655 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
3656 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
3657 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
3658 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
3659 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
3660 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
3661 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
3662 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
3663 OFPST_FLOW reply (OF1.2):
3669 AT_SETUP([ofproto-dpif - fragment handling - trace])
3671 ADD_OF_PORTS([br0], [1], [2], [3], [4], [5], [6], [90])
3672 AT_DATA([flows.txt], [dnl
3673 priority=75 tcp ip_frag=no tp_dst=80 actions=move:OXM_OF_TCP_DST[[]]->OXM_OF_TCP_SRC[[]],output:1
3674 priority=75 tcp ip_frag=first tp_dst=80 actions=move:OXM_OF_TCP_DST[[]]->OXM_OF_TCP_SRC[[]],output:2
3675 priority=50 tcp ip_frag=no actions=move:OXM_OF_TCP_DST[[]]->OXM_OF_TCP_SRC[[]],output:4
3676 priority=50 tcp ip_frag=first actions=move:OXM_OF_TCP_DST[[]]->OXM_OF_TCP_SRC[[]],output:5
3677 priority=50 tcp ip_frag=later actions=output:6
3679 AT_CHECK([ovs-ofctl replace-flows br0 flows.txt])
3681 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"
3682 no_flow="$base_flow,frag=no),tcp(src=12345,dst=80)"
3683 first_flow="$base_flow,frag=first),tcp(src=12345,dst=80)"
3684 later_flow="$base_flow,frag=later)"
3686 # mode no first later
3689 'drop 1 drop drop' \
3698 AT_CHECK([ovs-ofctl set-frags br0 $mode])
3699 for type in no first later; do
3700 eval flow=\$${type}_flow exp_output=\$$type
3701 printf "\n%s\n" "----$mode $type-----"
3702 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
3704 if test $mode = drop && test $type != no; then
3705 echo 'Packets dropped because they are IP fragments and the fragment handling mode is "drop".' >> expout
3706 echo "Datapath actions: $exp_output" >> expout
3707 elif test $type = later; then
3708 echo "Datapath actions: $exp_output" >> expout
3710 echo "Datapath actions: set(tcp(src=80,dst=80)),$exp_output" >> expout
3712 AT_CHECK([grep 'IP fragments' stdout; tail -1 stdout], [0], [expout])
3718 AT_SETUP([ofproto-dpif - fragment handling - upcall])
3720 ADD_OF_PORTS([br0], [1], [2], [3], [4], [5], [6], [90])
3721 AT_DATA([flows.txt], [dnl
3722 priority=75 tcp ip_frag=no tp_dst=80 actions=set_field:81->tcp_dst,output:1
3723 priority=75 tcp ip_frag=first tp_dst=80 actions=set_field:81->tcp_dst,output:2
3724 priority=50 tcp ip_frag=no actions=set_field:81->tcp_dst,output:4
3725 priority=50 tcp ip_frag=first actions=set_field:81->tcp_dst,output:5
3726 priority=50 tcp ip_frag=later actions=output:6
3728 AT_CHECK([ovs-ofctl replace-flows br0 flows.txt])
3730 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"
3731 no_flow="$base_flow,frag=no),tcp(src=12345,dst=80)"
3732 first_flow="$base_flow,frag=first),tcp(src=12345,dst=80)"
3733 later_flow="$base_flow,frag=later)"
3735 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
3739 AT_CHECK([ovs-ofctl set-frags br0 $mode])
3740 for type in no first later; do
3741 eval flow=\$${type}_flow
3742 printf "\n%s\n" "----$mode $type-----"
3744 AT_CHECK([ovs-appctl netdev-dummy/receive p90 "$flow"], [0], [stdout])
3747 AT_CHECK([ovs-appctl dpctl/dump-flows], [0], [dnl
3748 flow-dump from non-dpdk interfaces:
3749 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
3750 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
3751 recirc_id(0),in_port(90),eth_type(0x0800),ipv4(proto=6,frag=later), packets:0, bytes:0, used:never, actions:6
3756 AT_CHECK([ovs-appctl revalidator/purge], [0])
3757 AT_CHECK([ovs-ofctl set-frags br0 $mode])
3758 for type in no first later; do
3759 eval flow=\$${type}_flow
3760 printf "\n%s\n" "----$mode $type-----"
3762 AT_CHECK([ovs-appctl netdev-dummy/receive p90 "$flow"], [0], [stdout])
3765 AT_CHECK([ovs-appctl dpctl/dump-flows], [0], [dnl
3766 flow-dump from non-dpdk interfaces:
3767 recirc_id(0),in_port(90),eth_type(0x0800),ipv4(proto=6,frag=no),tcp(dst=80), packets:0, bytes:0, used:never, actions:set(tcp(dst=81)),1
3768 recirc_id(0),in_port(90),eth_type(0x0800),ipv4(frag=first), packets:0, bytes:0, used:never, actions:drop
3769 recirc_id(0),in_port(90),eth_type(0x0800),ipv4(frag=later), packets:0, bytes:0, used:never, actions:drop
3774 AT_CHECK([ovs-appctl revalidator/purge], [0])
3775 AT_CHECK([ovs-ofctl set-frags br0 $mode])
3776 for type in no first later; do
3777 eval flow=\$${type}_flow
3778 printf "\n%s\n" "----$mode $type-----"
3780 AT_CHECK([ovs-appctl netdev-dummy/receive p90 "$flow"], [0], [stdout])
3783 AT_CHECK([ovs-appctl dpctl/dump-flows], [0], [dnl
3784 flow-dump from non-dpdk interfaces:
3785 recirc_id(0),in_port(90),eth_type(0x0800),ipv4(proto=6,frag=no),tcp(dst=80), packets:0, bytes:0, used:never, actions:set(tcp(dst=81)),1
3786 recirc_id(0),in_port(90),eth_type(0x0800),ipv4(proto=6,frag=first),tcp(dst=80), packets:0, bytes:0, used:never, actions:set(tcp(dst=81)),2
3787 recirc_id(0),in_port(90),eth_type(0x0800),ipv4(proto=6,frag=later), packets:0, bytes:0, used:never, actions:6
3793 AT_SETUP([ofproto-dpif - fragment handling - actions])
3795 ADD_OF_PORTS([br0], [1], [2], [3], [4], [5], [6], [90])
3797 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])
3798 AT_CHECK([tail -2 stderr | sed 's/^.*|WARN|//'], [0], [dnl
3799 source field tcp_dst lacks correct prerequisites
3800 ovs-ofctl: actions are invalid with specified match (OFPBAC_MATCH_INCONSISTENT)
3803 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])
3804 AT_CHECK([tail -2 stderr | sed 's/^.*|WARN|//'], [0], [dnl
3805 destination field tcp_src lacks correct prerequisites
3806 ovs-ofctl: actions are invalid with specified match (OFPBAC_MATCH_INCONSISTENT)
3809 AT_CHECK([ovs-ofctl add-flow br0 "udp,ip_frag=later actions=set_field:8888->udp_src,output:1"], [1], [], [stderr])
3810 AT_CHECK([tail -2 stderr | sed 's/^.*|WARN|//'], [0], [dnl
3811 set_field udp_src lacks correct prerequisities
3812 ovs-ofctl: actions are invalid with specified match (OFPBAC_MATCH_INCONSISTENT)
3815 AT_CHECK([ovs-ofctl add-flow br0 "udp,ip_frag=later actions=load:8888->NXM_OF_UDP_DST[[]],output:1"], [1], [], [stderr])
3816 AT_CHECK([tail -2 stderr | sed 's/^.*|WARN|//'], [0], [dnl
3817 set_field udp_dst lacks correct prerequisities
3818 ovs-ofctl: actions are invalid with specified match (OFPBAC_MATCH_INCONSISTENT)
3821 AT_CHECK([ovs-ofctl add-flow br0 "sctp,ip_frag=later actions=set_field:8888->sctp_src,output:1"], [1], [], [stderr])
3822 AT_CHECK([tail -2 stderr | sed 's/^.*|WARN|//'], [0], [dnl
3823 set_field sctp_src lacks correct prerequisities
3824 ovs-ofctl: actions are invalid with specified match (OFPBAC_MATCH_INCONSISTENT)
3827 AT_CHECK([ovs-ofctl add-flow br0 "sctp,ip_frag=later actions=set_field:8888->sctp_dst,output:1"], [1], [], [stderr])
3828 AT_CHECK([tail -2 stderr | sed 's/^.*|WARN|//'], [0], [dnl
3829 set_field sctp_dst lacks correct prerequisities
3830 ovs-ofctl: actions are invalid with specified match (OFPBAC_MATCH_INCONSISTENT)
3833 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])
3834 AT_CHECK([tail -2 stderr | sed 's/^.*|WARN|//'], [0], [dnl
3835 source field tcp_dst lacks correct prerequisites
3836 ovs-ofctl: actions are invalid with specified match (OFPBAC_MATCH_INCONSISTENT)
3839 AT_DATA([flows.txt], [dnl
3840 priority=75 tcp actions=load:42->OXM_OF_TCP_SRC[[0..7]],output:1
3842 AT_CHECK([ovs-ofctl -O OpenFlow12 replace-flows br0 flows.txt])
3844 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
3848 AT_CHECK([ovs-ofctl set-frags br0 $mode])
3849 for frag in 4000 6000 6008 4010; do
3850 printf "\n%s\n" "----$mode $frag-----"
3852 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"])
3855 AT_CHECK([ovs-appctl dpctl/dump-flows | sed 's/used:[[0-9]].[[0-9]]*s/used:0.001s/'], [0], [dnl
3856 flow-dump from non-dpdk interfaces:
3857 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
3858 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
3859 recirc_id(0),in_port(90),eth_type(0x0800),ipv4(proto=6,frag=later), packets:1, bytes:74, used:0.001s, actions:1
3862 AT_CHECK([ovs-appctl revalidator/purge], [0])
3863 AT_CHECK([ovs-ofctl set-frags br0 $mode])
3864 for frag in 4000 6000 6008 4010; do
3865 printf "\n%s\n" "----$mode $frag truncated transport header -----"
3867 AT_CHECK([ovs-appctl netdev-dummy/receive p90 "0021853763af 0026b98cb0f9 0800 4500 0018 2e24 $frag 40 06 465d ac11370d ac11370b 828b 0016"])
3870 AT_CHECK([ovs-appctl dpctl/dump-flows | sed 's/used:[[0-9]].[[0-9]]*s/used:0.001s/'], [0], [dnl
3871 flow-dump from non-dpdk interfaces:
3872 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
3873 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
3874 recirc_id(0),in_port(90),eth_type(0x0800),ipv4(proto=6,frag=later), packets:1, bytes:60, used:0.001s, actions:1
3877 AT_CHECK([ovs-appctl revalidator/purge], [0])
3878 AT_CHECK([ovs-ofctl set-frags br0 $mode])
3879 for frag in 4000 6000 6001 4002; do
3880 printf "\n%s\n" "----$mode $frag missing transport header-----"
3882 AT_CHECK([ovs-appctl netdev-dummy/receive p90 "0021853763af 0026b98cb0f9 0800 4500 0014 2e24 $frag 40 06 465d ac11370d ac11370b"])
3885 AT_CHECK([ovs-appctl dpctl/dump-flows | sed 's/used:[[0-9]].[[0-9]]*s/used:0.001s/'], [0], [dnl
3886 flow-dump from non-dpdk interfaces:
3887 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
3888 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
3889 recirc_id(0),in_port(90),eth_type(0x0800),ipv4(proto=6,frag=later), packets:1, bytes:60, used:0.001s, actions:1
3895 AT_SETUP([ofproto-dpif - exit])
3897 ADD_OF_PORTS([br0], [1], [2], [3], [10], [11], [12], [13], [14])
3898 AT_DATA([flows.txt], [dnl
3899 in_port=1 actions=output:10,exit,output:11
3900 in_port=2 actions=output:12,resubmit:1,output:12
3901 in_port=3 actions=output:13,resubmit:2,output:14
3903 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
3904 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])
3905 AT_CHECK([tail -1 stdout], [0],
3906 [Datapath actions: 10
3908 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])
3909 AT_CHECK([tail -1 stdout], [0],
3910 [Datapath actions: 12,10
3912 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])
3913 AT_CHECK([tail -1 stdout], [0],
3914 [Datapath actions: 13,12,10
3920 AT_SETUP([ofproto-dpif - mirroring, select_all])
3922 ADD_OF_PORTS([br0], 1, 2, 3)
3924 set Bridge br0 mirrors=@m --\
3925 --id=@p3 get Port p3 --\
3926 --id=@m create Mirror name=mymirror select_all=true output_port=@p3
3928 AT_DATA([flows.txt], [dnl
3929 in_port=1 actions=output:2
3930 in_port=2 actions=output:1
3932 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
3934 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)"
3935 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
3936 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
3937 [Datapath actions: 2,3
3940 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)"
3941 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
3942 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
3943 [Datapath actions: 1,3
3950 AT_SETUP([ofproto-dpif - mirroring, select_src])
3952 ADD_OF_PORTS([br0], 1, 2, 3)
3954 set Bridge br0 mirrors=@m --\
3955 --id=@p1 get Port p1 -- --id=@p3 get Port p3 --\
3956 --id=@m create Mirror name=mymirror select_src_port=@p1 output_port=@p3
3958 AT_DATA([flows.txt], [dnl
3959 in_port=1 actions=output:2
3960 in_port=2 actions=output:1
3962 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
3964 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)"
3965 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
3966 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
3967 [Datapath actions: 2,3
3970 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)"
3971 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
3972 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
3973 [Datapath actions: 1
3978 AT_SETUP([ofproto-dpif - mirroring, OFPP_NONE ingress port])
3980 ADD_OF_PORTS([br0], 1, 2)
3982 set Bridge br0 mirrors=@m --\
3983 --id=@p2 get Port p2 --\
3984 --id=@m create Mirror name=mymirror select_all=true output_port=@p2
3986 AT_CHECK([ovs-ofctl add-flow br0 action=output:1])
3988 # "in_port" defaults to OFPP_NONE if it's not specified.
3989 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"
3990 AT_CHECK([ovs-appctl ofproto/trace br0 "$flow"], [0], [stdout])
3991 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
3992 [Datapath actions: 1,2
3999 AT_SETUP([ofproto-dpif - mirroring, select_dst])
4001 ADD_OF_PORTS([br0], 1, 2, 3)
4003 set Bridge br0 mirrors=@m --\
4004 --id=@p2 get Port p2 -- --id=@p3 get Port p3 --\
4005 --id=@m create Mirror name=mymirror select_dst_port=@p2 output_port=@p3
4007 AT_DATA([flows.txt], [dnl
4008 in_port=1 actions=output:2
4009 in_port=2 actions=output:1
4011 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
4013 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)"
4014 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
4015 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
4016 [Datapath actions: 2,3
4019 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)"
4020 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
4021 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
4022 [Datapath actions: 1
4029 AT_SETUP([ofproto-dpif - mirroring, select_vlan])
4031 ADD_OF_PORTS([br0], 1, 2, 3)
4033 set Bridge br0 mirrors=@m --\
4034 --id=@p2 get Port p2 -- --id=@p3 get Port p3 --\
4035 --id=@m create Mirror name=mymirror select_all=true select_vlan=11 output_port=@p3
4037 AT_DATA([flows.txt], [dnl
4038 in_port=1, actions=output:2
4040 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
4042 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)"
4043 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
4044 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
4045 [Datapath actions: 2
4048 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))"
4049 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
4050 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
4051 [Datapath actions: 2
4054 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))"
4055 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
4056 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
4057 [Datapath actions: 2,3
4064 AT_SETUP([ofproto-dpif - mirroring, output_port])
4066 ADD_OF_PORTS([br0], 1, 2, 3)
4068 set Bridge br0 mirrors=@m --\
4069 --id=@p3 get Port p3 --\
4070 --id=@m create Mirror name=mymirror select_all=true output_port=@p3
4072 AT_DATA([flows.txt], [dnl
4073 in_port=1 actions=mod_vlan_vid:17,output:2
4074 in_port=2 actions=output:1
4076 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
4078 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)"
4079 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
4080 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
4081 [Datapath actions: push_vlan(vid=17,pcp=0),2,pop_vlan,3
4084 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)"
4085 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
4086 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
4087 [Datapath actions: 1,3
4093 AT_SETUP([ofproto-dpif - mirroring, output_vlan])
4095 ADD_OF_PORTS([br0], 1, 2)
4097 set Bridge br0 mirrors=@m --\
4098 --id=@m create Mirror name=mymirror select_all=true output_vlan=12
4100 AT_DATA([flows.txt], [dnl
4101 in_port=1 actions=output:2
4102 in_port=2 actions=mod_vlan_vid:17,output:1
4104 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
4106 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)"
4107 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
4108 actual=`tail -1 stdout | sed 's/Datapath actions: //'`
4110 expected="2,push_vlan(vid=12,pcp=0),1,2,100"
4111 AT_CHECK([ovs-dpctl normalize-actions "$flow" "$expected"], [0], [stdout])
4113 AT_CHECK([ovs-dpctl normalize-actions "$flow" "$actual"], [0], [expout])
4115 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)"
4116 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
4117 actual=`tail -1 stdout | sed 's/Datapath actions: //'`
4119 expected="push_vlan(vid=17,pcp=0),1,pop_vlan,push_vlan(vid=12,pcp=0),1,2,100"
4120 AT_CHECK([ovs-dpctl normalize-actions "$flow" "$expected"], [0], [stdout])
4122 AT_CHECK([ovs-dpctl normalize-actions "$flow" "$actual"], [0], [expout])
4127 # Two testcases below are for the ofproto/trace command
4128 # The first one tests all correct syntax:
4129 # ofproto/trace [dp_name] odp_flow [-generate|packet]
4130 # ofproto/trace br_name br_flow [-generate|packet]
4131 AT_SETUP([ofproto-dpif - ofproto/trace command 1])
4132 OVS_VSWITCHD_START([set bridge br0 fail-mode=standalone])
4133 ADD_OF_PORTS([br0], 1, 2, 3)
4135 AT_DATA([flows.txt], [dnl
4136 in_port=1 actions=output:2
4137 in_port=2 actions=output:1
4139 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
4141 odp_flow="in_port(1)"
4143 # Test command: ofproto/trace odp_flow with in_port as a name.
4144 AT_CHECK([ovs-appctl ofproto/trace "$odp_flow"], [0], [stdout])
4145 AT_CHECK([tail -1 stdout], [0], [dnl
4149 odp_flow="in_port(1)"
4150 # Test command: ofproto/trace odp_flow
4151 AT_CHECK([ovs-appctl ofproto/trace "$odp_flow"], [0], [stdout])
4152 AT_CHECK([tail -1 stdout], [0], [dnl
4156 # Test command: ofproto/trace dp_name odp_flow
4157 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$odp_flow"], [0], [stdout])
4158 AT_CHECK([tail -1 stdout], [0], [dnl
4161 # Test commmand: ofproto/trace br_name br_flow
4162 AT_CHECK([ovs-appctl ofproto/trace br0 "$br_flow"], [0], [stdout])
4163 AT_CHECK([tail -1 stdout], [0], [dnl
4167 # Delete the inserted flows
4168 AT_CHECK([ovs-ofctl del-flows br0 "in_port=1"], [0], [stdout])
4169 AT_CHECK([ovs-ofctl del-flows br0 "in_port=2"], [0], [stdout])
4171 # This section below tests the [-generate] option
4172 odp_flow="in_port(3),eth(src=50:54:00:00:00:05,dst=ff:ff:ff:ff:ff:ff)"
4173 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"
4175 # Test command: ofproto/trace odp_flow
4176 AT_CHECK([ovs-appctl ofproto/trace "$odp_flow"], [0], [stdout])
4177 # Check for no MAC learning entry
4178 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
4182 # Test command: ofproto/trace br_name br_flow
4183 AT_CHECK([ovs-appctl ofproto/trace br0 "$br_flow"], [0], [stdout])
4184 # Check for no MAC learning entry
4185 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
4189 # Test command: ofproto/trace odp_flow -generate
4190 AT_CHECK([ovs-appctl ofproto/trace "$odp_flow" -generate], [0], [stdout])
4191 # Check for the MAC learning entry
4192 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
4194 3 0 50:54:00:00:00:05 ?
4197 # Test command: ofproto/trace dp_name odp_flow -generate
4198 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy \
4199 "in_port(1),eth(src=50:54:00:00:00:06,dst=50:54:00:00:00:05)" \
4200 -generate], [0], [stdout])
4201 # Check for both MAC learning entries
4202 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
4204 3 0 50:54:00:00:00:05 ?
4205 1 0 50:54:00:00:00:06 ?
4208 # Test command: ofproto/trace br_name br_flow -generate
4209 AT_CHECK([ovs-appctl ofproto/trace br0 \
4210 "in_port=2,dl_src=50:54:00:00:00:07,dl_dst=50:54:00:00:00:06" \
4211 -generate], [0], [stdout])
4212 # Check for both MAC learning entries.
4213 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
4215 3 0 50:54:00:00:00:05 ?
4216 1 0 50:54:00:00:00:06 ?
4217 2 0 50:54:00:00:00:07 ?
4220 # This section beflow tests the [packet] option
4221 # The ovs-tcpundump of packets between port1 and port2
4222 pkt1to2="50540000000250540000000108064500001C000100004001F98CC0A80001C0A800020800F7FF00000000"
4223 pkt2to1="50540000000150540000000208064500001C000100004001F98CC0A80002C0A800010800F7FF00000000"
4225 # Construct the MAC learning table
4226 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy \
4227 "in_port(1),eth(src=50:54:00:00:00:01,dst=ff:ff:ff:ff:ff:ff)" \
4228 -generate], [0], [stdout])
4230 # Construct the MAC learning table
4231 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy \
4232 "in_port(2),eth(src=50:54:00:00:00:02,dst=ff:ff:ff:ff:ff:ff)" \
4233 -generate], [0], [stdout])
4235 # Test command: ofproto/trace odp_flow packet
4236 AT_CHECK([ovs-appctl ofproto/trace \
4237 "in_port(1),skb_priority(1),skb_mark(2)" "$pkt1to2"], [0], [stdout])
4238 AT_CHECK([tail -1 stdout], [0], [dnl
4241 AT_CHECK([head -n 2 stdout], [0], [dnl
4243 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
4246 # Test command: ofproto/trace dp_name odp_flow packet
4247 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy \
4248 "in_port(1),skb_priority(1),skb_mark(2)" "$pkt1to2"], [0], [stdout])
4249 AT_CHECK([tail -1 stdout], [0], [dnl
4252 AT_CHECK([head -n 2 stdout], [0], [dnl
4254 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
4257 # Test command: ofproto/trace br_name br_flow packet
4258 AT_CHECK([ovs-appctl ofproto/trace br0 \
4259 "in_port=2,skb_priority=2,pkt_mark=1" "$pkt2to1"], [0], [stdout],[stderr])
4260 AT_CHECK([tail -1 stdout], [0], [dnl
4263 AT_CHECK([head -n 2 stdout], [0], [dnl
4265 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
4271 # The second test tests the corner cases
4272 AT_SETUP([ofproto-dpif - ofproto/trace command 2])
4274 ADD_OF_PORTS([br0], 1, 2)
4277 odp_flow="in_port(1),eth(src=50:54:00:00:00:01,dst=50:54:00:00:00:02)"
4278 br_flow="in_port=1,dl_src=50:54:00:00:00:01,dl_dst=50:54:00:00:00:02"
4280 generate="-generate"
4281 pkt="50540000000250540000000108064500001C000100004001F98CC0A80001C0A800020800F7FF00000000"
4283 # Test incorrect command: ofproto/trace wrong_name odp_flow [-generate|packet]
4289 [AT_CHECK([ovs-appctl ofproto/trace wrong_name "$odp_flow" option],
4291 AT_CHECK([tail -2 stderr], [0], [dnl
4292 Cannot find the datapath
4293 ovs-appctl: ovs-vswitchd: server returned an error
4296 # Test incorrect command: ofproto/trace empty_string odp_flow [-generate|packet]
4302 [AT_CHECK([ovs-appctl ofproto/trace "" "$odp_flow" option],
4304 AT_CHECK([tail -2 stderr], [0], [dnl
4305 Cannot find the datapath
4306 ovs-appctl: ovs-vswitchd: server returned an error
4309 # Test incorrect command: ofproto/trace nonexist_dp_name odp_flow [-generate|packet]
4315 [AT_CHECK([ovs-appctl ofproto/trace ovs-system "$odp_flow" option],
4317 AT_CHECK([tail -2 stderr], [0], [dnl
4318 Cannot find the datapath
4319 ovs-appctl: ovs-vswitchd: server returned an error
4322 # Test incorrect command: ofproto/trace br_name odp_flow [-generate|packet]
4328 [AT_CHECK([ovs-appctl ofproto/trace br0 "$odp_flow" option],
4330 AT_CHECK([tail -2 stderr], [0], [dnl
4331 Cannot find the datapath
4332 ovs-appctl: ovs-vswitchd: server returned an error
4335 # Test incorrect command: ofproto/trace dp_name br_flow [-generate|packet]
4341 [AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$br_flow" option],
4343 AT_CHECK([tail -2 stderr], [0], [dnl
4345 ovs-appctl: ovs-vswitchd: server returned an error
4348 # Test incorrect command: ofproto/trace br_flow [-generate|packet]
4354 [AT_CHECK([ovs-appctl ofproto/trace "$br_flow" option],
4356 AT_CHECK([tail -2 stderr], [0], [dnl
4357 Must specify bridge name
4358 ovs-appctl: ovs-vswitchd: server returned an error
4361 # Test incorrect command: ofproto/trace dp_name odp_flow garbage_option
4362 AT_CHECK([ovs-appctl ofproto/trace \
4363 ovs-dummy "$odp_flow" garbage_option],
4364 [2], [stdout],[stderr])
4365 AT_CHECK([tail -2 stderr], [0], [dnl
4366 Trailing garbage in packet data
4367 ovs-appctl: ovs-vswitchd: server returned an error
4370 # Test incorrect command: ofproto/trace with 4 arguments
4371 AT_CHECK([ovs-appctl ofproto/trace \
4372 arg1, arg2, arg3, arg4], [2], [stdout],[stderr])
4373 AT_CHECK([tail -2 stderr], [0], [dnl
4374 "ofproto/trace" command takes at most 3 arguments
4375 ovs-appctl: ovs-vswitchd: server returned an error
4378 # Test incorrect command: ofproto/trace with 0 argument
4379 AT_CHECK([ovs-appctl ofproto/trace ], [2], [stdout],[stderr])
4380 AT_CHECK([tail -2 stderr], [0], [dnl
4381 "ofproto/trace" command requires at least 1 arguments
4382 ovs-appctl: ovs-vswitchd: server returned an error
4388 AT_SETUP([ofproto-dpif - ofproto/trace-packet-out])
4390 ADD_OF_PORTS([br0], 1, 2, 3)
4392 AT_DATA([flows.txt], [dnl
4393 in_port=1 actions=output:2
4394 in_port=2 actions=output:1
4396 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
4398 AT_CHECK([ovs-appctl ofproto/trace-packet-out br0 in_port=1 'mod_vlan_vid:123,resubmit(,0)'], [0], [stdout])
4399 AT_CHECK([tail -1 stdout], [0], [dnl
4400 Datapath actions: push_vlan(vid=123,pcp=0),2
4407 m4_define([OFPROTO_TRACE],
4409 AT_CHECK([ovs-appctl ofproto/trace $1 "$flow" $3], [0], [stdout])
4410 actual=`tail -1 stdout | sed 's/Datapath actions: //'`
4412 AT_CHECK([ovs-dpctl normalize-actions "$flow" "$expected" $5],
4415 AT_CHECK([ovs-dpctl normalize-actions "$flow" "$actual" $5],
4418 AT_SETUP([ofproto-dpif - MAC learning])
4419 OVS_VSWITCHD_START([set bridge br0 fail-mode=standalone])
4420 ADD_OF_PORTS([br0], 1, 2, 3)
4422 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)'
4424 # Trace an ARP packet arriving on p3, to create a MAC learning entry.
4427 [in_port(3),eth(src=50:54:00:00:00:05,dst=ff:ff:ff:ff:ff:ff),$arp],
4431 # Check for the MAC learning entry.
4432 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
4434 3 0 50:54:00:00:00:05 ?
4437 # Trace a packet arrival destined for the learned MAC.
4438 # (This will also learn a MAC.)
4441 [in_port(1),eth(src=50:54:00:00:00:06,dst=50:54:00:00:00:05),$arp],
4445 # Check for both MAC learning entries.
4446 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
4448 3 0 50:54:00:00:00:05 ?
4449 1 0 50:54:00:00:00:06 ?
4452 # Trace a packet arrival that updates the first learned MAC entry.
4455 [in_port(2),eth(src=50:54:00:00:00:05,dst=ff:ff:ff:ff:ff:ff),$arp],
4459 # Check that the MAC learning entry was updated.
4460 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
4462 1 0 50:54:00:00:00:06 ?
4463 2 0 50:54:00:00:00:05 ?
4466 # Add another bridge.
4470 -- set bridge br1 datapath-type=dummy])
4471 ADD_OF_PORTS([br1], 4, 5)
4473 # Trace some packet arrivals in br1 to create MAC learning entries there too.
4476 [in_port(4),eth(src=50:54:00:00:00:06,dst=ff:ff:ff:ff:ff:ff),$arp],
4481 [in_port(5),eth(src=50:54:00:00:00:07,dst=ff:ff:ff:ff:ff:ff),$arp],
4485 # Check that the MAC learning entries were added.
4486 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br1 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
4488 4 0 50:54:00:00:00:06 ?
4489 5 0 50:54:00:00:00:07 ?
4492 # Delete port p1 and see that its MAC learning entry disappeared, and
4493 # that the MAC learning entry for the same MAC was also deleted from br1.
4494 AT_CHECK([ovs-vsctl del-port p1])
4495 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
4497 2 0 50:54:00:00:00:05 ?
4499 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br1 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
4501 5 0 50:54:00:00:00:07 ?
4507 AT_SETUP([ofproto-dpif - MAC table overflow])
4509 [set bridge br0 fail-mode=standalone other-config:mac-table-size=10])
4510 ADD_OF_PORTS([br0], 1, 2, 3)
4512 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)'
4514 AT_CHECK([ovs-appctl time/stop])
4516 # Trace 10 ARP packets arriving on p3, to create MAC learning entries.
4517 for i in 0 1 2 3 4 5 6 7 8 9; do
4520 [in_port(3),eth(src=50:54:00:00:00:0$i,dst=ff:ff:ff:ff:ff:ff),$arp],
4523 ovs-appctl time/warp 1000
4526 # Check for the MAC learning entries.
4527 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/ *[[0-9]]\{1,\}$//' | sort],
4529 3 0 50:54:00:00:00:00
4530 3 0 50:54:00:00:00:01
4531 3 0 50:54:00:00:00:02
4532 3 0 50:54:00:00:00:03
4533 3 0 50:54:00:00:00:04
4534 3 0 50:54:00:00:00:05
4535 3 0 50:54:00:00:00:06
4536 3 0 50:54:00:00:00:07
4537 3 0 50:54:00:00:00:08
4538 3 0 50:54:00:00:00:09
4542 # Trace another ARP packet on another MAC.
4545 [in_port(3),eth(src=50:54:00:00:00:10,dst=ff:ff:ff:ff:ff:ff),$arp],
4549 # Check that the new one chased the oldest one out of the table.
4550 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/' | sort],
4552 3 0 50:54:00:00:00:01 ?
4553 3 0 50:54:00:00:00:02 ?
4554 3 0 50:54:00:00:00:03 ?
4555 3 0 50:54:00:00:00:04 ?
4556 3 0 50:54:00:00:00:05 ?
4557 3 0 50:54:00:00:00:06 ?
4558 3 0 50:54:00:00:00:07 ?
4559 3 0 50:54:00:00:00:08 ?
4560 3 0 50:54:00:00:00:09 ?
4561 3 0 50:54:00:00:00:10 ?
4567 AT_SETUP([ofproto-dpif - MAC table overflow fairness])
4569 [set bridge br0 fail-mode=standalone other-config:mac-table-size=10])
4570 ADD_OF_PORTS([br0], 1, 2, 3, 4, 5, 6)
4572 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)'
4574 AT_CHECK([ovs-appctl time/stop])
4576 # Trace packets with 2 different source MACs arriving on each of the 5
4577 # ports, filling up the 10-entry learning table.
4578 for i in 0 1 2 3 4 5 6 7 8 9; do
4580 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
4581 ovs-appctl time/warp 1000
4584 # Check for the MAC learning entries.
4585 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/ *[[0-9]]\{1,\}$//' | sort],
4587 1 0 50:54:00:00:00:00
4588 1 0 50:54:00:00:00:01
4589 2 0 50:54:00:00:00:02
4590 2 0 50:54:00:00:00:03
4591 3 0 50:54:00:00:00:04
4592 3 0 50:54:00:00:00:05
4593 4 0 50:54:00:00:00:06
4594 4 0 50:54:00:00:00:07
4595 5 0 50:54:00:00:00:08
4596 5 0 50:54:00:00:00:09
4600 # Now trace 16 new MACs on another port.
4601 for i in 0 1 2 3 4 5 6 7 8 9 a b c d e f; do
4602 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
4603 ovs-appctl time/warp 1000
4606 # Check the results.
4608 # Our eviction algorithm on overflow is that an arbitrary (but deterministic)
4609 # one of the ports with the most learned MACs loses the least recently used
4610 # one. Thus, the new port will end up with 3 MACs, 3 of the old ports with 1
4611 # MAC each, and the other 2 of the old ports with 2 MACs each.
4613 # (If someone changes lib/heap.c to do something different with equal-priority
4614 # nodes, then the output below could change, but it would still follow the
4615 # rules explained above.)
4616 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/ *[[0-9]]\{1,\}$//' | sort],
4618 1 0 50:54:00:00:00:01
4619 2 0 50:54:00:00:00:03
4620 3 0 50:54:00:00:00:04
4621 3 0 50:54:00:00:00:05
4622 4 0 50:54:00:00:00:07
4623 5 0 50:54:00:00:00:08
4624 5 0 50:54:00:00:00:09
4625 6 0 50:54:00:00:0d:ff
4626 6 0 50:54:00:00:0e:ff
4627 6 0 50:54:00:00:0f:ff
4633 # CHECK_SFLOW_SAMPLING_PACKET(LOOPBACK_ADDR, ADDR_WITHOUT_BRACKETS)
4635 # Test that sFlow samples packets correctly using IPv4/IPv6 sFlow collector
4637 # IP_VERSION_TYPE is used in AT_SETUP
4638 m4_define([CHECK_SFLOW_SAMPLING_PACKET],
4639 [AT_SETUP([ofproto-dpif - sFlow packet sampling - $2 collector])
4640 AT_XFAIL_IF([test "$IS_WIN32" = "yes"])
4641 OVS_VSWITCHD_START([set Bridge br0 fail-mode=standalone])
4643 ON_EXIT([kill `cat test-sflow.pid`])
4644 AT_CHECK([ovstest test-sflow --log-file --detach --no-chdir --pidfile 0:$1 > sflow.log], [0], [], [ignore])
4645 AT_CAPTURE_FILE([sflow.log])
4646 SFLOW_PORT=`parse_listening_port < test-sflow.log`
4647 ovs-appctl time/stop
4649 ADD_OF_PORTS([br0], 1, 2)
4651 set Interface br0 options:ifindex=1002 -- \
4652 set Interface p1 options:ifindex=1004 -- \
4653 set Interface p2 options:ifindex=1003 -- \
4654 set Bridge br0 sflow=@sf -- \
4655 --id=@sf create sflow targets=\"$1:$SFLOW_PORT\" \
4656 header=128 sampling=1 polling=1 agent=$LOOPBACK_INTERFACE
4658 dnl open with ARP packets to seed the bridge-learning. The output
4659 dnl ifIndex numbers should be reported predictably after that.
4660 dnl Since we set sampling=1 we should see all of these packets
4661 dnl reported. Sorting the output by data-source and seqNo makes
4662 dnl it deterministic. Ensuring that we send at least two packets
4663 dnl into each port means we get to check the seq nos are
4664 dnl incrementing correctly.
4665 dnl because packets from different ports can be handled by separate
4666 dnl threads, put some sleeps
4668 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)'
4670 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)'
4672 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)'
4674 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)'
4675 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)'
4677 dnl sleep long enough to get more than one counter sample
4678 dnl from each datasource so we can check sequence numbers
4679 ovs-appctl time/warp 3000 100
4681 ovs-appctl -t test-sflow exit
4683 AT_CHECK_UNQUOTED([[sort sflow.log | $EGREP 'HEADER|ERROR' | sed 's/ /\
4704 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
4724 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
4744 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
4764 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
4784 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
4787 AT_CHECK_UNQUOTED([[sort sflow.log | $EGREP 'IFCOUNTERS|ERROR|PORTNAME|OPENFLOWPORT' | head -18 | sed 's/ /\
4801 in_broadcasts=4294967295
4804 in_unknownprotos=4294967295
4807 out_multicasts=4294967295
4808 out_broadcasts=4294967295
4824 in_broadcasts=4294967295
4827 in_unknownprotos=4294967295
4830 out_multicasts=4294967295
4831 out_broadcasts=4294967295
4847 in_broadcasts=4294967295
4850 in_unknownprotos=4294967295
4853 out_multicasts=4294967295
4854 out_broadcasts=4294967295
4870 in_broadcasts=4294967295
4873 in_unknownprotos=4294967295
4876 out_multicasts=4294967295
4877 out_broadcasts=4294967295
4893 in_broadcasts=4294967295
4896 in_unknownprotos=4294967295
4899 out_multicasts=4294967295
4900 out_broadcasts=4294967295
4916 in_broadcasts=4294967295
4919 in_unknownprotos=4294967295
4922 out_multicasts=4294967295
4923 out_broadcasts=4294967295
4928 datapath_id=18364758544493064720
4931 datapath_id=18364758544493064720
4934 datapath_id=18364758544493064720
4937 datapath_id=18364758544493064720
4940 datapath_id=18364758544493064720
4943 datapath_id=18364758544493064720
4960 CHECK_SFLOW_SAMPLING_PACKET([127.0.0.1], [IPv4])
4961 CHECK_SFLOW_SAMPLING_PACKET([[[::1]]], [IPv6])
4963 dnl Test sFlow LAG structures
4964 AT_SETUP([ofproto-dpif - sFlow LACP structures])
4965 AT_SKIP_IF([test "$IS_WIN32" = "yes"])
4966 OVS_VSWITCHD_START([dnl
4967 add-bond br0 bond p1 p2 -- \
4968 set Port bond lacp=active bond-mode=active-backup \
4969 other_config:lacp-time="fast" \
4970 other_config:lacp-system-id=11:22:33:44:55:66 \
4971 other_config:lacp-system-priority=54321 -- \
4972 set Interface p1 type=dummy \
4973 other_config:lacp-port-id=11 \
4974 other_config:lacp-port-priority=111 \
4975 other_config:lacp-aggregation-key=3333 -- \
4976 set Interface p2 type=dummy \
4977 other_config:lacp-port-id=22 \
4978 other_config:lacp-port-priority=222 \
4979 other_config:lacp-aggregation-key=3333 ])
4981 ON_EXIT([kill `cat test-sflow.pid`])
4982 AT_CHECK([ovstest test-sflow --log-file --detach --no-chdir --pidfile 0:127.0.0.1 > sflow.log], [0], [], [ignore])
4983 AT_CAPTURE_FILE([sflow.log])
4984 SFLOW_PORT=`parse_listening_port < test-sflow.log`
4986 ovs-appctl time/stop
4989 set Interface p1 options:ifindex=1003 -- \
4990 set Bridge br0 sflow=@sf -- \
4991 --id=@sf create sflow targets=\"127.0.0.1:$SFLOW_PORT\" \
4992 header=128 sampling=1 polling=1
4994 dnl sleep long enough to get the sFlow datagram flushed out (may be delayed for up to 1 second)
4995 AT_CHECK([ovs-appctl time/warp 2000 100], [0], [ignore])
4996 AT_CHECK([ovs-appctl revalidator/purge], [0])
4998 ovs-appctl -t test-sflow exit
4999 AT_CHECK([[sort sflow.log | $EGREP 'LACPCOUNTERS|ERROR' | head -n 1 | sed 's/ /\
5002 sysID=11:22:33:44:55:66
5003 partnerID=00:00:00:00:00:00
5010 markerPDUsRx=4294967295
5011 markerRespPDUsRx=4294967295
5012 unknownRx=4294967295
5015 markerPDUsTx=4294967295
5016 markerRespPDUsTx=4294967295
5021 # CHECK_NETFLOW_EXPIRATION(LOOPBACK_ADDR, IP_VERSION_TYPE)
5023 # Test that basic NetFlow reports flow statistics correctly:
5024 # The initial packet of a flow are correctly accounted.
5025 # Later packets within a flow are correctly accounted.
5026 # Flow actions changing (in this case, due to MAC learning)
5027 # cause a record to be sent.
5029 # IP_VERSION_TYPE is used in AT_SETUP
5030 m4_define([CHECK_NETFLOW_EXPIRATION],
5031 [AT_SETUP([ofproto-dpif - NetFlow flow expiration - $2 collector])
5032 OVS_VSWITCHD_START([set Bridge br0 fail-mode=standalone])
5033 ADD_OF_PORTS([br0], 1, 2)
5035 ovs-appctl time/stop
5036 ON_EXIT([kill `cat test-netflow.pid`])
5037 AT_CHECK([ovstest test-netflow --log-file --detach --no-chdir --pidfile 0:$1 > netflow.log], [0], [], [ignore])
5038 AT_CAPTURE_FILE([netflow.log])
5039 NETFLOW_PORT=`parse_listening_port < test-netflow.log`
5042 set Bridge br0 netflow=@nf -- \
5043 --id=@nf create NetFlow targets=\"$1:$NETFLOW_PORT\" \
5044 engine_id=1 engine_type=2 active_timeout=30 add-id-to-interface=false
5046 for delay in 1000 30000; do
5047 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)'
5048 sleep 1 # ensure the order in which these two packets are processed
5049 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)'
5051 ovs-appctl time/warp $delay
5054 ovs-appctl time/warp 6000
5055 ovs-appctl revalidator/wait
5057 ovs-appctl -t test-netflow exit
5059 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])
5061 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])
5063 combined=`grep "192.168.0.2 > 192.168.0.1, if 2 > 1, 2 pkts, 120 bytes, ICMP 0:0" netflow.log | wc -l`
5064 separate=`grep "192.168.0.2 > 192.168.0.1, if 2 > 1, 1 pkts, 60 bytes, ICMP 0:0" netflow.log | wc -l`
5065 AT_CHECK([test $separate = 2 || test $combined = 1], [0])
5069 CHECK_NETFLOW_EXPIRATION([127.0.0.1], [IPv4])
5070 CHECK_NETFLOW_EXPIRATION([[[::1]]], [IPv6])
5072 # CHECK_NETFLOW_ACTIVE_EXPIRATION(LOOPBACK_ADDR, IP_VERSION_TYPE)
5074 # Test that basic NetFlow reports active expirations correctly.
5076 # IP_VERSION_TYPE is used in AT_SETUP
5077 m4_define([CHECK_NETFLOW_ACTIVE_EXPIRATION],
5078 [AT_SETUP([ofproto-dpif - NetFlow active expiration - $2 collector])
5080 OVS_VSWITCHD_START([set Bridge br0 fail-mode=standalone])
5081 ADD_OF_PORTS([br0], 1, 2)
5083 ON_EXIT([kill `cat test-netflow.pid`])
5084 AT_CHECK([ovstest test-netflow --log-file --detach --no-chdir --pidfile 0:$1 > netflow.log], [0], [], [ignore])
5085 AT_CAPTURE_FILE([netflow.log])
5086 NETFLOW_PORT=`parse_listening_port < test-netflow.log`
5089 set Bridge br0 netflow=@nf -- \
5090 --id=@nf create NetFlow targets=\"$1:$NETFLOW_PORT\" \
5091 engine_id=1 engine_type=2 active_timeout=10 add-id-to-interface=false
5093 AT_CHECK([ovs-appctl time/stop])
5095 while test $n -le 60; do
5098 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)'
5099 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)'
5101 ovs-appctl time/warp 1000
5104 ovs-appctl time/warp 10000
5106 ovs-appctl revalidator/wait
5108 ovs-appctl -t test-netflow exit
5110 # Count the number of reported packets:
5111 # - From source to destination before MAC learning kicks in (just one).
5112 # - From source to destination after that.
5113 # - From destination to source.
5121 pkts=`echo "$line" | sed 's/.*, \([[0-9]]*\) pkts,.*/\1/'`
5128 "seq "*": 192.168.0.1 > 192.168.0.2, if 1 > 65535, "*" pkts, "*" bytes, TCP 1234 > 80, time "*)
5131 "seq "*": 192.168.0.1 > 192.168.0.2, if 1 > 2, "*" pkts, "*" bytes, TCP 1234 > 80, time "*)
5134 "seq "*": 192.168.0.2 > 192.168.0.1, if 2 > 1, "*" pkts, "*" bytes, TCP 80 > 1234, time "*)
5141 eval $counter=\`expr \$$counter + \$pkts\`
5142 n_recs=`expr $n_recs + 1`
5145 # There should be exactly 1 MAC learning packet,
5146 # exactly 59 other packets in that direction,
5147 # and exactly 60 packets in the other direction.
5148 AT_CHECK([echo $n_learn $n_in $n_out $n_other], [0], [1 59 60 0
5153 CHECK_NETFLOW_ACTIVE_EXPIRATION([127.0.0.1], [IPv4])
5154 CHECK_NETFLOW_ACTIVE_EXPIRATION([[[::1]]], [IPv6])
5156 AT_SETUP([ofproto-dpif - flow stats])
5158 AT_CHECK([ovs-ofctl add-flow br0 "ip,actions=NORMAL"])
5159 AT_CHECK([ovs-ofctl add-flow br0 "icmp,actions=NORMAL"])
5161 ovs-appctl time/stop
5163 for i in `seq 1 10`; do
5164 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)'
5167 AT_CHECK([ovs-appctl time/warp 1000], [0], [ignore])
5168 AT_CHECK([ovs-appctl revalidator/purge], [0])
5169 AT_CHECK([ovs-ofctl dump-flows br0], [0], [stdout])
5170 AT_CHECK([STRIP_XIDS stdout | sed -n 's/duration=[[0-9]]*\.[[0-9]]*s/duration=0.0s/p' | sort], [0], [dnl
5171 cookie=0x0, duration=0.0s, table=0, n_packets=0, n_bytes=0, idle_age=1, icmp actions=NORMAL
5172 cookie=0x0, duration=0.0s, table=0, n_packets=10, n_bytes=600, idle_age=1, ip actions=NORMAL
5177 AT_SETUP([ofproto-dpif - flow stats, set-n-threads])
5179 AT_CHECK([ovs-ofctl add-flow br0 "ip,actions=NORMAL"])
5180 AT_CHECK([ovs-ofctl add-flow br0 "icmp,actions=NORMAL"])
5182 ovs-appctl time/stop
5184 for i in `seq 1 10`; do
5185 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)'
5188 ovs-appctl time/warp 100
5189 AT_CHECK([ovs-vsctl set Open_vSwitch . other-config:n-revalidator-threads=2])
5190 ovs-appctl time/warp 1000
5192 AT_CHECK([ovs-ofctl dump-flows br0], [0], [stdout])
5193 AT_CHECK([STRIP_XIDS stdout | sed -n 's/duration=[[0-9]]*\.[[0-9]]*s/duration=0.0s/p' | sort], [0], [dnl
5194 cookie=0x0, duration=0.0s, table=0, n_packets=0, n_bytes=0, idle_age=1, icmp actions=NORMAL
5195 cookie=0x0, duration=0.0s, table=0, n_packets=10, n_bytes=600, idle_age=1, ip actions=NORMAL
5200 AT_SETUP([idle_age and hard_age increase over time])
5203 # get_ages DURATION HARD IDLE
5205 # Fetch the flow duration, hard age, and idle age into the variables
5206 # whose names are given as arguments. Rounds DURATION down to the
5207 # nearest integer. If hard_age doesn't appear in the output, sets
5208 # HARD to "none". If idle_age doesn't appear in the output, sets IDLE
5211 AT_CHECK([ovs-ofctl dump-flows br0], [0], [stdout])
5213 duration=`sed -n 's/.*duration=\([[0-9]]*\)\(\.[[0-9]]*\)\{0,1\}s.*/\1/p' stdout`
5214 AT_CHECK([[expr X"$duration" : 'X[0-9][0-9]*$']], [0], [ignore])
5215 AS_VAR_COPY([$1], [duration])
5217 hard=`sed -n 's/.*hard_age=\([[0-9]]*\),.*/\1/p' stdout`
5218 if test X"$hard" = X; then
5221 AT_CHECK([[expr X"$hard" : 'X[0-9][0-9]*$']], [0], [ignore])
5223 AS_VAR_COPY([$2], [hard])
5225 idle=`sed -n 's/.*idle_age=\([[0-9]]*\),.*/\1/p' stdout`
5226 if test X"$idle" = X; then
5229 AT_CHECK([[expr X"$idle" : 'X[0-9][0-9]*$']], [0], [ignore])
5231 AS_VAR_COPY([$3], [idle])
5234 # Add a flow and get its initial hard and idle age.
5235 AT_CHECK([ovs-ofctl add-flow br0 hard_timeout=199,idle_timeout=188,actions=drop])
5236 get_ages duration1 hard1 idle1
5238 ovs-appctl time/stop
5239 # Warp time forward by 10 seconds, then modify the flow's actions.
5240 ovs-appctl time/warp 10000
5241 get_ages duration2 hard2 idle2
5242 AT_CHECK([ovs-ofctl mod-flows br0 actions=flood])
5244 # Warp time forward by 10 seconds.
5245 ovs-appctl time/warp 10000
5246 get_ages duration3 hard3 idle3
5248 # Warp time forward 10 more seconds, then pass some packets through the flow,
5249 # then warp forward a few more times because idle times are only updated
5251 ovs-appctl time/warp 10000
5252 ovs-appctl netdev-dummy/receive br0 'in_port(0),eth(src=50:54:00:00:00:07,dst=50:54:00:00:00:05),eth_type(0x0800),ipv4(src=192.168.0.2,dst=192.168.0.1,proto=6,tos=0,ttl=64,frag=no),tcp(src=80,dst=1234)'
5253 ovs-appctl time/warp 3000 1000
5255 get_ages duration4 hard4 idle4
5257 printf "duration: %4s => %4s => %4s => %4s\n" $duration1 $duration2 $duration3 $duration4
5258 printf "hard_age: %4s => %4s => %4s => %4s\n" $hard1 $hard2 $hard3 $hard4
5259 printf "idle_age: %4s => %4s => %4s => %4s\n" $idle1 $idle2 $idle3 $idle4
5261 # Duration should increase steadily over time.
5262 AT_CHECK([test $duration1 -lt $duration2])
5263 AT_CHECK([test $duration2 -lt $duration3])
5264 AT_CHECK([test $duration3 -lt $duration4])
5266 # Hard age should be "none" initially because it's the same as flow_duration,
5267 # then it should increase.
5268 AT_CHECK([test $hard1 = none])
5269 AT_CHECK([test $hard2 = none])
5270 AT_CHECK([test $hard3 != none])
5271 AT_CHECK([test $hard4 != none])
5272 AT_CHECK([test $hard3 -lt $hard4])
5274 # Idle age should increase from 1 to 2 to 3, then decrease.
5275 AT_CHECK([test $idle1 -lt $idle2])
5276 AT_CHECK([test $idle2 -lt $idle3])
5277 AT_CHECK([test $idle3 -gt $idle4])
5279 # Check some invariant relationships.
5280 AT_CHECK([test $duration1 = $idle1])
5281 AT_CHECK([test $duration2 = $idle2])
5282 AT_CHECK([test $duration3 = $idle3])
5283 AT_CHECK([test $idle3 -gt $hard3])
5284 AT_CHECK([test $idle4 -lt $hard4])
5285 AT_CHECK([test $hard4 -lt $duration4])
5290 AT_SETUP([ofproto-dpif - fin_timeout])
5292 ovs-appctl time/stop
5293 AT_CHECK([ovs-ofctl add-flow br0 'idle_timeout=60,actions=fin_timeout(idle_timeout=5)'])
5294 AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip], [0],
5296 idle_timeout=60, actions=fin_timeout(idle_timeout=5)
5299 # Check that a TCP SYN packet does not change the timeout. (Because
5300 # flow stats updates are mainly what implements the fin_timeout
5301 # feature, we warp forward a couple of times to ensure that flow stats
5302 # run before re-checking the flow table.)
5303 AT_CHECK([ovs-appctl netdev-dummy/receive br0 0021853763af0026b98cb0f908004500003c2e2440004006465dac11370dac11370b828b0016751e267b00000000a00216d017360000020405b40402080a2d25085f0000000001030307])
5304 AT_CHECK([ovs-appctl time/warp 1000 && ovs-appctl time/warp 1000], [0], [warped
5307 AT_CHECK([ovs-appctl revalidator/purge], [0])
5308 AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip], [0],
5310 n_packets=1, n_bytes=74, idle_timeout=60, actions=fin_timeout(idle_timeout=5)
5312 # Check that a TCP FIN packet does change the timeout.
5313 AT_CHECK([ovs-appctl netdev-dummy/receive br0 0021853763af0026b98cb0f90800451000342e3e40004006463bac11370dac11370b828b0016751e319dfc96399b801100717ae800000101080a2d250a9408579588])
5314 AT_CHECK([ovs-appctl time/warp 1000 && ovs-appctl time/warp 1000], [0], [warped
5317 AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip], [0],
5319 n_packets=2, n_bytes=140, idle_timeout=5, actions=fin_timeout(idle_timeout=5)
5324 AT_SETUP([ofproto-dpif - ovs-appctl dpif/dump-dps])
5325 OVS_VSWITCHD_START([add-br br1 -- set bridge br1 datapath-type=dummy])
5326 ADD_OF_PORTS([br0], [1], [2])
5327 ADD_OF_PORTS([br1], [3])
5329 AT_CHECK([ovs-appctl dpif/dump-dps], [0], [dnl
5336 AT_SETUP([ofproto-dpif - ovs-appctl dpif/show])
5337 OVS_VSWITCHD_START([add-br br1 -- set bridge br1 datapath-type=dummy])
5338 ADD_OF_PORTS([br0], [1], [2])
5339 ADD_OF_PORTS([br1], [3])
5341 AT_CHECK([ovs-appctl dpif/show], [0], [dnl
5342 dummy@ovs-dummy: hit:0 missed:0
5344 br0 65534/100: (dummy)
5348 br1 65534/101: (dummy)
5354 AT_SETUP([ofproto-dpif - ovs-appctl dpif/dump-flows])
5355 # bump max-idle to avoid the flows being reclaimed behind us
5356 OVS_VSWITCHD_START([add-br br1 -- \
5357 set bridge br1 datapath-type=dummy fail-mode=secure -- \
5358 set Open_vSwitch . other_config:max-idle=10000])
5359 ADD_OF_PORTS([br0], [1], [2])
5360 ADD_OF_PORTS([br1], [3])
5362 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)'])
5363 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)'])
5364 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)'])
5365 ovs-appctl revalidator/wait
5366 AT_CHECK([ovs-appctl dpif/dump-flows br0 | STRIP_UFID | STRIP_USED | sort], [0], [dnl
5367 recirc_id(0),in_port(1),eth_type(0x0800),ipv4(frag=no), packets:0, bytes:0, used:never, actions:drop
5368 recirc_id(0),in_port(2),eth_type(0x0800),ipv4(frag=no), packets:0, bytes:0, used:never, actions:drop
5371 AT_CHECK([ovs-appctl dpif/dump-flows br1 | STRIP_UFID | STRIP_USED | sort], [0], [dnl
5372 recirc_id(0),in_port(3),eth_type(0x0800),ipv4(frag=no), packets:0, bytes:0, used:never, actions:drop
5375 AT_CHECK([ovs-appctl dpif/dump-flows -m br0 | STRIP_UFID | STRIP_USED | sort], [0], [dnl
5376 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
5377 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
5380 AT_CHECK([ovs-appctl dpif/dump-flows -m br1 | STRIP_UFID | STRIP_USED | sort], [0], [dnl
5381 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
5387 AT_SETUP([ofproto-dpif - ovs-appctl dpif/get-flow])
5389 OVS_VSWITCHD_START([add-br br1 -- \
5390 set bridge br1 datapath-type=dummy fail-mode=secure -- \
5391 set Open_vSwitch . other_config:max-idle=10000])
5392 ADD_OF_PORTS([br0], [1], [2])
5394 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)'])
5395 ovs-appctl revalidator/wait
5396 AT_CHECK([ovs-appctl dpif/dump-flows -m br0], [0], [stdout])
5398 UFID=`sed -n 's/\(ufid:[[0-9a-fA-F]]*\).*/\1/p' stdout`
5399 AT_CHECK([ovs-appctl dpctl/get-flow $UFID], [0], [dnl
5400 recirc_id(0),in_port(1),eth_type(0x0800),ipv4(frag=no), packets:0, bytes:0, used:never, actions:drop
5406 AT_SETUP([ofproto-dpif - MPLS actions that result in a userspace action])
5407 OVS_VSWITCHD_START([dnl
5408 add-port br0 p1 -- set Interface p1 type=dummy
5410 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5411 ON_EXIT([kill `cat ovs-ofctl.pid`])
5413 AT_CAPTURE_FILE([ofctl_monitor.log])
5414 AT_DATA([flows.txt], [dnl
5415 dl_src=60:66:66:66:66:00 actions=push_mpls:0x8847,controller
5416 dl_src=60:66:66:66:66:01 actions=pop_mpls:0x8849,controller
5418 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5420 dnl Packet is sent to userspace because a MPLS push or pop action is applied to
5421 dnl a packet with 2 MPLS LSEs but dpif-netdev can't handle any labels.
5423 dnl The input is a frame with two MPLS labels which tcpdump -vve shows as:
5424 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)
5425 dnl (label 20, exp 0, [S], ttl 32)
5426 dnl (tos 0x0, ttl 64, id 0, offset 0, flags [none], proto TCP (6), length 44, bad cksum 3b78 (->f978)!)
5427 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
5429 for dl_src in 00 01; do
5430 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"])
5432 sleep 1 # wait for the datapath flow installed
5433 AT_CHECK_UNQUOTED([cat ovs-vswitchd.log | STRIP_UFID | FILTER_FLOW_INSTALL | STRIP_USED], [0], [dnl
5434 recirc_id=0,mpls,in_port=1,dl_src=60:66:66:66:66:00,mpls_label=20,mpls_tc=0,mpls_ttl=32,mpls_bos=0,mpls_lse1=82208, actions:userspace(pid=0,slow_path(controller))
5435 recirc_id=0,mpls,in_port=1,dl_src=60:66:66:66:66:01,mpls_bos=0,mpls_lse1=82208, actions:userspace(pid=0,slow_path(controller))
5442 AT_SETUP([ofproto-dpif - MPLS actions that result in a drop])
5443 OVS_VSWITCHD_START([dnl
5444 add-port br0 p1 -- set Interface p1 type=dummy
5446 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5447 ON_EXIT([kill `cat ovs-ofctl.pid`])
5449 AT_CAPTURE_FILE([ofctl_monitor.log])
5450 AT_DATA([flows.txt], [dnl
5451 dl_src=60:66:66:66:66:00 actions=push_mpls:0x8847,controller
5452 dl_src=60:66:66:66:66:01 actions=pop_mpls:0x8849,controller
5454 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5456 dnl Packet is dropped because an MPLS PUSH action is applied to a packet with
5457 dnl 4 MPLS LSEs but ovs-vswtichd can only handle up to 3 MPLS LSEs and thus
5458 dnl can't determine the resulting MPLS label after MPLS push/pop actions.
5460 dnl The input is a frame with two MPLS headers which tcpdump -vve shows as:
5461 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)
5462 dnl (label 20, exp 0, ttl 32)
5463 dnl (label 20, exp 0, ttl 32)
5464 dnl (label 20, exp 0, [S], ttl 32)
5465 dnl (tos 0x0, ttl 64, id 0, offset 0, flags [none], proto TCP (6), length 44, bad cksum 3b78 (->f978)!)
5466 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
5468 for dl_src in 00 01; do
5469 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"])
5471 sleep 1 # wait for the datapath flow installed
5472 AT_CHECK_UNQUOTED([cat ovs-vswitchd.log | STRIP_UFID | FILTER_FLOW_INSTALL | STRIP_USED], [0], [dnl
5473 recirc_id=0,mpls,in_port=1,dl_src=60:66:66:66:66:00,mpls_label=20,mpls_tc=0,mpls_ttl=32,mpls_bos=0,mpls_lse1=82208, actions:userspace(pid=0,slow_path(controller))
5474 recirc_id=0,mpls,in_port=1,dl_src=60:66:66:66:66:01,mpls_bos=0,mpls_lse1=82208, actions:userspace(pid=0,slow_path(controller))
5480 AT_SETUP([ofproto-dpif - patch ports])
5481 OVS_VSWITCHD_START([add-br br1 \
5482 -- set bridge br1 datapath-type=dummy fail-mode=secure \
5483 -- add-port br1 pbr1 -- set int pbr1 type=patch options:peer=pbr0 \
5484 -- add-port br0 pbr0 -- set int pbr0 type=patch options:peer=pbr1])
5486 ADD_OF_PORTS([br0], [2])
5487 ADD_OF_PORTS([br1], [3])
5489 AT_CHECK([ovs-appctl upcall/disable-ufid], [0], [Datapath dumping tersely using UFID disabled
5491 AT_CHECK([ovs-appctl time/stop])
5492 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5494 AT_CHECK([ovs-ofctl add-flow br0 actions=LOCAL,output:1,output:2])
5495 AT_CHECK([ovs-ofctl add-flow br1 actions=LOCAL,output:1,output:3])
5497 for i in $(seq 1 10); do
5498 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)'
5499 if [[ $i -eq 1 ]]; then
5504 for i in $(seq 1 5); do
5505 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)'
5506 if [[ $i -eq 1 ]]; then
5511 AT_CHECK([ovs-appctl time/warp 500], [0],
5514 sleep 1 # wait for log writer
5516 AT_CHECK([ovs-appctl dpif/show], [0], [dnl
5517 dummy@ovs-dummy: hit:13 missed:2
5519 br0 65534/100: (dummy)
5521 pbr0 1/none: (patch: peer=pbr1)
5523 br1 65534/101: (dummy)
5525 pbr1 1/none: (patch: peer=pbr0)
5528 AT_CHECK([cat ovs-vswitchd.log | STRIP_UFID | FILTER_FLOW_INSTALL | STRIP_USED], [0], [dnl
5529 recirc_id=0,ip,in_port=100,nw_frag=no, actions:101,3,2
5530 recirc_id=0,ip,in_port=101,nw_frag=no, actions:100,2,3
5533 AT_CHECK([cat ovs-vswitchd.log | grep -e 'in_port(100).*packets:9' | STRIP_UFID | FILTER_FLOW_DUMP], [0], [dnl
5534 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
5536 AT_CHECK([cat ovs-vswitchd.log | grep -e 'in_port(101).*packets:4' | STRIP_UFID | FILTER_FLOW_DUMP], [0], [dnl
5537 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
5540 AT_CHECK([ovs-ofctl dump-ports br0 pbr0], [0], [dnl
5541 OFPST_PORT reply (xid=0x4): 1 ports
5542 port 1: rx pkts=5, bytes=300, drop=0, errs=0, frame=0, over=0, crc=0
5543 tx pkts=10, bytes=600, drop=0, errs=0, coll=0
5546 AT_CHECK([ovs-ofctl dump-ports br1 pbr1], [0], [dnl
5547 OFPST_PORT reply (xid=0x4): 1 ports
5548 port 1: rx pkts=10, bytes=600, drop=0, errs=0, frame=0, over=0, crc=0
5549 tx pkts=5, bytes=300, drop=0, errs=0, coll=0
5555 AT_SETUP([ofproto-dpif - patch ports - stack])
5556 OVS_VSWITCHD_START([add-br br1 \
5557 -- set bridge br1 datapath-type=dummy fail-mode=secure \
5558 -- add-port br1 pbr1 -- set int pbr1 type=patch options:peer=pbr0 \
5559 -- add-port br0 pbr0 -- set int pbr0 type=patch options:peer=pbr1])
5561 ADD_OF_PORTS([br0], [2])
5562 ADD_OF_PORTS([br1], [3])
5564 AT_CHECK([ovs-appctl upcall/disable-ufid], [0], [Datapath dumping tersely using UFID disabled
5566 AT_CHECK([ovs-appctl time/stop])
5567 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5569 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"])
5570 # Try to pop from empty stack, and push and leave data to stack.
5571 AT_CHECK([ovs-ofctl add-flow br1 "ip actions=pop:OXM_OF_IPV4_DST[[0..31]],push:NXM_NX_REG1[[0..31]],LOCAL"])
5573 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)'
5575 AT_CHECK([ovs-appctl time/warp 500], [0],
5579 OVS_WAIT_UNTIL([test `grep flow_add ovs-vswitchd.log | wc -l` -ge 1])
5581 AT_CHECK([ovs-appctl dpif/show], [0], [dnl
5582 dummy@ovs-dummy: hit:0 missed:1
5584 br0 65534/100: (dummy)
5586 pbr0 1/none: (patch: peer=pbr1)
5588 br1 65534/101: (dummy)
5590 pbr1 1/none: (patch: peer=pbr0)
5593 AT_CHECK([cat ovs-vswitchd.log | STRIP_UFID | FILTER_FLOW_INSTALL | STRIP_USED], [0], [dnl
5594 recirc_id=0,ip,in_port=100,nw_src=192.168.0.1,nw_frag=no, actions:101,set(ipv4(src=255.255.255.254)),2
5597 AT_CHECK([cat ovs-vswitchd.log | grep -e '|nx_match|WARN|' | sed "s/^.*|WARN|//"], [0], [dnl
5598 Failed to pop from an empty stack. On flow
5601 OVS_VSWITCHD_STOP(["/Failed to pop from an empty stack/d"])
5604 AT_SETUP([ofproto-dpif - port duration])
5605 OVS_VSWITCHD_START([set Bridge br0 protocols=OpenFlow13])
5606 ADD_OF_PORTS([br0], 1, 2)
5608 ovs-appctl time/stop
5609 ovs-appctl time/warp 10000
5611 AT_CHECK([ovs-ofctl -O openflow13 dump-ports br0], [0], [stdout])
5612 AT_CHECK([sed -n 's/=[[0-9]][[0-9]]\(\.[[0-9]][[0-9]]*\)\{0,1\}s/=?s/p' stdout], [0],
5621 dnl ----------------------------------------------------------------------
5622 AT_BANNER([ofproto-dpif -- megaflows])
5624 AT_SETUP([ofproto-dpif megaflow - port classification])
5626 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5627 ADD_OF_PORTS([br0], [1], [2])
5628 AT_DATA([flows.txt], [dnl
5629 table=0 in_port=1 actions=output(2)
5631 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5632 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)'])
5634 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)'])
5636 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5637 recirc_id=0,ip,in_port=1,nw_frag=no, actions: <del>
5642 AT_SETUP([ofproto-dpif megaflow - L2 classification])
5644 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5645 ADD_OF_PORTS([br0], [1], [2])
5646 AT_DATA([flows.txt], [dnl
5647 table=0 in_port=1,dl_src=50:54:00:00:00:09 actions=output(2)
5649 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5650 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)'])
5651 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)'])
5653 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5654 recirc_id=0,ip,in_port=1,dl_src=50:54:00:00:00:09,nw_frag=no, actions: <del>
5655 recirc_id=0,ip,in_port=1,dl_src=50:54:00:00:00:0b/ff:ff:00:00:00:02,nw_frag=no, actions: <del>
5660 AT_SETUP([ofproto-dpif megaflow - L3 classification])
5662 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5663 ADD_OF_PORTS([br0], [1], [2])
5664 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], [])
5665 AT_DATA([flows.txt], [dnl
5666 table=0 in_port=1,icmp,nw_src=10.0.0.4 actions=output(2)
5668 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5669 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)'])
5670 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)'])
5672 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5673 recirc_id=0,icmp,in_port=1,nw_src=10.0.0.4,nw_frag=no, actions: <del>
5674 recirc_id=0,ip,in_port=1,nw_src=10.0.0.2/0.0.0.2,nw_frag=no, actions: <del>
5679 AT_SETUP([ofproto-dpif megaflow - IPv6 classification])
5681 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5682 ADD_OF_PORTS([br0], [1], [2])
5683 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], [])
5684 AT_DATA([flows.txt], [dnl
5685 table=0 in_port=1,ipv6,ipv6_src=2001:db8:3c4d:1:2:3:4:5 actions=output(2)
5687 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5688 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)'])
5689 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)'])
5691 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5692 recirc_id=0,ipv6,in_port=1,ipv6_src=2001:db8:3c4d:1:2:3:4:5,nw_frag=no, actions: <del>
5693 recirc_id=0,ipv6,in_port=1,ipv6_src=2001:db8:3c4d:5:4:3:2:1/0:0:0:4::,nw_frag=no, actions: <del>
5698 AT_SETUP([ofproto-dpif megaflow - L4 classification])
5700 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5701 ADD_OF_PORTS([br0], [1], [2])
5702 AT_DATA([flows.txt], [dnl
5703 table=0 in_port=1,icmp,icmp_type=8 actions=output(2)
5705 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5706 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)'])
5708 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)'])
5710 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5711 recirc_id=0,icmp,in_port=1,nw_frag=no,icmp_type=0x8/0xff, actions: <del>
5716 AT_SETUP([ofproto-dpif megaflow - normal])
5718 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5719 ADD_OF_PORTS([br0], [1], [2])
5720 AT_CHECK([ovs-ofctl add-flow br0 action=normal])
5721 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)'])
5722 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)'])
5724 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5725 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>
5726 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>
5731 AT_SETUP([ofproto-dpif megaflow - mpls])
5733 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5734 ADD_OF_PORTS([br0], [1], [2])
5735 AT_DATA([flows.txt], [dnl
5736 table=0 dl_src=50:54:00:00:00:09 actions=push_mpls:0x8847,2
5737 table=0 dl_src=50:54:00:00:00:0b actions=pop_mpls:0x0800,2
5739 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5740 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)'])
5741 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)'])
5743 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5744 recirc_id=0,mpls,in_port=1,dl_src=50:54:00:00:00:09,mpls_label=11,mpls_tc=3,mpls_ttl=64,mpls_bos=1, actions: <del>
5745 recirc_id=0,mpls,in_port=1,dl_src=50:54:00:00:00:0b,mpls_bos=1, actions: <del>
5750 # CHECK_MEGAFLOW_NETFLOW(LOOPBACK_ADDR, IP_VERSION_TYPE)
5752 # IP_VERSION_TYPE is used in AT_SETUP
5753 m4_define([CHECK_MEGAFLOW_NETFLOW],
5754 [AT_SETUP([ofproto-dpif megaflow - netflow - $2 collector])
5756 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5757 ADD_OF_PORTS([br0], [1], [2])
5759 dnl NetFlow configuration disables wildcarding relevant fields
5760 ON_EXIT([kill `cat test-netflow.pid`])
5761 AT_CHECK([ovstest test-netflow --log-file --detach --no-chdir --pidfile 0:$1 > netflow.log], [0], [], [ignore])
5762 AT_CAPTURE_FILE([netflow.log])
5763 NETFLOW_PORT=`parse_listening_port < test-netflow.log`
5765 set Bridge br0 netflow=@nf -- \
5766 --id=@nf create NetFlow targets=\"$1:$NETFLOW_PORT\" \
5767 engine_id=1 engine_type=2 active_timeout=30 add-id-to-interface=false
5769 AT_CHECK([ovs-ofctl add-flow br0 action=normal])
5770 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)'])
5771 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)'])
5773 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5774 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>
5775 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>
5780 CHECK_MEGAFLOW_NETFLOW([127.0.0.1], [IPv4])
5781 CHECK_MEGAFLOW_NETFLOW([[[::1]]], [IPv6])
5783 AT_SETUP([ofproto-dpif megaflow - normal, active-backup bonding])
5785 [add-port br0 p1 -- set Interface p1 type=dummy ofport_request=1 -- \
5786 add-bond br0 bond0 p2 p3 bond_mode=active-backup -- \
5787 set interface p2 type=dummy ofport_request=2 -- \
5788 set interface p3 type=dummy ofport_request=3])
5789 AT_CHECK([ovs-appctl netdev-dummy/set-admin-state up], 0, [OK
5791 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5793 AT_CHECK([ovs-ofctl add-flow br0 action=normal])
5794 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)'])
5795 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)'])
5797 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5798 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>
5799 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>
5804 AT_SETUP([ofproto-dpif megaflow - normal, balance-slb bonding])
5806 [add-port br0 p1 -- set Interface p1 type=dummy ofport_request=1 -- \
5807 add-bond br0 bond0 p2 p3 bond_mode=balance-slb -- \
5808 set interface p2 type=dummy ofport_request=2 -- \
5809 set interface p3 type=dummy ofport_request=3])
5810 AT_CHECK([ovs-appctl netdev-dummy/set-admin-state up], 0, [OK
5812 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5814 AT_CHECK([ovs-ofctl add-flow br0 action=normal])
5815 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)'])
5816 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)'])
5818 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5819 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>
5820 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>
5825 AT_SETUP([ofproto-dpif megaflow - normal, balance-tcp bonding])
5826 # Create bond0 on br0 with interfaces p0 and p1
5827 # and bond1 on br1 with interfaces p2 and p3
5828 # with p0 patched to p2 and p1 patched to p3.
5830 [add-bond br0 bond0 p0 p1 bond_mode=balance-tcp lacp=active \
5831 other-config:lacp-time=fast \
5832 other-config:bond-rebalance-interval=0 -- \
5833 set interface p0 type=patch options:peer=p2 ofport_request=1 -- \
5834 set interface p1 type=patch options:peer=p3 ofport_request=2 -- \
5836 set bridge br1 other-config:hwaddr=aa:66:aa:66:00:00 -- \
5837 set bridge br1 datapath-type=dummy other-config:datapath-id=1234 \
5838 fail-mode=secure -- \
5839 add-bond br1 bond1 p2 p3 bond_mode=balance-tcp lacp=active \
5840 other-config:lacp-time=fast \
5841 other-config:bond-rebalance-interval=0 -- \
5842 set interface p2 type=patch options:peer=p0 ofport_request=3 -- \
5843 set interface p3 type=patch options:peer=p1 ofport_request=4 --])
5845 AT_CHECK([ovs-appctl netdev-dummy/set-admin-state up], 0, [OK
5847 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5848 ADD_OF_PORTS([br0], [7])
5849 AT_CHECK([ovs-ofctl add-flow br0 action=normal])
5850 AT_CHECK([ovs-ofctl add-flow br1 action=normal])
5851 ovs-appctl time/stop
5852 ovs-appctl time/warp 5000
5853 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)'])
5854 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)'])
5856 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5857 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>
5858 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>
5863 AT_SETUP([ofproto-dpif megaflow - resubmit port action])
5865 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5866 ADD_OF_PORTS([br0], [1], [2])
5867 AT_DATA([flows.txt], [dnl
5868 table=0 in_port=1,ip actions=resubmit(90)
5869 table=0 in_port=90,dl_src=50:54:00:00:00:09 actions=output(2)
5871 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5872 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)'])
5873 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)'])
5875 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5876 recirc_id=0,ip,in_port=1,dl_src=50:54:00:00:00:09,nw_frag=no, actions: <del>
5877 recirc_id=0,ip,in_port=1,dl_src=50:54:00:00:00:0b/ff:ff:00:00:00:02,nw_frag=no, actions: <del>
5882 AT_SETUP([ofproto-dpif megaflow - resubmit table action])
5884 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5885 ADD_OF_PORTS([br0], [1], [2])
5886 AT_DATA([flows.txt], [dnl
5887 table=0 in_port=1,ip actions=resubmit(,1)
5888 table=1 dl_src=50:54:00:00:00:09 actions=output(2)
5890 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5891 AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
5892 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=
5893 1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
5895 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5896 recirc_id=0,ip,in_port=1,dl_src=50:54:00:00:00:09,nw_frag=no, actions: <del>
5897 recirc_id=0,ip,in_port=1,dl_src=50:54:00:00:00:0b,nw_frag=no, actions: <del>
5902 AT_SETUP([ofproto-dpif megaflow - goto_table action])
5904 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5905 ADD_OF_PORTS([br0], [1], [2])
5906 AT_DATA([flows.txt], [dnl
5907 table=0 in_port=1,ip actions=goto_table(1)
5908 table=1 dl_src=50:54:00:00:00:09 actions=output(2)
5910 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flows br0 flows.txt])
5911 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)'])
5912 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)'])
5914 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5915 recirc_id=0,ip,in_port=1,dl_src=50:54:00:00:00:09,nw_frag=no, actions: <del>
5916 recirc_id=0,ip,in_port=1,dl_src=50:54:00:00:00:0b,nw_frag=no, actions: <del>
5921 AT_SETUP([ofproto-dpif megaflow - mirroring, select_all])
5923 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5924 ADD_OF_PORTS([br0], [1], [2], [3])
5926 set Bridge br0 mirrors=@m --\
5927 --id=@p3 get Port p3 --\
5928 --id=@m create Mirror name=mymirror select_all=true output_port=@p3
5930 AT_DATA([flows.txt], [dnl
5931 in_port=1 actions=output:2
5933 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5934 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)'])
5936 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)'])
5938 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5939 recirc_id=0,ip,in_port=1,nw_frag=no, actions: <del>
5944 AT_SETUP([ofproto-dpif megaflow - mirroring, select_vlan])
5946 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5947 ADD_OF_PORTS([br0], [1], [2], [3])
5949 set Bridge br0 mirrors=@m --\
5950 --id=@p2 get Port p2 -- --id=@p3 get Port p3 --\
5951 --id=@m create Mirror name=mymirror select_all=true select_vlan=11 output_port=@p3
5953 AT_DATA([flows.txt], [dnl
5954 in_port=1 actions=output:2
5956 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5957 AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(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))'])
5958 AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4,dst=10.0.0.3,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
5960 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5961 recirc_id=0,ip,in_port=1,dl_vlan=11,nw_frag=no, actions: <del>
5962 recirc_id=0,ip,in_port=1,vlan_tci=0x0000/0x1fff,nw_frag=no, actions: <del>
5967 AT_SETUP([ofproto-dpif megaflow - move action])
5969 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5970 ADD_OF_PORTS([br0], [1], [2])
5971 AT_DATA([flows.txt], [dnl
5972 table=0 in_port=1 ip,actions=move:NXM_OF_IP_SRC[[]]->NXM_NX_REG0[[]],resubmit(90)
5973 table=0 in_port=90 ip,actions=move:NXM_NX_REG0[[]]->NXM_NX_REG1[[]],resubmit(91)
5974 table=0 in_port=91 reg0=0x0a000002,actions=output(2)
5976 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5977 AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
5978 AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4,dst=10.0.0.3,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
5980 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5981 recirc_id=0,ip,in_port=1,nw_src=10.0.0.2,nw_frag=no, actions: <del>
5982 recirc_id=0,ip,in_port=1,nw_src=10.0.0.4,nw_frag=no, actions: <del>
5987 AT_SETUP([ofproto-dpif megaflow - push action])
5989 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
5990 ADD_OF_PORTS([br0], [1], [2])
5991 AT_DATA([flows.txt], [dnl
5992 table=0 in_port=1 ip,actions=push:NXM_OF_IP_SRC[[]],output(2)
5994 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5995 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)'])
5996 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)'])
5998 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5999 recirc_id=0,ip,in_port=1,nw_src=10.0.0.2,nw_frag=no, actions: <del>
6000 recirc_id=0,ip,in_port=1,nw_src=10.0.0.4,nw_frag=no, actions: <del>
6005 AT_SETUP([ofproto-dpif megaflow - learning])
6007 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
6008 ADD_OF_PORTS([br0], [1], [2])
6009 AT_DATA([flows.txt], [dnl
6010 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
6012 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
6013 ovs-appctl time/stop
6014 # We send each packet twice because the first packet in each flow causes the
6015 # flow table to change and thus revalidations, which (depending on timing)
6016 # can keep a megaflow from being installed. The revalidations are done by
6017 # the second iteration, allowing the flows to be installed.
6019 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)'])
6020 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)'])
6021 ovs-appctl time/warp 100
6024 dnl The original flow is missing due to a revalidation.
6025 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
6026 recirc_id=0,ip,in_port=1,vlan_tci=0x0000/0x0fff,dl_src=50:54:00:00:00:09,nw_frag=no, actions: <del>
6027 recirc_id=0,ip,in_port=1,vlan_tci=0x0000/0x0fff,dl_src=50:54:00:00:00:0b,nw_frag=no, actions: <del>
6032 AT_SETUP([ofproto-dpif megaflow - tunnels])
6034 [add-port br0 p1 -- set Interface p1 type=dummy ofport_request=1])
6035 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
6036 AT_CHECK([ovs-vsctl add-port br0 p2 -- set Interface p2 type=gre \
6037 options:remote_ip=1.1.1.1 ofport_request=2 options:key=flow])
6038 AT_CHECK([ovs-vsctl add-port br0 p3 -- set Interface p3 type=dummy \
6040 AT_CHECK([ovs-vsctl add-port br0 p4 -- set Interface p4 type=gre \
6041 options:remote_ip=1.1.1.2 options:tos=inherit options:ttl=inherit \
6042 ofport_request=4 options:key=flow])
6043 AT_DATA([flows.txt], [dnl
6044 in_port=1,actions=output(2)
6045 in_port=3,actions=output(4)
6047 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
6048 dnl ECN bits are always copied out, but don't use 0x3 (CE), since that
6049 dnl will cause the packet to be dropped.
6050 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)'])
6052 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)'])
6053 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)'])
6055 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)'])
6057 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
6058 recirc_id=0,ip,in_port=1,nw_ecn=1,nw_frag=no, actions: <del>
6059 recirc_id=0,ip,in_port=3,nw_tos=0,nw_ecn=1,nw_ttl=64,nw_frag=no, actions: <del>
6060 recirc_id=0,ip,in_port=3,nw_tos=252,nw_ecn=1,nw_ttl=128,nw_frag=no, actions: <del>
6065 AT_SETUP([ofproto-dpif megaflow - dec_ttl])
6067 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
6068 ADD_OF_PORTS([br0], [1], [2])
6069 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], [])
6070 AT_DATA([flows.txt], [dnl
6071 table=0 in_port=1,icmp,nw_src=10.0.0.4 actions=dec_ttl,output(2)
6073 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
6074 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)'])
6075 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)'])
6077 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
6078 recirc_id=0,icmp,in_port=1,nw_src=10.0.0.4,nw_ttl=64,nw_frag=no, actions: <del>
6079 recirc_id=0,ip,in_port=1,nw_src=10.0.0.2/0.0.0.2,nw_frag=no, actions: <del>
6084 AT_SETUP([ofproto-dpif megaflow - set dl_dst])
6086 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
6087 ADD_OF_PORTS([br0], [1], [2])
6088 AT_DATA([flows.txt], [dnl
6089 table=0 in_port=1 actions=mod_dl_dst(50:54:00:00:00:0a),output(2)
6091 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
6092 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)'])
6093 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)'])
6095 dnl The first packet is essentially a no-op, as the new destination MAC is the
6096 dnl same as the original. The second entry actually updates the destination
6098 AT_CHECK([cat ovs-vswitchd.log | STRIP_UFID | FILTER_FLOW_INSTALL | STRIP_USED], [0], [dnl
6099 recirc_id=0,ip,in_port=1,dl_dst=50:54:00:00:00:0a,nw_frag=no, actions:2
6100 recirc_id=0,ip,in_port=1,dl_dst=50:54:00:00:00:0c,nw_frag=no, actions:set(eth(dst=50:54:00:00:00:0a)),2
6105 AT_SETUP([ofproto-dpif megaflow - disabled])
6107 AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])
6108 ADD_OF_PORTS([br0], [1], [2])
6109 AT_DATA([flows.txt], [dnl
6110 table=0 in_port=1,ip,nw_dst=10.0.0.1 actions=output(2)
6111 table=0 in_port=1,ip,nw_dst=10.0.0.3 actions=drop
6113 AT_CHECK([ovs-appctl upcall/disable-megaflows], [0], [megaflows disabled
6115 AT_CHECK([ovs-appctl upcall/disable-ufid], [0], [Datapath dumping tersely using UFID disabled
6117 AT_CHECK([ovs-appctl vlog/set dpif_netdev:dbg], [0], [], [])
6118 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
6119 for i in 1 2 3 4; do
6120 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)'])
6121 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)'])
6122 if [[ $i -eq 1 ]]; then
6127 AT_CHECK([cat ovs-vswitchd.log | STRIP_UFID | FILTER_FLOW_INSTALL | STRIP_USED], [0], [dnl
6128 pkt_mark=0,recirc_id=0,dp_hash=0,skb_priority=0,icmp,in_port=1,vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,nw_src=10.0.0.2,nw_dst=10.0.0.1,nw_tos=0,nw_ecn=0,nw_ttl=64,icmp_type=8,icmp_code=0, actions:2
6129 pkt_mark=0,recirc_id=0,dp_hash=0,skb_priority=0,icmp,in_port=1,vlan_tci=0x0000,dl_src=50:54:00:00:00:0b,dl_dst=50:54:00:00:00:0c,nw_src=10.0.0.4,nw_dst=10.0.0.3,nw_tos=0,nw_ecn=0,nw_ttl=64,icmp_type=8,icmp_code=0, actions:drop
6131 AT_CHECK([cat ovs-vswitchd.log | STRIP_UFID | FILTER_FLOW_DUMP | grep 'packets:3'], [0], [dnl
6132 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
6133 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
6138 AT_SETUP([ofproto-dpif - datapath port number change])
6139 OVS_VSWITCHD_START([set Bridge br0 fail-mode=standalone])
6140 ADD_OF_PORTS([br0], 1)
6142 # Trace a flow that should output to p1.
6143 AT_CHECK([ovs-appctl ofproto/trace br0 in_port=LOCAL,dl_src=10:20:30:40:50:60],
6145 AT_CHECK([tail -1 stdout], [0], [Datapath actions: 1
6148 # Change p1's port number to 5.
6149 AT_CHECK([ovs-appctl dpif-dummy/change-port-number ovs-dummy p1 5])
6151 # Trace a flow that should output to p1 in its new location.
6152 AT_CHECK([ovs-appctl ofproto/trace br0 in_port=LOCAL,dl_src=10:20:30:40:50:60],
6154 AT_CHECK([tail -1 stdout], [0], [Datapath actions: 5
6159 # Tests the bundling with various bfd and cfm configurations.
6160 AT_SETUP([ofproto - bundle with variable bfd/cfm config])
6161 OVS_VSWITCHD_START([add-br br1 -- set bridge br1 datapath-type=dummy -- \
6162 add-bond br0 br0bond p0 p2 bond-mode=active-backup -- \
6163 add-bond br1 br1bond p1 p3 bond-mode=active-backup -- \
6164 set Interface p1 type=patch options:peer=p0 ofport_request=2 -- \
6165 set Interface p3 type=patch options:peer=p2 ofport_request=4 -- \
6166 set Interface p0 type=patch options:peer=p1 ofport_request=1 -- \
6167 set Interface p2 type=patch options:peer=p3 ofport_request=3 -- \
6168 set Interface p0 bfd:enable=true bfd:min_tx=300 bfd:min_rx=300 -- \
6169 set Interface p0 cfm_mpid=1 -- \
6170 set Interface p1 bfd:enable=true bfd:min_tx=500 bfd:min_rx=500])
6172 ovs-appctl time/stop
6173 # advance the clock to stablize everything.
6174 ovs-appctl time/warp 5000 100
6175 # cfm/show should show 'recv' fault.
6176 AT_CHECK([ovs-appctl cfm/show | sed -n '/^.*fault:.*/p'], [0], [dnl
6179 # bfd/show should show 'up'.
6180 AT_CHECK([ovs-appctl bfd/show | sed -n '/^.*Session State:.*/p'], [0], [dnl
6181 Local Session State: up
6182 Remote Session State: up
6183 Local Session State: up
6184 Remote Session State: up
6186 # bond/show should show 'may-enable: true' for all slaves.
6187 AT_CHECK([ovs-appctl bond/show | sed -n '/^.*may_enable:.*/p'], [0], [dnl
6194 # now disable the bfd on p1.
6195 AT_CHECK([ovs-vsctl set Interface p1 bfd:enable=false])
6196 # advance the clock to stablize everything.
6197 ovs-appctl time/warp 5000 100
6198 # cfm/show should show 'recv' fault.
6199 AT_CHECK([ovs-appctl cfm/show | sed -n '/^.*fault:.*/p'], [0], [dnl
6202 # bfd/show should show 'down'.
6203 AT_CHECK([ovs-appctl bfd/show | sed -n '/^.*Session State:.*/p'], [0], [dnl
6204 Local Session State: down
6205 Remote Session State: down
6207 # bond/show should show 'may-enable: false' for p0.
6208 AT_CHECK([ovs-appctl bond/show br0bond | sed -n '/^.*may_enable:.*/p'], [0], [dnl
6213 # now enable the bfd on p1 and disable bfd on p0.
6214 AT_CHECK([ovs-vsctl set Interface p1 bfd:enable=true])
6215 AT_CHECK([ovs-vsctl set Interface p0 bfd:enable=false])
6216 # advance the clock to stablize everything.
6217 ovs-appctl time/warp 5000 100
6218 # cfm/show should show 'recv' fault.
6219 AT_CHECK([ovs-appctl cfm/show | sed -n '/^.*fault:.*/p'], [0], [dnl
6222 # bfd/show should show 'down'.
6223 AT_CHECK([ovs-appctl bfd/show | sed -n '/^.*Session State:.*/p'], [0], [dnl
6224 Local Session State: down
6225 Remote Session State: down
6227 # bond/show should show 'may-enable: false' for p0 and p1.
6228 AT_CHECK([ovs-appctl bond/show | sed -n '/^.*may_enable:.*/p'], [0], [dnl
6238 AT_SETUP([ofproto-dpif - ofproto-dpif-monitor 1])
6239 OVS_VSWITCHD_START([add-port br0 p0 -- set interface p0 type=gre options:remote_ip=1.2.3.4])
6242 AT_CHECK([ovs-vsctl set interface p0 bfd:enable=true])
6244 OVS_WAIT_UNTIL([grep "monitor thread created" ovs-vswitchd.log])
6245 # disable bfd on p0.
6246 AT_CHECK([ovs-vsctl set interface p0 bfd:enable=false])
6248 OVS_WAIT_UNTIL([grep "monitor thread terminated" ovs-vswitchd.log])
6249 AT_CHECK([cat ovs-vswitchd.log | sed -e '/^.*ofproto_dpif_monitor.*$/d' > ovs-vswitchd.log])
6252 AT_CHECK([ovs-vsctl set interface p0 cfm_mpid=10])
6254 OVS_WAIT_UNTIL([grep "monitor thread created" ovs-vswitchd.log])
6255 # disable cfm on p0.
6256 AT_CHECK([ovs-vsctl remove interface p0 cfm_mpid 10])
6258 OVS_WAIT_UNTIL([grep "monitor thread terminated" ovs-vswitchd.log])
6259 AT_CHECK([cat ovs-vswitchd.log | sed -e '/^.*ofproto_dpif_monitor.*$/d' > ovs-vswitchd.log])
6261 # enable both bfd and cfm on p0.
6262 AT_CHECK([ovs-vsctl set interface p0 bfd:enable=true cfm_mpid=10])
6264 OVS_WAIT_UNTIL([grep "monitor thread created" ovs-vswitchd.log])
6265 # disable bfd on p0.
6266 AT_CHECK([ovs-vsctl set interface p0 bfd:enable=false])
6267 # check log, there should not be the log of thread terminated.
6268 AT_CHECK([sed -n "s/^.*|ofproto_dpif_monitor(monitor[[0-9]]*)|INFO|\(.* terminated\)$/\1/p" ovs-vswitchd.log], [0], [dnl
6270 # reenable bfd on p0.
6271 AT_CHECK([ovs-vsctl set interface p0 bfd:enable=true])
6272 # check log, should still be on log of thread created.
6273 AT_CHECK([sed -n "s/^.*|ofproto_dpif_monitor(monitor[[0-9]]*)|INFO|\(.* created\)$/\1/p" ovs-vswitchd.log], [0], [dnl
6274 monitor thread created
6276 # disable bfd and cfm together.
6277 AT_CHECK([ovs-vsctl set interface p0 bfd:enable=false -- remove interface p0 cfm_mpid 10])
6279 OVS_WAIT_UNTIL([grep "monitor thread terminated" ovs-vswitchd.log])
6284 # this test helps avoid the deadlock between the main thread and monitor thread.
6285 AT_SETUP([ofproto-dpif - ofproto-dpif-monitor 2])
6288 for i in `seq 1 199`
6290 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])
6296 AT_BANNER([ofproto-dpif - flow translation resource limits])
6298 AT_SETUP([ofproto-dpif - infinite resubmit])
6300 AT_CHECK([ovs-ofctl add-flow br0 actions=resubmit:1,resubmit:2,output:3])
6301 AT_CHECK([ovs-appctl -vpoll_loop:off ofproto/trace br0 'eth_dst=ff:ff:ff:ff:ff:ff'],
6303 AT_CHECK([tail -1 stdout], [0], [Datapath actions: drop
6305 AT_CHECK([grep -c 'resubmit actions recursed over 64 times' ovs-vswitchd.log],
6308 OVS_VSWITCHD_STOP(["/resubmit actions recursed/d"])
6311 AT_SETUP([ofproto-dpif - exponential resubmit chain])
6313 ADD_OF_PORTS([br0], 1)
6314 (for i in `seq 1 64`; do
6316 echo "in_port=$i, actions=resubmit:$j, resubmit:$j, local"
6318 echo "in_port=65, actions=local") > flows
6319 AT_CHECK([ovs-ofctl add-flows br0 flows])
6320 AT_CHECK([ovs-appctl -vpoll_loop:off ofproto/trace br0 'in_port=1'], [0], [stdout])
6321 AT_CHECK([grep -c 'over 4096 resubmit actions' ovs-vswitchd.log], [0], [1
6323 OVS_VSWITCHD_STOP(["/over.*resubmit actions/d"])
6326 AT_SETUP([ofproto-dpif - too many output actions])
6328 ADD_OF_PORTS([br0], 1)
6329 (for i in `seq 1 12`; do
6331 echo "in_port=$i, actions=resubmit:$j, resubmit:$j, local"
6333 echo "in_port=13, actions=local,local,local,local,local,local,local,local") > flows
6334 AT_CHECK([ovs-ofctl add-flows br0 flows])
6335 AT_CHECK([ovs-appctl -vpoll_loop:off ofproto/trace br0 'in_port=1'], [0], [stdout])
6336 AT_CHECK([grep -c -e '- Uses action(s) not supported by datapath' stdout],
6339 AT_CHECK([grep -c 'resubmits yielded over 64 kB of actions' ovs-vswitchd.log], [0], [1
6341 OVS_VSWITCHD_STOP(["/resubmits yielded over 64 kB of actions/d"])
6344 AT_SETUP([ofproto-dpif - stack too deep])
6346 ADD_OF_PORTS([br0], 1)
6347 (for i in `seq 1 12`; do
6349 echo "in_port=$i, actions=resubmit:$j, resubmit:$j, local"
6351 push="push:NXM_NX_REG0[[]]"
6352 echo "in_port=13, actions=$push,$push,$push,$push,$push,$push,$push,$push") > flows
6353 AT_CHECK([ovs-ofctl add-flows br0 flows])
6354 AT_CHECK([ovs-appctl -vpoll_loop:off ofproto/trace br0 'in_port=1'], [0], [stdout])
6355 AT_CHECK([grep -c 'resubmits yielded over 64 kB of stack' ovs-vswitchd.log], [0], [1
6357 OVS_VSWITCHD_STOP(["/resubmits yielded over 64 kB of stack/d"])
6361 AT_SETUP([ofproto-dpif packet-out controller])
6363 ADD_OF_PORTS([br0], 1, 2)
6365 AT_CHECK([ovs-ofctl add-flow br0 'dl_dst=50:54:00:00:00:0a actions=controller'])
6367 AT_CAPTURE_FILE([ofctl_monitor.log])
6368 AT_CHECK([ovs-ofctl monitor br0 65534 invalid_ttl --detach --no-chdir --pidfile 2> ofctl_monitor.log])
6371 AT_CHECK([ovs-ofctl -O OpenFlow13 packet-out br0 CONTROLLER controller '50540000000a5054000000091234'])
6374 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
6375 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
6376 NXT_PACKET_IN (xid=0x0): total_len=14 in_port=CONTROLLER (via action) data_len=14 (unbuffered)
6377 in_port=0,vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,dl_type=0x1234
6379 NXT_PACKET_IN (xid=0x0): total_len=14 in_port=CONTROLLER (via action) data_len=14 (unbuffered)
6380 in_port=0,vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,dl_type=0x1234
6382 NXT_PACKET_IN (xid=0x0): total_len=14 in_port=CONTROLLER (via action) data_len=14 (unbuffered)
6383 in_port=0,vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,dl_type=0x1234
6386 AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
6387 dl_dst=50:54:00:00:00:0a actions=CONTROLLER:65535
6391 (echo "OFPST_TABLE reply (OF1.3) (xid=0x2):
6393 active=1, lookup=0, matched=0"
6395 while test $x -lt 254; do
6398 active=0, lookup=0, matched=0"
6401 AT_CHECK([ovs-ofctl -O OpenFlow13 dump-tables br0 ], [0], [expout])
6406 AT_SETUP([ofproto-dpif packet-out controller (patch port)])
6409 add-port br0 p1 -- \
6410 set interface p1 type=patch options:peer=p2 -- \
6412 set bridge br1 datapath-type=dummy -- \
6413 set bridge br1 fail-mode=secure -- \
6414 set bridge br1 protocols='[OpenFlow10,OpenFlow11,OpenFlow12,OpenFlow13]' -- \
6415 add-port br1 p2 -- \
6416 set interface p2 type=patch options:peer=p1 --])
6418 AT_CAPTURE_FILE([ofctl_monitor.log])
6419 AT_CHECK([ovs-ofctl monitor br1 65534 invalid_ttl --detach --no-chdir --pidfile 2> ofctl_monitor.log])
6422 AT_CHECK([ovs-ofctl -O OpenFlow13 packet-out br0 CONTROLLER output:1 '50540000000a5054000000091234'])
6425 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
6426 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
6427 NXT_PACKET_IN (xid=0x0): cookie=0x0 total_len=14 in_port=1 (via no_match) data_len=14 (unbuffered)
6428 in_port=0,vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,dl_type=0x1234
6430 NXT_PACKET_IN (xid=0x0): cookie=0x0 total_len=14 in_port=1 (via no_match) data_len=14 (unbuffered)
6431 in_port=0,vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,dl_type=0x1234
6433 NXT_PACKET_IN (xid=0x0): cookie=0x0 total_len=14 in_port=1 (via no_match) data_len=14 (unbuffered)
6434 in_port=0,vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,dl_type=0x1234
6437 (printf "OFPST_TABLE reply (OF1.3) (xid=0x2):"
6439 while test $x -lt 254; do
6442 active=0, lookup=0, matched=0"
6445 AT_CHECK([ovs-ofctl -O OpenFlow13 dump-tables br0 ], [0], [expout])
6447 (echo "OFPST_TABLE reply (OF1.3) (xid=0x2):
6449 active=0, lookup=3, matched=0"
6451 while test $x -lt 254; do
6454 active=0, lookup=0, matched=0"
6457 AT_CHECK([ovs-ofctl -O OpenFlow13 dump-tables br1 ], [0], [expout])
6463 AT_SETUP([ofproto-dpif packet-out goto_table])
6465 ADD_OF_PORTS([br0], 1, 2)
6467 AT_DATA([flows.txt], [dnl
6468 table=0 dl_dst=50:54:00:00:00:0a actions=goto_table(1)
6469 table=1 dl_dst=50:54:00:00:00:0a actions=controller
6471 AT_CHECK([ovs-ofctl -O OpenFlow13 add-flows br0 flows.txt])
6473 AT_CAPTURE_FILE([ofctl_monitor.log])
6474 AT_CHECK([ovs-ofctl monitor br0 65534 invalid_ttl --detach --no-chdir --pidfile 2> ofctl_monitor.log])
6477 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)'
6480 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
6481 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
6482 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
6483 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
6484 in_port=0,vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,dl_type=0x1234
6486 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
6487 in_port=0,vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,dl_type=0x1234
6489 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
6490 in_port=0,vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,dl_type=0x1234
6493 AT_CHECK([ovs-appctl revalidator/purge], [0])
6494 AT_CHECK([ovs-ofctl -O OpenFlow13 dump-flows br0 | ofctl_strip | sort], [0], [dnl
6495 n_packets=3, n_bytes=180, dl_dst=50:54:00:00:00:0a actions=goto_table:1
6496 table=1, n_packets=3, n_bytes=180, dl_dst=50:54:00:00:00:0a actions=CONTROLLER:65535
6497 OFPST_FLOW reply (OF1.3):
6500 (echo "OFPST_TABLE reply (OF1.3) (xid=0x2):
6502 active=1, lookup=3, matched=3
6505 active=1, lookup=3, matched=3"
6507 while test $x -lt 254; do
6510 active=0, lookup=0, matched=0"
6513 AT_CHECK([ovs-ofctl -O OpenFlow13 dump-tables br0 ], [0], [expout])
6519 AT_SETUP([ofproto-dpif packet-out table-miss (continue)])
6521 ADD_OF_PORTS([br0], 1, 2)
6523 AT_CHECK([ovs-ofctl -O OpenFlow11 add-flow br0 'table=1 dl_dst=50:54:00:00:00:0a actions=controller'])
6524 AT_CHECK([ovs-ofctl -O OpenFlow11 mod-table br0 all continue])
6526 AT_CAPTURE_FILE([ofctl_monitor.log])
6527 AT_CHECK([ovs-ofctl monitor br0 65534 invalid_ttl --detach --no-chdir --pidfile 2> ofctl_monitor.log])
6530 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)'
6533 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
6534 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
6535 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
6536 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
6537 in_port=0,vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,dl_type=0x1234
6539 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
6540 in_port=0,vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,dl_type=0x1234
6542 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
6543 in_port=0,vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,dl_type=0x1234
6546 AT_CHECK([ovs-appctl revalidator/purge], [0])
6547 AT_CHECK([ovs-ofctl -O OpenFlow11 dump-flows br0 | ofctl_strip | sort], [0], [dnl
6548 table=1, n_packets=3, n_bytes=180, dl_dst=50:54:00:00:00:0a actions=CONTROLLER:65535
6549 OFPST_FLOW reply (OF1.1):
6552 (echo "OFPST_TABLE reply (OF1.3) (xid=0x2):
6554 active=0, lookup=3, matched=0
6557 active=1, lookup=3, matched=3"
6559 while test $x -lt 254; do
6562 active=0, lookup=0, matched=0"
6565 AT_CHECK([ovs-ofctl -O OpenFlow13 dump-tables br0 ], [0], [expout])
6570 AT_SETUP([ofproto-dpif - ICMPv6])
6572 ADD_OF_PORTS([br0], 1)
6574 AT_CAPTURE_FILE([ofctl_monitor.log])
6576 AT_CHECK([ovs-ofctl monitor br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
6578 ovs-appctl netdev-dummy/receive p1 '0060970769ea0000860580da86dd6000000000203afffe80000000000000020086fffe0580dafe80000000000000026097fffe0769ea870068bd00000000fe80000000000000026097fffe0769ea01010000860580da'
6580 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
6582 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
6583 NXT_PACKET_IN (xid=0x0): cookie=0x0 total_len=86 in_port=1 (via no_match) data_len=86 (unbuffered)
6584 icmp6,in_port=0,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
6590 AT_SETUP([ofproto-dpif - Neighbor Discovery set-field with checksum update])
6592 ADD_OF_PORTS([br0], 1)
6593 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])
6595 AT_CAPTURE_FILE([ofctl_monitor.log])
6597 AT_CHECK([ovs-ofctl monitor br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
6599 ovs-appctl netdev-dummy/receive p1 '0060970769ea0000860580da86dd6000000000203afffe80000000000000020086fffe0580dafe80000000000000026097fffe0769ea870068bd00000000fe80000000000000026097fffe0769ea01010000860580da'
6601 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
6603 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
6604 NXT_PACKET_IN (xid=0x0): cookie=0x0 total_len=86 in_port=1 (via action) data_len=86 (unbuffered)
6605 icmp6,in_port=0,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