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])
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 100
44 ovs-appctl time/warp 100
46 AT_CHECK([cat ovs-vswitchd.log | grep 'in_port([[348]])' | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
47 skb_priority(0),skb_mark(0/0),recirc_id(0),dp_hash(0/0),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/0.0.0.0,dst=10.0.0.1/0.0.0.0,proto=1/0,tos=0/0,ttl=64/0,frag=no/0xff),icmp(type=8/0,code=0/0), actions: <del>
48 skb_priority(0),skb_mark(0/0),recirc_id(0),dp_hash(0/0),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.3/0.0.0.0,dst=10.0.0.4/0.0.0.0,proto=1/0,tos=0/0,ttl=64/0,frag=no/0xff),icmp(type=8/0,code=0/0), actions: <del>
49 skb_priority(0),skb_mark(0/0),recirc_id(0),dp_hash(0/0),in_port(4),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0d),eth_type(0x0800),ipv4(src=10.0.0.5/0.0.0.0,dst=10.0.0.1/0.0.0.0,proto=1/0,tos=0/0,ttl=64/0,frag=no/0xff),icmp(type=8/0,code=0/0), actions: <del>
50 skb_priority(0),skb_mark(0/0),recirc_id(0),dp_hash(0/0),in_port(4),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0e),eth_type(0x0800),ipv4(src=10.0.0.6/0.0.0.0,dst=10.0.0.1/0.0.0.0,proto=1/0,tos=0/0,ttl=64/0,frag=no/0xff),icmp(type=8/0,code=0/0), actions: <del>
51 skb_priority(0),skb_mark(0/0),recirc_id(0),dp_hash(0/0),in_port(4),eth(src=50:54:00:00:00:09,dst=ff:ff:ff:ff:ff:ff),eth_type(0x8035),arp(sip=0.0.0.0/0.0.0.0,tip=0.0.0.0/0.0.0.0,op=3/0,sha=50:54:00:00:00:09/00:00:00:00:00:00,tha=50:54:00:00:00:09/00:00:00:00:00:00), actions: <del>
52 skb_priority(0),skb_mark(0/0),recirc_id(0),dp_hash(0/0),in_port(4),eth(src=50:54:00:00:00:0b,dst=ff:ff:ff:ff:ff:ff),eth_type(0x8035),arp(sip=0.0.0.0/0.0.0.0,tip=0.0.0.0/0.0.0.0,op=3/0,sha=50:54:00:00:00:0b/00:00:00:00:00:00,tha=50:54:00:00:00:0b/00:00:00:00:00:00), actions: <del>
57 AT_SETUP([ofproto-dpif, balance-slb bonding])
58 # Create br0 with interfaces bond0(p1, p2, p3) and p7,
59 # and br1 with interfaces p4, p5, p6 and p8.
60 # p1 <-> p4, p2 <-> p5, p3 <-> p6
61 # Send some traffic, make sure the traffic are spread based on source mac.
63 [add-bond br0 bond0 p1 p2 p3 bond_mode=balance-slb --\
64 set interface p1 type=dummy options:pstream=punix:$OVS_RUNDIR/p1.sock ofport_request=1 -- \
65 set interface p2 type=dummy options:pstream=punix:$OVS_RUNDIR/p2.sock ofport_request=2 -- \
66 set interface p3 type=dummy options:pstream=punix:$OVS_RUNDIR/p3.sock ofport_request=3 -- \
67 add-port br0 p7 -- set interface p7 ofport_request=7 type=dummy -- \
69 set bridge br1 other-config:hwaddr=aa:66:aa:66:00:00 -- \
70 set bridge br1 datapath-type=dummy other-config:datapath-id=1234 \
72 add-port br1 p4 -- set interface p4 type=dummy options:stream=unix:$OVS_RUNDIR/p1.sock ofport_request=4 -- \
73 add-port br1 p5 -- set interface p5 type=dummy options:stream=unix:$OVS_RUNDIR/p2.sock ofport_request=5 -- \
74 add-port br1 p6 -- set interface p6 type=dummy options:stream=unix:$OVS_RUNDIR/p3.sock ofport_request=6 -- \
75 add-port br1 p8 -- set interface p8 ofport_request=8 type=dummy --])
76 WAIT_FOR_DUMMY_PORTS([p4], [p5], [p6])
77 AT_CHECK([ovs-ofctl add-flow br0 action=normal])
78 AT_CHECK([ovs-ofctl add-flow br1 action=normal])
79 AT_CHECK([ovs-appctl netdev-dummy/set-admin-state up], 0, [OK
82 ovs-appctl time/warp 100
84 for i in `seq 0 100 |xargs printf '%02x\n'`;
86 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)"
87 AT_CHECK([ovs-appctl netdev-dummy/receive p7 $pkt])
90 ovs-appctl time/warp 100
91 AT_CHECK([ovs-appctl dpif/dump-flows br1 > br1_flows.txt])
92 # Make sure there is resonable distribution to all three ports.
93 # We don't want to make this check precise, in case hash function changes.
94 AT_CHECK([test `egrep 'in_port\(4\)' br1_flows.txt |wc -l` -gt 3])
95 AT_CHECK([test `egrep 'in_port\(5\)' br1_flows.txt |wc -l` -gt 3])
96 AT_CHECK([test `egrep 'in_port\(6\)' br1_flows.txt |wc -l` -gt 3])
100 AT_SETUP([ofproto-dpif, balance-tcp bonding])
101 # Create br0 with interfaces bond0(p1, p2, p3) and p7,
102 # and br1 with interfaces bond1(p4, p5, p6) and p8.
104 # Send some traffic, make sure the traffic are spread based on L4 headers.
106 [add-bond br0 bond0 p1 p2 p3 bond_mode=balance-tcp lacp=active \
107 other-config:lacp-time=fast other-config:bond-rebalance-interval=0 --\
108 set interface p1 type=dummy options:pstream=punix:$OVS_RUNDIR/p1.sock ofport_request=1 -- \
109 set interface p2 type=dummy options:pstream=punix:$OVS_RUNDIR/p2.sock ofport_request=2 -- \
110 set interface p3 type=dummy options:pstream=punix:$OVS_RUNDIR/p3.sock ofport_request=3 -- \
111 add-port br0 p7 -- set interface p7 ofport_request=7 type=dummy -- \
113 set bridge br1 other-config:hwaddr=aa:66:aa:66:00:00 -- \
114 set bridge br1 datapath-type=dummy other-config:datapath-id=1234 \
115 fail-mode=secure -- \
116 add-bond br1 bond1 p4 p5 p6 bond_mode=balance-tcp lacp=active \
117 other-config:lacp-time=fast other-config:bond-rebalance-interval=0 --\
118 set interface p4 type=dummy options:stream=unix:$OVS_RUNDIR/p1.sock ofport_request=4 -- \
119 set interface p5 type=dummy options:stream=unix:$OVS_RUNDIR/p2.sock ofport_request=5 -- \
120 set interface p6 type=dummy options:stream=unix:$OVS_RUNDIR/p3.sock ofport_request=6 -- \
121 add-port br1 p8 -- set interface p8 ofport_request=8 type=dummy --])
122 AT_CHECK([ovs-appctl netdev-dummy/set-admin-state up], 0, [OK
124 AT_CHECK([ovs-ofctl add-flow br0 action=normal])
125 AT_CHECK([ovs-ofctl add-flow br1 action=normal])
126 AT_CHECK([ovs-appctl upcall/disable-megaflows], [0], [megaflows disabled
128 WAIT_FOR_DUMMY_PORTS([p4], [p5], [p6])
130 ovs-appctl time/warp 100
131 ovs-appctl lacp/show > lacp.txt
132 ovs-appctl bond/show > bond.txt
134 for i in `seq 0 255` ;
136 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(0x010)"
137 AT_CHECK([ovs-appctl netdev-dummy/receive p7 $pkt])
140 ovs-appctl time/warp 100
141 ovs-appctl time/warp 100
142 ovs-appctl time/warp 100
143 AT_CHECK([ovs-appctl dpif/dump-flows br0 |grep tcp > br0_flows.txt])
144 AT_CHECK([ovs-appctl dpif/dump-flows br1 |grep tcp > br1_flows.txt])
145 # Make sure there is resonable distribution to all three ports.
146 # We don't want to make this check precise, in case hash function changes.
147 AT_CHECK([test `grep in_port.4 br1_flows.txt |wc -l` -gt 24])
148 AT_CHECK([test `grep in_port.5 br1_flows.txt |wc -l` -gt 24])
149 AT_CHECK([test `grep in_port.6 br1_flows.txt |wc -l` -gt 24])
153 AT_SETUP([ofproto-dpif - resubmit])
155 ADD_OF_PORTS([br0], [1], [10], [11], [12], [13], [14], [15],
156 [16], [17], [18], [19], [20], [21])
157 AT_DATA([flows.txt], [dnl
158 table=0 in_port=1 priority=1000 icmp actions=output(10),resubmit(2),output(19),resubmit(3),output(21)
159 table=0 in_port=2 priority=1500 icmp actions=output(11),resubmit(,1),output(16),resubmit(2,1),output(18)
160 table=0 in_port=3 priority=2000 icmp actions=output(20)
161 table=1 in_port=1 priority=1000 icmp actions=output(12),resubmit(4,1),output(13),resubmit(3),output(15)
162 table=1 in_port=2 priority=1500 icmp actions=output(17),resubmit(,2)
163 table=1 in_port=3 priority=1500 icmp actions=output(14),resubmit(,2)
165 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
166 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])
167 AT_CHECK([tail -1 stdout], [0],
168 [Datapath actions: 10,11,12,13,14,15,16,17,18,19,20,21
173 AT_SETUP([ofproto-dpif - goto table])
175 ADD_OF_PORTS([br0], [1], [10], [11])
176 echo "table=0 in_port=1 actions=output(10),goto_table(1)" > flows.txt
177 for i in `seq 1 63`; do echo "table=$i actions=goto_table($(($i+1)))"; done >> flows.txt
178 echo "table=64 actions=output(11)" >> flows.txt
179 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flows br0 flows.txt])
180 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])
181 AT_CHECK([tail -1 stdout], [0],
182 [Datapath actions: 10,11
187 AT_SETUP([ofproto-dpif - write actions])
189 ADD_OF_PORTS([br0], [1], [10], [11], [12], [13])
190 AT_DATA([flows.txt], [dnl
191 table=0 in_port=1,ip actions=output(10),write_actions(set_field:192.168.3.90->ip_src,output(12)),goto_table(1)
192 table=1 ip actions=write_actions(output(13)),goto_table(2)
193 table=2 ip actions=set_field:192.168.3.91->ip_src,output(11)
195 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flows br0 flows.txt])
196 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])
197 AT_CHECK([tail -2 stdout], [0],
198 [Megaflow: recirc_id=0,skb_priority=0,icmp,in_port=1,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=128
199 Datapath actions: 10,set(ipv4(src=192.168.3.91,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no)),11,set(ipv4(src=192.168.3.90,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no)),13
204 AT_SETUP([ofproto-dpif - clear actions])
206 ADD_OF_PORTS([br0], [1], [10], [11], [12])
207 AT_DATA([flows.txt], [dnl
208 table=0 in_port=1,ip actions=output(10),write_actions(set_field:192.168.3.90->ip_src,output(12)),goto_table(1)
209 table=1 tcp actions=set_field:91->tp_src,output(11),clear_actions
211 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flows br0 flows.txt])
212 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])
213 AT_CHECK([tail -2 stdout], [0],
214 [Megaflow: recirc_id=0,skb_priority=0,tcp,in_port=1,nw_frag=no,tp_src=8,tp_dst=9
215 Datapath actions: 10,set(tcp(src=91,dst=9)),11
220 AT_SETUP([ofproto-dpif - group chaining not supported])
222 ADD_OF_PORTS([br0], [1], [10], [11])
223 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'],
225 AT_CHECK([STRIP_XIDS stderr | sed 1q], [0],
226 [OFPT_ERROR (OF1.2): OFPGMFC_CHAINING_UNSUPPORTED
231 AT_SETUP([ofproto-dpif - all group in action list])
233 ADD_OF_PORTS([br0], [1], [10], [11])
234 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'])
235 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=group:1234'])
236 AT_CHECK([ovs-appctl ofproto/trace br0 'in_port=1,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,dl_type=0x0800,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_proto=1,nw_tos=0,nw_ttl=128,icmp_type=8,icmp_code=0'], [0], [stdout])
237 AT_CHECK([tail -2 stdout], [0],
238 [Megaflow: recirc_id=0,skb_priority=0,icmp,in_port=1,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=128
239 Datapath actions: set(ipv4(src=192.168.3.90,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no)),10,set(ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no)),11
244 AT_SETUP([ofproto-dpif - indirect group in action list])
246 ADD_OF_PORTS([br0], [1], [10])
247 AT_CHECK([ovs-ofctl -O OpenFlow12 add-group br0 group_id=1234,type=indirect,bucket=output:10])
248 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=group:1234'])
249 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])
250 AT_CHECK([tail -1 stdout], [0],
251 [Datapath actions: 10
256 AT_SETUP([ofproto-dpif - all group in action set])
258 ADD_OF_PORTS([br0], [1], [10], [11])
259 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'])
260 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=write_actions(group:1234)'])
261 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])
262 AT_CHECK([tail -2 stdout], [0],
263 [Megaflow: recirc_id=0,skb_priority=0,icmp,in_port=1,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=128
264 Datapath actions: set(ipv4(src=192.168.3.90,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no)),10,set(ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no)),11
269 AT_SETUP([ofproto-dpif - indirect group in action set])
271 ADD_OF_PORTS([br0], [1], [10])
272 AT_CHECK([ovs-ofctl -O OpenFlow12 add-group br0 group_id=1234,type=indirect,bucket=output:10])
273 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=write_actions(group:1234)'])
274 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])
275 AT_CHECK([tail -1 stdout], [0],
276 [Datapath actions: 10
281 AT_SETUP([ofproto-dpif - select group])
283 ADD_OF_PORTS([br0], [1], [10], [11])
284 AT_CHECK([ovs-ofctl -O OpenFlow12 add-group br0 'group_id=1234,type=select,bucket=output:10,bucket=output:11'])
285 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=write_actions(group:1234)'])
287 # Try a bunch of different flows and make sure that they get distributed
289 for d in 0 1 2 3 4 5 6 7 8 9 a b c d e f; do
290 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])
291 tail -1 stdout >> results
293 sort results | uniq -c
294 AT_CHECK([sort results | uniq], [0],
295 [Datapath actions: 10
301 AT_SETUP([ofproto-dpif - select group with watch port])
303 ADD_OF_PORTS([br0], [1], [10], [11])
304 AT_CHECK([ovs-ofctl -O OpenFlow12 add-group br0 'group_id=1234,type=select,bucket=watch_port:10,output:10,bucket=output:11'])
305 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=write_actions(group:1234)'])
306 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])
307 AT_CHECK([tail -1 stdout], [0],
308 [Datapath actions: 11
313 AT_SETUP([ofproto-dpif - select group with weight])
315 ADD_OF_PORTS([br0], [1], [10], [11], [12])
316 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'])
317 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=write_actions(group:1234)'])
318 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])
319 AT_CHECK([tail -1 stdout], [0],
320 [Datapath actions: 11
325 AT_SETUP([ofproto-dpif - fast failover group])
327 ADD_OF_PORTS([br0], [1], [10], [11])
328 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'])
329 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=write_actions(group:1234)'])
330 AT_CHECK([ovs-appctl ofproto/trace br0 'in_port=1,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,dl_type=0x0800,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_proto=1,nw_tos=0,nw_ttl=128,icmp_type=8,icmp_code=0'], [0], [stdout])
331 AT_CHECK([tail -1 stdout], [0],
332 [Datapath actions: drop
337 AT_SETUP([ofproto-dpif - group stats single bucket])
339 ADD_OF_PORTS([br0], [1], [10], [11])
340 AT_CHECK([ovs-ofctl -O OpenFlow12 add-group br0 'group_id=1234,type=select,bucket=output:10,weight=2000,bucket=output:11,weight=0'])
341 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=write_actions(group:1234)'])
345 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)"
346 AT_CHECK([ovs-appctl netdev-dummy/receive p1 $pkt])
349 ovs-appctl time/warp 100
350 ovs-appctl revalidator/wait
351 AT_CHECK([ovs-ofctl -O OpenFlow12 -vwarn dump-group-stats br0], [0], [stdout])
352 AT_CHECK([STRIP_XIDS stdout | sort], [0], [dnl
353 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
354 OFPST_GROUP reply (OF1.2):
359 AT_SETUP([ofproto-dpif - group stats all buckets])
361 ADD_OF_PORTS([br0], [1], [10], [11])
362 AT_CHECK([ovs-ofctl -O OpenFlow12 add-group br0 'group_id=1234,type=all,bucket=output:10,bucket=output:11'])
363 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=write_actions(group:1234)'])
367 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)"
368 AT_CHECK([ovs-appctl netdev-dummy/receive p1 $pkt])
371 ovs-appctl time/warp 100
372 ovs-appctl revalidator/wait
373 AT_CHECK([ovs-ofctl -O OpenFlow12 -vwarn dump-group-stats br0], [0], [stdout])
374 AT_CHECK([STRIP_XIDS stdout | sort], [0], [dnl
375 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
376 OFPST_GROUP reply (OF1.2):
381 AT_SETUP([ofproto-dpif - registers])
383 ADD_OF_PORTS([br0], [20], [21], [22], [33], [90])
384 AT_DATA([flows.txt], [dnl
385 in_port=90 actions=resubmit:2,resubmit:3,resubmit:4,resubmit:91
386 in_port=91 actions=resubmit:5,resubmit:6,resubmit:7,resubmit:92
387 in_port=92 actions=resubmit:8,resubmit:9,resubmit:10,resubmit:11,resubmit:93
388 in_port=93 actions=resubmit:12,resubmit:13,resubmit:14,resubmit:15
390 in_port=2 actions=load:0x000db000->NXM_NX_REG0[[]]
391 in_port=3 actions=load:0xdea->NXM_NX_REG0[[20..31]]
392 in_port=4 actions=load:0xeef->NXM_NX_REG0[[0..11]]
393 in_port=5 actions=move:NXM_NX_REG0[[]]->NXM_NX_REG1[[]]
394 in_port=6 actions=load:0x22222222->NXM_NX_REG2[[]]
395 in_port=7 actions=move:NXM_NX_REG1[[20..31]]->NXM_NX_REG2[[0..11]]
396 in_port=8 actions=move:NXM_NX_REG1[[0..11]]->NXM_NX_REG2[[20..31]]
397 in_port=9,reg0=0xdeadbeef actions=output:20
398 in_port=10,reg1=0xdeadbeef actions=output:21
399 in_port=11,reg2=0xeef22dea actions=output:22
401 dnl Sanilty check all registers
402 in_port=12 actions=load:0x10->NXM_NX_REG0[[]],load:0x11->NXM_NX_REG1[[]],load:0x12->NXM_NX_REG2[[]]
403 in_port=13 actions=load:0x13->NXM_NX_REG3[[]],load:0x14->NXM_NX_REG4[[]],load:0x15->NXM_NX_REG5[[]]
404 in_port=14 actions=load:0x16->NXM_NX_REG6[[]],load:0x17->NXM_NX_REG7[[]]
405 in_port=15,reg0=0x10,reg1=0x11,reg2=0x12,reg3=0x13,reg4=0x14,reg5=0x15,reg6=0x16,reg7=0x17 actions=output:33
408 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
409 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])
410 AT_CHECK([tail -1 stdout], [0],
411 [Datapath actions: 20,21,22,33
416 AT_SETUP([ofproto-dpif - push-pop])
418 ADD_OF_PORTS([br0], [20], [21], [22], [33], [90])
419 AT_DATA([flows.txt], [dnl
420 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
421 in_port=2 actions=pop:NXM_NX_REG0[[0..7]],output:NXM_NX_REG0[[]]
422 in_port=3 actions=pop:NXM_NX_REG1[[0..7]],output:NXM_NX_REG1[[]]
423 in_port=4 actions=pop:NXM_NX_REG2[[0..15]],output:NXM_NX_REG2[[]]
424 in_port=5 actions=pop:NXM_NX_REG3[[]],output:NXM_NX_REG3[[]]
427 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
428 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])
429 AT_CHECK([tail -1 stdout], [0],
430 [Datapath actions: 33,22,21,20
435 AT_SETUP([ofproto-dpif - output])
437 ADD_OF_PORTS([br0], [1], [9], [10], [11], [55], [66], [77], [88])
438 AT_DATA([flows.txt], [dnl
439 in_port=1 actions=resubmit:2,resubmit:3,resubmit:4,resubmit:5,resubmit:6,resubmit:7,resubmit:8
440 in_port=2 actions=output:9
441 in_port=3 actions=load:55->NXM_NX_REG0[[]],output:NXM_NX_REG0[[]],load:66->NXM_NX_REG1[[]]
442 in_port=4 actions=output:10,output:NXM_NX_REG0[[]],output:NXM_NX_REG1[[]],output:11
443 in_port=5 actions=load:77->NXM_NX_REG0[[0..15]],load:88->NXM_NX_REG0[[16..31]]
444 in_port=6 actions=output:NXM_NX_REG0[[0..15]],output:NXM_NX_REG0[[16..31]]
445 in_port=7 actions=load:0x110000ff->NXM_NX_REG0[[]],output:NXM_NX_REG0[[]]
446 in_port=8 actions=1,9,load:9->NXM_OF_IN_PORT[[]],1,9
448 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
449 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])
450 AT_CHECK([tail -1 stdout], [0],
451 [Datapath actions: 9,55,10,55,66,11,77,88,9,1
456 AT_SETUP([ofproto-dpif - dec_ttl])
458 ADD_OF_PORTS([br0], [1], [2], [3], [4])
459 AT_DATA([flows.txt], [dnl
460 table=0 in_port=1 action=dec_ttl,output:2,resubmit(1,1),output:4
461 table=1 in_port=1 action=dec_ttl,output:3
463 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
464 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])
465 AT_CHECK([tail -4 stdout], [0],
466 [Megaflow: recirc_id=0,skb_priority=0,ip,in_port=1,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_proto=111,nw_tos=0,nw_ecn=0,nw_ttl=2
467 Datapath actions: set(ipv4(src=192.168.0.1,dst=192.168.0.2,proto=111,tos=0,ttl=1,frag=no)),2,4
468 This flow is handled by the userspace slow path because it:
469 - Sends "packet-in" messages to the OpenFlow controller.
471 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])
472 AT_CHECK([tail -2 stdout], [0],
473 [Megaflow: recirc_id=0,skb_priority=0,ip,in_port=1,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_proto=111,nw_tos=0,nw_ecn=0,nw_ttl=3
474 Datapath actions: set(ipv4(src=192.168.0.1,dst=192.168.0.2,proto=111,tos=0,ttl=2,frag=no)),2,set(ipv4(src=192.168.0.1,dst=192.168.0.2,proto=111,tos=0,ttl=1,frag=no)),3,4
476 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])
477 AT_CHECK([tail -2 stdout], [0],
478 [Megaflow: recirc_id=0,skb_priority=0,ipv6,in_port=1,ipv6_src=::1,ipv6_dst=::2,ipv6_label=0x00000,nw_proto=10,nw_tos=112,nw_ecn=0,nw_ttl=128
479 Datapath actions: set(ipv6(src=::1,dst=::2,label=0,proto=10,tclass=0x70,hlimit=127,frag=no)),2,set(ipv6(src=::1,dst=::2,label=0,proto=10,tclass=0x70,hlimit=126,frag=no)),3,4
482 AT_CAPTURE_FILE([ofctl_monitor.log])
483 AT_CHECK([ovs-ofctl monitor br0 65534 invalid_ttl --detach --no-chdir --pidfile 2> ofctl_monitor.log])
484 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])
485 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
486 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
487 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=34 in_port=1 (via invalid_ttl) data_len=34 (unbuffered)
488 ip,metadata=0,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
493 dnl A dec_ttl action at offset 32 in ofpacts will cause the ofpacts
494 dnl buffer to be resized just before pushing the id of the dec_ttl action.
495 dnl Thus the implementation must account for this by using the
496 dnl reallocated buffer rather than the original buffer.
498 dnl A number of similar rules are added to try and exercise
499 dnl xrealloc sufficiently that it returns a different base pointer
500 AT_SETUP([ofproto-dpif - dec_ttl without arguments at offset 32 in ofpacts])
502 ADD_OF_PORTS([br0], [1])
503 (for i in `seq 0 255`; do
504 printf "dl_src=10:11:11:11:11:%02x actions=output:1,output:1,output:1,dec_ttl,controller\n" $i
506 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
510 dnl A dec_ttl action at offset 32 in ofpacts will cause the ofpacts
511 dnl buffer to be resized just before pushing the id of the dec_ttl action.
512 dnl Thus the implementation must account for this by using the
513 dnl reallocated buffer rather than the original buffer.
515 dnl A number of similar rules are added to try and exercise
516 dnl xrealloc sufficiently that it returns a different base pointer
517 AT_SETUP([ofproto-dpif - dec_ttl with arguments at offset 32 in ofpacts])
519 ADD_OF_PORTS([br0], [1])
520 (for i in `seq 0 255`; do
521 printf "dl_src=10:11:11:11:11:%02x actions=output:1,output:1,output:1,dec_ttl(1),controller\n" $i
523 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
527 dnl A note action at offset 24 in ofpacts will cause the ofpacts
528 dnl buffer to be resized just before pushing the id of the dec_ttl action.
529 dnl Thus the implementation must account for this by using the
530 dnl reallocated buffer rather than the original buffer.
532 dnl A number of similar rules are added to try and exercise
533 dnl xrealloc sufficiently that it returns a different base pointer
534 AT_SETUP([ofproto-dpif - note at offset 24 in ofpacts])
536 ADD_OF_PORTS([br0], [1])
537 (for i in `seq 0 255`; do
538 printf "dl_src=10:11:11:11:11:%02x actions=output:1,output:1,note:ff,controller\n" $i
540 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
544 AT_SETUP([ofproto-dpif - output, OFPP_NONE ingress port])
546 ADD_OF_PORTS([br0], [1], [2])
548 AT_CHECK([ovs-ofctl add-flow br0 action=normal])
550 # "in_port" defaults to OFPP_NONE if it's not specified.
551 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"
552 AT_CHECK([ovs-appctl ofproto/trace br0 "$flow"], [0], [stdout])
553 AT_CHECK([tail -1 stdout | sed 's/Datapath actions: //' | tr "," "\n" | sort -n], [0], [dnl
562 AT_SETUP([ofproto-dpif - DSCP])
563 OVS_VSWITCHD_START([add-port br0 p1 -- set Interface p1 type=dummy])
564 ADD_OF_PORTS([br0], [9])
565 AT_DATA([flows.txt], [dnl
566 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
568 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
569 AT_CHECK([ovs-vsctl -- \
570 set Port p1 qos=@newqos --\
571 --id=@newqos create QoS type=linux-htb queues=1=@q1,2=@q2 --\
572 --id=@q1 create Queue dscp=1 --\
573 --id=@q2 create Queue dscp=2], [0], [ignore])
574 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])
575 AT_CHECK([tail -2 stdout], [0],
576 [Megaflow: recirc_id=0,skb_priority=0,icmp,in_port=9,nw_src=1.1.1.1,nw_dst=2.2.2.2,nw_tos=252,nw_ecn=3,nw_ttl=128
577 Datapath actions: dnl
579 set(ipv4(src=1.1.1.1,dst=2.2.2.2,proto=1,tos=0x7,ttl=128,frag=no)),set(skb_priority(0x1)),1,dnl
580 set(ipv4(src=1.1.1.1,dst=2.2.2.2,proto=1,tos=0xb,ttl=128,frag=no)),set(skb_priority(0x2)),1,dnl
582 set(ipv4(src=1.1.1.1,dst=2.2.2.2,proto=1,tos=0x7,ttl=128,frag=no)),set(skb_priority(0x1)),1,dnl
583 set(ipv4(src=1.1.1.1,dst=2.2.2.2,proto=1,tos=0xff,ttl=128,frag=no)),set(skb_priority(0)),1,dnl
584 set(ipv4(src=1.1.1.1,dst=2.2.2.2,proto=1,tos=0x3,ttl=128,frag=no)),1,dnl
590 AT_SETUP([ofproto-dpif - output/flood flags])
592 ADD_OF_PORTS([br0], [1], [2], [3], [4], [5], [6], [7])
594 AT_DATA([flows.txt], [dnl
595 in_port=local actions=local,flood
596 in_port=1 actions=flood
597 in_port=2 actions=all
598 in_port=3 actions=output:LOCAL,output:1,output:2,output:3,output:4,output:5,output:6,output:7
599 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
601 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
602 AT_CHECK([ovs-ofctl mod-port br0 5 noforward])
603 AT_CHECK([ovs-ofctl mod-port br0 6 noflood])
605 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])
606 AT_CHECK([tail -1 stdout \
607 | sed -e 's/Datapath actions: //' | tr ',' '\n' | sort], [0], [dnl
615 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])
616 AT_CHECK([tail -1 stdout \
617 | sed -e 's/Datapath actions: //' | tr ',' '\n' | sort], [0], [dnl
625 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])
626 AT_CHECK([tail -1 stdout \
627 | sed -e 's/Datapath actions: //' | tr ',' '\n' | sort], [0], [dnl
636 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])
637 AT_CHECK([tail -1 stdout], [0],
638 [Datapath actions: 100,1,2,4,6,7
641 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])
642 AT_CHECK([tail -1 stdout], [0],
643 [Datapath actions: set(skb_priority(0x1)),100,1,2,set(skb_priority(0x2)),3,set(skb_priority(0x1)),6,7
648 AT_SETUP([ofproto-dpif - Default Table Miss - OF1.0 (OFPTC_TABLE_MISS_CONTROLLER)])
649 OVS_VSWITCHD_START([dnl
650 add-port br0 p1 -- set Interface p1 type=dummy
652 ON_EXIT([kill `cat ovs-ofctl.pid`])
654 AT_CAPTURE_FILE([ofctl_monitor.log])
656 AT_CHECK([ovs-ofctl monitor br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
659 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)'
661 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
662 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
663 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
664 NXT_PACKET_IN (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
665 tcp,metadata=0,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=0x010 tcp_csum:0
667 NXT_PACKET_IN (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
668 tcp,metadata=0,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=0x010 tcp_csum:0
670 NXT_PACKET_IN (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
671 tcp,metadata=0,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=0x010 tcp_csum:0
674 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
675 AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
682 AT_SETUP([ofproto-dpif - Default Table Miss - OF1.3 (OFPTC_TABLE_MISS_DROP)])
683 OVS_VSWITCHD_START([dnl
684 add-port br0 p1 -- set Interface p1 type=dummy
686 ON_EXIT([kill `cat ovs-ofctl.pid`])
688 AT_CAPTURE_FILE([ofctl_monitor.log])
689 AT_CHECK([ovs-ofctl del-flows br0])
691 AT_CHECK([ovs-ofctl monitor -OOpenFlow13 -P openflow10 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
693 dnl Test that missed packets are droped
695 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)'
697 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
699 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
702 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
703 AT_CHECK([ovs-ofctl -OOpenFlow13 dump-flows br0 | ofctl_strip | sort], [0], [dnl
704 OFPST_FLOW reply (OF1.3):
710 AT_SETUP([ofproto-dpif - Table Miss - goto table and OFPTC_TABLE_MISS_CONTROLLER])
711 OVS_VSWITCHD_START([dnl
712 add-port br0 p1 -- set Interface p1 type=dummy
714 ON_EXIT([kill `cat ovs-ofctl.pid`])
716 AT_CAPTURE_FILE([ofctl_monitor.log])
717 AT_CHECK([ovs-ofctl -OOpenFlow12 add-flow br0 'table=0 actions=goto_table(1)'])
719 AT_CHECK([ovs-ofctl monitor -P openflow10 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
722 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)'
724 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
725 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
726 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
727 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
728 tcp,metadata=0,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=0x010 tcp_csum:0
730 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
731 tcp,metadata=0,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=0x010 tcp_csum:0
733 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
734 tcp,metadata=0,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=0x010 tcp_csum:0
737 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
738 ovs-appctl revalidator/wait
739 AT_CHECK([ovs-ofctl -OOpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
740 n_packets=3, n_bytes=180, actions=goto_table:1
741 OFPST_FLOW reply (OF1.2):
747 AT_SETUP([ofproto-dpif - Table Miss - resubmit and OFPTC_TABLE_MISS_CONTROLLER])
748 OVS_VSWITCHD_START([dnl
749 add-port br0 p1 -- set Interface p1 type=dummy
751 ON_EXIT([kill `cat ovs-ofctl.pid`])
753 AT_CAPTURE_FILE([ofctl_monitor.log])
754 AT_CHECK([ovs-ofctl -OOpenFlow12 add-flow br0 'table=0 actions=resubmit(1,1)'])
756 AT_CHECK([ovs-ofctl monitor -P openflow10 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
759 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)'
762 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
763 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
766 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
767 ovs-appctl revalidator/wait
768 AT_CHECK([ovs-ofctl -OOpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
769 n_packets=3, n_bytes=180, actions=resubmit(1,1)
770 OFPST_FLOW reply (OF1.2):
776 AT_SETUP([ofproto-dpif - Table Miss - OFPTC_TABLE_MISS_CONTINUE])
777 OVS_VSWITCHD_START([dnl
778 add-port br0 p1 -- set Interface p1 type=dummy
780 ON_EXIT([kill `cat ovs-ofctl.pid`])
782 AT_CAPTURE_FILE([ofctl_monitor.log])
783 AT_CHECK([ovs-ofctl add-flow br0 'table=1 dl_src=10:11:11:11:11:11 actions=controller'])
784 AT_CHECK([ovs-ofctl -OOpenFlow11 mod-table br0 all continue])
786 dnl Miss table 0, Hit table 1
787 AT_CHECK([ovs-ofctl monitor br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
790 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)'
792 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
793 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
795 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
796 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
797 tcp,metadata=0,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=0x010 tcp_csum:0
799 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
800 tcp,metadata=0,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=0x010 tcp_csum:0
802 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
803 tcp,metadata=0,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=0x010 tcp_csum:0
806 dnl Hit table 0, Miss all other tables, sent to controller
807 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --no-chdir --pidfile 2> ofctl_monitor.log])
810 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)'
812 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
813 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
815 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
816 NXT_PACKET_IN (xid=0x0): table_id=253 cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
817 tcp,metadata=0,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=0x010 tcp_csum:0
819 NXT_PACKET_IN (xid=0x0): table_id=253 cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
820 tcp,metadata=0,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=0x010 tcp_csum:0
822 NXT_PACKET_IN (xid=0x0): table_id=253 cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
823 tcp,metadata=0,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=0x010 tcp_csum:0
826 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
827 ovs-appctl revalidator/wait
828 AT_CHECK([ovs-ofctl -OOpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
829 table=1, n_packets=3, n_bytes=180, dl_src=10:11:11:11:11:11 actions=CONTROLLER:65535
830 OFPST_FLOW reply (OF1.2):
836 AT_SETUP([ofproto-dpif - Table Miss - goto table and OFPTC_TABLE_MISS_CONTINUE])
837 OVS_VSWITCHD_START([dnl
838 add-port br0 p1 -- set Interface p1 type=dummy
840 ON_EXIT([kill `cat ovs-ofctl.pid`])
842 AT_CAPTURE_FILE([ofctl_monitor.log])
843 AT_DATA([flows.txt], [dnl
844 table=0 actions=goto_table(1)
845 table=2 dl_src=10:11:11:11:11:11 actions=controller
847 AT_CHECK([ovs-ofctl -OOpenFlow12 add-flows br0 flows.txt])
848 AT_CHECK([ovs-ofctl -OOpenFlow11 mod-table br0 all continue])
850 dnl Hit table 0, Miss table 1, Hit table 2
851 AT_CHECK([ovs-ofctl monitor br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
854 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)'
856 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
857 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
859 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
860 NXT_PACKET_IN (xid=0x0): table_id=2 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
861 tcp,metadata=0,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=0x010 tcp_csum:0
863 NXT_PACKET_IN (xid=0x0): table_id=2 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
864 tcp,metadata=0,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=0x010 tcp_csum:0
866 NXT_PACKET_IN (xid=0x0): table_id=2 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
867 tcp,metadata=0,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=0x010 tcp_csum:0
870 dnl Hit table 1, Miss all other tables, sent to controller
871 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --no-chdir --pidfile 2> ofctl_monitor.log])
874 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)'
876 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
877 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
879 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
880 NXT_PACKET_IN (xid=0x0): table_id=253 cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
881 tcp,metadata=0,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=0x010 tcp_csum:0
883 NXT_PACKET_IN (xid=0x0): table_id=253 cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
884 tcp,metadata=0,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=0x010 tcp_csum:0
886 NXT_PACKET_IN (xid=0x0): table_id=253 cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
887 tcp,metadata=0,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=0x010 tcp_csum:0
890 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
891 ovs-appctl revalidator/wait
892 AT_CHECK([ovs-ofctl -OOpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
893 n_packets=6, n_bytes=360, actions=goto_table:1
894 table=2, n_packets=3, n_bytes=180, dl_src=10:11:11:11:11:11 actions=CONTROLLER:65535
895 OFPST_FLOW reply (OF1.2):
901 AT_SETUP([ofproto-dpif - Table Miss - resubmit and OFPTC_TABLE_MISS_CONTINUE])
902 OVS_VSWITCHD_START([dnl
903 add-port br0 p1 -- set Interface p1 type=dummy
905 ON_EXIT([kill `cat ovs-ofctl.pid`])
907 AT_CAPTURE_FILE([ofctl_monitor.log])
908 AT_DATA([flows.txt], [dnl
909 table=0 actions=resubmit(1,1)
910 table=2 dl_src=10:11:11:11:11:11 actions=controller
912 AT_CHECK([ovs-ofctl -OOpenFlow12 add-flows br0 flows.txt])
913 AT_CHECK([ovs-ofctl -OOpenFlow11 mod-table br0 all continue])
915 dnl Hit table 0, Miss table 1, Dropped
916 AT_CHECK([ovs-ofctl monitor br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
919 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)'
921 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
923 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
926 dnl Hit table 1, Dropped
927 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --no-chdir --pidfile 2> ofctl_monitor.log])
930 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)'
932 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
934 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
937 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
938 ovs-appctl revalidator/wait
939 AT_CHECK([ovs-ofctl -OOpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
940 n_packets=6, n_bytes=360, actions=resubmit(1,1)
941 table=2, dl_src=10:11:11:11:11:11 actions=CONTROLLER:65535
942 OFPST_FLOW reply (OF1.2):
948 AT_SETUP([ofproto-dpif - Table Miss - OFPTC_TABLE_MISS_DROP])
949 OVS_VSWITCHD_START([dnl
950 add-port br0 p1 -- set Interface p1 type=dummy
952 ON_EXIT([kill `cat ovs-ofctl.pid`])
954 AT_CAPTURE_FILE([ofctl_monitor.log])
955 AT_CHECK([ovs-ofctl -OOpenFlow11 mod-table br0 all drop])
957 AT_CHECK([ovs-ofctl monitor -P openflow10 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
959 dnl Test that missed packets are droped
961 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)'
963 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
965 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
968 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
969 AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
976 AT_SETUP([ofproto-dpif - Table Miss - goto table and OFPTC_TABLE_MISS_DROP])
977 OVS_VSWITCHD_START([dnl
978 add-port br0 p1 -- set Interface p1 type=dummy
980 ON_EXIT([kill `cat ovs-ofctl.pid`])
982 AT_CAPTURE_FILE([ofctl_monitor.log])
983 AT_CHECK([ovs-ofctl del-flows br0])
984 AT_CHECK([ovs-ofctl -OOpenFlow12 add-flow br0 'table=0 actions=goto_table(1)'])
985 AT_CHECK([ovs-ofctl -OOpenFlow11 mod-table br0 all drop])
987 AT_CHECK([ovs-ofctl monitor -P openflow10 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
989 dnl Test that missed packets are droped
991 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)'
993 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
995 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
998 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
999 ovs-appctl revalidator/wait
1000 AT_CHECK([ovs-ofctl -OOpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
1001 n_packets=3, n_bytes=180, actions=goto_table:1
1002 OFPST_FLOW reply (OF1.2):
1008 AT_SETUP([ofproto-dpif - Table Miss - resubmit and OFPTC_TABLE_MISS_DROP])
1009 OVS_VSWITCHD_START([dnl
1010 add-port br0 p1 -- set Interface p1 type=dummy
1012 ON_EXIT([kill `cat ovs-ofctl.pid`])
1014 AT_CAPTURE_FILE([ofctl_monitor.log])
1015 AT_CHECK([ovs-ofctl del-flows br0])
1016 AT_CHECK([ovs-ofctl -OOpenFlow12 add-flow br0 'table=0 actions=resubmit(1,1)'])
1017 AT_CHECK([ovs-ofctl -OOpenFlow11 mod-table br0 all drop])
1019 AT_CHECK([ovs-ofctl monitor -P openflow10 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1021 dnl Test that missed packets are droped
1023 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)'
1025 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
1027 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1030 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1031 ovs-appctl revalidator/wait
1032 AT_CHECK([ovs-ofctl -OOpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
1033 n_packets=3, n_bytes=180, actions=resubmit(1,1)
1034 OFPST_FLOW reply (OF1.2):
1040 AT_SETUP([ofproto-dpif - controller])
1041 OVS_VSWITCHD_START([dnl
1042 add-port br0 p1 -- set Interface p1 type=dummy
1044 ON_EXIT([kill `cat ovs-ofctl.pid`])
1046 AT_CAPTURE_FILE([ofctl_monitor.log])
1047 AT_DATA([flows.txt], [dnl
1048 cookie=0x0 dl_src=10:11:11:11:11:11 actions=controller
1049 cookie=0x1 dl_src=20:22:22:22:22:22 actions=controller,resubmit(80,1)
1050 cookie=0x2 dl_src=30:33:33:33:33:33 actions=mod_vlan_vid:15,controller
1052 cookie=0x3 table=1 in_port=80 actions=load:1->NXM_NX_REG0[[]],mod_vlan_vid:80,controller,resubmit(81,2)
1053 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)
1054 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)
1055 cookie=0x6 table=4 in_port=83 actions=load:4->NXM_NX_REG3[[]],mod_nw_src:83.83.83.83,controller,resubmit(84,5)
1056 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)
1057 cookie=0x8 table=6 in_port=85 actions=mod_tp_src:85,controller,resubmit(86,7)
1058 cookie=0x9 table=7 in_port=86 actions=mod_tp_dst:86,controller,controller
1059 cookie=0xa dl_src=40:44:44:44:44:41 actions=mod_vlan_vid:99,mod_vlan_pcp:1,controller
1060 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
1062 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
1065 AT_CHECK([ovs-ofctl monitor -P openflow10 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1068 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)'
1070 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1071 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1073 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1074 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
1075 tcp,metadata=0,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=0x010 tcp_csum:0
1077 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
1078 tcp,metadata=0,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=0x010 tcp_csum:0
1080 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
1081 tcp,metadata=0,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=0x010 tcp_csum:0
1084 dnl Singleton controller action.
1085 AT_CHECK([ovs-ofctl monitor -P openflow10 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1088 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)'
1090 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1091 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1093 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1094 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1095 tcp,metadata=0,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=0x002 tcp_csum:0
1097 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1098 tcp,metadata=0,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=0x002 tcp_csum:0
1100 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1101 tcp,metadata=0,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=0x002 tcp_csum:0
1104 dnl Modified controller action.
1105 AT_CHECK([ovs-ofctl monitor -P openflow10 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1108 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)'
1110 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1111 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1113 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1114 OFPT_PACKET_IN (xid=0x0): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1115 tcp,metadata=0,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=0x001 tcp_csum:0
1117 OFPT_PACKET_IN (xid=0x0): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1118 tcp,metadata=0,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=0x001 tcp_csum:0
1120 OFPT_PACKET_IN (xid=0x0): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1121 tcp,metadata=0,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=0x001 tcp_csum:0
1124 dnl Modified VLAN controller action.
1125 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1128 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)'
1130 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1131 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1133 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1134 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1135 ip,metadata=0,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
1137 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1138 ip,metadata=0,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
1140 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1141 ip,metadata=0,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
1145 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1148 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)'
1150 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 18])
1151 ovs-appctl -t ovs-ofctl exit
1153 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1154 NXT_PACKET_IN (xid=0x0): cookie=0x1 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1155 tcp,metadata=0,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=0x001 tcp_csum:0
1157 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x3 total_len=64 in_port=1 reg0=0x1 (via action) data_len=64 (unbuffered)
1158 tcp,metadata=0,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=0x001 tcp_csum:0
1160 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)
1161 tcp,metadata=0,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=0x001 tcp_csum:0
1163 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)
1164 tcp,metadata=0,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=0x001 tcp_csum:0
1166 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)
1167 tcp,metadata=0,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=0x001 tcp_csum:1a03
1169 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)
1170 tcp,metadata=0,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=0x001 tcp_csum:3205
1172 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)
1173 tcp,metadata=0,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=0x001 tcp_csum:31b8
1175 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)
1176 tcp,metadata=0,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=0x001 tcp_csum:316d
1178 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)
1179 tcp,metadata=0,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=0x001 tcp_csum:316d
1183 AT_CHECK([ovs-ofctl monitor br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1186 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'
1188 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 18])
1189 ovs-appctl -t ovs-ofctl exit
1191 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1192 NXT_PACKET_IN (xid=0x0): cookie=0x1 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1193 udp,metadata=0,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
1195 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x3 total_len=64 in_port=1 reg0=0x1 (via action) data_len=64 (unbuffered)
1196 udp,metadata=0,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
1198 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)
1199 udp,metadata=0,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
1201 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)
1202 udp,metadata=0,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
1204 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)
1205 udp,metadata=0,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
1207 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)
1208 udp,metadata=0,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
1210 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)
1211 udp,metadata=0,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
1213 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)
1214 udp,metadata=0,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
1216 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)
1217 udp,metadata=0,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
1220 dnl Modified ARP controller action.
1221 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1224 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)'
1227 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
1228 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1229 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1230 arp,metadata=0,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
1231 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1232 arp,metadata=0,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
1233 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1234 arp,metadata=0,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
1235 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1236 arp,metadata=0,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
1237 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1238 arp,metadata=0,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
1239 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1240 arp,metadata=0,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
1241 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1242 arp,metadata=0,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
1243 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1244 arp,metadata=0,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
1245 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1246 arp,metadata=0,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
1249 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1252 AT_CHECK([ovs-ofctl monitor br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
1255 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'
1258 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 18])
1259 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
1260 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1261 NXT_PACKET_IN (xid=0x0): cookie=0x1 total_len=98 in_port=1 (via action) data_len=98 (unbuffered)
1262 sctp,metadata=0,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
1264 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x3 total_len=102 in_port=1 reg0=0x1 (via action) data_len=102 (unbuffered)
1265 sctp,metadata=0,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
1267 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)
1268 sctp,metadata=0,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
1270 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)
1271 sctp,metadata=0,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
1273 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)
1274 sctp,metadata=0,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
1276 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)
1277 sctp,metadata=0,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
1279 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)
1280 sctp,metadata=0,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:7f12662e
1282 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)
1283 sctp,metadata=0,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:a7e86f67
1285 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)
1286 sctp,metadata=0,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:a7e86f67
1289 AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
1290 cookie=0x1, n_packets=3, n_bytes=218, dl_src=20:22:22:22:22:22 actions=CONTROLLER:65535,resubmit(80,1)
1291 cookie=0x2, n_packets=3, n_bytes=180, dl_src=30:33:33:33:33:33 actions=mod_vlan_vid:15,CONTROLLER:65535
1292 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)
1293 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)
1294 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)
1295 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)
1296 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)
1297 cookie=0x8, table=6, n_packets=3, n_bytes=218, in_port=85 actions=mod_tp_src:85,CONTROLLER:65535,resubmit(86,7)
1298 cookie=0x9, table=7, n_packets=3, n_bytes=218, in_port=86 actions=mod_tp_dst:86,CONTROLLER:65535,CONTROLLER:65535
1299 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
1300 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
1301 n_packets=3, n_bytes=180, dl_src=10:11:11:11:11:11 actions=CONTROLLER:65535
1308 AT_SETUP([ofproto-dpif - MPLS handling])
1309 OVS_VSWITCHD_START([dnl
1310 add-port br0 p1 -- set Interface p1 type=dummy
1312 ON_EXIT([kill `cat ovs-ofctl.pid`])
1314 AT_CAPTURE_FILE([ofctl_monitor.log])
1315 AT_DATA([flows.txt], [dnl
1316 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
1317 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
1318 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
1319 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
1320 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
1321 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
1322 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
1323 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
1324 cookie=0xa mpls,dl_src=40:44:44:44:44:49 actions=push_mpls:0x8848,load:10->OXM_OF_MPLS_LABEL[[]],CONTROLLER:65535
1325 cookie=0xb dl_src=50:55:55:55:55:55 dl_type=0x8847 actions=load:1000->OXM_OF_MPLS_LABEL[[]],controller
1326 cookie=0xd dl_src=60:66:66:66:66:66 actions=pop_mpls:0x0800,controller
1327 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
1329 cookie=0xd dl_src=60:66:66:66:00:01 actions=pop_mpls:0x0800,dec_ttl,controller
1330 cookie=0xd dl_src=60:66:66:66:00:02 actions=pop_mpls:0x0800,load:0xa000001->OXM_OF_IPV4_DST[[]],controller
1331 cookie=0xd dl_src=60:66:66:66:00:03 actions=pop_mpls:0x0800,move:OXM_OF_IPV4_DST[[]]->OXM_OF_IPV4_SRC[[]],controller
1332 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
1333 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
1334 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
1335 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
1337 cookie=0xd dl_src=60:66:66:66:00:08 actions=pop_mpls:0x0806,resubmit(1,1)
1338 cookie=0xd table=1 arp actions=controller
1340 cookie=0xd dl_src=60:66:66:66:00:09 actions=pop_mpls:0x0800,mod_nw_tos:48,controller
1341 cookie=0xd dl_src=60:66:66:66:00:0a actions=pop_mpls:0x0800,mod_nw_dst:10.0.0.1,controller
1342 cookie=0xd dl_src=60:66:66:66:00:0b actions=pop_mpls:0x0800,mod_nw_src:10.0.0.1,controller
1344 cookie=0xd dl_src=60:66:66:66:01:00 actions=pop_mpls:0x8848,controller
1345 cookie=0xd dl_src=60:66:66:66:01:01 actions=pop_mpls:0x8847,dec_mpls_ttl,controller
1346 cookie=0xd dl_src=60:66:66:66:01:02 actions=pop_mpls:0x8848,load:3->OXM_OF_MPLS_TC[[]],controller
1348 cookie=0xd dl_src=60:66:66:66:02:00 actions=pop_mpls:0x8847,pop_mpls:0x0800,controller
1349 cookie=0xd dl_src=60:66:66:66:02:01 actions=pop_mpls:0x8848,pop_mpls:0x0800,dec_ttl,controller
1350 cookie=0xd dl_src=60:66:66:66:02:10 actions=pop_mpls:0x8847,dec_mpls_ttl,pop_mpls:0x0800,dec_ttl,controller
1352 cookie=0xd dl_src=60:66:66:66:03:00 actions=pop_mpls:0x8848,pop_mpls:0x8848,controller
1353 cookie=0xd dl_src=60:66:66:66:03:01 actions=pop_mpls:0x8847,pop_mpls:0x8847,dec_mpls_ttl,controller
1354 cookie=0xd dl_src=60:66:66:66:03:10 actions=pop_mpls:0x8848,dec_mpls_ttl,pop_mpls:0x8848,dec_mpls_ttl,controller
1356 cookie=0xd dl_src=60:66:66:66:04:00 actions=pop_mpls:0x0800,push_mpls:0x8847,controller
1357 cookie=0xd dl_src=60:66:66:66:04:01 actions=pop_mpls:0x0800,push_mpls:0x8848,dec_mpls_ttl,controller
1358 cookie=0xd dl_src=60:66:66:66:04:10 actions=pop_mpls:0x0800,dec_ttl,push_mpls:0x8848,dec_mpls_ttl,controller
1360 cookie=0xd dl_src=60:66:66:66:05:00 actions=push_mpls:0x8848,pop_mpls:0x8847,controller
1361 cookie=0xd dl_src=60:66:66:66:05:01 actions=push_mpls:0x8847,pop_mpls:0x8848,dec_mpls_ttl,controller
1362 cookie=0xd dl_src=60:66:66:66:05:10 actions=push_mpls:0x8848,dec_mpls_ttl,pop_mpls:0x8847,dec_mpls_ttl,controller
1364 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
1366 dnl Modified MPLS controller action.
1367 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1370 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)'
1372 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1373 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1375 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1376 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1377 mpls,metadata=0,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
1379 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1380 mpls,metadata=0,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
1382 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1383 mpls,metadata=0,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
1386 dnl Modified MPLS controller action.
1387 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1390 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)'
1392 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1393 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1395 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1396 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1397 ip,metadata=0,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
1399 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1400 ip,metadata=0,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
1402 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1403 ip,metadata=0,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
1406 dnl Modified MPLS controller action.
1407 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1409 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)
1412 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)'
1414 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1415 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1417 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1418 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1419 mpls,metadata=0,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
1421 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1422 mpls,metadata=0,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
1424 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1425 mpls,metadata=0,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
1428 dnl Modified MPLS controller action.
1429 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1432 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))'
1434 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1435 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1437 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1438 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1439 mpls,metadata=0,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
1441 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1442 mpls,metadata=0,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
1444 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1445 mpls,metadata=0,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
1448 dnl Modified MPLS controller action.
1449 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1452 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)'
1454 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1455 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1457 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1458 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1459 mpls,metadata=0,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
1461 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1462 mpls,metadata=0,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
1464 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1465 mpls,metadata=0,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
1468 dnl Modified MPLS controller action.
1469 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1472 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)'
1474 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1475 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1477 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1478 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1479 mpls,metadata=0,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
1481 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1482 mpls,metadata=0,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
1484 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1485 mpls,metadata=0,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
1488 dnl Modified MPLS controller action.
1489 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1492 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)'
1494 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1495 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1497 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1498 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1499 mpls,metadata=0,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
1501 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1502 mpls,metadata=0,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
1504 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1505 mpls,metadata=0,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
1508 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1510 dnl Modified MPLS controller action.
1511 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1514 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)'
1516 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1517 ovs-appctl -t ovs-ofctl exit
1519 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1520 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1521 mplsm,metadata=0,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
1523 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1524 mplsm,metadata=0,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
1526 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1527 mplsm,metadata=0,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
1530 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1532 dnl Modified MPLS controller action.
1533 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1536 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)'
1538 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1539 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1541 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1542 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1543 mpls,metadata=0,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
1545 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1546 mpls,metadata=0,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
1548 NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1549 mpls,metadata=0,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
1552 dnl Modified MPLS actions.
1553 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1556 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)'
1558 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1559 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1561 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1562 NXT_PACKET_IN (xid=0x0): cookie=0xb total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1563 mpls,metadata=0,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
1565 NXT_PACKET_IN (xid=0x0): cookie=0xb total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1566 mpls,metadata=0,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
1568 NXT_PACKET_IN (xid=0x0): cookie=0xb total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
1569 mpls,metadata=0,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
1572 dnl Modified MPLS ipv6 controller action.
1573 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1576 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)'
1578 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1579 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1581 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1582 NXT_PACKET_IN (xid=0x0): cookie=0xc total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1583 mplsm,metadata=0,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
1585 NXT_PACKET_IN (xid=0x0): cookie=0xc total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1586 mplsm,metadata=0,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
1588 NXT_PACKET_IN (xid=0x0): cookie=0xc total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
1589 mplsm,metadata=0,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
1593 dnl Modified MPLS pop action.
1594 dnl The input is a frame with two MPLS headers which tcpdump -vve shows as:
1595 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)
1596 dnl (tos 0x0, ttl 64, id 0, offset 0, flags [none], proto TCP (6), length 44)
1598 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1601 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'
1604 # 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)'
1606 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1607 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1609 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1610 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1611 tcp,metadata=0,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=0x000 tcp_csum:7744
1613 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1614 tcp,metadata=0,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=0x000 tcp_csum:7744
1616 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1617 tcp,metadata=0,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=0x000 tcp_csum:7744
1620 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1622 dnl Modified MPLS pop action.
1623 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
1624 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)
1625 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
1626 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
1627 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1630 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'
1632 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1633 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1635 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
1636 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1637 tcp,metadata=0,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=0x000 tcp_csum:7744
1639 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1640 tcp,metadata=0,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=0x000 tcp_csum:7744
1642 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1643 tcp,metadata=0,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=0x000 tcp_csum:7744
1646 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1648 dnl Modified MPLS pop action.
1649 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
1650 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)
1651 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
1652 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
1653 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1656 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'
1658 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1659 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1661 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
1662 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1663 tcp,metadata=0,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=0x000 tcp_csum:2dee
1665 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1666 tcp,metadata=0,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=0x000 tcp_csum:2dee
1668 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1669 tcp,metadata=0,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=0x000 tcp_csum:2dee
1672 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1674 dnl Modified MPLS pop action.
1675 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
1676 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)
1677 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
1678 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
1679 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1682 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'
1684 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1685 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1687 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
1688 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1689 tcp,metadata=0,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=0x000 tcp_csum:7743
1691 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1692 tcp,metadata=0,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=0x000 tcp_csum:7743
1694 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1695 tcp,metadata=0,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=0x000 tcp_csum:7743
1698 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1700 dnl Modified MPLS pop action.
1701 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
1702 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)
1703 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
1704 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
1705 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1708 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'
1710 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1711 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1713 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
1714 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1715 tcp,metadata=0,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=0x000 tcp_csum:7743
1717 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1718 tcp,metadata=0,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=0x000 tcp_csum:7743
1720 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1721 tcp,metadata=0,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=0x000 tcp_csum:7743
1724 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1726 dnl Modified MPLS pop action.
1727 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
1728 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)
1729 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
1730 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
1731 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1734 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'
1736 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1737 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1739 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
1740 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1741 tcp,metadata=0,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=0x000 tcp_csum:76db
1743 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1744 tcp,metadata=0,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=0x000 tcp_csum:76db
1746 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1747 tcp,metadata=0,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=0x000 tcp_csum:76db
1750 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1752 dnl Modified MPLS pop action.
1753 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
1754 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)
1755 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
1756 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
1757 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1760 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'
1762 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1763 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1765 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
1766 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1767 tcp,metadata=0,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=0x000 tcp_csum:7745
1769 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1770 tcp,metadata=0,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=0x000 tcp_csum:7745
1772 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1773 tcp,metadata=0,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=0x000 tcp_csum:7745
1776 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1778 dnl Modified MPLS pop action.
1779 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
1780 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)
1781 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
1782 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
1783 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1786 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'
1788 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1789 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1791 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
1792 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1793 tcp,metadata=0,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=0x000 tcp_csum:7744
1795 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1796 tcp,metadata=0,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=0x000 tcp_csum:7744
1798 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1799 tcp,metadata=0,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=0x000 tcp_csum:7744
1802 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1804 dnl Modified MPLS pop action.
1805 dnl The input is an ARP frame with a single MPLS label stack entry which tcpdump -vve shows as:
1806 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)
1807 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1810 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'
1812 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1813 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1815 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
1816 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0xd total_len=56 in_port=1 (via action) data_len=56 (unbuffered)
1817 arp,metadata=0,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
1819 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0xd total_len=56 in_port=1 (via action) data_len=56 (unbuffered)
1820 arp,metadata=0,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
1822 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0xd total_len=56 in_port=1 (via action) data_len=56 (unbuffered)
1823 arp,metadata=0,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
1826 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1828 dnl Modified MPLS pop action.
1829 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
1830 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)
1831 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
1832 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
1833 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1836 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'
1838 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1839 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1841 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
1842 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1843 tcp,metadata=0,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=0x000 tcp_csum:7744
1845 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1846 tcp,metadata=0,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=0x000 tcp_csum:7744
1848 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1849 tcp,metadata=0,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=0x000 tcp_csum:7744
1852 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1854 dnl Modified MPLS pop action.
1855 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
1856 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)
1857 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
1858 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
1859 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1862 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'
1864 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1865 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1867 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
1868 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1869 tcp,metadata=0,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=0x000 tcp_csum:2dee
1871 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1872 tcp,metadata=0,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=0x000 tcp_csum:2dee
1874 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1875 tcp,metadata=0,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=0x000 tcp_csum:2dee
1878 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1880 dnl Modified MPLS pop action.
1881 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
1882 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)
1883 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
1884 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
1885 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1888 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'
1890 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1891 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1893 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
1894 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1895 tcp,metadata=0,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=0x000 tcp_csum:2ded
1897 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1898 tcp,metadata=0,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=0x000 tcp_csum:2ded
1900 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
1901 tcp,metadata=0,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=0x000 tcp_csum:2ded
1904 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1906 dnl Modified MPLS pop action.
1907 dnl The input is a frame with two MPLS label stack entries which tcpdump -vve shows as:
1908 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)
1909 dnl (label 20, exp 0, [S], ttl 31)
1910 dnl (tos 0x0, ttl 254, id 0, offset 0, flags [none], proto TCP (6), length 44)
1911 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
1912 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1915 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'
1917 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1918 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1920 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1921 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
1922 mplsm,metadata=0,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
1924 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
1925 mplsm,metadata=0,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
1927 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
1928 mplsm,metadata=0,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
1931 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1933 dnl Modified MPLS pop action.
1934 dnl The input is a frame with two MPLS label stack entries which tcpdump -vve shows as:
1935 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)
1936 dnl (label 20, exp 0, [S], ttl 31)
1937 dnl (tos 0x0, ttl 254, id 0, offset 0, flags [none], proto TCP (6), length 44)
1938 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
1939 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1942 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'
1944 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1945 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1947 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1948 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
1949 mpls,metadata=0,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
1951 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
1952 mpls,metadata=0,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
1954 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
1955 mpls,metadata=0,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
1958 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1960 dnl Modified MPLS pop action.
1961 dnl The input is a frame with two MPLS label stack entries which tcpdump -vve shows as:
1962 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)
1963 dnl (label 20, exp 0, [S], ttl 31)
1964 dnl (tos 0x0, ttl 254, id 0, offset 0, flags [none], proto TCP (6), length 44)
1965 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
1966 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1969 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'
1971 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1972 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
1974 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
1975 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
1976 mplsm,metadata=0,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
1978 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
1979 mplsm,metadata=0,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
1981 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
1982 mplsm,metadata=0,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
1985 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
1987 dnl Modified MPLS pop action.
1988 dnl The input is a frame with two MPLS label stack entries which tcpdump -vve shows as:
1989 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)
1990 dnl (label 20, exp 0, [S], ttl 31)
1991 dnl (tos 0x0, ttl 254, id 0, offset 0, flags [none], proto TCP (6), length 44)
1992 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
1993 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
1996 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'
1998 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
1999 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2001 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2002 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2003 tcp,metadata=0,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=0x000 tcp_csum:7744
2005 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2006 tcp,metadata=0,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=0x000 tcp_csum:7744
2008 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2009 tcp,metadata=0,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=0x000 tcp_csum:7744
2012 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2014 dnl Modified MPLS pop action.
2015 dnl The input is a frame with two MPLS label stack entries which tcpdump -vve shows as:
2016 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)
2017 dnl (label 20, exp 0, [S], ttl 31)
2018 dnl (tos 0x0, ttl 254, id 0, offset 0, flags [none], proto TCP (6), length 44)
2019 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
2020 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2023 ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 60 66 66 66 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'
2025 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2026 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2028 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
2029 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2030 tcp,metadata=0,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=0x000 tcp_csum:7744
2032 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2033 tcp,metadata=0,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=0x000 tcp_csum:7744
2035 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2036 tcp,metadata=0,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=0x000 tcp_csum:7744
2039 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2041 dnl Modified MPLS pop action.
2042 dnl The input is a frame with two MPLS label stack entries which tcpdump -vve shows as:
2043 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)
2044 dnl (label 20, exp 0, [S], ttl 31)
2045 dnl (tos 0x0, ttl 254, id 0, offset 0, flags [none], proto TCP (6), length 44)
2046 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
2047 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2050 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'
2052 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2053 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2055 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
2056 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2057 tcp,metadata=0,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=0x000 tcp_csum:7744
2059 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2060 tcp,metadata=0,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=0x000 tcp_csum:7744
2062 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2063 tcp,metadata=0,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=0x000 tcp_csum:7744
2066 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2068 dnl Modified MPLS pop action.
2069 dnl The input is a frame with three MPLS label stack entries which tcpdump -vve shows as:
2070 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)
2071 dnl (label 20, exp 0, ttl 31)
2072 dnl (label 20, exp 0, [S], ttl 30)
2073 dnl (tos 0x0, ttl 254, id 0, offset 0, flags [none], proto TCP (6), length 44)
2074 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
2075 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2078 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'
2080 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2081 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2083 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2084 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2085 mplsm,metadata=0,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
2087 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2088 mplsm,metadata=0,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
2090 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2091 mplsm,metadata=0,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
2094 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2096 dnl Modified MPLS pop action.
2097 dnl The input is a frame with three MPLS label stack entries which tcpdump -vve shows as:
2098 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)
2099 dnl (label 20, exp 0, ttl 31)
2100 dnl (label 20, exp 0, [S], ttl 30)
2101 dnl (tos 0x0, ttl 254, id 0, offset 0, flags [none], proto TCP (6), length 44)
2102 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
2103 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2106 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'
2108 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2109 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2111 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2112 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2113 mpls,metadata=0,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
2115 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2116 mpls,metadata=0,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
2118 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2119 mpls,metadata=0,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
2122 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2124 dnl Modified MPLS pop action.
2125 dnl The input is a frame with three MPLS label stack entries which tcpdump -vve shows as:
2126 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)
2127 dnl (label 20, exp 0, ttl 31)
2128 dnl (label 20, exp 0, [S], ttl 30)
2129 dnl (tos 0x0, ttl 254, id 0, offset 0, flags [none], proto TCP (6), length 44)
2130 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
2131 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2134 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'
2136 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2137 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2139 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2140 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2141 mplsm,metadata=0,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
2143 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2144 mplsm,metadata=0,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
2146 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2147 mplsm,metadata=0,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
2150 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2152 dnl Modified MPLS pop action.
2153 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
2154 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)
2155 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
2156 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
2157 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2160 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'
2162 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2163 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2165 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
2166 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2167 mpls,metadata=0,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
2169 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2170 mpls,metadata=0,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
2172 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2173 mpls,metadata=0,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
2176 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2178 dnl Modified MPLS pop action.
2179 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
2180 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)
2181 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
2182 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
2183 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2186 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'
2188 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2189 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2191 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
2192 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2193 mplsm,metadata=0,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
2195 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2196 mplsm,metadata=0,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
2198 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2199 mplsm,metadata=0,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
2202 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2204 dnl Modified MPLS pop action.
2205 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
2206 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)
2207 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
2208 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
2209 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2212 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'
2214 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2215 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2217 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
2218 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2219 mplsm,metadata=0,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
2221 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2222 mplsm,metadata=0,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
2224 NXT_PACKET_IN (xid=0x0): table_id=254 cookie=0x0 total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2225 mplsm,metadata=0,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
2228 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2230 dnl Modified MPLS pop action.
2231 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
2232 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)
2233 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
2234 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
2235 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2238 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'
2240 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2241 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2243 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2244 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2245 mpls,metadata=0,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
2247 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2248 mpls,metadata=0,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
2250 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2251 mpls,metadata=0,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
2254 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2256 dnl Modified MPLS pop action.
2257 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
2258 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)
2259 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
2260 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
2261 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2264 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'
2266 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2267 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2269 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2270 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2271 mplsm,metadata=0,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
2273 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2274 mplsm,metadata=0,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
2276 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2277 mplsm,metadata=0,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
2280 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2282 dnl Modified MPLS pop action.
2283 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
2284 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)
2285 dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
2286 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
2287 AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2290 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'
2292 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2293 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2295 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2296 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2297 mpls,metadata=0,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
2299 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2300 mpls,metadata=0,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
2302 NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered)
2303 mpls,metadata=0,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
2306 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2308 AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
2309 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
2310 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
2311 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
2312 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
2313 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
2314 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
2315 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
2316 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
2317 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
2318 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
2319 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
2320 cookie=0xd, n_packets=3, n_bytes=180, dl_src=60:66:66:66:00:08 actions=pop_mpls:0x0806,resubmit(1,1)
2321 cookie=0xd, n_packets=3, n_bytes=186, dl_src=60:66:66:66:00:01 actions=pop_mpls:0x0800,dec_ttl(0),CONTROLLER:65535
2322 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
2323 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
2324 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
2325 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
2326 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
2327 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
2328 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
2329 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
2330 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
2331 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
2332 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
2333 cookie=0xd, n_packets=3, n_bytes=186, dl_src=60:66:66:66:04:10 actions=pop_mpls:0x0800,dec_ttl(0),push_mpls:0x8848,dec_mpls_ttl,CONTROLLER:65535
2334 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
2335 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
2336 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
2337 cookie=0xd, n_packets=3, n_bytes=186, dl_src=60:66:66:66:66:66 actions=pop_mpls:0x0800,CONTROLLER:65535
2338 cookie=0xd, n_packets=3, n_bytes=198, dl_src=60:66:66:66:01:00 actions=pop_mpls:0x8848,CONTROLLER:65535
2339 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
2340 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
2341 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
2342 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(0),CONTROLLER:65535
2343 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(0),CONTROLLER:65535
2344 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
2345 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
2346 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
2347 cookie=0xd, table=1, n_packets=3, n_bytes=168, arp actions=CONTROLLER:65535
2354 AT_SETUP([ofproto-dpif - MPLS handling with goto_table])
2355 OVS_VSWITCHD_START([dnl
2356 add-port br0 p1 -- set Interface p1 type=dummy
2358 ON_EXIT([kill `cat ovs-ofctl.pid`])
2360 AT_CAPTURE_FILE([ofctl_monitor.log])
2361 AT_DATA([flows.txt], [dnl
2362 table=0 mplsm actions=pop_mpls:0x800,goto_table(1)
2363 table=1 ip,ip_dscp=8 actions=controller
2365 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flows br0 flows.txt])
2368 dnl Modified MPLS pop action.
2369 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
2370 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)
2371 dnl (tos 0x20, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
2372 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
2373 AT_CHECK([ovs-ofctl -O OpenFlow12 monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2376 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'
2378 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2379 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2381 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
2382 OFPT_PACKET_IN (OF1.2) (xid=0x0): table_id=1 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2383 tcp,metadata=0,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=0x000 tcp_csum:7744
2385 OFPT_PACKET_IN (OF1.2) (xid=0x0): table_id=1 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2386 tcp,metadata=0,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=0x000 tcp_csum:7744
2388 OFPT_PACKET_IN (OF1.2) (xid=0x0): table_id=1 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2389 tcp,metadata=0,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=0x000 tcp_csum:7744
2392 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2394 AT_CHECK([ovs-ofctl -O OpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
2395 n_packets=3, n_bytes=186, mplsm actions=pop_mpls:0x0800,goto_table:1
2396 table=1, n_packets=3, n_bytes=174, ip,nw_tos=32 actions=CONTROLLER:65535
2397 OFPST_FLOW reply (OF1.2):
2403 AT_SETUP([ofproto-dpif - MPLS handling with write_actions])
2404 OVS_VSWITCHD_START([dnl
2405 add-port br0 p1 -- set Interface p1 type=dummy
2407 ON_EXIT([kill `cat ovs-ofctl.pid`])
2409 dnl N.B: The first (and only) action that accesses L3 data after the
2410 dnl pop_mpls action is present in write_actions. This exercises recirculation
2411 dnl triggered in write_actions due to a previous action not in write actions.
2412 AT_CAPTURE_FILE([ofctl_monitor.log])
2413 AT_DATA([flows.txt], [dnl
2414 mplsm actions=pop_mpls:0x800,write_actions(dec_ttl,controller)
2416 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flows br0 flows.txt])
2418 dnl Modified MPLS pop action.
2419 dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as:
2420 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)
2421 dnl (tos 0x20, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44)
2422 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4
2423 AT_CHECK([ovs-ofctl -O OpenFlow12 monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
2426 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'
2428 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2429 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2431 AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl
2432 OFPT_PACKET_IN (OF1.2) (xid=0x0): table_id=254 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2433 tcp,metadata=0,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=0x000 tcp_csum:7744
2435 OFPT_PACKET_IN (OF1.2) (xid=0x0): table_id=254 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2436 tcp,metadata=0,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=0x000 tcp_csum:7744
2438 OFPT_PACKET_IN (OF1.2) (xid=0x0): table_id=254 total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
2439 tcp,metadata=0,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=0x000 tcp_csum:7744
2442 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2444 AT_CHECK([ovs-ofctl -O OpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
2445 n_packets=3, n_bytes=186, mplsm actions=pop_mpls:0x0800,write_actions(dec_ttl,CONTROLLER:65535)
2446 OFPST_FLOW reply (OF1.2):
2452 AT_SETUP([ofproto-dpif - table-miss flow (OpenFlow 1.0)])
2453 OVS_VSWITCHD_START([dnl
2454 add-port br0 p1 -- set Interface p1 type=dummy
2456 ON_EXIT([kill `cat ovs-ofctl.pid`])
2458 AT_CAPTURE_FILE([ofctl_monitor.log])
2459 # A table-miss flow has priority 0 and no match
2460 AT_CHECK([ovs-ofctl --protocols=OpenFlow10 add-flow br0 'priority=0 actions=output:CONTROLLER'])
2462 dnl Singleton controller action.
2463 AT_CHECK([ovs-ofctl monitor -P openflow10 --protocols=OpenFlow10 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
2466 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)'
2468 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2469 ovs-appctl -t ovs-ofctl exit
2471 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2472 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
2473 tcp,metadata=0,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=0x002 tcp_csum:0
2475 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
2476 tcp,metadata=0,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=0x002 tcp_csum:0
2478 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
2479 tcp,metadata=0,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=0x002 tcp_csum:0
2482 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2484 AT_CHECK([ovs-ofctl --protocols=OpenFlow10 dump-flows br0 | ofctl_strip | sort], [0], [dnl
2485 n_packets=3, n_bytes=180, priority=0 actions=CONTROLLER:65535
2493 AT_SETUP([ofproto-dpif - table-miss flow (OpenFlow 1.3)])
2494 OVS_VSWITCHD_START([dnl
2495 add-port br0 p1 -- set Interface p1 type=dummy
2497 ON_EXIT([kill `cat ovs-ofctl.pid`])
2499 AT_CAPTURE_FILE([ofctl_monitor.log])
2500 # A table-miss flow has priority 0 and no match
2501 AT_CHECK([ovs-ofctl --protocols=OpenFlow13 add-flow br0 'priority=0 actions=output:CONTROLLER'])
2503 dnl Singleton controller action.
2504 AT_CHECK([ovs-ofctl monitor -P openflow10 --protocols=OpenFlow13 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
2507 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)'
2509 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
2510 ovs-appctl -t ovs-ofctl exit
2512 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2514 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
2515 OFPT_PACKET_IN (OF1.3) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
2516 tcp,metadata=0,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=0x002 tcp_csum:0
2518 OFPT_PACKET_IN (OF1.3) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
2519 tcp,metadata=0,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=0x002 tcp_csum:0
2521 OFPT_PACKET_IN (OF1.3) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered)
2522 tcp,metadata=0,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=0x002 tcp_csum:0
2525 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2527 AT_CHECK([ovs-ofctl --protocols=OpenFlow13 dump-flows br0 | ofctl_strip | sort], [0], [dnl
2528 n_packets=3, n_bytes=180, priority=0 actions=CONTROLLER:65535
2529 OFPST_FLOW reply (OF1.3):
2535 AT_SETUP([ofproto-dpif - ARP modification slow-path])
2537 ADD_OF_PORTS([br0], [1], [2])
2539 ovs-vsctl -- set Interface p2 type=dummy options:pcap=p2.pcap
2540 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'
2542 # Input some packets that should follow the arp modification slow-path.
2544 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)'
2546 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
2548 # Check the packets that were output.
2549 AT_CHECK([ovs-ofctl parse-pcap p2.pcap], [0], [dnl
2550 arp,metadata=0,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
2551 arp,metadata=0,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
2552 arp,metadata=0,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
2553 arp,metadata=0,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
2554 arp,metadata=0,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
2555 arp,metadata=0,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
2556 arp,metadata=0,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
2557 arp,metadata=0,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
2558 arp,metadata=0,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
2564 AT_SETUP([ofproto-dpif - VLAN handling])
2566 [set Bridge br0 fail-mode=standalone -- \
2567 add-port br0 p1 trunks=10,12 -- \
2568 add-port br0 p2 tag=10 -- \
2569 add-port br0 p3 tag=12 \
2570 other-config:priority-tags=true -- \
2571 add-port br0 p4 tag=12 -- \
2572 add-port br0 p5 vlan_mode=native-tagged tag=10 -- \
2573 add-port br0 p6 vlan_mode=native-tagged tag=10 trunks=10,12 -- \
2574 add-port br0 p7 vlan_mode=native-untagged tag=12 -- \
2575 add-port br0 p8 vlan_mode=native-untagged tag=12 trunks=10,12 \
2576 other-config:priority-tags=true -- \
2577 set Interface p1 type=dummy -- \
2578 set Interface p2 type=dummy -- \
2579 set Interface p3 type=dummy -- \
2580 set Interface p4 type=dummy -- \
2581 set Interface p5 type=dummy -- \
2582 set Interface p6 type=dummy -- \
2583 set Interface p7 type=dummy -- \
2584 set Interface p8 type=dummy --])
2586 dnl Each of these specifies an in_port by number, a VLAN VID (or "none"),
2587 dnl a VLAN PCP (used if the VID isn't "none") and the expected set of datapath
2593 "100 10 0 1,5,6,7,8,pop_vlan,2" \
2594 "100 10 1 1,5,6,7,8,pop_vlan,2" \
2597 "100 12 0 1,5,6,pop_vlan,3,4,7,8" \
2598 "100 12 1 1,5,6,pop_vlan,4,7,push_vlan(vid=0,pcp=1),3,8" \
2602 "1 10 0 5,6,7,8,100,pop_vlan,2" \
2603 "1 10 1 5,6,7,8,100,pop_vlan,2" \
2606 "1 12 0 5,6,100,pop_vlan,3,4,7,8" \
2607 "1 12 1 5,6,100,pop_vlan,4,7,push_vlan(vid=0,pcp=1),3,8" \
2608 "2 none 0 push_vlan(vid=10,pcp=0),1,5,6,7,8,100" \
2609 "2 0 0 pop_vlan,push_vlan(vid=10,pcp=0),1,5,6,7,8,100" \
2610 "2 0 1 pop_vlan,push_vlan(vid=10,pcp=1),1,5,6,7,8,100" \
2617 "3 none 0 4,7,8,push_vlan(vid=12,pcp=0),1,5,6,100" \
2618 "3 0 0 pop_vlan,4,7,8,push_vlan(vid=12,pcp=0),1,5,6,100" \
2619 "3 0 1 8,pop_vlan,4,7,push_vlan(vid=12,pcp=1),1,5,6,100" \
2626 "4 none 0 3,7,8,push_vlan(vid=12,pcp=0),1,5,6,100" \
2627 "4 0 0 pop_vlan,3,7,8,push_vlan(vid=12,pcp=0),1,5,6,100" \
2628 "4 0 1 3,8,pop_vlan,7,push_vlan(vid=12,pcp=1),1,5,6,100" \
2635 "5 none 0 2,push_vlan(vid=10,pcp=0),1,6,7,8,100" \
2636 "5 0 0 pop_vlan,2,push_vlan(vid=10,pcp=0),1,6,7,8,100" \
2637 "5 0 1 pop_vlan,2,push_vlan(vid=10,pcp=1),1,6,7,8,100" \
2638 "5 10 0 1,6,7,8,100,pop_vlan,2" \
2639 "5 10 1 1,6,7,8,100,pop_vlan,2" \
2642 "5 12 0 1,6,100,pop_vlan,3,4,7,8" \
2643 "5 12 1 1,6,100,pop_vlan,4,7,push_vlan(vid=0,pcp=1),3,8" \
2644 "6 none 0 2,push_vlan(vid=10,pcp=0),1,5,7,8,100" \
2645 "6 0 0 pop_vlan,2,push_vlan(vid=10,pcp=0),1,5,7,8,100" \
2646 "6 0 1 pop_vlan,2,push_vlan(vid=10,pcp=1),1,5,7,8,100" \
2647 "6 10 0 1,5,7,8,100,pop_vlan,2" \
2648 "6 10 1 1,5,7,8,100,pop_vlan,2" \
2651 "6 12 0 1,5,100,pop_vlan,3,4,7,8" \
2652 "6 12 1 1,5,100,pop_vlan,4,7,push_vlan(vid=0,pcp=1),3,8" \
2653 "7 none 0 3,4,8,push_vlan(vid=12,pcp=0),1,5,6,100" \
2654 "7 0 0 pop_vlan,3,4,8,push_vlan(vid=12,pcp=0),1,5,6,100" \
2655 "7 0 1 3,8,pop_vlan,4,push_vlan(vid=12,pcp=1),1,5,6,100" \
2656 "7 10 0 1,5,6,8,100,pop_vlan,2" \
2657 "7 10 1 1,5,6,8,100,pop_vlan,2" \
2660 "7 12 0 1,5,6,100,pop_vlan,3,4,8" \
2661 "7 12 1 1,5,6,100,pop_vlan,4,push_vlan(vid=0,pcp=1),3,8" \
2662 "8 none 0 3,4,7,push_vlan(vid=12,pcp=0),1,5,6,100" \
2663 "8 0 0 pop_vlan,3,4,7,push_vlan(vid=12,pcp=0),1,5,6,100" \
2664 "8 0 1 3,pop_vlan,4,7,push_vlan(vid=12,pcp=1),1,5,6,100" \
2665 "8 10 0 1,5,6,7,100,pop_vlan,2" \
2666 "8 10 1 1,5,6,7,100,pop_vlan,2" \
2669 "8 12 0 1,5,6,100,pop_vlan,3,4,7" \
2670 "8 12 1 1,5,6,100,pop_vlan,4,7,push_vlan(vid=0,pcp=1),3"
2678 if test $vlan = none; then
2679 flow="in_port($in_port),eth(src=50:54:00:00:00:01,dst=ff:ff:ff:ff:ff:ff),eth_type(0xabcd)"
2681 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))"
2684 echo "----------------------------------------------------------------------"
2685 echo "in_port=$in_port vlan=$vlan pcp=$pcp"
2687 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
2688 actual=`tail -1 stdout | sed 's/Datapath actions: //'`
2690 AT_CHECK([ovs-dpctl normalize-actions "$flow" "$expected"], [0], [stdout])
2692 AT_CHECK([ovs-dpctl normalize-actions "$flow" "$actual"], [0], [expout])
2698 AT_SETUP([ofproto-dpif - MPLS handling])
2699 OVS_VSWITCHD_START([dnl
2700 add-port br0 p1 -- set Interface p1 type=dummy
2702 ON_EXIT([kill `cat ovs-ofctl.pid`])
2704 AT_CAPTURE_FILE([ofctl_monitor.log])
2705 AT_DATA([flows.txt], [dnl
2706 dl_src=40:44:44:44:00:00 actions=push_mpls:0x8847,controller
2707 dl_src=40:44:44:44:00:01,mpls actions=push_mpls:0x8847,controller
2708 dl_src=40:44:44:44:00:02,mpls actions=push_mpls:0x8848,controller
2710 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 add-flows br0 flows.txt])
2712 dnl In this test, we push an MPLS tag to an ethernet packet.
2713 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
2716 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)'
2718 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
2719 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2721 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
2722 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
2723 mpls,metadata=0,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
2724 00000000 50 54 00 00 00 07 40 44-44 44 00 00 88 47 00 00
2725 00000010 01 40 45 00 00 28 00 00-00 00 40 06 f9 7c c0 a8
2726 00000020 00 01 c0 a8 00 02 00 00-00 00 00 00 00 00 00 00
2727 00000030 00 00 50 00 00 00 00 00-00 00 00 00 00 00 00 00
2729 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
2730 mpls,metadata=0,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
2731 00000000 50 54 00 00 00 07 40 44-44 44 00 00 88 47 00 00
2732 00000010 01 40 45 00 00 28 00 00-00 00 40 06 f9 7c c0 a8
2733 00000020 00 01 c0 a8 00 02 00 00-00 00 00 00 00 00 00 00
2734 00000030 00 00 50 00 00 00 00 00-00 00 00 00 00 00 00 00
2736 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
2737 mpls,metadata=0,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
2738 00000000 50 54 00 00 00 07 40 44-44 44 00 00 88 47 00 00
2739 00000010 01 40 45 00 00 28 00 00-00 00 40 06 f9 7c c0 a8
2740 00000020 00 01 c0 a8 00 02 00 00-00 00 00 00 00 00 00 00
2741 00000030 00 00 50 00 00 00 00 00-00 00 00 00 00 00 00 00
2744 dnl In this test, we push an MPLS tag to an MPLS packet. The LSE should be
2745 dnl copied exactly, except for the BOS bit.
2746 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
2749 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)'
2751 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
2752 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2754 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
2755 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
2756 mpls,metadata=0,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
2757 00000000 50 54 00 00 00 07 40 44-44 44 00 01 88 47 00 00
2758 00000010 a0 40 00 00 a1 40 00 00-00 00 00 00 00 00 00 00
2759 00000020 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
2760 00000030 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
2762 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
2763 mpls,metadata=0,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
2764 00000000 50 54 00 00 00 07 40 44-44 44 00 01 88 47 00 00
2765 00000010 a0 40 00 00 a1 40 00 00-00 00 00 00 00 00 00 00
2766 00000020 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
2767 00000030 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
2769 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
2770 mpls,metadata=0,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
2771 00000000 50 54 00 00 00 07 40 44-44 44 00 01 88 47 00 00
2772 00000010 a0 40 00 00 a1 40 00 00-00 00 00 00 00 00 00 00
2773 00000020 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
2774 00000030 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
2777 dnl In this test, we push an MPLS tag to an MPLS packet. The LSE should be
2778 dnl copied exactly, except for the BOS bit. The ethertype should be updated
2779 dnl to the MPLS ethertype of the MPLS push action which differs to that
2780 dnl of the input packet.
2781 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
2784 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)'
2786 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
2787 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
2789 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
2790 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
2791 mplsm,metadata=0,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
2792 00000000 50 54 00 00 00 07 40 44-44 44 00 02 88 48 00 00
2793 00000010 a0 40 00 00 a1 40 00 00-00 00 00 00 00 00 00 00
2794 00000020 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
2795 00000030 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
2797 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
2798 mplsm,metadata=0,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
2799 00000000 50 54 00 00 00 07 40 44-44 44 00 02 88 48 00 00
2800 00000010 a0 40 00 00 a1 40 00 00-00 00 00 00 00 00 00 00
2801 00000020 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
2802 00000030 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
2804 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
2805 mplsm,metadata=0,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
2806 00000000 50 54 00 00 00 07 40 44-44 44 00 02 88 48 00 00
2807 00000010 a0 40 00 00 a1 40 00 00-00 00 00 00 00 00 00 00
2808 00000020 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
2809 00000030 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
2815 AT_SETUP([ofproto-dpif - VLAN+MPLS handling])
2816 OVS_VSWITCHD_START([dnl
2817 add-port br0 p1 -- set Interface p1 type=dummy
2819 ON_EXIT([kill `cat ovs-ofctl.pid`])
2821 AT_CAPTURE_FILE([ofctl_monitor.log])
2822 AT_DATA([flows.txt], [dnl
2823 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
2824 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
2825 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
2826 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
2827 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
2828 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
2829 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
2830 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
2831 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
2832 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
2834 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 add-flows br0 flows.txt])
2836 dnl Modified MPLS controller action.
2837 dnl In this test, we push the MPLS tag before pushing a VLAN tag, so we see
2838 dnl both of these in the final flow
2839 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
2842 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)'
2844 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
2845 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2847 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
2848 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
2849 mpls,metadata=0,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
2850 00000000 50 54 00 00 00 07 40 44-44 44 54 50 81 00 20 63
2851 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
2852 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
2853 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
2854 00000040 00 00 00 00
2856 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
2857 mpls,metadata=0,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
2858 00000000 50 54 00 00 00 07 40 44-44 44 54 50 81 00 20 63
2859 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
2860 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
2861 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
2862 00000040 00 00 00 00
2864 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
2865 mpls,metadata=0,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
2866 00000000 50 54 00 00 00 07 40 44-44 44 54 50 81 00 20 63
2867 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
2868 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
2869 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
2870 00000040 00 00 00 00
2873 dnl Modified MPLS controller action.
2874 dnl In this test, the input packet in vlan-tagged, which should be stripped
2875 dnl before we push the MPLS and VLAN tags.
2876 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
2879 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))'
2881 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
2882 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2884 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
2885 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
2886 mpls,metadata=0,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
2887 00000000 50 54 00 00 00 07 40 44-44 44 54 51 81 00 20 63
2888 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
2889 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
2890 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
2892 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
2893 mpls,metadata=0,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
2894 00000000 50 54 00 00 00 07 40 44-44 44 54 51 81 00 20 63
2895 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
2896 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
2897 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
2899 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
2900 mpls,metadata=0,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
2901 00000000 50 54 00 00 00 07 40 44-44 44 54 51 81 00 20 63
2902 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
2903 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
2904 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
2907 dnl Modified MPLS controller action.
2908 dnl In this test, we push the MPLS tag before pushing a VLAN tag, so we see
2909 dnl both of these in the final flow
2910 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
2913 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)'
2915 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
2916 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2918 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
2919 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
2920 mpls,metadata=0,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
2921 00000000 52 54 00 00 00 07 40 44-44 44 54 52 81 00 20 63
2922 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
2923 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
2924 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
2925 00000040 00 00 00 00
2927 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
2928 mpls,metadata=0,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
2929 00000000 52 54 00 00 00 07 40 44-44 44 54 52 81 00 20 63
2930 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
2931 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
2932 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
2933 00000040 00 00 00 00
2935 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
2936 mpls,metadata=0,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
2937 00000000 52 54 00 00 00 07 40 44-44 44 54 52 81 00 20 63
2938 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
2939 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
2940 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
2941 00000040 00 00 00 00
2944 dnl Modified MPLS controller action.
2945 dnl In this test, the input packet in vlan-tagged, which should be stripped
2946 dnl before we push the MPLS and VLAN tags.
2947 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
2950 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))'
2952 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
2953 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2955 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
2956 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
2957 mpls,metadata=0,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
2958 00000000 50 54 00 00 00 07 40 44-44 44 54 53 81 00 20 63
2959 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
2960 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
2961 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
2963 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
2964 mpls,metadata=0,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
2965 00000000 50 54 00 00 00 07 40 44-44 44 54 53 81 00 20 63
2966 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
2967 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
2968 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
2970 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
2971 mpls,metadata=0,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
2972 00000000 50 54 00 00 00 07 40 44-44 44 54 53 81 00 20 63
2973 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
2974 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
2975 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
2978 dnl Modified MPLS controller action.
2979 dnl In this test, we push the VLAN tag before pushing a MPLS tag, but these
2980 dnl actions are reordered, so we see both of these in the final flow.
2981 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
2984 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)'
2986 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
2987 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
2989 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
2990 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
2991 mpls,metadata=0,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
2992 00000000 50 54 00 00 00 07 40 44-44 44 54 54 81 00 20 63
2993 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
2994 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
2995 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
2996 00000040 00 00 00 00
2998 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
2999 mpls,metadata=0,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
3000 00000000 50 54 00 00 00 07 40 44-44 44 54 54 81 00 20 63
3001 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3002 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3003 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3004 00000040 00 00 00 00
3006 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3007 mpls,metadata=0,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
3008 00000000 50 54 00 00 00 07 40 44-44 44 54 54 81 00 20 63
3009 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3010 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3011 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3012 00000040 00 00 00 00
3015 dnl Modified MPLS controller action.
3016 dnl In this test, the input packet in vlan-tagged, which should be stripped
3017 dnl before we push the MPLS and VLAN tags.
3018 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
3021 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))'
3023 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3024 OVS_APP_EXIT_AND_WAIT([ovs-ofctl])
3026 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
3027 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3028 mpls,metadata=0,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
3029 00000000 50 54 00 00 00 07 40 44-44 44 54 55 81 00 20 63
3030 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3031 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3032 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3034 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3035 mpls,metadata=0,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
3036 00000000 50 54 00 00 00 07 40 44-44 44 54 55 81 00 20 63
3037 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3038 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3039 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3041 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3042 mpls,metadata=0,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
3043 00000000 50 54 00 00 00 07 40 44-44 44 54 55 81 00 20 63
3044 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3045 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3046 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3049 dnl Modified MPLS controller action.
3050 dnl In this test, we push the VLAN tag before pushing a MPLS tag, but these
3051 dnl actions are reordered, so we see both of these in the final flow.
3052 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
3055 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)'
3057 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3058 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
3060 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
3061 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3062 mpls,metadata=0,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
3063 00000000 50 54 00 00 00 07 40 44-44 44 54 56 81 00 20 63
3064 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3065 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3066 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3067 00000040 00 00 00 00
3069 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3070 mpls,metadata=0,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
3071 00000000 50 54 00 00 00 07 40 44-44 44 54 56 81 00 20 63
3072 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3073 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3074 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3075 00000040 00 00 00 00
3077 OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered)
3078 mpls,metadata=0,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
3079 00000000 50 54 00 00 00 07 40 44-44 44 54 56 81 00 20 63
3080 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3081 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3082 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3083 00000040 00 00 00 00
3086 dnl Modified MPLS controller action.
3087 dnl In this test, the input packet in vlan-tagged, which should be stripped
3088 dnl before we push the MPLS and VLAN tags.
3089 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 -m 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log])
3092 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))'
3094 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3095 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
3097 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
3098 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3099 mpls,metadata=0,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
3100 00000000 50 54 00 00 00 07 40 44-44 44 54 57 81 00 20 63
3101 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3102 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3103 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3105 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3106 mpls,metadata=0,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
3107 00000000 50 54 00 00 00 07 40 44-44 44 54 57 81 00 20 63
3108 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3109 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3110 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3112 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3113 mpls,metadata=0,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
3114 00000000 50 54 00 00 00 07 40 44-44 44 54 57 81 00 20 63
3115 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3116 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3117 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3120 dnl Modified MPLS controller action.
3121 dnl In this test, the input packet in vlan-tagged, which should be stripped
3122 dnl before we push the MPLS and VLAN tags.
3123 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
3126 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))'
3128 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3129 OVS_APP_EXIT_AND_WAIT(ovs-ofctl)
3131 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
3132 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3133 mpls,metadata=0,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
3134 00000000 50 54 00 00 00 07 40 44-44 44 54 58 81 00 20 63
3135 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3136 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3137 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3139 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3140 mpls,metadata=0,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
3141 00000000 50 54 00 00 00 07 40 44-44 44 54 58 81 00 20 63
3142 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3143 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3144 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3146 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3147 mpls,metadata=0,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
3148 00000000 50 54 00 00 00 07 40 44-44 44 54 58 81 00 20 63
3149 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3150 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3151 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3154 dnl Modified MPLS controller action.
3155 dnl In this test, the input packet in vlan-tagged, which should be modified
3156 dnl before we push MPLS and VLAN tags.
3157 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log])
3160 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))'
3162 OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3])
3163 ovs-appctl -t ovs-ofctl exit
3165 AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl
3166 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3167 mpls,metadata=0,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
3168 00000000 50 54 00 00 00 07 40 44-44 44 54 59 81 00 20 63
3169 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3170 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3171 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3173 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3174 mpls,metadata=0,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
3175 00000000 50 54 00 00 00 07 40 44-44 44 54 59 81 00 20 63
3176 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3177 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3178 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3180 OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered)
3181 mpls,metadata=0,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
3182 00000000 50 54 00 00 00 07 40 44-44 44 54 59 81 00 20 63
3183 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06
3184 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00
3185 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00
3188 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
3189 AT_CHECK([ovs-ofctl --protocols=OpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl
3190 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
3191 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
3192 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
3193 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
3194 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
3195 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
3196 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
3197 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
3198 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
3199 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
3200 OFPST_FLOW reply (OF1.2):
3206 AT_SETUP([ofproto-dpif - fragment handling])
3208 ADD_OF_PORTS([br0], [1], [2], [3], [4], [5], [6], [90])
3209 AT_DATA([flows.txt], [dnl
3210 priority=75 tcp ip_frag=no tp_dst=80 actions=output:1
3211 priority=75 tcp ip_frag=first tp_dst=80 actions=output:2
3212 priority=75 tcp ip_frag=later tp_dst=80 actions=output:3
3213 priority=50 tcp ip_frag=no actions=output:4
3214 priority=50 tcp ip_frag=first actions=output:5
3215 priority=50 tcp ip_frag=later actions=output:6
3217 AT_CHECK([ovs-ofctl replace-flows br0 flows.txt])
3219 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"
3220 no_flow="$base_flow,frag=no),tcp(src=12345,dst=80)"
3221 first_flow="$base_flow,frag=first),tcp(src=12345,dst=80)"
3222 later_flow="$base_flow,frag=later)"
3224 # mode no first later
3227 'drop 1 drop drop' \
3236 AT_CHECK([ovs-ofctl set-frags br0 $mode])
3237 for type in no first later; do
3238 eval flow=\$${type}_flow exp_output=\$$type
3239 printf "\n%s\n" "----$mode $type-----"
3240 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
3242 if test $mode = drop && test $type != no; then
3243 echo 'Packets dropped because they are IP fragments and the fragment handling mode is "drop".' >> expout
3245 echo "Datapath actions: $exp_output" >> expout
3246 AT_CHECK([grep 'IP fragments' stdout; tail -1 stdout], [0], [expout])
3252 AT_SETUP([ofproto-dpif - exit])
3254 ADD_OF_PORTS([br0], [1], [2], [3], [10], [11], [12], [13], [14])
3255 AT_DATA([flows.txt], [dnl
3256 in_port=1 actions=output:10,exit,output:11
3257 in_port=2 actions=output:12,resubmit:1,output:12
3258 in_port=3 actions=output:13,resubmit:2,output:14
3260 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
3261 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])
3262 AT_CHECK([tail -1 stdout], [0],
3263 [Datapath actions: 10
3265 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])
3266 AT_CHECK([tail -1 stdout], [0],
3267 [Datapath actions: 12,10
3269 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])
3270 AT_CHECK([tail -1 stdout], [0],
3271 [Datapath actions: 13,12,10
3277 AT_SETUP([ofproto-dpif - mirroring, select_all])
3279 ADD_OF_PORTS([br0], 1, 2, 3)
3281 set Bridge br0 mirrors=@m --\
3282 --id=@p3 get Port p3 --\
3283 --id=@m create Mirror name=mymirror select_all=true output_port=@p3
3285 AT_DATA([flows.txt], [dnl
3286 in_port=1 actions=output:2
3287 in_port=2 actions=output:1
3289 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
3291 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)"
3292 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
3293 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
3294 [Datapath actions: 2,3
3297 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)"
3298 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
3299 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
3300 [Datapath actions: 1,3
3307 AT_SETUP([ofproto-dpif - mirroring, select_src])
3309 ADD_OF_PORTS([br0], 1, 2, 3)
3311 set Bridge br0 mirrors=@m --\
3312 --id=@p1 get Port p1 -- --id=@p3 get Port p3 --\
3313 --id=@m create Mirror name=mymirror select_src_port=@p1 output_port=@p3
3315 AT_DATA([flows.txt], [dnl
3316 in_port=1 actions=output:2
3317 in_port=2 actions=output:1
3319 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
3321 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)"
3322 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
3323 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
3324 [Datapath actions: 2,3
3327 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)"
3328 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
3329 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
3330 [Datapath actions: 1
3335 AT_SETUP([ofproto-dpif - mirroring, OFPP_NONE ingress port])
3337 ADD_OF_PORTS([br0], 1, 2)
3339 set Bridge br0 mirrors=@m --\
3340 --id=@p2 get Port p2 --\
3341 --id=@m create Mirror name=mymirror select_all=true output_port=@p2
3343 AT_CHECK([ovs-ofctl add-flow br0 action=output:1])
3345 # "in_port" defaults to OFPP_NONE if it's not specified.
3346 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"
3347 AT_CHECK([ovs-appctl ofproto/trace br0 "$flow"], [0], [stdout])
3348 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
3349 [Datapath actions: 1,2
3356 AT_SETUP([ofproto-dpif - mirroring, select_dst])
3358 ADD_OF_PORTS([br0], 1, 2, 3)
3360 set Bridge br0 mirrors=@m --\
3361 --id=@p2 get Port p2 -- --id=@p3 get Port p3 --\
3362 --id=@m create Mirror name=mymirror select_dst_port=@p2 output_port=@p3
3364 AT_DATA([flows.txt], [dnl
3365 in_port=1 actions=output:2
3366 in_port=2 actions=output:1
3368 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
3370 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)"
3371 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
3372 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
3373 [Datapath actions: 2,3
3376 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)"
3377 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
3378 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
3379 [Datapath actions: 1
3386 AT_SETUP([ofproto-dpif - mirroring, select_vlan])
3388 ADD_OF_PORTS([br0], 1, 2, 3)
3390 set Bridge br0 mirrors=@m --\
3391 --id=@p2 get Port p2 -- --id=@p3 get Port p3 --\
3392 --id=@m create Mirror name=mymirror select_all=true select_vlan=11 output_port=@p3
3394 AT_DATA([flows.txt], [dnl
3395 in_port=1, actions=output:2
3397 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
3399 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)"
3400 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
3401 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
3402 [Datapath actions: 2
3405 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))"
3406 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
3407 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
3408 [Datapath actions: 2
3411 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))"
3412 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
3413 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
3414 [Datapath actions: 2,3
3421 AT_SETUP([ofproto-dpif - mirroring, output_port])
3423 ADD_OF_PORTS([br0], 1, 2, 3)
3425 set Bridge br0 mirrors=@m --\
3426 --id=@p3 get Port p3 --\
3427 --id=@m create Mirror name=mymirror select_all=true output_port=@p3
3429 AT_DATA([flows.txt], [dnl
3430 in_port=1 actions=mod_vlan_vid:17,output:2
3431 in_port=2 actions=output:1
3433 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
3435 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)"
3436 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
3437 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
3438 [Datapath actions: push_vlan(vid=17,pcp=0),2,pop_vlan,3
3441 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)"
3442 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
3443 AT_CHECK_UNQUOTED([tail -1 stdout], [0],
3444 [Datapath actions: 1,3
3450 AT_SETUP([ofproto-dpif - mirroring, output_vlan])
3452 ADD_OF_PORTS([br0], 1, 2)
3454 set Bridge br0 mirrors=@m --\
3455 --id=@m create Mirror name=mymirror select_all=true output_vlan=12
3457 AT_DATA([flows.txt], [dnl
3458 in_port=1 actions=output:2
3459 in_port=2 actions=mod_vlan_vid:17,output:1
3461 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
3463 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)"
3464 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
3465 actual=`tail -1 stdout | sed 's/Datapath actions: //'`
3467 expected="2,push_vlan(vid=12,pcp=0),1,2,100"
3468 AT_CHECK([ovs-dpctl normalize-actions "$flow" "$expected"], [0], [stdout])
3470 AT_CHECK([ovs-dpctl normalize-actions "$flow" "$actual"], [0], [expout])
3472 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)"
3473 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout])
3474 actual=`tail -1 stdout | sed 's/Datapath actions: //'`
3476 expected="push_vlan(vid=17,pcp=0),1,pop_vlan,push_vlan(vid=12,pcp=0),1,2,100"
3477 AT_CHECK([ovs-dpctl normalize-actions "$flow" "$expected"], [0], [stdout])
3479 AT_CHECK([ovs-dpctl normalize-actions "$flow" "$actual"], [0], [expout])
3484 # Two testcases below are for the ofproto/trace command
3485 # The first one tests all correct syntax:
3486 # ofproto/trace [dp_name] odp_flow [-generate|packet]
3487 # ofproto/trace br_name br_flow [-generate|packet]
3488 AT_SETUP([ofproto-dpif - ofproto/trace command 1])
3489 OVS_VSWITCHD_START([set bridge br0 fail-mode=standalone])
3490 ADD_OF_PORTS([br0], 1, 2, 3)
3492 AT_DATA([flows.txt], [dnl
3493 in_port=1 actions=output:2
3494 in_port=2 actions=output:1
3496 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
3498 odp_flow="in_port(1)"
3500 # Test command: ofproto/trace odp_flow with in_port as a name.
3501 AT_CHECK([ovs-appctl ofproto/trace "$odp_flow"], [0], [stdout])
3502 AT_CHECK([tail -1 stdout], [0], [dnl
3506 odp_flow="in_port(1)"
3507 # Test command: ofproto/trace odp_flow
3508 AT_CHECK([ovs-appctl ofproto/trace "$odp_flow"], [0], [stdout])
3509 AT_CHECK([tail -1 stdout], [0], [dnl
3513 # Test command: ofproto/trace dp_name odp_flow
3514 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$odp_flow"], [0], [stdout])
3515 AT_CHECK([tail -1 stdout], [0], [dnl
3518 # Test commmand: ofproto/trace br_name br_flow
3519 AT_CHECK([ovs-appctl ofproto/trace br0 "$br_flow"], [0], [stdout])
3520 AT_CHECK([tail -1 stdout], [0], [dnl
3524 # Delete the inserted flows
3525 AT_CHECK([ovs-ofctl del-flows br0 "in_port=1"], [0], [stdout])
3526 AT_CHECK([ovs-ofctl del-flows br0 "in_port=2"], [0], [stdout])
3528 # This section beflow tests the [-generate] option
3529 odp_flow="in_port(3),eth(src=50:54:00:00:00:05,dst=ff:ff:ff:ff:ff:ff)"
3530 br_flow="arp,metadata=0,in_port=3,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=ff:ff:ff:ff:ff:ff"
3532 # Test command: ofproto/trace odp_flow
3533 AT_CHECK([ovs-appctl ofproto/trace "$odp_flow"], [0], [stdout])
3534 # Check for no MAC learning entry
3535 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
3539 # Test command: ofproto/trace br_name br_flow
3540 AT_CHECK([ovs-appctl ofproto/trace br0 "$br_flow"], [0], [stdout])
3541 # Check for no MAC learning entry
3542 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
3546 # Test command: ofproto/trace odp_flow -generate
3547 AT_CHECK([ovs-appctl ofproto/trace "$odp_flow" -generate], [0], [stdout])
3548 # Check for the MAC learning entry
3549 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
3551 3 0 50:54:00:00:00:05 ?
3554 # Test command: ofproto/trace dp_name odp_flow -generate
3555 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy \
3556 "in_port(1),eth(src=50:54:00:00:00:06,dst=50:54:00:00:00:05)" \
3557 -generate], [0], [stdout])
3558 # Check for both MAC learning entries
3559 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
3561 3 0 50:54:00:00:00:05 ?
3562 1 0 50:54:00:00:00:06 ?
3565 # Test command: ofproto/trace br_name br_flow -generate
3566 AT_CHECK([ovs-appctl ofproto/trace br0 \
3567 "in_port=2,dl_src=50:54:00:00:00:07,dl_dst=50:54:00:00:00:06" \
3568 -generate], [0], [stdout])
3569 # Check for both MAC learning entries.
3570 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
3572 3 0 50:54:00:00:00:05 ?
3573 1 0 50:54:00:00:00:06 ?
3574 2 0 50:54:00:00:00:07 ?
3577 # This section beflow tests the [packet] option
3578 # The ovs-tcpundump of packets between port1 and port2
3579 pkt1to2="50540000000250540000000108064500001C000100004001F98CC0A80001C0A800020800F7FF00000000"
3580 pkt2to1="50540000000150540000000208064500001C000100004001F98CC0A80002C0A800010800F7FF00000000"
3582 # Construct the MAC learning table
3583 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy \
3584 "in_port(1),eth(src=50:54:00:00:00:01,dst=ff:ff:ff:ff:ff:ff)" \
3585 -generate], [0], [stdout])
3587 # Construct the MAC learning table
3588 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy \
3589 "in_port(2),eth(src=50:54:00:00:00:02,dst=ff:ff:ff:ff:ff:ff)" \
3590 -generate], [0], [stdout])
3592 # Test command: ofproto/trace odp_flow packet
3593 AT_CHECK([ovs-appctl ofproto/trace \
3594 "in_port(1),skb_priority(1),skb_mark(2)" "$pkt1to2"], [0], [stdout])
3595 AT_CHECK([tail -1 stdout], [0], [dnl
3598 AT_CHECK([head -n 2 stdout], [0], [dnl
3600 Flow: pkt_mark=0x2,skb_priority=0x1,arp,metadata=0,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_sha=00:00:00:00:00:00,arp_tha=00:00:00:00:00:00
3603 # Test command: ofproto/trace dp_name odp_flow packet
3604 AT_CHECK([ovs-appctl ofproto/trace ovs-dummy \
3605 "in_port(1),skb_priority(1),skb_mark(2)" "$pkt1to2"], [0], [stdout])
3606 AT_CHECK([tail -1 stdout], [0], [dnl
3609 AT_CHECK([head -n 2 stdout], [0], [dnl
3611 Flow: pkt_mark=0x2,skb_priority=0x1,arp,metadata=0,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_sha=00:00:00:00:00:00,arp_tha=00:00:00:00:00:00
3614 # Test command: ofproto/trace br_name br_flow packet
3615 AT_CHECK([ovs-appctl ofproto/trace br0 \
3616 "in_port=2,skb_priority=2,pkt_mark=1" "$pkt2to1"], [0], [stdout],[stderr])
3617 AT_CHECK([tail -1 stdout], [0], [dnl
3620 AT_CHECK([head -n 2 stdout], [0], [dnl
3622 Flow: pkt_mark=0x1,skb_priority=0x2,arp,metadata=0,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_sha=00:00:00:00:00:00,arp_tha=00:00:00:00:00:00
3628 # The second test tests the corner cases
3629 AT_SETUP([ofproto-dpif - ofproto/trace command 2])
3631 ADD_OF_PORTS([br0], 1, 2)
3634 odp_flow="in_port(1),eth(src=50:54:00:00:00:01,dst=50:54:00:00:00:02)"
3635 br_flow="in_port=1,dl_src=50:54:00:00:00:01,dl_dst=50:54:00:00:00:02"
3637 generate="-generate"
3638 pkt="50540000000250540000000108064500001C000100004001F98CC0A80001C0A800020800F7FF00000000"
3640 # Test incorrect command: ofproto/trace wrong_name odp_flow [-generate|packet]
3646 [AT_CHECK([ovs-appctl ofproto/trace wrong_name "$odp_flow" option],
3648 AT_CHECK([tail -2 stderr], [0], [dnl
3649 Cannot find the datapath
3650 ovs-appctl: ovs-vswitchd: server returned an error
3653 # Test incorrect command: ofproto/trace empty_string odp_flow [-generate|packet]
3659 [AT_CHECK([ovs-appctl ofproto/trace "" "$odp_flow" option],
3661 AT_CHECK([tail -2 stderr], [0], [dnl
3662 Cannot find the datapath
3663 ovs-appctl: ovs-vswitchd: server returned an error
3666 # Test incorrect command: ofproto/trace nonexist_dp_name odp_flow [-generate|packet]
3672 [AT_CHECK([ovs-appctl ofproto/trace ovs-system "$odp_flow" option],
3674 AT_CHECK([tail -2 stderr], [0], [dnl
3675 Cannot find the datapath
3676 ovs-appctl: ovs-vswitchd: server returned an error
3679 # Test incorrect command: ofproto/trace br_name odp_flow [-generate|packet]
3685 [AT_CHECK([ovs-appctl ofproto/trace br0 "$odp_flow" option],
3687 AT_CHECK([tail -2 stderr], [0], [dnl
3688 Cannot find the datapath
3689 ovs-appctl: ovs-vswitchd: server returned an error
3692 # Test incorrect command: ofproto/trace dp_name br_flow [-generate|packet]
3698 [AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$br_flow" option],
3700 AT_CHECK([tail -2 stderr], [0], [dnl
3702 ovs-appctl: ovs-vswitchd: server returned an error
3705 # Test incorrect command: ofproto/trace br_flow [-generate|packet]
3711 [AT_CHECK([ovs-appctl ofproto/trace "$br_flow" option],
3713 AT_CHECK([tail -2 stderr], [0], [dnl
3714 Must specify bridge name
3715 ovs-appctl: ovs-vswitchd: server returned an error
3718 # Test incorrect command: ofproto/trace dp_name odp_flow garbage_option
3719 AT_CHECK([ovs-appctl ofproto/trace \
3720 ovs-dummy "$odp_flow" garbage_option],
3721 [2], [stdout],[stderr])
3722 AT_CHECK([tail -2 stderr], [0], [dnl
3723 Trailing garbage in packet data
3724 ovs-appctl: ovs-vswitchd: server returned an error
3727 # Test incorrect command: ofproto/trace with 4 arguments
3728 AT_CHECK([ovs-appctl ofproto/trace \
3729 arg1, arg2, arg3, arg4], [2], [stdout],[stderr])
3730 AT_CHECK([tail -2 stderr], [0], [dnl
3731 "ofproto/trace" command takes at most 3 arguments
3732 ovs-appctl: ovs-vswitchd: server returned an error
3735 # Test incorrect command: ofproto/trace with 0 argument
3736 AT_CHECK([ovs-appctl ofproto/trace ], [2], [stdout],[stderr])
3737 AT_CHECK([tail -2 stderr], [0], [dnl
3738 "ofproto/trace" command requires at least 1 arguments
3739 ovs-appctl: ovs-vswitchd: server returned an error
3745 AT_SETUP([ofproto-dpif - ofproto/trace-packet-out])
3747 ADD_OF_PORTS([br0], 1, 2, 3)
3749 AT_DATA([flows.txt], [dnl
3750 in_port=1 actions=output:2
3751 in_port=2 actions=output:1
3753 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
3755 AT_CHECK([ovs-appctl ofproto/trace-packet-out br0 in_port=1 'mod_vlan_vid:123,resubmit(,0)'], [0], [stdout])
3756 AT_CHECK([tail -1 stdout], [0], [dnl
3757 Datapath actions: push_vlan(vid=123,pcp=0),2
3764 m4_define([OFPROTO_TRACE],
3766 AT_CHECK([ovs-appctl ofproto/trace $1 "$flow" $3], [0], [stdout])
3767 actual=`tail -1 stdout | sed 's/Datapath actions: //'`
3769 AT_CHECK([ovs-dpctl normalize-actions "$flow" "$expected" $5],
3772 AT_CHECK([ovs-dpctl normalize-actions "$flow" "$actual" $5],
3775 AT_SETUP([ofproto-dpif - MAC learning])
3776 OVS_VSWITCHD_START([set bridge br0 fail-mode=standalone])
3777 ADD_OF_PORTS([br0], 1, 2, 3)
3779 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)'
3781 # Trace an ARP packet arriving on p3, to create a MAC learning entry.
3784 [in_port(3),eth(src=50:54:00:00:00:05,dst=ff:ff:ff:ff:ff:ff),$arp],
3788 # Check for the MAC learning entry.
3789 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
3791 3 0 50:54:00:00:00:05 ?
3794 # Trace a packet arrival destined for the learned MAC.
3795 # (This will also learn a MAC.)
3798 [in_port(1),eth(src=50:54:00:00:00:06,dst=50:54:00:00:00:05),$arp],
3802 # Check for both MAC learning entries.
3803 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
3805 3 0 50:54:00:00:00:05 ?
3806 1 0 50:54:00:00:00:06 ?
3809 # Trace a packet arrival that updates the first learned MAC entry.
3812 [in_port(2),eth(src=50:54:00:00:00:05,dst=ff:ff:ff:ff:ff:ff),$arp],
3816 # Check that the MAC learning entry was updated.
3817 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
3819 1 0 50:54:00:00:00:06 ?
3820 2 0 50:54:00:00:00:05 ?
3823 # Add another bridge.
3827 -- set bridge br1 datapath-type=dummy])
3828 ADD_OF_PORTS([br1], 4, 5)
3830 # Trace some packet arrivals in br1 to create MAC learning entries there too.
3833 [in_port(4),eth(src=50:54:00:00:00:06,dst=ff:ff:ff:ff:ff:ff),$arp],
3838 [in_port(5),eth(src=50:54:00:00:00:07,dst=ff:ff:ff:ff:ff:ff),$arp],
3842 # Check that the MAC learning entries were added.
3843 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br1 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
3845 4 0 50:54:00:00:00:06 ?
3846 5 0 50:54:00:00:00:07 ?
3849 # Delete port p1 and see that its MAC learning entry disappeared, and
3850 # that the MAC learning entry for the same MAC was also deleted from br1.
3851 AT_CHECK([ovs-vsctl del-port p1])
3852 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
3854 2 0 50:54:00:00:00:05 ?
3856 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br1 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl
3858 5 0 50:54:00:00:00:07 ?
3864 AT_SETUP([ofproto-dpif - MAC table overflow])
3866 [set bridge br0 fail-mode=standalone other-config:mac-table-size=10])
3867 ADD_OF_PORTS([br0], 1, 2, 3)
3869 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)'
3871 AT_CHECK([ovs-appctl time/stop])
3873 # Trace 10 ARP packets arriving on p3, to create MAC learning entries.
3874 for i in 0 1 2 3 4 5 6 7 8 9; do
3877 [in_port(3),eth(src=50:54:00:00:00:0$i,dst=ff:ff:ff:ff:ff:ff),$arp],
3880 ovs-appctl time/warp 1000
3883 # Check for the MAC learning entries.
3884 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/ *[[0-9]]\{1,\}$//' | sort],
3886 3 0 50:54:00:00:00:00
3887 3 0 50:54:00:00:00:01
3888 3 0 50:54:00:00:00:02
3889 3 0 50:54:00:00:00:03
3890 3 0 50:54:00:00:00:04
3891 3 0 50:54:00:00:00:05
3892 3 0 50:54:00:00:00:06
3893 3 0 50:54:00:00:00:07
3894 3 0 50:54:00:00:00:08
3895 3 0 50:54:00:00:00:09
3899 # Trace another ARP packet on another MAC.
3902 [in_port(3),eth(src=50:54:00:00:00:10,dst=ff:ff:ff:ff:ff:ff),$arp],
3906 # Check that the new one chased the oldest one out of the table.
3907 AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/' | sort],
3909 3 0 50:54:00:00:00:01 ?
3910 3 0 50:54:00:00:00:02 ?
3911 3 0 50:54:00:00:00:03 ?
3912 3 0 50:54:00:00:00:04 ?
3913 3 0 50:54:00:00:00:05 ?
3914 3 0 50:54:00:00:00:06 ?
3915 3 0 50:54:00:00:00:07 ?
3916 3 0 50:54:00:00:00:08 ?
3917 3 0 50:54:00:00:00:09 ?
3918 3 0 50:54:00:00:00:10 ?
3924 # CHECK_SFLOW_SAMPLING_PACKET(LOOPBACK_ADDR, ADDR_WITHOUT_BRACKETS)
3926 # Test that sFlow samples packets correctly using IPv4/IPv6 sFlow collector
3928 # IP_VERSION_TYPE is used in AT_SETUP
3929 m4_define([CHECK_SFLOW_SAMPLING_PACKET],
3930 [AT_SETUP([ofproto-dpif - sFlow packet sampling - $2 collector])
3931 AT_XFAIL_IF([test "$IS_WIN32" = "yes"])
3932 OVS_VSWITCHD_START([set Bridge br0 fail-mode=standalone])
3934 ON_EXIT([kill `cat test-sflow.pid`])
3935 AT_CHECK([ovstest test-sflow --log-file --detach --no-chdir --pidfile 0:$1 > sflow.log], [0], [], [ignore])
3936 AT_CAPTURE_FILE([sflow.log])
3937 SFLOW_PORT=`parse_listening_port < test-sflow.log`
3938 ovs-appctl time/stop
3940 ADD_OF_PORTS([br0], 1, 2)
3942 set Interface br0 options:ifindex=1002 -- \
3943 set Interface p1 options:ifindex=1004 -- \
3944 set Interface p2 options:ifindex=1003 -- \
3945 set Bridge br0 sflow=@sf -- \
3946 --id=@sf create sflow targets=\"$1:$SFLOW_PORT\" \
3947 header=128 sampling=1 polling=1 agent=$LOOPBACK_INTERFACE
3949 dnl open with ARP packets to seed the bridge-learning. The output
3950 dnl ifIndex numbers should be reported predictably after that.
3951 dnl Since we set sampling=1 we should see all of these packets
3952 dnl reported. Sorting the output by data-source and seqNo makes
3953 dnl it deterministic. Ensuring that we send at least two packets
3954 dnl into each port means we get to check the seq nos are
3955 dnl incrementing correctly.
3956 dnl because packets from different ports can be handled by separate
3957 dnl threads, put some sleeps
3959 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)'
3961 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)'
3963 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)'
3965 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)'
3966 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)'
3968 dnl sleep long enough to get more than one counter sample
3969 dnl from each datasource so we can check sequence numbers
3970 for i in `seq 1 30`; do
3971 ovs-appctl time/warp 100
3974 ovs-appctl -t test-sflow exit
3976 AT_CHECK_UNQUOTED([[sort sflow.log | $EGREP 'HEADER|ERROR' | sed 's/ /\
3997 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
4017 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
4037 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
4057 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
4077 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
4080 AT_CHECK_UNQUOTED([[sort sflow.log | $EGREP 'IFCOUNTERS|ERROR' | head -6 | sed 's/ /\
4094 in_broadcasts=4294967295
4097 in_unknownprotos=4294967295
4100 out_multicasts=4294967295
4101 out_broadcasts=4294967295
4117 in_broadcasts=4294967295
4120 in_unknownprotos=4294967295
4123 out_multicasts=4294967295
4124 out_broadcasts=4294967295
4140 in_broadcasts=4294967295
4143 in_unknownprotos=4294967295
4146 out_multicasts=4294967295
4147 out_broadcasts=4294967295
4163 in_broadcasts=4294967295
4166 in_unknownprotos=4294967295
4169 out_multicasts=4294967295
4170 out_broadcasts=4294967295
4186 in_broadcasts=4294967295
4189 in_unknownprotos=4294967295
4192 out_multicasts=4294967295
4193 out_broadcasts=4294967295
4209 in_broadcasts=4294967295
4212 in_unknownprotos=4294967295
4215 out_multicasts=4294967295
4216 out_broadcasts=4294967295
4223 CHECK_SFLOW_SAMPLING_PACKET([127.0.0.1], [IPv4])
4224 CHECK_SFLOW_SAMPLING_PACKET([[[::1]]], [IPv6])
4226 # CHECK_NETFLOW_EXPIRATION(LOOPBACK_ADDR, IP_VERSION_TYPE)
4228 # Test that basic NetFlow reports flow statistics correctly:
4229 # The initial packet of a flow are correctly accounted.
4230 # Later packets within a flow are correctly accounted.
4231 # Flow actions changing (in this case, due to MAC learning)
4232 # cause a record to be sent.
4234 # IP_VERSION_TYPE is used in AT_SETUP
4235 m4_define([CHECK_NETFLOW_EXPIRATION],
4236 [AT_SETUP([ofproto-dpif - NetFlow flow expiration - $2 collector])
4237 OVS_VSWITCHD_START([set Bridge br0 fail-mode=standalone])
4238 ADD_OF_PORTS([br0], 1, 2)
4240 ovs-appctl time/stop
4241 ON_EXIT([kill `cat test-netflow.pid`])
4242 AT_CHECK([ovstest test-netflow --log-file --detach --no-chdir --pidfile 0:$1 > netflow.log], [0], [], [ignore])
4243 AT_CAPTURE_FILE([netflow.log])
4244 NETFLOW_PORT=`parse_listening_port < test-netflow.log`
4247 set Bridge br0 netflow=@nf -- \
4248 --id=@nf create NetFlow targets=\"$1:$NETFLOW_PORT\" \
4249 engine_id=1 engine_type=2 active_timeout=30 add-id-to-interface=false
4251 for delay in 1000 30000; do
4252 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)'
4253 sleep 1 # ensure the order in which these two packets are processed
4254 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)'
4256 ovs-appctl time/warp $delay
4259 ovs-appctl time/warp 6000
4260 ovs-appctl revalidator/wait
4262 ovs-appctl -t test-netflow exit
4264 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])
4266 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])
4268 combined=`grep "192.168.0.2 > 192.168.0.1, if 2 > 1, 2 pkts, 120 bytes, ICMP 0:0" netflow.log | wc -l`
4269 separate=`grep "192.168.0.2 > 192.168.0.1, if 2 > 1, 1 pkts, 60 bytes, ICMP 0:0" netflow.log | wc -l`
4270 AT_CHECK([test $separate = 2 || test $combined = 1], [0])
4274 CHECK_NETFLOW_EXPIRATION([127.0.0.1], [IPv4])
4275 CHECK_NETFLOW_EXPIRATION([[[::1]]], [IPv6])
4277 # CHECK_NETFLOW_ACTIVE_EXPIRATION(LOOPBACK_ADDR, IP_VERSION_TYPE)
4279 # Test that basic NetFlow reports active expirations correctly.
4281 # IP_VERSION_TYPE is used in AT_SETUP
4282 m4_define([CHECK_NETFLOW_ACTIVE_EXPIRATION],
4283 [AT_SETUP([ofproto-dpif - NetFlow active expiration - $2 collector])
4285 OVS_VSWITCHD_START([set Bridge br0 fail-mode=standalone])
4286 ADD_OF_PORTS([br0], 1, 2)
4288 ON_EXIT([kill `cat test-netflow.pid`])
4289 AT_CHECK([ovstest test-netflow --log-file --detach --no-chdir --pidfile 0:$1 > netflow.log], [0], [], [ignore])
4290 AT_CAPTURE_FILE([netflow.log])
4291 NETFLOW_PORT=`parse_listening_port < test-netflow.log`
4294 set Bridge br0 netflow=@nf -- \
4295 --id=@nf create NetFlow targets=\"$1:$NETFLOW_PORT\" \
4296 engine_id=1 engine_type=2 active_timeout=10 add-id-to-interface=false
4298 AT_CHECK([ovs-appctl time/stop])
4300 while test $n -le 60; do
4303 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)'
4304 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)'
4306 ovs-appctl time/warp 1000
4309 ovs-appctl time/warp 10000
4311 ovs-appctl revalidator/wait
4313 ovs-appctl -t test-netflow exit
4315 # Count the number of reported packets:
4316 # - From source to destination before MAC learning kicks in (just one).
4317 # - From source to destination after that.
4318 # - From destination to source.
4326 pkts=`echo "$line" | sed 's/.*, \([[0-9]]*\) pkts,.*/\1/'`
4333 "seq "*": 192.168.0.1 > 192.168.0.2, if 1 > 65535, "*" pkts, "*" bytes, TCP 1234 > 80, time "*)
4336 "seq "*": 192.168.0.1 > 192.168.0.2, if 1 > 2, "*" pkts, "*" bytes, TCP 1234 > 80, time "*)
4339 "seq "*": 192.168.0.2 > 192.168.0.1, if 2 > 1, "*" pkts, "*" bytes, TCP 80 > 1234, time "*)
4346 eval $counter=\`expr \$$counter + \$pkts\`
4347 n_recs=`expr $n_recs + 1`
4350 # There should be exactly 1 MAC learning packet,
4351 # exactly 59 other packets in that direction,
4352 # and exactly 60 packets in the other direction.
4353 AT_CHECK([echo $n_learn $n_in $n_out $n_other], [0], [1 59 60 0
4358 CHECK_NETFLOW_ACTIVE_EXPIRATION([127.0.0.1], [IPv4])
4359 CHECK_NETFLOW_ACTIVE_EXPIRATION([[[::1]]], [IPv6])
4361 AT_SETUP([ofproto-dpif - flow stats])
4363 AT_CHECK([ovs-ofctl add-flow br0 "ip,actions=NORMAL"])
4364 AT_CHECK([ovs-ofctl add-flow br0 "icmp,actions=NORMAL"])
4366 ovs-appctl time/stop
4368 for i in `seq 1 10`; do
4369 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)'
4372 ovs-appctl time/warp 1000
4373 ovs-appctl revalidator/wait
4375 AT_CHECK([ovs-ofctl dump-flows br0], [0], [stdout])
4376 AT_CHECK([STRIP_XIDS stdout | sed -n 's/duration=[[0-9]]*\.[[0-9]]*s/duration=0.0s/p' | sort], [0], [dnl
4377 cookie=0x0, duration=0.0s, table=0, n_packets=0, n_bytes=0, idle_age=1, icmp actions=NORMAL
4378 cookie=0x0, duration=0.0s, table=0, n_packets=10, n_bytes=600, idle_age=1, ip actions=NORMAL
4383 AT_SETUP([ofproto-dpif - flow stats, set-n-threads])
4385 AT_CHECK([ovs-ofctl add-flow br0 "ip,actions=NORMAL"])
4386 AT_CHECK([ovs-ofctl add-flow br0 "icmp,actions=NORMAL"])
4388 ovs-appctl time/stop
4390 for i in `seq 1 10`; do
4391 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)'
4394 ovs-appctl time/warp 100
4395 AT_CHECK([ovs-vsctl set Open_vSwitch . other-config:n-revalidator-threads=2])
4396 ovs-appctl time/warp 1000
4398 AT_CHECK([ovs-ofctl dump-flows br0], [0], [stdout])
4399 AT_CHECK([STRIP_XIDS stdout | sed -n 's/duration=[[0-9]]*\.[[0-9]]*s/duration=0.0s/p' | sort], [0], [dnl
4400 cookie=0x0, duration=0.0s, table=0, n_packets=0, n_bytes=0, idle_age=1, icmp actions=NORMAL
4401 cookie=0x0, duration=0.0s, table=0, n_packets=10, n_bytes=600, idle_age=1, ip actions=NORMAL
4406 AT_SETUP([idle_age and hard_age increase over time])
4409 # get_ages DURATION HARD IDLE
4411 # Fetch the flow duration, hard age, and idle age into the variables
4412 # whose names are given as arguments. Rounds DURATION down to the
4413 # nearest integer. If hard_age doesn't appear in the output, sets
4414 # HARD to "none". If idle_age doesn't appear in the output, sets IDLE
4417 AT_CHECK([ovs-ofctl dump-flows br0], [0], [stdout])
4419 duration=`sed -n 's/.*duration=\([[0-9]]*\)\(\.[[0-9]]*\)\{0,1\}s.*/\1/p' stdout`
4420 AT_CHECK([[expr X"$duration" : 'X[0-9][0-9]*$']], [0], [ignore])
4421 AS_VAR_COPY([$1], [duration])
4423 hard=`sed -n 's/.*hard_age=\([[0-9]]*\),.*/\1/p' stdout`
4424 if test X"$hard" = X; then
4427 AT_CHECK([[expr X"$hard" : 'X[0-9][0-9]*$']], [0], [ignore])
4429 AS_VAR_COPY([$2], [hard])
4431 idle=`sed -n 's/.*idle_age=\([[0-9]]*\),.*/\1/p' stdout`
4432 if test X"$idle" = X; then
4435 AT_CHECK([[expr X"$idle" : 'X[0-9][0-9]*$']], [0], [ignore])
4437 AS_VAR_COPY([$3], [idle])
4440 # Add a flow and get its initial hard and idle age.
4441 AT_CHECK([ovs-ofctl add-flow br0 hard_timeout=199,idle_timeout=188,actions=drop])
4442 get_ages duration1 hard1 idle1
4444 ovs-appctl time/stop
4445 # Warp time forward by 10 seconds, then modify the flow's actions.
4446 ovs-appctl time/warp 10000
4447 get_ages duration2 hard2 idle2
4448 AT_CHECK([ovs-ofctl mod-flows br0 actions=flood])
4450 # Warp time forward by 10 seconds.
4451 ovs-appctl time/warp 10000
4452 get_ages duration3 hard3 idle3
4454 # Warp time forward 10 more seconds, then pass some packets through the flow,
4455 # then warp forward a few more times because idle times are only updated
4457 ovs-appctl time/warp 10000
4458 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)'
4459 ovs-appctl time/warp 1000
4460 ovs-appctl time/warp 1000
4461 ovs-appctl time/warp 1000
4463 get_ages duration4 hard4 idle4
4465 printf "duration: %4s => %4s => %4s => %4s\n" $duration1 $duration2 $duration3 $duration4
4466 printf "hard_age: %4s => %4s => %4s => %4s\n" $hard1 $hard2 $hard3 $hard4
4467 printf "idle_age: %4s => %4s => %4s => %4s\n" $idle1 $idle2 $idle3 $idle4
4469 # Duration should increase steadily over time.
4470 AT_CHECK([test $duration1 -lt $duration2])
4471 AT_CHECK([test $duration2 -lt $duration3])
4472 AT_CHECK([test $duration3 -lt $duration4])
4474 # Hard age should be "none" initially because it's the same as flow_duration,
4475 # then it should increase.
4476 AT_CHECK([test $hard1 = none])
4477 AT_CHECK([test $hard2 = none])
4478 AT_CHECK([test $hard3 != none])
4479 AT_CHECK([test $hard4 != none])
4480 AT_CHECK([test $hard3 -lt $hard4])
4482 # Idle age should increase from 1 to 2 to 3, then decrease.
4483 AT_CHECK([test $idle1 -lt $idle2])
4484 AT_CHECK([test $idle2 -lt $idle3])
4485 AT_CHECK([test $idle3 -gt $idle4])
4487 # Check some invariant relationships.
4488 AT_CHECK([test $duration1 = $idle1])
4489 AT_CHECK([test $duration2 = $idle2])
4490 AT_CHECK([test $duration3 = $idle3])
4491 AT_CHECK([test $idle3 -gt $hard3])
4492 AT_CHECK([test $idle4 -lt $hard4])
4493 AT_CHECK([test $hard4 -lt $duration4])
4498 AT_SETUP([ofproto-dpif - fin_timeout])
4500 ovs-appctl time/stop
4501 AT_CHECK([ovs-ofctl add-flow br0 'idle_timeout=60,actions=fin_timeout(idle_timeout=5)'])
4502 AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip], [0],
4504 idle_timeout=60, actions=fin_timeout(idle_timeout=5)
4507 # Check that a TCP SYN packet does not change the timeout. (Because
4508 # flow stats updates are mainly what implements the fin_timeout
4509 # feature, we warp forward a couple of times to ensure that flow stats
4510 # run before re-checking the flow table.)
4511 AT_CHECK([ovs-appctl netdev-dummy/receive br0 0021853763af0026b98cb0f908004500003c2e2440004006465dac11370dac11370b828b0016751e267b00000000a00216d017360000020405b40402080a2d25085f0000000001030307])
4512 AT_CHECK([ovs-appctl time/warp 1000 && ovs-appctl time/warp 1000], [0], [warped
4515 ovs-appctl revalidator/wait
4516 AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip], [0],
4518 n_packets=1, n_bytes=74, idle_timeout=60, actions=fin_timeout(idle_timeout=5)
4520 # Check that a TCP FIN packet does change the timeout.
4521 AT_CHECK([ovs-appctl netdev-dummy/receive br0 0021853763af0026b98cb0f90800451000342e3e40004006463bac11370dac11370b828b0016751e319dfc96399b801100717ae800000101080a2d250a9408579588])
4522 AT_CHECK([ovs-appctl time/warp 1000 && ovs-appctl time/warp 1000], [0], [warped
4525 AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip], [0],
4527 n_packets=2, n_bytes=140, idle_timeout=5, actions=fin_timeout(idle_timeout=5)
4532 AT_SETUP([ofproto-dpif - ovs-appctl dpif/dump-dps])
4533 OVS_VSWITCHD_START([add-br br1 -- set bridge br1 datapath-type=dummy])
4534 ADD_OF_PORTS([br0], [1], [2])
4535 ADD_OF_PORTS([br1], [3])
4537 AT_CHECK([ovs-appctl dpif/dump-dps], [0], [dnl
4544 AT_SETUP([ofproto-dpif - ovs-appctl dpif/show])
4545 OVS_VSWITCHD_START([add-br br1 -- set bridge br1 datapath-type=dummy])
4546 ADD_OF_PORTS([br0], [1], [2])
4547 ADD_OF_PORTS([br1], [3])
4549 AT_CHECK([ovs-appctl dpif/show], [0], [dnl
4550 dummy@ovs-dummy: hit:0 missed:0
4552 br0 65534/100: (dummy)
4556 br1 65534/101: (dummy)
4562 AT_SETUP([ofproto-dpif - ovs-appctl dpif/dump-flows])
4563 # bump max-idle to avoid the flows being reclaimed behind us
4564 OVS_VSWITCHD_START([add-br br1 -- \
4565 set bridge br1 datapath-type=dummy fail-mode=secure -- \
4566 set Open_vSwitch . other_config:max-idle=10000])
4567 ADD_OF_PORTS([br0], [1], [2])
4568 ADD_OF_PORTS([br1], [3])
4570 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)'])
4571 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)'])
4572 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)'])
4573 ovs-appctl revalidator/wait
4574 AT_CHECK([ovs-appctl dpif/dump-flows br0 | sort | STRIP_USED], [0], [dnl
4575 skb_priority(0),recirc_id(0),in_port(1),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/0xff), packets:0, bytes:0, used:never, actions:drop
4576 skb_priority(0),recirc_id(0),in_port(2),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/0xff), packets:0, bytes:0, used:never, actions:drop
4579 AT_CHECK([ovs-appctl dpif/dump-flows br1 | sort | STRIP_USED], [0], [dnl
4580 skb_priority(0),recirc_id(0),in_port(3),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/0xff), packets:0, bytes:0, used:never, actions:drop
4583 AT_CHECK([ovs-appctl dpif/dump-flows -m br0 | sort | STRIP_USED], [0], [dnl
4584 skb_priority(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/0xff),icmp(type=8/0,code=0/0), packets:0, bytes:0, used:never, actions:drop
4585 skb_priority(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/0xff),icmp(type=0/0,code=0/0), packets:0, bytes:0, used:never, actions:drop
4588 AT_CHECK([ovs-appctl dpif/dump-flows -m br1 | sort | STRIP_USED], [0], [dnl
4589 skb_priority(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/0xff),icmp(type=8/0,code=0/0), packets:0, bytes:0, used:never, actions:drop
4595 AT_SETUP([ofproto-dpif - MPLS actions that result in a userspace action])
4596 OVS_VSWITCHD_START([dnl
4597 add-port br0 p1 -- set Interface p1 type=dummy
4599 AT_CHECK([ovs-appctl vlog/set dpif:dbg])
4600 ON_EXIT([kill `cat ovs-ofctl.pid`])
4602 AT_CAPTURE_FILE([ofctl_monitor.log])
4603 AT_DATA([flows.txt], [dnl
4604 dl_src=60:66:66:66:66:00 actions=push_mpls:0x8847,controller
4605 dl_src=60:66:66:66:66:01 actions=pop_mpls:0x8849,controller
4607 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
4609 dnl Packet is sent to userspace because a MPLS push or pop action is applied to
4610 dnl a packet with 2 MPLS LSEs but dpif-netdev can't handle any labels.
4612 dnl The input is a frame with two MPLS labels which tcpdump -vve shows as:
4613 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)
4614 dnl (label 20, exp 0, [S], ttl 32)
4615 dnl (tos 0x0, ttl 64, id 0, offset 0, flags [none], proto TCP (6), length 44, bad cksum 3b78 (->f978)!)
4616 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
4618 for dl_src in 00 01; do
4619 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"])
4621 sleep 1 # wait for the datapath flow installed
4622 for dl_src in 00 01; do
4623 AT_CHECK_UNQUOTED([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | grep ":$dl_src/" | STRIP_USED], [0], [dnl
4624 skb_priority(0),skb_mark(0/0),recirc_id(0),dp_hash(0/0),in_port(1),eth(src=60:66:66:66:66:$dl_src/ff:ff:ff:ff:ff:ff,dst=50:54:00:00:00:07/00:00:00:00:00:00),eth_type(0x8847),mpls(lse0=0x14020,lse1=0x14120), actions:userspace(pid=0,slow_path(controller))
4632 AT_SETUP([ofproto-dpif - MPLS actions that result in a drop])
4633 OVS_VSWITCHD_START([dnl
4634 add-port br0 p1 -- set Interface p1 type=dummy
4636 AT_CHECK([ovs-appctl vlog/set dpif:dbg])
4637 ON_EXIT([kill `cat ovs-ofctl.pid`])
4639 AT_CAPTURE_FILE([ofctl_monitor.log])
4640 AT_DATA([flows.txt], [dnl
4641 dl_src=60:66:66:66:66:00 actions=push_mpls:0x8847,controller
4642 dl_src=60:66:66:66:66:01 actions=pop_mpls:0x8849,controller
4644 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
4646 dnl Packet is dropped because an MPLS PUSH action is applied to a packet with
4647 dnl 4 MPLS LSEs but ovs-vswtichd can only handle up to 3 MPLS LSEs and thus
4648 dnl can't determine the resulting MPLS label after MPLS push/pop actions.
4650 dnl The input is a frame with two MPLS headers which tcpdump -vve shows as:
4651 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)
4652 dnl (label 20, exp 0, ttl 32)
4653 dnl (label 20, exp 0, ttl 32)
4654 dnl (label 20, exp 0, [S], ttl 32)
4655 dnl (tos 0x0, ttl 64, id 0, offset 0, flags [none], proto TCP (6), length 44, bad cksum 3b78 (->f978)!)
4656 dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4
4658 for dl_src in 00 01; do
4659 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"])
4661 sleep 1 # wait for the datapath flow installed
4662 for dl_src in 00 01; do
4663 AT_CHECK_UNQUOTED([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | grep ":$dl_src/" | STRIP_USED], [0], [dnl
4664 skb_priority(0),skb_mark(0/0),recirc_id(0),dp_hash(0/0),in_port(1),eth(src=60:66:66:66:66:$dl_src/ff:ff:ff:ff:ff:ff,dst=50:54:00:00:00:07/00:00:00:00:00:00),eth_type(0x8847),mpls(lse0=0x14020,lse1=0x14120), actions:userspace(pid=0,slow_path(controller))
4671 AT_SETUP([ofproto-dpif - patch ports])
4672 OVS_VSWITCHD_START([add-br br1 \
4673 -- set bridge br1 datapath-type=dummy fail-mode=secure \
4674 -- add-port br1 pbr1 -- set int pbr1 type=patch options:peer=pbr0 \
4675 -- add-port br0 pbr0 -- set int pbr0 type=patch options:peer=pbr1])
4677 ADD_OF_PORTS([br0], [2])
4678 ADD_OF_PORTS([br1], [3])
4680 AT_CHECK([ovs-appctl time/stop])
4681 AT_CHECK([ovs-appctl vlog/set dpif:dbg])
4683 AT_CHECK([ovs-ofctl add-flow br0 actions=LOCAL,output:1,output:2])
4684 AT_CHECK([ovs-ofctl add-flow br1 actions=LOCAL,output:1,output:3])
4686 for i in $(seq 1 10); do
4687 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)'
4688 if [[ $i -eq 1 ]]; then
4693 for i in $(seq 1 5); do
4694 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)'
4695 if [[ $i -eq 1 ]]; then
4700 AT_CHECK([ovs-appctl time/warp 500], [0],
4703 sleep 1 # wait for log writer
4705 AT_CHECK([ovs-appctl dpif/show], [0], [dnl
4706 dummy@ovs-dummy: hit:13 missed:2
4708 br0 65534/100: (dummy)
4710 pbr0 1/none: (patch: peer=pbr1)
4712 br1 65534/101: (dummy)
4714 pbr1 1/none: (patch: peer=pbr0)
4717 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_USED], [0], [dnl
4718 skb_priority(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/0xff),icmp(type=8/0,code=0/0), actions:101,3,2
4719 skb_priority(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/0xff),icmp(type=8/0,code=0/0), actions:100,2,3
4722 AT_CHECK([cat ovs-vswitchd.log | grep -e 'in_port(100).*packets:9' | FILTER_FLOW_DUMP], [0], [dnl
4723 skb_priority(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/0xff),icmp(type=8/0,code=0/0), packets:9, bytes:540, used:0.0s, actions:101,3,2
4725 AT_CHECK([cat ovs-vswitchd.log | grep -e 'in_port(101).*packets:4' | FILTER_FLOW_DUMP], [0], [dnl
4726 skb_priority(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/0xff),icmp(type=8/0,code=0/0), packets:4, bytes:240, used:0.0s, actions:100,2,3
4729 AT_CHECK([ovs-ofctl dump-ports br0 pbr0], [0], [dnl
4730 OFPST_PORT reply (xid=0x4): 1 ports
4731 port 1: rx pkts=5, bytes=300, drop=0, errs=0, frame=0, over=0, crc=0
4732 tx pkts=10, bytes=600, drop=0, errs=0, coll=0
4735 AT_CHECK([ovs-ofctl dump-ports br1 pbr1], [0], [dnl
4736 OFPST_PORT reply (xid=0x4): 1 ports
4737 port 1: rx pkts=10, bytes=600, drop=0, errs=0, frame=0, over=0, crc=0
4738 tx pkts=5, bytes=300, drop=0, errs=0, coll=0
4744 AT_SETUP([ofproto-dpif - port duration])
4745 OVS_VSWITCHD_START([set Bridge br0 protocols=OpenFlow13])
4746 ADD_OF_PORTS([br0], 1, 2)
4748 ovs-appctl time/stop
4749 ovs-appctl time/warp 10000
4751 AT_CHECK([ovs-ofctl -O openflow13 dump-ports br0], [0], [stdout])
4752 AT_CHECK([sed -n 's/=[[0-9]][[0-9]]\(\.[[0-9]][[0-9]]*\)\{0,1\}s/=?s/p' stdout], [0],
4761 dnl ----------------------------------------------------------------------
4762 AT_BANNER([ofproto-dpif -- megaflows])
4764 AT_SETUP([ofproto-dpif megaflow - port classification])
4766 AT_CHECK([ovs-appctl vlog/set dpif:dbg])
4767 ADD_OF_PORTS([br0], [1], [2])
4768 AT_DATA([flows.txt], [dnl
4769 table=0 in_port=1 actions=output(2)
4771 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
4772 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)'])
4774 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)'])
4776 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
4777 skb_priority(0),skb_mark(0/0),recirc_id(0),dp_hash(0/0),in_port(1),eth(src=50:54:00:00:00:09/00:00:00:00:00:00,dst=50:54:00:00:00:0a/00:00:00:00:00:00),eth_type(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/0xff),icmp(type=8/0,code=0/0), actions: <del>
4782 AT_SETUP([ofproto-dpif megaflow - L2 classification])
4784 AT_CHECK([ovs-appctl vlog/set dpif:dbg])
4785 ADD_OF_PORTS([br0], [1], [2])
4786 AT_DATA([flows.txt], [dnl
4787 table=0 in_port=1,dl_src=50:54:00:00:00:09 actions=output(2)
4789 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
4790 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)'])
4791 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)'])
4793 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
4794 skb_priority(0),skb_mark(0/0),recirc_id(0),dp_hash(0/0),in_port(1),eth(src=50:54:00:00:00:09/ff:ff:ff:ff:ff:ff,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/0xff),icmp(type=8/0,code=0/0), actions: <del>
4795 skb_priority(0),skb_mark(0/0),recirc_id(0),dp_hash(0/0),in_port(1),eth(src=50:54:00:00:00:0b/ff:ff:00:00:00:02,dst=50:54:00:00:00:0c/00:00:00:00:00:00),eth_type(0x0800),ipv4(src=10.0.0.4/0.0.0.0,dst=10.0.0.3/0.0.0.0,proto=1/0,tos=0/0,ttl=64/0,frag=no/0xff),icmp(type=8/0,code=0/0), actions: <del>
4800 AT_SETUP([ofproto-dpif megaflow - L3 classification])
4802 AT_CHECK([ovs-appctl vlog/set dpif:dbg])
4803 ADD_OF_PORTS([br0], [1], [2])
4804 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], [])
4805 AT_DATA([flows.txt], [dnl
4806 table=0 in_port=1,icmp,nw_src=10.0.0.4 actions=output(2)
4808 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
4809 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)'])
4810 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)'])
4812 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
4813 skb_priority(0),skb_mark(0/0),recirc_id(0),dp_hash(0/0),in_port(1),eth(src=50:54:00:00:00:09/00:00:00:00:00:00,dst=50:54:00:00:00:0a/00:00:00:00:00:00),eth_type(0x0800),ipv4(src=10.0.0.2/0.0.0.2,dst=10.0.0.1/0.0.0.0,proto=1/0,tos=0/0,ttl=64/0,frag=no/0xff),icmp(type=8/0,code=0/0), actions: <del>
4814 skb_priority(0),skb_mark(0/0),recirc_id(0),dp_hash(0/0),in_port(1),eth(src=50:54:00:00:00:0b/00:00:00:00:00:00,dst=50:54:00:00:00:0c/00:00:00:00:00:00),eth_type(0x0800),ipv4(src=10.0.0.4/255.255.255.255,dst=10.0.0.3/0.0.0.0,proto=1/0xff,tos=0/0,ttl=64/0,frag=no/0xff),icmp(type=8/0,code=0/0), actions: <del>
4819 AT_SETUP([ofproto-dpif megaflow - IPv6 classification])
4821 AT_CHECK([ovs-appctl vlog/set dpif:dbg])
4822 ADD_OF_PORTS([br0], [1], [2])
4823 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], [])
4824 AT_DATA([flows.txt], [dnl
4825 table=0 in_port=1,ipv6,ipv6_src=2001:db8:3c4d:1:2:3:4:5 actions=output(2)
4827 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
4828 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)'])
4829 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)'])
4831 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
4832 skb_priority(0),skb_mark(0/0),recirc_id(0),dp_hash(0/0),in_port(1),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(0x86dd),ipv6(src=2001:db8:3c4d:1:2:3:4:5/ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff,dst=fe80::2/::,label=0/0,proto=10/0,tclass=0x70/0,hlimit=128/0,frag=no/0xff), actions: <del>
4833 skb_priority(0),skb_mark(0/0),recirc_id(0),dp_hash(0/0),in_port(1),eth(src=50:54:00:00:00:09/00:00:00:00:00:00,dst=50:54:00:00:00:0a/00:00:00:00:00:00),eth_type(0x86dd),ipv6(src=2001:db8:3c4d:5:4:3:2:1/ffff:ffff:0:4::,dst=2001:db8:3c4d:1:2:3:4:1/::,label=0/0,proto=99/0,tclass=0x70/0,hlimit=64/0,frag=no/0xff), actions: <del>
4838 AT_SETUP([ofproto-dpif megaflow - L4 classification])
4840 AT_CHECK([ovs-appctl vlog/set dpif:dbg])
4841 ADD_OF_PORTS([br0], [1], [2])
4842 AT_DATA([flows.txt], [dnl
4843 table=0 in_port=1,icmp,icmp_type=8 actions=output(2)
4845 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
4846 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)'])
4848 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)'])
4850 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
4851 skb_priority(0),skb_mark(0/0),recirc_id(0),dp_hash(0/0),in_port(1),eth(src=50:54:00:00:00:09/00:00:00:00:00:00,dst=50:54:00:00:00:0a/00:00:00:00:00:00),eth_type(0x0800),ipv4(src=10.0.0.2/0.0.0.0,dst=10.0.0.1/0.0.0.0,proto=1/0xff,tos=0/0,ttl=64/0,frag=no/0xff),icmp(type=8/0xff,code=0/0), actions: <del>
4856 AT_SETUP([ofproto-dpif megaflow - normal])
4858 AT_CHECK([ovs-appctl vlog/set dpif:dbg])
4859 ADD_OF_PORTS([br0], [1], [2])
4860 AT_CHECK([ovs-ofctl add-flow br0 action=normal])
4861 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)'])
4862 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)'])
4864 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
4865 skb_priority(0),skb_mark(0/0),recirc_id(0),dp_hash(0/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/0.0.0.0,dst=10.0.0.1/0.0.0.0,proto=1/0,tos=0/0,ttl=64/0,frag=no/0xff),icmp(type=8/0,code=0/0), actions: <del>
4866 skb_priority(0),skb_mark(0/0),recirc_id(0),dp_hash(0/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/0.0.0.0,dst=10.0.0.3/0.0.0.0,proto=1/0,tos=0/0,ttl=64/0,frag=no/0xff),icmp(type=8/0,code=0/0), actions: <del>
4871 AT_SETUP([ofproto-dpif megaflow - mpls])
4873 AT_CHECK([ovs-appctl vlog/set dpif:dbg])
4874 ADD_OF_PORTS([br0], [1], [2])
4875 AT_DATA([flows.txt], [dnl
4876 table=0 dl_src=50:54:00:00:00:09 actions=push_mpls:0x8847,2
4877 table=0 dl_src=50:54:00:00:00:0b actions=pop_mpls:0x0800,2
4879 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
4880 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)'])
4881 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)'])
4883 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
4884 skb_priority(0),skb_mark(0/0),recirc_id(0),dp_hash(0/0),in_port(1),eth(src=50:54:00:00:00:09/ff:ff:ff:ff:ff:ff,dst=50:54:00:00:00:0a/00:00:00:00:00:00),eth_type(0x8847),mpls(label=11,tc=3,ttl=64,bos=1), actions: <del>
4885 skb_priority(0),skb_mark(0/0),recirc_id(0),dp_hash(0/0),in_port(1),eth(src=50:54:00:00:00:0b/ff:ff:ff:ff:ff:ff,dst=50:54:00:00:00:0a/00:00:00:00:00:00),eth_type(0x8847),mpls(label=11,tc=3,ttl=64,bos=1), actions: <del>
4890 # CHECK_MEGAFLOW_NETFLOW(LOOPBACK_ADDR, IP_VERSION_TYPE)
4892 # IP_VERSION_TYPE is used in AT_SETUP
4893 m4_define([CHECK_MEGAFLOW_NETFLOW],
4894 [AT_SETUP([ofproto-dpif megaflow - netflow - $2 collector])
4896 AT_CHECK([ovs-appctl vlog/set dpif:dbg])
4897 ADD_OF_PORTS([br0], [1], [2])
4899 dnl NetFlow configuration disables wildcarding relevant fields
4900 ON_EXIT([kill `cat test-netflow.pid`])
4901 AT_CHECK([ovstest test-netflow --log-file --detach --no-chdir --pidfile 0:$1 > netflow.log], [0], [], [ignore])
4902 AT_CAPTURE_FILE([netflow.log])
4903 NETFLOW_PORT=`parse_listening_port < test-netflow.log`
4905 set Bridge br0 netflow=@nf -- \
4906 --id=@nf create NetFlow targets=\"$1:$NETFLOW_PORT\" \
4907 engine_id=1 engine_type=2 active_timeout=30 add-id-to-interface=false
4909 AT_CHECK([ovs-ofctl add-flow br0 action=normal])
4910 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)'])
4911 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)'])
4913 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
4914 skb_priority(0),skb_mark(0/0),recirc_id(0),dp_hash(0/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/255.255.255.255,dst=10.0.0.1/255.255.255.255,proto=1/0xff,tos=0/0xfc,ttl=64/0,frag=no/0xff),icmp(type=8,code=0), actions: <del>
4915 skb_priority(0),skb_mark(0/0),recirc_id(0),dp_hash(0/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/255.255.255.255,dst=10.0.0.3/255.255.255.255,proto=1/0xff,tos=0/0xfc,ttl=64/0,frag=no/0xff),icmp(type=8,code=0), actions: <del>
4920 CHECK_MEGAFLOW_NETFLOW([127.0.0.1], [IPv4])
4921 CHECK_MEGAFLOW_NETFLOW([[[::1]]], [IPv6])
4923 AT_SETUP([ofproto-dpif megaflow - normal, active-backup bonding])
4925 [add-port br0 p1 -- set Interface p1 type=dummy ofport_request=1 -- \
4926 add-bond br0 bond0 p2 p3 bond_mode=active-backup -- \
4927 set interface p2 type=dummy ofport_request=2 -- \
4928 set interface p3 type=dummy ofport_request=3])
4929 AT_CHECK([ovs-appctl netdev-dummy/set-admin-state up], 0, [OK
4931 AT_CHECK([ovs-appctl vlog/set dpif:dbg])
4933 AT_CHECK([ovs-ofctl add-flow br0 action=normal])
4934 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)'])
4935 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)'])
4937 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
4938 skb_priority(0),skb_mark(0/0),recirc_id(0),dp_hash(0/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/0.0.0.0,dst=10.0.0.1/0.0.0.0,proto=1/0,tos=0/0,ttl=64/0,frag=no/0xff),icmp(type=8/0,code=0/0), actions: <del>
4939 skb_priority(0),skb_mark(0/0),recirc_id(0),dp_hash(0/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/0.0.0.0,dst=10.0.0.3/0.0.0.0,proto=1/0,tos=0/0,ttl=64/0,frag=no/0xff),icmp(type=8/0,code=0/0), actions: <del>
4944 AT_SETUP([ofproto-dpif megaflow - normal, balance-slb bonding])
4946 [add-port br0 p1 -- set Interface p1 type=dummy ofport_request=1 -- \
4947 add-bond br0 bond0 p2 p3 bond_mode=balance-slb -- \
4948 set interface p2 type=dummy ofport_request=2 -- \
4949 set interface p3 type=dummy ofport_request=3])
4950 AT_CHECK([ovs-appctl netdev-dummy/set-admin-state up], 0, [OK
4952 AT_CHECK([ovs-appctl vlog/set dpif:dbg])
4954 AT_CHECK([ovs-ofctl add-flow br0 action=normal])
4955 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)'])
4956 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)'])
4958 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
4959 skb_priority(0),skb_mark(0/0),recirc_id(0),dp_hash(0/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/0.0.0.0,dst=10.0.0.1/0.0.0.0,proto=1/0,tos=0/0,ttl=64/0,frag=no/0xff),icmp(type=8/0,code=0/0), actions: <del>
4960 skb_priority(0),skb_mark(0/0),recirc_id(0),dp_hash(0/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/0.0.0.0,dst=10.0.0.3/0.0.0.0,proto=1/0,tos=0/0,ttl=64/0,frag=no/0xff),icmp(type=8/0,code=0/0), actions: <del>
4965 AT_SETUP([ofproto-dpif megaflow - normal, balance-tcp bonding])
4966 # Create bond0 on br0 with interfaces p0 and p1
4967 # and bond1 on br1 with interfaces p2 and p3
4968 # with p0 patched to p2 and p1 patched to p3.
4970 [add-bond br0 bond0 p0 p1 bond_mode=balance-tcp lacp=active \
4971 other-config:lacp-time=fast \
4972 other-config:bond-rebalance-interval=0 -- \
4973 set interface p0 type=patch options:peer=p2 ofport_request=1 -- \
4974 set interface p1 type=patch options:peer=p3 ofport_request=2 -- \
4976 set bridge br1 other-config:hwaddr=aa:66:aa:66:00:00 -- \
4977 set bridge br1 datapath-type=dummy other-config:datapath-id=1234 \
4978 fail-mode=secure -- \
4979 add-bond br1 bond1 p2 p3 bond_mode=balance-tcp lacp=active \
4980 other-config:lacp-time=fast \
4981 other-config:bond-rebalance-interval=0 -- \
4982 set interface p2 type=patch options:peer=p0 ofport_request=3 -- \
4983 set interface p3 type=patch options:peer=p1 ofport_request=4 --])
4985 AT_CHECK([ovs-appctl netdev-dummy/set-admin-state up], 0, [OK
4987 AT_CHECK([ovs-appctl vlog/set dpif:dbg])
4988 ADD_OF_PORTS([br0], [7])
4989 AT_CHECK([ovs-ofctl add-flow br0 action=normal])
4990 AT_CHECK([ovs-ofctl add-flow br1 action=normal])
4991 ovs-appctl time/stop
4992 ovs-appctl time/warp 5000
4993 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)'])
4994 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)'])
4996 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
4997 skb_priority(0),skb_mark(0/0),recirc_id(0),dp_hash(0/0),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/0.0.0.0,dst=10.0.0.1/0.0.0.0,proto=1/0,tos=0/0,ttl=64/0,frag=no/0xff),icmp(type=8/0,code=0/0), actions: <del>
4998 skb_priority(0),skb_mark(0/0),recirc_id(0),dp_hash(0/0),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.4/0.0.0.0,dst=10.0.0.3/0.0.0.0,proto=1/0,tos=0/0,ttl=64/0,frag=no/0xff),icmp(type=8/0,code=0/0), actions: <del>
5003 AT_SETUP([ofproto-dpif megaflow - resubmit port action])
5005 AT_CHECK([ovs-appctl vlog/set dpif:dbg])
5006 ADD_OF_PORTS([br0], [1], [2])
5007 AT_DATA([flows.txt], [dnl
5008 table=0 in_port=1,ip actions=resubmit(90)
5009 table=0 in_port=90,dl_src=50:54:00:00:00:09 actions=output(2)
5011 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5012 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)'])
5013 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)'])
5015 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5016 skb_priority(0),skb_mark(0/0),recirc_id(0),dp_hash(0/0),in_port(1),eth(src=50:54:00:00:00:09/ff:ff:ff:ff:ff:ff,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/0xff),icmp(type=8/0,code=0/0), actions: <del>
5017 skb_priority(0),skb_mark(0/0),recirc_id(0),dp_hash(0/0),in_port(1),eth(src=50:54:00:00:00:0b/ff:ff:00:00:00:02,dst=50:54:00:00:00:0c/00:00:00:00:00:00),eth_type(0x0800),ipv4(src=10.0.0.4/0.0.0.0,dst=10.0.0.3/0.0.0.0,proto=1/0,tos=0/0,ttl=64/0,frag=no/0xff),icmp(type=8/0,code=0/0), actions: <del>
5022 AT_SETUP([ofproto-dpif megaflow - resubmit table action])
5024 AT_CHECK([ovs-appctl vlog/set dpif:dbg])
5025 ADD_OF_PORTS([br0], [1], [2])
5026 AT_DATA([flows.txt], [dnl
5027 table=0 in_port=1,ip actions=resubmit(,1)
5028 table=1 dl_src=50:54:00:00:00:09 actions=output(2)
5030 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5031 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)'])
5032 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=
5033 1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)'])
5035 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5036 skb_priority(0),skb_mark(0/0),recirc_id(0),dp_hash(0/0),in_port(1),eth(src=50:54:00:00:00:09/ff:ff:ff:ff:ff:ff,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/0xff),icmp(type=8/0,code=0/0), actions: <del>
5037 skb_priority(0),skb_mark(0/0),recirc_id(0),dp_hash(0/0),in_port(1),eth(src=50:54:00:00:00:0b/ff:ff:ff:ff:ff:ff,dst=50:54:00:00:00:0c/00:00:00:00:00:00),eth_type(0x0800),ipv4(src=10.0.0.4/0.0.0.0,dst=10.0.0.3/0.0.0.0,proto=1/0,tos=0/0,ttl=64/0,frag=no/0xff),icmp(type=8/0,code=0/0), actions: <del>
5042 AT_SETUP([ofproto-dpif megaflow - goto_table action])
5044 AT_CHECK([ovs-appctl vlog/set dpif:dbg])
5045 ADD_OF_PORTS([br0], [1], [2])
5046 AT_DATA([flows.txt], [dnl
5047 table=0 in_port=1,ip actions=goto_table(1)
5048 table=1 dl_src=50:54:00:00:00:09 actions=output(2)
5050 AT_CHECK([ovs-ofctl -O OpenFlow12 add-flows br0 flows.txt])
5051 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)'])
5052 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)'])
5054 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5055 skb_priority(0),skb_mark(0/0),recirc_id(0),dp_hash(0/0),in_port(1),eth(src=50:54:00:00:00:09/ff:ff:ff:ff:ff:ff,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/0xff),icmp(type=8/0,code=0/0), actions: <del>
5056 skb_priority(0),skb_mark(0/0),recirc_id(0),dp_hash(0/0),in_port(1),eth(src=50:54:00:00:00:0b/ff:ff:ff:ff:ff:ff,dst=50:54:00:00:00:0c/00:00:00:00:00:00),eth_type(0x0800),ipv4(src=10.0.0.4/0.0.0.0,dst=10.0.0.3/0.0.0.0,proto=1/0,tos=0/0,ttl=64/0,frag=no/0xff),icmp(type=8/0,code=0/0), actions: <del>
5061 AT_SETUP([ofproto-dpif megaflow - mirroring, select_all])
5063 AT_CHECK([ovs-appctl vlog/set dpif:dbg])
5064 ADD_OF_PORTS([br0], [1], [2], [3])
5066 set Bridge br0 mirrors=@m --\
5067 --id=@p3 get Port p3 --\
5068 --id=@m create Mirror name=mymirror select_all=true output_port=@p3
5070 AT_DATA([flows.txt], [dnl
5071 in_port=1 actions=output:2
5073 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5074 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)'])
5076 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)'])
5078 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5079 skb_priority(0),skb_mark(0/0),recirc_id(0),dp_hash(0/0),in_port(1),eth(src=50:54:00:00:00:09/00:00:00:00:00:00,dst=50:54:00:00:00:0a/00:00:00:00:00:00),eth_type(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/0xff),icmp(type=8/0,code=0/0), actions: <del>
5084 AT_SETUP([ofproto-dpif megaflow - mirroring, select_vlan])
5086 AT_CHECK([ovs-appctl vlog/set dpif:dbg])
5087 ADD_OF_PORTS([br0], [1], [2], [3])
5089 set Bridge br0 mirrors=@m --\
5090 --id=@p2 get Port p2 -- --id=@p3 get Port p3 --\
5091 --id=@m create Mirror name=mymirror select_all=true select_vlan=11 output_port=@p3
5093 AT_DATA([flows.txt], [dnl
5094 in_port=1 actions=output:2
5096 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5097 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))'])
5098 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)'])
5100 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5101 skb_priority(0),skb_mark(0/0),recirc_id(0),dp_hash(0/0),in_port(1),eth(src=50:54:00:00:00:09/00:00:00:00:00:00,dst=50:54:00:00:00:0a/00:00:00:00:00:00),eth_type(0x8100),vlan(vid=11/0xfff,pcp=7/0x0,cfi=1/1),encap(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/0xff),icmp(type=8/0,code=0/0)), actions: <del>
5102 skb_priority(0),skb_mark(0/0),recirc_id(0),dp_hash(0/0),in_port(1),eth(src=50:54:00:00:00:0b/00:00:00:00:00:00,dst=50:54:00:00:00:0c/00:00:00:00:00:00),eth_type(0x0800),ipv4(src=10.0.0.4/0.0.0.0,dst=10.0.0.3/0.0.0.0,proto=1/0,tos=0/0,ttl=64/0,frag=no/0xff),icmp(type=8/0,code=0/0), actions: <del>
5107 AT_SETUP([ofproto-dpif megaflow - move action])
5109 AT_CHECK([ovs-appctl vlog/set dpif:dbg])
5110 ADD_OF_PORTS([br0], [1], [2])
5111 AT_DATA([flows.txt], [dnl
5112 table=0 in_port=1 ip,actions=move:NXM_OF_IP_SRC[[]]->NXM_NX_REG0[[]],resubmit(90)
5113 table=0 in_port=90 ip,actions=move:NXM_NX_REG0[[]]->NXM_NX_REG1[[]],resubmit(91)
5114 table=0 in_port=91 reg0=0x0a000002,actions=output(2)
5116 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5117 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)'])
5118 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)'])
5120 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5121 skb_priority(0),skb_mark(0/0),recirc_id(0),dp_hash(0/0),in_port(1),eth(src=50:54:00:00:00:09/00:00:00:00:00:00,dst=50:54:00:00:00:0a/00:00:00:00:00:00),eth_type(0x0800),ipv4(src=10.0.0.2/255.255.255.255,dst=10.0.0.1/0.0.0.0,proto=1/0,tos=0/0,ttl=64/0,frag=no/0xff),icmp(type=8/0,code=0/0), actions: <del>
5122 skb_priority(0),skb_mark(0/0),recirc_id(0),dp_hash(0/0),in_port(1),eth(src=50:54:00:00:00:0b/00:00:00:00:00:00,dst=50:54:00:00:00:0c/00:00:00:00:00:00),eth_type(0x0800),ipv4(src=10.0.0.4/255.255.255.255,dst=10.0.0.3/0.0.0.0,proto=1/0,tos=0/0,ttl=64/0,frag=no/0xff),icmp(type=8/0,code=0/0), actions: <del>
5127 AT_SETUP([ofproto-dpif megaflow - push action])
5129 AT_CHECK([ovs-appctl vlog/set dpif:dbg])
5130 ADD_OF_PORTS([br0], [1], [2])
5131 AT_DATA([flows.txt], [dnl
5132 table=0 in_port=1 ip,actions=push:NXM_OF_IP_SRC[[]],output(2)
5134 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5135 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)'])
5136 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)'])
5138 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5139 skb_priority(0),skb_mark(0/0),recirc_id(0),dp_hash(0/0),in_port(1),eth(src=50:54:00:00:00:09/00:00:00:00:00:00,dst=50:54:00:00:00:0a/00:00:00:00:00:00),eth_type(0x0800),ipv4(src=10.0.0.2/255.255.255.255,dst=10.0.0.1/0.0.0.0,proto=1/0,tos=0/0,ttl=64/0,frag=no/0xff),icmp(type=8/0,code=0/0), actions: <del>
5140 skb_priority(0),skb_mark(0/0),recirc_id(0),dp_hash(0/0),in_port(1),eth(src=50:54:00:00:00:0b/00:00:00:00:00:00,dst=50:54:00:00:00:0c/00:00:00:00:00:00),eth_type(0x0800),ipv4(src=10.0.0.4/255.255.255.255,dst=10.0.0.3/0.0.0.0,proto=1/0,tos=0/0,ttl=64/0,frag=no/0xff),icmp(type=8/0,code=0/0), actions: <del>
5145 AT_SETUP([ofproto-dpif megaflow - learning])
5147 AT_CHECK([ovs-appctl vlog/set dpif:dbg])
5148 ADD_OF_PORTS([br0], [1], [2])
5149 AT_DATA([flows.txt], [dnl
5150 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
5152 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5153 ovs-appctl time/stop
5154 # We send each packet twice because the first packet in each flow causes the
5155 # flow table to change and thus revalidations, which (depending on timing)
5156 # can keep a megaflow from being installed. The revalidations are done by
5157 # the second iteration, allowing the flows to be installed.
5159 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)'])
5160 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)'])
5161 ovs-appctl time/warp 100
5164 dnl The original flow is missing due to a revalidation.
5165 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5166 skb_priority(0),skb_mark(0/0),recirc_id(0),dp_hash(0/0),in_port(1),eth(src=50:54:00:00:00:09/ff:ff:ff:ff:ff:ff,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/0xff),icmp(type=8/0,code=0/0), actions: <del>
5167 skb_priority(0),skb_mark(0/0),recirc_id(0),dp_hash(0/0),in_port(1),eth(src=50:54:00:00:00:0b/ff:ff:ff:ff:ff:ff,dst=50:54:00:00:00:0c/00:00:00:00:00:00),eth_type(0x0800),ipv4(src=10.0.0.4/0.0.0.0,dst=10.0.0.3/0.0.0.0,proto=1/0,tos=0/0,ttl=64/0,frag=no/0xff),icmp(type=8/0,code=0/0), actions: <del>
5172 AT_SETUP([ofproto-dpif megaflow - tunnels])
5174 [add-port br0 p1 -- set Interface p1 type=dummy ofport_request=1])
5175 AT_CHECK([ovs-appctl vlog/set dpif:dbg])
5176 AT_CHECK([ovs-vsctl add-port br0 p2 -- set Interface p2 type=gre \
5177 options:remote_ip=1.1.1.1 ofport_request=2 options:key=flow])
5178 AT_CHECK([ovs-vsctl add-port br0 p3 -- set Interface p3 type=dummy \
5180 AT_CHECK([ovs-vsctl add-port br0 p4 -- set Interface p4 type=gre \
5181 options:remote_ip=1.1.1.2 options:tos=inherit options:ttl=inherit \
5182 ofport_request=4 options:key=flow])
5183 AT_DATA([flows.txt], [dnl
5184 in_port=1,actions=output(2)
5185 in_port=3,actions=output(4)
5187 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5188 dnl ECN bits are always copied out, but don't use 0x3 (CE), since that
5189 dnl will cause the packet to be dropped.
5190 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)'])
5192 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)'])
5193 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)'])
5195 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)'])
5197 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5198 skb_priority(0),skb_mark(0/0),recirc_id(0),dp_hash(0/0),in_port(1),eth(src=50:54:00:00:00:09/00:00:00:00:00:00,dst=50:54:00:00:00:0a/00:00:00:00:00:00),eth_type(0x0800),ipv4(src=10.0.0.2/0.0.0.0,dst=10.0.0.1/0.0.0.0,proto=1/0,tos=0xfd/0x3,ttl=128/0,frag=no/0xff),icmp(type=8/0,code=0/0), actions: <del>
5199 skb_priority(0),skb_mark(0/0),recirc_id(0),dp_hash(0/0),in_port(3),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=0xfd/0xff,ttl=128/0xff,frag=no/0xff),icmp(type=8/0,code=0/0), actions: <del>
5200 skb_priority(0),skb_mark(0/0),recirc_id(0),dp_hash(0/0),in_port(3),eth(src=50:54:00:00:00:0b/00:00:00:00:00:00,dst=50:54:00:00:00:0c/00:00:00:00:00:00),eth_type(0x0800),ipv4(src=10.0.0.4/0.0.0.0,dst=10.0.0.3/0.0.0.0,proto=1/0,tos=0x1/0xff,ttl=64/0xff,frag=no/0xff),icmp(type=8/0,code=0/0), actions: <del>
5205 AT_SETUP([ofproto-dpif megaflow - dec_ttl])
5207 AT_CHECK([ovs-appctl vlog/set dpif:dbg])
5208 ADD_OF_PORTS([br0], [1], [2])
5209 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], [])
5210 AT_DATA([flows.txt], [dnl
5211 table=0 in_port=1,icmp,nw_src=10.0.0.4 actions=dec_ttl,output(2)
5213 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5214 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)'])
5215 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)'])
5217 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl
5218 skb_priority(0),skb_mark(0/0),recirc_id(0),dp_hash(0/0),in_port(1),eth(src=50:54:00:00:00:09/00:00:00:00:00:00,dst=50:54:00:00:00:0a/00:00:00:00:00:00),eth_type(0x0800),ipv4(src=10.0.0.2/0.0.0.2,dst=10.0.0.1/0.0.0.0,proto=1/0,tos=0/0,ttl=64/0,frag=no/0xff),icmp(type=8/0,code=0/0), actions: <del>
5219 skb_priority(0),skb_mark(0/0),recirc_id(0),dp_hash(0/0),in_port(1),eth(src=50:54:00:00:00:0b/00:00:00:00:00:00,dst=50:54:00:00:00:0c/00:00:00:00:00:00),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/0,code=0/0), actions: <del>
5224 AT_SETUP([ofproto-dpif megaflow - set dl_dst])
5226 AT_CHECK([ovs-appctl vlog/set dpif:dbg])
5227 ADD_OF_PORTS([br0], [1], [2])
5228 AT_DATA([flows.txt], [dnl
5229 table=0 in_port=1 actions=mod_dl_dst(50:54:00:00:00:0a),output(2)
5231 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5232 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)'])
5233 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)'])
5235 dnl The megaflows do not match the same fields, since the first packet
5236 dnl is essentially a no-op. (The new destination MAC is the same as the
5237 dnl original.) The ofproto-dpif library un-wildcards the destination MAC
5238 dnl so that a packet that doesn't need its MAC address changed doesn't
5239 dnl hide one that does. Since the first entry doesn't need to change,
5240 dnl only the destination MAC address is matched (as decided by
5241 dnl ofproto-dpif). The second entry actually updates the destination
5242 dnl MAC, so both the source and destination MAC addresses are
5243 dnl un-wildcarded, since the ODP commit functions update both the source
5244 dnl and destination MAC addresses.
5245 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_USED], [0], [dnl
5246 skb_priority(0),skb_mark(0/0),recirc_id(0),dp_hash(0/0),in_port(1),eth(src=50:54:00:00:00:09/00:00:00:00:00:00,dst=50:54:00:00:00:0a/ff:ff:ff:ff:ff:ff),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/0xff),icmp(type=8/0,code=0/0), actions:2
5247 skb_priority(0),skb_mark(0/0),recirc_id(0),dp_hash(0/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/0.0.0.0,dst=10.0.0.3/0.0.0.0,proto=1/0,tos=0/0,ttl=64/0,frag=no/0xff),icmp(type=8/0,code=0/0), actions:set(eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0a)),2
5252 AT_SETUP([ofproto-dpif megaflow - disabled])
5254 AT_CHECK([ovs-appctl vlog/set dpif:dbg])
5255 ADD_OF_PORTS([br0], [1], [2])
5256 AT_DATA([flows.txt], [dnl
5257 table=0 in_port=1,ip,nw_dst=10.0.0.1 actions=output(2)
5258 table=0 in_port=1,ip,nw_dst=10.0.0.3 actions=drop
5260 AT_CHECK([ovs-appctl upcall/disable-megaflows], [0], [megaflows disabled
5262 AT_CHECK([ovs-appctl vlog/set dpif_netdev:dbg], [0], [], [])
5263 AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
5264 for i in 1 2 3 4; do
5265 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)'])
5266 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)'])
5267 if [[ $i -eq 1 ]]; then
5272 AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_USED], [0], [dnl
5273 skb_priority(0),skb_mark(0),recirc_id(0),dp_hash(0),in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0), actions:2
5274 skb_priority(0),skb_mark(0),recirc_id(0),dp_hash(0),in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4,dst=10.0.0.3,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0), actions:drop
5276 AT_CHECK([cat ovs-vswitchd.log | grep '00:09.*packets:3' | FILTER_FLOW_DUMP], [0], [dnl
5277 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
5279 AT_CHECK([cat ovs-vswitchd.log | grep '00:0b.*packets:3' | FILTER_FLOW_DUMP], [0], [dnl
5280 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
5285 AT_SETUP([ofproto-dpif - datapath port number change])
5286 OVS_VSWITCHD_START([set Bridge br0 fail-mode=standalone])
5287 ADD_OF_PORTS([br0], 1)
5289 # Trace a flow that should output to p1.
5290 AT_CHECK([ovs-appctl ofproto/trace br0 in_port=LOCAL,dl_src=10:20:30:40:50:60],
5292 AT_CHECK([tail -1 stdout], [0], [Datapath actions: 1
5295 # Change p1's port number to 5.
5296 AT_CHECK([ovs-appctl dpif-dummy/change-port-number ovs-dummy p1 5])
5298 # Trace a flow that should output to p1 in its new location.
5299 AT_CHECK([ovs-appctl ofproto/trace br0 in_port=LOCAL,dl_src=10:20:30:40:50:60],
5301 AT_CHECK([tail -1 stdout], [0], [Datapath actions: 5
5306 # Tests the bundling with various bfd and cfm configurations.
5307 AT_SETUP([ofproto - bundle with variable bfd/cfm config])
5308 OVS_VSWITCHD_START([add-br br1 -- set bridge br1 datapath-type=dummy -- \
5309 add-bond br0 br0bond p0 p2 bond-mode=active-backup -- \
5310 add-bond br1 br1bond p1 p3 bond-mode=active-backup -- \
5311 set Interface p1 type=patch options:peer=p0 ofport_request=2 -- \
5312 set Interface p3 type=patch options:peer=p2 ofport_request=4 -- \
5313 set Interface p0 type=patch options:peer=p1 ofport_request=1 -- \
5314 set Interface p2 type=patch options:peer=p3 ofport_request=3 -- \
5315 set Interface p0 bfd:enable=true bfd:min_tx=300 bfd:min_rx=300 -- \
5316 set Interface p0 cfm_mpid=1 -- \
5317 set Interface p1 bfd:enable=true bfd:min_tx=500 bfd:min_rx=500])
5319 ovs-appctl time/stop
5320 # advance the clock to stablize everything.
5321 for i in `seq 0 49`; do ovs-appctl time/warp 100; done
5322 # cfm/show should show 'recv' fault.
5323 AT_CHECK([ovs-appctl cfm/show | sed -n '/^.*fault:.*/p'], [0], [dnl
5326 # bfd/show should show 'up'.
5327 AT_CHECK([ovs-appctl bfd/show | sed -n '/^.*Session State:.*/p'], [0], [dnl
5328 Local Session State: up
5329 Remote Session State: up
5330 Local Session State: up
5331 Remote Session State: up
5333 # bond/show should show 'may-enable: true' for all slaves.
5334 AT_CHECK([ovs-appctl bond/show | sed -n '/^.*may_enable:.*/p'], [0], [dnl
5341 # now disable the bfd on p1.
5342 AT_CHECK([ovs-vsctl set Interface p1 bfd:enable=false])
5343 # advance the clock to stablize everything.
5344 for i in `seq 0 49`; do ovs-appctl time/warp 100; done
5345 # cfm/show should show 'recv' fault.
5346 AT_CHECK([ovs-appctl cfm/show | sed -n '/^.*fault:.*/p'], [0], [dnl
5349 # bfd/show should show 'down'.
5350 AT_CHECK([ovs-appctl bfd/show | sed -n '/^.*Session State:.*/p'], [0], [dnl
5351 Local Session State: down
5352 Remote Session State: down
5354 # bond/show should show 'may-enable: false' for p0.
5355 AT_CHECK([ovs-appctl bond/show br0bond | sed -n '/^.*may_enable:.*/p'], [0], [dnl
5360 # now enable the bfd on p1 and disable bfd on p0.
5361 AT_CHECK([ovs-vsctl set Interface p1 bfd:enable=true])
5362 AT_CHECK([ovs-vsctl set Interface p0 bfd:enable=false])
5363 # advance the clock to stablize everything.
5364 for i in `seq 0 49`; do ovs-appctl time/warp 100; done
5365 # cfm/show should show 'recv' fault.
5366 AT_CHECK([ovs-appctl cfm/show | sed -n '/^.*fault:.*/p'], [0], [dnl
5369 # bfd/show should show 'down'.
5370 AT_CHECK([ovs-appctl bfd/show | sed -n '/^.*Session State:.*/p'], [0], [dnl
5371 Local Session State: down
5372 Remote Session State: down
5374 # bond/show should show 'may-enable: false' for p0 and p1.
5375 AT_CHECK([ovs-appctl bond/show | sed -n '/^.*may_enable:.*/p'], [0], [dnl
5385 AT_SETUP([ofproto-dpif - ofproto-dpif-monitor 1])
5386 OVS_VSWITCHD_START([add-port br0 p0 -- set interface p0 type=gre options:remote_ip=1.2.3.4])
5389 AT_CHECK([ovs-vsctl set interface p0 bfd:enable=true])
5391 OVS_WAIT_UNTIL([grep "monitor thread created" ovs-vswitchd.log])
5392 # disable bfd on p0.
5393 AT_CHECK([ovs-vsctl set interface p0 bfd:enable=false])
5395 OVS_WAIT_UNTIL([grep "monitor thread terminated" ovs-vswitchd.log])
5396 AT_CHECK([cat ovs-vswitchd.log | sed -e '/^.*ofproto_dpif_monitor.*$/d' > ovs-vswitchd.log])
5399 AT_CHECK([ovs-vsctl set interface p0 cfm_mpid=10])
5401 OVS_WAIT_UNTIL([grep "monitor thread created" ovs-vswitchd.log])
5402 # disable cfm on p0.
5403 AT_CHECK([ovs-vsctl remove interface p0 cfm_mpid 10])
5405 OVS_WAIT_UNTIL([grep "monitor thread terminated" ovs-vswitchd.log])
5406 AT_CHECK([cat ovs-vswitchd.log | sed -e '/^.*ofproto_dpif_monitor.*$/d' > ovs-vswitchd.log])
5408 # enable both bfd and cfm on p0.
5409 AT_CHECK([ovs-vsctl set interface p0 bfd:enable=true cfm_mpid=10])
5411 OVS_WAIT_UNTIL([grep "monitor thread created" ovs-vswitchd.log])
5412 # disable bfd on p0.
5413 AT_CHECK([ovs-vsctl set interface p0 bfd:enable=false])
5414 # check log, there should not be the log of thread terminated.
5415 AT_CHECK([sed -n "s/^.*|ofproto_dpif_monitor(monitor[[0-9]]*)|INFO|\(.* terminated\)$/\1/p" ovs-vswitchd.log], [0], [dnl
5417 # reenable bfd on p0.
5418 AT_CHECK([ovs-vsctl set interface p0 bfd:enable=true])
5419 # check log, should still be on log of thread created.
5420 AT_CHECK([sed -n "s/^.*|ofproto_dpif_monitor(monitor[[0-9]]*)|INFO|\(.* created\)$/\1/p" ovs-vswitchd.log], [0], [dnl
5421 monitor thread created
5423 # disable bfd and cfm together.
5424 AT_CHECK([ovs-vsctl set interface p0 bfd:enable=false -- remove interface p0 cfm_mpid 10])
5426 OVS_WAIT_UNTIL([grep "monitor thread terminated" ovs-vswitchd.log])
5431 # this test helps avoid the deadlock between the main thread and monitor thread.
5432 AT_SETUP([ofproto-dpif - ofproto-dpif-monitor 2])
5435 for i in `seq 1 199`
5437 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])
5443 AT_BANNER([ofproto-dpif - flow translation resource limits])
5445 AT_SETUP([ofproto-dpif - infinite resubmit])
5447 AT_CHECK([ovs-ofctl add-flow br0 actions=resubmit:1,resubmit:2,output:3])
5448 AT_CHECK([ovs-appctl ofproto/trace br0 'eth_dst=ff:ff:ff:ff:ff:ff'],
5450 AT_CHECK([tail -1 stdout], [0], [Datapath actions: drop
5452 AT_CHECK([grep -c 'resubmit actions recursed over 64 times' ovs-vswitchd.log],
5455 OVS_VSWITCHD_STOP(["/resubmit actions recursed/d"])
5458 AT_SETUP([ofproto-dpif - exponential resubmit chain])
5460 ADD_OF_PORTS([br0], 1)
5461 (for i in `seq 1 64`; do
5463 echo "in_port=$i, actions=resubmit:$j, resubmit:$j, local"
5465 echo "in_port=65, actions=local") > flows
5466 AT_CHECK([ovs-ofctl add-flows br0 flows])
5467 AT_CHECK([ovs-appctl ofproto/trace br0 'in_port=1'], [0], [stdout])
5468 AT_CHECK([grep -c 'over 4096 resubmit actions' ovs-vswitchd.log], [0], [1
5470 OVS_VSWITCHD_STOP(["/over.*resubmit actions/d"])
5473 AT_SETUP([ofproto-dpif - too many output actions])
5475 ADD_OF_PORTS([br0], 1)
5476 (for i in `seq 1 12`; do
5478 echo "in_port=$i, actions=resubmit:$j, resubmit:$j, local"
5480 echo "in_port=13, actions=local,local,local,local,local,local,local,local") > flows
5481 AT_CHECK([ovs-ofctl add-flows br0 flows])
5482 AT_CHECK([ovs-appctl ofproto/trace br0 'in_port=1'], [0], [stdout])
5483 AT_CHECK([grep -c -e '- Uses action(s) not supported by datapath' stdout],
5486 AT_CHECK([grep -c 'resubmits yielded over 64 kB of actions' ovs-vswitchd.log], [0], [1
5488 OVS_VSWITCHD_STOP(["/resubmits yielded over 64 kB of actions/d"])
5491 AT_SETUP([ofproto-dpif - stack too deep])
5493 ADD_OF_PORTS([br0], 1)
5494 (for i in `seq 1 12`; do
5496 echo "in_port=$i, actions=resubmit:$j, resubmit:$j, local"
5498 push="push:NXM_NX_REG0[[]]"
5499 echo "in_port=13, actions=$push,$push,$push,$push,$push,$push,$push,$push") > flows
5500 AT_CHECK([ovs-ofctl add-flows br0 flows])
5501 AT_CHECK([ovs-appctl ofproto/trace br0 'in_port=1'], [0], [stdout])
5502 AT_CHECK([grep -c 'resubmits yielded over 64 kB of stack' ovs-vswitchd.log], [0], [1
5504 OVS_VSWITCHD_STOP(["/resubmits yielded over 64 kB of stack/d"])
5508 AT_SETUP([ofproto-dpif packet-out controller])
5510 ADD_OF_PORTS([br0], 1, 2)
5512 AT_CHECK([ovs-ofctl add-flow br0 'dl_dst=50:54:00:00:00:0a actions=controller'])
5514 AT_CAPTURE_FILE([ofctl_monitor.log])
5515 AT_CHECK([ovs-ofctl monitor br0 65534 invalid_ttl --detach --no-chdir --pidfile 2> ofctl_monitor.log])
5518 AT_CHECK([ovs-ofctl -O OpenFlow13 packet-out br0 CONTROLLER controller '50540000000a5054000000091234'])
5521 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
5522 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
5523 NXT_PACKET_IN (xid=0x0): total_len=14 in_port=CONTROLLER (via action) data_len=14 (unbuffered)
5524 metadata=0,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
5526 NXT_PACKET_IN (xid=0x0): total_len=14 in_port=CONTROLLER (via action) data_len=14 (unbuffered)
5527 metadata=0,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
5529 NXT_PACKET_IN (xid=0x0): total_len=14 in_port=CONTROLLER (via action) data_len=14 (unbuffered)
5530 metadata=0,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
5533 AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl
5534 dl_dst=50:54:00:00:00:0a actions=CONTROLLER:65535
5538 (echo "OFPST_TABLE reply (OF1.3) (xid=0x2): 254 tables"
5539 echo " 0: active=1, lookup=0, matched=0"
5541 while test $x -lt 254; do
5542 echo " $x: active=0, lookup=0, matched=0"
5545 AT_CHECK([ovs-ofctl -O OpenFlow13 dump-tables br0 ], [0], [expout])
5551 AT_SETUP([ofproto-dpif packet-out controller (patch port)])
5554 add-port br0 p1 -- \
5555 set interface p1 type=patch options:peer=p2 -- \
5557 set bridge br1 datapath-type=dummy -- \
5558 set bridge br1 fail-mode=secure -- \
5559 set bridge br1 protocols='[OpenFlow10,OpenFlow11,OpenFlow12,OpenFlow13]' -- \
5560 add-port br1 p2 -- \
5561 set interface p2 type=patch options:peer=p1 --])
5563 AT_CAPTURE_FILE([ofctl_monitor.log])
5564 AT_CHECK([ovs-ofctl monitor br1 65534 invalid_ttl --detach --no-chdir --pidfile 2> ofctl_monitor.log])
5567 AT_CHECK([ovs-ofctl -O OpenFlow13 packet-out br0 CONTROLLER output:1 '50540000000a5054000000091234'])
5570 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
5571 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
5572 NXT_PACKET_IN (xid=0x0): cookie=0x0 total_len=14 in_port=1 (via no_match) data_len=14 (unbuffered)
5573 metadata=0,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
5575 NXT_PACKET_IN (xid=0x0): cookie=0x0 total_len=14 in_port=1 (via no_match) data_len=14 (unbuffered)
5576 metadata=0,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
5578 NXT_PACKET_IN (xid=0x0): cookie=0x0 total_len=14 in_port=1 (via no_match) data_len=14 (unbuffered)
5579 metadata=0,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
5582 (echo "OFPST_TABLE reply (OF1.3) (xid=0x2): 254 tables"
5584 while test $x -lt 254; do
5585 echo " $x: active=0, lookup=0, matched=0"
5588 AT_CHECK([ovs-ofctl -O OpenFlow13 dump-tables br0 ], [0], [expout])
5590 (echo "OFPST_TABLE reply (OF1.3) (xid=0x2): 254 tables"
5591 echo " 0: active=0, lookup=3, matched=0"
5593 while test $x -lt 254; do
5594 echo " $x: active=0, lookup=0, matched=0"
5597 AT_CHECK([ovs-ofctl -O OpenFlow13 dump-tables br1 ], [0], [expout])
5603 AT_SETUP([ofproto-dpif packet-out goto_table])
5605 ADD_OF_PORTS([br0], 1, 2)
5607 AT_DATA([flows.txt], [dnl
5608 table=0 dl_dst=50:54:00:00:00:0a actions=goto_table(1)
5609 table=1 dl_dst=50:54:00:00:00:0a actions=controller
5611 AT_CHECK([ovs-ofctl -O OpenFlow13 add-flows br0 flows.txt])
5613 AT_CAPTURE_FILE([ofctl_monitor.log])
5614 AT_CHECK([ovs-ofctl monitor br0 65534 invalid_ttl --detach --no-chdir --pidfile 2> ofctl_monitor.log])
5617 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)'
5620 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
5621 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
5622 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
5623 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
5624 metadata=0,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
5626 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
5627 metadata=0,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
5629 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
5630 metadata=0,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
5633 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
5635 AT_CHECK([ovs-ofctl -O OpenFlow13 dump-flows br0 | ofctl_strip | sort], [0], [dnl
5636 n_packets=3, n_bytes=180, dl_dst=50:54:00:00:00:0a actions=goto_table:1
5637 table=1, n_packets=3, n_bytes=180, dl_dst=50:54:00:00:00:0a actions=CONTROLLER:65535
5638 OFPST_FLOW reply (OF1.3):
5641 (echo "OFPST_TABLE reply (OF1.3) (xid=0x2): 254 tables"
5642 echo " 0: active=1, lookup=3, matched=3"
5643 echo " 1: active=1, lookup=3, matched=3"
5645 while test $x -lt 254; do
5646 echo " $x: active=0, lookup=0, matched=0"
5649 AT_CHECK([ovs-ofctl -O OpenFlow13 dump-tables br0 ], [0], [expout])
5655 AT_SETUP([ofproto-dpif packet-out table-miss (continue)])
5657 ADD_OF_PORTS([br0], 1, 2)
5659 AT_CHECK([ovs-ofctl -O OpenFlow13 add-flow br0 'table=1 dl_dst=50:54:00:00:00:0a actions=controller'])
5660 AT_CHECK([ovs-ofctl -O OpenFlow13 mod-table br0 all continue])
5662 AT_CAPTURE_FILE([ofctl_monitor.log])
5663 AT_CHECK([ovs-ofctl monitor br0 65534 invalid_ttl --detach --no-chdir --pidfile 2> ofctl_monitor.log])
5666 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)'
5669 OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6])
5670 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
5671 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
5672 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
5673 metadata=0,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
5675 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
5676 metadata=0,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
5678 NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered)
5679 metadata=0,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
5682 AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
5684 AT_CHECK([ovs-ofctl -O OpenFlow13 dump-flows br0 | ofctl_strip | sort], [0], [dnl
5685 table=1, n_packets=3, n_bytes=180, dl_dst=50:54:00:00:00:0a actions=CONTROLLER:65535
5686 OFPST_FLOW reply (OF1.3):
5689 (echo "OFPST_TABLE reply (OF1.3) (xid=0x2): 254 tables"
5690 echo " 0: active=0, lookup=3, matched=0"
5691 echo " 1: active=1, lookup=3, matched=3"
5693 while test $x -lt 254; do
5694 echo " $x: active=0, lookup=0, matched=0"
5697 AT_CHECK([ovs-ofctl -O OpenFlow13 dump-tables br0 ], [0], [expout])
5702 AT_SETUP([ofproto-dpif - ICMPv6])
5704 ADD_OF_PORTS([br0], 1)
5706 AT_CAPTURE_FILE([ofctl_monitor.log])
5708 AT_CHECK([ovs-ofctl monitor br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log])
5710 ovs-appctl netdev-dummy/receive p1 '0060970769ea0000860580da86dd6000000000203afffe80000000000000020086fffe0580dafe80000000000000026097fffe0769ea870068bd00000000fe80000000000000026097fffe0769ea01010000860580da'
5712 OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit])
5714 AT_CHECK([cat ofctl_monitor.log], [0], [dnl
5715 NXT_PACKET_IN (xid=0x0): cookie=0x0 total_len=86 in_port=1 (via no_match) data_len=86 (unbuffered)
5716 icmp6,metadata=0,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