]>
Commit | Line | Data |
---|---|---|
29901626 BP |
1 | AT_BANNER([ofproto-dpif]) |
2 | ||
27f57736 JS |
3 | AT_SETUP([ofproto-dpif - revalidator/wait]) |
4 | OVS_VSWITCHD_START | |
5 | AT_CHECK([ovs-appctl revalidator/wait]) | |
6 | OVS_VSWITCHD_STOP | |
7 | AT_CLEANUP | |
8 | ||
5f5ebd4c | 9 | AT_SETUP([ofproto-dpif - active-backup bonding]) |
adcf00ba AZ |
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. | |
13 | OVS_VSWITCHD_START( | |
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 -- \ | |
18 | add-br br1 -- \ | |
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 \ | |
21 | fail-mode=secure -- \ | |
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 --]) | |
55466d72 | 25 | WAIT_FOR_DUMMY_PORTS([p3], [p4]) |
623540e4 | 26 | AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg]) |
adcf00ba AZ |
27 | |
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 | |
33 | ovs-appctl time/stop | |
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)']) | |
bdba1947 | 43 | ovs-appctl time/warp 200 100 |
53555f51 | 44 | sleep 1 |
623540e4 | 45 | AT_CHECK([cat ovs-vswitchd.log | grep 'in_port=[[348]]' | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl |
16194afd DDP |
46 | recirc_id=0,ip,in_port=3,vlan_tci=0x0000/0x1fff,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,nw_frag=no, actions: <del> |
47 | recirc_id=0,ip,in_port=3,vlan_tci=0x0000/0x1fff,dl_src=50:54:00:00:00:0b,dl_dst=50:54:00:00:00:0c,nw_frag=no, actions: <del> | |
48 | recirc_id=0,ip,in_port=4,vlan_tci=0x0000/0x1fff,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0d,nw_frag=no, actions: <del> | |
49 | recirc_id=0,ip,in_port=4,vlan_tci=0x0000/0x1fff,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0e,nw_frag=no, actions: <del> | |
50 | recirc_id=0,rarp,in_port=4,vlan_tci=0x0000/0x1fff,dl_src=50:54:00:00:00:09,dl_dst=ff:ff:ff:ff:ff:ff, actions: <del> | |
51 | recirc_id=0,rarp,in_port=4,vlan_tci=0x0000/0x1fff,dl_src=50:54:00:00:00:0b,dl_dst=ff:ff:ff:ff:ff:ff, actions: <del> | |
adcf00ba AZ |
52 | ]) |
53 | OVS_VSWITCHD_STOP | |
54 | AT_CLEANUP | |
55 | ||
5f5ebd4c | 56 | AT_SETUP([ofproto-dpif - balance-slb bonding]) |
adcf00ba AZ |
57 | # Create br0 with interfaces bond0(p1, p2, p3) and p7, |
58 | # and br1 with interfaces p4, p5, p6 and p8. | |
59 | # p1 <-> p4, p2 <-> p5, p3 <-> p6 | |
60 | # Send some traffic, make sure the traffic are spread based on source mac. | |
61 | OVS_VSWITCHD_START( | |
62 | [add-bond br0 bond0 p1 p2 p3 bond_mode=balance-slb --\ | |
63 | set interface p1 type=dummy options:pstream=punix:$OVS_RUNDIR/p1.sock ofport_request=1 -- \ | |
64 | set interface p2 type=dummy options:pstream=punix:$OVS_RUNDIR/p2.sock ofport_request=2 -- \ | |
65 | set interface p3 type=dummy options:pstream=punix:$OVS_RUNDIR/p3.sock ofport_request=3 -- \ | |
66 | add-port br0 p7 -- set interface p7 ofport_request=7 type=dummy -- \ | |
67 | add-br br1 -- \ | |
68 | set bridge br1 other-config:hwaddr=aa:66:aa:66:00:00 -- \ | |
69 | set bridge br1 datapath-type=dummy other-config:datapath-id=1234 \ | |
70 | fail-mode=secure -- \ | |
71 | add-port br1 p4 -- set interface p4 type=dummy options:stream=unix:$OVS_RUNDIR/p1.sock ofport_request=4 -- \ | |
72 | add-port br1 p5 -- set interface p5 type=dummy options:stream=unix:$OVS_RUNDIR/p2.sock ofport_request=5 -- \ | |
73 | add-port br1 p6 -- set interface p6 type=dummy options:stream=unix:$OVS_RUNDIR/p3.sock ofport_request=6 -- \ | |
74 | add-port br1 p8 -- set interface p8 ofport_request=8 type=dummy --]) | |
55466d72 | 75 | WAIT_FOR_DUMMY_PORTS([p4], [p5], [p6]) |
adcf00ba AZ |
76 | AT_CHECK([ovs-ofctl add-flow br0 action=normal]) |
77 | AT_CHECK([ovs-ofctl add-flow br1 action=normal]) | |
78 | AT_CHECK([ovs-appctl netdev-dummy/set-admin-state up], 0, [OK | |
79 | ]) | |
adcf00ba AZ |
80 | ovs-appctl time/stop |
81 | ovs-appctl time/warp 100 | |
82 | ( | |
83 | for i in `seq 0 100 |xargs printf '%02x\n'`; | |
84 | do | |
85 | pkt="in_port(7),eth(src=50:54:00:00:00:$i,dst=50:54:00:00:01:00),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)" | |
86 | AT_CHECK([ovs-appctl netdev-dummy/receive p7 $pkt]) | |
87 | done | |
88 | ) | |
89 | ovs-appctl time/warp 100 | |
90 | AT_CHECK([ovs-appctl dpif/dump-flows br1 > br1_flows.txt]) | |
91 | # Make sure there is resonable distribution to all three ports. | |
92 | # We don't want to make this check precise, in case hash function changes. | |
93 | AT_CHECK([test `egrep 'in_port\(4\)' br1_flows.txt |wc -l` -gt 3]) | |
94 | AT_CHECK([test `egrep 'in_port\(5\)' br1_flows.txt |wc -l` -gt 3]) | |
95 | AT_CHECK([test `egrep 'in_port\(6\)' br1_flows.txt |wc -l` -gt 3]) | |
96 | OVS_VSWITCHD_STOP | |
97 | AT_CLEANUP | |
98 | ||
5f5ebd4c | 99 | AT_SETUP([ofproto-dpif - balance-tcp bonding]) |
adcf00ba AZ |
100 | # Create br0 with interfaces bond0(p1, p2, p3) and p7, |
101 | # and br1 with interfaces bond1(p4, p5, p6) and p8. | |
102 | # bond0 <-> bond1 | |
103 | # Send some traffic, make sure the traffic are spread based on L4 headers. | |
104 | OVS_VSWITCHD_START( | |
105 | [add-bond br0 bond0 p1 p2 p3 bond_mode=balance-tcp lacp=active \ | |
106 | other-config:lacp-time=fast other-config:bond-rebalance-interval=0 --\ | |
107 | set interface p1 type=dummy options:pstream=punix:$OVS_RUNDIR/p1.sock ofport_request=1 -- \ | |
108 | set interface p2 type=dummy options:pstream=punix:$OVS_RUNDIR/p2.sock ofport_request=2 -- \ | |
109 | set interface p3 type=dummy options:pstream=punix:$OVS_RUNDIR/p3.sock ofport_request=3 -- \ | |
110 | add-port br0 p7 -- set interface p7 ofport_request=7 type=dummy -- \ | |
111 | add-br br1 -- \ | |
112 | set bridge br1 other-config:hwaddr=aa:66:aa:66:00:00 -- \ | |
113 | set bridge br1 datapath-type=dummy other-config:datapath-id=1234 \ | |
114 | fail-mode=secure -- \ | |
115 | add-bond br1 bond1 p4 p5 p6 bond_mode=balance-tcp lacp=active \ | |
116 | other-config:lacp-time=fast other-config:bond-rebalance-interval=0 --\ | |
117 | set interface p4 type=dummy options:stream=unix:$OVS_RUNDIR/p1.sock ofport_request=4 -- \ | |
118 | set interface p5 type=dummy options:stream=unix:$OVS_RUNDIR/p2.sock ofport_request=5 -- \ | |
119 | set interface p6 type=dummy options:stream=unix:$OVS_RUNDIR/p3.sock ofport_request=6 -- \ | |
120 | add-port br1 p8 -- set interface p8 ofport_request=8 type=dummy --]) | |
121 | AT_CHECK([ovs-appctl netdev-dummy/set-admin-state up], 0, [OK | |
122 | ]) | |
123 | AT_CHECK([ovs-ofctl add-flow br0 action=normal]) | |
124 | AT_CHECK([ovs-ofctl add-flow br1 action=normal]) | |
125 | AT_CHECK([ovs-appctl upcall/disable-megaflows], [0], [megaflows disabled | |
126 | ], []) | |
48105e85 | 127 | OVS_WAIT_WHILE([ovs-appctl bond/show | grep "may_enable: false"]) |
adcf00ba AZ |
128 | ovs-appctl time/stop |
129 | ovs-appctl time/warp 100 | |
130 | ovs-appctl lacp/show > lacp.txt | |
131 | ovs-appctl bond/show > bond.txt | |
132 | ( | |
25d6a6a8 | 133 | for i in `seq 0 255` ; |
adcf00ba | 134 | do |
ea2735d3 | 135 | pkt="in_port(7),eth(src=50:54:00:00:00:05,dst=50:54:00:00:01:00),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=$i),tcp_flags(ack)" |
adcf00ba AZ |
136 | AT_CHECK([ovs-appctl netdev-dummy/receive p7 $pkt]) |
137 | done | |
138 | ) | |
bdba1947 | 139 | ovs-appctl time/warp 300 100 |
adcf00ba AZ |
140 | AT_CHECK([ovs-appctl dpif/dump-flows br0 |grep tcp > br0_flows.txt]) |
141 | AT_CHECK([ovs-appctl dpif/dump-flows br1 |grep tcp > br1_flows.txt]) | |
142 | # Make sure there is resonable distribution to all three ports. | |
143 | # We don't want to make this check precise, in case hash function changes. | |
fd184489 AZ |
144 | AT_CHECK([test `grep in_port.4 br1_flows.txt |wc -l` -gt 24]) |
145 | AT_CHECK([test `grep in_port.5 br1_flows.txt |wc -l` -gt 24]) | |
146 | AT_CHECK([test `grep in_port.6 br1_flows.txt |wc -l` -gt 24]) | |
f9038ef6 AW |
147 | |
148 | OVS_VSWITCHD_STOP() | |
149 | AT_CLEANUP | |
150 | ||
151 | # Makes sure recirculation does not change the way packet is handled. | |
5f5ebd4c | 152 | AT_SETUP([ofproto-dpif - balance-tcp bonding, different recirc flow ]) |
f9038ef6 AW |
153 | OVS_VSWITCHD_START( |
154 | [add-bond br0 bond0 p1 p2 bond_mode=balance-tcp lacp=active \ | |
155 | other-config:lacp-time=fast other-config:bond-rebalance-interval=0 -- \ | |
156 | set interface p1 type=dummy options:pstream=punix:$OVS_RUNDIR/p1.sock ofport_request=1 -- \ | |
157 | set interface p2 type=dummy options:pstream=punix:$OVS_RUNDIR/p2.sock ofport_request=2 -- \ | |
158 | add-br br1 -- \ | |
159 | set bridge br1 other-config:hwaddr=aa:66:aa:66:00:00 -- \ | |
160 | set bridge br1 datapath-type=dummy other-config:datapath-id=1234 \ | |
161 | fail-mode=standalone -- \ | |
162 | add-bond br1 bond1 p3 p4 bond_mode=balance-tcp lacp=active \ | |
163 | other-config:lacp-time=fast other-config:bond-rebalance-interval=0 -- \ | |
164 | set interface p3 type=dummy options:stream=unix:$OVS_RUNDIR/p1.sock ofport_request=3 -- \ | |
165 | set interface p4 type=dummy options:stream=unix:$OVS_RUNDIR/p2.sock ofport_request=4 -- \ | |
166 | add-port br1 br1- -- set interface br1- type=patch options:peer=br1+ ofport_request=100 -- \ | |
167 | add-br br-int -- \ | |
168 | set bridge br-int other-config:hwaddr=aa:77:aa:77:00:00 -- \ | |
169 | set bridge br-int datapath-type=dummy other-config:datapath-id=1235 \ | |
170 | fail-mode=secure -- \ | |
171 | add-port br-int br1+ -- set interface br1+ type=patch options:peer=br1- ofport_request=101 -- \ | |
172 | add-port br-int p5 -- set interface p5 ofport_request=5 type=dummy | |
173 | ]) | |
174 | AT_CHECK([ovs-appctl netdev-dummy/set-admin-state up], 0, [OK | |
175 | ]) | |
176 | ||
f12bfd04 AW |
177 | # Waits for all ifaces enabled. |
178 | OVS_WAIT_UNTIL([test `ovs-appctl bond/show | grep -- "may_enable: true" | wc -l` -ge 4]) | |
179 | ||
f9038ef6 AW |
180 | # The dl_vlan flow should not be ever matched, |
181 | # since recirculation should not change the flow handling. | |
182 | AT_DATA([flows.txt], [dnl | |
183 | table=0 priority=1 in_port=5 actions=mod_vlan_vid:1,output(101) | |
184 | table=0 priority=2 in_port=5 dl_vlan=1 actions=drop | |
185 | ]) | |
186 | AT_CHECK([ovs-ofctl add-flows br-int flows.txt]) | |
187 | ||
188 | # Sends a packet to trigger recirculation. | |
fd8232b3 | 189 | # Should generate recirc_id(0x2),dp_hash(0xc1261ba2/0xff). |
f9038ef6 AW |
190 | AT_CHECK([ovs-appctl netdev-dummy/receive p5 "in_port(5),eth(src=50:54:00:00:00:05,dst=50:54:00:00:01:00),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1)"]) |
191 | ||
192 | # Collects flow stats. | |
193 | AT_CHECK([ovs-appctl revalidator/purge], [0]) | |
194 | ||
195 | # Checks the flow stats in br1, should only be one flow with non-zero | |
196 | # 'n_packets' from internal table. | |
8ae8176f | 197 | AT_CHECK([ovs-appctl bridge/dump-flows br1 | ofctl_strip | grep -- "n_packets" | grep -- "table_id" | sed -e 's/dp_hash=0x[[0-9a-f]][[0-9a-f]]*/dp_hash=0x0/' -e 's/output:[[0-9]][[0-9]]*/output/'], [0], [dnl |
fd8232b3 | 198 | table_id=254, n_packets=1, n_bytes=64, priority=20,recirc_id=0x2,dp_hash=0x0/0xff,actions=output |
f9038ef6 AW |
199 | ]) |
200 | ||
201 | # Checks the flow stats in br-int, should be only one match. | |
202 | AT_CHECK([ovs-ofctl dump-flows br-int | ofctl_strip | sort], [0], [dnl | |
203 | n_packets=1, n_bytes=60, priority=1,in_port=5 actions=mod_vlan_vid:1,output:101 | |
204 | priority=2,in_port=5,dl_vlan=1 actions=drop | |
205 | NXST_FLOW reply: | |
206 | ]) | |
207 | ||
adcf00ba AZ |
208 | OVS_VSWITCHD_STOP() |
209 | AT_CLEANUP | |
210 | ||
29901626 | 211 | AT_SETUP([ofproto-dpif - resubmit]) |
023e1e0a | 212 | OVS_VSWITCHD_START |
f7b8e494 JP |
213 | ADD_OF_PORTS([br0], [1], [10], [11], [12], [13], [14], [15], |
214 | [16], [17], [18], [19], [20], [21]) | |
29901626 BP |
215 | AT_DATA([flows.txt], [dnl |
216 | table=0 in_port=1 priority=1000 icmp actions=output(10),resubmit(2),output(19),resubmit(3),output(21) | |
217 | table=0 in_port=2 priority=1500 icmp actions=output(11),resubmit(,1),output(16),resubmit(2,1),output(18) | |
218 | table=0 in_port=3 priority=2000 icmp actions=output(20) | |
219 | table=1 in_port=1 priority=1000 icmp actions=output(12),resubmit(4,1),output(13),resubmit(3),output(15) | |
220 | table=1 in_port=2 priority=1500 icmp actions=output(17),resubmit(,2) | |
221 | table=1 in_port=3 priority=1500 icmp actions=output(14),resubmit(,2) | |
222 | ]) | |
223 | AT_CHECK([ovs-ofctl add-flows br0 flows.txt]) | |
31a19d69 | 224 | AT_CHECK([ovs-appctl ofproto/trace br0 'in_port=1,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,dl_type=0x0800,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_proto=1,nw_tos=0,nw_ttl=128,icmp_type=8,icmp_code=0'], [0], [stdout]) |
29901626 BP |
225 | AT_CHECK([tail -1 stdout], [0], |
226 | [Datapath actions: 10,11,12,13,14,15,16,17,18,19,20,21 | |
227 | ]) | |
023e1e0a | 228 | OVS_VSWITCHD_STOP |
29901626 | 229 | AT_CLEANUP |
58a89177 | 230 | |
55599423 JR |
231 | AT_SETUP([ofproto-dpif - goto table]) |
232 | OVS_VSWITCHD_START | |
233 | ADD_OF_PORTS([br0], [1], [10], [11]) | |
234 | echo "table=0 in_port=1 actions=output(10),goto_table(1)" > flows.txt | |
4468099e EJ |
235 | for i in `seq 1 63`; do echo "table=$i actions=goto_table($(($i+1)))"; done >> flows.txt |
236 | echo "table=64 actions=output(11)" >> flows.txt | |
55599423 JR |
237 | AT_CHECK([ovs-ofctl -O OpenFlow12 add-flows br0 flows.txt]) |
238 | AT_CHECK([ovs-appctl ofproto/trace br0 'in_port=1,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,dl_type=0x0800,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_proto=1,nw_tos=0,nw_ttl=128,icmp_type=8,icmp_code=0'], [0], [stdout]) | |
239 | AT_CHECK([tail -1 stdout], [0], | |
240 | [Datapath actions: 10,11 | |
241 | ]) | |
242 | OVS_VSWITCHD_STOP | |
243 | AT_CLEANUP | |
244 | ||
7fdb60a7 SH |
245 | AT_SETUP([ofproto-dpif - write actions]) |
246 | OVS_VSWITCHD_START | |
247 | ADD_OF_PORTS([br0], [1], [10], [11], [12], [13]) | |
248 | AT_DATA([flows.txt], [dnl | |
249 | table=0 in_port=1,ip actions=output(10),write_actions(set_field:192.168.3.90->ip_src,output(12)),goto_table(1) | |
250 | table=1 ip actions=write_actions(output(13)),goto_table(2) | |
251 | table=2 ip actions=set_field:192.168.3.91->ip_src,output(11) | |
252 | ]) | |
253 | AT_CHECK([ovs-ofctl -O OpenFlow12 add-flows br0 flows.txt]) | |
254 | AT_CHECK([ovs-appctl ofproto/trace br0 'in_port=1,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,dl_type=0x0800,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_proto=1,nw_tos=0,nw_ttl=128,icmp_type=8,icmp_code=0'], [0], [stdout]) | |
ce58df5b | 255 | AT_CHECK([tail -2 stdout], [0], |
16194afd | 256 | [Megaflow: recirc_id=0,ip,in_port=1,nw_src=192.168.0.1,nw_frag=no |
d23df9a8 | 257 | Datapath actions: 10,set(ipv4(src=192.168.3.91)),11,set(ipv4(src=192.168.3.90)),13 |
7fdb60a7 SH |
258 | ]) |
259 | OVS_VSWITCHD_STOP | |
260 | AT_CLEANUP | |
261 | ||
e60e935b SRCSA |
262 | AT_SETUP([ofproto-dpif - modify IPv6 Neighbor Solitication (ND)]) |
263 | OVS_VSWITCHD_START | |
264 | ADD_OF_PORTS([br0], [1], [10], [11], [12], [13]) | |
265 | AT_DATA([flows.txt], [dnl | |
266 | table=0 in_port=1,icmp6,icmpv6_type=135 actions=output(10),write_actions(set_field:fe80::3->nd_target,set_field:aa:aa:aa:aa:aa:aa->nd_sll,output(12)),goto_table(1) | |
267 | table=1 icmp6 actions=write_actions(output(13)),goto_table(2) | |
268 | table=2 in_port=1,icmp6,icmpv6_type=135 actions=set_field:fe80::4->nd_target,set_field:cc:cc:cc:cc:cc:cc->nd_sll,output(11) | |
269 | ]) | |
270 | AT_CHECK([ovs-ofctl -O OpenFlow12 add-flows br0 flows.txt]) | |
271 | AT_CHECK([ovs-appctl ofproto/trace br0 'in_port=1,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,icmp6,ipv6_src=fe80::1,ipv6_dst=fe80::2,nw_tos=0,nw_ttl=128,icmpv6_type=135,nd_target=fe80::2020,nd_sll=66:55:44:33:22:11'], [0], [stdout]) | |
272 | AT_CHECK([tail -4 stdout], [0], | |
ed5648b7 | 273 | [Megaflow: recirc_id=0,icmp6,in_port=1,nw_frag=no,icmp_type=0x87/0xff,icmp_code=0x0/0xff,nd_target=fe80::2020,nd_sll=66:55:44:33:22:11 |
e60e935b SRCSA |
274 | Datapath actions: 10,set(nd(target=fe80::4,sll=cc:cc:cc:cc:cc:cc)),11,set(nd(target=fe80::3,sll=aa:aa:aa:aa:aa:aa)),13 |
275 | This flow is handled by the userspace slow path because it: | |
276 | - Uses action(s) not supported by datapath. | |
277 | ]) | |
278 | OVS_VSWITCHD_STOP | |
279 | AT_CLEANUP | |
280 | ||
7fdb60a7 SH |
281 | AT_SETUP([ofproto-dpif - clear actions]) |
282 | OVS_VSWITCHD_START | |
283 | ADD_OF_PORTS([br0], [1], [10], [11], [12]) | |
284 | AT_DATA([flows.txt], [dnl | |
285 | table=0 in_port=1,ip actions=output(10),write_actions(set_field:192.168.3.90->ip_src,output(12)),goto_table(1) | |
ce58df5b | 286 | table=1 tcp actions=set_field:91->tp_src,output(11),clear_actions |
7fdb60a7 SH |
287 | ]) |
288 | AT_CHECK([ovs-ofctl -O OpenFlow12 add-flows br0 flows.txt]) | |
ce58df5b JR |
289 | AT_CHECK([ovs-appctl ofproto/trace br0 'in_port=1,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,dl_type=0x0800,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_proto=6,nw_tos=0,nw_ttl=128,tp_src=8,tp_dst=9'], [0], [stdout]) |
290 | AT_CHECK([tail -2 stdout], [0], | |
16194afd | 291 | [Megaflow: recirc_id=0,tcp,in_port=1,nw_frag=no,tp_src=8 |
d23df9a8 | 292 | Datapath actions: 10,set(tcp(src=91)),11 |
7fdb60a7 SH |
293 | ]) |
294 | OVS_VSWITCHD_STOP | |
295 | AT_CLEANUP | |
296 | ||
0eb48fe1 | 297 | AT_SETUP([ofproto-dpif - group chaining]) |
5a070238 BP |
298 | OVS_VSWITCHD_START |
299 | ADD_OF_PORTS([br0], [1], [10], [11]) | |
0eb48fe1 BP |
300 | AT_CHECK([ovs-ofctl -O OpenFlow12 add-group br0 'group_id=1234,type=all,bucket=set_field:192.168.3.90->ip_src,group:123,bucket=output:11']) |
301 | AT_CHECK([ovs-ofctl -O OpenFlow12 add-group br0 'group_id=123,type=all,bucket=output:10']) | |
302 | AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=group:1234']) | |
303 | 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]) | |
304 | AT_CHECK([tail -1 stdout], [0], | |
305 | [Datapath actions: set(ipv4(src=192.168.3.90)),10,set(ipv4(src=192.168.0.1)),11 | |
5a070238 BP |
306 | ]) |
307 | OVS_VSWITCHD_STOP | |
308 | AT_CLEANUP | |
309 | ||
f4fb341b SH |
310 | AT_SETUP([ofproto-dpif - all group in action list]) |
311 | OVS_VSWITCHD_START | |
312 | ADD_OF_PORTS([br0], [1], [10], [11]) | |
313 | 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']) | |
314 | AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=group:1234']) | |
315 | 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]) | |
d23df9a8 JR |
316 | # Must match on the source address to be able to restore it's value for |
317 | # the second bucket | |
ce58df5b | 318 | AT_CHECK([tail -2 stdout], [0], |
16194afd | 319 | [Megaflow: recirc_id=0,ip,in_port=1,nw_src=192.168.0.1,nw_frag=no |
d23df9a8 | 320 | Datapath actions: set(ipv4(src=192.168.3.90)),10,set(ipv4(src=192.168.0.1)),11 |
f4fb341b SH |
321 | ]) |
322 | OVS_VSWITCHD_STOP | |
323 | AT_CLEANUP | |
324 | ||
325 | AT_SETUP([ofproto-dpif - indirect group in action list]) | |
326 | OVS_VSWITCHD_START | |
327 | ADD_OF_PORTS([br0], [1], [10]) | |
328 | AT_CHECK([ovs-ofctl -O OpenFlow12 add-group br0 group_id=1234,type=indirect,bucket=output:10]) | |
329 | AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip 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: 10 | |
333 | ]) | |
334 | OVS_VSWITCHD_STOP | |
335 | AT_CLEANUP | |
336 | ||
5b09e569 JR |
337 | AT_SETUP([ofproto-dpif - group actions have no effect afterwards]) |
338 | OVS_VSWITCHD_START | |
339 | ADD_OF_PORTS([br0], [1], [10]) | |
340 | AT_CHECK([ovs-ofctl -O OpenFlow12 add-group br0 'group_id=1234,type=select,bucket=set_field:192.168.3.90->ip_src,output:10']) | |
341 | AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=group:1234,output:10']) | |
342 | 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]) | |
343 | AT_CHECK([tail -1 stdout], [0], | |
344 | [Datapath actions: set(ipv4(src=192.168.3.90,dst=192.168.0.2)),10,set(ipv4(src=192.168.0.1,dst=192.168.0.2)),10 | |
345 | ]) | |
346 | OVS_VSWITCHD_STOP | |
347 | AT_CLEANUP | |
348 | ||
f4fb341b SH |
349 | AT_SETUP([ofproto-dpif - all group in action set]) |
350 | OVS_VSWITCHD_START | |
351 | ADD_OF_PORTS([br0], [1], [10], [11]) | |
352 | 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']) | |
353 | AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=write_actions(group:1234)']) | |
354 | 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]) | |
d23df9a8 JR |
355 | # Must match on the source address to be able to restore it's value for |
356 | # the third bucket | |
ce58df5b | 357 | AT_CHECK([tail -2 stdout], [0], |
16194afd | 358 | [Megaflow: recirc_id=0,ip,in_port=1,nw_src=192.168.0.1,nw_frag=no |
d23df9a8 | 359 | Datapath actions: set(ipv4(src=192.168.3.90)),10,set(ipv4(src=192.168.0.1)),11 |
f4fb341b SH |
360 | ]) |
361 | OVS_VSWITCHD_STOP | |
362 | AT_CLEANUP | |
363 | ||
364 | AT_SETUP([ofproto-dpif - indirect group in action set]) | |
365 | OVS_VSWITCHD_START | |
366 | ADD_OF_PORTS([br0], [1], [10]) | |
367 | AT_CHECK([ovs-ofctl -O OpenFlow12 add-group br0 group_id=1234,type=indirect,bucket=output:10]) | |
368 | AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=write_actions(group:1234)']) | |
369 | 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]) | |
370 | AT_CHECK([tail -1 stdout], [0], | |
371 | [Datapath actions: 10 | |
372 | ]) | |
373 | OVS_VSWITCHD_STOP | |
374 | AT_CLEANUP | |
375 | ||
fe7e5749 SH |
376 | AT_SETUP([ofproto-dpif - select group]) |
377 | OVS_VSWITCHD_START | |
378 | ADD_OF_PORTS([br0], [1], [10], [11]) | |
379 | AT_CHECK([ovs-ofctl -O OpenFlow12 add-group br0 'group_id=1234,type=select,bucket=output:10,bucket=output:11']) | |
380 | AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=write_actions(group:1234)']) | |
7cb279c2 SH |
381 | |
382 | # Try a bunch of different flows and make sure that they get distributed | |
383 | # at least somewhat. | |
384 | for d in 0 1 2 3 4 5 6 7 8 9 a b c d e f; do | |
385 | 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]) | |
386 | tail -1 stdout >> results | |
387 | done | |
388 | sort results | uniq -c | |
389 | AT_CHECK([sort results | uniq], [0], | |
fe7e5749 | 390 | [Datapath actions: 10 |
7cb279c2 | 391 | Datapath actions: 11 |
fe7e5749 SH |
392 | ]) |
393 | OVS_VSWITCHD_STOP | |
394 | AT_CLEANUP | |
395 | ||
396 | AT_SETUP([ofproto-dpif - select group with watch port]) | |
397 | OVS_VSWITCHD_START | |
398 | ADD_OF_PORTS([br0], [1], [10], [11]) | |
399 | AT_CHECK([ovs-ofctl -O OpenFlow12 add-group br0 'group_id=1234,type=select,bucket=watch_port:10,output:10,bucket=output:11']) | |
400 | AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=write_actions(group:1234)']) | |
401 | 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]) | |
402 | AT_CHECK([tail -1 stdout], [0], | |
403 | [Datapath actions: 11 | |
404 | ]) | |
405 | OVS_VSWITCHD_STOP | |
406 | AT_CLEANUP | |
407 | ||
7cb279c2 SH |
408 | AT_SETUP([ofproto-dpif - select group with weight]) |
409 | OVS_VSWITCHD_START | |
410 | ADD_OF_PORTS([br0], [1], [10], [11], [12]) | |
125bf01d | 411 | 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']) |
7cb279c2 SH |
412 | AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=write_actions(group:1234)']) |
413 | 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]) | |
414 | AT_CHECK([tail -1 stdout], [0], | |
415 | [Datapath actions: 11 | |
416 | ]) | |
417 | OVS_VSWITCHD_STOP | |
418 | AT_CLEANUP | |
419 | ||
0c4b9393 SH |
420 | AT_SETUP([ofproto-dpif - select group with hash selection method]) |
421 | OVS_VSWITCHD_START | |
422 | ADD_OF_PORTS([br0], [1], [10], [11]) | |
423 | AT_CHECK([ovs-ofctl -O OpenFlow15 add-group br0 'group_id=1234,type=select,selection_method=hash,fields=eth_dst,bucket=output:10,bucket=output:11']) | |
424 | AT_CHECK([ovs-ofctl -O OpenFlow15 add-flow br0 'ip actions=write_actions(group:1234)']) | |
425 | ||
426 | # Try a bunch of different flows and make sure that they get distributed | |
427 | # at least somewhat. | |
428 | for d in 0 1 2 3 4 5 6 7 8 9 a b c d e f; do | |
429 | 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]) | |
430 | tail -1 stdout >> results | |
431 | done | |
432 | sort results | uniq -c | |
433 | AT_CHECK([sort results | uniq], [0], | |
434 | [Datapath actions: 10 | |
435 | Datapath actions: 11 | |
436 | ]) | |
437 | ||
438 | > results | |
439 | # Try a bunch of different flows and make sure that they are not distributed | |
440 | # as they only vary a field that is not hashed | |
441 | for d in 0 1 2 3 4 5 6 7 8 9 a b c d e f; do | |
442 | AT_CHECK([ovs-appctl ofproto/trace br0 "in_port=1,dl_src=50:54:00:00:00:$d,dl_dst=50:54:00:00:00:07,dl_type=0x0800,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_proto=1,nw_tos=0,nw_ttl=128,icmp_type=8,icmp_code=0"], [0], [stdout]) | |
443 | tail -1 stdout >> results | |
444 | done | |
445 | sort results | uniq -c | |
446 | AT_CHECK([sort results | uniq], [0], | |
447 | [Datapath actions: 10 | |
448 | ]) | |
449 | ||
450 | OVS_VSWITCHD_STOP | |
451 | AT_CLEANUP | |
452 | ||
dd8cd4b4 SH |
453 | AT_SETUP([ofproto-dpif - fast failover group]) |
454 | OVS_VSWITCHD_START | |
455 | ADD_OF_PORTS([br0], [1], [10], [11]) | |
456 | 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']) | |
457 | AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=write_actions(group:1234)']) | |
458 | 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]) | |
459 | AT_CHECK([tail -1 stdout], [0], | |
460 | [Datapath actions: drop | |
461 | ]) | |
462 | OVS_VSWITCHD_STOP | |
463 | AT_CLEANUP | |
464 | ||
b2af3288 AZ |
465 | AT_SETUP([ofproto-dpif - group stats single bucket]) |
466 | OVS_VSWITCHD_START | |
467 | ADD_OF_PORTS([br0], [1], [10], [11]) | |
468 | AT_CHECK([ovs-ofctl -O OpenFlow12 add-group br0 'group_id=1234,type=select,bucket=output:10,weight=2000,bucket=output:11,weight=0']) | |
469 | AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=write_actions(group:1234)']) | |
470 | ( | |
471 | for i in `seq 0 2`; | |
472 | do | |
473 | 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)" | |
474 | AT_CHECK([ovs-appctl netdev-dummy/receive p1 $pkt]) | |
475 | done | |
476 | ) | |
cea4a6d7 | 477 | AT_CHECK([ovs-appctl revalidator/purge], [0]) |
b2af3288 AZ |
478 | AT_CHECK([ovs-ofctl -O OpenFlow12 -vwarn dump-group-stats br0], [0], [stdout]) |
479 | AT_CHECK([STRIP_XIDS stdout | sort], [0], [dnl | |
480 | 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 | |
481 | OFPST_GROUP reply (OF1.2): | |
482 | ]) | |
483 | OVS_VSWITCHD_STOP | |
484 | AT_CLEANUP | |
485 | ||
486 | AT_SETUP([ofproto-dpif - group stats all buckets]) | |
487 | OVS_VSWITCHD_START | |
488 | ADD_OF_PORTS([br0], [1], [10], [11]) | |
489 | AT_CHECK([ovs-ofctl -O OpenFlow12 add-group br0 'group_id=1234,type=all,bucket=output:10,bucket=output:11']) | |
490 | AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=write_actions(group:1234)']) | |
491 | ( | |
492 | for i in `seq 0 2`; | |
493 | do | |
494 | 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)" | |
495 | AT_CHECK([ovs-appctl netdev-dummy/receive p1 $pkt]) | |
496 | done | |
497 | ) | |
cea4a6d7 | 498 | AT_CHECK([ovs-appctl revalidator/purge], [0]) |
b2af3288 AZ |
499 | AT_CHECK([ovs-ofctl -O OpenFlow12 -vwarn dump-group-stats br0], [0], [stdout]) |
500 | AT_CHECK([STRIP_XIDS stdout | sort], [0], [dnl | |
501 | 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 | |
502 | OFPST_GROUP reply (OF1.2): | |
503 | ]) | |
504 | OVS_VSWITCHD_STOP | |
505 | AT_CLEANUP | |
506 | ||
58a89177 | 507 | AT_SETUP([ofproto-dpif - registers]) |
023e1e0a | 508 | OVS_VSWITCHD_START |
f7b8e494 | 509 | ADD_OF_PORTS([br0], [20], [21], [22], [33], [90]) |
58a89177 EJ |
510 | AT_DATA([flows.txt], [dnl |
511 | in_port=90 actions=resubmit:2,resubmit:3,resubmit:4,resubmit:91 | |
512 | in_port=91 actions=resubmit:5,resubmit:6,resubmit:7,resubmit:92 | |
e9358af6 EJ |
513 | in_port=92 actions=resubmit:8,resubmit:9,resubmit:10,resubmit:11,resubmit:93 |
514 | in_port=93 actions=resubmit:12,resubmit:13,resubmit:14,resubmit:15 | |
515 | ||
58a89177 EJ |
516 | in_port=2 actions=load:0x000db000->NXM_NX_REG0[[]] |
517 | in_port=3 actions=load:0xdea->NXM_NX_REG0[[20..31]] | |
518 | in_port=4 actions=load:0xeef->NXM_NX_REG0[[0..11]] | |
519 | in_port=5 actions=move:NXM_NX_REG0[[]]->NXM_NX_REG1[[]] | |
520 | in_port=6 actions=load:0x22222222->NXM_NX_REG2[[]] | |
521 | in_port=7 actions=move:NXM_NX_REG1[[20..31]]->NXM_NX_REG2[[0..11]] | |
522 | in_port=8 actions=move:NXM_NX_REG1[[0..11]]->NXM_NX_REG2[[20..31]] | |
523 | in_port=9,reg0=0xdeadbeef actions=output:20 | |
524 | in_port=10,reg1=0xdeadbeef actions=output:21 | |
525 | in_port=11,reg2=0xeef22dea actions=output:22 | |
e9358af6 EJ |
526 | |
527 | dnl Sanilty check all registers | |
528 | in_port=12 actions=load:0x10->NXM_NX_REG0[[]],load:0x11->NXM_NX_REG1[[]],load:0x12->NXM_NX_REG2[[]] | |
529 | in_port=13 actions=load:0x13->NXM_NX_REG3[[]],load:0x14->NXM_NX_REG4[[]],load:0x15->NXM_NX_REG5[[]] | |
530 | in_port=14 actions=load:0x16->NXM_NX_REG6[[]],load:0x17->NXM_NX_REG7[[]] | |
531 | in_port=15,reg0=0x10,reg1=0x11,reg2=0x12,reg3=0x13,reg4=0x14,reg5=0x15,reg6=0x16,reg7=0x17 actions=output:33 | |
bd85dac1 | 532 | |
58a89177 EJ |
533 | ]) |
534 | AT_CHECK([ovs-ofctl add-flows br0 flows.txt]) | |
50aa28fd | 535 | 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]) |
58a89177 | 536 | AT_CHECK([tail -1 stdout], [0], |
e9358af6 | 537 | [Datapath actions: 20,21,22,33 |
58a89177 | 538 | ]) |
023e1e0a | 539 | OVS_VSWITCHD_STOP |
58a89177 | 540 | AT_CLEANUP |
f694937d | 541 | |
57fa8167 BP |
542 | dnl Tests that the standardized xregs are mapped onto the legacy OVS registers |
543 | dnl in the manner documented in ovs-ofctl(8). | |
544 | AT_SETUP([ofproto-dpif - extended registers]) | |
545 | OVS_VSWITCHD_START | |
546 | ADD_OF_PORTS([br0], [1], [2], [3]) | |
547 | AT_DATA([flows.txt], [dnl | |
548 | table=0 actions=load:0xfedcba9876543210->OXM_OF_PKT_REG1[[]],resubmit(,1) | |
549 | table=1,reg2=0xfedcba98,reg3=0x76543210 actions=2 | |
550 | ||
551 | # These low-priority rules shouldn't match. They're here only to make really | |
552 | # sure that the test fails if either of the above rules fails to match. | |
553 | table=0,priority=0 actions=3 | |
554 | table=1,priority=0 actions=3 | |
555 | ]) | |
556 | AT_CHECK([ovs-ofctl add-flows br0 flows.txt]) | |
557 | 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]) | |
558 | AT_CHECK([tail -1 stdout], [0], [Datapath actions: 2 | |
559 | ]) | |
560 | OVS_VSWITCHD_STOP | |
561 | AT_CLEANUP | |
562 | ||
1b0ee636 TG |
563 | AT_SETUP([ofproto-dpif - load and move order]) |
564 | OVS_VSWITCHD_START | |
565 | ADD_OF_PORTS([br0], [1], [10], [11]) | |
566 | AT_CHECK([ovs-ofctl -O OpenFlow12 add-group br0 'group_id=1234,type=all,bucket=output:10,move:NXM_NX_REG1[[]]->NXM_OF_IP_SRC[[]],bucket=output:11']) | |
567 | AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=write_actions(load:0xffffffff->NXM_NX_REG1[[]],move:NXM_NX_REG1[[]]->NXM_NX_REG2[[]],group:1234)']) | |
568 | 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]) | |
569 | AT_CHECK([tail -2 stdout], [0], | |
16194afd | 570 | [Megaflow: recirc_id=0,ip,in_port=1,nw_src=192.168.0.1,nw_frag=no |
d23df9a8 | 571 | Datapath actions: set(ipv4(src=255.255.255.255)),10,set(ipv4(src=192.168.0.1)),11 |
1b0ee636 TG |
572 | ]) |
573 | OVS_VSWITCHD_STOP | |
574 | AT_CLEANUP | |
575 | ||
eb1cbc6b JT |
576 | dnl Tests that 1.5 copy-field can copy into the standardized xregs. |
577 | AT_SETUP([ofproto-dpif - copy-field into extended registers]) | |
578 | OVS_VSWITCHD_START | |
579 | ADD_OF_PORTS([br0], [1], [2], [3]) | |
580 | AT_DATA([flows.txt], [dnl | |
581 | table=0 actions=move:OXM_OF_ETH_SRC[[0..47]]->OXM_OF_PKT_REG0[[0..47]],goto_table(1) | |
582 | table=1,xreg0=0x0000505400000005 actions=2 | |
583 | ||
584 | # These low-priority rules shouldn't match. They're here only to make really | |
585 | # sure that the test fails if either of the above rules fails to match. | |
586 | table=0,priority=0 actions=3 | |
587 | table=1,priority=0 actions=3 | |
588 | ]) | |
589 | AT_CHECK([ovs-ofctl -O OpenFlow15 add-flows br0 flows.txt]) | |
590 | 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]) | |
591 | AT_CHECK([tail -1 stdout], [0], [Datapath actions: 2 | |
592 | ]) | |
593 | OVS_VSWITCHD_STOP | |
594 | AT_CLEANUP | |
595 | ||
2bef8e07 JT |
596 | dnl Tests that 1.5 set-field with mask in the metadata register. |
597 | AT_SETUP([ofproto-dpif - masked set-field into metadata]) | |
598 | OVS_VSWITCHD_START | |
599 | ADD_OF_PORTS([br0], [1], [2], [3]) | |
600 | AT_DATA([flows.txt], [dnl | |
601 | table=0 actions=set_field:0xfafafafa5a5a5a5a->metadata,goto_table(1) | |
602 | table=1 actions=set_field:0x6b/0xff->metadata,goto_table(2) | |
603 | table=2,metadata=0xfafafafa5a5a5a6b actions=2 | |
604 | ||
605 | # These low-priority rules shouldn't match. They're here only to make really | |
606 | # sure that the test fails if either of the above rules fails to match. | |
607 | table=0,priority=0 actions=3 | |
608 | table=1,priority=0 actions=3 | |
609 | table=2,priority=0 actions=3 | |
610 | ]) | |
611 | AT_CHECK([ovs-ofctl -O OpenFlow15 add-flows br0 flows.txt]) | |
612 | 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]) | |
613 | AT_CHECK([tail -1 stdout], [0], [Datapath actions: 2 | |
614 | ]) | |
615 | OVS_VSWITCHD_STOP | |
616 | AT_CLEANUP | |
617 | ||
c61f3870 BP |
618 | |
619 | AT_SETUP([ofproto-dpif - actset_output]) | |
620 | OVS_VSWITCHD_START | |
621 | ADD_OF_PORTS( | |
622 | [br0], [1], [2], [3], [4], [5], [6], [7], [8], [9], [10], [11], [12], [13]) | |
623 | AT_DATA([flows.txt], [dnl | |
3ca3ce0c | 624 | table=0,actset_output=unset actions=write_actions(output(2)),goto_table(1) |
c61f3870 BP |
625 | table=1 actions=move:ONFOXM_ET_ACTSET_OUTPUT[[0..31]]->OXM_OF_PKT_REG0[[0..31]],goto_table(2) |
626 | ||
627 | # Verify that actset_output got set. | |
628 | table=2,priority=20,actset_output=2 actions=4,goto_table(3) | |
629 | table=2,priority=10 actions=5,goto_table(3) | |
630 | ||
631 | # Verify that xreg0 got copied properly from actset_output. | |
632 | table=3,priority=20,xreg0=2 actions=6,goto_table(4) | |
633 | table=3,priority=10 actions=7,goto_table(4) | |
634 | ||
9055ca9a BP |
635 | # Verify that adding a group action unsets actset_output, |
636 | # even if output follows group. | |
637 | table=4 actions=write_actions(group(5),output(10)),goto_table(5) | |
c61f3870 BP |
638 | table=5,priority=20,actset_output=unset actions=8,goto_table(6) |
639 | table=5,priority=10 actions=9,goto_table(6) | |
640 | ||
641 | # Verify that adding another output action doesn't change actset_output | |
642 | # (since there's still a group). | |
643 | table=6 actions=write_actions(output(3)),goto_table(7) | |
644 | table=7,priority=20,actset_output=unset actions=10,goto_table(8) | |
645 | table=7,priority=10 actions=11,goto_table(8) | |
646 | ||
647 | # Verify that clearing the action set, then writing an output action, | |
648 | # causes actset_output to be set again. | |
649 | table=8,actions=clear_actions,write_actions(output(3),output(2)),goto_table(9) | |
650 | table=9,priority=20,actset_output=2 actions=12 | |
651 | table=9,priority=10 actions=13 | |
652 | ]) | |
653 | AT_CHECK([ovs-ofctl -O OpenFlow13 add-flows br0 flows.txt]) | |
654 | AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)'], [0], [stdout]) | |
655 | AT_CHECK([tail -1 stdout], [0], [Datapath actions: 4,6,8,10,12,2 | |
656 | ]) | |
657 | OVS_VSWITCHD_STOP | |
658 | AT_CLEANUP | |
bd85dac1 AZ |
659 | AT_SETUP([ofproto-dpif - push-pop]) |
660 | OVS_VSWITCHD_START | |
661 | ADD_OF_PORTS([br0], [20], [21], [22], [33], [90]) | |
662 | AT_DATA([flows.txt], [dnl | |
663 | in_port=90 actions=load:20->NXM_NX_REG0[[0..7]],load:21->NXM_NX_REG1[[0..7]],load:22->NXM_NX_REG2[[0..7]], load:33->NXM_NX_REG3[[0..7]], push:NXM_NX_REG0[[]], push:NXM_NX_REG1[[0..7]],push:NXM_NX_REG2[[0..15]], push:NXM_NX_REG3[[]], resubmit:2, resubmit:3, resubmit:4, resubmit:5 | |
664 | in_port=2 actions=pop:NXM_NX_REG0[[0..7]],output:NXM_NX_REG0[[]] | |
665 | in_port=3 actions=pop:NXM_NX_REG1[[0..7]],output:NXM_NX_REG1[[]] | |
666 | in_port=4 actions=pop:NXM_NX_REG2[[0..15]],output:NXM_NX_REG2[[]] | |
667 | in_port=5 actions=pop:NXM_NX_REG3[[]],output:NXM_NX_REG3[[]] | |
668 | ||
669 | ]) | |
670 | AT_CHECK([ovs-ofctl add-flows br0 flows.txt]) | |
50aa28fd | 671 | AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(90),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)'], [0], [stdout]) |
bd85dac1 AZ |
672 | AT_CHECK([tail -1 stdout], [0], |
673 | [Datapath actions: 33,22,21,20 | |
674 | ]) | |
675 | OVS_VSWITCHD_STOP | |
676 | AT_CLEANUP | |
677 | ||
f694937d | 678 | AT_SETUP([ofproto-dpif - output]) |
023e1e0a | 679 | OVS_VSWITCHD_START |
f7b8e494 | 680 | ADD_OF_PORTS([br0], [1], [9], [10], [11], [55], [66], [77], [88]) |
f694937d | 681 | AT_DATA([flows.txt], [dnl |
557323cd | 682 | in_port=1 actions=resubmit:2,resubmit:3,resubmit:4,resubmit:5,resubmit:6,resubmit:7,resubmit:8 |
f694937d EJ |
683 | in_port=2 actions=output:9 |
684 | in_port=3 actions=load:55->NXM_NX_REG0[[]],output:NXM_NX_REG0[[]],load:66->NXM_NX_REG1[[]] | |
685 | in_port=4 actions=output:10,output:NXM_NX_REG0[[]],output:NXM_NX_REG1[[]],output:11 | |
686 | in_port=5 actions=load:77->NXM_NX_REG0[[0..15]],load:88->NXM_NX_REG0[[16..31]] | |
687 | in_port=6 actions=output:NXM_NX_REG0[[0..15]],output:NXM_NX_REG0[[16..31]] | |
688 | in_port=7 actions=load:0x110000ff->NXM_NX_REG0[[]],output:NXM_NX_REG0[[]] | |
557323cd | 689 | in_port=8 actions=1,9,load:9->NXM_OF_IN_PORT[[]],1,9 |
f694937d EJ |
690 | ]) |
691 | AT_CHECK([ovs-ofctl add-flows br0 flows.txt]) | |
50aa28fd | 692 | AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)'], [0], [stdout]) |
f694937d | 693 | AT_CHECK([tail -1 stdout], [0], |
557323cd | 694 | [Datapath actions: 9,55,10,55,66,11,77,88,9,1 |
f694937d | 695 | ]) |
023e1e0a | 696 | OVS_VSWITCHD_STOP |
f694937d | 697 | AT_CLEANUP |
8e9ce036 | 698 | |
f0fd1a17 PS |
699 | AT_SETUP([ofproto-dpif - dec_ttl]) |
700 | OVS_VSWITCHD_START | |
f7b8e494 | 701 | ADD_OF_PORTS([br0], [1], [2], [3], [4]) |
f0fd1a17 PS |
702 | AT_DATA([flows.txt], [dnl |
703 | table=0 in_port=1 action=dec_ttl,output:2,resubmit(1,1),output:4 | |
704 | table=1 in_port=1 action=dec_ttl,output:3 | |
705 | ]) | |
706 | AT_CHECK([ovs-ofctl add-flows br0 flows.txt]) | |
8249a1fe | 707 | AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=111,tos=0,ttl=2,frag=no)' -generate], [0], [stdout]) |
ce58df5b | 708 | AT_CHECK([tail -4 stdout], [0], |
16194afd | 709 | [Megaflow: recirc_id=0,ip,in_port=1,nw_ttl=2,nw_frag=no |
d23df9a8 | 710 | Datapath actions: set(ipv4(ttl=1)),2,4 |
6a7e895f BP |
711 | This flow is handled by the userspace slow path because it: |
712 | - Sends "packet-in" messages to the OpenFlow controller. | |
f0fd1a17 | 713 | ]) |
8249a1fe | 714 | AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=111,tos=0,ttl=3,frag=no)'], [0], [stdout]) |
ce58df5b | 715 | AT_CHECK([tail -2 stdout], [0], |
16194afd | 716 | [Megaflow: recirc_id=0,ip,in_port=1,nw_ttl=3,nw_frag=no |
d23df9a8 | 717 | Datapath actions: set(ipv4(ttl=2)),2,set(ipv4(ttl=1)),3,4 |
f0fd1a17 | 718 | ]) |
50aa28fd | 719 | AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x86dd),ipv6(src=::1,dst=::2,label=0,proto=10,tclass=0x70,hlimit=128,frag=no)'], [0], [stdout]) |
ce58df5b | 720 | AT_CHECK([tail -2 stdout], [0], |
16194afd | 721 | [Megaflow: recirc_id=0,ipv6,in_port=1,nw_ttl=128,nw_frag=no |
d23df9a8 | 722 | Datapath actions: set(ipv6(hlimit=127)),2,set(ipv6(hlimit=126)),3,4 |
f0fd1a17 PS |
723 | ]) |
724 | ||
982697a4 | 725 | AT_CAPTURE_FILE([ofctl_monitor.log]) |
77a922c7 | 726 | AT_CHECK([ovs-ofctl monitor br0 65534 invalid_ttl --detach --no-chdir --pidfile 2> ofctl_monitor.log]) |
8249a1fe | 727 | AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=111,tos=0,ttl=2,frag=no)' -generate], [0], [stdout]) |
f0fd1a17 PS |
728 | OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit]) |
729 | AT_CHECK([cat ofctl_monitor.log], [0], [dnl | |
8249a1fe | 730 | NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=34 in_port=1 (via invalid_ttl) data_len=34 (unbuffered) |
e6d9ab56 | 731 | ip,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_proto=111,nw_tos=0,nw_ecn=0,nw_ttl=1 |
f0fd1a17 PS |
732 | ]) |
733 | OVS_VSWITCHD_STOP | |
734 | AT_CLEANUP | |
735 | ||
65bfce4a SH |
736 | dnl A dec_ttl action at offset 32 in ofpacts will cause the ofpacts |
737 | dnl buffer to be resized just before pushing the id of the dec_ttl action. | |
738 | dnl Thus the implementation must account for this by using the | |
739 | dnl reallocated buffer rather than the original buffer. | |
740 | dnl | |
741 | dnl A number of similar rules are added to try and exercise | |
742 | dnl xrealloc sufficiently that it returns a different base pointer | |
743 | AT_SETUP([ofproto-dpif - dec_ttl without arguments at offset 32 in ofpacts]) | |
744 | OVS_VSWITCHD_START | |
745 | ADD_OF_PORTS([br0], [1]) | |
746 | (for i in `seq 0 255`; do | |
747 | printf "dl_src=10:11:11:11:11:%02x actions=output:1,output:1,output:1,dec_ttl,controller\n" $i | |
748 | done) > flows.txt | |
749 | AT_CHECK([ovs-ofctl add-flows br0 flows.txt]) | |
750 | OVS_VSWITCHD_STOP | |
751 | AT_CLEANUP | |
752 | ||
753 | dnl A dec_ttl action at offset 32 in ofpacts will cause the ofpacts | |
754 | dnl buffer to be resized just before pushing the id of the dec_ttl action. | |
755 | dnl Thus the implementation must account for this by using the | |
756 | dnl reallocated buffer rather than the original buffer. | |
757 | dnl | |
758 | dnl A number of similar rules are added to try and exercise | |
759 | dnl xrealloc sufficiently that it returns a different base pointer | |
760 | AT_SETUP([ofproto-dpif - dec_ttl with arguments at offset 32 in ofpacts]) | |
761 | OVS_VSWITCHD_START | |
762 | ADD_OF_PORTS([br0], [1]) | |
763 | (for i in `seq 0 255`; do | |
764 | printf "dl_src=10:11:11:11:11:%02x actions=output:1,output:1,output:1,dec_ttl(1),controller\n" $i | |
765 | done) > flows.txt | |
766 | AT_CHECK([ovs-ofctl add-flows br0 flows.txt]) | |
767 | OVS_VSWITCHD_STOP | |
768 | AT_CLEANUP | |
769 | ||
770 | dnl A note action at offset 24 in ofpacts will cause the ofpacts | |
771 | dnl buffer to be resized just before pushing the id of the dec_ttl action. | |
772 | dnl Thus the implementation must account for this by using the | |
773 | dnl reallocated buffer rather than the original buffer. | |
774 | dnl | |
775 | dnl A number of similar rules are added to try and exercise | |
776 | dnl xrealloc sufficiently that it returns a different base pointer | |
777 | AT_SETUP([ofproto-dpif - note at offset 24 in ofpacts]) | |
778 | OVS_VSWITCHD_START | |
779 | ADD_OF_PORTS([br0], [1]) | |
780 | (for i in `seq 0 255`; do | |
781 | printf "dl_src=10:11:11:11:11:%02x actions=output:1,output:1,note:ff,controller\n" $i | |
782 | done) > flows.txt | |
783 | AT_CHECK([ovs-ofctl add-flows br0 flows.txt]) | |
784 | OVS_VSWITCHD_STOP | |
785 | AT_CLEANUP | |
f0fd1a17 | 786 | |
77750738 | 787 | AT_SETUP([ofproto-dpif - output, OFPP_NONE ingress port]) |
e44768b7 JP |
788 | OVS_VSWITCHD_START |
789 | ADD_OF_PORTS([br0], [1], [2]) | |
77750738 | 790 | |
77750738 JP |
791 | AT_CHECK([ovs-ofctl add-flow br0 action=normal]) |
792 | ||
793 | # "in_port" defaults to OFPP_NONE if it's not specified. | |
72d64e33 | 794 | flow="icmp,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,icmp_type=8,icmp_code=0" |
77750738 | 795 | AT_CHECK([ovs-appctl ofproto/trace br0 "$flow"], [0], [stdout]) |
72d64e33 EJ |
796 | AT_CHECK([tail -1 stdout | sed 's/Datapath actions: //' | tr "," "\n" | sort -n], [0], [dnl |
797 | 1 | |
798 | 2 | |
799 | 100 | |
800 | ]) | |
77750738 JP |
801 | |
802 | OVS_VSWITCHD_STOP | |
803 | AT_CLEANUP | |
804 | ||
8b36f51e | 805 | AT_SETUP([ofproto-dpif - DSCP]) |
8b36f51e | 806 | OVS_VSWITCHD_START([add-port br0 p1 -- set Interface p1 type=dummy]) |
72d64e33 | 807 | ADD_OF_PORTS([br0], [9]) |
8b36f51e | 808 | AT_DATA([flows.txt], [dnl |
bdda5aca | 809 | actions=output:LOCAL,enqueue:1:1,enqueue:1:2,enqueue:1:2,enqueue:1:1,output:1,mod_nw_tos:0,output:1,output:LOCAL |
8b36f51e EJ |
810 | ]) |
811 | AT_CHECK([ovs-ofctl add-flows br0 flows.txt]) | |
812 | AT_CHECK([ovs-vsctl -- \ | |
813 | set Port p1 qos=@newqos --\ | |
814 | --id=@newqos create QoS type=linux-htb queues=1=@q1,2=@q2 --\ | |
815 | --id=@q1 create Queue dscp=1 --\ | |
816 | --id=@q2 create Queue dscp=2], [0], [ignore]) | |
50aa28fd | 817 | AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(9),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=1.1.1.1,dst=2.2.2.2,proto=1,tos=0xff,ttl=128,frag=no),icmp(type=8,code=0)'], [0], [stdout]) |
ce58df5b | 818 | AT_CHECK([tail -2 stdout], [0], |
d23df9a8 | 819 | [Megaflow: recirc_id=0,skb_priority=0,ip,in_port=9,nw_tos=252,nw_frag=no |
ce58df5b | 820 | Datapath actions: dnl |
e44768b7 | 821 | 100,dnl |
d23df9a8 JR |
822 | set(ipv4(tos=0x4/0xfc)),set(skb_priority(0x1)),1,dnl |
823 | set(ipv4(tos=0x8/0xfc)),set(skb_priority(0x2)),1,dnl | |
8b36f51e | 824 | 1,dnl |
d23df9a8 JR |
825 | set(ipv4(tos=0x4/0xfc)),set(skb_priority(0x1)),1,dnl |
826 | set(ipv4(tos=0xfc/0xfc)),set(skb_priority(0)),1,dnl | |
827 | set(ipv4(tos=0/0xfc)),1,100 | |
8b36f51e EJ |
828 | ]) |
829 | OVS_VSWITCHD_STOP | |
830 | AT_CLEANUP | |
831 | ||
fd19297b | 832 | AT_SETUP([ofproto-dpif - output/flood flags]) |
f7b8e494 JP |
833 | OVS_VSWITCHD_START |
834 | ADD_OF_PORTS([br0], [1], [2], [3], [4], [5], [6], [7]) | |
fd19297b EJ |
835 | |
836 | AT_DATA([flows.txt], [dnl | |
a0fbe94a | 837 | in_port=local actions=local,flood |
fd19297b EJ |
838 | in_port=1 actions=flood |
839 | in_port=2 actions=all | |
bdda5aca BP |
840 | in_port=3 actions=output:LOCAL,output:1,output:2,output:3,output:4,output:5,output:6,output:7 |
841 | in_port=4 actions=enqueue:LOCAL:1,enqueue:1:1,enqueue:2:1,enqueue:3:2,enqueue:4:1,enqueue:5:1,enqueue:6:1,enqueue:7:1 | |
fd19297b EJ |
842 | ]) |
843 | AT_CHECK([ovs-ofctl add-flows br0 flows.txt]) | |
844 | AT_CHECK([ovs-ofctl mod-port br0 5 noforward]) | |
845 | AT_CHECK([ovs-ofctl mod-port br0 6 noflood]) | |
846 | ||
50aa28fd | 847 | AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(100),eth(src=00:00:00:00:00:01,dst=00:00:00:00:00:02),eth_type(0x0900)'], [0], [stdout]) |
a0fbe94a AR |
848 | AT_CHECK([tail -1 stdout \ |
849 | | sed -e 's/Datapath actions: //' | tr ',' '\n' | sort], [0], [dnl | |
850 | 1 | |
851 | 2 | |
852 | 3 | |
853 | 4 | |
854 | 7 | |
855 | ]) | |
856 | ||
50aa28fd | 857 | AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(1),eth(src=00:00:00:00:00:01,dst=00:00:00:00:00:02),eth_type(0x0900)'], [0], [stdout]) |
fd19297b EJ |
858 | AT_CHECK([tail -1 stdout \ |
859 | | sed -e 's/Datapath actions: //' | tr ',' '\n' | sort], [0], [dnl | |
e44768b7 | 860 | 100 |
fd19297b EJ |
861 | 2 |
862 | 3 | |
863 | 4 | |
864 | 7 | |
865 | ]) | |
866 | ||
50aa28fd | 867 | AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(2),eth(src=00:00:00:00:00:01,dst=00:00:00:00:00:02),eth_type(0x0900)'], [0], [stdout]) |
fd19297b EJ |
868 | AT_CHECK([tail -1 stdout \ |
869 | | sed -e 's/Datapath actions: //' | tr ',' '\n' | sort], [0], [dnl | |
fd19297b | 870 | 1 |
e44768b7 | 871 | 100 |
fd19297b EJ |
872 | 3 |
873 | 4 | |
874 | 6 | |
875 | 7 | |
876 | ]) | |
877 | ||
50aa28fd | 878 | AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(3),eth(src=00:00:00:00:00:01,dst=00:00:00:00:00:02),eth_type(0x0900)'], [0], [stdout]) |
fd19297b | 879 | AT_CHECK([tail -1 stdout], [0], |
e44768b7 | 880 | [Datapath actions: 100,1,2,4,6,7 |
fd19297b EJ |
881 | ]) |
882 | ||
50aa28fd | 883 | AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(4),eth(src=00:00:00:00:00:01,dst=00:00:00:00:00:02),eth_type(0x0900)'], [0], [stdout]) |
fd19297b | 884 | AT_CHECK([tail -1 stdout], [0], |
1b567fb9 | 885 | [Datapath actions: set(skb_priority(0x1)),100,1,2,set(skb_priority(0x2)),3,set(skb_priority(0x1)),6,7 |
fd19297b EJ |
886 | ]) |
887 | OVS_VSWITCHD_STOP | |
888 | AT_CLEANUP | |
889 | ||
6b83a3c5 | 890 | AT_SETUP([ofproto-dpif - Default Table Miss - OF1.0 (OFPTC_TABLE_MISS_CONTROLLER)]) |
6d328fa2 SH |
891 | OVS_VSWITCHD_START([dnl |
892 | add-port br0 p1 -- set Interface p1 type=dummy | |
893 | ]) | |
894 | ON_EXIT([kill `cat ovs-ofctl.pid`]) | |
895 | ||
896 | AT_CAPTURE_FILE([ofctl_monitor.log]) | |
897 | ||
898 | AT_CHECK([ovs-ofctl monitor br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log]) | |
899 | ||
900 | for i in 1 2 3 ; do | |
ea2735d3 | 901 | ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=9),tcp_flags(syn)' |
6d328fa2 | 902 | done |
8bd16974 | 903 | OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6]) |
6d328fa2 SH |
904 | OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit]) |
905 | AT_CHECK([cat ofctl_monitor.log], [0], [dnl | |
906 | NXT_PACKET_IN (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered) | |
e6d9ab56 | 907 | tcp,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=9,tcp_flags=syn tcp_csum:0 |
6d328fa2 SH |
908 | dnl |
909 | NXT_PACKET_IN (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered) | |
e6d9ab56 | 910 | tcp,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=9,tcp_flags=syn tcp_csum:0 |
6d328fa2 SH |
911 | dnl |
912 | NXT_PACKET_IN (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered) | |
e6d9ab56 | 913 | tcp,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=9,tcp_flags=syn tcp_csum:0 |
6d328fa2 SH |
914 | ]) |
915 | ||
916 | AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore]) | |
917 | AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl | |
918 | NXST_FLOW reply: | |
919 | ]) | |
920 | ||
921 | OVS_VSWITCHD_STOP | |
922 | AT_CLEANUP | |
923 | ||
6b83a3c5 SH |
924 | AT_SETUP([ofproto-dpif - Default Table Miss - OF1.3 (OFPTC_TABLE_MISS_DROP)]) |
925 | OVS_VSWITCHD_START([dnl | |
926 | add-port br0 p1 -- set Interface p1 type=dummy | |
927 | ]) | |
928 | ON_EXIT([kill `cat ovs-ofctl.pid`]) | |
929 | ||
930 | AT_CAPTURE_FILE([ofctl_monitor.log]) | |
931 | AT_CHECK([ovs-ofctl del-flows br0]) | |
932 | ||
933 | AT_CHECK([ovs-ofctl monitor -OOpenFlow13 -P openflow10 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log]) | |
934 | ||
935 | dnl Test that missed packets are droped | |
936 | for i in 1 2 3 ; do | |
ea2735d3 | 937 | ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=9),tcp_flags(ack,syn)' |
6b83a3c5 SH |
938 | done |
939 | OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit]) | |
940 | ||
941 | AT_CHECK([cat ofctl_monitor.log], [0], [dnl | |
942 | ]) | |
943 | ||
944 | AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore]) | |
945 | AT_CHECK([ovs-ofctl -OOpenFlow13 dump-flows br0 | ofctl_strip | sort], [0], [dnl | |
946 | OFPST_FLOW reply (OF1.3): | |
947 | ]) | |
948 | ||
949 | OVS_VSWITCHD_STOP | |
950 | AT_CLEANUP | |
951 | ||
6d328fa2 SH |
952 | AT_SETUP([ofproto-dpif - Table Miss - goto table and OFPTC_TABLE_MISS_CONTROLLER]) |
953 | OVS_VSWITCHD_START([dnl | |
954 | add-port br0 p1 -- set Interface p1 type=dummy | |
955 | ]) | |
956 | ON_EXIT([kill `cat ovs-ofctl.pid`]) | |
957 | ||
958 | AT_CAPTURE_FILE([ofctl_monitor.log]) | |
959 | AT_CHECK([ovs-ofctl -OOpenFlow12 add-flow br0 'table=0 actions=goto_table(1)']) | |
960 | ||
961 | AT_CHECK([ovs-ofctl monitor -P openflow10 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log]) | |
962 | ||
963 | for i in 1 2 3 ; do | |
8e4c1621 | 964 | ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=9),tcp_flags(urg|rst)' |
6d328fa2 | 965 | done |
8bd16974 | 966 | OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6]) |
6d328fa2 SH |
967 | OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit]) |
968 | AT_CHECK([cat ofctl_monitor.log], [0], [dnl | |
969 | OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered) | |
e6d9ab56 | 970 | tcp,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=9,tcp_flags=rst|urg tcp_csum:0 |
6d328fa2 SH |
971 | dnl |
972 | OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered) | |
e6d9ab56 | 973 | tcp,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=9,tcp_flags=rst|urg tcp_csum:0 |
6d328fa2 SH |
974 | dnl |
975 | OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered) | |
e6d9ab56 | 976 | tcp,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=9,tcp_flags=rst|urg tcp_csum:0 |
6d328fa2 SH |
977 | ]) |
978 | ||
cea4a6d7 | 979 | AT_CHECK([ovs-appctl revalidator/purge], [0]) |
6d328fa2 SH |
980 | AT_CHECK([ovs-ofctl -OOpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl |
981 | n_packets=3, n_bytes=180, actions=goto_table:1 | |
982 | OFPST_FLOW reply (OF1.2): | |
983 | ]) | |
984 | ||
985 | OVS_VSWITCHD_STOP | |
986 | AT_CLEANUP | |
987 | ||
988 | AT_SETUP([ofproto-dpif - Table Miss - resubmit and OFPTC_TABLE_MISS_CONTROLLER]) | |
989 | OVS_VSWITCHD_START([dnl | |
990 | add-port br0 p1 -- set Interface p1 type=dummy | |
991 | ]) | |
992 | ON_EXIT([kill `cat ovs-ofctl.pid`]) | |
993 | ||
994 | AT_CAPTURE_FILE([ofctl_monitor.log]) | |
995 | AT_CHECK([ovs-ofctl -OOpenFlow12 add-flow br0 'table=0 actions=resubmit(1,1)']) | |
996 | ||
997 | AT_CHECK([ovs-ofctl monitor -P openflow10 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log]) | |
998 | ||
999 | for i in 1 2 3 ; do | |
1000 | ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=9),tcp_flags(0x010)' | |
1001 | done | |
1002 | ||
1003 | OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit]) | |
1004 | AT_CHECK([cat ofctl_monitor.log], [0], [dnl | |
1005 | ]) | |
1006 | ||
cea4a6d7 | 1007 | AT_CHECK([ovs-appctl revalidator/purge], [0]) |
6d328fa2 SH |
1008 | AT_CHECK([ovs-ofctl -OOpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl |
1009 | n_packets=3, n_bytes=180, actions=resubmit(1,1) | |
1010 | OFPST_FLOW reply (OF1.2): | |
1011 | ]) | |
1012 | ||
1013 | OVS_VSWITCHD_STOP | |
1014 | AT_CLEANUP | |
1015 | ||
1016 | AT_SETUP([ofproto-dpif - Table Miss - OFPTC_TABLE_MISS_CONTINUE]) | |
1017 | OVS_VSWITCHD_START([dnl | |
1018 | add-port br0 p1 -- set Interface p1 type=dummy | |
1019 | ]) | |
1020 | ON_EXIT([kill `cat ovs-ofctl.pid`]) | |
1021 | ||
1022 | AT_CAPTURE_FILE([ofctl_monitor.log]) | |
1023 | AT_CHECK([ovs-ofctl add-flow br0 'table=1 dl_src=10:11:11:11:11:11 actions=controller']) | |
1024 | AT_CHECK([ovs-ofctl -OOpenFlow11 mod-table br0 all continue]) | |
1025 | ||
1026 | dnl Miss table 0, Hit table 1 | |
1027 | AT_CHECK([ovs-ofctl monitor br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log]) | |
1028 | ||
1029 | for i in 1 2 3 ; do | |
1030 | ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=10:11:11:11:11:11,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=9),tcp_flags(0x010)' | |
1031 | done | |
8bd16974 | 1032 | OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6]) |
6d328fa2 SH |
1033 | OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit]) |
1034 | ||
1035 | AT_CHECK([cat ofctl_monitor.log], [0], [dnl | |
1036 | NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered) | |
e6d9ab56 | 1037 | tcp,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=9,tcp_flags=ack tcp_csum:0 |
6d328fa2 SH |
1038 | dnl |
1039 | NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered) | |
e6d9ab56 | 1040 | tcp,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=9,tcp_flags=ack tcp_csum:0 |
6d328fa2 SH |
1041 | dnl |
1042 | NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered) | |
e6d9ab56 | 1043 | tcp,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=9,tcp_flags=ack tcp_csum:0 |
6d328fa2 SH |
1044 | ]) |
1045 | ||
1046 | dnl Hit table 0, Miss all other tables, sent to controller | |
1047 | AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --no-chdir --pidfile 2> ofctl_monitor.log]) | |
1048 | ||
1049 | for i in 1 2 3 ; do | |
1050 | ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=9),tcp_flags(0x010)' | |
1051 | done | |
8bd16974 | 1052 | OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6]) |
6d328fa2 SH |
1053 | OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit]) |
1054 | ||
1055 | AT_CHECK([cat ofctl_monitor.log], [0], [dnl | |
1056 | NXT_PACKET_IN (xid=0x0): table_id=253 cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered) | |
e6d9ab56 | 1057 | tcp,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=9,tcp_flags=ack tcp_csum:0 |
6d328fa2 SH |
1058 | dnl |
1059 | NXT_PACKET_IN (xid=0x0): table_id=253 cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered) | |
e6d9ab56 | 1060 | tcp,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=9,tcp_flags=ack tcp_csum:0 |
6d328fa2 SH |
1061 | dnl |
1062 | NXT_PACKET_IN (xid=0x0): table_id=253 cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered) | |
e6d9ab56 | 1063 | tcp,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=9,tcp_flags=ack tcp_csum:0 |
6d328fa2 SH |
1064 | ]) |
1065 | ||
cea4a6d7 | 1066 | AT_CHECK([ovs-appctl revalidator/purge], [0]) |
6d328fa2 SH |
1067 | AT_CHECK([ovs-ofctl -OOpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl |
1068 | table=1, n_packets=3, n_bytes=180, dl_src=10:11:11:11:11:11 actions=CONTROLLER:65535 | |
1069 | OFPST_FLOW reply (OF1.2): | |
1070 | ]) | |
1071 | ||
1072 | OVS_VSWITCHD_STOP | |
1073 | AT_CLEANUP | |
1074 | ||
1075 | AT_SETUP([ofproto-dpif - Table Miss - goto table and OFPTC_TABLE_MISS_CONTINUE]) | |
1076 | OVS_VSWITCHD_START([dnl | |
1077 | add-port br0 p1 -- set Interface p1 type=dummy | |
1078 | ]) | |
1079 | ON_EXIT([kill `cat ovs-ofctl.pid`]) | |
1080 | ||
1081 | AT_CAPTURE_FILE([ofctl_monitor.log]) | |
1082 | AT_DATA([flows.txt], [dnl | |
1083 | table=0 actions=goto_table(1) | |
1084 | table=2 dl_src=10:11:11:11:11:11 actions=controller | |
1085 | ]) | |
1086 | AT_CHECK([ovs-ofctl -OOpenFlow12 add-flows br0 flows.txt]) | |
1087 | AT_CHECK([ovs-ofctl -OOpenFlow11 mod-table br0 all continue]) | |
1088 | ||
1089 | dnl Hit table 0, Miss table 1, Hit table 2 | |
1090 | AT_CHECK([ovs-ofctl monitor br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log]) | |
1091 | ||
1092 | for i in 1 2 3 ; do | |
1093 | ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=10:11:11:11:11:11,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=9),tcp_flags(0x010)' | |
1094 | done | |
8bd16974 | 1095 | OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6]) |
0c473314 | 1096 | OVS_APP_EXIT_AND_WAIT(ovs-ofctl) |
6d328fa2 SH |
1097 | |
1098 | AT_CHECK([cat ofctl_monitor.log], [0], [dnl | |
1099 | NXT_PACKET_IN (xid=0x0): table_id=2 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered) | |
e6d9ab56 | 1100 | tcp,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=9,tcp_flags=ack tcp_csum:0 |
6d328fa2 SH |
1101 | dnl |
1102 | NXT_PACKET_IN (xid=0x0): table_id=2 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered) | |
e6d9ab56 | 1103 | tcp,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=9,tcp_flags=ack tcp_csum:0 |
6d328fa2 SH |
1104 | dnl |
1105 | NXT_PACKET_IN (xid=0x0): table_id=2 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered) | |
e6d9ab56 | 1106 | tcp,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=9,tcp_flags=ack tcp_csum:0 |
6d328fa2 SH |
1107 | ]) |
1108 | ||
1109 | dnl Hit table 1, Miss all other tables, sent to controller | |
1110 | AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --no-chdir --pidfile 2> ofctl_monitor.log]) | |
1111 | ||
1112 | for i in 1 2 3 ; do | |
1113 | ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=9),tcp_flags(0x010)' | |
1114 | done | |
8bd16974 | 1115 | OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6]) |
6d328fa2 SH |
1116 | OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit]) |
1117 | ||
1118 | AT_CHECK([cat ofctl_monitor.log], [0], [dnl | |
1119 | NXT_PACKET_IN (xid=0x0): table_id=253 cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered) | |
e6d9ab56 | 1120 | tcp,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=9,tcp_flags=ack tcp_csum:0 |
6d328fa2 SH |
1121 | dnl |
1122 | NXT_PACKET_IN (xid=0x0): table_id=253 cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered) | |
e6d9ab56 | 1123 | tcp,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=9,tcp_flags=ack tcp_csum:0 |
6d328fa2 SH |
1124 | dnl |
1125 | NXT_PACKET_IN (xid=0x0): table_id=253 cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered) | |
e6d9ab56 | 1126 | tcp,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=9,tcp_flags=ack tcp_csum:0 |
6d328fa2 SH |
1127 | ]) |
1128 | ||
cea4a6d7 | 1129 | AT_CHECK([ovs-appctl revalidator/purge], [0]) |
6d328fa2 SH |
1130 | AT_CHECK([ovs-ofctl -OOpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl |
1131 | n_packets=6, n_bytes=360, actions=goto_table:1 | |
1132 | table=2, n_packets=3, n_bytes=180, dl_src=10:11:11:11:11:11 actions=CONTROLLER:65535 | |
1133 | OFPST_FLOW reply (OF1.2): | |
1134 | ]) | |
1135 | ||
1136 | OVS_VSWITCHD_STOP | |
1137 | AT_CLEANUP | |
1138 | ||
1139 | AT_SETUP([ofproto-dpif - Table Miss - resubmit and OFPTC_TABLE_MISS_CONTINUE]) | |
1140 | OVS_VSWITCHD_START([dnl | |
1141 | add-port br0 p1 -- set Interface p1 type=dummy | |
1142 | ]) | |
1143 | ON_EXIT([kill `cat ovs-ofctl.pid`]) | |
1144 | ||
1145 | AT_CAPTURE_FILE([ofctl_monitor.log]) | |
1146 | AT_DATA([flows.txt], [dnl | |
1147 | table=0 actions=resubmit(1,1) | |
1148 | table=2 dl_src=10:11:11:11:11:11 actions=controller | |
1149 | ]) | |
1150 | AT_CHECK([ovs-ofctl -OOpenFlow12 add-flows br0 flows.txt]) | |
1151 | AT_CHECK([ovs-ofctl -OOpenFlow11 mod-table br0 all continue]) | |
1152 | ||
1153 | dnl Hit table 0, Miss table 1, Dropped | |
1154 | AT_CHECK([ovs-ofctl monitor br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log]) | |
1155 | ||
1156 | for i in 1 2 3 ; do | |
1157 | ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=10:11:11:11:11:11,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=9),tcp_flags(0x010)' | |
1158 | done | |
0c473314 | 1159 | OVS_APP_EXIT_AND_WAIT(ovs-ofctl) |
6d328fa2 SH |
1160 | |
1161 | AT_CHECK([cat ofctl_monitor.log], [0], [dnl | |
1162 | ]) | |
1163 | ||
1164 | dnl Hit table 1, Dropped | |
1165 | AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --no-chdir --pidfile 2> ofctl_monitor.log]) | |
1166 | ||
1167 | for i in 1 2 3 ; do | |
1168 | ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=9),tcp_flags(0x010)' | |
1169 | done | |
1170 | OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit]) | |
1171 | ||
1172 | AT_CHECK([cat ofctl_monitor.log], [0], [dnl | |
1173 | ]) | |
1174 | ||
cea4a6d7 | 1175 | AT_CHECK([ovs-appctl revalidator/purge], [0]) |
6d328fa2 SH |
1176 | AT_CHECK([ovs-ofctl -OOpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl |
1177 | n_packets=6, n_bytes=360, actions=resubmit(1,1) | |
1178 | table=2, dl_src=10:11:11:11:11:11 actions=CONTROLLER:65535 | |
1179 | OFPST_FLOW reply (OF1.2): | |
1180 | ]) | |
1181 | ||
1182 | OVS_VSWITCHD_STOP | |
1183 | AT_CLEANUP | |
1184 | ||
1185 | AT_SETUP([ofproto-dpif - Table Miss - OFPTC_TABLE_MISS_DROP]) | |
1186 | OVS_VSWITCHD_START([dnl | |
1187 | add-port br0 p1 -- set Interface p1 type=dummy | |
1188 | ]) | |
1189 | ON_EXIT([kill `cat ovs-ofctl.pid`]) | |
1190 | ||
1191 | AT_CAPTURE_FILE([ofctl_monitor.log]) | |
1192 | AT_CHECK([ovs-ofctl -OOpenFlow11 mod-table br0 all drop]) | |
1193 | ||
1194 | AT_CHECK([ovs-ofctl monitor -P openflow10 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log]) | |
1195 | ||
1196 | dnl Test that missed packets are droped | |
1197 | for i in 1 2 3 ; do | |
1198 | ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=9),tcp_flags(0x010)' | |
1199 | done | |
1200 | OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit]) | |
1201 | ||
1202 | AT_CHECK([cat ofctl_monitor.log], [0], [dnl | |
1203 | ]) | |
1204 | ||
1205 | AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore]) | |
1206 | AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl | |
1207 | NXST_FLOW reply: | |
1208 | ]) | |
1209 | ||
1210 | OVS_VSWITCHD_STOP | |
1211 | AT_CLEANUP | |
1212 | ||
1213 | AT_SETUP([ofproto-dpif - Table Miss - goto table and OFPTC_TABLE_MISS_DROP]) | |
1214 | OVS_VSWITCHD_START([dnl | |
1215 | add-port br0 p1 -- set Interface p1 type=dummy | |
1216 | ]) | |
1217 | ON_EXIT([kill `cat ovs-ofctl.pid`]) | |
1218 | ||
1219 | AT_CAPTURE_FILE([ofctl_monitor.log]) | |
1220 | AT_CHECK([ovs-ofctl del-flows br0]) | |
1221 | AT_CHECK([ovs-ofctl -OOpenFlow12 add-flow br0 'table=0 actions=goto_table(1)']) | |
1222 | AT_CHECK([ovs-ofctl -OOpenFlow11 mod-table br0 all drop]) | |
1223 | ||
1224 | AT_CHECK([ovs-ofctl monitor -P openflow10 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log]) | |
1225 | ||
1226 | dnl Test that missed packets are droped | |
1227 | for i in 1 2 3 ; do | |
1228 | ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=9),tcp_flags(0x010)' | |
1229 | done | |
1230 | OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit]) | |
1231 | ||
1232 | AT_CHECK([cat ofctl_monitor.log], [0], [dnl | |
1233 | ]) | |
1234 | ||
cea4a6d7 | 1235 | AT_CHECK([ovs-appctl revalidator/purge], [0]) |
6d328fa2 SH |
1236 | AT_CHECK([ovs-ofctl -OOpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl |
1237 | n_packets=3, n_bytes=180, actions=goto_table:1 | |
1238 | OFPST_FLOW reply (OF1.2): | |
1239 | ]) | |
1240 | ||
1241 | OVS_VSWITCHD_STOP | |
1242 | AT_CLEANUP | |
1243 | ||
1244 | AT_SETUP([ofproto-dpif - Table Miss - resubmit and OFPTC_TABLE_MISS_DROP]) | |
1245 | OVS_VSWITCHD_START([dnl | |
1246 | add-port br0 p1 -- set Interface p1 type=dummy | |
1247 | ]) | |
1248 | ON_EXIT([kill `cat ovs-ofctl.pid`]) | |
1249 | ||
1250 | AT_CAPTURE_FILE([ofctl_monitor.log]) | |
1251 | AT_CHECK([ovs-ofctl del-flows br0]) | |
1252 | AT_CHECK([ovs-ofctl -OOpenFlow12 add-flow br0 'table=0 actions=resubmit(1,1)']) | |
1253 | AT_CHECK([ovs-ofctl -OOpenFlow11 mod-table br0 all drop]) | |
1254 | ||
1255 | AT_CHECK([ovs-ofctl monitor -P openflow10 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log]) | |
1256 | ||
1257 | dnl Test that missed packets are droped | |
1258 | for i in 1 2 3 ; do | |
1259 | ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=9),tcp_flags(0x010)' | |
1260 | done | |
1261 | OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit]) | |
1262 | ||
1263 | AT_CHECK([cat ofctl_monitor.log], [0], [dnl | |
1264 | ]) | |
1265 | ||
cea4a6d7 | 1266 | AT_CHECK([ovs-appctl revalidator/purge], [0]) |
6d328fa2 SH |
1267 | AT_CHECK([ovs-ofctl -OOpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl |
1268 | n_packets=3, n_bytes=180, actions=resubmit(1,1) | |
1269 | OFPST_FLOW reply (OF1.2): | |
1270 | ]) | |
1271 | ||
1272 | OVS_VSWITCHD_STOP | |
1273 | AT_CLEANUP | |
1274 | ||
15056dc8 EJ |
1275 | AT_SETUP([ofproto-dpif - controller]) |
1276 | OVS_VSWITCHD_START([dnl | |
1277 | add-port br0 p1 -- set Interface p1 type=dummy | |
1278 | ]) | |
57c94f35 | 1279 | ON_EXIT([kill `cat ovs-ofctl.pid`]) |
15056dc8 EJ |
1280 | |
1281 | AT_CAPTURE_FILE([ofctl_monitor.log]) | |
1282 | AT_DATA([flows.txt], [dnl | |
1283 | cookie=0x0 dl_src=10:11:11:11:11:11 actions=controller | |
54834960 | 1284 | cookie=0x1 dl_src=20:22:22:22:22:22 actions=controller,resubmit(80,1) |
15056dc8 EJ |
1285 | cookie=0x2 dl_src=30:33:33:33:33:33 actions=mod_vlan_vid:15,controller |
1286 | ||
54834960 EJ |
1287 | cookie=0x3 table=1 in_port=80 actions=load:1->NXM_NX_REG0[[]],mod_vlan_vid:80,controller,resubmit(81,2) |
1288 | cookie=0x4 table=2 in_port=81 actions=load:2->NXM_NX_REG1[[]],mod_dl_src:80:81:81:81:81:81,controller,resubmit(82,3) | |
1289 | cookie=0x5 table=3 in_port=82 actions=load:3->NXM_NX_REG2[[]],mod_dl_dst:82:82:82:82:82:82,controller,resubmit(83,4) | |
1290 | cookie=0x6 table=4 in_port=83 actions=load:4->NXM_NX_REG3[[]],mod_nw_src:83.83.83.83,controller,resubmit(84,5) | |
1291 | cookie=0x7 table=5 in_port=84 actions=load:5->NXM_NX_REG4[[]],load:6->NXM_NX_TUN_ID[[]],mod_nw_dst:84.84.84.84,controller,resubmit(85,6) | |
1292 | cookie=0x8 table=6 in_port=85 actions=mod_tp_src:85,controller,resubmit(86,7) | |
1293 | cookie=0x9 table=7 in_port=86 actions=mod_tp_dst:86,controller,controller | |
78cef7fd | 1294 | cookie=0xa dl_src=40:44:44:44:44:41 actions=mod_vlan_vid:99,mod_vlan_pcp:1,controller |
56d72f37 | 1295 | cookie=0xd dl_src=80:88:88:88:88:88 arp actions=load:2->OXM_OF_ARP_OP[[]],controller,load:0xc0a88001->OXM_OF_ARP_SPA[[]],controller,load:0x404444444441->OXM_OF_ARP_THA[[]],load:0x01010101->OXM_OF_ARP_SPA[[]],load:0x02020202->OXM_OF_ARP_TPA[[]],controller |
15056dc8 EJ |
1296 | ]) |
1297 | AT_CHECK([ovs-ofctl add-flows br0 flows.txt]) | |
1298 | ||
1299 | dnl Flow miss. | |
77a922c7 | 1300 | AT_CHECK([ovs-ofctl monitor -P openflow10 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log]) |
15056dc8 EJ |
1301 | |
1302 | for i in 1 2 3 ; do | |
dc235f7f | 1303 | ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=9),tcp_flags(0x010)' |
15056dc8 | 1304 | done |
57c94f35 | 1305 | OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6]) |
0c473314 | 1306 | OVS_APP_EXIT_AND_WAIT(ovs-ofctl) |
15056dc8 | 1307 | |
15056dc8 | 1308 | AT_CHECK([cat ofctl_monitor.log], [0], [dnl |
f0fd1a17 | 1309 | OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered) |
e6d9ab56 | 1310 | tcp,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=9,tcp_flags=ack tcp_csum:0 |
15056dc8 | 1311 | dnl |
f0fd1a17 | 1312 | OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered) |
e6d9ab56 | 1313 | tcp,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=9,tcp_flags=ack tcp_csum:0 |
15056dc8 | 1314 | dnl |
f0fd1a17 | 1315 | OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered) |
e6d9ab56 | 1316 | tcp,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=9,tcp_flags=ack tcp_csum:0 |
15056dc8 EJ |
1317 | ]) |
1318 | ||
1319 | dnl Singleton controller action. | |
77a922c7 | 1320 | AT_CHECK([ovs-ofctl monitor -P openflow10 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log]) |
15056dc8 EJ |
1321 | |
1322 | for i in 1 2 3 ; do | |
dc235f7f | 1323 | ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=10:11:11:11:11:11,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=10),tcp_flags(0x002)' |
15056dc8 | 1324 | done |
57c94f35 | 1325 | OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6]) |
0c473314 | 1326 | OVS_APP_EXIT_AND_WAIT(ovs-ofctl) |
15056dc8 | 1327 | |
15056dc8 EJ |
1328 | AT_CHECK([cat ofctl_monitor.log], [0], [dnl |
1329 | OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via action) data_len=60 (unbuffered) | |
e6d9ab56 | 1330 | tcp,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:0 |
15056dc8 EJ |
1331 | dnl |
1332 | OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via action) data_len=60 (unbuffered) | |
e6d9ab56 | 1333 | tcp,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:0 |
15056dc8 EJ |
1334 | dnl |
1335 | OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via action) data_len=60 (unbuffered) | |
e6d9ab56 | 1336 | tcp,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:0 |
15056dc8 EJ |
1337 | ]) |
1338 | ||
1339 | dnl Modified controller action. | |
77a922c7 | 1340 | AT_CHECK([ovs-ofctl monitor -P openflow10 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log]) |
15056dc8 EJ |
1341 | |
1342 | for i in 1 2 3 ; do | |
dc235f7f | 1343 | ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=30:33:33:33:33:33,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=10),tcp_flags(0x001)' |
15056dc8 | 1344 | done |
57c94f35 | 1345 | OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6]) |
0c473314 | 1346 | OVS_APP_EXIT_AND_WAIT(ovs-ofctl) |
15056dc8 | 1347 | |
15056dc8 EJ |
1348 | AT_CHECK([cat ofctl_monitor.log], [0], [dnl |
1349 | OFPT_PACKET_IN (xid=0x0): total_len=64 in_port=1 (via action) data_len=64 (unbuffered) | |
e6d9ab56 | 1350 | tcp,dl_vlan=15,dl_vlan_pcp=0,dl_src=30:33:33:33:33:33,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=fin tcp_csum:0 |
15056dc8 EJ |
1351 | dnl |
1352 | OFPT_PACKET_IN (xid=0x0): total_len=64 in_port=1 (via action) data_len=64 (unbuffered) | |
e6d9ab56 | 1353 | tcp,dl_vlan=15,dl_vlan_pcp=0,dl_src=30:33:33:33:33:33,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=fin tcp_csum:0 |
15056dc8 EJ |
1354 | dnl |
1355 | OFPT_PACKET_IN (xid=0x0): total_len=64 in_port=1 (via action) data_len=64 (unbuffered) | |
e6d9ab56 | 1356 | tcp,dl_vlan=15,dl_vlan_pcp=0,dl_src=30:33:33:33:33:33,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=fin tcp_csum:0 |
15056dc8 EJ |
1357 | ]) |
1358 | ||
363dd1d9 JS |
1359 | dnl Modified VLAN controller action. |
1360 | AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log]) | |
1361 | ||
1362 | for i in 1 2 3; do | |
8249a1fe | 1363 | ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=40:44:44:44:44:41,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=16,tos=0,ttl=64,frag=no)' |
363dd1d9 | 1364 | done |
57c94f35 | 1365 | OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6]) |
0c473314 | 1366 | OVS_APP_EXIT_AND_WAIT(ovs-ofctl) |
363dd1d9 | 1367 | |
363dd1d9 JS |
1368 | AT_CHECK([cat ofctl_monitor.log], [0], [dnl |
1369 | NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered) | |
e6d9ab56 | 1370 | ip,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:44:41,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_proto=16,nw_tos=0,nw_ecn=0,nw_ttl=64 |
363dd1d9 JS |
1371 | dnl |
1372 | NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered) | |
e6d9ab56 | 1373 | ip,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:44:41,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_proto=16,nw_tos=0,nw_ecn=0,nw_ttl=64 |
363dd1d9 JS |
1374 | dnl |
1375 | NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered) | |
e6d9ab56 | 1376 | ip,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:44:41,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_proto=16,nw_tos=0,nw_ecn=0,nw_ttl=64 |
363dd1d9 JS |
1377 | ]) |
1378 | ||
349fbdc2 SH |
1379 | dnl Checksum TCP. |
1380 | AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --no-chdir --pidfile 2> ofctl_monitor.log]) | |
1381 | ||
1382 | for i in 1 ; do | |
1383 | ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=20:22:22:22:22:22,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=11),tcp_flags(0x001)' | |
1384 | done | |
1385 | OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 18]) | |
1386 | ovs-appctl -t ovs-ofctl exit | |
1387 | ||
1388 | AT_CHECK([cat ofctl_monitor.log], [0], [dnl | |
1389 | NXT_PACKET_IN (xid=0x0): cookie=0x1 total_len=60 in_port=1 (via action) data_len=60 (unbuffered) | |
e6d9ab56 | 1390 | tcp,vlan_tci=0x0000,dl_src=20:22:22:22:22:22,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=11,tcp_flags=fin tcp_csum:0 |
349fbdc2 | 1391 | dnl |
50dcbd8e | 1392 | NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x3 total_len=64 reg0=0x1,in_port=1 (via action) data_len=64 (unbuffered) |
e6d9ab56 | 1393 | tcp,dl_vlan=80,dl_vlan_pcp=0,dl_src=20:22:22:22:22:22,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=11,tcp_flags=fin tcp_csum:0 |
349fbdc2 | 1394 | dnl |
50dcbd8e | 1395 | NXT_PACKET_IN (xid=0x0): table_id=2 cookie=0x4 total_len=64 reg0=0x1,reg1=0x2,in_port=1 (via action) data_len=64 (unbuffered) |
e6d9ab56 | 1396 | tcp,dl_vlan=80,dl_vlan_pcp=0,dl_src=80:81:81:81:81:81,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=11,tcp_flags=fin tcp_csum:0 |
349fbdc2 | 1397 | dnl |
50dcbd8e | 1398 | NXT_PACKET_IN (xid=0x0): table_id=3 cookie=0x5 total_len=64 reg0=0x1,reg1=0x2,reg2=0x3,in_port=1 (via action) data_len=64 (unbuffered) |
e6d9ab56 | 1399 | tcp,dl_vlan=80,dl_vlan_pcp=0,dl_src=80:81:81:81:81:81,dl_dst=82:82:82:82:82:82,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=11,tcp_flags=fin tcp_csum:0 |
349fbdc2 | 1400 | dnl |
50dcbd8e | 1401 | NXT_PACKET_IN (xid=0x0): table_id=4 cookie=0x6 total_len=64 reg0=0x1,reg1=0x2,reg2=0x3,reg3=0x4,in_port=1 (via action) data_len=64 (unbuffered) |
e6d9ab56 | 1402 | tcp,dl_vlan=80,dl_vlan_pcp=0,dl_src=80:81:81:81:81:81,dl_dst=82:82:82:82:82:82,nw_src=83.83.83.83,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=11,tcp_flags=fin tcp_csum:1a03 |
349fbdc2 | 1403 | dnl |
50dcbd8e | 1404 | NXT_PACKET_IN (xid=0x0): table_id=5 cookie=0x7 total_len=64 reg0=0x1,reg1=0x2,reg2=0x3,reg3=0x4,reg4=0x5,tun_id=0x6,in_port=1 (via action) data_len=64 (unbuffered) |
e6d9ab56 | 1405 | tcp,dl_vlan=80,dl_vlan_pcp=0,dl_src=80:81:81:81:81:81,dl_dst=82:82:82:82:82:82,nw_src=83.83.83.83,nw_dst=84.84.84.84,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=11,tcp_flags=fin tcp_csum:3205 |
349fbdc2 | 1406 | dnl |
50dcbd8e | 1407 | NXT_PACKET_IN (xid=0x0): table_id=6 cookie=0x8 total_len=64 reg0=0x1,reg1=0x2,reg2=0x3,reg3=0x4,reg4=0x5,tun_id=0x6,in_port=1 (via action) data_len=64 (unbuffered) |
e6d9ab56 | 1408 | tcp,dl_vlan=80,dl_vlan_pcp=0,dl_src=80:81:81:81:81:81,dl_dst=82:82:82:82:82:82,nw_src=83.83.83.83,nw_dst=84.84.84.84,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=85,tp_dst=11,tcp_flags=fin tcp_csum:31b8 |
349fbdc2 | 1409 | dnl |
50dcbd8e | 1410 | NXT_PACKET_IN (xid=0x0): table_id=7 cookie=0x9 total_len=64 reg0=0x1,reg1=0x2,reg2=0x3,reg3=0x4,reg4=0x5,tun_id=0x6,in_port=1 (via action) data_len=64 (unbuffered) |
e6d9ab56 | 1411 | tcp,dl_vlan=80,dl_vlan_pcp=0,dl_src=80:81:81:81:81:81,dl_dst=82:82:82:82:82:82,nw_src=83.83.83.83,nw_dst=84.84.84.84,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=85,tp_dst=86,tcp_flags=fin tcp_csum:316d |
349fbdc2 | 1412 | dnl |
50dcbd8e | 1413 | NXT_PACKET_IN (xid=0x0): table_id=7 cookie=0x9 total_len=64 reg0=0x1,reg1=0x2,reg2=0x3,reg3=0x4,reg4=0x5,tun_id=0x6,in_port=1 (via action) data_len=64 (unbuffered) |
e6d9ab56 | 1414 | tcp,dl_vlan=80,dl_vlan_pcp=0,dl_src=80:81:81:81:81:81,dl_dst=82:82:82:82:82:82,nw_src=83.83.83.83,nw_dst=84.84.84.84,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=85,tp_dst=86,tcp_flags=fin tcp_csum:316d |
349fbdc2 SH |
1415 | ]) |
1416 | ||
1417 | dnl Checksum UDP. | |
1418 | AT_CHECK([ovs-ofctl monitor br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log]) | |
1419 | ||
1420 | for i in 1 ; do | |
1421 | ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 20 22 22 22 22 22 08 00 45 00 00 1C 00 00 00 00 00 11 00 00 C0 A8 00 01 C0 A8 00 02 00 08 00 0B 00 00 12 34 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' | |
1422 | done | |
1423 | OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 18]) | |
1424 | ovs-appctl -t ovs-ofctl exit | |
1425 | ||
1426 | AT_CHECK([cat ofctl_monitor.log], [0], [dnl | |
1427 | NXT_PACKET_IN (xid=0x0): cookie=0x1 total_len=60 in_port=1 (via action) data_len=60 (unbuffered) | |
e6d9ab56 | 1428 | udp,vlan_tci=0x0000,dl_src=20:22:22:22:22:22,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=8,tp_dst=11 udp_csum:1234 |
349fbdc2 | 1429 | dnl |
50dcbd8e | 1430 | NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x3 total_len=64 reg0=0x1,in_port=1 (via action) data_len=64 (unbuffered) |
e6d9ab56 | 1431 | udp,dl_vlan=80,dl_vlan_pcp=0,dl_src=20:22:22:22:22:22,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=8,tp_dst=11 udp_csum:1234 |
349fbdc2 | 1432 | dnl |
50dcbd8e | 1433 | NXT_PACKET_IN (xid=0x0): table_id=2 cookie=0x4 total_len=64 reg0=0x1,reg1=0x2,in_port=1 (via action) data_len=64 (unbuffered) |
e6d9ab56 | 1434 | udp,dl_vlan=80,dl_vlan_pcp=0,dl_src=80:81:81:81:81:81,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=8,tp_dst=11 udp_csum:1234 |
349fbdc2 | 1435 | dnl |
50dcbd8e | 1436 | NXT_PACKET_IN (xid=0x0): table_id=3 cookie=0x5 total_len=64 reg0=0x1,reg1=0x2,reg2=0x3,in_port=1 (via action) data_len=64 (unbuffered) |
e6d9ab56 | 1437 | udp,dl_vlan=80,dl_vlan_pcp=0,dl_src=80:81:81:81:81:81,dl_dst=82:82:82:82:82:82,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=8,tp_dst=11 udp_csum:1234 |
349fbdc2 | 1438 | dnl |
50dcbd8e | 1439 | NXT_PACKET_IN (xid=0x0): table_id=4 cookie=0x6 total_len=64 reg0=0x1,reg1=0x2,reg2=0x3,reg3=0x4,in_port=1 (via action) data_len=64 (unbuffered) |
e6d9ab56 | 1440 | udp,dl_vlan=80,dl_vlan_pcp=0,dl_src=80:81:81:81:81:81,dl_dst=82:82:82:82:82:82,nw_src=83.83.83.83,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=8,tp_dst=11 udp_csum:2c37 |
349fbdc2 | 1441 | dnl |
50dcbd8e | 1442 | NXT_PACKET_IN (xid=0x0): table_id=5 cookie=0x7 total_len=64 reg0=0x1,reg1=0x2,reg2=0x3,reg3=0x4,reg4=0x5,tun_id=0x6,in_port=1 (via action) data_len=64 (unbuffered) |
e6d9ab56 | 1443 | udp,dl_vlan=80,dl_vlan_pcp=0,dl_src=80:81:81:81:81:81,dl_dst=82:82:82:82:82:82,nw_src=83.83.83.83,nw_dst=84.84.84.84,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=8,tp_dst=11 udp_csum:4439 |
349fbdc2 | 1444 | dnl |
50dcbd8e | 1445 | NXT_PACKET_IN (xid=0x0): table_id=6 cookie=0x8 total_len=64 reg0=0x1,reg1=0x2,reg2=0x3,reg3=0x4,reg4=0x5,tun_id=0x6,in_port=1 (via action) data_len=64 (unbuffered) |
e6d9ab56 | 1446 | udp,dl_vlan=80,dl_vlan_pcp=0,dl_src=80:81:81:81:81:81,dl_dst=82:82:82:82:82:82,nw_src=83.83.83.83,nw_dst=84.84.84.84,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=85,tp_dst=11 udp_csum:43ec |
349fbdc2 | 1447 | dnl |
50dcbd8e | 1448 | NXT_PACKET_IN (xid=0x0): table_id=7 cookie=0x9 total_len=64 reg0=0x1,reg1=0x2,reg2=0x3,reg3=0x4,reg4=0x5,tun_id=0x6,in_port=1 (via action) data_len=64 (unbuffered) |
e6d9ab56 | 1449 | udp,dl_vlan=80,dl_vlan_pcp=0,dl_src=80:81:81:81:81:81,dl_dst=82:82:82:82:82:82,nw_src=83.83.83.83,nw_dst=84.84.84.84,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=85,tp_dst=86 udp_csum:43a1 |
349fbdc2 | 1450 | dnl |
50dcbd8e | 1451 | NXT_PACKET_IN (xid=0x0): table_id=7 cookie=0x9 total_len=64 reg0=0x1,reg1=0x2,reg2=0x3,reg3=0x4,reg4=0x5,tun_id=0x6,in_port=1 (via action) data_len=64 (unbuffered) |
e6d9ab56 | 1452 | udp,dl_vlan=80,dl_vlan_pcp=0,dl_src=80:81:81:81:81:81,dl_dst=82:82:82:82:82:82,nw_src=83.83.83.83,nw_dst=84.84.84.84,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=85,tp_dst=86 udp_csum:43a1 |
349fbdc2 SH |
1453 | ]) |
1454 | ||
1455 | dnl Modified ARP controller action. | |
1456 | AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log]) | |
1457 | ||
1458 | for i in 1 2 3; do | |
1459 | ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=80:88:88:88:88:88,dst=ff:ff:ff:ff:ff:ff),eth_type(0x0806),arp(sip=192.168.0.1,tip=192.168.0.2,op=1,sha=50:54:00:00:00:05,tha=00:00:00:00:00:00)' | |
1460 | done | |
1461 | ||
368a198a | 1462 | OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 18]) |
349fbdc2 SH |
1463 | OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit]) |
1464 | AT_CHECK([cat ofctl_monitor.log], [0], [dnl | |
1465 | NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=60 in_port=1 (via action) data_len=60 (unbuffered) | |
e6d9ab56 | 1466 | arp,vlan_tci=0x0000,dl_src=80:88:88:88:88:88,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=192.168.0.1,arp_tpa=192.168.0.2,arp_op=2,arp_sha=50:54:00:00:00:05,arp_tha=00:00:00:00:00:00 |
349fbdc2 | 1467 | NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=60 in_port=1 (via action) data_len=60 (unbuffered) |
e6d9ab56 | 1468 | arp,vlan_tci=0x0000,dl_src=80:88:88:88:88:88,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=192.168.128.1,arp_tpa=192.168.0.2,arp_op=2,arp_sha=50:54:00:00:00:05,arp_tha=00:00:00:00:00:00 |
349fbdc2 | 1469 | NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=60 in_port=1 (via action) data_len=60 (unbuffered) |
e6d9ab56 | 1470 | arp,vlan_tci=0x0000,dl_src=80:88:88:88:88:88,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=1.1.1.1,arp_tpa=2.2.2.2,arp_op=2,arp_sha=50:54:00:00:00:05,arp_tha=40:44:44:44:44:41 |
349fbdc2 | 1471 | NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=60 in_port=1 (via action) data_len=60 (unbuffered) |
e6d9ab56 | 1472 | arp,vlan_tci=0x0000,dl_src=80:88:88:88:88:88,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=192.168.0.1,arp_tpa=192.168.0.2,arp_op=2,arp_sha=50:54:00:00:00:05,arp_tha=00:00:00:00:00:00 |
349fbdc2 | 1473 | NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=60 in_port=1 (via action) data_len=60 (unbuffered) |
e6d9ab56 | 1474 | arp,vlan_tci=0x0000,dl_src=80:88:88:88:88:88,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=192.168.128.1,arp_tpa=192.168.0.2,arp_op=2,arp_sha=50:54:00:00:00:05,arp_tha=00:00:00:00:00:00 |
349fbdc2 | 1475 | NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=60 in_port=1 (via action) data_len=60 (unbuffered) |
e6d9ab56 | 1476 | arp,vlan_tci=0x0000,dl_src=80:88:88:88:88:88,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=1.1.1.1,arp_tpa=2.2.2.2,arp_op=2,arp_sha=50:54:00:00:00:05,arp_tha=40:44:44:44:44:41 |
349fbdc2 | 1477 | NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=60 in_port=1 (via action) data_len=60 (unbuffered) |
e6d9ab56 | 1478 | arp,vlan_tci=0x0000,dl_src=80:88:88:88:88:88,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=192.168.0.1,arp_tpa=192.168.0.2,arp_op=2,arp_sha=50:54:00:00:00:05,arp_tha=00:00:00:00:00:00 |
349fbdc2 | 1479 | NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=60 in_port=1 (via action) data_len=60 (unbuffered) |
e6d9ab56 | 1480 | arp,vlan_tci=0x0000,dl_src=80:88:88:88:88:88,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=192.168.128.1,arp_tpa=192.168.0.2,arp_op=2,arp_sha=50:54:00:00:00:05,arp_tha=00:00:00:00:00:00 |
349fbdc2 | 1481 | NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=60 in_port=1 (via action) data_len=60 (unbuffered) |
e6d9ab56 | 1482 | arp,vlan_tci=0x0000,dl_src=80:88:88:88:88:88,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=1.1.1.1,arp_tpa=2.2.2.2,arp_op=2,arp_sha=50:54:00:00:00:05,arp_tha=40:44:44:44:44:41 |
349fbdc2 SH |
1483 | ]) |
1484 | ||
1485 | AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore]) | |
1486 | ||
1487 | dnl Checksum SCTP. | |
1488 | AT_CHECK([ovs-ofctl monitor br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log]) | |
1489 | ||
1490 | for i in 1 ; do | |
1491 | ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 20 22 22 22 22 22 08 00 45 00 00 24 00 00 00 00 00 84 00 00 C0 A8 00 01 C0 A8 00 02 04 58 08 af 00 00 00 00 d9 d7 91 57 01 00 00 34 cf 28 ec 4e 00 01 40 00 00 0a ff ff b7 53 24 19 00 05 00 08 7f 00 00 01 00 05 00 08 c0 a8 02 07 00 0c 00 06 00 05 00 00 80 00 00 04 c0 00 00 04' | |
1492 | done | |
1493 | ||
f7a22c7e | 1494 | AT_CHECK([ovs-appctl time/warp 1000], [0], [ignore]) |
349fbdc2 SH |
1495 | OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 18]) |
1496 | OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit]) | |
1497 | AT_CHECK([cat ofctl_monitor.log], [0], [dnl | |
1498 | NXT_PACKET_IN (xid=0x0): cookie=0x1 total_len=98 in_port=1 (via action) data_len=98 (unbuffered) | |
e6d9ab56 | 1499 | sctp,vlan_tci=0x0000,dl_src=20:22:22:22:22:22,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=1112,tp_dst=2223 sctp_csum:d9d79157 |
349fbdc2 | 1500 | dnl |
50dcbd8e | 1501 | NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x3 total_len=102 reg0=0x1,in_port=1 (via action) data_len=102 (unbuffered) |
e6d9ab56 | 1502 | sctp,dl_vlan=80,dl_vlan_pcp=0,dl_src=20:22:22:22:22:22,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=1112,tp_dst=2223 sctp_csum:d9d79157 |
349fbdc2 | 1503 | dnl |
50dcbd8e | 1504 | NXT_PACKET_IN (xid=0x0): table_id=2 cookie=0x4 total_len=102 reg0=0x1,reg1=0x2,in_port=1 (via action) data_len=102 (unbuffered) |
e6d9ab56 | 1505 | sctp,dl_vlan=80,dl_vlan_pcp=0,dl_src=80:81:81:81:81:81,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=1112,tp_dst=2223 sctp_csum:d9d79157 |
349fbdc2 | 1506 | dnl |
50dcbd8e | 1507 | NXT_PACKET_IN (xid=0x0): table_id=3 cookie=0x5 total_len=102 reg0=0x1,reg1=0x2,reg2=0x3,in_port=1 (via action) data_len=102 (unbuffered) |
e6d9ab56 | 1508 | sctp,dl_vlan=80,dl_vlan_pcp=0,dl_src=80:81:81:81:81:81,dl_dst=82:82:82:82:82:82,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=1112,tp_dst=2223 sctp_csum:d9d79157 |
349fbdc2 | 1509 | dnl |
50dcbd8e | 1510 | NXT_PACKET_IN (xid=0x0): table_id=4 cookie=0x6 total_len=102 reg0=0x1,reg1=0x2,reg2=0x3,reg3=0x4,in_port=1 (via action) data_len=102 (unbuffered) |
e6d9ab56 | 1511 | sctp,dl_vlan=80,dl_vlan_pcp=0,dl_src=80:81:81:81:81:81,dl_dst=82:82:82:82:82:82,nw_src=83.83.83.83,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=1112,tp_dst=2223 sctp_csum:d9d79157 |
349fbdc2 | 1512 | dnl |
50dcbd8e | 1513 | NXT_PACKET_IN (xid=0x0): table_id=5 cookie=0x7 total_len=102 reg0=0x1,reg1=0x2,reg2=0x3,reg3=0x4,reg4=0x5,tun_id=0x6,in_port=1 (via action) data_len=102 (unbuffered) |
e6d9ab56 | 1514 | sctp,dl_vlan=80,dl_vlan_pcp=0,dl_src=80:81:81:81:81:81,dl_dst=82:82:82:82:82:82,nw_src=83.83.83.83,nw_dst=84.84.84.84,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=1112,tp_dst=2223 sctp_csum:d9d79157 |
349fbdc2 | 1515 | dnl |
50dcbd8e | 1516 | NXT_PACKET_IN (xid=0x0): table_id=6 cookie=0x8 total_len=102 reg0=0x1,reg1=0x2,reg2=0x3,reg3=0x4,reg4=0x5,tun_id=0x6,in_port=1 (via action) data_len=102 (unbuffered) |
e6d9ab56 | 1517 | sctp,dl_vlan=80,dl_vlan_pcp=0,dl_src=80:81:81:81:81:81,dl_dst=82:82:82:82:82:82,nw_src=83.83.83.83,nw_dst=84.84.84.84,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=85,tp_dst=2223 sctp_csum:dd778f5f |
349fbdc2 | 1518 | dnl |
50dcbd8e | 1519 | NXT_PACKET_IN (xid=0x0): table_id=7 cookie=0x9 total_len=102 reg0=0x1,reg1=0x2,reg2=0x3,reg3=0x4,reg4=0x5,tun_id=0x6,in_port=1 (via action) data_len=102 (unbuffered) |
e6d9ab56 | 1520 | sctp,dl_vlan=80,dl_vlan_pcp=0,dl_src=80:81:81:81:81:81,dl_dst=82:82:82:82:82:82,nw_src=83.83.83.83,nw_dst=84.84.84.84,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=85,tp_dst=86 sctp_csum:62051f56 |
349fbdc2 | 1521 | dnl |
50dcbd8e | 1522 | NXT_PACKET_IN (xid=0x0): table_id=7 cookie=0x9 total_len=102 reg0=0x1,reg1=0x2,reg2=0x3,reg3=0x4,reg4=0x5,tun_id=0x6,in_port=1 (via action) data_len=102 (unbuffered) |
e6d9ab56 | 1523 | sctp,dl_vlan=80,dl_vlan_pcp=0,dl_src=80:81:81:81:81:81,dl_dst=82:82:82:82:82:82,nw_src=83.83.83.83,nw_dst=84.84.84.84,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=85,tp_dst=86 sctp_csum:62051f56 |
349fbdc2 SH |
1524 | ]) |
1525 | ||
1526 | AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl | |
1527 | cookie=0x1, n_packets=3, n_bytes=218, dl_src=20:22:22:22:22:22 actions=CONTROLLER:65535,resubmit(80,1) | |
1528 | cookie=0x2, n_packets=3, n_bytes=180, dl_src=30:33:33:33:33:33 actions=mod_vlan_vid:15,CONTROLLER:65535 | |
1529 | cookie=0x3, table=1, n_packets=3, n_bytes=218, in_port=80 actions=load:0x1->NXM_NX_REG0[[]],mod_vlan_vid:80,CONTROLLER:65535,resubmit(81,2) | |
1530 | cookie=0x4, table=2, n_packets=3, n_bytes=218, in_port=81 actions=load:0x2->NXM_NX_REG1[[]],mod_dl_src:80:81:81:81:81:81,CONTROLLER:65535,resubmit(82,3) | |
1531 | cookie=0x5, table=3, n_packets=3, n_bytes=218, in_port=82 actions=load:0x3->NXM_NX_REG2[[]],mod_dl_dst:82:82:82:82:82:82,CONTROLLER:65535,resubmit(83,4) | |
1532 | cookie=0x6, table=4, n_packets=3, n_bytes=218, in_port=83 actions=load:0x4->NXM_NX_REG3[[]],mod_nw_src:83.83.83.83,CONTROLLER:65535,resubmit(84,5) | |
1533 | cookie=0x7, table=5, n_packets=3, n_bytes=218, in_port=84 actions=load:0x5->NXM_NX_REG4[[]],load:0x6->NXM_NX_TUN_ID[[]],mod_nw_dst:84.84.84.84,CONTROLLER:65535,resubmit(85,6) | |
1534 | cookie=0x8, table=6, n_packets=3, n_bytes=218, in_port=85 actions=mod_tp_src:85,CONTROLLER:65535,resubmit(86,7) | |
1535 | cookie=0x9, table=7, n_packets=3, n_bytes=218, in_port=86 actions=mod_tp_dst:86,CONTROLLER:65535,CONTROLLER:65535 | |
1536 | cookie=0xa, n_packets=3, n_bytes=180, dl_src=40:44:44:44:44:41 actions=mod_vlan_vid:99,mod_vlan_pcp:1,CONTROLLER:65535 | |
1537 | cookie=0xd, n_packets=3, n_bytes=180, arp,dl_src=80:88:88:88:88:88 actions=load:0x2->NXM_OF_ARP_OP[[]],CONTROLLER:65535,load:0xc0a88001->NXM_OF_ARP_SPA[[]],CONTROLLER:65535,load:0x404444444441->NXM_NX_ARP_THA[[]],load:0x1010101->NXM_OF_ARP_SPA[[]],load:0x2020202->NXM_OF_ARP_TPA[[]],CONTROLLER:65535 | |
1538 | n_packets=3, n_bytes=180, dl_src=10:11:11:11:11:11 actions=CONTROLLER:65535 | |
1539 | NXST_FLOW reply: | |
1540 | ]) | |
1541 | ||
1542 | OVS_VSWITCHD_STOP | |
1543 | AT_CLEANUP | |
1544 | ||
1545 | AT_SETUP([ofproto-dpif - MPLS handling]) | |
1546 | OVS_VSWITCHD_START([dnl | |
1547 | add-port br0 p1 -- set Interface p1 type=dummy | |
1548 | ]) | |
1549 | ON_EXIT([kill `cat ovs-ofctl.pid`]) | |
1550 | ||
1551 | AT_CAPTURE_FILE([ofctl_monitor.log]) | |
1552 | AT_DATA([flows.txt], [dnl | |
1553 | cookie=0xa dl_src=40:44:44:44:44:42 actions=push_mpls:0x8847,load:10->OXM_OF_MPLS_LABEL[[]],load:3->OXM_OF_MPLS_TC[[]],controller | |
1554 | cookie=0xa dl_src=41:44:44:44:44:42 actions=push_mpls:0x8847,load:10->OXM_OF_MPLS_LABEL[[]],load:3->OXM_OF_MPLS_TC[[]],pop_mpls:0x0800,controller | |
1555 | cookie=0xa dl_src=40:44:44:44:44:43 actions=push_mpls:0x8847,load:10->OXM_OF_MPLS_LABEL[[]],load:3->OXM_OF_MPLS_TC[[]],controller | |
1556 | cookie=0xa dl_src=40:44:44:44:44:44 actions=push_mpls:0x8847,load:10->OXM_OF_MPLS_LABEL[[]],load:3->OXM_OF_MPLS_TC[[]],controller | |
1557 | cookie=0xa dl_src=40:44:44:44:44:45 actions=push_mpls:0x8847,load:10->OXM_OF_MPLS_LABEL[[]],load:3->OXM_OF_MPLS_TC[[]],dec_mpls_ttl,controller | |
1558 | cookie=0xa dl_src=40:44:44:44:44:46 actions=push_mpls:0x8847,load:10->OXM_OF_MPLS_LABEL[[]],load:3->OXM_OF_MPLS_TC[[]],set_mpls_ttl(10),controller | |
1559 | cookie=0xa dl_src=40:44:44:44:44:47 actions=push_mpls:0x8847,load:10->OXM_OF_MPLS_LABEL[[]],load:3->OXM_OF_MPLS_TC[[]],dec_mpls_ttl,set_mpls_ttl(10),controller | |
1560 | cookie=0xa dl_src=40:44:44:44:44:48 actions=push_mpls:0x8847,load:10->OXM_OF_MPLS_LABEL[[]],load:3->OXM_OF_MPLS_TC[[]],set_mpls_ttl(10),dec_mpls_ttl,controller | |
1ffd16af | 1561 | cookie=0xa mpls,dl_src=40:44:44:44:44:49 actions=push_mpls:0x8848,load:10->OXM_OF_MPLS_LABEL[[]],CONTROLLER:65535 |
349fbdc2 SH |
1562 | cookie=0xb dl_src=50:55:55:55:55:55 dl_type=0x8847 actions=load:1000->OXM_OF_MPLS_LABEL[[]],controller |
1563 | cookie=0xd dl_src=60:66:66:66:66:66 actions=pop_mpls:0x0800,controller | |
1564 | cookie=0xc dl_src=70:77:77:77:77:77 actions=push_mpls:0x8848,load:1000->OXM_OF_MPLS_LABEL[[]],load:7->OXM_OF_MPLS_TC[[]],controller | |
1ffd16af SH |
1565 | |
1566 | cookie=0xd dl_src=60:66:66:66:00:01 actions=pop_mpls:0x0800,dec_ttl,controller | |
1567 | cookie=0xd dl_src=60:66:66:66:00:02 actions=pop_mpls:0x0800,load:0xa000001->OXM_OF_IPV4_DST[[]],controller | |
1568 | cookie=0xd dl_src=60:66:66:66:00:03 actions=pop_mpls:0x0800,move:OXM_OF_IPV4_DST[[]]->OXM_OF_IPV4_SRC[[]],controller | |
1569 | cookie=0xd dl_src=60:66:66:66:00:04 actions=pop_mpls:0x0800,push:OXM_OF_IPV4_DST[[]],pop:OXM_OF_IPV4_SRC[[]],controller | |
1570 | cookie=0xd dl_src=60:66:66:66:00:05 actions=pop_mpls:0x0800,multipath(eth_src,50,modulo_n,256,0,OXM_OF_IPV4_SRC[[0..7]]),controller | |
1571 | cookie=0xd dl_src=60:66:66:66:00:06 actions=pop_mpls:0x0800,bundle_load(eth_src,50,hrw,ofport,OXM_OF_IPV4_SRC[[0..15]],slaves:1,2),controller | |
1572 | cookie=0xd dl_src=60:66:66:66:00:07 actions=pop_mpls:0x0800,learn(table=1,hard_timeout=60,eth_type=0x800,nw_proto=6,OXM_OF_IPV4_SRC[[]]=OXM_OF_IPV4_DST[[]]),controller | |
1573 | ||
1574 | cookie=0xd dl_src=60:66:66:66:00:08 actions=pop_mpls:0x0806,resubmit(1,1) | |
1575 | cookie=0xd table=1 arp actions=controller | |
1576 | ||
e672ff9b JR |
1577 | cookie=0xdeadbeef table=2 dl_src=60:66:66:66:00:09 actions=pop_mpls:0x0800,mod_nw_tos:48 |
1578 | cookie=0xd dl_src=60:66:66:66:00:09 actions=resubmit(,2),controller | |
1ffd16af SH |
1579 | cookie=0xd dl_src=60:66:66:66:00:0a actions=pop_mpls:0x0800,mod_nw_dst:10.0.0.1,controller |
1580 | cookie=0xd dl_src=60:66:66:66:00:0b actions=pop_mpls:0x0800,mod_nw_src:10.0.0.1,controller | |
1581 | ||
1582 | cookie=0xd dl_src=60:66:66:66:01:00 actions=pop_mpls:0x8848,controller | |
1583 | cookie=0xd dl_src=60:66:66:66:01:01 actions=pop_mpls:0x8847,dec_mpls_ttl,controller | |
1584 | cookie=0xd dl_src=60:66:66:66:01:02 actions=pop_mpls:0x8848,load:3->OXM_OF_MPLS_TC[[]],controller | |
1585 | ||
1586 | cookie=0xd dl_src=60:66:66:66:02:00 actions=pop_mpls:0x8847,pop_mpls:0x0800,controller | |
e672ff9b JR |
1587 | cookie=0xe dl_src=60:66:66:66:02:01 actions=pop_mpls:0x8848,pop_mpls:0x0800,dec_ttl,controller |
1588 | cookie=0xe dl_src=60:66:66:66:02:10 actions=pop_mpls:0x8847,dec_mpls_ttl,pop_mpls:0x0800,dec_ttl,controller | |
1ffd16af | 1589 | |
e672ff9b JR |
1590 | cookie=0xe dl_src=60:66:66:66:03:00 actions=pop_mpls:0x8848,pop_mpls:0x8848,controller |
1591 | cookie=0xe dl_src=60:66:66:66:03:01 actions=pop_mpls:0x8847,pop_mpls:0x8847,dec_mpls_ttl,controller | |
1592 | cookie=0xe dl_src=60:66:66:66:03:10 actions=pop_mpls:0x8848,dec_mpls_ttl,pop_mpls:0x8848,dec_mpls_ttl,controller | |
1ffd16af | 1593 | |
e672ff9b JR |
1594 | cookie=0xf dl_src=60:66:66:66:04:00 actions=pop_mpls:0x0800,push_mpls:0x8847,controller |
1595 | cookie=0xf dl_src=60:66:66:66:04:01 actions=pop_mpls:0x0800,push_mpls:0x8848,dec_mpls_ttl,controller | |
1596 | cookie=0xf dl_src=60:66:66:66:04:10 actions=pop_mpls:0x0800,dec_ttl,push_mpls:0x8848,dec_mpls_ttl,controller | |
1ffd16af | 1597 | |
e672ff9b JR |
1598 | cookie=0x5 dl_src=60:66:66:66:05:00 actions=push_mpls:0x8848,pop_mpls:0x8847,controller |
1599 | cookie=0x5 dl_src=60:66:66:66:05:01 actions=push_mpls:0x8847,pop_mpls:0x8848,dec_mpls_ttl,controller | |
1600 | cookie=0x5 dl_src=60:66:66:66:05:10 actions=push_mpls:0x8848,dec_mpls_ttl,pop_mpls:0x8847,dec_mpls_ttl,controller | |
349fbdc2 SH |
1601 | ]) |
1602 | AT_CHECK([ovs-ofctl add-flows br0 flows.txt]) | |
1603 | ||
b02475c5 SH |
1604 | dnl Modified MPLS controller action. |
1605 | AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log]) | |
1606 | ||
1607 | for i in 1 2 3; do | |
791a09be | 1608 | ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=40:44:44:44:44:42,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=17,tos=0,ttl=64,frag=no),udp(src=7777,dst=80)' |
b02475c5 | 1609 | done |
57c94f35 | 1610 | OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6]) |
0c473314 | 1611 | OVS_APP_EXIT_AND_WAIT(ovs-ofctl) |
b02475c5 | 1612 | |
b02475c5 SH |
1613 | AT_CHECK([cat ofctl_monitor.log], [0], [dnl |
1614 | NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered) | |
e6d9ab56 | 1615 | mpls,vlan_tci=0x0000,dl_src=40:44:44:44:44:42,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=64,mpls_bos=1 |
b02475c5 SH |
1616 | dnl |
1617 | NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered) | |
e6d9ab56 | 1618 | mpls,vlan_tci=0x0000,dl_src=40:44:44:44:44:42,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=64,mpls_bos=1 |
b02475c5 SH |
1619 | dnl |
1620 | NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered) | |
e6d9ab56 | 1621 | mpls,vlan_tci=0x0000,dl_src=40:44:44:44:44:42,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=64,mpls_bos=1 |
b02475c5 SH |
1622 | ]) |
1623 | ||
1624 | dnl Modified MPLS controller action. | |
1625 | AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log]) | |
1626 | ||
b0a17866 | 1627 | for i in 1 2 3; do |
8249a1fe | 1628 | ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=41:44:44:44:44:42,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=16,tos=0,ttl=64,frag=no)' |
b0a17866 SH |
1629 | done |
1630 | OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6]) | |
0c473314 | 1631 | OVS_APP_EXIT_AND_WAIT(ovs-ofctl) |
b0a17866 SH |
1632 | |
1633 | AT_CHECK([cat ofctl_monitor.log], [0], [dnl | |
1634 | NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=60 in_port=1 (via action) data_len=60 (unbuffered) | |
e6d9ab56 | 1635 | ip,vlan_tci=0x0000,dl_src=41:44:44:44:44:42,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_proto=16,nw_tos=0,nw_ecn=0,nw_ttl=64 |
b0a17866 SH |
1636 | dnl |
1637 | NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=60 in_port=1 (via action) data_len=60 (unbuffered) | |
e6d9ab56 | 1638 | ip,vlan_tci=0x0000,dl_src=41:44:44:44:44:42,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_proto=16,nw_tos=0,nw_ecn=0,nw_ttl=64 |
b0a17866 SH |
1639 | dnl |
1640 | NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=60 in_port=1 (via action) data_len=60 (unbuffered) | |
e6d9ab56 | 1641 | ip,vlan_tci=0x0000,dl_src=41:44:44:44:44:42,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_proto=16,nw_tos=0,nw_ecn=0,nw_ttl=64 |
b0a17866 SH |
1642 | ]) |
1643 | ||
1644 | dnl Modified MPLS controller action. | |
1645 | AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log]) | |
1646 | ||
b02475c5 SH |
1647 | dnl in_port(1),eth(src=00:01:02:03:04:05,dst=10:11:12:13:14:15),eth_type(0x8847),mpls(label=100,tc=3,ttl=64,bos=1) |
1648 | ||
1649 | for i in 1 2 3; do | |
1650 | ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=40:44:44:44:44:43,dst=50:54:00:00:00:07),eth_type(0x8847),mpls(label=11,tc=3,ttl=64,bos=1)' | |
1651 | done | |
bece9ea7 | 1652 | OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6]) |
0c473314 | 1653 | OVS_APP_EXIT_AND_WAIT(ovs-ofctl) |
bece9ea7 | 1654 | |
b02475c5 SH |
1655 | AT_CHECK([cat ofctl_monitor.log], [0], [dnl |
1656 | NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered) | |
e6d9ab56 | 1657 | mpls,vlan_tci=0x0000,dl_src=40:44:44:44:44:43,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=64,mpls_bos=0,mpls_lse1=46912 |
b02475c5 SH |
1658 | dnl |
1659 | NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered) | |
e6d9ab56 | 1660 | mpls,vlan_tci=0x0000,dl_src=40:44:44:44:44:43,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=64,mpls_bos=0,mpls_lse1=46912 |
b02475c5 SH |
1661 | dnl |
1662 | NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered) | |
e6d9ab56 | 1663 | mpls,vlan_tci=0x0000,dl_src=40:44:44:44:44:43,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=64,mpls_bos=0,mpls_lse1=46912 |
b02475c5 SH |
1664 | ]) |
1665 | ||
1666 | dnl Modified MPLS controller action. | |
1667 | AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log]) | |
1668 | ||
1669 | for i in 1 2 3; do | |
8249a1fe | 1670 | ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=40:44:44:44:44:44,dst=50:54:00:00:00:07),eth_type(0x8100),vlan(vid=99,pcp=7),encap(eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=16,tos=0,ttl=64,frag=no))' |
b02475c5 | 1671 | done |
57c94f35 | 1672 | OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6]) |
0c473314 | 1673 | OVS_APP_EXIT_AND_WAIT(ovs-ofctl) |
b02475c5 | 1674 | |
b02475c5 SH |
1675 | AT_CHECK([cat ofctl_monitor.log], [0], [dnl |
1676 | NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered) | |
e6d9ab56 | 1677 | mpls,dl_vlan=99,dl_vlan_pcp=7,dl_src=40:44:44:44:44:44,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=64,mpls_bos=1 |
b02475c5 SH |
1678 | dnl |
1679 | NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered) | |
e6d9ab56 | 1680 | mpls,dl_vlan=99,dl_vlan_pcp=7,dl_src=40:44:44:44:44:44,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=64,mpls_bos=1 |
b02475c5 SH |
1681 | dnl |
1682 | NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered) | |
e6d9ab56 | 1683 | mpls,dl_vlan=99,dl_vlan_pcp=7,dl_src=40:44:44:44:44:44,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=64,mpls_bos=1 |
b02475c5 SH |
1684 | ]) |
1685 | ||
b676167a SH |
1686 | dnl Modified MPLS controller action. |
1687 | AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log]) | |
1688 | ||
1689 | for i in 1 2 3; do | |
8249a1fe | 1690 | ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=40:44:44:44:44:45,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=16,tos=0,ttl=64,frag=no)' |
b676167a | 1691 | done |
57c94f35 | 1692 | OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6]) |
0c473314 | 1693 | OVS_APP_EXIT_AND_WAIT(ovs-ofctl) |
b676167a | 1694 | |
b676167a SH |
1695 | AT_CHECK([cat ofctl_monitor.log], [0], [dnl |
1696 | NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered) | |
e6d9ab56 | 1697 | mpls,vlan_tci=0x0000,dl_src=40:44:44:44:44:45,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=63,mpls_bos=1 |
b676167a SH |
1698 | dnl |
1699 | NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered) | |
e6d9ab56 | 1700 | mpls,vlan_tci=0x0000,dl_src=40:44:44:44:44:45,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=63,mpls_bos=1 |
b676167a SH |
1701 | dnl |
1702 | NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered) | |
e6d9ab56 | 1703 | mpls,vlan_tci=0x0000,dl_src=40:44:44:44:44:45,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=63,mpls_bos=1 |
b676167a SH |
1704 | ]) |
1705 | ||
0f3f3c3d SH |
1706 | dnl Modified MPLS controller action. |
1707 | AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log]) | |
1708 | ||
1709 | for i in 1 2 3; do | |
8249a1fe | 1710 | ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=40:44:44:44:44:46,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=16,tos=0,ttl=64,frag=no)' |
0f3f3c3d | 1711 | done |
57c94f35 | 1712 | OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6]) |
0c473314 | 1713 | OVS_APP_EXIT_AND_WAIT(ovs-ofctl) |
0f3f3c3d | 1714 | |
0f3f3c3d SH |
1715 | AT_CHECK([cat ofctl_monitor.log], [0], [dnl |
1716 | NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered) | |
e6d9ab56 | 1717 | mpls,vlan_tci=0x0000,dl_src=40:44:44:44:44:46,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=10,mpls_bos=1 |
0f3f3c3d SH |
1718 | dnl |
1719 | NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered) | |
e6d9ab56 | 1720 | mpls,vlan_tci=0x0000,dl_src=40:44:44:44:44:46,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=10,mpls_bos=1 |
0f3f3c3d SH |
1721 | dnl |
1722 | NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered) | |
e6d9ab56 | 1723 | mpls,vlan_tci=0x0000,dl_src=40:44:44:44:44:46,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=10,mpls_bos=1 |
0f3f3c3d SH |
1724 | ]) |
1725 | ||
1726 | dnl Modified MPLS controller action. | |
1727 | AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log]) | |
1728 | ||
1729 | for i in 1 2 3; do | |
8249a1fe | 1730 | ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=40:44:44:44:44:47,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=16,tos=0,ttl=64,frag=no)' |
0f3f3c3d | 1731 | done |
57c94f35 | 1732 | OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6]) |
0c473314 | 1733 | OVS_APP_EXIT_AND_WAIT(ovs-ofctl) |
0f3f3c3d | 1734 | |
0f3f3c3d SH |
1735 | AT_CHECK([cat ofctl_monitor.log], [0], [dnl |
1736 | NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered) | |
e6d9ab56 | 1737 | mpls,vlan_tci=0x0000,dl_src=40:44:44:44:44:47,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=10,mpls_bos=1 |
0f3f3c3d SH |
1738 | dnl |
1739 | NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered) | |
e6d9ab56 | 1740 | mpls,vlan_tci=0x0000,dl_src=40:44:44:44:44:47,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=10,mpls_bos=1 |
0f3f3c3d SH |
1741 | dnl |
1742 | NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered) | |
e6d9ab56 | 1743 | mpls,vlan_tci=0x0000,dl_src=40:44:44:44:44:47,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=10,mpls_bos=1 |
0f3f3c3d SH |
1744 | ]) |
1745 | ||
1ffd16af SH |
1746 | AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore]) |
1747 | ||
1748 | dnl Modified MPLS controller action. | |
1749 | AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log]) | |
1750 | ||
1751 | for i in 1 2 3; do | |
1752 | ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=40:44:44:44:44:49,dst=50:54:00:00:00:07),eth_type(0x8847),mpls(label=10,tc=3,ttl=64,bos=1)' | |
1753 | done | |
1754 | OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6]) | |
1755 | ovs-appctl -t ovs-ofctl exit | |
1756 | ||
1757 | AT_CHECK([cat ofctl_monitor.log], [0], [dnl | |
1758 | NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered) | |
e6d9ab56 | 1759 | mplsm,vlan_tci=0x0000,dl_src=40:44:44:44:44:49,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=64,mpls_bos=0,mpls_lse1=42816 |
1ffd16af SH |
1760 | dnl |
1761 | NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered) | |
e6d9ab56 | 1762 | mplsm,vlan_tci=0x0000,dl_src=40:44:44:44:44:49,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=64,mpls_bos=0,mpls_lse1=42816 |
1ffd16af SH |
1763 | dnl |
1764 | NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered) | |
e6d9ab56 | 1765 | mplsm,vlan_tci=0x0000,dl_src=40:44:44:44:44:49,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=64,mpls_bos=0,mpls_lse1=42816 |
1ffd16af SH |
1766 | ]) |
1767 | ||
1768 | AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore]) | |
1769 | ||
0f3f3c3d SH |
1770 | dnl Modified MPLS controller action. |
1771 | AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log]) | |
1772 | ||
1773 | for i in 1 2 3; do | |
8249a1fe | 1774 | ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=40:44:44:44:44:48,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=16,tos=0,ttl=64,frag=no)' |
0f3f3c3d | 1775 | done |
57c94f35 | 1776 | OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6]) |
0c473314 | 1777 | OVS_APP_EXIT_AND_WAIT(ovs-ofctl) |
0f3f3c3d | 1778 | |
0f3f3c3d SH |
1779 | AT_CHECK([cat ofctl_monitor.log], [0], [dnl |
1780 | NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered) | |
e6d9ab56 | 1781 | mpls,vlan_tci=0x0000,dl_src=40:44:44:44:44:48,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=9,mpls_bos=1 |
0f3f3c3d SH |
1782 | dnl |
1783 | NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered) | |
e6d9ab56 | 1784 | mpls,vlan_tci=0x0000,dl_src=40:44:44:44:44:48,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=9,mpls_bos=1 |
0f3f3c3d SH |
1785 | dnl |
1786 | NXT_PACKET_IN (xid=0x0): cookie=0xa total_len=64 in_port=1 (via action) data_len=64 (unbuffered) | |
e6d9ab56 | 1787 | mpls,vlan_tci=0x0000,dl_src=40:44:44:44:44:48,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=3,mpls_ttl=9,mpls_bos=1 |
0f3f3c3d SH |
1788 | ]) |
1789 | ||
b02475c5 SH |
1790 | dnl Modified MPLS actions. |
1791 | AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log]) | |
1792 | ||
1793 | for i in 1 2 3; do | |
02830175 | 1794 | ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:55:55:55:55:55,dst=50:54:00:00:00:07),eth_type(0x8847),mpls(label=100,tc=7,ttl=64,bos=1)' |
b02475c5 | 1795 | done |
57c94f35 | 1796 | OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6]) |
0c473314 | 1797 | OVS_APP_EXIT_AND_WAIT(ovs-ofctl) |
b02475c5 | 1798 | |
b02475c5 SH |
1799 | AT_CHECK([cat ofctl_monitor.log], [0], [dnl |
1800 | NXT_PACKET_IN (xid=0x0): cookie=0xb total_len=60 in_port=1 (via action) data_len=60 (unbuffered) | |
e6d9ab56 | 1801 | mpls,vlan_tci=0x0000,dl_src=50:55:55:55:55:55,dl_dst=50:54:00:00:00:07,mpls_label=1000,mpls_tc=7,mpls_ttl=64,mpls_bos=1 |
b02475c5 SH |
1802 | dnl |
1803 | NXT_PACKET_IN (xid=0x0): cookie=0xb total_len=60 in_port=1 (via action) data_len=60 (unbuffered) | |
e6d9ab56 | 1804 | mpls,vlan_tci=0x0000,dl_src=50:55:55:55:55:55,dl_dst=50:54:00:00:00:07,mpls_label=1000,mpls_tc=7,mpls_ttl=64,mpls_bos=1 |
b02475c5 SH |
1805 | dnl |
1806 | NXT_PACKET_IN (xid=0x0): cookie=0xb total_len=60 in_port=1 (via action) data_len=60 (unbuffered) | |
e6d9ab56 | 1807 | mpls,vlan_tci=0x0000,dl_src=50:55:55:55:55:55,dl_dst=50:54:00:00:00:07,mpls_label=1000,mpls_tc=7,mpls_ttl=64,mpls_bos=1 |
b02475c5 SH |
1808 | ]) |
1809 | ||
1810 | dnl Modified MPLS ipv6 controller action. | |
1811 | AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log]) | |
1812 | ||
1813 | for i in 1 2 3; do | |
1814 | ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=70:77:77:77:77:77,dst=50:54:00:00:00:07),eth_type(0x86dd),ipv6(src=::1,dst=::2,label=0,proto=10,tclass=0x70,hlimit=128,frag=no)' | |
1815 | done | |
57c94f35 | 1816 | OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6]) |
0c473314 | 1817 | OVS_APP_EXIT_AND_WAIT(ovs-ofctl) |
b02475c5 | 1818 | |
b02475c5 SH |
1819 | AT_CHECK([cat ofctl_monitor.log], [0], [dnl |
1820 | NXT_PACKET_IN (xid=0x0): cookie=0xc total_len=64 in_port=1 (via action) data_len=64 (unbuffered) | |
e6d9ab56 | 1821 | mplsm,vlan_tci=0x0000,dl_src=70:77:77:77:77:77,dl_dst=50:54:00:00:00:07,mpls_label=1000,mpls_tc=7,mpls_ttl=128,mpls_bos=1 |
b02475c5 SH |
1822 | dnl |
1823 | NXT_PACKET_IN (xid=0x0): cookie=0xc total_len=64 in_port=1 (via action) data_len=64 (unbuffered) | |
e6d9ab56 | 1824 | mplsm,vlan_tci=0x0000,dl_src=70:77:77:77:77:77,dl_dst=50:54:00:00:00:07,mpls_label=1000,mpls_tc=7,mpls_ttl=128,mpls_bos=1 |
b02475c5 SH |
1825 | dnl |
1826 | NXT_PACKET_IN (xid=0x0): cookie=0xc total_len=64 in_port=1 (via action) data_len=64 (unbuffered) | |
e6d9ab56 | 1827 | mplsm,vlan_tci=0x0000,dl_src=70:77:77:77:77:77,dl_dst=50:54:00:00:00:07,mpls_label=1000,mpls_tc=7,mpls_ttl=128,mpls_bos=1 |
b02475c5 SH |
1828 | ]) |
1829 | ||
1830 | ||
1831 | dnl Modified MPLS pop action. | |
cff78c88 SH |
1832 | dnl The input is a frame with two MPLS headers which tcpdump -vve shows as: |
1833 | dnl 60:66:66:66:66:66 > 50:54:00:00:00:07, ethertype MPLS multicast (0x8847), length 66: MPLS (label 20, exp 0, ttl 32) | |
1834 | dnl (tos 0x0, ttl 64, id 0, offset 0, flags [none], proto TCP (6), length 44) | |
1835 | ||
b02475c5 SH |
1836 | AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log]) |
1837 | ||
1838 | for i in 1 2 3; do | |
cff78c88 | 1839 | ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 60 66 66 66 66 66 88 47 00 01 41 20 45 00 00 2c 00 00 00 00 40 06 3b 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45' |
b02475c5 | 1840 | done |
cff78c88 SH |
1841 | #for i in 2 3; do |
1842 | # ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=60:66:66:66:66:66,dst=50:54:00:00:00:07),eth_type(0x8847),mpls(label=10,tc=3,ttl=100,bos=1)' | |
1843 | #done | |
57c94f35 | 1844 | OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6]) |
0c473314 | 1845 | OVS_APP_EXIT_AND_WAIT(ovs-ofctl) |
b02475c5 | 1846 | |
b02475c5 | 1847 | AT_CHECK([cat ofctl_monitor.log], [0], [dnl |
cff78c88 | 1848 | NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered) |
e6d9ab56 | 1849 | tcp,vlan_tci=0x0000,dl_src=60:66:66:66:66:66,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744 |
b02475c5 | 1850 | dnl |
cff78c88 | 1851 | NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered) |
e6d9ab56 | 1852 | tcp,vlan_tci=0x0000,dl_src=60:66:66:66:66:66,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744 |
b02475c5 | 1853 | dnl |
cff78c88 | 1854 | NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered) |
e6d9ab56 | 1855 | tcp,vlan_tci=0x0000,dl_src=60:66:66:66:66:66,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744 |
b02475c5 SH |
1856 | ]) |
1857 | ||
5c0243a9 | 1858 | AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore]) |
0d56eaf2 | 1859 | |
1ffd16af SH |
1860 | dnl Modified MPLS pop action. |
1861 | dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as: | |
1862 | dnl 60:66:66:66:00:01 > 50:54:00:00:00:07, ethertype MPLS multicast (0x8848), length 62: MPLS (label 20, exp 0, [S], ttl 32) | |
1863 | dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44) | |
1864 | dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4 | |
1865 | AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log]) | |
1866 | ||
1867 | for i in 1 2 3; do | |
1868 | ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 60 66 66 66 00 01 88 48 00 01 41 20 45 00 00 2c 00 00 00 00 ff 06 3a 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45' | |
1869 | done | |
1870 | OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6]) | |
1871 | OVS_APP_EXIT_AND_WAIT(ovs-ofctl) | |
1872 | ||
1873 | AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl | |
e672ff9b | 1874 | NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered) |
e6d9ab56 | 1875 | tcp,vlan_tci=0x0000,dl_src=60:66:66:66:00:01,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=254,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744 |
1ffd16af | 1876 | dnl |
e672ff9b | 1877 | NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered) |
e6d9ab56 | 1878 | tcp,vlan_tci=0x0000,dl_src=60:66:66:66:00:01,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=254,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744 |
1ffd16af | 1879 | dnl |
e672ff9b | 1880 | NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered) |
e6d9ab56 | 1881 | tcp,vlan_tci=0x0000,dl_src=60:66:66:66:00:01,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=254,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744 |
1ffd16af SH |
1882 | ]) |
1883 | ||
1884 | AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore]) | |
1885 | ||
1886 | dnl Modified MPLS pop action. | |
1887 | dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as: | |
1888 | dnl 60:66:66:66:00:02 > 50:54:00:00:00:07, ethertype MPLS unicast (0x8847), length 62: MPLS (label 20, exp 0, [S], ttl 32) | |
1889 | dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44) | |
1890 | dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4 | |
1891 | AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log]) | |
1892 | ||
1893 | for i in 1 2 3; do | |
1894 | ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 60 66 66 66 00 02 88 47 00 01 41 20 45 00 00 2c 00 00 00 00 ff 06 3a 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45' | |
1895 | done | |
1896 | OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6]) | |
1897 | OVS_APP_EXIT_AND_WAIT(ovs-ofctl) | |
1898 | ||
1899 | AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl | |
e672ff9b | 1900 | NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered) |
e6d9ab56 | 1901 | tcp,vlan_tci=0x0000,dl_src=60:66:66:66:00:02,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=10.0.0.1,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:2dee |
1ffd16af | 1902 | dnl |
e672ff9b | 1903 | NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered) |
e6d9ab56 | 1904 | tcp,vlan_tci=0x0000,dl_src=60:66:66:66:00:02,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=10.0.0.1,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:2dee |
1ffd16af | 1905 | dnl |
e672ff9b | 1906 | NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered) |
e6d9ab56 | 1907 | tcp,vlan_tci=0x0000,dl_src=60:66:66:66:00:02,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=10.0.0.1,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:2dee |
1ffd16af SH |
1908 | ]) |
1909 | ||
1910 | AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore]) | |
1911 | ||
1912 | dnl Modified MPLS pop action. | |
1913 | dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as: | |
1914 | dnl 60:66:66:66:00:03 > 50:54:00:00:00:07, ethertype MPLS multicast (0x8848), length 62: MPLS (label 20, exp 0, [S], ttl 32) | |
1915 | dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44) | |
1916 | dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4 | |
1917 | AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log]) | |
1918 | ||
1919 | for i in 1 2 3; do | |
1920 | ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 60 66 66 66 00 03 88 48 00 01 41 20 45 00 00 2c 00 00 00 00 ff 06 3a 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45' | |
1921 | done | |
1922 | OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6]) | |
1923 | OVS_APP_EXIT_AND_WAIT(ovs-ofctl) | |
1924 | ||
1925 | AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl | |
e672ff9b | 1926 | NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered) |
e6d9ab56 | 1927 | tcp,vlan_tci=0x0000,dl_src=60:66:66:66:00:03,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.2,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7743 |
1ffd16af | 1928 | dnl |
e672ff9b | 1929 | NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered) |
e6d9ab56 | 1930 | tcp,vlan_tci=0x0000,dl_src=60:66:66:66:00:03,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.2,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7743 |
1ffd16af | 1931 | dnl |
e672ff9b | 1932 | NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered) |
e6d9ab56 | 1933 | tcp,vlan_tci=0x0000,dl_src=60:66:66:66:00:03,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.2,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7743 |
1ffd16af SH |
1934 | ]) |
1935 | ||
1936 | AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore]) | |
1937 | ||
1938 | dnl Modified MPLS pop action. | |
1939 | dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as: | |
1940 | dnl 60:66:66:66:00:04 > 50:54:00:00:00:07, ethertype MPLS unicast (0x8847), length 62: MPLS (label 20, exp 0, [S], ttl 32) | |
1941 | dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44) | |
1942 | dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4 | |
1943 | AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log]) | |
1944 | ||
1945 | for i in 1 2 3; do | |
1946 | ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 60 66 66 66 00 04 88 47 00 01 41 20 45 00 00 2c 00 00 00 00 ff 06 3a 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45' | |
1947 | done | |
1948 | OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6]) | |
1949 | OVS_APP_EXIT_AND_WAIT(ovs-ofctl) | |
1950 | ||
1951 | AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl | |
e672ff9b | 1952 | NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered) |
e6d9ab56 | 1953 | tcp,vlan_tci=0x0000,dl_src=60:66:66:66:00:04,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.2,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7743 |
1ffd16af | 1954 | dnl |
e672ff9b | 1955 | NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered) |
e6d9ab56 | 1956 | tcp,vlan_tci=0x0000,dl_src=60:66:66:66:00:04,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.2,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7743 |
1ffd16af | 1957 | dnl |
e672ff9b | 1958 | NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered) |
e6d9ab56 | 1959 | tcp,vlan_tci=0x0000,dl_src=60:66:66:66:00:04,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.2,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7743 |
1ffd16af SH |
1960 | ]) |
1961 | ||
1962 | AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore]) | |
1963 | ||
1964 | dnl Modified MPLS pop action. | |
1965 | dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as: | |
1966 | dnl 60:66:66:66:00:05 > 50:54:00:00:00:07, ethertype MPLS unicast (0x8847), length 62: MPLS (label 20, exp 0, [S], ttl 32) | |
1967 | dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44) | |
1968 | dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4 | |
1969 | AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log]) | |
1970 | ||
1971 | for i in 1 2 3; do | |
1972 | ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 60 66 66 66 00 05 88 48 00 01 41 20 45 00 00 2c 00 00 00 00 ff 06 3a 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45' | |
1973 | done | |
1974 | OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6]) | |
1975 | OVS_APP_EXIT_AND_WAIT(ovs-ofctl) | |
1976 | ||
1977 | AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl | |
e672ff9b | 1978 | NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered) |
e6d9ab56 | 1979 | tcp,vlan_tci=0x0000,dl_src=60:66:66:66:00:05,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.106,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:76db |
1ffd16af | 1980 | dnl |
e672ff9b | 1981 | NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered) |
e6d9ab56 | 1982 | tcp,vlan_tci=0x0000,dl_src=60:66:66:66:00:05,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.106,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:76db |
1ffd16af | 1983 | dnl |
e672ff9b | 1984 | NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered) |
e6d9ab56 | 1985 | tcp,vlan_tci=0x0000,dl_src=60:66:66:66:00:05,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.106,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:76db |
1ffd16af SH |
1986 | ]) |
1987 | ||
1988 | AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore]) | |
1989 | ||
1990 | dnl Modified MPLS pop action. | |
1991 | dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as: | |
1992 | dnl 60:66:66:66:00:06 > 50:54:00:00:00:07, ethertype MPLS multicast (0x8848), length 62: MPLS (label 20, exp 0, [S], ttl 32) | |
1993 | dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44) | |
1994 | dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4 | |
1995 | AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log]) | |
1996 | ||
1997 | for i in 1 2 3; do | |
1998 | ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 60 66 66 66 00 06 88 47 00 01 41 20 45 00 00 2c 00 00 00 00 ff 06 3a 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45' | |
1999 | done | |
2000 | OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6]) | |
2001 | OVS_APP_EXIT_AND_WAIT(ovs-ofctl) | |
2002 | ||
2003 | AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl | |
e672ff9b | 2004 | NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered) |
e6d9ab56 | 2005 | tcp,vlan_tci=0x0000,dl_src=60:66:66:66:00:06,dl_dst=50:54:00:00:00:07,nw_src=192.168.255.255,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7745 |
1ffd16af | 2006 | dnl |
e672ff9b | 2007 | NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered) |
e6d9ab56 | 2008 | tcp,vlan_tci=0x0000,dl_src=60:66:66:66:00:06,dl_dst=50:54:00:00:00:07,nw_src=192.168.255.255,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7745 |
1ffd16af | 2009 | dnl |
e672ff9b | 2010 | NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered) |
e6d9ab56 | 2011 | tcp,vlan_tci=0x0000,dl_src=60:66:66:66:00:06,dl_dst=50:54:00:00:00:07,nw_src=192.168.255.255,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7745 |
1ffd16af SH |
2012 | ]) |
2013 | ||
2014 | AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore]) | |
2015 | ||
2016 | dnl Modified MPLS pop action. | |
2017 | dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as: | |
2018 | dnl 60:66:66:66:00:07 > 50:54:00:00:00:07, ethertype MPLS multicast (0x8848), length 62: MPLS (label 20, exp 0, [S], ttl 32) | |
2019 | dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44) | |
2020 | dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4 | |
2021 | AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log]) | |
2022 | ||
2023 | for i in 1 2 3; do | |
2024 | ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 60 66 66 66 00 07 88 48 00 01 41 20 45 00 00 2c 00 00 00 00 ff 06 3a 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45' | |
2025 | done | |
2026 | OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6]) | |
2027 | OVS_APP_EXIT_AND_WAIT(ovs-ofctl) | |
2028 | ||
2029 | AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl | |
e672ff9b | 2030 | NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered) |
e6d9ab56 | 2031 | tcp,vlan_tci=0x0000,dl_src=60:66:66:66:00:07,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744 |
1ffd16af | 2032 | dnl |
e672ff9b | 2033 | NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered) |
e6d9ab56 | 2034 | tcp,vlan_tci=0x0000,dl_src=60:66:66:66:00:07,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744 |
1ffd16af | 2035 | dnl |
e672ff9b | 2036 | NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered) |
e6d9ab56 | 2037 | tcp,vlan_tci=0x0000,dl_src=60:66:66:66:00:07,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744 |
1ffd16af SH |
2038 | ]) |
2039 | ||
2040 | AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore]) | |
2041 | ||
2042 | dnl Modified MPLS pop action. | |
2043 | dnl The input is an ARP frame with a single MPLS label stack entry which tcpdump -vve shows as: | |
2044 | dnl 60:66:66:66:00:08 > ff:ff:ff:ff:ff:ff, ethertype MPLS unicast (0x8847), length 46: MPLS (label 20, exp 0, [S], ttl 32) | |
2045 | AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log]) | |
2046 | ||
2047 | for i in 1 2 3; do | |
2048 | ovs-appctl netdev-dummy/receive p1 'ff ff ff ff ff ff 60 66 66 66 00 08 88 47 00 01 41 20 00 01 08 00 06 04 00 02 60 66 66 66 00 08 c0 a8 00 01 ff ff ff ff ff ff ff ff ff ff' | |
2049 | done | |
2050 | OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6]) | |
2051 | OVS_APP_EXIT_AND_WAIT(ovs-ofctl) | |
2052 | ||
2053 | AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl | |
2054 | NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0xd total_len=56 in_port=1 (via action) data_len=56 (unbuffered) | |
e6d9ab56 | 2055 | arp,vlan_tci=0x0000,dl_src=60:66:66:66:00:08,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=192.168.0.1,arp_tpa=255.255.255.255,arp_op=2,arp_sha=60:66:66:66:00:08,arp_tha=ff:ff:ff:ff:ff:ff |
1ffd16af SH |
2056 | dnl |
2057 | NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0xd total_len=56 in_port=1 (via action) data_len=56 (unbuffered) | |
e6d9ab56 | 2058 | arp,vlan_tci=0x0000,dl_src=60:66:66:66:00:08,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=192.168.0.1,arp_tpa=255.255.255.255,arp_op=2,arp_sha=60:66:66:66:00:08,arp_tha=ff:ff:ff:ff:ff:ff |
1ffd16af SH |
2059 | dnl |
2060 | NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0xd total_len=56 in_port=1 (via action) data_len=56 (unbuffered) | |
e6d9ab56 | 2061 | arp,vlan_tci=0x0000,dl_src=60:66:66:66:00:08,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=192.168.0.1,arp_tpa=255.255.255.255,arp_op=2,arp_sha=60:66:66:66:00:08,arp_tha=ff:ff:ff:ff:ff:ff |
1ffd16af SH |
2062 | ]) |
2063 | ||
2064 | AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore]) | |
2065 | ||
2066 | dnl Modified MPLS pop action. | |
2067 | dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as: | |
2068 | dnl 60:66:66:66:00:09 > 50:54:00:00:00:07, ethertype MPLS multicast (0x8848), length 62: MPLS (label 20, exp 0, [S], ttl 32) | |
2069 | dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44) | |
2070 | dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4 | |
2071 | AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log]) | |
2072 | ||
2073 | for i in 1 2 3; do | |
2074 | ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 60 66 66 66 00 09 88 48 00 01 41 20 45 00 00 2c 00 00 00 00 ff 06 3a 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45' | |
2075 | done | |
2076 | OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6]) | |
2077 | OVS_APP_EXIT_AND_WAIT(ovs-ofctl) | |
2078 | ||
2079 | AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl | |
e672ff9b | 2080 | NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered) |
e6d9ab56 | 2081 | tcp,vlan_tci=0x0000,dl_src=60:66:66:66:00:09,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=48,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744 |
1ffd16af | 2082 | dnl |
e672ff9b | 2083 | NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered) |
e6d9ab56 | 2084 | tcp,vlan_tci=0x0000,dl_src=60:66:66:66:00:09,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=48,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744 |
1ffd16af | 2085 | dnl |
e672ff9b | 2086 | NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered) |
e6d9ab56 | 2087 | tcp,vlan_tci=0x0000,dl_src=60:66:66:66:00:09,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=48,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744 |
1ffd16af SH |
2088 | ]) |
2089 | ||
2090 | AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore]) | |
2091 | ||
2092 | dnl Modified MPLS pop action. | |
2093 | dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as: | |
2094 | dnl 60:66:66:66:00:0a > 50:54:00:00:00:07, ethertype MPLS multicast (0x8848), length 62: MPLS (label 20, exp 0, [S], ttl 32) | |
2095 | dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44) | |
2096 | dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4 | |
2097 | AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log]) | |
2098 | ||
2099 | for i in 1 2 3; do | |
2100 | ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 60 66 66 66 00 0a 88 48 00 01 41 20 45 00 00 2c 00 00 00 00 ff 06 3a 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45' | |
2101 | done | |
2102 | OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6]) | |
2103 | OVS_APP_EXIT_AND_WAIT(ovs-ofctl) | |
2104 | ||
2105 | AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl | |
e672ff9b | 2106 | NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered) |
e6d9ab56 | 2107 | tcp,vlan_tci=0x0000,dl_src=60:66:66:66:00:0a,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=10.0.0.1,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:2dee |
1ffd16af | 2108 | dnl |
e672ff9b | 2109 | NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered) |
e6d9ab56 | 2110 | tcp,vlan_tci=0x0000,dl_src=60:66:66:66:00:0a,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=10.0.0.1,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:2dee |
1ffd16af | 2111 | dnl |
e672ff9b | 2112 | NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered) |
e6d9ab56 | 2113 | tcp,vlan_tci=0x0000,dl_src=60:66:66:66:00:0a,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=10.0.0.1,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:2dee |
1ffd16af SH |
2114 | ]) |
2115 | ||
2116 | AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore]) | |
2117 | ||
2118 | dnl Modified MPLS pop action. | |
2119 | dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as: | |
2120 | dnl 60:66:66:66:00:0b > 50:54:00:00:00:07, ethertype MPLS multicast (0x8848), length 62: MPLS (label 20, exp 0, [S], ttl 32) | |
2121 | dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44) | |
2122 | dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4 | |
2123 | AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log]) | |
2124 | ||
2125 | for i in 1 2 3; do | |
2126 | ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 60 66 66 66 00 0b 88 48 00 01 41 20 45 00 00 2c 00 00 00 00 ff 06 3a 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45' | |
2127 | done | |
2128 | OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6]) | |
2129 | OVS_APP_EXIT_AND_WAIT(ovs-ofctl) | |
2130 | ||
2131 | AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl | |
e672ff9b | 2132 | NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered) |
e6d9ab56 | 2133 | tcp,vlan_tci=0x0000,dl_src=60:66:66:66:00:0b,dl_dst=50:54:00:00:00:07,nw_src=10.0.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:2ded |
1ffd16af | 2134 | dnl |
e672ff9b | 2135 | NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered) |
e6d9ab56 | 2136 | tcp,vlan_tci=0x0000,dl_src=60:66:66:66:00:0b,dl_dst=50:54:00:00:00:07,nw_src=10.0.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:2ded |
1ffd16af | 2137 | dnl |
e672ff9b | 2138 | NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered) |
e6d9ab56 | 2139 | tcp,vlan_tci=0x0000,dl_src=60:66:66:66:00:0b,dl_dst=50:54:00:00:00:07,nw_src=10.0.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:2ded |
1ffd16af SH |
2140 | ]) |
2141 | ||
2142 | AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore]) | |
2143 | ||
2144 | dnl Modified MPLS pop action. | |
2145 | dnl The input is a frame with two MPLS label stack entries which tcpdump -vve shows as: | |
2146 | dnl 60:66:66:66:01:00 > 50:54:00:00:00:07, ethertype MPLS multicast (0x8848), length 66: MPLS (label 20, exp 0, ttl 32) | |
2147 | dnl (label 20, exp 0, [S], ttl 31) | |
2148 | dnl (tos 0x0, ttl 254, id 0, offset 0, flags [none], proto TCP (6), length 44) | |
2149 | dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4 | |
2150 | AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log]) | |
2151 | ||
2152 | for i in 1 2 3; do | |
2153 | ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 60 66 66 66 01 00 88 48 00 01 40 20 00 01 41 1f 45 00 00 2c 00 00 00 00 ff 06 3b 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45' | |
2154 | done | |
2155 | OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6]) | |
2156 | OVS_APP_EXIT_AND_WAIT(ovs-ofctl) | |
2157 | ||
2158 | AT_CHECK([cat ofctl_monitor.log], [0], [dnl | |
2159 | NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered) | |
e6d9ab56 | 2160 | mplsm,vlan_tci=0x0000,dl_src=60:66:66:66:01:00,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=0,mpls_ttl=31,mpls_bos=1 |
1ffd16af SH |
2161 | dnl |
2162 | NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered) | |
e6d9ab56 | 2163 | mplsm,vlan_tci=0x0000,dl_src=60:66:66:66:01:00,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=0,mpls_ttl=31,mpls_bos=1 |
1ffd16af SH |
2164 | dnl |
2165 | NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered) | |
e6d9ab56 | 2166 | mplsm,vlan_tci=0x0000,dl_src=60:66:66:66:01:00,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=0,mpls_ttl=31,mpls_bos=1 |
1ffd16af SH |
2167 | ]) |
2168 | ||
2169 | AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore]) | |
2170 | ||
2171 | dnl Modified MPLS pop action. | |
2172 | dnl The input is a frame with two MPLS label stack entries which tcpdump -vve shows as: | |
2173 | dnl 60:66:66:66:01:01 > 50:54:00:00:00:07, ethertype MPLS unicast (0x8847), length 66: MPLS (label 20, exp 0, ttl 32) | |
2174 | dnl (label 20, exp 0, [S], ttl 31) | |
2175 | dnl (tos 0x0, ttl 254, id 0, offset 0, flags [none], proto TCP (6), length 44) | |
2176 | dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4 | |
2177 | AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log]) | |
2178 | ||
2179 | for i in 1 2 3; do | |
2180 | ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 60 66 66 66 01 01 88 47 00 01 40 20 00 01 41 1f 45 00 00 2c 00 00 00 00 ff 06 3b 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45' | |
2181 | done | |
2182 | OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6]) | |
2183 | OVS_APP_EXIT_AND_WAIT(ovs-ofctl) | |
2184 | ||
2185 | AT_CHECK([cat ofctl_monitor.log], [0], [dnl | |
e672ff9b | 2186 | NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered) |
e6d9ab56 | 2187 | mpls,vlan_tci=0x0000,dl_src=60:66:66:66:01:01,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=0,mpls_ttl=30,mpls_bos=1 |
1ffd16af | 2188 | dnl |
e672ff9b | 2189 | NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered) |
e6d9ab56 | 2190 | mpls,vlan_tci=0x0000,dl_src=60:66:66:66:01:01,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=0,mpls_ttl=30,mpls_bos=1 |
1ffd16af | 2191 | dnl |
e672ff9b | 2192 | NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered) |
e6d9ab56 | 2193 | mpls,vlan_tci=0x0000,dl_src=60:66:66:66:01:01,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=0,mpls_ttl=30,mpls_bos=1 |
1ffd16af SH |
2194 | ]) |
2195 | ||
2196 | AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore]) | |
2197 | ||
2198 | dnl Modified MPLS pop action. | |
2199 | dnl The input is a frame with two MPLS label stack entries which tcpdump -vve shows as: | |
2200 | dnl 60:66:66:66:01:02 > 50:54:00:00:00:07, ethertype MPLS multicast (0x8848), length 66: MPLS (label 20, exp 0, ttl 32) | |
2201 | dnl (label 20, exp 0, [S], ttl 31) | |
2202 | dnl (tos 0x0, ttl 254, id 0, offset 0, flags [none], proto TCP (6), length 44) | |
2203 | dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4 | |
2204 | AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log]) | |
2205 | ||
2206 | for i in 1 2 3; do | |
2207 | ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 60 66 66 66 01 02 88 48 00 01 40 20 00 01 41 1f 45 00 00 2c 00 00 00 00 ff 06 3b 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45' | |
2208 | done | |
2209 | OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6]) | |
2210 | OVS_APP_EXIT_AND_WAIT(ovs-ofctl) | |
2211 | ||
2212 | AT_CHECK([cat ofctl_monitor.log], [0], [dnl | |
2213 | NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered) | |
e6d9ab56 | 2214 | mplsm,vlan_tci=0x0000,dl_src=60:66:66:66:01:02,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=3,mpls_ttl=31,mpls_bos=1 |
1ffd16af SH |
2215 | dnl |
2216 | NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered) | |
e6d9ab56 | 2217 | mplsm,vlan_tci=0x0000,dl_src=60:66:66:66:01:02,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=3,mpls_ttl=31,mpls_bos=1 |
1ffd16af SH |
2218 | dnl |
2219 | NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=62 in_port=1 (via action) data_len=62 (unbuffered) | |
e6d9ab56 | 2220 | mplsm,vlan_tci=0x0000,dl_src=60:66:66:66:01:02,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=3,mpls_ttl=31,mpls_bos=1 |
1ffd16af SH |
2221 | ]) |
2222 | ||
2223 | AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore]) | |
2224 | ||
2225 | dnl Modified MPLS pop action. | |
2226 | dnl The input is a frame with two MPLS label stack entries which tcpdump -vve shows as: | |
2227 | dnl 60:66:66:66:02:00 > 50:54:00:00:02:00, ethertype MPLS unicast (0x8847), length 66: MPLS (label 20, exp 0, ttl 32) | |
2228 | dnl (label 20, exp 0, [S], ttl 31) | |
2229 | dnl (tos 0x0, ttl 254, id 0, offset 0, flags [none], proto TCP (6), length 44) | |
2230 | dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4 | |
2231 | AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log]) | |
2232 | ||
2233 | for i in 1 2 3; do | |
2234 | ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 60 66 66 66 02 00 88 47 00 01 40 20 00 01 41 1f 45 00 00 2c 00 00 00 00 ff 06 3b 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45' | |
2235 | done | |
2236 | OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6]) | |
2237 | OVS_APP_EXIT_AND_WAIT(ovs-ofctl) | |
2238 | ||
2239 | AT_CHECK([cat ofctl_monitor.log], [0], [dnl | |
e672ff9b | 2240 | NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered) |
e6d9ab56 | 2241 | tcp,vlan_tci=0x0000,dl_src=60:66:66:66:02:00,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744 |
1ffd16af | 2242 | dnl |
e672ff9b | 2243 | NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered) |
e6d9ab56 | 2244 | tcp,vlan_tci=0x0000,dl_src=60:66:66:66:02:00,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744 |
1ffd16af | 2245 | dnl |
e672ff9b | 2246 | NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered) |
e6d9ab56 | 2247 | tcp,vlan_tci=0x0000,dl_src=60:66:66:66:02:00,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744 |
1ffd16af SH |
2248 | ]) |
2249 | ||
2250 | AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore]) | |
2251 | ||
2252 | dnl Modified MPLS pop action. | |
2253 | dnl The input is a frame with two MPLS label stack entries which tcpdump -vve shows as: | |
2254 | dnl 60:66:66:66:02:01 > 50:54:00:00:02:01, ethertype MPLS multicast (0x8848), length 66: MPLS (label 20, exp 0, ttl 32) | |
2255 | dnl (label 20, exp 0, [S], ttl 31) | |
2256 | dnl (tos 0x0, ttl 254, id 0, offset 0, flags [none], proto TCP (6), length 44) | |
2257 | dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4 | |
2258 | AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log]) | |
2259 | ||
2260 | for i in 1 2 3; do | |
2261 | ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 60 66 66 66 02 01 88 48 00 01 40 20 00 01 41 1f 45 00 00 2c 00 00 00 00 ff 06 3b 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45' | |
2262 | done | |
e672ff9b | 2263 | |
1ffd16af SH |
2264 | OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6]) |
2265 | OVS_APP_EXIT_AND_WAIT(ovs-ofctl) | |
2266 | ||
2267 | AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl | |
e672ff9b | 2268 | NXT_PACKET_IN (xid=0x0): cookie=0xe total_len=58 in_port=1 (via action) data_len=58 (unbuffered) |
e6d9ab56 | 2269 | tcp,vlan_tci=0x0000,dl_src=60:66:66:66:02:01,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=254,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744 |
1ffd16af | 2270 | dnl |
e672ff9b | 2271 | NXT_PACKET_IN (xid=0x0): cookie=0xe total_len=58 in_port=1 (via action) data_len=58 (unbuffered) |
e6d9ab56 | 2272 | tcp,vlan_tci=0x0000,dl_src=60:66:66:66:02:01,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=254,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744 |
1ffd16af | 2273 | dnl |
e672ff9b | 2274 | NXT_PACKET_IN (xid=0x0): cookie=0xe total_len=58 in_port=1 (via action) data_len=58 (unbuffered) |
e6d9ab56 | 2275 | tcp,vlan_tci=0x0000,dl_src=60:66:66:66:02:01,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=254,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744 |
1ffd16af SH |
2276 | ]) |
2277 | ||
2278 | AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore]) | |
2279 | ||
2280 | dnl Modified MPLS pop action. | |
2281 | dnl The input is a frame with two MPLS label stack entries which tcpdump -vve shows as: | |
e672ff9b | 2282 | dnl 60:66:66:66:02:10 > 50:54:00:00:00:07, ethertype MPLS unicast (0x8847), length 66: MPLS (label 20, exp 0, ttl 32) |
1ffd16af SH |
2283 | dnl (label 20, exp 0, [S], ttl 31) |
2284 | dnl (tos 0x0, ttl 254, id 0, offset 0, flags [none], proto TCP (6), length 44) | |
2285 | dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4 | |
2286 | AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log]) | |
2287 | ||
2288 | for i in 1 2 3; do | |
2289 | ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 60 66 66 66 02 10 88 47 00 01 40 20 00 01 41 1f 45 00 00 2c 00 00 00 00 ff 06 3b 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45' | |
2290 | done | |
2291 | OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6]) | |
2292 | OVS_APP_EXIT_AND_WAIT(ovs-ofctl) | |
2293 | ||
2294 | AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl | |
e672ff9b | 2295 | NXT_PACKET_IN (xid=0x0): cookie=0xe total_len=58 in_port=1 (via action) data_len=58 (unbuffered) |
e6d9ab56 | 2296 | tcp,vlan_tci=0x0000,dl_src=60:66:66:66:02:10,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=254,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744 |
1ffd16af | 2297 | dnl |
e672ff9b | 2298 | NXT_PACKET_IN (xid=0x0): cookie=0xe total_len=58 in_port=1 (via action) data_len=58 (unbuffered) |
e6d9ab56 | 2299 | tcp,vlan_tci=0x0000,dl_src=60:66:66:66:02:10,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=254,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744 |
1ffd16af | 2300 | dnl |
e672ff9b | 2301 | NXT_PACKET_IN (xid=0x0): cookie=0xe total_len=58 in_port=1 (via action) data_len=58 (unbuffered) |
e6d9ab56 | 2302 | tcp,vlan_tci=0x0000,dl_src=60:66:66:66:02:10,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=254,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744 |
1ffd16af SH |
2303 | ]) |
2304 | ||
2305 | AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore]) | |
2306 | ||
2307 | dnl Modified MPLS pop action. | |
2308 | dnl The input is a frame with three MPLS label stack entries which tcpdump -vve shows as: | |
e672ff9b | 2309 | dnl 60:66:66:66:03:00 > 50:54:00:00:00:07, ethertype MPLS unicast (0x8847), length 66: MPLS (label 20, exp 0, ttl 32) |
1ffd16af SH |
2310 | dnl (label 20, exp 0, ttl 31) |
2311 | dnl (label 20, exp 0, [S], ttl 30) | |
2312 | dnl (tos 0x0, ttl 254, id 0, offset 0, flags [none], proto TCP (6), length 44) | |
2313 | dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4 | |
2314 | AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log]) | |
2315 | ||
2316 | for i in 1 2 3; do | |
2317 | ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 60 66 66 66 03 00 88 47 00 01 40 20 00 01 40 1f 00 01 41 1e 45 00 00 2c 00 00 00 00 ff 06 3b 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45' | |
2318 | done | |
2319 | OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6]) | |
2320 | OVS_APP_EXIT_AND_WAIT(ovs-ofctl) | |
2321 | ||
2322 | AT_CHECK([cat ofctl_monitor.log], [0], [dnl | |
e672ff9b | 2323 | NXT_PACKET_IN (xid=0x0): cookie=0xe total_len=62 in_port=1 (via action) data_len=62 (unbuffered) |
e6d9ab56 | 2324 | mplsm,vlan_tci=0x0000,dl_src=60:66:66:66:03:00,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=0,mpls_ttl=30,mpls_bos=1 |
1ffd16af | 2325 | dnl |
e672ff9b | 2326 | NXT_PACKET_IN (xid=0x0): cookie=0xe total_len=62 in_port=1 (via action) data_len=62 (unbuffered) |
e6d9ab56 | 2327 | mplsm,vlan_tci=0x0000,dl_src=60:66:66:66:03:00,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=0,mpls_ttl=30,mpls_bos=1 |
1ffd16af | 2328 | dnl |
e672ff9b | 2329 | NXT_PACKET_IN (xid=0x0): cookie=0xe total_len=62 in_port=1 (via action) data_len=62 (unbuffered) |
e6d9ab56 | 2330 | mplsm,vlan_tci=0x0000,dl_src=60:66:66:66:03:00,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=0,mpls_ttl=30,mpls_bos=1 |
1ffd16af SH |
2331 | ]) |
2332 | ||
2333 | AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore]) | |
2334 | ||
2335 | dnl Modified MPLS pop action. | |
2336 | dnl The input is a frame with three MPLS label stack entries which tcpdump -vve shows as: | |
2337 | dnl 60:66:66:66:03:01 > 50:54:00:00:00:00, ethertype MPLS multicast (0x8848), length 66: MPLS (label 20, exp 0, ttl 32) | |
2338 | dnl (label 20, exp 0, ttl 31) | |
2339 | dnl (label 20, exp 0, [S], ttl 30) | |
2340 | dnl (tos 0x0, ttl 254, id 0, offset 0, flags [none], proto TCP (6), length 44) | |
2341 | dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4 | |
2342 | AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log]) | |
2343 | ||
2344 | for i in 1 2 3; do | |
2345 | ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 60 66 66 66 03 01 88 48 00 01 40 20 00 01 40 1f 00 01 41 1e 45 00 00 2c 00 00 00 00 ff 06 3b 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45' | |
2346 | done | |
2347 | OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6]) | |
2348 | OVS_APP_EXIT_AND_WAIT(ovs-ofctl) | |
2349 | ||
2350 | AT_CHECK([cat ofctl_monitor.log], [0], [dnl | |
e672ff9b | 2351 | NXT_PACKET_IN (xid=0x0): cookie=0xe total_len=62 in_port=1 (via action) data_len=62 (unbuffered) |
e6d9ab56 | 2352 | mpls,vlan_tci=0x0000,dl_src=60:66:66:66:03:01,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=0,mpls_ttl=29,mpls_bos=1 |
1ffd16af | 2353 | dnl |
e672ff9b | 2354 | NXT_PACKET_IN (xid=0x0): cookie=0xe total_len=62 in_port=1 (via action) data_len=62 (unbuffered) |
e6d9ab56 | 2355 | mpls,vlan_tci=0x0000,dl_src=60:66:66:66:03:01,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=0,mpls_ttl=29,mpls_bos=1 |
1ffd16af | 2356 | dnl |
e672ff9b | 2357 | NXT_PACKET_IN (xid=0x0): cookie=0xe total_len=62 in_port=1 (via action) data_len=62 (unbuffered) |
e6d9ab56 | 2358 | mpls,vlan_tci=0x0000,dl_src=60:66:66:66:03:01,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=0,mpls_ttl=29,mpls_bos=1 |
1ffd16af SH |
2359 | ]) |
2360 | ||
2361 | AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore]) | |
2362 | ||
2363 | dnl Modified MPLS pop action. | |
2364 | dnl The input is a frame with three MPLS label stack entries which tcpdump -vve shows as: | |
2365 | dnl 60:66:66:66:03:10 > 50:54:00:00:00:00, ethertype MPLS unicast (0x8847), length 66: MPLS (label 20, exp 0, ttl 32) | |
2366 | dnl (label 20, exp 0, ttl 31) | |
2367 | dnl (label 20, exp 0, [S], ttl 30) | |
2368 | dnl (tos 0x0, ttl 254, id 0, offset 0, flags [none], proto TCP (6), length 44) | |
2369 | dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4 | |
2370 | AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log]) | |
2371 | ||
2372 | for i in 1 2 3; do | |
2373 | ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 60 66 66 66 03 10 88 47 00 01 40 20 00 01 40 1f 00 01 41 1e 45 00 00 2c 00 00 00 00 ff 06 3b 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45' | |
2374 | done | |
2375 | OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6]) | |
2376 | OVS_APP_EXIT_AND_WAIT(ovs-ofctl) | |
2377 | ||
2378 | AT_CHECK([cat ofctl_monitor.log], [0], [dnl | |
e672ff9b | 2379 | NXT_PACKET_IN (xid=0x0): cookie=0xe total_len=62 in_port=1 (via action) data_len=62 (unbuffered) |
e6d9ab56 | 2380 | mplsm,vlan_tci=0x0000,dl_src=60:66:66:66:03:10,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=0,mpls_ttl=29,mpls_bos=1 |
1ffd16af | 2381 | dnl |
e672ff9b | 2382 | NXT_PACKET_IN (xid=0x0): cookie=0xe total_len=62 in_port=1 (via action) data_len=62 (unbuffered) |
e6d9ab56 | 2383 | mplsm,vlan_tci=0x0000,dl_src=60:66:66:66:03:10,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=0,mpls_ttl=29,mpls_bos=1 |
1ffd16af | 2384 | dnl |
e672ff9b | 2385 | NXT_PACKET_IN (xid=0x0): cookie=0xe total_len=62 in_port=1 (via action) data_len=62 (unbuffered) |
e6d9ab56 | 2386 | mplsm,vlan_tci=0x0000,dl_src=60:66:66:66:03:10,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=0,mpls_ttl=29,mpls_bos=1 |
1ffd16af SH |
2387 | ]) |
2388 | ||
2389 | AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore]) | |
2390 | ||
2391 | dnl Modified MPLS pop action. | |
2392 | dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as: | |
2393 | dnl 60:66:66:66:04:00 > 50:54:00:00:00:07, ethertype MPLS multicast (0x8848), length 62: MPLS (label 20, exp 0, [S], ttl 32) | |
2394 | dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44) | |
2395 | dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4 | |
2396 | AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log]) | |
2397 | ||
2398 | for i in 1 2 3; do | |
2399 | ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 60 66 66 66 04 00 88 48 00 01 41 20 45 00 00 2c 00 00 00 00 ff 06 3a 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45' | |
2400 | done | |
2401 | OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6]) | |
2402 | OVS_APP_EXIT_AND_WAIT(ovs-ofctl) | |
2403 | ||
2404 | AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl | |
e672ff9b | 2405 | NXT_PACKET_IN (xid=0x0): cookie=0xf total_len=62 in_port=1 (via action) data_len=62 (unbuffered) |
e6d9ab56 | 2406 | mpls,vlan_tci=0x0000,dl_src=60:66:66:66:04:00,dl_dst=50:54:00:00:00:07,mpls_label=0,mpls_tc=0,mpls_ttl=255,mpls_bos=1 |
1ffd16af | 2407 | dnl |
e672ff9b | 2408 | NXT_PACKET_IN (xid=0x0): cookie=0xf total_len=62 in_port=1 (via action) data_len=62 (unbuffered) |
e6d9ab56 | 2409 | mpls,vlan_tci=0x0000,dl_src=60:66:66:66:04:00,dl_dst=50:54:00:00:00:07,mpls_label=0,mpls_tc=0,mpls_ttl=255,mpls_bos=1 |
1ffd16af | 2410 | dnl |
e672ff9b | 2411 | NXT_PACKET_IN (xid=0x0): cookie=0xf total_len=62 in_port=1 (via action) data_len=62 (unbuffered) |
e6d9ab56 | 2412 | mpls,vlan_tci=0x0000,dl_src=60:66:66:66:04:00,dl_dst=50:54:00:00:00:07,mpls_label=0,mpls_tc=0,mpls_ttl=255,mpls_bos=1 |
1ffd16af SH |
2413 | ]) |
2414 | ||
2415 | AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore]) | |
2416 | ||
2417 | dnl Modified MPLS pop action. | |
2418 | dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as: | |
2419 | dnl 60:66:66:66:04:01 > 50:54:00:00:00:07, ethertype MPLS unicast (0x8847), length 62: MPLS (label 20, exp 0, [S], ttl 32) | |
2420 | dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44) | |
2421 | dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4 | |
2422 | AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log]) | |
2423 | ||
2424 | for i in 1 2 3; do | |
2425 | ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 60 66 66 66 04 01 88 47 00 01 41 20 45 00 00 2c 00 00 00 00 ff 06 3a 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45' | |
2426 | done | |
2427 | OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6]) | |
2428 | OVS_APP_EXIT_AND_WAIT(ovs-ofctl) | |
2429 | ||
2430 | AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl | |
e672ff9b | 2431 | NXT_PACKET_IN (xid=0x0): cookie=0xf total_len=62 in_port=1 (via action) data_len=62 (unbuffered) |
e6d9ab56 | 2432 | mplsm,vlan_tci=0x0000,dl_src=60:66:66:66:04:01,dl_dst=50:54:00:00:00:07,mpls_label=0,mpls_tc=0,mpls_ttl=254,mpls_bos=1 |
1ffd16af | 2433 | dnl |
e672ff9b | 2434 | NXT_PACKET_IN (xid=0x0): cookie=0xf total_len=62 in_port=1 (via action) data_len=62 (unbuffered) |
e6d9ab56 | 2435 | mplsm,vlan_tci=0x0000,dl_src=60:66:66:66:04:01,dl_dst=50:54:00:00:00:07,mpls_label=0,mpls_tc=0,mpls_ttl=254,mpls_bos=1 |
1ffd16af | 2436 | dnl |
e672ff9b | 2437 | NXT_PACKET_IN (xid=0x0): cookie=0xf total_len=62 in_port=1 (via action) data_len=62 (unbuffered) |
e6d9ab56 | 2438 | mplsm,vlan_tci=0x0000,dl_src=60:66:66:66:04:01,dl_dst=50:54:00:00:00:07,mpls_label=0,mpls_tc=0,mpls_ttl=254,mpls_bos=1 |
1ffd16af SH |
2439 | ]) |
2440 | ||
2441 | AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore]) | |
2442 | ||
2443 | dnl Modified MPLS pop action. | |
2444 | dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as: | |
2445 | dnl 60:66:66:66:04:10 > 50:54:00:00:00:07, ethertype MPLS multicast (0x8848), length 62: MPLS (label 20, exp 0, [S], ttl 32) | |
2446 | dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44) | |
2447 | dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4 | |
2448 | AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log]) | |
2449 | ||
2450 | for i in 1 2 3; do | |
2451 | ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 60 66 66 66 04 10 88 48 00 01 41 20 45 00 00 2c 00 00 00 00 ff 06 3a 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45' | |
2452 | done | |
2453 | OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6]) | |
2454 | OVS_APP_EXIT_AND_WAIT(ovs-ofctl) | |
2455 | ||
2456 | AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl | |
e672ff9b | 2457 | NXT_PACKET_IN (xid=0x0): cookie=0xf total_len=62 in_port=1 (via action) data_len=62 (unbuffered) |
e6d9ab56 | 2458 | mplsm,vlan_tci=0x0000,dl_src=60:66:66:66:04:10,dl_dst=50:54:00:00:00:07,mpls_label=0,mpls_tc=0,mpls_ttl=253,mpls_bos=1 |
1ffd16af | 2459 | dnl |
e672ff9b | 2460 | NXT_PACKET_IN (xid=0x0): cookie=0xf total_len=62 in_port=1 (via action) data_len=62 (unbuffered) |
e6d9ab56 | 2461 | mplsm,vlan_tci=0x0000,dl_src=60:66:66:66:04:10,dl_dst=50:54:00:00:00:07,mpls_label=0,mpls_tc=0,mpls_ttl=253,mpls_bos=1 |
1ffd16af | 2462 | dnl |
e672ff9b | 2463 | NXT_PACKET_IN (xid=0x0): cookie=0xf total_len=62 in_port=1 (via action) data_len=62 (unbuffered) |
e6d9ab56 | 2464 | mplsm,vlan_tci=0x0000,dl_src=60:66:66:66:04:10,dl_dst=50:54:00:00:00:07,mpls_label=0,mpls_tc=0,mpls_ttl=253,mpls_bos=1 |
1ffd16af SH |
2465 | ]) |
2466 | ||
2467 | AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore]) | |
2468 | ||
2469 | dnl Modified MPLS pop action. | |
2470 | dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as: | |
2471 | dnl 60:66:66:66:05:00 > 50:54:00:00:00:07, ethertype MPLS unicast (0x8847), length 62: MPLS (label 20, exp 0, [S], ttl 32) | |
2472 | dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44) | |
2473 | dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4 | |
2474 | AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log]) | |
2475 | ||
2476 | for i in 1 2 3; do | |
2477 | ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 60 66 66 66 05 00 88 47 00 01 41 20 45 00 00 2c 00 00 00 00 ff 06 3a 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45' | |
2478 | done | |
e672ff9b | 2479 | |
1ffd16af SH |
2480 | OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6]) |
2481 | OVS_APP_EXIT_AND_WAIT(ovs-ofctl) | |
2482 | ||
2483 | AT_CHECK([cat ofctl_monitor.log], [0], [dnl | |
e672ff9b | 2484 | NXT_PACKET_IN (xid=0x0): cookie=0x5 total_len=62 in_port=1 (via action) data_len=62 (unbuffered) |
e6d9ab56 | 2485 | mpls,vlan_tci=0x0000,dl_src=60:66:66:66:05:00,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=0,mpls_ttl=32,mpls_bos=1 |
1ffd16af | 2486 | dnl |
e672ff9b | 2487 | NXT_PACKET_IN (xid=0x0): cookie=0x5 total_len=62 in_port=1 (via action) data_len=62 (unbuffered) |
e6d9ab56 | 2488 | mpls,vlan_tci=0x0000,dl_src=60:66:66:66:05:00,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=0,mpls_ttl=32,mpls_bos=1 |
1ffd16af | 2489 | dnl |
e672ff9b | 2490 | NXT_PACKET_IN (xid=0x0): cookie=0x5 total_len=62 in_port=1 (via action) data_len=62 (unbuffered) |
e6d9ab56 | 2491 | mpls,vlan_tci=0x0000,dl_src=60:66:66:66:05:00,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=0,mpls_ttl=32,mpls_bos=1 |
1ffd16af SH |
2492 | ]) |
2493 | ||
2494 | AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore]) | |
2495 | ||
2496 | dnl Modified MPLS pop action. | |
2497 | dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as: | |
2498 | dnl 60:66:66:66:05:01 > 50:54:00:00:00:07, ethertype MPLS multicast (0x8848), length 62: MPLS (label 20, exp 0, [S], ttl 32) | |
2499 | dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44) | |
2500 | dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4 | |
2501 | AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log]) | |
2502 | ||
2503 | for i in 1 2 3; do | |
2504 | ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 60 66 66 66 05 01 88 48 00 01 41 20 45 00 00 2c 00 00 00 00 ff 06 3a 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45' | |
2505 | done | |
2506 | OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6]) | |
2507 | OVS_APP_EXIT_AND_WAIT(ovs-ofctl) | |
2508 | ||
2509 | AT_CHECK([cat ofctl_monitor.log], [0], [dnl | |
e672ff9b | 2510 | NXT_PACKET_IN (xid=0x0): cookie=0x5 total_len=62 in_port=1 (via action) data_len=62 (unbuffered) |
e6d9ab56 | 2511 | mplsm,vlan_tci=0x0000,dl_src=60:66:66:66:05:01,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=0,mpls_ttl=31,mpls_bos=1 |
1ffd16af | 2512 | dnl |
e672ff9b | 2513 | NXT_PACKET_IN (xid=0x0): cookie=0x5 total_len=62 in_port=1 (via action) data_len=62 (unbuffered) |
e6d9ab56 | 2514 | mplsm,vlan_tci=0x0000,dl_src=60:66:66:66:05:01,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=0,mpls_ttl=31,mpls_bos=1 |
1ffd16af | 2515 | dnl |
e672ff9b | 2516 | NXT_PACKET_IN (xid=0x0): cookie=0x5 total_len=62 in_port=1 (via action) data_len=62 (unbuffered) |
e6d9ab56 | 2517 | mplsm,vlan_tci=0x0000,dl_src=60:66:66:66:05:01,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=0,mpls_ttl=31,mpls_bos=1 |
1ffd16af SH |
2518 | ]) |
2519 | ||
2520 | AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore]) | |
2521 | ||
2522 | dnl Modified MPLS pop action. | |
2523 | dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as: | |
2524 | dnl 60:66:66:66:05:10 > 50:54:00:00:00:07, ethertype MPLS unicast (0x8847), length 62: MPLS (label 20, exp 0, [S], ttl 32) | |
2525 | dnl (tos 0x0, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44) | |
2526 | dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4 | |
2527 | AT_CHECK([ovs-ofctl monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log]) | |
2528 | ||
2529 | for i in 1 2 3; do | |
2530 | ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 07 60 66 66 66 05 10 88 47 00 01 41 20 45 00 00 2c 00 00 00 00 ff 06 3a 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45' | |
2531 | done | |
e672ff9b | 2532 | |
1ffd16af SH |
2533 | OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6]) |
2534 | OVS_APP_EXIT_AND_WAIT(ovs-ofctl) | |
2535 | ||
2536 | AT_CHECK([cat ofctl_monitor.log], [0], [dnl | |
e672ff9b | 2537 | NXT_PACKET_IN (xid=0x0): cookie=0x5 total_len=62 in_port=1 (via action) data_len=62 (unbuffered) |
e6d9ab56 | 2538 | mpls,vlan_tci=0x0000,dl_src=60:66:66:66:05:10,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=0,mpls_ttl=31,mpls_bos=1 |
1ffd16af | 2539 | dnl |
e672ff9b | 2540 | NXT_PACKET_IN (xid=0x0): cookie=0x5 total_len=62 in_port=1 (via action) data_len=62 (unbuffered) |
e6d9ab56 | 2541 | mpls,vlan_tci=0x0000,dl_src=60:66:66:66:05:10,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=0,mpls_ttl=31,mpls_bos=1 |
1ffd16af | 2542 | dnl |
e672ff9b | 2543 | NXT_PACKET_IN (xid=0x0): cookie=0x5 total_len=62 in_port=1 (via action) data_len=62 (unbuffered) |
e6d9ab56 | 2544 | mpls,vlan_tci=0x0000,dl_src=60:66:66:66:05:10,dl_dst=50:54:00:00:00:07,mpls_label=20,mpls_tc=0,mpls_ttl=31,mpls_bos=1 |
1ffd16af SH |
2545 | ]) |
2546 | ||
cea4a6d7 | 2547 | AT_CHECK([ovs-appctl revalidator/purge], [0]) |
ef0ce8ae | 2548 | AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl |
e672ff9b JR |
2549 | cookie=0x5, n_packets=3, n_bytes=186, dl_src=60:66:66:66:05:00 actions=push_mpls:0x8848,pop_mpls:0x8847,CONTROLLER:65535 |
2550 | cookie=0x5, n_packets=3, n_bytes=186, dl_src=60:66:66:66:05:01 actions=push_mpls:0x8847,pop_mpls:0x8848,dec_mpls_ttl,CONTROLLER:65535 | |
2551 | cookie=0x5, n_packets=3, n_bytes=186, dl_src=60:66:66:66:05:10 actions=push_mpls:0x8848,dec_mpls_ttl,pop_mpls:0x8847,dec_mpls_ttl,CONTROLLER:65535 | |
b02475c5 SH |
2552 | cookie=0xa, n_packets=3, n_bytes=180, dl_src=40:44:44:44:44:42 actions=push_mpls:0x8847,load:0xa->OXM_OF_MPLS_LABEL[[]],load:0x3->OXM_OF_MPLS_TC[[]],CONTROLLER:65535 |
2553 | cookie=0xa, n_packets=3, n_bytes=180, dl_src=40:44:44:44:44:43 actions=push_mpls:0x8847,load:0xa->OXM_OF_MPLS_LABEL[[]],load:0x3->OXM_OF_MPLS_TC[[]],CONTROLLER:65535 | |
2554 | cookie=0xa, n_packets=3, n_bytes=180, dl_src=40:44:44:44:44:44 actions=push_mpls:0x8847,load:0xa->OXM_OF_MPLS_LABEL[[]],load:0x3->OXM_OF_MPLS_TC[[]],CONTROLLER:65535 | |
b676167a | 2555 | cookie=0xa, n_packets=3, n_bytes=180, dl_src=40:44:44:44:44:45 actions=push_mpls:0x8847,load:0xa->OXM_OF_MPLS_LABEL[[]],load:0x3->OXM_OF_MPLS_TC[[]],dec_mpls_ttl,CONTROLLER:65535 |
0f3f3c3d SH |
2556 | cookie=0xa, n_packets=3, n_bytes=180, dl_src=40:44:44:44:44:46 actions=push_mpls:0x8847,load:0xa->OXM_OF_MPLS_LABEL[[]],load:0x3->OXM_OF_MPLS_TC[[]],set_mpls_ttl(10),CONTROLLER:65535 |
2557 | cookie=0xa, n_packets=3, n_bytes=180, dl_src=40:44:44:44:44:47 actions=push_mpls:0x8847,load:0xa->OXM_OF_MPLS_LABEL[[]],load:0x3->OXM_OF_MPLS_TC[[]],dec_mpls_ttl,set_mpls_ttl(10),CONTROLLER:65535 | |
2558 | cookie=0xa, n_packets=3, n_bytes=180, dl_src=40:44:44:44:44:48 actions=push_mpls:0x8847,load:0xa->OXM_OF_MPLS_LABEL[[]],load:0x3->OXM_OF_MPLS_TC[[]],set_mpls_ttl(10),dec_mpls_ttl,CONTROLLER:65535 | |
b0a17866 | 2559 | cookie=0xa, n_packets=3, n_bytes=180, dl_src=41:44:44:44:44:42 actions=push_mpls:0x8847,load:0xa->OXM_OF_MPLS_LABEL[[]],load:0x3->OXM_OF_MPLS_TC[[]],pop_mpls:0x0800,CONTROLLER:65535 |
1ffd16af | 2560 | cookie=0xa, n_packets=3, n_bytes=180, mpls,dl_src=40:44:44:44:44:49 actions=push_mpls:0x8848,load:0xa->OXM_OF_MPLS_LABEL[[]],CONTROLLER:65535 |
392c30ba | 2561 | cookie=0xb, n_packets=3, n_bytes=180, mpls,dl_src=50:55:55:55:55:55 actions=load:0x3e8->OXM_OF_MPLS_LABEL[[]],CONTROLLER:65535 |
b02475c5 | 2562 | cookie=0xc, n_packets=3, n_bytes=180, dl_src=70:77:77:77:77:77 actions=push_mpls:0x8848,load:0x3e8->OXM_OF_MPLS_LABEL[[]],load:0x7->OXM_OF_MPLS_TC[[]],CONTROLLER:65535 |
1ffd16af | 2563 | cookie=0xd, n_packets=3, n_bytes=180, dl_src=60:66:66:66:00:08 actions=pop_mpls:0x0806,resubmit(1,1) |
c2d936a4 | 2564 | cookie=0xd, n_packets=3, n_bytes=186, dl_src=60:66:66:66:00:01 actions=pop_mpls:0x0800,dec_ttl,CONTROLLER:65535 |
1ffd16af SH |
2565 | cookie=0xd, n_packets=3, n_bytes=186, dl_src=60:66:66:66:00:02 actions=pop_mpls:0x0800,load:0xa000001->NXM_OF_IP_DST[[]],CONTROLLER:65535 |
2566 | cookie=0xd, n_packets=3, n_bytes=186, dl_src=60:66:66:66:00:03 actions=pop_mpls:0x0800,move:NXM_OF_IP_DST[[]]->NXM_OF_IP_SRC[[]],CONTROLLER:65535 | |
2567 | cookie=0xd, n_packets=3, n_bytes=186, dl_src=60:66:66:66:00:04 actions=pop_mpls:0x0800,push:NXM_OF_IP_DST[[]],pop:NXM_OF_IP_SRC[[]],CONTROLLER:65535 | |
2568 | cookie=0xd, n_packets=3, n_bytes=186, dl_src=60:66:66:66:00:05 actions=pop_mpls:0x0800,multipath(eth_src,50,modulo_n,256,0,NXM_OF_IP_SRC[[0..7]]),CONTROLLER:65535 | |
2569 | cookie=0xd, n_packets=3, n_bytes=186, dl_src=60:66:66:66:00:06 actions=pop_mpls:0x0800,bundle_load(eth_src,50,hrw,ofport,NXM_OF_IP_SRC[[0..15]],slaves:1,2),CONTROLLER:65535 | |
2570 | cookie=0xd, n_packets=3, n_bytes=186, dl_src=60:66:66:66:00:07 actions=pop_mpls:0x0800,learn(table=1,hard_timeout=60,eth_type=0x800,nw_proto=6,NXM_OF_IP_SRC[[]]=NXM_OF_IP_DST[[]]),CONTROLLER:65535 | |
e672ff9b | 2571 | cookie=0xd, n_packets=3, n_bytes=186, dl_src=60:66:66:66:00:09 actions=resubmit(,2),CONTROLLER:65535 |
1ffd16af SH |
2572 | cookie=0xd, n_packets=3, n_bytes=186, dl_src=60:66:66:66:00:0a actions=pop_mpls:0x0800,mod_nw_dst:10.0.0.1,CONTROLLER:65535 |
2573 | cookie=0xd, n_packets=3, n_bytes=186, dl_src=60:66:66:66:00:0b actions=pop_mpls:0x0800,mod_nw_src:10.0.0.1,CONTROLLER:65535 | |
cff78c88 | 2574 | cookie=0xd, n_packets=3, n_bytes=186, dl_src=60:66:66:66:66:66 actions=pop_mpls:0x0800,CONTROLLER:65535 |
1ffd16af SH |
2575 | cookie=0xd, n_packets=3, n_bytes=198, dl_src=60:66:66:66:01:00 actions=pop_mpls:0x8848,CONTROLLER:65535 |
2576 | cookie=0xd, n_packets=3, n_bytes=198, dl_src=60:66:66:66:01:01 actions=pop_mpls:0x8847,dec_mpls_ttl,CONTROLLER:65535 | |
2577 | cookie=0xd, n_packets=3, n_bytes=198, dl_src=60:66:66:66:01:02 actions=pop_mpls:0x8848,load:0x3->OXM_OF_MPLS_TC[[]],CONTROLLER:65535 | |
2578 | cookie=0xd, n_packets=3, n_bytes=198, dl_src=60:66:66:66:02:00 actions=pop_mpls:0x8847,pop_mpls:0x0800,CONTROLLER:65535 | |
1ffd16af | 2579 | cookie=0xd, table=1, n_packets=3, n_bytes=168, arp actions=CONTROLLER:65535 |
e672ff9b JR |
2580 | cookie=0xdeadbeef, table=2, n_packets=3, n_bytes=186, dl_src=60:66:66:66:00:09 actions=pop_mpls:0x0800,mod_nw_tos:48 |
2581 | cookie=0xe, n_packets=3, n_bytes=198, dl_src=60:66:66:66:02:01 actions=pop_mpls:0x8848,pop_mpls:0x0800,dec_ttl,CONTROLLER:65535 | |
2582 | cookie=0xe, n_packets=3, n_bytes=198, dl_src=60:66:66:66:02:10 actions=pop_mpls:0x8847,dec_mpls_ttl,pop_mpls:0x0800,dec_ttl,CONTROLLER:65535 | |
2583 | cookie=0xe, n_packets=3, n_bytes=210, dl_src=60:66:66:66:03:00 actions=pop_mpls:0x8848,pop_mpls:0x8848,CONTROLLER:65535 | |
2584 | cookie=0xe, n_packets=3, n_bytes=210, dl_src=60:66:66:66:03:01 actions=pop_mpls:0x8847,pop_mpls:0x8847,dec_mpls_ttl,CONTROLLER:65535 | |
2585 | cookie=0xe, n_packets=3, n_bytes=210, dl_src=60:66:66:66:03:10 actions=pop_mpls:0x8848,dec_mpls_ttl,pop_mpls:0x8848,dec_mpls_ttl,CONTROLLER:65535 | |
2586 | cookie=0xf, n_packets=3, n_bytes=186, dl_src=60:66:66:66:04:00 actions=pop_mpls:0x0800,push_mpls:0x8847,CONTROLLER:65535 | |
2587 | cookie=0xf, n_packets=3, n_bytes=186, dl_src=60:66:66:66:04:01 actions=pop_mpls:0x0800,push_mpls:0x8848,dec_mpls_ttl,CONTROLLER:65535 | |
2588 | cookie=0xf, n_packets=3, n_bytes=186, dl_src=60:66:66:66:04:10 actions=pop_mpls:0x0800,dec_ttl,push_mpls:0x8848,dec_mpls_ttl,CONTROLLER:65535 | |
ef0ce8ae | 2589 | NXST_FLOW reply: |
15056dc8 EJ |
2590 | ]) |
2591 | ||
2592 | OVS_VSWITCHD_STOP | |
8e9ce036 | 2593 | AT_CLEANUP |
04c956fc | 2594 | |
1ffd16af SH |
2595 | AT_SETUP([ofproto-dpif - MPLS handling with goto_table]) |
2596 | OVS_VSWITCHD_START([dnl | |
2597 | add-port br0 p1 -- set Interface p1 type=dummy | |
2598 | ]) | |
2599 | ON_EXIT([kill `cat ovs-ofctl.pid`]) | |
2600 | ||
2601 | AT_CAPTURE_FILE([ofctl_monitor.log]) | |
2602 | AT_DATA([flows.txt], [dnl | |
2603 | table=0 mplsm actions=pop_mpls:0x800,goto_table(1) | |
2604 | table=1 ip,ip_dscp=8 actions=controller | |
2605 | ]) | |
2606 | AT_CHECK([ovs-ofctl -O OpenFlow12 add-flows br0 flows.txt]) | |
2607 | ||
2608 | ||
2609 | dnl Modified MPLS pop action. | |
2610 | dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as: | |
2611 | dnl 60:66:66:66:00:08 > 50:54:00:00:00:01, ethertype MPLS multicast (0x8848), length 62: MPLS (label 20, exp 0, [S], ttl 32) | |
2612 | dnl (tos 0x20, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44) | |
2613 | dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4 | |
2614 | AT_CHECK([ovs-ofctl -O OpenFlow12 monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log]) | |
2615 | ||
2616 | for i in 1 2 3; do | |
2617 | ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 01 60 66 66 66 00 08 88 48 00 01 41 20 45 20 00 2c 00 00 00 00 ff 06 3a 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45' | |
2618 | done | |
2619 | OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6]) | |
2620 | OVS_APP_EXIT_AND_WAIT(ovs-ofctl) | |
2621 | ||
2622 | AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl | |
2623 | OFPT_PACKET_IN (OF1.2) (xid=0x0): table_id=1 total_len=58 in_port=1 (via action) data_len=58 (unbuffered) | |
e6d9ab56 | 2624 | tcp,vlan_tci=0x0000,dl_src=60:66:66:66:00:08,dl_dst=50:54:00:00:00:01,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=32,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744 |
1ffd16af SH |
2625 | dnl |
2626 | OFPT_PACKET_IN (OF1.2) (xid=0x0): table_id=1 total_len=58 in_port=1 (via action) data_len=58 (unbuffered) | |
e6d9ab56 | 2627 | tcp,vlan_tci=0x0000,dl_src=60:66:66:66:00:08,dl_dst=50:54:00:00:00:01,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=32,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744 |
1ffd16af SH |
2628 | dnl |
2629 | OFPT_PACKET_IN (OF1.2) (xid=0x0): table_id=1 total_len=58 in_port=1 (via action) data_len=58 (unbuffered) | |
e6d9ab56 | 2630 | tcp,vlan_tci=0x0000,dl_src=60:66:66:66:00:08,dl_dst=50:54:00:00:00:01,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=32,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744 |
1ffd16af SH |
2631 | ]) |
2632 | ||
cea4a6d7 | 2633 | AT_CHECK([ovs-appctl revalidator/purge], [0]) |
1ffd16af SH |
2634 | AT_CHECK([ovs-ofctl -O OpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl |
2635 | n_packets=3, n_bytes=186, mplsm actions=pop_mpls:0x0800,goto_table:1 | |
2636 | table=1, n_packets=3, n_bytes=174, ip,nw_tos=32 actions=CONTROLLER:65535 | |
2637 | OFPST_FLOW reply (OF1.2): | |
2638 | ]) | |
2639 | ||
2640 | OVS_VSWITCHD_STOP | |
2641 | AT_CLEANUP | |
2642 | ||
2643 | AT_SETUP([ofproto-dpif - MPLS handling with write_actions]) | |
2644 | OVS_VSWITCHD_START([dnl | |
2645 | add-port br0 p1 -- set Interface p1 type=dummy | |
2646 | ]) | |
2647 | ON_EXIT([kill `cat ovs-ofctl.pid`]) | |
2648 | ||
2649 | dnl N.B: The first (and only) action that accesses L3 data after the | |
2650 | dnl pop_mpls action is present in write_actions. This exercises recirculation | |
2651 | dnl triggered in write_actions due to a previous action not in write actions. | |
2652 | AT_CAPTURE_FILE([ofctl_monitor.log]) | |
2653 | AT_DATA([flows.txt], [dnl | |
2654 | mplsm actions=pop_mpls:0x800,write_actions(dec_ttl,controller) | |
2655 | ]) | |
2656 | AT_CHECK([ovs-ofctl -O OpenFlow12 add-flows br0 flows.txt]) | |
2657 | ||
2658 | dnl Modified MPLS pop action. | |
2659 | dnl The input is a frame with a single MPLS label stack entry which tcpdump -vve shows as: | |
2660 | dnl 60:66:66:66:00:08 > 50:54:00:00:00:01, ethertype MPLS multicast (0x8848), length 62: MPLS (label 20, exp 0, [S], ttl 32) | |
2661 | dnl (tos 0x20, ttl 255, id 0, offset 0, flags [none], proto TCP (6), length 44) | |
2662 | dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x77ec (correct), seq 42:46, win 10000, length 4 | |
2663 | AT_CHECK([ovs-ofctl -O OpenFlow12 monitor br0 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log]) | |
2664 | ||
2665 | for i in 1 2 3; do | |
2666 | ovs-appctl netdev-dummy/receive p1 '50 54 00 00 00 01 60 66 66 66 00 08 88 48 00 01 41 20 45 20 00 2c 00 00 00 00 ff 06 3a 78 c0 a8 00 01 c0 a8 00 02 00 50 00 00 00 00 00 2a 00 00 00 2a 50 00 27 10 77 44 00 00 48 4f 47 45' | |
2667 | done | |
2668 | OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6]) | |
2669 | OVS_APP_EXIT_AND_WAIT(ovs-ofctl) | |
2670 | ||
2671 | AT_CHECK([STRIP_METADATA ofctl_monitor.log], [0], [dnl | |
e672ff9b | 2672 | OFPT_PACKET_IN (OF1.2) (xid=0x0): total_len=58 in_port=1 (via action) data_len=58 (unbuffered) |
e6d9ab56 | 2673 | tcp,vlan_tci=0x0000,dl_src=60:66:66:66:00:08,dl_dst=50:54:00:00:00:01,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=32,nw_ecn=0,nw_ttl=254,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744 |
1ffd16af | 2674 | dnl |
e672ff9b | 2675 | OFPT_PACKET_IN (OF1.2) (xid=0x0): total_len=58 in_port=1 (via action) data_len=58 (unbuffered) |
e6d9ab56 | 2676 | tcp,vlan_tci=0x0000,dl_src=60:66:66:66:00:08,dl_dst=50:54:00:00:00:01,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=32,nw_ecn=0,nw_ttl=254,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744 |
1ffd16af | 2677 | dnl |
e672ff9b | 2678 | OFPT_PACKET_IN (OF1.2) (xid=0x0): total_len=58 in_port=1 (via action) data_len=58 (unbuffered) |
e6d9ab56 | 2679 | tcp,vlan_tci=0x0000,dl_src=60:66:66:66:00:08,dl_dst=50:54:00:00:00:01,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=32,nw_ecn=0,nw_ttl=254,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744 |
1ffd16af SH |
2680 | ]) |
2681 | ||
cea4a6d7 | 2682 | AT_CHECK([ovs-appctl revalidator/purge], [0]) |
1ffd16af SH |
2683 | AT_CHECK([ovs-ofctl -O OpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl |
2684 | n_packets=3, n_bytes=186, mplsm actions=pop_mpls:0x0800,write_actions(dec_ttl,CONTROLLER:65535) | |
2685 | OFPST_FLOW reply (OF1.2): | |
2686 | ]) | |
2687 | ||
2688 | OVS_VSWITCHD_STOP | |
2689 | AT_CLEANUP | |
527ae97e SH |
2690 | |
2691 | AT_SETUP([ofproto-dpif - table-miss flow (OpenFlow 1.0)]) | |
2692 | OVS_VSWITCHD_START([dnl | |
2693 | add-port br0 p1 -- set Interface p1 type=dummy | |
2694 | ]) | |
2695 | ON_EXIT([kill `cat ovs-ofctl.pid`]) | |
2696 | ||
2697 | AT_CAPTURE_FILE([ofctl_monitor.log]) | |
2698 | # A table-miss flow has priority 0 and no match | |
2699 | AT_CHECK([ovs-ofctl --protocols=OpenFlow10 add-flow br0 'priority=0 actions=output:CONTROLLER']) | |
2700 | ||
2701 | dnl Singleton controller action. | |
2702 | AT_CHECK([ovs-ofctl monitor -P openflow10 --protocols=OpenFlow10 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log]) | |
2703 | ||
2704 | for i in 1 2 3 ; do | |
2705 | ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=10:11:11:11:11:11,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=10),tcp_flags(0x002)' | |
2706 | done | |
2707 | OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6]) | |
2708 | ovs-appctl -t ovs-ofctl exit | |
2709 | ||
2710 | AT_CHECK([cat ofctl_monitor.log], [0], [dnl | |
2711 | OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via action) data_len=60 (unbuffered) | |
e6d9ab56 | 2712 | tcp,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:0 |
527ae97e SH |
2713 | dnl |
2714 | OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via action) data_len=60 (unbuffered) | |
e6d9ab56 | 2715 | tcp,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:0 |
527ae97e SH |
2716 | dnl |
2717 | OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=1 (via action) data_len=60 (unbuffered) | |
e6d9ab56 | 2718 | tcp,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:0 |
527ae97e SH |
2719 | ]) |
2720 | ||
cea4a6d7 | 2721 | AT_CHECK([ovs-appctl revalidator/purge], [0]) |
527ae97e SH |
2722 | AT_CHECK([ovs-ofctl --protocols=OpenFlow10 dump-flows br0 | ofctl_strip | sort], [0], [dnl |
2723 | n_packets=3, n_bytes=180, priority=0 actions=CONTROLLER:65535 | |
2724 | NXST_FLOW reply: | |
2725 | ]) | |
2726 | ||
2727 | OVS_VSWITCHD_STOP | |
2728 | AT_CLEANUP | |
2729 | ||
2730 | ||
2731 | AT_SETUP([ofproto-dpif - table-miss flow (OpenFlow 1.3)]) | |
2732 | OVS_VSWITCHD_START([dnl | |
2733 | add-port br0 p1 -- set Interface p1 type=dummy | |
2734 | ]) | |
2735 | ON_EXIT([kill `cat ovs-ofctl.pid`]) | |
2736 | ||
2737 | AT_CAPTURE_FILE([ofctl_monitor.log]) | |
2738 | # A table-miss flow has priority 0 and no match | |
2739 | AT_CHECK([ovs-ofctl --protocols=OpenFlow13 add-flow br0 'priority=0 actions=output:CONTROLLER']) | |
2740 | ||
2741 | dnl Singleton controller action. | |
2742 | AT_CHECK([ovs-ofctl monitor -P openflow10 --protocols=OpenFlow13 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log]) | |
2743 | ||
2744 | for i in 1 2 3 ; do | |
2745 | ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=10:11:11:11:11:11,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=10),tcp_flags(0x002)' | |
2746 | done | |
2747 | OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6]) | |
2748 | ovs-appctl -t ovs-ofctl exit | |
2749 | ||
2750 | AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore]) | |
2751 | ||
2752 | AT_CHECK([cat ofctl_monitor.log], [0], [dnl | |
2753 | OFPT_PACKET_IN (OF1.3) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered) | |
e6d9ab56 | 2754 | tcp,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:0 |
527ae97e SH |
2755 | dnl |
2756 | OFPT_PACKET_IN (OF1.3) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered) | |
e6d9ab56 | 2757 | tcp,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:0 |
527ae97e SH |
2758 | dnl |
2759 | OFPT_PACKET_IN (OF1.3) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered) | |
e6d9ab56 | 2760 | tcp,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:0 |
ba96552a SS |
2761 | ]) |
2762 | ||
cea4a6d7 | 2763 | AT_CHECK([ovs-appctl revalidator/purge], [0]) |
ba96552a SS |
2764 | AT_CHECK([ovs-ofctl --protocols=OpenFlow13 dump-flows br0 | ofctl_strip | sort], [0], [dnl |
2765 | n_packets=3, n_bytes=180, priority=0 actions=CONTROLLER:65535 | |
2766 | OFPST_FLOW reply (OF1.3): | |
2767 | ]) | |
2768 | ||
2769 | OVS_VSWITCHD_STOP | |
2770 | AT_CLEANUP | |
2771 | ||
2772 | AT_SETUP([ofproto-dpif - table-miss flow with async config (OpenFlow 1.3)]) | |
2773 | OVS_VSWITCHD_START([dnl | |
2774 | add-port br0 p1 -- set Interface p1 type=dummy | |
2775 | ]) | |
2776 | ON_EXIT([kill `cat ovs-ofctl.pid`]) | |
2777 | ||
5b7278a1 JS |
2778 | ovs-appctl time/stop |
2779 | ||
ba96552a SS |
2780 | AT_CAPTURE_FILE([ofctl_monitor.log]) |
2781 | # A table-miss flow has priority 0 and no match | |
2782 | AT_CHECK([ovs-ofctl --protocols=OpenFlow13 add-flow br0 'priority=0 actions=output:CONTROLLER']) | |
2783 | ||
2784 | dnl Singleton controller action. | |
2785 | AT_CHECK([ovs-ofctl monitor -P openflow10 --protocols=OpenFlow13 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log]) | |
2786 | ||
2787 | # Become slave (OF 1.3), which should disable everything except port status. | |
2788 | ovs-appctl -t ovs-ofctl ofctl/send 041800180000000200000003000000000000000000000001 | |
2789 | ||
5b7278a1 JS |
2790 | # Ensure that ovs-vswitchd gets a chance to reply before sending another command. |
2791 | ovs-appctl time/warp 500 100 | |
2792 | ||
ba96552a SS |
2793 | # Use OF 1.3 OFPT_SET_ASYNC to enable OFPR_NO_MATCH for slave only. |
2794 | ovs-appctl -t ovs-ofctl ofctl/send 041c002000000002000000000000000100000000000000000000000000000000 | |
2795 | ||
5b7278a1 | 2796 | ovs-appctl time/warp 500 100 |
ba96552a SS |
2797 | for i in 1 2 3 ; do |
2798 | ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=10:11:11:11:11:11,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=10),tcp_flags(0x002)' | |
2799 | done | |
2800 | OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6]) | |
2801 | ovs-appctl -t ovs-ofctl exit | |
2802 | ||
cea4a6d7 | 2803 | AT_CHECK([ovs-appctl revalidator/purge], [0]) |
ba96552a SS |
2804 | AT_CHECK([cat ofctl_monitor.log], [0], [dnl |
2805 | send: OFPT_ROLE_REQUEST (OF1.3) (xid=0x2): role=slave generation_id=1 | |
2806 | OFPT_ROLE_REPLY (OF1.3) (xid=0x2): role=slave generation_id=1 | |
2807 | dnl | |
2808 | send: OFPT_SET_ASYNC (OF1.3) (xid=0x2): | |
2809 | master: | |
2810 | PACKET_IN: (off) | |
2811 | PORT_STATUS: (off) | |
2812 | FLOW_REMOVED: (off) | |
2813 | ||
2814 | slave: | |
2815 | PACKET_IN: no_match | |
2816 | PORT_STATUS: (off) | |
2817 | FLOW_REMOVED: (off) | |
2818 | dnl | |
2819 | OFPT_PACKET_IN (OF1.3) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered) | |
e6d9ab56 | 2820 | tcp,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:0 |
ba96552a SS |
2821 | dnl |
2822 | OFPT_PACKET_IN (OF1.3) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered) | |
e6d9ab56 | 2823 | tcp,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:0 |
ba96552a SS |
2824 | dnl |
2825 | OFPT_PACKET_IN (OF1.3) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered) | |
e6d9ab56 | 2826 | tcp,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:0 |
527ae97e SH |
2827 | ]) |
2828 | ||
2829 | AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore]) | |
2830 | ||
2831 | AT_CHECK([ovs-ofctl --protocols=OpenFlow13 dump-flows br0 | ofctl_strip | sort], [0], [dnl | |
2832 | n_packets=3, n_bytes=180, priority=0 actions=CONTROLLER:65535 | |
2833 | OFPST_FLOW reply (OF1.3): | |
2834 | ]) | |
2835 | ||
2836 | OVS_VSWITCHD_STOP | |
2837 | AT_CLEANUP | |
2838 | ||
807c7989 SS |
2839 | |
2840 | AT_SETUP([ofproto-dpif - table-miss flow (OpenFlow 1.4)]) | |
2841 | OVS_VSWITCHD_START([dnl | |
2842 | add-port br0 p1 -- set Interface p1 type=dummy | |
2843 | ]) | |
2844 | ON_EXIT([kill `cat ovs-ofctl.pid`]) | |
2845 | ||
2846 | AT_CAPTURE_FILE([ofctl_monitor.log]) | |
2847 | # A table-miss flow has priority 0 and no match | |
2848 | AT_CHECK([ovs-ofctl --protocols=OpenFlow14 add-flow br0 'priority=0 actions=output:CONTROLLER']) | |
2849 | ||
2850 | dnl Singleton controller action. | |
2851 | AT_CHECK([ovs-ofctl monitor -P openflow10 --protocols=OpenFlow14 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log]) | |
2852 | ||
2853 | for i in 1 2 3 ; do | |
2854 | ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=10:11:11:11:11:11,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=10),tcp_flags(0x002)' | |
2855 | done | |
2856 | OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6]) | |
2857 | ovs-appctl -t ovs-ofctl exit | |
2858 | ||
cea4a6d7 | 2859 | AT_CHECK([ovs-appctl revalidator/purge], [0]) |
807c7989 SS |
2860 | AT_CHECK([cat ofctl_monitor.log], [0], [dnl |
2861 | OFPT_PACKET_IN (OF1.4) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered) | |
e6d9ab56 | 2862 | tcp,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:0 |
807c7989 SS |
2863 | dnl |
2864 | OFPT_PACKET_IN (OF1.4) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered) | |
e6d9ab56 | 2865 | tcp,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:0 |
807c7989 SS |
2866 | dnl |
2867 | OFPT_PACKET_IN (OF1.4) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via no_match) data_len=60 (unbuffered) | |
e6d9ab56 | 2868 | tcp,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:0 |
807c7989 SS |
2869 | ]) |
2870 | ||
2871 | AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore]) | |
2872 | ||
2873 | AT_CHECK([ovs-ofctl --protocols=OpenFlow14 dump-flows br0 | ofctl_strip | sort], [0], [dnl | |
2874 | n_packets=3, n_bytes=180, priority=0 actions=CONTROLLER:65535 | |
2875 | OFPST_FLOW reply (OF1.4): | |
2876 | ]) | |
2877 | ||
2878 | OVS_VSWITCHD_STOP | |
2879 | AT_CLEANUP | |
2880 | ||
2881 | ||
029ca940 | 2882 | AT_SETUP([ofproto-dpif - packet-in reasons (Openflow 1.3)]) |
3a11fd5b SS |
2883 | OVS_VSWITCHD_START([dnl |
2884 | add-port br0 p1 -- set Interface p1 type=dummy | |
2885 | ]) | |
2886 | ON_EXIT([kill `cat ovs-ofctl.pid`]) | |
2887 | ||
2888 | AT_CAPTURE_FILE([ofctl_monitor.log]) | |
029ca940 SS |
2889 | AT_DATA([flows.txt], [dnl |
2890 | table=0 in_port=1 actions=write_actions(output(CONTROLLER)),goto_table(1) | |
2891 | table=1 actions=output(CONTROLLER),goto_table(2) | |
2892 | table=2 actions=group:1234 | |
2893 | ]) | |
3a11fd5b | 2894 | AT_CHECK([ovs-ofctl --protocols=OpenFlow13 add-group br0 'group_id=1234,type=all,bucket=output:10,bucket=output:CONTROLLER']) |
029ca940 | 2895 | AT_CHECK([ovs-ofctl --protocols=OpenFlow13 add-flows br0 flows.txt]) |
3a11fd5b SS |
2896 | |
2897 | dnl Singleton controller action. | |
2898 | AT_CHECK([ovs-ofctl monitor -P openflow10 --protocols=OpenFlow13 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log]) | |
2899 | ||
2900 | for i in 1 2 3 ; do | |
2901 | ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=10:11:11:11:11:11,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=10),tcp_flags(0x002)' | |
2902 | done | |
2903 | OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6]) | |
2904 | ovs-appctl -t ovs-ofctl exit | |
2905 | ||
2906 | AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore]) | |
2907 | ||
2908 | AT_CHECK([cat ofctl_monitor.log], [0], [dnl | |
029ca940 | 2909 | OFPT_PACKET_IN (OF1.3) (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered) |
e6d9ab56 | 2910 | tcp,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:0 |
029ca940 SS |
2911 | dnl |
2912 | OFPT_PACKET_IN (OF1.3) (xid=0x0): table_id=2 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered) | |
e6d9ab56 | 2913 | tcp,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:0 |
029ca940 | 2914 | dnl |
3a11fd5b | 2915 | OFPT_PACKET_IN (OF1.3) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered) |
e6d9ab56 | 2916 | tcp,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:0 |
3a11fd5b | 2917 | dnl |
029ca940 | 2918 | OFPT_PACKET_IN (OF1.3) (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered) |
e6d9ab56 | 2919 | tcp,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:0 |
029ca940 SS |
2920 | dnl |
2921 | OFPT_PACKET_IN (OF1.3) (xid=0x0): table_id=2 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered) | |
e6d9ab56 | 2922 | tcp,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:0 |
029ca940 | 2923 | dnl |
3a11fd5b | 2924 | OFPT_PACKET_IN (OF1.3) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered) |
e6d9ab56 | 2925 | tcp,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:0 |
3a11fd5b | 2926 | dnl |
029ca940 | 2927 | OFPT_PACKET_IN (OF1.3) (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered) |
e6d9ab56 | 2928 | tcp,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:0 |
029ca940 SS |
2929 | dnl |
2930 | OFPT_PACKET_IN (OF1.3) (xid=0x0): table_id=2 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered) | |
e6d9ab56 | 2931 | tcp,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:0 |
029ca940 | 2932 | dnl |
3a11fd5b | 2933 | OFPT_PACKET_IN (OF1.3) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered) |
e6d9ab56 | 2934 | tcp,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:0 |
3a11fd5b SS |
2935 | ]) |
2936 | ||
2937 | AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore]) | |
2938 | ||
2939 | AT_CHECK([ovs-ofctl --protocols=OpenFlow13 dump-flows br0 | ofctl_strip | sort], [0], [dnl | |
029ca940 SS |
2940 | n_packets=3, n_bytes=180, in_port=1 actions=write_actions(CONTROLLER:65535),goto_table:1 |
2941 | table=1, n_packets=3, n_bytes=180, actions=CONTROLLER:65535,goto_table:2 | |
2942 | table=2, n_packets=3, n_bytes=180, actions=group:1234 | |
3a11fd5b SS |
2943 | OFPST_FLOW reply (OF1.3): |
2944 | ]) | |
2945 | ||
2946 | OVS_VSWITCHD_STOP | |
2947 | AT_CLEANUP | |
2948 | ||
2949 | ||
029ca940 | 2950 | AT_SETUP([ofproto-dpif - packet-in reasons (Openflow 1.4)]) |
3a11fd5b SS |
2951 | OVS_VSWITCHD_START([dnl |
2952 | add-port br0 p1 -- set Interface p1 type=dummy | |
2953 | ]) | |
2954 | ON_EXIT([kill `cat ovs-ofctl.pid`]) | |
2955 | ||
2956 | AT_CAPTURE_FILE([ofctl_monitor.log]) | |
029ca940 SS |
2957 | AT_DATA([flows.txt], [dnl |
2958 | table=0 in_port=1 actions=write_actions(output(CONTROLLER)),goto_table(1) | |
2959 | table=1 actions=output(CONTROLLER),goto_table(2) | |
2960 | table=2 actions=group:1234 | |
2961 | ]) | |
3a11fd5b | 2962 | AT_CHECK([ovs-ofctl --protocols=OpenFlow14 add-group br0 'group_id=1234,type=all,bucket=output:10,bucket=output:CONTROLLER']) |
029ca940 | 2963 | AT_CHECK([ovs-ofctl --protocols=OpenFlow14 add-flows br0 flows.txt]) |
3a11fd5b SS |
2964 | |
2965 | dnl Singleton controller action. | |
2966 | AT_CHECK([ovs-ofctl monitor -P openflow10 --protocols=OpenFlow14 br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log]) | |
2967 | ||
2968 | for i in 1 2 3 ; do | |
2969 | ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=10:11:11:11:11:11,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=8,dst=10),tcp_flags(0x002)' | |
2970 | done | |
2971 | OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6]) | |
2972 | ovs-appctl -t ovs-ofctl exit | |
2973 | ||
2974 | AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore]) | |
2975 | ||
2976 | AT_CHECK([cat ofctl_monitor.log], [0], [dnl | |
029ca940 | 2977 | OFPT_PACKET_IN (OF1.4) (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered) |
e6d9ab56 | 2978 | tcp,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:0 |
029ca940 SS |
2979 | dnl |
2980 | OFPT_PACKET_IN (OF1.4) (xid=0x0): table_id=2 cookie=0x0 total_len=60 in_port=1 (via group) data_len=60 (unbuffered) | |
e6d9ab56 | 2981 | tcp,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:0 |
029ca940 SS |
2982 | dnl |
2983 | OFPT_PACKET_IN (OF1.4) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via action_set) data_len=60 (unbuffered) | |
e6d9ab56 | 2984 | tcp,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:0 |
029ca940 SS |
2985 | dnl |
2986 | OFPT_PACKET_IN (OF1.4) (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered) | |
e6d9ab56 | 2987 | tcp,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:0 |
029ca940 SS |
2988 | dnl |
2989 | OFPT_PACKET_IN (OF1.4) (xid=0x0): table_id=2 cookie=0x0 total_len=60 in_port=1 (via group) data_len=60 (unbuffered) | |
e6d9ab56 | 2990 | tcp,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:0 |
029ca940 SS |
2991 | dnl |
2992 | OFPT_PACKET_IN (OF1.4) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via action_set) data_len=60 (unbuffered) | |
e6d9ab56 | 2993 | tcp,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:0 |
029ca940 SS |
2994 | dnl |
2995 | OFPT_PACKET_IN (OF1.4) (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered) | |
e6d9ab56 | 2996 | tcp,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:0 |
3a11fd5b | 2997 | dnl |
029ca940 | 2998 | OFPT_PACKET_IN (OF1.4) (xid=0x0): table_id=2 cookie=0x0 total_len=60 in_port=1 (via group) data_len=60 (unbuffered) |
e6d9ab56 | 2999 | tcp,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:0 |
3a11fd5b | 3000 | dnl |
029ca940 | 3001 | OFPT_PACKET_IN (OF1.4) (xid=0x0): cookie=0x0 total_len=60 in_port=1 (via action_set) data_len=60 (unbuffered) |
e6d9ab56 | 3002 | tcp,vlan_tci=0x0000,dl_src=10:11:11:11:11:11,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=8,tp_dst=10,tcp_flags=syn tcp_csum:0 |
3a11fd5b SS |
3003 | ]) |
3004 | ||
3005 | AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore]) | |
3006 | ||
3007 | AT_CHECK([ovs-ofctl --protocols=OpenFlow14 dump-flows br0 | ofctl_strip | sort], [0], [dnl | |
029ca940 SS |
3008 | n_packets=3, n_bytes=180, in_port=1 actions=write_actions(CONTROLLER:65535),goto_table:1 |
3009 | table=1, n_packets=3, n_bytes=180, actions=CONTROLLER:65535,goto_table:2 | |
3010 | table=2, n_packets=3, n_bytes=180, actions=group:1234 | |
3a11fd5b SS |
3011 | OFPST_FLOW reply (OF1.4): |
3012 | ]) | |
3013 | ||
3014 | OVS_VSWITCHD_STOP | |
3015 | AT_CLEANUP | |
3016 | ||
029ca940 | 3017 | |
f6c8a6b1 BP |
3018 | AT_SETUP([ofproto-dpif - ARP modification slow-path]) |
3019 | OVS_VSWITCHD_START | |
3020 | ADD_OF_PORTS([br0], [1], [2]) | |
3021 | ||
3022 | ovs-vsctl -- set Interface p2 type=dummy options:pcap=p2.pcap | |
3023 | ovs-ofctl add-flow br0 'in_port=1,arp actions=load:2->OXM_OF_ARP_OP[[]],2,load:0xc0a88001->OXM_OF_ARP_SPA[[]],2,load:0x404444444441->OXM_OF_ARP_THA[[]],2' | |
3024 | ||
3025 | # Input some packets that should follow the arp modification slow-path. | |
3026 | for i in 1 2 3; do | |
3027 | ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=80:88:88:88:88:88,dst=ff:ff:ff:ff:ff:ff),eth_type(0x0806),arp(sip=192.168.0.1,tip=192.168.0.2,op=1,sha=50:54:00:00:00:05,tha=00:00:00:00:00:00)' | |
3028 | done | |
3029 | AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore]) | |
3030 | ||
3031 | # Check the packets that were output. | |
3032 | AT_CHECK([ovs-ofctl parse-pcap p2.pcap], [0], [dnl | |
78c9486d JR |
3033 | arp,in_port=ANY,vlan_tci=0x0000,dl_src=80:88:88:88:88:88,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=192.168.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 |
3034 | arp,in_port=ANY,vlan_tci=0x0000,dl_src=80:88:88:88:88:88,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=192.168.128.1,arp_tpa=192.168.0.2,arp_op=2,arp_sha=50:54:00:00:00:05,arp_tha=00:00:00:00:00:00 | |
3035 | arp,in_port=ANY,vlan_tci=0x0000,dl_src=80:88:88:88:88:88,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=192.168.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 | |
3036 | arp,in_port=ANY,vlan_tci=0x0000,dl_src=80:88:88:88:88:88,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=192.168.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 | |
3037 | arp,in_port=ANY,vlan_tci=0x0000,dl_src=80:88:88:88:88:88,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=192.168.128.1,arp_tpa=192.168.0.2,arp_op=2,arp_sha=50:54:00:00:00:05,arp_tha=00:00:00:00:00:00 | |
3038 | arp,in_port=ANY,vlan_tci=0x0000,dl_src=80:88:88:88:88:88,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=192.168.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 | |
3039 | arp,in_port=ANY,vlan_tci=0x0000,dl_src=80:88:88:88:88:88,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=192.168.0.1,arp_tpa=192.168.0.2,arp_op=2,arp_sha=50:54:00:00:00:05,arp_tha=00:00:00:00:00:00 | |
3040 | arp,in_port=ANY,vlan_tci=0x0000,dl_src=80:88:88:88:88:88,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=192.168.128.1,arp_tpa=192.168.0.2,arp_op=2,arp_sha=50:54:00:00:00:05,arp_tha=00:00:00:00:00:00 | |
3041 | arp,in_port=ANY,vlan_tci=0x0000,dl_src=80:88:88:88:88:88,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=192.168.128.1,arp_tpa=192.168.0.2,arp_op=2,arp_sha=50:54:00:00:00:05,arp_tha=40:44:44:44:44:41 | |
f6c8a6b1 BP |
3042 | ]) |
3043 | ||
f6c8a6b1 BP |
3044 | OVS_VSWITCHD_STOP |
3045 | AT_CLEANUP | |
3046 | ||
ecac4ebf | 3047 | AT_SETUP([ofproto-dpif - VLAN handling]) |
04c956fc | 3048 | OVS_VSWITCHD_START( |
023e1e0a BP |
3049 | [set Bridge br0 fail-mode=standalone -- \ |
3050 | add-port br0 p1 trunks=10,12 -- \ | |
ecac4ebf | 3051 | add-port br0 p2 tag=10 -- \ |
5e9ceccd BP |
3052 | add-port br0 p3 tag=12 \ |
3053 | other-config:priority-tags=true -- \ | |
ecac4ebf BP |
3054 | add-port br0 p4 tag=12 -- \ |
3055 | add-port br0 p5 vlan_mode=native-tagged tag=10 -- \ | |
3056 | add-port br0 p6 vlan_mode=native-tagged tag=10 trunks=10,12 -- \ | |
3057 | add-port br0 p7 vlan_mode=native-untagged tag=12 -- \ | |
5e9ceccd BP |
3058 | add-port br0 p8 vlan_mode=native-untagged tag=12 trunks=10,12 \ |
3059 | other-config:priority-tags=true -- \ | |
ecac4ebf BP |
3060 | set Interface p1 type=dummy -- \ |
3061 | set Interface p2 type=dummy -- \ | |
3062 | set Interface p3 type=dummy -- \ | |
3063 | set Interface p4 type=dummy -- \ | |
3064 | set Interface p5 type=dummy -- \ | |
3065 | set Interface p6 type=dummy -- \ | |
3066 | set Interface p7 type=dummy -- \ | |
3067 | set Interface p8 type=dummy --]) | |
04c956fc | 3068 | |
247527db BP |
3069 | dnl Each of these specifies an in_port by number, a VLAN VID (or "none"), |
3070 | dnl a VLAN PCP (used if the VID isn't "none") and the expected set of datapath | |
ecac4ebf | 3071 | dnl actions. |
04c956fc | 3072 | for tuple in \ |
e44768b7 JP |
3073 | "100 none 0 drop" \ |
3074 | "100 0 0 drop" \ | |
3075 | "100 0 1 drop" \ | |
3076 | "100 10 0 1,5,6,7,8,pop_vlan,2" \ | |
3077 | "100 10 1 1,5,6,7,8,pop_vlan,2" \ | |
3078 | "100 11 0 5,7" \ | |
3079 | "100 11 1 5,7" \ | |
3080 | "100 12 0 1,5,6,pop_vlan,3,4,7,8" \ | |
3081 | "100 12 1 1,5,6,pop_vlan,4,7,push_vlan(vid=0,pcp=1),3,8" \ | |
247527db BP |
3082 | "1 none 0 drop" \ |
3083 | "1 0 0 drop" \ | |
3084 | "1 0 1 drop" \ | |
e44768b7 JP |
3085 | "1 10 0 5,6,7,8,100,pop_vlan,2" \ |
3086 | "1 10 1 5,6,7,8,100,pop_vlan,2" \ | |
247527db BP |
3087 | "1 11 0 drop" \ |
3088 | "1 11 1 drop" \ | |
e44768b7 JP |
3089 | "1 12 0 5,6,100,pop_vlan,3,4,7,8" \ |
3090 | "1 12 1 5,6,100,pop_vlan,4,7,push_vlan(vid=0,pcp=1),3,8" \ | |
3091 | "2 none 0 push_vlan(vid=10,pcp=0),1,5,6,7,8,100" \ | |
3092 | "2 0 0 pop_vlan,push_vlan(vid=10,pcp=0),1,5,6,7,8,100" \ | |
3093 | "2 0 1 pop_vlan,push_vlan(vid=10,pcp=1),1,5,6,7,8,100" \ | |
247527db BP |
3094 | "2 10 0 drop" \ |
3095 | "2 10 1 drop" \ | |
3096 | "2 11 0 drop" \ | |
3097 | "2 11 1 drop" \ | |
3098 | "2 12 0 drop" \ | |
3099 | "2 12 1 drop" \ | |
e44768b7 JP |
3100 | "3 none 0 4,7,8,push_vlan(vid=12,pcp=0),1,5,6,100" \ |
3101 | "3 0 0 pop_vlan,4,7,8,push_vlan(vid=12,pcp=0),1,5,6,100" \ | |
3102 | "3 0 1 8,pop_vlan,4,7,push_vlan(vid=12,pcp=1),1,5,6,100" \ | |
247527db BP |
3103 | "3 10 0 drop" \ |
3104 | "3 10 1 drop" \ | |
3105 | "3 11 0 drop" \ | |
3106 | "3 11 1 drop" \ | |
3107 | "3 12 0 drop" \ | |
3108 | "3 12 1 drop" \ | |
e44768b7 JP |
3109 | "4 none 0 3,7,8,push_vlan(vid=12,pcp=0),1,5,6,100" \ |
3110 | "4 0 0 pop_vlan,3,7,8,push_vlan(vid=12,pcp=0),1,5,6,100" \ | |
3111 | "4 0 1 3,8,pop_vlan,7,push_vlan(vid=12,pcp=1),1,5,6,100" \ | |
247527db BP |
3112 | "4 10 0 drop" \ |
3113 | "4 10 1 drop" \ | |
3114 | "4 11 0 drop" \ | |
3115 | "4 11 1 drop" \ | |
3116 | "4 12 0 drop" \ | |
3117 | "4 12 1 drop" \ | |
e44768b7 JP |
3118 | "5 none 0 2,push_vlan(vid=10,pcp=0),1,6,7,8,100" \ |
3119 | "5 0 0 pop_vlan,2,push_vlan(vid=10,pcp=0),1,6,7,8,100" \ | |
3120 | "5 0 1 pop_vlan,2,push_vlan(vid=10,pcp=1),1,6,7,8,100" \ | |
3121 | "5 10 0 1,6,7,8,100,pop_vlan,2" \ | |
3122 | "5 10 1 1,6,7,8,100,pop_vlan,2" \ | |
3123 | "5 11 0 7,100" \ | |
3124 | "5 11 1 7,100" \ | |
3125 | "5 12 0 1,6,100,pop_vlan,3,4,7,8" \ | |
3126 | "5 12 1 1,6,100,pop_vlan,4,7,push_vlan(vid=0,pcp=1),3,8" \ | |
3127 | "6 none 0 2,push_vlan(vid=10,pcp=0),1,5,7,8,100" \ | |
3128 | "6 0 0 pop_vlan,2,push_vlan(vid=10,pcp=0),1,5,7,8,100" \ | |
3129 | "6 0 1 pop_vlan,2,push_vlan(vid=10,pcp=1),1,5,7,8,100" \ | |
3130 | "6 10 0 1,5,7,8,100,pop_vlan,2" \ | |
3131 | "6 10 1 1,5,7,8,100,pop_vlan,2" \ | |
247527db BP |
3132 | "6 11 0 drop" \ |
3133 | "6 11 1 drop" \ | |
e44768b7 JP |
3134 | "6 12 0 1,5,100,pop_vlan,3,4,7,8" \ |
3135 | "6 12 1 1,5,100,pop_vlan,4,7,push_vlan(vid=0,pcp=1),3,8" \ | |
3136 | "7 none 0 3,4,8,push_vlan(vid=12,pcp=0),1,5,6,100" \ | |
3137 | "7 0 0 pop_vlan,3,4,8,push_vlan(vid=12,pcp=0),1,5,6,100" \ | |
3138 | "7 0 1 3,8,pop_vlan,4,push_vlan(vid=12,pcp=1),1,5,6,100" \ | |
3139 | "7 10 0 1,5,6,8,100,pop_vlan,2" \ | |
3140 | "7 10 1 1,5,6,8,100,pop_vlan,2" \ | |
3141 | "7 11 0 5,100" \ | |
3142 | "7 11 1 5,100" \ | |
3143 | "7 12 0 1,5,6,100,pop_vlan,3,4,8" \ | |
3144 | "7 12 1 1,5,6,100,pop_vlan,4,push_vlan(vid=0,pcp=1),3,8" \ | |
3145 | "8 none 0 3,4,7,push_vlan(vid=12,pcp=0),1,5,6,100" \ | |
3146 | "8 0 0 pop_vlan,3,4,7,push_vlan(vid=12,pcp=0),1,5,6,100" \ | |
3147 | "8 0 1 3,pop_vlan,4,7,push_vlan(vid=12,pcp=1),1,5,6,100" \ | |
3148 | "8 10 0 1,5,6,7,100,pop_vlan,2" \ | |
3149 | "8 10 1 1,5,6,7,100,pop_vlan,2" \ | |
247527db BP |
3150 | "8 11 0 drop" \ |
3151 | "8 11 1 drop" \ | |
e44768b7 JP |
3152 | "8 12 0 1,5,6,100,pop_vlan,3,4,7" \ |
3153 | "8 12 1 1,5,6,100,pop_vlan,4,7,push_vlan(vid=0,pcp=1),3" | |
04c956fc BP |
3154 | do |
3155 | set $tuple | |
3156 | in_port=$1 | |
3157 | vlan=$2 | |
ecac4ebf BP |
3158 | pcp=$3 |
3159 | expected=$4 | |
04c956fc BP |
3160 | |
3161 | if test $vlan = none; then | |
247527db | 3162 | flow="in_port($in_port),eth(src=50:54:00:00:00:01,dst=ff:ff:ff:ff:ff:ff),eth_type(0xabcd)" |
04c956fc | 3163 | else |
247527db | 3164 | 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))" |
04c956fc BP |
3165 | fi |
3166 | ||
395e68ce BP |
3167 | echo "----------------------------------------------------------------------" |
3168 | echo "in_port=$in_port vlan=$vlan pcp=$pcp" | |
3169 | ||
50aa28fd | 3170 | AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout]) |
ecac4ebf | 3171 | actual=`tail -1 stdout | sed 's/Datapath actions: //'` |
04c956fc | 3172 | |
247527db | 3173 | AT_CHECK([ovs-dpctl normalize-actions "$flow" "$expected"], [0], [stdout]) |
becffb86 | 3174 | mv stdout expout |
247527db | 3175 | AT_CHECK([ovs-dpctl normalize-actions "$flow" "$actual"], [0], [expout]) |
04c956fc BP |
3176 | done |
3177 | ||
3178 | OVS_VSWITCHD_STOP | |
3179 | AT_CLEANUP | |
7257b535 | 3180 | |
56879058 JS |
3181 | AT_SETUP([ofproto-dpif - MPLS handling]) |
3182 | OVS_VSWITCHD_START([dnl | |
3183 | add-port br0 p1 -- set Interface p1 type=dummy | |
3184 | ]) | |
3185 | ON_EXIT([kill `cat ovs-ofctl.pid`]) | |
3186 | ||
3187 | AT_CAPTURE_FILE([ofctl_monitor.log]) | |
3188 | AT_DATA([flows.txt], [dnl | |
3189 | dl_src=40:44:44:44:00:00 actions=push_mpls:0x8847,controller | |
63636ee8 | 3190 | dl_src=40:44:44:44:00:01,mpls actions=push_mpls:0x8847,controller |
0c1625e8 | 3191 | dl_src=40:44:44:44:00:02,mpls actions=push_mpls:0x8848,controller |
56879058 JS |
3192 | ]) |
3193 | AT_CHECK([ovs-ofctl --protocols=OpenFlow12 add-flows br0 flows.txt]) | |
3194 | ||
3195 | dnl In this test, we push an MPLS tag to an ethernet packet. | |
3196 | AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log]) | |
3197 | ||
3198 | for i in 1 2 3; do | |
3199 | ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=40:44:44:44:00:00,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no)' | |
3200 | done | |
62022172 | 3201 | OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3]) |
0c473314 | 3202 | OVS_APP_EXIT_AND_WAIT(ovs-ofctl) |
56879058 JS |
3203 | |
3204 | AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl | |
3205 | OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered) | |
e6d9ab56 | 3206 | mpls,vlan_tci=0x0000,dl_src=40:44:44:44:00:00,dl_dst=50:54:00:00:00:07,mpls_label=0,mpls_tc=0,mpls_ttl=64,mpls_bos=1 |
56879058 JS |
3207 | 00000000 50 54 00 00 00 07 40 44-44 44 00 00 88 47 00 00 |
3208 | 00000010 01 40 45 00 00 28 00 00-00 00 40 06 f9 7c c0 a8 | |
3209 | 00000020 00 01 c0 a8 00 02 00 00-00 00 00 00 00 00 00 00 | |
3210 | 00000030 00 00 50 00 00 00 00 00-00 00 00 00 00 00 00 00 | |
3211 | dnl | |
3212 | OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered) | |
e6d9ab56 | 3213 | mpls,vlan_tci=0x0000,dl_src=40:44:44:44:00:00,dl_dst=50:54:00:00:00:07,mpls_label=0,mpls_tc=0,mpls_ttl=64,mpls_bos=1 |
56879058 JS |
3214 | 00000000 50 54 00 00 00 07 40 44-44 44 00 00 88 47 00 00 |
3215 | 00000010 01 40 45 00 00 28 00 00-00 00 40 06 f9 7c c0 a8 | |
3216 | 00000020 00 01 c0 a8 00 02 00 00-00 00 00 00 00 00 00 00 | |
3217 | 00000030 00 00 50 00 00 00 00 00-00 00 00 00 00 00 00 00 | |
3218 | dnl | |
3219 | OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered) | |
e6d9ab56 | 3220 | mpls,vlan_tci=0x0000,dl_src=40:44:44:44:00:00,dl_dst=50:54:00:00:00:07,mpls_label=0,mpls_tc=0,mpls_ttl=64,mpls_bos=1 |
56879058 JS |
3221 | 00000000 50 54 00 00 00 07 40 44-44 44 00 00 88 47 00 00 |
3222 | 00000010 01 40 45 00 00 28 00 00-00 00 40 06 f9 7c c0 a8 | |
3223 | 00000020 00 01 c0 a8 00 02 00 00-00 00 00 00 00 00 00 00 | |
3224 | 00000030 00 00 50 00 00 00 00 00-00 00 00 00 00 00 00 00 | |
3225 | ]) | |
3226 | ||
63636ee8 JS |
3227 | dnl In this test, we push an MPLS tag to an MPLS packet. The LSE should be |
3228 | dnl copied exactly, except for the BOS bit. | |
3229 | AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log]) | |
3230 | ||
3231 | for i in 1 2 3; do | |
3232 | ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=40:44:44:44:00:01,dst=50:54:00:00:00:07),eth_type(0x8847),mpls(label=10,tc=0,ttl=64,bos=1)' | |
3233 | done | |
62022172 | 3234 | OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3]) |
0c473314 | 3235 | OVS_APP_EXIT_AND_WAIT(ovs-ofctl) |
63636ee8 JS |
3236 | |
3237 | AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl | |
3238 | OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered) | |
e6d9ab56 | 3239 | mpls,vlan_tci=0x0000,dl_src=40:44:44:44:00:01,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=0,mpls_lse1=41280 |
63636ee8 JS |
3240 | 00000000 50 54 00 00 00 07 40 44-44 44 00 01 88 47 00 00 |
3241 | 00000010 a0 40 00 00 a1 40 00 00-00 00 00 00 00 00 00 00 | |
3242 | 00000020 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 | |
3243 | 00000030 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 | |
3244 | dnl | |
3245 | OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered) | |
e6d9ab56 | 3246 | mpls,vlan_tci=0x0000,dl_src=40:44:44:44:00:01,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=0,mpls_lse1=41280 |
63636ee8 JS |
3247 | 00000000 50 54 00 00 00 07 40 44-44 44 00 01 88 47 00 00 |
3248 | 00000010 a0 40 00 00 a1 40 00 00-00 00 00 00 00 00 00 00 | |
3249 | 00000020 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 | |
3250 | 00000030 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 | |
3251 | dnl | |
3252 | OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered) | |
e6d9ab56 | 3253 | mpls,vlan_tci=0x0000,dl_src=40:44:44:44:00:01,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=0,mpls_lse1=41280 |
63636ee8 JS |
3254 | 00000000 50 54 00 00 00 07 40 44-44 44 00 01 88 47 00 00 |
3255 | 00000010 a0 40 00 00 a1 40 00 00-00 00 00 00 00 00 00 00 | |
3256 | 00000020 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 | |
0c1625e8 SH |
3257 | 00000030 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |
3258 | ]) | |
3259 | ||
3260 | dnl In this test, we push an MPLS tag to an MPLS packet. The LSE should be | |
3261 | dnl copied exactly, except for the BOS bit. The ethertype should be updated | |
3262 | dnl to the MPLS ethertype of the MPLS push action which differs to that | |
3263 | dnl of the input packet. | |
3264 | AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log]) | |
3265 | ||
3266 | for i in 1 2 3; do | |
3267 | ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=40:44:44:44:00:02,dst=50:54:00:00:00:07),eth_type(0x8847),mpls(label=10,tc=0,ttl=64,bos=1)' | |
3268 | done | |
62022172 | 3269 | OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3]) |
0c1625e8 SH |
3270 | OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit]) |
3271 | ||
3272 | AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl | |
3273 | OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered) | |
e6d9ab56 | 3274 | mplsm,vlan_tci=0x0000,dl_src=40:44:44:44:00:02,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=0,mpls_lse1=41280 |
0c1625e8 SH |
3275 | 00000000 50 54 00 00 00 07 40 44-44 44 00 02 88 48 00 00 |
3276 | 00000010 a0 40 00 00 a1 40 00 00-00 00 00 00 00 00 00 00 | |
3277 | 00000020 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 | |
3278 | 00000030 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 | |
3279 | dnl | |
3280 | OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered) | |
e6d9ab56 | 3281 | mplsm,vlan_tci=0x0000,dl_src=40:44:44:44:00:02,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=0,mpls_lse1=41280 |
0c1625e8 SH |
3282 | 00000000 50 54 00 00 00 07 40 44-44 44 00 02 88 48 00 00 |
3283 | 00000010 a0 40 00 00 a1 40 00 00-00 00 00 00 00 00 00 00 | |
3284 | 00000020 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 | |
3285 | 00000030 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 | |
3286 | dnl | |
3287 | OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered) | |
e6d9ab56 | 3288 | mplsm,vlan_tci=0x0000,dl_src=40:44:44:44:00:02,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=0,mpls_lse1=41280 |
0c1625e8 SH |
3289 | 00000000 50 54 00 00 00 07 40 44-44 44 00 02 88 48 00 00 |
3290 | 00000010 a0 40 00 00 a1 40 00 00-00 00 00 00 00 00 00 00 | |
3291 | 00000020 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 | |
63636ee8 JS |
3292 | 00000030 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |
3293 | ]) | |
3294 | ||
56879058 JS |
3295 | OVS_VSWITCHD_STOP |
3296 | AT_CLEANUP | |
3297 | ||
846e159a SH |
3298 | AT_SETUP([ofproto-dpif - VLAN+MPLS handling]) |
3299 | OVS_VSWITCHD_START([dnl | |
3300 | add-port br0 p1 -- set Interface p1 type=dummy | |
3301 | ]) | |
3302 | ON_EXIT([kill `cat ovs-ofctl.pid`]) | |
3303 | ||
3304 | AT_CAPTURE_FILE([ofctl_monitor.log]) | |
3305 | AT_DATA([flows.txt], [dnl | |
3306 | 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 | |
3307 | 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 | |
3308 | 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 | |
3309 | 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 | |
3310 | 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 | |
3311 | 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 | |
3312 | 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 | |
3313 | 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 | |
3314 | 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 | |
3315 | cookie=0xa dl_src=40:44:44:44:54:59,vlan_tci=0x1000/0x1000 actions=push_mpls:0x8847,load:10->OXM_OF_MPLS_LABEL[[]],set_vlan_pcp:1,load:99->OXM_OF_VLAN_VID[[]],controller | |
3316 | ]) | |
3317 | AT_CHECK([ovs-ofctl --protocols=OpenFlow12 add-flows br0 flows.txt]) | |
3318 | ||
3319 | dnl Modified MPLS controller action. | |
3320 | dnl In this test, we push the MPLS tag before pushing a VLAN tag, so we see | |
3321 | dnl both of these in the final flow | |
3322 | AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log]) | |
3323 | ||
3324 | for i in 1 2 3; do | |
3325 | ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=40:44:44:44:54:50,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no)' | |
3326 | done | |
62022172 | 3327 | OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3]) |
0c473314 | 3328 | OVS_APP_EXIT_AND_WAIT(ovs-ofctl) |
846e159a SH |
3329 | |
3330 | AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl | |
3331 | OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered) | |
e6d9ab56 | 3332 | mpls,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:54:50,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1 |
846e159a SH |
3333 | 00000000 50 54 00 00 00 07 40 44-44 44 54 50 81 00 20 63 |
3334 | 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06 | |
3335 | 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00 | |
3336 | 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00 | |
3337 | 00000040 00 00 00 00 | |
3338 | dnl | |
3339 | OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered) | |
e6d9ab56 | 3340 | mpls,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:54:50,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1 |
846e159a SH |
3341 | 00000000 50 54 00 00 00 07 40 44-44 44 54 50 81 00 20 63 |
3342 | 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06 | |
3343 | 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00 | |
3344 | 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00 | |
3345 | 00000040 00 00 00 00 | |
3346 | dnl | |
3347 | OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered) | |
e6d9ab56 | 3348 | mpls,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:54:50,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1 |
846e159a SH |
3349 | 00000000 50 54 00 00 00 07 40 44-44 44 54 50 81 00 20 63 |
3350 | 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06 | |
3351 | 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00 | |
3352 | 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00 | |
3353 | 00000040 00 00 00 00 | |
3354 | ]) | |
3355 | ||
3356 | dnl Modified MPLS controller action. | |
3357 | dnl In this test, the input packet in vlan-tagged, which should be stripped | |
3358 | dnl before we push the MPLS and VLAN tags. | |
3359 | AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log]) | |
3360 | ||
3361 | for i in 1 2 3; do | |
3362 | ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=40:44:44:44:54:51,dst=50:54:00:00:00:07),eth_type(0x8100),vlan(vid=88,pcp=7),encap(eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no))' | |
3363 | done | |
62022172 | 3364 | OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3]) |
0c473314 | 3365 | OVS_APP_EXIT_AND_WAIT(ovs-ofctl) |
846e159a SH |
3366 | |
3367 | AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl | |
3368 | OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered) | |
e6d9ab56 | 3369 | mpls,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:54:51,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1 |
846e159a SH |
3370 | 00000000 50 54 00 00 00 07 40 44-44 44 54 51 81 00 20 63 |
3371 | 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06 | |
3372 | 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00 | |
3373 | 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00 | |
3374 | dnl | |
3375 | OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered) | |
e6d9ab56 | 3376 | mpls,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:54:51,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1 |
846e159a SH |
3377 | 00000000 50 54 00 00 00 07 40 44-44 44 54 51 81 00 20 63 |
3378 | 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06 | |
3379 | 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00 | |
3380 | 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00 | |
3381 | dnl | |
3382 | OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered) | |
e6d9ab56 | 3383 | mpls,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:54:51,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1 |
846e159a SH |
3384 | 00000000 50 54 00 00 00 07 40 44-44 44 54 51 81 00 20 63 |
3385 | 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06 | |
3386 | 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00 | |
3387 | 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00 | |
3388 | ]) | |
3389 | ||
3390 | dnl Modified MPLS controller action. | |
3391 | dnl In this test, we push the MPLS tag before pushing a VLAN tag, so we see | |
3392 | dnl both of these in the final flow | |
3393 | AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log]) | |
3394 | ||
3395 | for i in 1 2 3; do | |
3396 | ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=40:44:44:44:54:52,dst=52:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no)' | |
3397 | done | |
62022172 | 3398 | OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3]) |
0c473314 | 3399 | OVS_APP_EXIT_AND_WAIT(ovs-ofctl) |
846e159a SH |
3400 | |
3401 | AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl | |
3402 | OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered) | |
e6d9ab56 | 3403 | mpls,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:54:52,dl_dst=52:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1 |
846e159a SH |
3404 | 00000000 52 54 00 00 00 07 40 44-44 44 54 52 81 00 20 63 |
3405 | 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06 | |
3406 | 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00 | |
3407 | 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00 | |
3408 | 00000040 00 00 00 00 | |
3409 | dnl | |
3410 | OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered) | |
e6d9ab56 | 3411 | mpls,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:54:52,dl_dst=52:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1 |
846e159a SH |
3412 | 00000000 52 54 00 00 00 07 40 44-44 44 54 52 81 00 20 63 |
3413 | 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06 | |
3414 | 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00 | |
3415 | 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00 | |
3416 | 00000040 00 00 00 00 | |
3417 | dnl | |
3418 | OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered) | |
e6d9ab56 | 3419 | mpls,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:54:52,dl_dst=52:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1 |
846e159a SH |
3420 | 00000000 52 54 00 00 00 07 40 44-44 44 54 52 81 00 20 63 |
3421 | 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06 | |
3422 | 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00 | |
3423 | 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00 | |
3424 | 00000040 00 00 00 00 | |
3425 | ]) | |
3426 | ||
3427 | dnl Modified MPLS controller action. | |
3428 | dnl In this test, the input packet in vlan-tagged, which should be stripped | |
3429 | dnl before we push the MPLS and VLAN tags. | |
3430 | AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log]) | |
3431 | ||
3432 | for i in 1 2 3; do | |
3433 | ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=40:44:44:44:54:53,dst=50:54:00:00:00:07),eth_type(0x8100),vlan(vid=88,pcp=7),encap(eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no))' | |
3434 | done | |
62022172 | 3435 | OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3]) |
0c473314 | 3436 | OVS_APP_EXIT_AND_WAIT(ovs-ofctl) |
846e159a SH |
3437 | |
3438 | AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl | |
3439 | OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered) | |
e6d9ab56 | 3440 | mpls,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:54:53,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1 |
846e159a SH |
3441 | 00000000 50 54 00 00 00 07 40 44-44 44 54 53 81 00 20 63 |
3442 | 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06 | |
3443 | 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00 | |
3444 | 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00 | |
3445 | dnl | |
3446 | OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered) | |
e6d9ab56 | 3447 | mpls,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:54:53,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1 |
846e159a SH |
3448 | 00000000 50 54 00 00 00 07 40 44-44 44 54 53 81 00 20 63 |
3449 | 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06 | |
3450 | 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00 | |
3451 | 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00 | |
3452 | dnl | |
3453 | OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered) | |
e6d9ab56 | 3454 | mpls,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:54:53,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1 |
846e159a SH |
3455 | 00000000 50 54 00 00 00 07 40 44-44 44 54 53 81 00 20 63 |
3456 | 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06 | |
3457 | 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00 | |
3458 | 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00 | |
3459 | ]) | |
3460 | ||
3461 | dnl Modified MPLS controller action. | |
3462 | dnl In this test, we push the VLAN tag before pushing a MPLS tag, but these | |
3463 | dnl actions are reordered, so we see both of these in the final flow. | |
3464 | AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log]) | |
3465 | ||
3466 | for i in 1 2 3; do | |
3467 | ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=40:44:44:44:54:54,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no)' | |
3468 | done | |
62022172 | 3469 | OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3]) |
0c473314 | 3470 | OVS_APP_EXIT_AND_WAIT(ovs-ofctl) |
846e159a SH |
3471 | |
3472 | AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl | |
3473 | OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered) | |
e6d9ab56 | 3474 | mpls,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:54:54,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1 |
846e159a SH |
3475 | 00000000 50 54 00 00 00 07 40 44-44 44 54 54 81 00 20 63 |
3476 | 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06 | |
3477 | 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00 | |
3478 | 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00 | |
3479 | 00000040 00 00 00 00 | |
3480 | dnl | |
3481 | OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered) | |
e6d9ab56 | 3482 | mpls,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:54:54,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1 |
846e159a SH |
3483 | 00000000 50 54 00 00 00 07 40 44-44 44 54 54 81 00 20 63 |
3484 | 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06 | |
3485 | 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00 | |
3486 | 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00 | |
3487 | 00000040 00 00 00 00 | |
3488 | dnl | |
3489 | OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered) | |
e6d9ab56 | 3490 | mpls,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:54:54,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1 |
846e159a SH |
3491 | 00000000 50 54 00 00 00 07 40 44-44 44 54 54 81 00 20 63 |
3492 | 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06 | |
3493 | 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00 | |
3494 | 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00 | |
3495 | 00000040 00 00 00 00 | |
3496 | ]) | |
3497 | ||
3498 | dnl Modified MPLS controller action. | |
3499 | dnl In this test, the input packet in vlan-tagged, which should be stripped | |
3500 | dnl before we push the MPLS and VLAN tags. | |
3501 | AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log]) | |
3502 | ||
3503 | for i in 1 2 3; do | |
3504 | ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=40:44:44:44:54:55,dst=50:54:00:00:00:07),eth_type(0x8100),vlan(vid=88,pcp=7),encap(eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no))' | |
3505 | done | |
62022172 | 3506 | OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3]) |
28ae2f37 | 3507 | OVS_APP_EXIT_AND_WAIT([ovs-ofctl]) |
846e159a SH |
3508 | |
3509 | AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl | |
3510 | OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered) | |
e6d9ab56 | 3511 | mpls,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:54:55,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1 |
846e159a SH |
3512 | 00000000 50 54 00 00 00 07 40 44-44 44 54 55 81 00 20 63 |
3513 | 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06 | |
3514 | 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00 | |
3515 | 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00 | |
3516 | dnl | |
3517 | OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered) | |
e6d9ab56 | 3518 | mpls,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:54:55,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1 |
846e159a SH |
3519 | 00000000 50 54 00 00 00 07 40 44-44 44 54 55 81 00 20 63 |
3520 | 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06 | |
3521 | 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00 | |
3522 | 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00 | |
3523 | dnl | |
3524 | OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered) | |
e6d9ab56 | 3525 | mpls,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:54:55,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1 |
846e159a SH |
3526 | 00000000 50 54 00 00 00 07 40 44-44 44 54 55 81 00 20 63 |
3527 | 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06 | |
3528 | 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00 | |
3529 | 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00 | |
3530 | ]) | |
3531 | ||
3532 | dnl Modified MPLS controller action. | |
3533 | dnl In this test, we push the VLAN tag before pushing a MPLS tag, but these | |
3534 | dnl actions are reordered, so we see both of these in the final flow. | |
3535 | AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log]) | |
3536 | ||
3537 | for i in 1 2 3; do | |
3538 | ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=40:44:44:44:54:56,dst=50:54:00:00:00:07),eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no)' | |
3539 | done | |
62022172 | 3540 | OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3]) |
0c473314 | 3541 | OVS_APP_EXIT_AND_WAIT(ovs-ofctl) |
846e159a SH |
3542 | |
3543 | AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl | |
3544 | OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered) | |
e6d9ab56 | 3545 | mpls,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:54:56,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1 |
846e159a SH |
3546 | 00000000 50 54 00 00 00 07 40 44-44 44 54 56 81 00 20 63 |
3547 | 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06 | |
3548 | 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00 | |
3549 | 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00 | |
3550 | 00000040 00 00 00 00 | |
3551 | dnl | |
3552 | OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered) | |
e6d9ab56 | 3553 | mpls,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:54:56,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1 |
846e159a SH |
3554 | 00000000 50 54 00 00 00 07 40 44-44 44 54 56 81 00 20 63 |
3555 | 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06 | |
3556 | 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00 | |
3557 | 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00 | |
3558 | 00000040 00 00 00 00 | |
3559 | dnl | |
3560 | OFPT_PACKET_IN (OF1.2): total_len=68 in_port=1 (via action) data_len=68 (unbuffered) | |
e6d9ab56 | 3561 | mpls,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:54:56,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1 |
846e159a SH |
3562 | 00000000 50 54 00 00 00 07 40 44-44 44 54 56 81 00 20 63 |
3563 | 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06 | |
3564 | 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00 | |
3565 | 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00 | |
3566 | 00000040 00 00 00 00 | |
3567 | ]) | |
3568 | ||
3569 | dnl Modified MPLS controller action. | |
3570 | dnl In this test, the input packet in vlan-tagged, which should be stripped | |
3571 | dnl before we push the MPLS and VLAN tags. | |
3572 | AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 -m 65534 -P nxm --detach --pidfile 2> ofctl_monitor.log]) | |
3573 | ||
3574 | for i in 1 2 3; do | |
3575 | ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=40:44:44:44:54:57,dst=50:54:00:00:00:07),eth_type(0x8100),vlan(vid=88,pcp=7),encap(eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no))' | |
3576 | done | |
62022172 | 3577 | OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3]) |
0c473314 | 3578 | OVS_APP_EXIT_AND_WAIT(ovs-ofctl) |
846e159a SH |
3579 | |
3580 | AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl | |
3581 | OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered) | |
e6d9ab56 | 3582 | mpls,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:54:57,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1 |
846e159a SH |
3583 | 00000000 50 54 00 00 00 07 40 44-44 44 54 57 81 00 20 63 |
3584 | 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06 | |
3585 | 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00 | |
3586 | 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00 | |
3587 | dnl | |
3588 | OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered) | |
e6d9ab56 | 3589 | mpls,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:54:57,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1 |
846e159a SH |
3590 | 00000000 50 54 00 00 00 07 40 44-44 44 54 57 81 00 20 63 |
3591 | 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06 | |
3592 | 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00 | |
3593 | 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00 | |
3594 | dnl | |
3595 | OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered) | |
e6d9ab56 | 3596 | mpls,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:54:57,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1 |
846e159a SH |
3597 | 00000000 50 54 00 00 00 07 40 44-44 44 54 57 81 00 20 63 |
3598 | 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06 | |
3599 | 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00 | |
3600 | 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00 | |
3601 | ]) | |
3602 | ||
3603 | dnl Modified MPLS controller action. | |
3604 | dnl In this test, the input packet in vlan-tagged, which should be stripped | |
3605 | dnl before we push the MPLS and VLAN tags. | |
3606 | AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log]) | |
3607 | ||
3608 | for i in 1 2 3; do | |
3609 | ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=40:44:44:44:54:58,dst=50:54:00:00:00:07),eth_type(0x8100),vlan(vid=88,pcp=7),encap(eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no))' | |
3610 | done | |
62022172 | 3611 | OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3]) |
0c473314 | 3612 | OVS_APP_EXIT_AND_WAIT(ovs-ofctl) |
846e159a SH |
3613 | |
3614 | AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl | |
3615 | OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered) | |
e6d9ab56 | 3616 | mpls,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:54:58,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1 |
846e159a SH |
3617 | 00000000 50 54 00 00 00 07 40 44-44 44 54 58 81 00 20 63 |
3618 | 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06 | |
3619 | 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00 | |
3620 | 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00 | |
3621 | dnl | |
3622 | OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered) | |
e6d9ab56 | 3623 | mpls,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:54:58,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1 |
846e159a SH |
3624 | 00000000 50 54 00 00 00 07 40 44-44 44 54 58 81 00 20 63 |
3625 | 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06 | |
3626 | 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00 | |
3627 | 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00 | |
3628 | dnl | |
3629 | OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered) | |
e6d9ab56 | 3630 | mpls,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:54:58,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1 |
846e159a SH |
3631 | 00000000 50 54 00 00 00 07 40 44-44 44 54 58 81 00 20 63 |
3632 | 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06 | |
3633 | 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00 | |
3634 | 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00 | |
3635 | ]) | |
3636 | ||
3637 | dnl Modified MPLS controller action. | |
3638 | dnl In this test, the input packet in vlan-tagged, which should be modified | |
3639 | dnl before we push MPLS and VLAN tags. | |
3640 | AT_CHECK([ovs-ofctl --protocols=OpenFlow12 monitor br0 65534 -m -P nxm --detach --pidfile 2> ofctl_monitor.log]) | |
3641 | ||
3642 | for i in 1 2 3; do | |
3643 | ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=40:44:44:44:54:59,dst=50:54:00:00:00:07),eth_type(0x8100),vlan(vid=88,pcp=7),encap(eth_type(0x0800),ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0,ttl=64,frag=no))' | |
3644 | done | |
62022172 | 3645 | OVS_WAIT_UNTIL([test `grep OFPT_PACKET_IN ofctl_monitor.log | wc -l` -ge 3]) |
846e159a SH |
3646 | ovs-appctl -t ovs-ofctl exit |
3647 | ||
3648 | AT_CHECK([cat ofctl_monitor.log | ofctl_strip], [0], [dnl | |
3649 | OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered) | |
e6d9ab56 | 3650 | mpls,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:54:59,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1 |
846e159a SH |
3651 | 00000000 50 54 00 00 00 07 40 44-44 44 54 59 81 00 20 63 |
3652 | 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06 | |
3653 | 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00 | |
3654 | 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00 | |
3655 | dnl | |
3656 | OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered) | |
e6d9ab56 | 3657 | mpls,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:54:59,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1 |
846e159a SH |
3658 | 00000000 50 54 00 00 00 07 40 44-44 44 54 59 81 00 20 63 |
3659 | 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06 | |
3660 | 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00 | |
3661 | 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00 | |
3662 | dnl | |
3663 | OFPT_PACKET_IN (OF1.2): total_len=64 in_port=1 (via action) data_len=64 (unbuffered) | |
e6d9ab56 | 3664 | mpls,dl_vlan=99,dl_vlan_pcp=1,dl_src=40:44:44:44:54:59,dl_dst=50:54:00:00:00:07,mpls_label=10,mpls_tc=0,mpls_ttl=64,mpls_bos=1 |
846e159a SH |
3665 | 00000000 50 54 00 00 00 07 40 44-44 44 54 59 81 00 20 63 |
3666 | 00000010 88 47 00 00 a1 40 45 00-00 28 00 00 00 00 40 06 | |
3667 | 00000020 f9 7c c0 a8 00 01 c0 a8-00 02 00 00 00 00 00 00 | |
3668 | 00000030 00 00 00 00 00 00 50 00-00 00 00 00 00 00 00 00 | |
3669 | ]) | |
3670 | ||
cea4a6d7 | 3671 | AT_CHECK([ovs-appctl revalidator/purge], [0]) |
846e159a SH |
3672 | AT_CHECK([ovs-ofctl --protocols=OpenFlow12 dump-flows br0 | ofctl_strip | sort], [0], [dnl |
3673 | 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 | |
3674 | 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 | |
3675 | 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 | |
3676 | 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 | |
3677 | 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 | |
3678 | 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 | |
3679 | 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 | |
3680 | 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 | |
3681 | 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 | |
3682 | 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 | |
3683 | OFPST_FLOW reply (OF1.2): | |
3684 | ]) | |
3685 | ||
3686 | OVS_VSWITCHD_STOP | |
3687 | AT_CLEANUP | |
3688 | ||
b8778a0d | 3689 | AT_SETUP([ofproto-dpif - fragment handling - trace]) |
023e1e0a | 3690 | OVS_VSWITCHD_START |
72d64e33 | 3691 | ADD_OF_PORTS([br0], [1], [2], [3], [4], [5], [6], [90]) |
7257b535 | 3692 | AT_DATA([flows.txt], [dnl |
12e4681c JR |
3693 | priority=75 tcp ip_frag=no tp_dst=80 actions=move:OXM_OF_TCP_DST[[]]->OXM_OF_TCP_SRC[[]],output:1 |
3694 | priority=75 tcp ip_frag=first tp_dst=80 actions=move:OXM_OF_TCP_DST[[]]->OXM_OF_TCP_SRC[[]],output:2 | |
12e4681c JR |
3695 | priority=50 tcp ip_frag=no actions=move:OXM_OF_TCP_DST[[]]->OXM_OF_TCP_SRC[[]],output:4 |
3696 | priority=50 tcp ip_frag=first actions=move:OXM_OF_TCP_DST[[]]->OXM_OF_TCP_SRC[[]],output:5 | |
b8778a0d | 3697 | priority=50 tcp ip_frag=later actions=output:6 |
7257b535 BP |
3698 | ]) |
3699 | AT_CHECK([ovs-ofctl replace-flows br0 flows.txt]) | |
3700 | ||
a61680c6 | 3701 | 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" |
7257b535 BP |
3702 | no_flow="$base_flow,frag=no),tcp(src=12345,dst=80)" |
3703 | first_flow="$base_flow,frag=first),tcp(src=12345,dst=80)" | |
3704 | later_flow="$base_flow,frag=later)" | |
3705 | ||
3706 | # mode no first later | |
3707 | for tuple in \ | |
3708 | 'normal 1 5 6' \ | |
3709 | 'drop 1 drop drop' \ | |
3710 | 'nx-match 1 2 6' | |
3711 | do | |
3712 | set $tuple | |
3713 | mode=$1 | |
3714 | no=$2 | |
3715 | first=$3 | |
3716 | later=$4 | |
3717 | ||
3718 | AT_CHECK([ovs-ofctl set-frags br0 $mode]) | |
3719 | for type in no first later; do | |
3720 | eval flow=\$${type}_flow exp_output=\$$type | |
7fd51d39 | 3721 | printf "\n%s\n" "----$mode $type-----" |
50aa28fd | 3722 | AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout]) |
7fd51d39 BP |
3723 | : > expout |
3724 | if test $mode = drop && test $type != no; then | |
3725 | echo 'Packets dropped because they are IP fragments and the fragment handling mode is "drop".' >> expout | |
12e4681c | 3726 | echo "Datapath actions: $exp_output" >> expout |
b8778a0d | 3727 | elif test $type = later; then |
12e4681c JR |
3728 | echo "Datapath actions: $exp_output" >> expout |
3729 | else | |
3730 | echo "Datapath actions: set(tcp(src=80,dst=80)),$exp_output" >> expout | |
7fd51d39 | 3731 | fi |
7fd51d39 | 3732 | AT_CHECK([grep 'IP fragments' stdout; tail -1 stdout], [0], [expout]) |
7257b535 BP |
3733 | done |
3734 | done | |
023e1e0a | 3735 | OVS_VSWITCHD_STOP |
7257b535 | 3736 | AT_CLEANUP |
848e8809 | 3737 | |
b8778a0d JR |
3738 | AT_SETUP([ofproto-dpif - fragment handling - upcall]) |
3739 | OVS_VSWITCHD_START | |
3740 | ADD_OF_PORTS([br0], [1], [2], [3], [4], [5], [6], [90]) | |
3741 | AT_DATA([flows.txt], [dnl | |
3742 | priority=75 tcp ip_frag=no tp_dst=80 actions=set_field:81->tcp_dst,output:1 | |
3743 | priority=75 tcp ip_frag=first tp_dst=80 actions=set_field:81->tcp_dst,output:2 | |
3744 | priority=50 tcp ip_frag=no actions=set_field:81->tcp_dst,output:4 | |
3745 | priority=50 tcp ip_frag=first actions=set_field:81->tcp_dst,output:5 | |
3746 | priority=50 tcp ip_frag=later actions=output:6 | |
3747 | ]) | |
3748 | AT_CHECK([ovs-ofctl replace-flows br0 flows.txt]) | |
3749 | ||
3750 | 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" | |
3751 | no_flow="$base_flow,frag=no),tcp(src=12345,dst=80)" | |
3752 | first_flow="$base_flow,frag=first),tcp(src=12345,dst=80)" | |
3753 | later_flow="$base_flow,frag=later)" | |
3754 | ||
3755 | AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg]) | |
3756 | ||
3757 | mode=normal | |
3758 | ||
3759 | AT_CHECK([ovs-ofctl set-frags br0 $mode]) | |
3760 | for type in no first later; do | |
3761 | eval flow=\$${type}_flow | |
3762 | printf "\n%s\n" "----$mode $type-----" | |
3763 | ||
3764 | AT_CHECK([ovs-appctl netdev-dummy/receive p90 "$flow"], [0], [stdout]) | |
3765 | done | |
3766 | ||
3767 | AT_CHECK([ovs-appctl dpctl/dump-flows], [0], [dnl | |
1c1e46ed | 3768 | flow-dump from non-dpdk interfaces: |
b8778a0d JR |
3769 | recirc_id(0),in_port(90),eth_type(0x0800),ipv4(proto=6,frag=no),tcp(dst=80), packets:0, bytes:0, used:never, actions:set(tcp(dst=81)),1 |
3770 | recirc_id(0),in_port(90),eth_type(0x0800),ipv4(proto=6,frag=first),tcp(dst=80), packets:0, bytes:0, used:never, actions:set(tcp(dst=81)),5 | |
3771 | recirc_id(0),in_port(90),eth_type(0x0800),ipv4(proto=6,frag=later), packets:0, bytes:0, used:never, actions:6 | |
3772 | ]) | |
3773 | ||
3774 | mode=drop | |
3775 | ||
98bb4286 | 3776 | AT_CHECK([ovs-appctl revalidator/purge], [0]) |
b8778a0d JR |
3777 | AT_CHECK([ovs-ofctl set-frags br0 $mode]) |
3778 | for type in no first later; do | |
3779 | eval flow=\$${type}_flow | |
3780 | printf "\n%s\n" "----$mode $type-----" | |
3781 | ||
3782 | AT_CHECK([ovs-appctl netdev-dummy/receive p90 "$flow"], [0], [stdout]) | |
3783 | done | |
3784 | ||
3785 | AT_CHECK([ovs-appctl dpctl/dump-flows], [0], [dnl | |
1c1e46ed | 3786 | flow-dump from non-dpdk interfaces: |
b8778a0d JR |
3787 | recirc_id(0),in_port(90),eth_type(0x0800),ipv4(proto=6,frag=no),tcp(dst=80), packets:0, bytes:0, used:never, actions:set(tcp(dst=81)),1 |
3788 | recirc_id(0),in_port(90),eth_type(0x0800),ipv4(frag=first), packets:0, bytes:0, used:never, actions:drop | |
3789 | recirc_id(0),in_port(90),eth_type(0x0800),ipv4(frag=later), packets:0, bytes:0, used:never, actions:drop | |
3790 | ]) | |
3791 | ||
3792 | mode=nx-match | |
3793 | ||
98bb4286 | 3794 | AT_CHECK([ovs-appctl revalidator/purge], [0]) |
b8778a0d JR |
3795 | AT_CHECK([ovs-ofctl set-frags br0 $mode]) |
3796 | for type in no first later; do | |
3797 | eval flow=\$${type}_flow | |
3798 | printf "\n%s\n" "----$mode $type-----" | |
3799 | ||
3800 | AT_CHECK([ovs-appctl netdev-dummy/receive p90 "$flow"], [0], [stdout]) | |
3801 | done | |
3802 | ||
3803 | AT_CHECK([ovs-appctl dpctl/dump-flows], [0], [dnl | |
1c1e46ed | 3804 | flow-dump from non-dpdk interfaces: |
b8778a0d JR |
3805 | recirc_id(0),in_port(90),eth_type(0x0800),ipv4(proto=6,frag=no),tcp(dst=80), packets:0, bytes:0, used:never, actions:set(tcp(dst=81)),1 |
3806 | recirc_id(0),in_port(90),eth_type(0x0800),ipv4(proto=6,frag=first),tcp(dst=80), packets:0, bytes:0, used:never, actions:set(tcp(dst=81)),2 | |
3807 | recirc_id(0),in_port(90),eth_type(0x0800),ipv4(proto=6,frag=later), packets:0, bytes:0, used:never, actions:6 | |
3808 | ]) | |
3809 | ||
3810 | OVS_VSWITCHD_STOP | |
3811 | AT_CLEANUP | |
3812 | ||
3813 | AT_SETUP([ofproto-dpif - fragment handling - actions]) | |
3814 | OVS_VSWITCHD_START | |
3815 | ADD_OF_PORTS([br0], [1], [2], [3], [4], [5], [6], [90]) | |
3816 | ||
3817 | AT_CHECK([ovs-ofctl add-flow br0 "tcp,ip_frag=later actions=move:OXM_OF_TCP_DST[[0..7]]->OXM_OF_TCP_SRC[[0..7]],output:1"], [1], [], [stderr]) | |
3818 | AT_CHECK([tail -2 stderr | sed 's/^.*|WARN|//'], [0], [dnl | |
3819 | source field tcp_dst lacks correct prerequisites | |
3820 | ovs-ofctl: actions are invalid with specified match (OFPBAC_MATCH_INCONSISTENT) | |
3821 | ]) | |
3822 | ||
3823 | AT_CHECK([ovs-ofctl -O OpenFlow15 add-flow br0 "tcp,ip_frag=later actions=move:OXM_OF_PKT_REG0[[0..7]]->OXM_OF_TCP_SRC[[0..7]],output:1"], [1], [], [stderr]) | |
3824 | AT_CHECK([tail -2 stderr | sed 's/^.*|WARN|//'], [0], [dnl | |
3825 | destination field tcp_src lacks correct prerequisites | |
3826 | ovs-ofctl: actions are invalid with specified match (OFPBAC_MATCH_INCONSISTENT) | |
3827 | ]) | |
3828 | ||
3829 | AT_CHECK([ovs-ofctl add-flow br0 "udp,ip_frag=later actions=set_field:8888->udp_src,output:1"], [1], [], [stderr]) | |
3830 | AT_CHECK([tail -2 stderr | sed 's/^.*|WARN|//'], [0], [dnl | |
3831 | set_field udp_src lacks correct prerequisities | |
3832 | ovs-ofctl: actions are invalid with specified match (OFPBAC_MATCH_INCONSISTENT) | |
3833 | ]) | |
3834 | ||
3835 | AT_CHECK([ovs-ofctl add-flow br0 "udp,ip_frag=later actions=load:8888->NXM_OF_UDP_DST[[]],output:1"], [1], [], [stderr]) | |
3836 | AT_CHECK([tail -2 stderr | sed 's/^.*|WARN|//'], [0], [dnl | |
3837 | set_field udp_dst lacks correct prerequisities | |
3838 | ovs-ofctl: actions are invalid with specified match (OFPBAC_MATCH_INCONSISTENT) | |
3839 | ]) | |
3840 | ||
3841 | AT_CHECK([ovs-ofctl add-flow br0 "sctp,ip_frag=later actions=set_field:8888->sctp_src,output:1"], [1], [], [stderr]) | |
3842 | AT_CHECK([tail -2 stderr | sed 's/^.*|WARN|//'], [0], [dnl | |
3843 | set_field sctp_src lacks correct prerequisities | |
3844 | ovs-ofctl: actions are invalid with specified match (OFPBAC_MATCH_INCONSISTENT) | |
3845 | ]) | |
3846 | ||
3847 | AT_CHECK([ovs-ofctl add-flow br0 "sctp,ip_frag=later actions=set_field:8888->sctp_dst,output:1"], [1], [], [stderr]) | |
3848 | AT_CHECK([tail -2 stderr | sed 's/^.*|WARN|//'], [0], [dnl | |
3849 | set_field sctp_dst lacks correct prerequisities | |
3850 | ovs-ofctl: actions are invalid with specified match (OFPBAC_MATCH_INCONSISTENT) | |
3851 | ]) | |
3852 | ||
3853 | AT_CHECK([ovs-ofctl add-flow br0 "tcp,ip_frag=later actions=learn(table=1,hard_timeout=60,eth_type=0x800,nw_proto=6,NXM_OF_IP_SRC[[]]=NXM_OF_IP_DST[[]],NXM_OF_TCP_SRC[[]]=NXM_OF_TCP_DST[[]],output:NXM_NX_REG0[[0..15]]),output:1"], [1], [], [stderr]) | |
3854 | AT_CHECK([tail -2 stderr | sed 's/^.*|WARN|//'], [0], [dnl | |
3855 | source field tcp_dst lacks correct prerequisites | |
3856 | ovs-ofctl: actions are invalid with specified match (OFPBAC_MATCH_INCONSISTENT) | |
3857 | ]) | |
3858 | ||
3859 | AT_DATA([flows.txt], [dnl | |
3860 | priority=75 tcp actions=load:42->OXM_OF_TCP_SRC[[0..7]],output:1 | |
3861 | ]) | |
3862 | AT_CHECK([ovs-ofctl -O OpenFlow12 replace-flows br0 flows.txt]) | |
3863 | ||
3864 | AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg]) | |
3865 | ||
3866 | mode=normal | |
3867 | ||
3868 | AT_CHECK([ovs-ofctl set-frags br0 $mode]) | |
3869 | for frag in 4000 6000 6008 4010; do | |
3870 | printf "\n%s\n" "----$mode $frag-----" | |
3871 | ||
3872 | AT_CHECK([ovs-appctl netdev-dummy/receive p90 "0021853763af 0026b98cb0f9 0800 4500 003c 2e24 $frag 40 06 465d ac11370d ac11370b 828b 0016 751e267b 00000000 a002 16d0 1736 0000 02 04 05 b4 04 02 08 0a 2d 25 08 5f 00 00 00 00 01 03 03 07"]) | |
3873 | done | |
3874 | ||
3875 | AT_CHECK([ovs-appctl dpctl/dump-flows | sed 's/used:[[0-9]].[[0-9]]*s/used:0.001s/'], [0], [dnl | |
1c1e46ed | 3876 | flow-dump from non-dpdk interfaces: |
b8778a0d JR |
3877 | recirc_id(0),in_port(90),eth_type(0x0800),ipv4(proto=6,frag=no),tcp(src=33419), packets:0, bytes:0, used:never, actions:set(tcp(src=33322)),1 |
3878 | recirc_id(0),in_port(90),eth_type(0x0800),ipv4(proto=6,frag=first),tcp(src=33419), packets:0, bytes:0, used:never, actions:set(tcp(src=33322)),1 | |
3879 | recirc_id(0),in_port(90),eth_type(0x0800),ipv4(proto=6,frag=later), packets:1, bytes:74, used:0.001s, actions:1 | |
3880 | ]) | |
3881 | ||
98bb4286 | 3882 | AT_CHECK([ovs-appctl revalidator/purge], [0]) |
b8778a0d JR |
3883 | AT_CHECK([ovs-ofctl set-frags br0 $mode]) |
3884 | for frag in 4000 6000 6008 4010; do | |
3885 | printf "\n%s\n" "----$mode $frag truncated transport header -----" | |
3886 | ||
3887 | AT_CHECK([ovs-appctl netdev-dummy/receive p90 "0021853763af 0026b98cb0f9 0800 4500 0018 2e24 $frag 40 06 465d ac11370d ac11370b 828b 0016"]) | |
3888 | done | |
3889 | ||
3890 | AT_CHECK([ovs-appctl dpctl/dump-flows | sed 's/used:[[0-9]].[[0-9]]*s/used:0.001s/'], [0], [dnl | |
1c1e46ed | 3891 | flow-dump from non-dpdk interfaces: |
b8778a0d JR |
3892 | recirc_id(0),in_port(90),eth_type(0x0800),ipv4(proto=6,frag=no),tcp(src=0), packets:0, bytes:0, used:never, actions:set(tcp(src=42)),1 |
3893 | recirc_id(0),in_port(90),eth_type(0x0800),ipv4(proto=6,frag=first),tcp(src=0), packets:0, bytes:0, used:never, actions:set(tcp(src=42)),1 | |
3894 | recirc_id(0),in_port(90),eth_type(0x0800),ipv4(proto=6,frag=later), packets:1, bytes:60, used:0.001s, actions:1 | |
3895 | ]) | |
3896 | ||
98bb4286 | 3897 | AT_CHECK([ovs-appctl revalidator/purge], [0]) |
b8778a0d JR |
3898 | AT_CHECK([ovs-ofctl set-frags br0 $mode]) |
3899 | for frag in 4000 6000 6001 4002; do | |
3900 | printf "\n%s\n" "----$mode $frag missing transport header-----" | |
3901 | ||
3902 | AT_CHECK([ovs-appctl netdev-dummy/receive p90 "0021853763af 0026b98cb0f9 0800 4500 0014 2e24 $frag 40 06 465d ac11370d ac11370b"]) | |
3903 | done | |
3904 | ||
3905 | AT_CHECK([ovs-appctl dpctl/dump-flows | sed 's/used:[[0-9]].[[0-9]]*s/used:0.001s/'], [0], [dnl | |
1c1e46ed | 3906 | flow-dump from non-dpdk interfaces: |
b8778a0d JR |
3907 | recirc_id(0),in_port(90),eth_type(0x0800),ipv4(proto=6,frag=no),tcp(src=0), packets:0, bytes:0, used:never, actions:set(tcp(src=42)),1 |
3908 | recirc_id(0),in_port(90),eth_type(0x0800),ipv4(proto=6,frag=first),tcp(src=0), packets:0, bytes:0, used:never, actions:set(tcp(src=42)),1 | |
3909 | recirc_id(0),in_port(90),eth_type(0x0800),ipv4(proto=6,frag=later), packets:1, bytes:60, used:0.001s, actions:1 | |
3910 | ]) | |
3911 | ||
3912 | OVS_VSWITCHD_STOP | |
3913 | AT_CLEANUP | |
3914 | ||
848e8809 EJ |
3915 | AT_SETUP([ofproto-dpif - exit]) |
3916 | OVS_VSWITCHD_START | |
f7b8e494 | 3917 | ADD_OF_PORTS([br0], [1], [2], [3], [10], [11], [12], [13], [14]) |
848e8809 EJ |
3918 | AT_DATA([flows.txt], [dnl |
3919 | in_port=1 actions=output:10,exit,output:11 | |
3920 | in_port=2 actions=output:12,resubmit:1,output:12 | |
3921 | in_port=3 actions=output:13,resubmit:2,output:14 | |
3922 | ]) | |
3923 | AT_CHECK([ovs-ofctl add-flows br0 flows.txt]) | |
50aa28fd | 3924 | 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]) |
848e8809 EJ |
3925 | AT_CHECK([tail -1 stdout], [0], |
3926 | [Datapath actions: 10 | |
3927 | ]) | |
50aa28fd | 3928 | 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]) |
848e8809 EJ |
3929 | AT_CHECK([tail -1 stdout], [0], |
3930 | [Datapath actions: 12,10 | |
3931 | ]) | |
50aa28fd | 3932 | 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]) |
848e8809 EJ |
3933 | AT_CHECK([tail -1 stdout], [0], |
3934 | [Datapath actions: 13,12,10 | |
3935 | ]) | |
3936 | OVS_VSWITCHD_STOP | |
3937 | AT_CLEANUP | |
c06bba01 JP |
3938 | |
3939 | ||
3940 | AT_SETUP([ofproto-dpif - mirroring, select_all]) | |
432fca23 BP |
3941 | OVS_VSWITCHD_START |
3942 | ADD_OF_PORTS([br0], 1, 2, 3) | |
3943 | ovs-vsctl \ | |
c06bba01 JP |
3944 | set Bridge br0 mirrors=@m --\ |
3945 | --id=@p3 get Port p3 --\ | |
432fca23 | 3946 | --id=@m create Mirror name=mymirror select_all=true output_port=@p3 |
c06bba01 | 3947 | |
c06bba01 JP |
3948 | AT_DATA([flows.txt], [dnl |
3949 | in_port=1 actions=output:2 | |
3950 | in_port=2 actions=output:1 | |
3951 | ]) | |
3952 | AT_CHECK([ovs-ofctl add-flows br0 flows.txt]) | |
3953 | ||
247527db | 3954 | 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)" |
50aa28fd | 3955 | AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout]) |
c06bba01 | 3956 | AT_CHECK_UNQUOTED([tail -1 stdout], [0], |
247527db | 3957 | [Datapath actions: 2,3 |
c06bba01 JP |
3958 | ]) |
3959 | ||
247527db | 3960 | 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)" |
50aa28fd | 3961 | AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout]) |
c06bba01 | 3962 | AT_CHECK_UNQUOTED([tail -1 stdout], [0], |
247527db | 3963 | [Datapath actions: 1,3 |
c06bba01 JP |
3964 | ]) |
3965 | ||
3966 | OVS_VSWITCHD_STOP | |
3967 | AT_CLEANUP | |
3968 | ||
3969 | ||
3970 | AT_SETUP([ofproto-dpif - mirroring, select_src]) | |
432fca23 BP |
3971 | OVS_VSWITCHD_START |
3972 | ADD_OF_PORTS([br0], 1, 2, 3) | |
3973 | ovs-vsctl \ | |
c06bba01 JP |
3974 | set Bridge br0 mirrors=@m --\ |
3975 | --id=@p1 get Port p1 -- --id=@p3 get Port p3 --\ | |
432fca23 | 3976 | --id=@m create Mirror name=mymirror select_src_port=@p1 output_port=@p3 |
c06bba01 | 3977 | |
c06bba01 JP |
3978 | AT_DATA([flows.txt], [dnl |
3979 | in_port=1 actions=output:2 | |
3980 | in_port=2 actions=output:1 | |
3981 | ]) | |
3982 | AT_CHECK([ovs-ofctl add-flows br0 flows.txt]) | |
3983 | ||
247527db | 3984 | 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)" |
50aa28fd | 3985 | AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout]) |
c06bba01 | 3986 | AT_CHECK_UNQUOTED([tail -1 stdout], [0], |
247527db | 3987 | [Datapath actions: 2,3 |
c06bba01 JP |
3988 | ]) |
3989 | ||
247527db | 3990 | 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)" |
50aa28fd | 3991 | AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout]) |
c06bba01 | 3992 | AT_CHECK_UNQUOTED([tail -1 stdout], [0], |
247527db | 3993 | [Datapath actions: 1 |
c06bba01 JP |
3994 | ]) |
3995 | OVS_VSWITCHD_STOP | |
3996 | AT_CLEANUP | |
3997 | ||
33158a18 | 3998 | AT_SETUP([ofproto-dpif - mirroring, OFPP_NONE ingress port]) |
432fca23 BP |
3999 | OVS_VSWITCHD_START |
4000 | ADD_OF_PORTS([br0], 1, 2) | |
4001 | ovs-vsctl \ | |
33158a18 JP |
4002 | set Bridge br0 mirrors=@m --\ |
4003 | --id=@p2 get Port p2 --\ | |
432fca23 | 4004 | --id=@m create Mirror name=mymirror select_all=true output_port=@p2 |
33158a18 | 4005 | |
33158a18 JP |
4006 | AT_CHECK([ovs-ofctl add-flow br0 action=output:1]) |
4007 | ||
4008 | # "in_port" defaults to OFPP_NONE if it's not specified. | |
72d64e33 | 4009 | 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" |
33158a18 JP |
4010 | AT_CHECK([ovs-appctl ofproto/trace br0 "$flow"], [0], [stdout]) |
4011 | AT_CHECK_UNQUOTED([tail -1 stdout], [0], | |
247527db | 4012 | [Datapath actions: 1,2 |
33158a18 JP |
4013 | ]) |
4014 | ||
4015 | OVS_VSWITCHD_STOP | |
4016 | AT_CLEANUP | |
4017 | ||
c06bba01 JP |
4018 | |
4019 | AT_SETUP([ofproto-dpif - mirroring, select_dst]) | |
432fca23 BP |
4020 | OVS_VSWITCHD_START |
4021 | ADD_OF_PORTS([br0], 1, 2, 3) | |
4022 | ovs-vsctl \ | |
c06bba01 JP |
4023 | set Bridge br0 mirrors=@m --\ |
4024 | --id=@p2 get Port p2 -- --id=@p3 get Port p3 --\ | |
432fca23 | 4025 | --id=@m create Mirror name=mymirror select_dst_port=@p2 output_port=@p3 |
c06bba01 | 4026 | |
c06bba01 JP |
4027 | AT_DATA([flows.txt], [dnl |
4028 | in_port=1 actions=output:2 | |
4029 | in_port=2 actions=output:1 | |
4030 | ]) | |
4031 | AT_CHECK([ovs-ofctl add-flows br0 flows.txt]) | |
4032 | ||
247527db | 4033 | 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)" |
50aa28fd | 4034 | AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout]) |
c06bba01 | 4035 | AT_CHECK_UNQUOTED([tail -1 stdout], [0], |
247527db | 4036 | [Datapath actions: 2,3 |
c06bba01 JP |
4037 | ]) |
4038 | ||
247527db | 4039 | 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)" |
50aa28fd | 4040 | AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout]) |
c06bba01 | 4041 | AT_CHECK_UNQUOTED([tail -1 stdout], [0], |
247527db | 4042 | [Datapath actions: 1 |
c06bba01 JP |
4043 | ]) |
4044 | ||
4045 | OVS_VSWITCHD_STOP | |
4046 | AT_CLEANUP | |
4047 | ||
4048 | ||
4049 | AT_SETUP([ofproto-dpif - mirroring, select_vlan]) | |
432fca23 BP |
4050 | OVS_VSWITCHD_START |
4051 | ADD_OF_PORTS([br0], 1, 2, 3) | |
4052 | ovs-vsctl \ | |
c06bba01 JP |
4053 | set Bridge br0 mirrors=@m --\ |
4054 | --id=@p2 get Port p2 -- --id=@p3 get Port p3 --\ | |
432fca23 | 4055 | --id=@m create Mirror name=mymirror select_all=true select_vlan=11 output_port=@p3 |
c06bba01 | 4056 | |
c06bba01 JP |
4057 | AT_DATA([flows.txt], [dnl |
4058 | in_port=1, actions=output:2 | |
4059 | ]) | |
4060 | AT_CHECK([ovs-ofctl add-flows br0 flows.txt]) | |
4061 | ||
247527db | 4062 | 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)" |
50aa28fd | 4063 | AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout]) |
c06bba01 | 4064 | AT_CHECK_UNQUOTED([tail -1 stdout], [0], |
247527db | 4065 | [Datapath actions: 2 |
c06bba01 JP |
4066 | ]) |
4067 | ||
247527db | 4068 | 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))" |
50aa28fd | 4069 | AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout]) |
c06bba01 | 4070 | AT_CHECK_UNQUOTED([tail -1 stdout], [0], |
247527db | 4071 | [Datapath actions: 2 |
c06bba01 JP |
4072 | ]) |
4073 | ||
247527db | 4074 | flow="in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x8100),vlan(vid=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))" |
50aa28fd | 4075 | AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout]) |
c06bba01 | 4076 | AT_CHECK_UNQUOTED([tail -1 stdout], [0], |
247527db | 4077 | [Datapath actions: 2,3 |
c06bba01 JP |
4078 | ]) |
4079 | ||
4080 | OVS_VSWITCHD_STOP | |
4081 | AT_CLEANUP | |
4082 | ||
4083 | ||
4084 | AT_SETUP([ofproto-dpif - mirroring, output_port]) | |
432fca23 BP |
4085 | OVS_VSWITCHD_START |
4086 | ADD_OF_PORTS([br0], 1, 2, 3) | |
4087 | ovs-vsctl \ | |
c06bba01 JP |
4088 | set Bridge br0 mirrors=@m --\ |
4089 | --id=@p3 get Port p3 --\ | |
432fca23 | 4090 | --id=@m create Mirror name=mymirror select_all=true output_port=@p3 |
c06bba01 | 4091 | |
c06bba01 JP |
4092 | AT_DATA([flows.txt], [dnl |
4093 | in_port=1 actions=mod_vlan_vid:17,output:2 | |
4094 | in_port=2 actions=output:1 | |
4095 | ]) | |
4096 | AT_CHECK([ovs-ofctl add-flows br0 flows.txt]) | |
4097 | ||
247527db | 4098 | 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)" |
50aa28fd | 4099 | AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout]) |
c06bba01 | 4100 | AT_CHECK_UNQUOTED([tail -1 stdout], [0], |
247527db | 4101 | [Datapath actions: push_vlan(vid=17,pcp=0),2,pop_vlan,3 |
c06bba01 JP |
4102 | ]) |
4103 | ||
247527db | 4104 | 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)" |
50aa28fd | 4105 | AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout]) |
c06bba01 | 4106 | AT_CHECK_UNQUOTED([tail -1 stdout], [0], |
247527db | 4107 | [Datapath actions: 1,3 |
c06bba01 JP |
4108 | ]) |
4109 | ||
4110 | OVS_VSWITCHD_STOP | |
4111 | AT_CLEANUP | |
4112 | ||
c06bba01 | 4113 | AT_SETUP([ofproto-dpif - mirroring, output_vlan]) |
432fca23 BP |
4114 | OVS_VSWITCHD_START |
4115 | ADD_OF_PORTS([br0], 1, 2) | |
4116 | ovs-vsctl \ | |
c06bba01 | 4117 | set Bridge br0 mirrors=@m --\ |
432fca23 | 4118 | --id=@m create Mirror name=mymirror select_all=true output_vlan=12 |
c06bba01 | 4119 | |
c06bba01 JP |
4120 | AT_DATA([flows.txt], [dnl |
4121 | in_port=1 actions=output:2 | |
4122 | in_port=2 actions=mod_vlan_vid:17,output:1 | |
4123 | ]) | |
4124 | AT_CHECK([ovs-ofctl add-flows br0 flows.txt]) | |
4125 | ||
247527db | 4126 | 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)" |
50aa28fd | 4127 | AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout]) |
c06bba01 JP |
4128 | actual=`tail -1 stdout | sed 's/Datapath actions: //'` |
4129 | ||
e44768b7 | 4130 | expected="2,push_vlan(vid=12,pcp=0),1,2,100" |
247527db | 4131 | AT_CHECK([ovs-dpctl normalize-actions "$flow" "$expected"], [0], [stdout]) |
c06bba01 | 4132 | mv stdout expout |
247527db | 4133 | AT_CHECK([ovs-dpctl normalize-actions "$flow" "$actual"], [0], [expout]) |
c06bba01 | 4134 | |
247527db | 4135 | 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)" |
50aa28fd | 4136 | AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$flow"], [0], [stdout]) |
c06bba01 JP |
4137 | actual=`tail -1 stdout | sed 's/Datapath actions: //'` |
4138 | ||
e44768b7 | 4139 | expected="push_vlan(vid=17,pcp=0),1,pop_vlan,push_vlan(vid=12,pcp=0),1,2,100" |
247527db | 4140 | AT_CHECK([ovs-dpctl normalize-actions "$flow" "$expected"], [0], [stdout]) |
c06bba01 | 4141 | mv stdout expout |
247527db | 4142 | AT_CHECK([ovs-dpctl normalize-actions "$flow" "$actual"], [0], [expout]) |
c06bba01 JP |
4143 | |
4144 | OVS_VSWITCHD_STOP | |
4145 | AT_CLEANUP | |
b44a10b7 | 4146 | |
22bb3cbc AW |
4147 | # Two testcases below are for the ofproto/trace command |
4148 | # The first one tests all correct syntax: | |
4149 | # ofproto/trace [dp_name] odp_flow [-generate|packet] | |
4150 | # ofproto/trace br_name br_flow [-generate|packet] | |
4151 | AT_SETUP([ofproto-dpif - ofproto/trace command 1]) | |
4152 | OVS_VSWITCHD_START([set bridge br0 fail-mode=standalone]) | |
4153 | ADD_OF_PORTS([br0], 1, 2, 3) | |
4154 | ||
4155 | AT_DATA([flows.txt], [dnl | |
4156 | in_port=1 actions=output:2 | |
4157 | in_port=2 actions=output:1 | |
4158 | ]) | |
4159 | AT_CHECK([ovs-ofctl add-flows br0 flows.txt]) | |
4160 | ||
e063a73a | 4161 | odp_flow="in_port(p1)" |
22bb3cbc | 4162 | br_flow="in_port=1" |
0a37839c GS |
4163 | # Test command: ofproto/trace odp_flow with in_port as a name. |
4164 | AT_CHECK([ovs-appctl ofproto/trace "$odp_flow"], [0], [stdout]) | |
4165 | AT_CHECK([tail -1 stdout], [0], [dnl | |
4166 | Datapath actions: 2 | |
4167 | ]) | |
4168 | ||
4169 | odp_flow="in_port(1)" | |
22bb3cbc AW |
4170 | # Test command: ofproto/trace odp_flow |
4171 | AT_CHECK([ovs-appctl ofproto/trace "$odp_flow"], [0], [stdout]) | |
4172 | AT_CHECK([tail -1 stdout], [0], [dnl | |
4173 | Datapath actions: 2 | |
4174 | ]) | |
4175 | ||
4176 | # Test command: ofproto/trace dp_name odp_flow | |
4177 | AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$odp_flow"], [0], [stdout]) | |
4178 | AT_CHECK([tail -1 stdout], [0], [dnl | |
4179 | Datapath actions: 2 | |
4180 | ]) | |
4181 | # Test commmand: ofproto/trace br_name br_flow | |
4182 | AT_CHECK([ovs-appctl ofproto/trace br0 "$br_flow"], [0], [stdout]) | |
4183 | AT_CHECK([tail -1 stdout], [0], [dnl | |
4184 | Datapath actions: 2 | |
4185 | ]) | |
4186 | ||
4187 | # Delete the inserted flows | |
4188 | AT_CHECK([ovs-ofctl del-flows br0 "in_port=1"], [0], [stdout]) | |
4189 | AT_CHECK([ovs-ofctl del-flows br0 "in_port=2"], [0], [stdout]) | |
4190 | ||
78c9486d | 4191 | # This section below tests the [-generate] option |
22bb3cbc | 4192 | odp_flow="in_port(3),eth(src=50:54:00:00:00:05,dst=ff:ff:ff:ff:ff:ff)" |
78c9486d | 4193 | br_flow="arp,in_port=3,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=ff:ff:ff:ff:ff:ff" |
22bb3cbc AW |
4194 | |
4195 | # Test command: ofproto/trace odp_flow | |
4196 | AT_CHECK([ovs-appctl ofproto/trace "$odp_flow"], [0], [stdout]) | |
4197 | # Check for no MAC learning entry | |
4198 | AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl | |
4199 | port VLAN MAC Age | |
4200 | ]) | |
4201 | ||
4202 | # Test command: ofproto/trace br_name br_flow | |
4203 | AT_CHECK([ovs-appctl ofproto/trace br0 "$br_flow"], [0], [stdout]) | |
4204 | # Check for no MAC learning entry | |
4205 | AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl | |
4206 | port VLAN MAC Age | |
4207 | ]) | |
4208 | ||
4209 | # Test command: ofproto/trace odp_flow -generate | |
4210 | AT_CHECK([ovs-appctl ofproto/trace "$odp_flow" -generate], [0], [stdout]) | |
4211 | # Check for the MAC learning entry | |
4212 | AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl | |
4213 | port VLAN MAC Age | |
4214 | 3 0 50:54:00:00:00:05 ? | |
4215 | ]) | |
4216 | ||
4217 | # Test command: ofproto/trace dp_name odp_flow -generate | |
4218 | AT_CHECK([ovs-appctl ofproto/trace ovs-dummy \ | |
4219 | "in_port(1),eth(src=50:54:00:00:00:06,dst=50:54:00:00:00:05)" \ | |
4220 | -generate], [0], [stdout]) | |
4221 | # Check for both MAC learning entries | |
4222 | AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl | |
4223 | port VLAN MAC Age | |
4224 | 3 0 50:54:00:00:00:05 ? | |
4225 | 1 0 50:54:00:00:00:06 ? | |
4226 | ]) | |
4227 | ||
4228 | # Test command: ofproto/trace br_name br_flow -generate | |
4229 | AT_CHECK([ovs-appctl ofproto/trace br0 \ | |
4230 | "in_port=2,dl_src=50:54:00:00:00:07,dl_dst=50:54:00:00:00:06" \ | |
4231 | -generate], [0], [stdout]) | |
4232 | # Check for both MAC learning entries. | |
4233 | AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl | |
4234 | port VLAN MAC Age | |
4235 | 3 0 50:54:00:00:00:05 ? | |
4236 | 1 0 50:54:00:00:00:06 ? | |
4237 | 2 0 50:54:00:00:00:07 ? | |
4238 | ]) | |
4239 | ||
4240 | # This section beflow tests the [packet] option | |
4241 | # The ovs-tcpundump of packets between port1 and port2 | |
4242 | pkt1to2="50540000000250540000000108064500001C000100004001F98CC0A80001C0A800020800F7FF00000000" | |
4243 | pkt2to1="50540000000150540000000208064500001C000100004001F98CC0A80002C0A800010800F7FF00000000" | |
4244 | ||
4245 | # Construct the MAC learning table | |
4246 | AT_CHECK([ovs-appctl ofproto/trace ovs-dummy \ | |
4247 | "in_port(1),eth(src=50:54:00:00:00:01,dst=ff:ff:ff:ff:ff:ff)" \ | |
4248 | -generate], [0], [stdout]) | |
4249 | ||
4250 | # Construct the MAC learning table | |
4251 | AT_CHECK([ovs-appctl ofproto/trace ovs-dummy \ | |
4252 | "in_port(2),eth(src=50:54:00:00:00:02,dst=ff:ff:ff:ff:ff:ff)" \ | |
4253 | -generate], [0], [stdout]) | |
4254 | ||
4255 | # Test command: ofproto/trace odp_flow packet | |
4256 | AT_CHECK([ovs-appctl ofproto/trace \ | |
4257 | "in_port(1),skb_priority(1),skb_mark(2)" "$pkt1to2"], [0], [stdout]) | |
4258 | AT_CHECK([tail -1 stdout], [0], [dnl | |
4259 | Datapath actions: 2 | |
4260 | ]) | |
b6f00895 | 4261 | AT_CHECK([head -n 2 stdout], [0], [dnl |
22bb3cbc | 4262 | Bridge: br0 |
78c9486d | 4263 | Flow: pkt_mark=0x2,skb_priority=0x1,arp,in_port=1,vlan_tci=0x0000,dl_src=50:54:00:00:00:01,dl_dst=50:54:00:00:00:02,arp_spa=0.0.0.0,arp_tpa=0.0.0.0,arp_op=0,arp_sha=00:00:00:00:00:00,arp_tha=00:00:00:00:00:00 |
22bb3cbc AW |
4264 | ]) |
4265 | ||
4266 | # Test command: ofproto/trace dp_name odp_flow packet | |
4267 | AT_CHECK([ovs-appctl ofproto/trace ovs-dummy \ | |
4268 | "in_port(1),skb_priority(1),skb_mark(2)" "$pkt1to2"], [0], [stdout]) | |
4269 | AT_CHECK([tail -1 stdout], [0], [dnl | |
4270 | Datapath actions: 2 | |
4271 | ]) | |
b6f00895 | 4272 | AT_CHECK([head -n 2 stdout], [0], [dnl |
22bb3cbc | 4273 | Bridge: br0 |
78c9486d | 4274 | Flow: pkt_mark=0x2,skb_priority=0x1,arp,in_port=1,vlan_tci=0x0000,dl_src=50:54:00:00:00:01,dl_dst=50:54:00:00:00:02,arp_spa=0.0.0.0,arp_tpa=0.0.0.0,arp_op=0,arp_sha=00:00:00:00:00:00,arp_tha=00:00:00:00:00:00 |
22bb3cbc AW |
4275 | ]) |
4276 | ||
4277 | # Test command: ofproto/trace br_name br_flow packet | |
4278 | AT_CHECK([ovs-appctl ofproto/trace br0 \ | |
1362e248 | 4279 | "in_port=2,skb_priority=2,pkt_mark=1" "$pkt2to1"], [0], [stdout],[stderr]) |
22bb3cbc | 4280 | AT_CHECK([tail -1 stdout], [0], [dnl |
ed2e7245 | 4281 | Datapath actions: 1 |
22bb3cbc AW |
4282 | ]) |
4283 | AT_CHECK([head -n 2 stdout], [0], [dnl | |
b6f00895 | 4284 | Bridge: br0 |
78c9486d | 4285 | Flow: pkt_mark=0x1,skb_priority=0x2,arp,in_port=2,vlan_tci=0x0000,dl_src=50:54:00:00:00:02,dl_dst=50:54:00:00:00:01,arp_spa=0.0.0.0,arp_tpa=0.0.0.0,arp_op=0,arp_sha=00:00:00:00:00:00,arp_tha=00:00:00:00:00:00 |
22bb3cbc AW |
4286 | ]) |
4287 | ||
4288 | OVS_VSWITCHD_STOP | |
4289 | AT_CLEANUP | |
4290 | ||
4291 | # The second test tests the corner cases | |
4292 | AT_SETUP([ofproto-dpif - ofproto/trace command 2]) | |
4293 | OVS_VSWITCHD_START | |
4294 | ADD_OF_PORTS([br0], 1, 2) | |
4295 | ||
4296 | # Define flows | |
4297 | odp_flow="in_port(1),eth(src=50:54:00:00:00:01,dst=50:54:00:00:00:02)" | |
4298 | br_flow="in_port=1,dl_src=50:54:00:00:00:01,dl_dst=50:54:00:00:00:02" | |
4299 | # Define options | |
4300 | generate="-generate" | |
4301 | pkt="50540000000250540000000108064500001C000100004001F98CC0A80001C0A800020800F7FF00000000" | |
4302 | ||
4303 | # Test incorrect command: ofproto/trace wrong_name odp_flow [-generate|packet] | |
4304 | m4_foreach( | |
4305 | [option], | |
4306 | [[], | |
4307 | ["$generate"], | |
4308 | ["$pkt"]], | |
4309 | [AT_CHECK([ovs-appctl ofproto/trace wrong_name "$odp_flow" option], | |
4310 | [2], [], [stderr]) | |
4311 | AT_CHECK([tail -2 stderr], [0], [dnl | |
0a37839c | 4312 | Cannot find the datapath |
22bb3cbc AW |
4313 | ovs-appctl: ovs-vswitchd: server returned an error |
4314 | ])]) | |
4315 | ||
4316 | # Test incorrect command: ofproto/trace empty_string odp_flow [-generate|packet] | |
4317 | m4_foreach( | |
4318 | [option], | |
4319 | [[], | |
4320 | ["$generate"], | |
4321 | ["$pkt"]], | |
4322 | [AT_CHECK([ovs-appctl ofproto/trace "" "$odp_flow" option], | |
4323 | [2], [], [stderr]) | |
4324 | AT_CHECK([tail -2 stderr], [0], [dnl | |
0a37839c | 4325 | Cannot find the datapath |
22bb3cbc AW |
4326 | ovs-appctl: ovs-vswitchd: server returned an error |
4327 | ])]) | |
4328 | ||
4329 | # Test incorrect command: ofproto/trace nonexist_dp_name odp_flow [-generate|packet] | |
4330 | m4_foreach( | |
4331 | [option], | |
4332 | [[], | |
4333 | ["$generate"], | |
4334 | ["$pkt"]], | |
4335 | [AT_CHECK([ovs-appctl ofproto/trace ovs-system "$odp_flow" option], | |
4336 | [2], [], [stderr]) | |
4337 | AT_CHECK([tail -2 stderr], [0], [dnl | |
0a37839c | 4338 | Cannot find the datapath |
22bb3cbc AW |
4339 | ovs-appctl: ovs-vswitchd: server returned an error |
4340 | ])]) | |
4341 | ||
4342 | # Test incorrect command: ofproto/trace br_name odp_flow [-generate|packet] | |
4343 | m4_foreach( | |
4344 | [option], | |
4345 | [[], | |
4346 | ["$generate"], | |
4347 | ["$pkt"]], | |
4348 | [AT_CHECK([ovs-appctl ofproto/trace br0 "$odp_flow" option], | |
4349 | [2], [], [stderr]) | |
4350 | AT_CHECK([tail -2 stderr], [0], [dnl | |
0a37839c | 4351 | Cannot find the datapath |
22bb3cbc AW |
4352 | ovs-appctl: ovs-vswitchd: server returned an error |
4353 | ])]) | |
4354 | ||
4355 | # Test incorrect command: ofproto/trace dp_name br_flow [-generate|packet] | |
4356 | m4_foreach( | |
4357 | [option], | |
4358 | [[], | |
4359 | ["$generate"], | |
4360 | ["$pkt"]], | |
4361 | [AT_CHECK([ovs-appctl ofproto/trace ovs-dummy "$br_flow" option], | |
4362 | [2], [], [stderr]) | |
4363 | AT_CHECK([tail -2 stderr], [0], [dnl | |
4364 | Unknown bridge name | |
4365 | ovs-appctl: ovs-vswitchd: server returned an error | |
4366 | ])]) | |
4367 | ||
4368 | # Test incorrect command: ofproto/trace br_flow [-generate|packet] | |
4369 | m4_foreach( | |
4370 | [option], | |
4371 | [[], | |
4372 | ["$generate"], | |
4373 | ["$pkt"]], | |
4374 | [AT_CHECK([ovs-appctl ofproto/trace "$br_flow" option], | |
4375 | [2], [], [stderr]) | |
4376 | AT_CHECK([tail -2 stderr], [0], [dnl | |
4377 | Must specify bridge name | |
4378 | ovs-appctl: ovs-vswitchd: server returned an error | |
4379 | ])]) | |
4380 | ||
4381 | # Test incorrect command: ofproto/trace dp_name odp_flow garbage_option | |
4382 | AT_CHECK([ovs-appctl ofproto/trace \ | |
4383 | ovs-dummy "$odp_flow" garbage_option], | |
4384 | [2], [stdout],[stderr]) | |
4385 | AT_CHECK([tail -2 stderr], [0], [dnl | |
4386 | Trailing garbage in packet data | |
4387 | ovs-appctl: ovs-vswitchd: server returned an error | |
4388 | ]) | |
4389 | ||
4390 | # Test incorrect command: ofproto/trace with 4 arguments | |
4391 | AT_CHECK([ovs-appctl ofproto/trace \ | |
4392 | arg1, arg2, arg3, arg4], [2], [stdout],[stderr]) | |
4393 | AT_CHECK([tail -2 stderr], [0], [dnl | |
4394 | "ofproto/trace" command takes at most 3 arguments | |
4395 | ovs-appctl: ovs-vswitchd: server returned an error | |
4396 | ]) | |
4397 | ||
4398 | # Test incorrect command: ofproto/trace with 0 argument | |
4399 | AT_CHECK([ovs-appctl ofproto/trace ], [2], [stdout],[stderr]) | |
4400 | AT_CHECK([tail -2 stderr], [0], [dnl | |
4401 | "ofproto/trace" command requires at least 1 arguments | |
4402 | ovs-appctl: ovs-vswitchd: server returned an error | |
4403 | ]) | |
4404 | ||
4405 | OVS_VSWITCHD_STOP | |
4406 | AT_CLEANUP | |
4407 | ||
b6ec827f JS |
4408 | # The third test checks that the output of "ovs-dpctl -m" is valid to trace. |
4409 | AT_SETUP([ofproto-dpif - ofproto/trace from dpctl output]) | |
4410 | OVS_VSWITCHD_START([dnl | |
4411 | set Open_vSwitch . other_config:max-idle=10000 \ | |
4412 | -- add-port br0 p1 -- set Interface p1 type=dummy]) | |
4413 | ||
4414 | 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)']) | |
4415 | ovs-appctl revalidator/wait | |
4416 | AT_CHECK([ovs-appctl dpif/dump-flows -m br0 | sed 's/, packets.*$//' > dp_flows1.txt]) | |
4417 | ||
4418 | odp_flow=`cat dp_flows1.txt` | |
4419 | AT_CHECK([ovs-appctl ofproto/trace "$odp_flow" | sed 's/\([[Ff]]low:\).*/\1 <cleared>/'], [0], [dnl | |
4420 | Bridge: br0 | |
4421 | Flow: <cleared> | |
4422 | No match, packets dropped because OFPPC_NO_PACKET_IN is set on in_port. | |
4423 | ||
4424 | Rule: table=254 cookie=0 priority=0,reg0=0x2 | |
4425 | OpenFlow actions=drop | |
4426 | ||
4427 | Final flow: <cleared> | |
4428 | Megaflow: <cleared> | |
4429 | Datapath actions: drop | |
4430 | ]) | |
4431 | ||
4432 | dnl Now, try again without megaflows: | |
4433 | ovs-appctl upcall/disable-megaflows | |
4434 | ||
4435 | 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)']) | |
4436 | ovs-appctl revalidator/wait | |
4437 | AT_CHECK([ovs-appctl dpif/dump-flows -m br0 | sed 's/, packets.*$//' > dp_flows2.txt]) | |
4438 | ||
4439 | odp_flow=`cat dp_flows2.txt` | |
4440 | AT_CHECK([ovs-appctl ofproto/trace "$odp_flow" | sed 's/\([[Ff]]low:\).*/\1 <cleared>/'], [0], [dnl | |
4441 | Bridge: br0 | |
4442 | Flow: <cleared> | |
4443 | No match, packets dropped because OFPPC_NO_PACKET_IN is set on in_port. | |
4444 | ||
4445 | Rule: table=254 cookie=0 priority=0,reg0=0x2 | |
4446 | OpenFlow actions=drop | |
4447 | ||
4448 | Final flow: <cleared> | |
4449 | Megaflow: <cleared> | |
4450 | Datapath actions: drop | |
4451 | ]) | |
4452 | ||
4453 | OVS_VSWITCHD_STOP | |
4454 | AT_CLEANUP | |
4455 | ||
aee0979b BP |
4456 | AT_SETUP([ofproto-dpif - ofproto/trace-packet-out]) |
4457 | OVS_VSWITCHD_START | |
4458 | ADD_OF_PORTS([br0], 1, 2, 3) | |
4459 | ||
4460 | AT_DATA([flows.txt], [dnl | |
4461 | in_port=1 actions=output:2 | |
4462 | in_port=2 actions=output:1 | |
4463 | ]) | |
4464 | AT_CHECK([ovs-ofctl add-flows br0 flows.txt]) | |
4465 | ||
4466 | AT_CHECK([ovs-appctl ofproto/trace-packet-out br0 in_port=1 'mod_vlan_vid:123,resubmit(,0)'], [0], [stdout]) | |
4467 | AT_CHECK([tail -1 stdout], [0], [dnl | |
4468 | Datapath actions: push_vlan(vid=123,pcp=0),2 | |
4469 | ]) | |
4470 | ||
4471 | OVS_VSWITCHD_STOP | |
4472 | AT_CLEANUP | |
4473 | ||
4474 | ||
b44a10b7 BP |
4475 | m4_define([OFPROTO_TRACE], |
4476 | [flow="$2" | |
4477 | AT_CHECK([ovs-appctl ofproto/trace $1 "$flow" $3], [0], [stdout]) | |
4478 | actual=`tail -1 stdout | sed 's/Datapath actions: //'` | |
4479 | expected="$4" | |
4480 | AT_CHECK([ovs-dpctl normalize-actions "$flow" "$expected" $5], | |
4481 | [0], [stdout]) | |
4482 | mv stdout expout | |
4483 | AT_CHECK([ovs-dpctl normalize-actions "$flow" "$actual" $5], | |
4484 | [0], [expout])]) | |
4485 | ||
4486 | AT_SETUP([ofproto-dpif - MAC learning]) | |
432fca23 BP |
4487 | OVS_VSWITCHD_START([set bridge br0 fail-mode=standalone]) |
4488 | ADD_OF_PORTS([br0], 1, 2, 3) | |
b44a10b7 | 4489 | |
b44a10b7 BP |
4490 | 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)' |
4491 | ||
4492 | # Trace an ARP packet arriving on p3, to create a MAC learning entry. | |
4493 | OFPROTO_TRACE( | |
50aa28fd | 4494 | [ovs-dummy], |
247527db | 4495 | [in_port(3),eth(src=50:54:00:00:00:05,dst=ff:ff:ff:ff:ff:ff),$arp], |
b44a10b7 | 4496 | [-generate], |
e44768b7 | 4497 | [1,2,100]) |
b44a10b7 BP |
4498 | |
4499 | # Check for the MAC learning entry. | |
83664f72 | 4500 | AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl |
b44a10b7 | 4501 | port VLAN MAC Age |
247527db | 4502 | 3 0 50:54:00:00:00:05 ? |
b44a10b7 BP |
4503 | ]) |
4504 | ||
4505 | # Trace a packet arrival destined for the learned MAC. | |
4506 | # (This will also learn a MAC.) | |
4507 | OFPROTO_TRACE( | |
50aa28fd | 4508 | [ovs-dummy], |
247527db | 4509 | [in_port(1),eth(src=50:54:00:00:00:06,dst=50:54:00:00:00:05),$arp], |
b44a10b7 | 4510 | [-generate], |
247527db | 4511 | [3]) |
b44a10b7 BP |
4512 | |
4513 | # Check for both MAC learning entries. | |
83664f72 | 4514 | AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl |
b44a10b7 | 4515 | port VLAN MAC Age |
247527db BP |
4516 | 3 0 50:54:00:00:00:05 ? |
4517 | 1 0 50:54:00:00:00:06 ? | |
b44a10b7 BP |
4518 | ]) |
4519 | ||
4520 | # Trace a packet arrival that updates the first learned MAC entry. | |
4521 | OFPROTO_TRACE( | |
50aa28fd | 4522 | [ovs-dummy], |
247527db | 4523 | [in_port(2),eth(src=50:54:00:00:00:05,dst=ff:ff:ff:ff:ff:ff),$arp], |
b44a10b7 | 4524 | [-generate], |
e44768b7 | 4525 | [1,3,100]) |
b44a10b7 BP |
4526 | |
4527 | # Check that the MAC learning entry was updated. | |
83664f72 | 4528 | AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl |
b44a10b7 | 4529 | port VLAN MAC Age |
247527db BP |
4530 | 1 0 50:54:00:00:00:06 ? |
4531 | 2 0 50:54:00:00:00:05 ? | |
b44a10b7 BP |
4532 | ]) |
4533 | ||
4534 | # Add another bridge. | |
4535 | AT_CHECK( | |
4536 | [ovs-vsctl \ | |
4537 | -- add-br br1 \ | |
ad28062f BP |
4538 | -- set bridge br1 datapath-type=dummy]) |
4539 | ADD_OF_PORTS([br1], 4, 5) | |
b44a10b7 BP |
4540 | |
4541 | # Trace some packet arrivals in br1 to create MAC learning entries there too. | |
4542 | OFPROTO_TRACE( | |
50aa28fd | 4543 | [ovs-dummy], |
247527db | 4544 | [in_port(4),eth(src=50:54:00:00:00:06,dst=ff:ff:ff:ff:ff:ff),$arp], |
b44a10b7 | 4545 | [-generate], |
e44768b7 | 4546 | [5,101]) |
b44a10b7 | 4547 | OFPROTO_TRACE( |
50aa28fd | 4548 | [ovs-dummy], |
247527db | 4549 | [in_port(5),eth(src=50:54:00:00:00:07,dst=ff:ff:ff:ff:ff:ff),$arp], |
b44a10b7 | 4550 | [-generate], |
e44768b7 | 4551 | [4,101]) |
b44a10b7 BP |
4552 | |
4553 | # Check that the MAC learning entries were added. | |
83664f72 | 4554 | AT_CHECK_UNQUOTED([ovs-appctl fdb/show br1 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl |
b44a10b7 | 4555 | port VLAN MAC Age |
247527db BP |
4556 | 4 0 50:54:00:00:00:06 ? |
4557 | 5 0 50:54:00:00:00:07 ? | |
b44a10b7 BP |
4558 | ]) |
4559 | ||
4560 | # Delete port p1 and see that its MAC learning entry disappeared, and | |
4561 | # that the MAC learning entry for the same MAC was also deleted from br1. | |
4562 | AT_CHECK([ovs-vsctl del-port p1]) | |
83664f72 | 4563 | AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl |
b44a10b7 | 4564 | port VLAN MAC Age |
247527db | 4565 | 2 0 50:54:00:00:00:05 ? |
b44a10b7 | 4566 | ]) |
83664f72 | 4567 | AT_CHECK_UNQUOTED([ovs-appctl fdb/show br1 | sed 's/[[0-9]]\{1,\}$/?/'], [0], [dnl |
b44a10b7 | 4568 | port VLAN MAC Age |
247527db | 4569 | 5 0 50:54:00:00:00:07 ? |
b44a10b7 BP |
4570 | ]) |
4571 | ||
4572 | OVS_VSWITCHD_STOP | |
4573 | AT_CLEANUP | |
17f7f7e0 | 4574 | |
c4069512 BP |
4575 | AT_SETUP([ofproto-dpif - MAC table overflow]) |
4576 | OVS_VSWITCHD_START( | |
ad28062f BP |
4577 | [set bridge br0 fail-mode=standalone other-config:mac-table-size=10]) |
4578 | ADD_OF_PORTS([br0], 1, 2, 3) | |
c4069512 BP |
4579 | |
4580 | 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)' | |
4581 | ||
4582 | AT_CHECK([ovs-appctl time/stop]) | |
4583 | ||
4584 | # Trace 10 ARP packets arriving on p3, to create MAC learning entries. | |
4585 | for i in 0 1 2 3 4 5 6 7 8 9; do | |
4586 | OFPROTO_TRACE( | |
50aa28fd | 4587 | [ovs-dummy], |
c4069512 BP |
4588 | [in_port(3),eth(src=50:54:00:00:00:0$i,dst=ff:ff:ff:ff:ff:ff),$arp], |
4589 | [-generate], | |
4590 | [1,2,100]) | |
4591 | ovs-appctl time/warp 1000 | |
4592 | done | |
4593 | ||
4594 | # Check for the MAC learning entries. | |
4595 | AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/ *[[0-9]]\{1,\}$//' | sort], | |
4596 | [0], [dnl | |
4597 | 3 0 50:54:00:00:00:00 | |
4598 | 3 0 50:54:00:00:00:01 | |
4599 | 3 0 50:54:00:00:00:02 | |
4600 | 3 0 50:54:00:00:00:03 | |
4601 | 3 0 50:54:00:00:00:04 | |
4602 | 3 0 50:54:00:00:00:05 | |
4603 | 3 0 50:54:00:00:00:06 | |
4604 | 3 0 50:54:00:00:00:07 | |
4605 | 3 0 50:54:00:00:00:08 | |
4606 | 3 0 50:54:00:00:00:09 | |
4607 | port VLAN MAC Age | |
4608 | ]) | |
4609 | ||
4610 | # Trace another ARP packet on another MAC. | |
4611 | OFPROTO_TRACE( | |
50aa28fd | 4612 | [ovs-dummy], |
c4069512 BP |
4613 | [in_port(3),eth(src=50:54:00:00:00:10,dst=ff:ff:ff:ff:ff:ff),$arp], |
4614 | [-generate], | |
4615 | [1,2,100]) | |
4616 | ||
4617 | # Check that the new one chased the oldest one out of the table. | |
4618 | AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/[[0-9]]\{1,\}$/?/' | sort], | |
4619 | [0], [dnl | |
4620 | 3 0 50:54:00:00:00:01 ? | |
4621 | 3 0 50:54:00:00:00:02 ? | |
4622 | 3 0 50:54:00:00:00:03 ? | |
4623 | 3 0 50:54:00:00:00:04 ? | |
4624 | 3 0 50:54:00:00:00:05 ? | |
4625 | 3 0 50:54:00:00:00:06 ? | |
4626 | 3 0 50:54:00:00:00:07 ? | |
4627 | 3 0 50:54:00:00:00:08 ? | |
4628 | 3 0 50:54:00:00:00:09 ? | |
4629 | 3 0 50:54:00:00:00:10 ? | |
4630 | port VLAN MAC Age | |
4631 | ]) | |
4632 | OVS_VSWITCHD_STOP | |
4633 | AT_CLEANUP | |
4634 | ||
9d078ec2 BP |
4635 | AT_SETUP([ofproto-dpif - MAC table overflow fairness]) |
4636 | OVS_VSWITCHD_START( | |
4637 | [set bridge br0 fail-mode=standalone other-config:mac-table-size=10]) | |
4638 | ADD_OF_PORTS([br0], 1, 2, 3, 4, 5, 6) | |
4639 | ||
4640 | arp='eth_type(0x0806),arp(sip=192.168.0.1,tip=192.168.0.2,op=1,sha=50:54:00:00:00:05,tha=00:00:00:00:00:00)' | |
4641 | ||
4642 | AT_CHECK([ovs-appctl time/stop]) | |
4643 | ||
4644 | # Trace packets with 2 different source MACs arriving on each of the 5 | |
4645 | # ports, filling up the 10-entry learning table. | |
4646 | for i in 0 1 2 3 4 5 6 7 8 9; do | |
4647 | p=`expr $i / 2 + 1` | |
4648 | ovs-appctl ofproto/trace ovs-dummy "in_port($p),eth(src=50:54:00:00:00:0$i,dst=ff:ff:ff:ff:ff:ff),$arp" -generate | |
4649 | ovs-appctl time/warp 1000 | |
4650 | done | |
4651 | ||
4652 | # Check for the MAC learning entries. | |
4653 | AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/ *[[0-9]]\{1,\}$//' | sort], | |
4654 | [0], [dnl | |
4655 | 1 0 50:54:00:00:00:00 | |
4656 | 1 0 50:54:00:00:00:01 | |
4657 | 2 0 50:54:00:00:00:02 | |
4658 | 2 0 50:54:00:00:00:03 | |
4659 | 3 0 50:54:00:00:00:04 | |
4660 | 3 0 50:54:00:00:00:05 | |
4661 | 4 0 50:54:00:00:00:06 | |
4662 | 4 0 50:54:00:00:00:07 | |
4663 | 5 0 50:54:00:00:00:08 | |
4664 | 5 0 50:54:00:00:00:09 | |
4665 | port VLAN MAC Age | |
4666 | ]) | |
4667 | ||
4668 | # Now trace 16 new MACs on another port. | |
4669 | for i in 0 1 2 3 4 5 6 7 8 9 a b c d e f; do | |
4670 | ovs-appctl ofproto/trace ovs-dummy "in_port(6),eth(src=50:54:00:00:0$i:ff,dst=ff:ff:ff:ff:ff:ff),$arp" -generate | |
4671 | ovs-appctl time/warp 1000 | |
4672 | done | |
4673 | ||
4674 | # Check the results. | |
4675 | # | |
4676 | # Our eviction algorithm on overflow is that an arbitrary (but deterministic) | |
4677 | # one of the ports with the most learned MACs loses the least recently used | |
4678 | # one. Thus, the new port will end up with 3 MACs, 3 of the old ports with 1 | |
4679 | # MAC each, and the other 2 of the old ports with 2 MACs each. | |
4680 | # | |
4681 | # (If someone changes lib/heap.c to do something different with equal-priority | |
4682 | # nodes, then the output below could change, but it would still follow the | |
4683 | # rules explained above.) | |
4684 | AT_CHECK_UNQUOTED([ovs-appctl fdb/show br0 | sed 's/ *[[0-9]]\{1,\}$//' | sort], | |
4685 | [0], [dnl | |
4686 | 1 0 50:54:00:00:00:01 | |
4687 | 2 0 50:54:00:00:00:03 | |
4688 | 3 0 50:54:00:00:00:04 | |
4689 | 3 0 50:54:00:00:00:05 | |
4690 | 4 0 50:54:00:00:00:07 | |
4691 | 5 0 50:54:00:00:00:08 | |
4692 | 5 0 50:54:00:00:00:09 | |
4693 | 6 0 50:54:00:00:0d:ff | |
4694 | 6 0 50:54:00:00:0e:ff | |
4695 | 6 0 50:54:00:00:0f:ff | |
4696 | port VLAN MAC Age | |
4697 | ]) | |
4698 | OVS_VSWITCHD_STOP | |
4699 | AT_CLEANUP | |
4700 | ||
4819b3a5 | 4701 | # CHECK_SFLOW_SAMPLING_PACKET(LOOPBACK_ADDR) |
e731d71b AS |
4702 | # |
4703 | # Test that sFlow samples packets correctly using IPv4/IPv6 sFlow collector | |
e731d71b | 4704 | m4_define([CHECK_SFLOW_SAMPLING_PACKET], |
4819b3a5 | 4705 | [AT_XFAIL_IF([test "$IS_WIN32" = "yes"]) |
e731d71b AS |
4706 | OVS_VSWITCHD_START([set Bridge br0 fail-mode=standalone]) |
4707 | ||
4708 | ON_EXIT([kill `cat test-sflow.pid`]) | |
eadd1644 | 4709 | AT_CHECK([ovstest test-sflow --log-file --detach --no-chdir --pidfile 0:$1 > sflow.log], [0], [], [ignore]) |
e731d71b | 4710 | AT_CAPTURE_FILE([sflow.log]) |
b52ecd96 | 4711 | SFLOW_PORT=`parse_listening_port < test-sflow.log` |
e731d71b AS |
4712 | ovs-appctl time/stop |
4713 | ||
4714 | ADD_OF_PORTS([br0], 1, 2) | |
4715 | ovs-vsctl \ | |
4716 | set Interface br0 options:ifindex=1002 -- \ | |
4717 | set Interface p1 options:ifindex=1004 -- \ | |
4718 | set Interface p2 options:ifindex=1003 -- \ | |
4719 | set Bridge br0 sflow=@sf -- \ | |
4720 | --id=@sf create sflow targets=\"$1:$SFLOW_PORT\" \ | |
9a9808d7 | 4721 | header=128 sampling=1 polling=1 agent=$LOOPBACK_INTERFACE |
e731d71b AS |
4722 | |
4723 | dnl open with ARP packets to seed the bridge-learning. The output | |
4724 | dnl ifIndex numbers should be reported predictably after that. | |
4725 | dnl Since we set sampling=1 we should see all of these packets | |
4726 | dnl reported. Sorting the output by data-source and seqNo makes | |
4727 | dnl it deterministic. Ensuring that we send at least two packets | |
4728 | dnl into each port means we get to check the seq nos are | |
4729 | dnl incrementing correctly. | |
4730 | dnl because packets from different ports can be handled by separate | |
4731 | dnl threads, put some sleeps | |
4732 | ||
4733 | 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)' | |
4734 | sleep 1 | |
4735 | 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)' | |
4736 | sleep 1 | |
4737 | 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)' | |
4738 | sleep 1 | |
4739 | 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)' | |
4740 | 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)' | |
4741 | ||
4742 | dnl sleep long enough to get more than one counter sample | |
4743 | dnl from each datasource so we can check sequence numbers | |
bdba1947 | 4744 | ovs-appctl time/warp 3000 100 |
e731d71b AS |
4745 | OVS_VSWITCHD_STOP |
4746 | ovs-appctl -t test-sflow exit | |
8073dd31 | 4747 | |
e731d71b | 4748 | AT_CHECK_UNQUOTED([[sort sflow.log | $EGREP 'HEADER|ERROR' | sed 's/ /\ |
8073dd31 NM |
4749 | /g']], [0], [dnl |
4750 | HEADER | |
4751 | dgramSeqNo=1 | |
743cea45 | 4752 | ds=127.0.0.1>2:1000 |
8073dd31 NM |
4753 | fsSeqNo=1 |
4754 | in_vlan=0 | |
4755 | in_priority=0 | |
4756 | out_vlan=0 | |
4757 | out_priority=0 | |
4758 | meanSkip=1 | |
4759 | samplePool=1 | |
4760 | dropEvents=0 | |
743cea45 | 4761 | in_ifindex=1004 |
8073dd31 NM |
4762 | in_format=0 |
4763 | out_ifindex=2 | |
4764 | out_format=2 | |
4765 | hdr_prot=1 | |
4766 | pkt_len=64 | |
4767 | stripped=4 | |
4768 | hdr_len=60 | |
743cea45 | 4769 | 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 |
8073dd31 NM |
4770 | HEADER |
4771 | dgramSeqNo=1 | |
743cea45 | 4772 | ds=127.0.0.1>2:1000 |
8073dd31 NM |
4773 | fsSeqNo=2 |
4774 | in_vlan=0 | |
4775 | in_priority=0 | |
4776 | out_vlan=0 | |
4777 | out_priority=0 | |
4778 | meanSkip=1 | |
4779 | samplePool=2 | |
4780 | dropEvents=0 | |
4781 | in_ifindex=1003 | |
4782 | in_format=0 | |
743cea45 NM |
4783 | out_ifindex=2 |
4784 | out_format=2 | |
8073dd31 NM |
4785 | hdr_prot=1 |
4786 | pkt_len=64 | |
4787 | stripped=4 | |
4788 | hdr_len=60 | |
743cea45 | 4789 | 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 |
8073dd31 NM |
4790 | HEADER |
4791 | dgramSeqNo=1 | |
743cea45 | 4792 | ds=127.0.0.1>2:1000 |
8073dd31 NM |
4793 | fsSeqNo=3 |
4794 | in_vlan=0 | |
4795 | in_priority=0 | |
4796 | out_vlan=0 | |
4797 | out_priority=0 | |
4798 | meanSkip=1 | |
4799 | samplePool=3 | |
4800 | dropEvents=0 | |
743cea45 | 4801 | in_ifindex=1004 |
8073dd31 | 4802 | in_format=0 |
743cea45 | 4803 | out_ifindex=1003 |
8073dd31 NM |
4804 | out_format=0 |
4805 | hdr_prot=1 | |
4806 | pkt_len=64 | |
4807 | stripped=4 | |
4808 | hdr_len=60 | |
743cea45 | 4809 | 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 |
8073dd31 NM |
4810 | HEADER |
4811 | dgramSeqNo=1 | |
743cea45 NM |
4812 | ds=127.0.0.1>2:1000 |
4813 | fsSeqNo=4 | |
8073dd31 NM |
4814 | in_vlan=0 |
4815 | in_priority=0 | |
4816 | out_vlan=0 | |
4817 | out_priority=0 | |
4818 | meanSkip=1 | |
743cea45 | 4819 | samplePool=4 |
8073dd31 | 4820 | dropEvents=0 |
743cea45 | 4821 | in_ifindex=1003 |
8073dd31 | 4822 | in_format=0 |
743cea45 NM |
4823 | out_ifindex=1004 |
4824 | out_format=0 | |
8073dd31 NM |
4825 | hdr_prot=1 |
4826 | pkt_len=64 | |
4827 | stripped=4 | |
4828 | hdr_len=60 | |
743cea45 | 4829 | 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 |
8073dd31 NM |
4830 | HEADER |
4831 | dgramSeqNo=1 | |
743cea45 NM |
4832 | ds=127.0.0.1>2:1000 |
4833 | fsSeqNo=5 | |
8073dd31 NM |
4834 | in_vlan=0 |
4835 | in_priority=0 | |
4836 | out_vlan=0 | |
4837 | out_priority=0 | |
4838 | meanSkip=1 | |
743cea45 | 4839 | samplePool=5 |
8073dd31 | 4840 | dropEvents=0 |
743cea45 | 4841 | in_ifindex=1003 |
8073dd31 | 4842 | in_format=0 |
743cea45 | 4843 | out_ifindex=1004 |
8073dd31 NM |
4844 | out_format=0 |
4845 | hdr_prot=1 | |
4846 | pkt_len=64 | |
4847 | stripped=4 | |
4848 | hdr_len=60 | |
52105b67 | 4849 | 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 |
8073dd31 NM |
4850 | ]) |
4851 | ||
50b9699f | 4852 | AT_CHECK_UNQUOTED([[sort sflow.log | $EGREP 'IFCOUNTERS|ERROR|PORTNAME|OPENFLOWPORT' | head -18 | sed 's/ /\ |
8073dd31 NM |
4853 | /g']], [0], [dnl |
4854 | IFCOUNTERS | |
4855 | dgramSeqNo=2 | |
4856 | ds=127.0.0.1>0:1002 | |
4857 | csSeqNo=1 | |
4858 | ifindex=1002 | |
4859 | type=6 | |
4860 | ifspeed=100000000 | |
4861 | direction=0 | |
1839c356 | 4862 | status=0 |
8073dd31 NM |
4863 | in_octets=0 |
4864 | in_unicasts=0 | |
4865 | in_multicasts=0 | |
4866 | in_broadcasts=4294967295 | |
4867 | in_discards=0 | |
4868 | in_errors=0 | |
4869 | in_unknownprotos=4294967295 | |
4870 | out_octets=120 | |
4871 | out_unicasts=2 | |
4872 | out_multicasts=4294967295 | |
4873 | out_broadcasts=4294967295 | |
4874 | out_discards=0 | |
4875 | out_errors=0 | |
4876 | promiscuous=0 | |
4877 | IFCOUNTERS | |
4878 | dgramSeqNo=2 | |
4879 | ds=127.0.0.1>0:1003 | |
4880 | csSeqNo=1 | |
4881 | ifindex=1003 | |
4882 | type=6 | |
4883 | ifspeed=100000000 | |
4884 | direction=0 | |
4885 | status=0 | |
52105b67 | 4886 | in_octets=138 |
8073dd31 NM |
4887 | in_unicasts=3 |
4888 | in_multicasts=0 | |
4889 | in_broadcasts=4294967295 | |
4890 | in_discards=0 | |
4891 | in_errors=0 | |
4892 | in_unknownprotos=4294967295 | |
4893 | out_octets=120 | |
4894 | out_unicasts=2 | |
4895 | out_multicasts=4294967295 | |
4896 | out_broadcasts=4294967295 | |
4897 | out_discards=0 | |
4898 | out_errors=0 | |
4899 | promiscuous=0 | |
4900 | IFCOUNTERS | |
4901 | dgramSeqNo=2 | |
4902 | ds=127.0.0.1>0:1004 | |
4903 | csSeqNo=1 | |
4904 | ifindex=1004 | |
4905 | type=6 | |
4906 | ifspeed=100000000 | |
4907 | direction=0 | |
4908 | status=0 | |
4909 | in_octets=84 | |
4910 | in_unicasts=2 | |
4911 | in_multicasts=0 | |
4912 | in_broadcasts=4294967295 | |
4913 | in_discards=0 | |
4914 | in_errors=0 | |
4915 | in_unknownprotos=4294967295 | |
4916 | out_octets=180 | |
4917 | out_unicasts=3 | |
4918 | out_multicasts=4294967295 | |
4919 | out_broadcasts=4294967295 | |
4920 | out_discards=0 | |
4921 | out_errors=0 | |
4922 | promiscuous=0 | |
4923 | IFCOUNTERS | |
4924 | dgramSeqNo=3 | |
4925 | ds=127.0.0.1>0:1002 | |
4926 | csSeqNo=2 | |
4927 | ifindex=1002 | |
4928 | type=6 | |
4929 | ifspeed=100000000 | |
4930 | direction=0 | |
1839c356 | 4931 | status=0 |
8073dd31 NM |
4932 | in_octets=0 |
4933 | in_unicasts=0 | |
4934 | in_multicasts=0 | |
4935 | in_broadcasts=4294967295 | |
4936 | in_discards=0 | |
4937 | in_errors=0 | |
4938 | in_unknownprotos=4294967295 | |
4939 | out_octets=120 | |
4940 | out_unicasts=2 | |
4941 | out_multicasts=4294967295 | |
4942 | out_broadcasts=4294967295 | |
4943 | out_discards=0 | |
4944 | out_errors=0 | |
4945 | promiscuous=0 | |
4946 | IFCOUNTERS | |
4947 | dgramSeqNo=3 | |
4948 | ds=127.0.0.1>0:1003 | |
4949 | csSeqNo=2 | |
4950 | ifindex=1003 | |
4951 | type=6 | |
4952 | ifspeed=100000000 | |
4953 | direction=0 | |
4954 | status=0 | |
52105b67 | 4955 | in_octets=138 |
8073dd31 NM |
4956 | in_unicasts=3 |
4957 | in_multicasts=0 | |
4958 | in_broadcasts=4294967295 | |
4959 | in_discards=0 | |
4960 | in_errors=0 | |
4961 | in_unknownprotos=4294967295 | |
4962 | out_octets=120 | |
4963 | out_unicasts=2 | |
4964 | out_multicasts=4294967295 | |
4965 | out_broadcasts=4294967295 | |
4966 | out_discards=0 | |
4967 | out_errors=0 | |
4968 | promiscuous=0 | |
4969 | IFCOUNTERS | |
4970 | dgramSeqNo=3 | |
4971 | ds=127.0.0.1>0:1004 | |
4972 | csSeqNo=2 | |
4973 | ifindex=1004 | |
4974 | type=6 | |
4975 | ifspeed=100000000 | |
4976 | direction=0 | |
4977 | status=0 | |
4978 | in_octets=84 | |
4979 | in_unicasts=2 | |
4980 | in_multicasts=0 | |
4981 | in_broadcasts=4294967295 | |
4982 | in_discards=0 | |
4983 | in_errors=0 | |
4984 | in_unknownprotos=4294967295 | |
4985 | out_octets=180 | |
4986 | out_unicasts=3 | |
4987 | out_multicasts=4294967295 | |
4988 | out_broadcasts=4294967295 | |
4989 | out_discards=0 | |
4990 | out_errors=0 | |
4991 | promiscuous=0 | |
50b9699f NM |
4992 | OPENFLOWPORT |
4993 | datapath_id=18364758544493064720 | |
4994 | port_no=1 | |
4995 | OPENFLOWPORT | |
4996 | datapath_id=18364758544493064720 | |
4997 | port_no=1 | |
4998 | OPENFLOWPORT | |
4999 | datapath_id=18364758544493064720 | |
5000 | port_no=2 | |
5001 | OPENFLOWPORT | |
5002 | datapath_id=18364758544493064720 | |
5003 | port_no=2 | |
5004 | OPENFLOWPORT | |
5005 | datapath_id=18364758544493064720 | |
5006 | port_no=65534 | |
5007 | OPENFLOWPORT | |
5008 | datapath_id=18364758544493064720 | |
5009 | port_no=65534 | |
5010 | PORTNAME | |
5011 | portName=br0 | |
5012 | PORTNAME | |
5013 | portName=br0 | |
5014 | PORTNAME | |
5015 | portName=p1 | |
5016 | PORTNAME | |
5017 | portName=p1 | |
5018 | PORTNAME | |
5019 | portName=p2 | |
5020 | PORTNAME | |
5021 | portName=p2 | |
4819b3a5 | 5022 | ])]) |
17f7f7e0 | 5023 | |
4819b3a5 BP |
5024 | AT_SETUP([ofproto-dpif - sFlow packet sampling - IPv4 collector]) |
5025 | CHECK_SFLOW_SAMPLING_PACKET([127.0.0.1]) | |
5026 | AT_CLEANUP | |
5027 | ||
5028 | AT_SETUP([ofproto-dpif - sFlow packet sampling - IPv6 collector]) | |
5029 | AT_SKIP_IF([test $HAVE_IPV6 = no]) | |
5030 | CHECK_SFLOW_SAMPLING_PACKET([[[::1]]]) | |
5031 | AT_CLEANUP | |
1e04fcc8 | 5032 | |
50b9699f | 5033 | dnl Test sFlow LAG structures |
7321bda3 | 5034 | AT_SETUP([ofproto-dpif - sFlow packet sampling - LACP structures]) |
80ee73d3 | 5035 | AT_SKIP_IF([test "$IS_WIN32" = "yes"]) |
50b9699f NM |
5036 | OVS_VSWITCHD_START([dnl |
5037 | add-bond br0 bond p1 p2 -- \ | |
5038 | set Port bond lacp=active bond-mode=active-backup \ | |
5039 | other_config:lacp-time="fast" \ | |
5040 | other_config:lacp-system-id=11:22:33:44:55:66 \ | |
5041 | other_config:lacp-system-priority=54321 -- \ | |
5042 | set Interface p1 type=dummy \ | |
5043 | other_config:lacp-port-id=11 \ | |
5044 | other_config:lacp-port-priority=111 \ | |
5045 | other_config:lacp-aggregation-key=3333 -- \ | |
5046 | set Interface p2 type=dummy \ | |
5047 | other_config:lacp-port-id=22 \ | |
5048 | other_config:lacp-port-priority=222 \ | |
5049 | other_config:lacp-aggregation-key=3333 ]) | |
5050 | ||
5051 | ON_EXIT([kill `cat test-sflow.pid`]) | |
5052 | AT_CHECK([ovstest test-sflow --log-file --detach --no-chdir --pidfile 0:127.0.0.1 > sflow.log], [0], [], [ignore]) | |
5053 | AT_CAPTURE_FILE([sflow.log]) | |
5054 | SFLOW_PORT=`parse_listening_port < test-sflow.log` | |
5055 | ||
5056 | ovs-appctl time/stop | |
5057 | ||
5058 | ovs-vsctl \ | |
5059 | set Interface p1 options:ifindex=1003 -- \ | |
5060 | set Bridge br0 sflow=@sf -- \ | |
5061 | --id=@sf create sflow targets=\"127.0.0.1:$SFLOW_PORT\" \ | |
5062 | header=128 sampling=1 polling=1 | |
5063 | ||
5064 | dnl sleep long enough to get the sFlow datagram flushed out (may be delayed for up to 1 second) | |
cea4a6d7 JS |
5065 | AT_CHECK([ovs-appctl time/warp 2000 100], [0], [ignore]) |
5066 | AT_CHECK([ovs-appctl revalidator/purge], [0]) | |
50b9699f NM |
5067 | OVS_VSWITCHD_STOP |
5068 | ovs-appctl -t test-sflow exit | |
5069 | AT_CHECK([[sort sflow.log | $EGREP 'LACPCOUNTERS|ERROR' | head -n 1 | sed 's/ /\ | |
5070 | /g']], [0], [dnl | |
5071 | LACPCOUNTERS | |
5072 | sysID=11:22:33:44:55:66 | |
5073 | partnerID=00:00:00:00:00:00 | |
5074 | aggID=3333 | |
5075 | actorAdmin=0x7 | |
5076 | actorOper=0xbf | |
5077 | partnerAdmin=0x0 | |
5078 | partnerOper=0x2 | |
5079 | LACPUDsRx=0 | |
5080 | markerPDUsRx=4294967295 | |
5081 | markerRespPDUsRx=4294967295 | |
5082 | unknownRx=4294967295 | |
5083 | illegalRx=0 | |
5084 | LACPUDsTx=1 | |
5085 | markerPDUsTx=4294967295 | |
5086 | markerRespPDUsTx=4294967295 | |
5087 | ]) | |
5088 | ||
5089 | AT_CLEANUP | |
5090 | ||
7321bda3 NM |
5091 | AT_SETUP([ofproto-dpif - sFlow packet sampling - tunnel set]) |
5092 | AT_XFAIL_IF([test "$IS_WIN32" = "yes"]) | |
5093 | OVS_VSWITCHD_START([set Bridge br0 fail-mode=standalone]) | |
5094 | ||
5095 | dnl set up sFlow logging | |
5096 | dnl ON_EXIT([kill `cat test-sflow.pid`]) | |
5097 | AT_CHECK([ovstest test-sflow --log-file --detach --no-chdir --pidfile 0:127.0.0.1 > sflow.log], [0], [], [ignore]) | |
5098 | AT_CAPTURE_FILE([sflow.log]) | |
5099 | SFLOW_PORT=`parse_listening_port < test-sflow.log` | |
5100 | ovs-appctl time/stop | |
5101 | ||
5102 | OVS_VSWITCHD_DISABLE_TUNNEL_PUSH_POP | |
5103 | AT_CHECK([ovs-vsctl add-port br0 gre0 -- set Interface gre0 type=gre \ | |
5104 | options:remote_ip=1.1.1.1 options:key=456 ofport_request=3]) | |
5105 | AT_CHECK([ovs-vsctl add-port br0 p1 -- set Interface p1 type=dummy ofport_request=4]) | |
5106 | ||
5107 | AT_CHECK([ovs-ofctl add-flow br0 action=3]) | |
5108 | ||
5109 | dnl enable sflow | |
5110 | ovs-vsctl \ | |
5111 | set Bridge br0 sflow=@sf -- \ | |
5112 | --id=@sf create sflow targets=\"127.0.0.1:$SFLOW_PORT\" \ | |
5113 | header=128 sampling=1 polling=0 | |
5114 | ||
5115 | dnl introduce a packet that will be flooded to the tunnel | |
5116 | AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(4),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.10.10.2,dst=10.10.10.1,proto=1,tos=1,ttl=128,frag=no),icmp(type=8,code=0)']) | |
5117 | ||
5118 | dnl sleep long enough to get the sFlow datagram flushed out (may be delayed for up to 1 second) | |
5119 | for i in `seq 1 30`; do | |
5120 | ovs-appctl time/warp 100 | |
5121 | done | |
5122 | ||
5123 | ovs-appctl -t test-sflow exit | |
5124 | ||
5125 | AT_CHECK_UNQUOTED([[sort sflow.log | $EGREP 'HEADER|ERROR' | sed 's/ /\ | |
5126 | /g']], [0], [dnl | |
5127 | HEADER | |
5128 | dgramSeqNo=1 | |
5129 | ds=127.0.0.1>2:1000 | |
5130 | fsSeqNo=1 | |
5131 | tunnel4_out_length=0 | |
5132 | tunnel4_out_protocol=47 | |
5133 | tunnel4_out_src=0.0.0.0 | |
5134 | tunnel4_out_dst=1.1.1.1 | |
5135 | tunnel4_out_src_port=0 | |
5136 | tunnel4_out_dst_port=0 | |
5137 | tunnel4_out_tcp_flags=0 | |
5138 | tunnel4_out_tos=1 | |
5139 | tunnel_out_vni=456 | |
5140 | in_vlan=0 | |
5141 | in_priority=0 | |
5142 | out_vlan=0 | |
5143 | out_priority=0 | |
5144 | meanSkip=1 | |
5145 | samplePool=1 | |
5146 | dropEvents=0 | |
5147 | in_ifindex=0 | |
5148 | in_format=0 | |
5149 | out_ifindex=1 | |
5150 | out_format=2 | |
5151 | hdr_prot=1 | |
5152 | pkt_len=64 | |
5153 | stripped=4 | |
5154 | hdr_len=60 | |
5155 | hdr=50-54-00-00-00-0A-50-54-00-00-00-09-08-00-45-01-00-1C-00-00-00-00-80-01-12-CA-0A-0A-0A-02-0A-0A-0A-01-08-00-F7-FF-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 | |
5156 | ]) | |
5157 | ||
5158 | OVS_VSWITCHD_STOP | |
5159 | AT_CLEANUP | |
5160 | ||
5161 | AT_SETUP([ofproto-dpif - sFlow packet sampling - tunnel push]) | |
5162 | AT_XFAIL_IF([test "$IS_WIN32" = "yes"]) | |
5163 | ||
5164 | OVS_VSWITCHD_START([add-port br0 p0 -- set Interface p0 type=dummy ofport_request=1 options:ifindex=1010]) | |
5165 | ||
5166 | dnl set up sFlow logging | |
5167 | dnl ON_EXIT([kill `cat test-sflow.pid`]) | |
5168 | AT_CHECK([ovstest test-sflow --log-file --detach --no-chdir --pidfile 0:127.0.0.1 > sflow.log], [0], [], [ignore]) | |
5169 | AT_CAPTURE_FILE([sflow.log]) | |
5170 | SFLOW_PORT=`parse_listening_port < test-sflow.log` | |
5171 | ovs-appctl time/stop | |
5172 | ||
5173 | AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg]) | |
5174 | AT_CHECK([ovs-vsctl add-br int-br -- set bridge int-br datapath_type=dummy], [0]) | |
5175 | AT_CHECK([ovs-vsctl -- add-port int-br t1 -- set Interface t1 type=gre \ | |
5176 | options:remote_ip=1.1.2.92 options:key=456 ofport_request=4\ | |
5177 | -- add-port int-br vm1 -- set Interface vm1 type=dummy \ | |
5178 | options:ifindex=2011 ofport_request=5 | |
5179 | ], [0]) | |
5180 | ||
5181 | AT_CHECK([ovs-appctl dpif/show], [0], [dnl | |
5182 | dummy@ovs-dummy: hit:0 missed:0 | |
5183 | br0: | |
5184 | br0 65534/100: (dummy) | |
5185 | p0 1/1: (dummy: ifindex=1010) | |
5186 | int-br: | |
5187 | int-br 65534/2: (dummy) | |
5188 | t1 4/4: (gre: key=456, remote_ip=1.1.2.92) | |
5189 | vm1 5/3: (dummy: ifindex=2011) | |
5190 | ]) | |
5191 | ||
5192 | dnl set up route to 1.1.2.92 via br0 and action=normal | |
5193 | AT_CHECK([ovs-appctl ovs/route/add 1.1.2.92/24 br0], [0], [OK | |
5194 | ]) | |
5195 | AT_CHECK([ovs-appctl ovs/route/add 192.168.0.0/16 br0], [0], [OK | |
5196 | ]) | |
5197 | AT_CHECK([ovs-appctl netdev-dummy/ip4addr br0 1.1.2.88/24], [0], [OK | |
5198 | ]) | |
5199 | AT_CHECK([ovs-ofctl add-flow br0 action=normal]) | |
5200 | ||
5201 | dnl Prime ARP Cache for 1.1.2.92 | |
5202 | AT_CHECK([ovs-appctl netdev-dummy/receive br0 'recirc_id(0),in_port(100),eth(src=f8:bc:12:44:34:b6,dst=ff:ff:ff:ff:ff:ff),eth_type(0x0806),arp(sip=1.1.2.92,tip=1.1.2.88,op=1,sha=f8:bc:12:44:34:b6,tha=00:00:00:00:00:00)']) | |
5203 | ||
5204 | dnl configure sflow on int-br only | |
5205 | ovs-vsctl \ | |
5206 | set Bridge int-br sflow=@sf -- \ | |
5207 | --id=@sf create sflow targets=\"127.0.0.1:$SFLOW_PORT\" \ | |
5208 | header=128 sampling=1 polling=0 | |
5209 | ||
5210 | dnl add rule for int-br to force packet onto tunnel. There is no ifindex | |
5211 | dnl for this port so the sFlow output will just report that it went to | |
5212 | dnl 1 output (out_format=2, out_ifindex=1) | |
5213 | AT_CHECK([ovs-ofctl add-flow int-br "actions=4"]) | |
5214 | ||
5215 | AT_CHECK([ovs-appctl netdev-dummy/receive vm1 'in_port(3),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=192.168.1.1,dst=192.168.2.2,proto=1,tos=0,ttl=128,frag=no),icmp(type=8,code=0)']) | |
5216 | ||
5217 | dnl sleep long enough to get the sFlow datagram flushed out (may be delayed for up to 1 second) | |
5218 | for i in `seq 1 30`; do | |
5219 | ovs-appctl time/warp 100 | |
5220 | done | |
5221 | ||
5222 | ovs-appctl -t test-sflow exit | |
5223 | ||
5224 | AT_CHECK_UNQUOTED([[sort sflow.log | $EGREP 'HEADER|ERROR' | sed 's/ /\ | |
5225 | /g']], [0], [dnl | |
5226 | HEADER | |
5227 | dgramSeqNo=1 | |
5228 | ds=127.0.0.1>2:1000 | |
5229 | fsSeqNo=1 | |
5230 | tunnel4_out_length=0 | |
5231 | tunnel4_out_protocol=47 | |
5232 | tunnel4_out_src=1.1.2.88 | |
5233 | tunnel4_out_dst=1.1.2.92 | |
5234 | tunnel4_out_src_port=0 | |
5235 | tunnel4_out_dst_port=0 | |
5236 | tunnel4_out_tcp_flags=0 | |
5237 | tunnel4_out_tos=0 | |
5238 | tunnel_out_vni=456 | |
5239 | in_vlan=0 | |
5240 | in_priority=0 | |
5241 | out_vlan=0 | |
5242 | out_priority=0 | |
5243 | meanSkip=1 | |
5244 | samplePool=1 | |
5245 | dropEvents=0 | |
5246 | in_ifindex=2011 | |
5247 | in_format=0 | |
5248 | out_ifindex=1 | |
5249 | out_format=2 | |
5250 | hdr_prot=1 | |
5251 | pkt_len=64 | |
5252 | stripped=4 | |
5253 | hdr_len=60 | |
5254 | hdr=50-54-00-00-00-0A-50-54-00-00-00-05-08-00-45-00-00-1C-00-00-00-00-80-01-B6-8D-C0-A8-01-01-C0-A8-02-02-08-00-F7-FF-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 | |
5255 | ]) | |
5256 | ||
5257 | OVS_VSWITCHD_STOP | |
5258 | AT_CLEANUP | |
5259 | ||
5260 | AT_SETUP([ofproto-dpif - sFlow packet sampling - MPLS]) | |
7ad705c6 | 5261 | AT_XFAIL_IF([test "$IS_WIN32" = "yes"]) |
7321bda3 NM |
5262 | OVS_VSWITCHD_START |
5263 | AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg]) | |
5264 | ADD_OF_PORTS([br0], [1], [2]) | |
5265 | AT_DATA([flows.txt], [dnl | |
5266 | table=0 dl_src=50:54:00:00:00:09 actions=push_mpls:0x8847,set_mpls_label:789,set_mpls_tc:4,set_mpls_ttl:32,2 | |
5267 | table=0 dl_src=50:54:00:00:00:0b actions=pop_mpls:0x0800,2 | |
5268 | ]) | |
5269 | AT_CHECK([ovs-ofctl add-flows br0 flows.txt]) | |
5270 | ||
5271 | dnl set up sFlow logging | |
5272 | dnl ON_EXIT([kill `cat test-sflow.pid`]) | |
5273 | AT_CHECK([ovstest test-sflow --log-file --detach --no-chdir --pidfile 0:127.0.0.1 > sflow.log], [0], [], [ignore]) | |
5274 | AT_CAPTURE_FILE([sflow.log]) | |
5275 | SFLOW_PORT=`parse_listening_port < test-sflow.log` | |
5276 | ovs-appctl time/stop | |
5277 | ||
5278 | dnl configure sflow | |
5279 | ovs-vsctl \ | |
5280 | set Bridge br0 sflow=@sf -- \ | |
5281 | --id=@sf create sflow targets=\"127.0.0.1:$SFLOW_PORT\" \ | |
5282 | header=128 sampling=1 polling=0 | |
5283 | ||
5284 | 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)']) | |
5285 | 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)']) | |
5286 | ||
5287 | dnl sleep long enough to get the sFlow datagram flushed out (may be delayed for up to 1 second) | |
5288 | for i in `seq 1 30`; do | |
5289 | ovs-appctl time/warp 100 | |
5290 | done | |
5291 | ||
5292 | ovs-appctl -t test-sflow exit | |
5293 | ||
5294 | AT_CHECK_UNQUOTED([[sort sflow.log | $EGREP 'HEADER|ERROR' | sed 's/ /\ | |
5295 | /g']], [0], [dnl | |
5296 | HEADER | |
5297 | dgramSeqNo=1 | |
5298 | ds=127.0.0.1>2:1000 | |
5299 | fsSeqNo=1 | |
5300 | mpls_label_0=789 | |
5301 | mpls_tc_0=4 | |
5302 | mpls_ttl_0=32 | |
5303 | mpls_bos_0=0 | |
5304 | mpls_label_1=11 | |
5305 | mpls_tc_1=3 | |
5306 | mpls_ttl_1=64 | |
5307 | mpls_bos_1=1 | |
5308 | in_vlan=0 | |
5309 | in_priority=0 | |
5310 | out_vlan=0 | |
5311 | out_priority=0 | |
5312 | meanSkip=1 | |
5313 | samplePool=1 | |
5314 | dropEvents=0 | |
5315 | in_ifindex=0 | |
5316 | in_format=0 | |
5317 | out_ifindex=1 | |
5318 | out_format=2 | |
5319 | hdr_prot=1 | |
5320 | pkt_len=64 | |
5321 | stripped=4 | |
5322 | hdr_len=60 | |
5323 | hdr=50-54-00-00-00-0A-50-54-00-00-00-09-88-47-00-00-B7-40-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 | |
5324 | HEADER | |
5325 | dgramSeqNo=1 | |
5326 | ds=127.0.0.1>2:1000 | |
5327 | fsSeqNo=2 | |
5328 | mpls_label_0=789 | |
5329 | mpls_tc_0=4 | |
5330 | mpls_ttl_0=32 | |
5331 | mpls_bos_0=1 | |
5332 | in_vlan=0 | |
5333 | in_priority=0 | |
5334 | out_vlan=0 | |
5335 | out_priority=0 | |
5336 | meanSkip=1 | |
5337 | samplePool=2 | |
5338 | dropEvents=0 | |
5339 | in_ifindex=0 | |
5340 | in_format=0 | |
5341 | out_ifindex=1 | |
5342 | out_format=2 | |
5343 | hdr_prot=1 | |
5344 | pkt_len=64 | |
5345 | stripped=4 | |
5346 | hdr_len=60 | |
5347 | hdr=50-54-00-00-00-0A-50-54-00-00-00-09-08-00-45-00-00-14-00-00-00-00-00-00-BA-EB-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 | |
5348 | ]) | |
5349 | ||
5350 | OVS_VSWITCHD_STOP | |
5351 | AT_CLEANUP | |
5352 | ||
5353 | ||
4819b3a5 | 5354 | # CHECK_NETFLOW_EXPIRATION(LOOPBACK_ADDR) |
e731d71b AS |
5355 | # |
5356 | # Test that basic NetFlow reports flow statistics correctly: | |
5357 | # The initial packet of a flow are correctly accounted. | |
5358 | # Later packets within a flow are correctly accounted. | |
5359 | # Flow actions changing (in this case, due to MAC learning) | |
5360 | # cause a record to be sent. | |
e731d71b | 5361 | m4_define([CHECK_NETFLOW_EXPIRATION], |
4819b3a5 | 5362 | [OVS_VSWITCHD_START([set Bridge br0 fail-mode=standalone]) |
e731d71b AS |
5363 | ADD_OF_PORTS([br0], 1, 2) |
5364 | ||
5365 | ovs-appctl time/stop | |
5366 | ON_EXIT([kill `cat test-netflow.pid`]) | |
eadd1644 | 5367 | AT_CHECK([ovstest test-netflow --log-file --detach --no-chdir --pidfile 0:$1 > netflow.log], [0], [], [ignore]) |
e731d71b | 5368 | AT_CAPTURE_FILE([netflow.log]) |
b52ecd96 | 5369 | NETFLOW_PORT=`parse_listening_port < test-netflow.log` |
e731d71b AS |
5370 | |
5371 | ovs-vsctl \ | |
5372 | set Bridge br0 netflow=@nf -- \ | |
5373 | --id=@nf create NetFlow targets=\"$1:$NETFLOW_PORT\" \ | |
5374 | engine_id=1 engine_type=2 active_timeout=30 add-id-to-interface=false | |
5375 | ||
5376 | for delay in 1000 30000; do | |
5377 | 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)' | |
5788e39f | 5378 | sleep 1 # ensure the order in which these two packets are processed |
e731d71b AS |
5379 | 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)' |
5380 | ||
5381 | ovs-appctl time/warp $delay | |
5382 | done | |
17f7f7e0 | 5383 | |
e731d71b | 5384 | ovs-appctl time/warp 6000 |
27f57736 | 5385 | ovs-appctl revalidator/wait |
e731d71b AS |
5386 | OVS_VSWITCHD_STOP |
5387 | ovs-appctl -t test-netflow exit | |
e79a6c83 | 5388 | |
e731d71b | 5389 | 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]) |
e79a6c83 | 5390 | |
e731d71b | 5391 | 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]) |
e79a6c83 | 5392 | |
e731d71b AS |
5393 | combined=`grep "192.168.0.2 > 192.168.0.1, if 2 > 1, 2 pkts, 120 bytes, ICMP 0:0" netflow.log | wc -l` |
5394 | separate=`grep "192.168.0.2 > 192.168.0.1, if 2 > 1, 1 pkts, 60 bytes, ICMP 0:0" netflow.log | wc -l` | |
4819b3a5 | 5395 | AT_CHECK([test $separate = 2 || test $combined = 1], [0])]) |
17f7f7e0 | 5396 | |
4819b3a5 BP |
5397 | AT_SETUP([ofproto-dpif - NetFlow flow expiration - IPv4 collector]) |
5398 | CHECK_NETFLOW_EXPIRATION([127.0.0.1]) | |
5399 | AT_CLEANUP | |
17f7f7e0 | 5400 | |
4819b3a5 BP |
5401 | AT_SETUP([ofproto-dpif - NetFlow flow expiration - IPv6 collector]) |
5402 | AT_SKIP_IF([test $HAVE_IPV6 = no]) | |
5403 | CHECK_NETFLOW_EXPIRATION([[[::1]]]) | |
5404 | AT_CLEANUP | |
1e04fcc8 | 5405 | |
4819b3a5 | 5406 | # CHECK_NETFLOW_ACTIVE_EXPIRATION(LOOPBACK_ADDR) |
e731d71b AS |
5407 | # |
5408 | # Test that basic NetFlow reports active expirations correctly. | |
e731d71b | 5409 | m4_define([CHECK_NETFLOW_ACTIVE_EXPIRATION], |
4819b3a5 | 5410 | [OVS_VSWITCHD_START([set Bridge br0 fail-mode=standalone]) |
e731d71b | 5411 | ADD_OF_PORTS([br0], 1, 2) |
17f7f7e0 | 5412 | |
e731d71b | 5413 | ON_EXIT([kill `cat test-netflow.pid`]) |
eadd1644 | 5414 | AT_CHECK([ovstest test-netflow --log-file --detach --no-chdir --pidfile 0:$1 > netflow.log], [0], [], [ignore]) |
e731d71b | 5415 | AT_CAPTURE_FILE([netflow.log]) |
b52ecd96 | 5416 | NETFLOW_PORT=`parse_listening_port < test-netflow.log` |
17f7f7e0 | 5417 | |
e731d71b AS |
5418 | ovs-vsctl \ |
5419 | set Bridge br0 netflow=@nf -- \ | |
5420 | --id=@nf create NetFlow targets=\"$1:$NETFLOW_PORT\" \ | |
5421 | engine_id=1 engine_type=2 active_timeout=10 add-id-to-interface=false | |
17f7f7e0 | 5422 | |
e731d71b AS |
5423 | AT_CHECK([ovs-appctl time/stop]) |
5424 | n=1 | |
5425 | while test $n -le 60; do | |
5426 | n=`expr $n + 1` | |
17f7f7e0 | 5427 | |
e731d71b AS |
5428 | 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)' |
5429 | 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)' | |
17f7f7e0 | 5430 | |
e731d71b AS |
5431 | ovs-appctl time/warp 1000 |
5432 | done | |
17f7f7e0 | 5433 | |
e731d71b AS |
5434 | ovs-appctl time/warp 10000 |
5435 | ||
27f57736 | 5436 | ovs-appctl revalidator/wait |
e731d71b AS |
5437 | OVS_VSWITCHD_STOP |
5438 | ovs-appctl -t test-netflow exit | |
5439 | ||
5440 | # Count the number of reported packets: | |
5441 | # - From source to destination before MAC learning kicks in (just one). | |
5442 | # - From source to destination after that. | |
5443 | # - From destination to source. | |
5444 | n_learn=0 | |
5445 | n_in=0 | |
5446 | n_out=0 | |
5447 | n_other=0 | |
5448 | n_recs=0 | |
5449 | none=0 | |
5450 | while read line; do | |
5451 | pkts=`echo "$line" | sed 's/.*, \([[0-9]]*\) pkts,.*/\1/'` | |
5452 | case $pkts in | |
5453 | [[0-9]]*) ;; | |
5454 | *) continue ;; | |
5455 | esac | |
5456 | ||
5457 | case $line in | |
5458 | "seq "*": 192.168.0.1 > 192.168.0.2, if 1 > 65535, "*" pkts, "*" bytes, TCP 1234 > 80, time "*) | |
5459 | counter=n_learn | |
5460 | ;; | |
5461 | "seq "*": 192.168.0.1 > 192.168.0.2, if 1 > 2, "*" pkts, "*" bytes, TCP 1234 > 80, time "*) | |
5462 | counter=n_in | |
5463 | ;; | |
5464 | "seq "*": 192.168.0.2 > 192.168.0.1, if 2 > 1, "*" pkts, "*" bytes, TCP 80 > 1234, time "*) | |
5465 | counter=n_out | |
5466 | ;; | |
5467 | *) | |
5468 | counter=n_other | |
5469 | ;; | |
5470 | esac | |
5471 | eval $counter=\`expr \$$counter + \$pkts\` | |
5472 | n_recs=`expr $n_recs + 1` | |
5473 | done < netflow.log | |
5474 | ||
5475 | # There should be exactly 1 MAC learning packet, | |
5476 | # exactly 59 other packets in that direction, | |
5477 | # and exactly 60 packets in the other direction. | |
5478 | AT_CHECK([echo $n_learn $n_in $n_out $n_other], [0], [1 59 60 0 | |
4819b3a5 | 5479 | ])]) |
e731d71b | 5480 | |
4819b3a5 BP |
5481 | AT_SETUP([ofproto-dpif - NetFlow active expiration - IPv4 collector]) |
5482 | CHECK_NETFLOW_ACTIVE_EXPIRATION([127.0.0.1]) | |
5483 | AT_CLEANUP | |
e731d71b | 5484 | |
4819b3a5 BP |
5485 | AT_SETUP([ofproto-dpif - NetFlow active expiration - IPv6 collector]) |
5486 | AT_SKIP_IF([test $HAVE_IPV6 = no]) | |
5487 | CHECK_NETFLOW_ACTIVE_EXPIRATION([[[::1]]]) | |
5488 | AT_CLEANUP | |
f27f2134 | 5489 | |
23a7d252 JS |
5490 | AT_SETUP([ofproto-dpif - flow stats]) |
5491 | OVS_VSWITCHD_START | |
5492 | AT_CHECK([ovs-ofctl add-flow br0 "ip,actions=NORMAL"]) | |
5493 | AT_CHECK([ovs-ofctl add-flow br0 "icmp,actions=NORMAL"]) | |
5494 | ||
5495 | ovs-appctl time/stop | |
5496 | ||
5497 | for i in `seq 1 10`; do | |
5498 | 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)' | |
5499 | done | |
5500 | ||
cea4a6d7 JS |
5501 | AT_CHECK([ovs-appctl time/warp 1000], [0], [ignore]) |
5502 | AT_CHECK([ovs-appctl revalidator/purge], [0]) | |
e96a5c24 | 5503 | AT_CHECK([ovs-ofctl dump-flows br0], [0], [stdout]) |
11f9de00 | 5504 | AT_CHECK([STRIP_XIDS stdout | sed -n 's/duration=[[0-9]]*\.[[0-9]]*s/duration=0.0s/p' | sort], [0], [dnl |
e96a5c24 | 5505 | cookie=0x0, duration=0.0s, table=0, n_packets=0, n_bytes=0, idle_age=1, icmp actions=NORMAL |
11f9de00 | 5506 | cookie=0x0, duration=0.0s, table=0, n_packets=10, n_bytes=600, idle_age=1, ip actions=NORMAL |
e96a5c24 JS |
5507 | ]) |
5508 | OVS_VSWITCHD_STOP | |
5509 | AT_CLEANUP | |
5510 | ||
5511 | AT_SETUP([ofproto-dpif - flow stats, set-n-threads]) | |
5512 | OVS_VSWITCHD_START | |
5513 | AT_CHECK([ovs-ofctl add-flow br0 "ip,actions=NORMAL"]) | |
5514 | AT_CHECK([ovs-ofctl add-flow br0 "icmp,actions=NORMAL"]) | |
5515 | ||
5516 | ovs-appctl time/stop | |
5517 | ||
5518 | for i in `seq 1 10`; do | |
5519 | 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)' | |
5520 | done | |
5521 | ||
5522 | ovs-appctl time/warp 100 | |
5523 | AT_CHECK([ovs-vsctl set Open_vSwitch . other-config:n-revalidator-threads=2]) | |
5524 | ovs-appctl time/warp 1000 | |
5525 | ||
23a7d252 | 5526 | AT_CHECK([ovs-ofctl dump-flows br0], [0], [stdout]) |
11f9de00 | 5527 | AT_CHECK([STRIP_XIDS stdout | sed -n 's/duration=[[0-9]]*\.[[0-9]]*s/duration=0.0s/p' | sort], [0], [dnl |
23a7d252 | 5528 | cookie=0x0, duration=0.0s, table=0, n_packets=0, n_bytes=0, idle_age=1, icmp actions=NORMAL |
11f9de00 | 5529 | cookie=0x0, duration=0.0s, table=0, n_packets=10, n_bytes=600, idle_age=1, ip actions=NORMAL |
23a7d252 JS |
5530 | ]) |
5531 | OVS_VSWITCHD_STOP | |
5532 | AT_CLEANUP | |
5533 | ||
5f5ebd4c | 5534 | AT_SETUP([ofproto-dpif - idle_age and hard_age increase over time]) |
f27f2134 BP |
5535 | OVS_VSWITCHD_START |
5536 | ||
5537 | # get_ages DURATION HARD IDLE | |
5538 | # | |
5539 | # Fetch the flow duration, hard age, and idle age into the variables | |
5540 | # whose names are given as arguments. Rounds DURATION down to the | |
5541 | # nearest integer. If hard_age doesn't appear in the output, sets | |
5542 | # HARD to "none". If idle_age doesn't appear in the output, sets IDLE | |
5543 | # to 0. | |
5544 | get_ages () { | |
5545 | AT_CHECK([ovs-ofctl dump-flows br0], [0], [stdout]) | |
5546 | ||
5547 | duration=`sed -n 's/.*duration=\([[0-9]]*\)\(\.[[0-9]]*\)\{0,1\}s.*/\1/p' stdout` | |
5548 | AT_CHECK([[expr X"$duration" : 'X[0-9][0-9]*$']], [0], [ignore]) | |
5549 | AS_VAR_COPY([$1], [duration]) | |
5550 | ||
5551 | hard=`sed -n 's/.*hard_age=\([[0-9]]*\),.*/\1/p' stdout` | |
5552 | if test X"$hard" = X; then | |
5553 | hard=none | |
5554 | else | |
5555 | AT_CHECK([[expr X"$hard" : 'X[0-9][0-9]*$']], [0], [ignore]) | |
5556 | fi | |
5557 | AS_VAR_COPY([$2], [hard]) | |
5558 | ||
5559 | idle=`sed -n 's/.*idle_age=\([[0-9]]*\),.*/\1/p' stdout` | |
5560 | if test X"$idle" = X; then | |
5561 | idle=0 | |
5562 | else | |
5563 | AT_CHECK([[expr X"$idle" : 'X[0-9][0-9]*$']], [0], [ignore]) | |
5564 | fi | |
5565 | AS_VAR_COPY([$3], [idle]) | |
5566 | } | |
5567 | ||
5568 | # Add a flow and get its initial hard and idle age. | |
5569 | AT_CHECK([ovs-ofctl add-flow br0 hard_timeout=199,idle_timeout=188,actions=drop]) | |
5570 | get_ages duration1 hard1 idle1 | |
5571 | ||
31ef9f51 | 5572 | ovs-appctl time/stop |
f27f2134 BP |
5573 | # Warp time forward by 10 seconds, then modify the flow's actions. |
5574 | ovs-appctl time/warp 10000 | |
5575 | get_ages duration2 hard2 idle2 | |
5576 | AT_CHECK([ovs-ofctl mod-flows br0 actions=flood]) | |
5577 | ||
5578 | # Warp time forward by 10 seconds. | |
5579 | ovs-appctl time/warp 10000 | |
5580 | get_ages duration3 hard3 idle3 | |
5581 | ||
5582 | # Warp time forward 10 more seconds, then pass some packets through the flow, | |
5583 | # then warp forward a few more times because idle times are only updated | |
5584 | # occasionally. | |
5585 | ovs-appctl time/warp 10000 | |
5586 | 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)' | |
bdba1947 | 5587 | ovs-appctl time/warp 3000 1000 |
c0526804 | 5588 | sleep 1 |
f27f2134 BP |
5589 | get_ages duration4 hard4 idle4 |
5590 | ||
5591 | printf "duration: %4s => %4s => %4s => %4s\n" $duration1 $duration2 $duration3 $duration4 | |
5592 | printf "hard_age: %4s => %4s => %4s => %4s\n" $hard1 $hard2 $hard3 $hard4 | |
5593 | printf "idle_age: %4s => %4s => %4s => %4s\n" $idle1 $idle2 $idle3 $idle4 | |
5594 | ||
5595 | # Duration should increase steadily over time. | |
5596 | AT_CHECK([test $duration1 -lt $duration2]) | |
5597 | AT_CHECK([test $duration2 -lt $duration3]) | |
5598 | AT_CHECK([test $duration3 -lt $duration4]) | |
5599 | ||
5600 | # Hard age should be "none" initially because it's the same as flow_duration, | |
5601 | # then it should increase. | |
5602 | AT_CHECK([test $hard1 = none]) | |
5603 | AT_CHECK([test $hard2 = none]) | |
5604 | AT_CHECK([test $hard3 != none]) | |
5605 | AT_CHECK([test $hard4 != none]) | |
5606 | AT_CHECK([test $hard3 -lt $hard4]) | |
5607 | ||
5608 | # Idle age should increase from 1 to 2 to 3, then decrease. | |
5609 | AT_CHECK([test $idle1 -lt $idle2]) | |
5610 | AT_CHECK([test $idle2 -lt $idle3]) | |
5611 | AT_CHECK([test $idle3 -gt $idle4]) | |
5612 | ||
5613 | # Check some invariant relationships. | |
5614 | AT_CHECK([test $duration1 = $idle1]) | |
5615 | AT_CHECK([test $duration2 = $idle2]) | |
5616 | AT_CHECK([test $duration3 = $idle3]) | |
5617 | AT_CHECK([test $idle3 -gt $hard3]) | |
5618 | AT_CHECK([test $idle4 -lt $hard4]) | |
5619 | AT_CHECK([test $hard4 -lt $duration4]) | |
5620 | ||
5621 | OVS_VSWITCHD_STOP | |
5622 | AT_CLEANUP | |
0e553d9c BP |
5623 | |
5624 | AT_SETUP([ofproto-dpif - fin_timeout]) | |
5625 | OVS_VSWITCHD_START | |
b5c1a5df | 5626 | ovs-appctl time/stop |
0e553d9c BP |
5627 | AT_CHECK([ovs-ofctl add-flow br0 'idle_timeout=60,actions=fin_timeout(idle_timeout=5)']) |
5628 | AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip], [0], | |
5629 | [NXST_FLOW reply: | |
5630 | idle_timeout=60, actions=fin_timeout(idle_timeout=5) | |
5631 | ]) | |
31ef9f51 | 5632 | |
0e553d9c BP |
5633 | # Check that a TCP SYN packet does not change the timeout. (Because |
5634 | # flow stats updates are mainly what implements the fin_timeout | |
5635 | # feature, we warp forward a couple of times to ensure that flow stats | |
5636 | # run before re-checking the flow table.) | |
323cc924 | 5637 | AT_CHECK([ovs-appctl netdev-dummy/receive br0 0021853763af0026b98cb0f908004500003c2e2440004006465dac11370dac11370b828b0016751e267b00000000a00216d017360000020405b40402080a2d25085f0000000001030307]) |
0e553d9c BP |
5638 | AT_CHECK([ovs-appctl time/warp 1000 && ovs-appctl time/warp 1000], [0], [warped |
5639 | warped | |
5640 | ]) | |
cea4a6d7 | 5641 | AT_CHECK([ovs-appctl revalidator/purge], [0]) |
0e553d9c BP |
5642 | AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip], [0], |
5643 | [NXST_FLOW reply: | |
5644 | n_packets=1, n_bytes=74, idle_timeout=60, actions=fin_timeout(idle_timeout=5) | |
5645 | ]) | |
5646 | # Check that a TCP FIN packet does change the timeout. | |
323cc924 | 5647 | AT_CHECK([ovs-appctl netdev-dummy/receive br0 0021853763af0026b98cb0f90800451000342e3e40004006463bac11370dac11370b828b0016751e319dfc96399b801100717ae800000101080a2d250a9408579588]) |
0e553d9c BP |
5648 | AT_CHECK([ovs-appctl time/warp 1000 && ovs-appctl time/warp 1000], [0], [warped |
5649 | warped | |
5650 | ]) | |
5651 | AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip], [0], | |
5652 | [NXST_FLOW reply: | |
5653 | n_packets=2, n_bytes=140, idle_timeout=5, actions=fin_timeout(idle_timeout=5) | |
5654 | ]) | |
5655 | OVS_VSWITCHD_STOP | |
5656 | AT_CLEANUP | |
27022416 JP |
5657 | |
5658 | AT_SETUP([ofproto-dpif - ovs-appctl dpif/dump-dps]) | |
5659 | OVS_VSWITCHD_START([add-br br1 -- set bridge br1 datapath-type=dummy]) | |
5660 | ADD_OF_PORTS([br0], [1], [2]) | |
5661 | ADD_OF_PORTS([br1], [3]) | |
5662 | ||
5663 | AT_CHECK([ovs-appctl dpif/dump-dps], [0], [dnl | |
5664 | dummy@br0 | |
5665 | dummy@br1 | |
5666 | ]) | |
5667 | OVS_VSWITCHD_STOP | |
5668 | AT_CLEANUP | |
5669 | ||
5670 | AT_SETUP([ofproto-dpif - ovs-appctl dpif/show]) | |
5671 | OVS_VSWITCHD_START([add-br br1 -- set bridge br1 datapath-type=dummy]) | |
5672 | ADD_OF_PORTS([br0], [1], [2]) | |
5673 | ADD_OF_PORTS([br1], [3]) | |
5674 | ||
5675 | AT_CHECK([ovs-appctl dpif/show], [0], [dnl | |
dc54ef36 | 5676 | dummy@ovs-dummy: hit:0 missed:0 |
e79a6c83 | 5677 | br0: |
dc54ef36 EJ |
5678 | br0 65534/100: (dummy) |
5679 | p1 1/1: (dummy) | |
5680 | p2 2/2: (dummy) | |
e79a6c83 | 5681 | br1: |
dc54ef36 EJ |
5682 | br1 65534/101: (dummy) |
5683 | p3 3/3: (dummy) | |
27022416 JP |
5684 | ]) |
5685 | OVS_VSWITCHD_STOP | |
5686 | AT_CLEANUP | |
5687 | ||
5688 | AT_SETUP([ofproto-dpif - ovs-appctl dpif/dump-flows]) | |
054e5aa6 | 5689 | # bump max-idle to avoid the flows being reclaimed behind us |
27022416 | 5690 | OVS_VSWITCHD_START([add-br br1 -- \ |
054e5aa6 YT |
5691 | set bridge br1 datapath-type=dummy fail-mode=secure -- \ |
5692 | set Open_vSwitch . other_config:max-idle=10000]) | |
27022416 JP |
5693 | ADD_OF_PORTS([br0], [1], [2]) |
5694 | ADD_OF_PORTS([br1], [3]) | |
5695 | ||
323cc924 BP |
5696 | 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)']) |
5697 | 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)']) | |
5698 | 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)']) | |
27f57736 | 5699 | ovs-appctl revalidator/wait |
70e5ed6f | 5700 | AT_CHECK([ovs-appctl dpif/dump-flows br0 | STRIP_UFID | STRIP_USED | sort], [0], [dnl |
16194afd DDP |
5701 | recirc_id(0),in_port(1),eth_type(0x0800),ipv4(frag=no), packets:0, bytes:0, used:never, actions:drop |
5702 | recirc_id(0),in_port(2),eth_type(0x0800),ipv4(frag=no), packets:0, bytes:0, used:never, actions:drop | |
27022416 JP |
5703 | ]) |
5704 | ||
70e5ed6f | 5705 | AT_CHECK([ovs-appctl dpif/dump-flows br1 | STRIP_UFID | STRIP_USED | sort], [0], [dnl |
16194afd | 5706 | recirc_id(0),in_port(3),eth_type(0x0800),ipv4(frag=no), packets:0, bytes:0, used:never, actions:drop |
27022416 JP |
5707 | ]) |
5708 | ||
70e5ed6f | 5709 | AT_CHECK([ovs-appctl dpif/dump-flows -m br0 | STRIP_UFID | STRIP_USED | sort], [0], [dnl |
16194afd DDP |
5710 | skb_priority(0/0),skb_mark(0/0),recirc_id(0),dp_hash(0/0),in_port(p1),eth(src=50:54:00:00:00:05/00:00:00:00:00:00,dst=50:54:00:00:00:07/00:00:00:00:00:00),eth_type(0x0800),ipv4(src=192.168.0.1/0.0.0.0,dst=192.168.0.2/0.0.0.0,proto=1/0,tos=0/0,ttl=64/0,frag=no),icmp(type=8/0,code=0/0), packets:0, bytes:0, used:never, actions:drop |
5711 | skb_priority(0/0),skb_mark(0/0),recirc_id(0),dp_hash(0/0),in_port(p2),eth(src=50:54:00:00:00:07/00:00:00:00:00:00,dst=50:54:00:00:00:05/00:00:00:00:00:00),eth_type(0x0800),ipv4(src=192.168.0.2/0.0.0.0,dst=192.168.0.1/0.0.0.0,proto=1/0,tos=0/0,ttl=64/0,frag=no),icmp(type=0/0,code=0/0), packets:0, bytes:0, used:never, actions:drop | |
04b541df GS |
5712 | ]) |
5713 | ||
70e5ed6f | 5714 | AT_CHECK([ovs-appctl dpif/dump-flows -m br1 | STRIP_UFID | STRIP_USED | sort], [0], [dnl |
16194afd | 5715 | skb_priority(0/0),skb_mark(0/0),recirc_id(0),dp_hash(0/0),in_port(p3),eth(src=50:54:00:00:00:09/00:00:00:00:00:00,dst=50:54:00:00:00:0a/00:00:00:00:00:00),eth_type(0x0800),ipv4(src=10.0.0.2/0.0.0.0,dst=10.0.0.1/0.0.0.0,proto=1/0,tos=0/0,ttl=64/0,frag=no),icmp(type=8/0,code=0/0), packets:0, bytes:0, used:never, actions:drop |
818650e6 JS |
5716 | ]) |
5717 | ||
5718 | OVS_VSWITCHD_STOP | |
5719 | AT_CLEANUP | |
5720 | ||
5721 | AT_SETUP([ofproto-dpif - ovs-appctl dpif/get-flow]) | |
5722 | ||
5723 | OVS_VSWITCHD_START([add-br br1 -- \ | |
5724 | set bridge br1 datapath-type=dummy fail-mode=secure -- \ | |
5725 | set Open_vSwitch . other_config:max-idle=10000]) | |
5726 | ADD_OF_PORTS([br0], [1], [2]) | |
5727 | ||
5728 | 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)']) | |
5729 | ovs-appctl revalidator/wait | |
5730 | AT_CHECK([ovs-appctl dpif/dump-flows -m br0], [0], [stdout]) | |
5731 | ||
10e92b4f | 5732 | UFID=`sed -n 's/\(ufid:[[-0-9a-fA-F]]*\).*/\1/p' stdout` |
818650e6 JS |
5733 | AT_CHECK([ovs-appctl dpctl/get-flow $UFID], [0], [dnl |
5734 | recirc_id(0),in_port(1),eth_type(0x0800),ipv4(frag=no), packets:0, bytes:0, used:never, actions:drop | |
04b541df GS |
5735 | ]) |
5736 | ||
27022416 JP |
5737 | OVS_VSWITCHD_STOP |
5738 | AT_CLEANUP | |
5739 | ||
50c1efc9 | 5740 | AT_SETUP([ofproto-dpif - MPLS actions that result in a userspace action]) |
8bfd0fda BP |
5741 | OVS_VSWITCHD_START([dnl |
5742 | add-port br0 p1 -- set Interface p1 type=dummy | |
5743 | ]) | |
623540e4 | 5744 | AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg]) |
8bfd0fda BP |
5745 | ON_EXIT([kill `cat ovs-ofctl.pid`]) |
5746 | ||
5747 | AT_CAPTURE_FILE([ofctl_monitor.log]) | |
5748 | AT_DATA([flows.txt], [dnl | |
5749 | dl_src=60:66:66:66:66:00 actions=push_mpls:0x8847,controller | |
5750 | dl_src=60:66:66:66:66:01 actions=pop_mpls:0x8849,controller | |
5751 | ]) | |
5752 | AT_CHECK([ovs-ofctl add-flows br0 flows.txt]) | |
5753 | ||
5754 | dnl Packet is sent to userspace because a MPLS push or pop action is applied to | |
47fb7f71 | 5755 | dnl a packet with 2 MPLS LSEs but dpif-netdev can't handle any labels. |
8bfd0fda | 5756 | dnl |
47fb7f71 | 5757 | dnl The input is a frame with two MPLS labels which tcpdump -vve shows as: |
8bfd0fda | 5758 | 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) |
8bfd0fda BP |
5759 | dnl (label 20, exp 0, [S], ttl 32) |
5760 | dnl (tos 0x0, ttl 64, id 0, offset 0, flags [none], proto TCP (6), length 44, bad cksum 3b78 (->f978)!) | |
5761 | dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4 | |
5762 | ||
5763 | for dl_src in 00 01; do | |
47fb7f71 | 5764 | 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"]) |
e3b9e3aa YT |
5765 | done |
5766 | sleep 1 # wait for the datapath flow installed | |
70e5ed6f | 5767 | AT_CHECK_UNQUOTED([cat ovs-vswitchd.log | STRIP_UFID | FILTER_FLOW_INSTALL | STRIP_USED], [0], [dnl |
22d38fca JR |
5768 | recirc_id=0,mpls,in_port=1,dl_src=60:66:66:66:66:00,mpls_label=20,mpls_tc=0,mpls_ttl=32,mpls_bos=0,mpls_lse1=82208, actions:userspace(pid=0,slow_path(controller)) |
5769 | recirc_id=0,mpls,in_port=1,dl_src=60:66:66:66:66:01,mpls_bos=0,mpls_lse1=82208, actions:userspace(pid=0,slow_path(controller)) | |
8bfd0fda | 5770 | ]) |
8bfd0fda BP |
5771 | |
5772 | OVS_VSWITCHD_STOP | |
5773 | AT_CLEANUP | |
5774 | ||
5775 | ||
50c1efc9 | 5776 | AT_SETUP([ofproto-dpif - MPLS actions that result in a drop]) |
8bfd0fda BP |
5777 | OVS_VSWITCHD_START([dnl |
5778 | add-port br0 p1 -- set Interface p1 type=dummy | |
5779 | ]) | |
623540e4 | 5780 | AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg]) |
8bfd0fda BP |
5781 | ON_EXIT([kill `cat ovs-ofctl.pid`]) |
5782 | ||
5783 | AT_CAPTURE_FILE([ofctl_monitor.log]) | |
5784 | AT_DATA([flows.txt], [dnl | |
5785 | dl_src=60:66:66:66:66:00 actions=push_mpls:0x8847,controller | |
5786 | dl_src=60:66:66:66:66:01 actions=pop_mpls:0x8849,controller | |
5787 | ]) | |
5788 | AT_CHECK([ovs-ofctl add-flows br0 flows.txt]) | |
5789 | ||
5790 | dnl Packet is dropped because an MPLS PUSH action is applied to a packet with | |
5791 | dnl 4 MPLS LSEs but ovs-vswtichd can only handle up to 3 MPLS LSEs and thus | |
47fb7f71 | 5792 | dnl can't determine the resulting MPLS label after MPLS push/pop actions. |
8bfd0fda BP |
5793 | dnl |
5794 | dnl The input is a frame with two MPLS headers which tcpdump -vve shows as: | |
5795 | 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) | |
5796 | dnl (label 20, exp 0, ttl 32) | |
5797 | dnl (label 20, exp 0, ttl 32) | |
5798 | dnl (label 20, exp 0, [S], ttl 32) | |
5799 | dnl (tos 0x0, ttl 64, id 0, offset 0, flags [none], proto TCP (6), length 44, bad cksum 3b78 (->f978)!) | |
5800 | dnl 192.168.0.1.80 > 192.168.0.2.0: Flags [none], cksum 0x7744 (correct), seq 42:46, win 10000, length 4 | |
8bfd0fda | 5801 | |
47fb7f71 JS |
5802 | for dl_src in 00 01; do |
5803 | 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"]) | |
e3b9e3aa YT |
5804 | done |
5805 | sleep 1 # wait for the datapath flow installed | |
70e5ed6f | 5806 | AT_CHECK_UNQUOTED([cat ovs-vswitchd.log | STRIP_UFID | FILTER_FLOW_INSTALL | STRIP_USED], [0], [dnl |
22d38fca JR |
5807 | recirc_id=0,mpls,in_port=1,dl_src=60:66:66:66:66:00,mpls_label=20,mpls_tc=0,mpls_ttl=32,mpls_bos=0,mpls_lse1=82208, actions:userspace(pid=0,slow_path(controller)) |
5808 | recirc_id=0,mpls,in_port=1,dl_src=60:66:66:66:66:01,mpls_bos=0,mpls_lse1=82208, actions:userspace(pid=0,slow_path(controller)) | |
8bfd0fda BP |
5809 | ]) |
5810 | ||
5811 | OVS_VSWITCHD_STOP | |
5812 | AT_CLEANUP | |
5813 | ||
0a740f48 EJ |
5814 | AT_SETUP([ofproto-dpif - patch ports]) |
5815 | OVS_VSWITCHD_START([add-br br1 \ | |
5816 | -- set bridge br1 datapath-type=dummy fail-mode=secure \ | |
5817 | -- add-port br1 pbr1 -- set int pbr1 type=patch options:peer=pbr0 \ | |
5818 | -- add-port br0 pbr0 -- set int pbr0 type=patch options:peer=pbr1]) | |
5819 | ||
5820 | ADD_OF_PORTS([br0], [2]) | |
5821 | ADD_OF_PORTS([br1], [3]) | |
5822 | ||
64bb477f JS |
5823 | AT_CHECK([ovs-appctl upcall/disable-ufid], [0], [Datapath dumping tersely using UFID disabled |
5824 | ], []) | |
aef0491b | 5825 | AT_CHECK([ovs-appctl time/stop]) |
623540e4 | 5826 | AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg]) |
9fc0165a | 5827 | |
0a740f48 EJ |
5828 | AT_CHECK([ovs-ofctl add-flow br0 actions=LOCAL,output:1,output:2]) |
5829 | AT_CHECK([ovs-ofctl add-flow br1 actions=LOCAL,output:1,output:3]) | |
5830 | ||
5831 | for i in $(seq 1 10); do | |
5832 | 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)' | |
3b401f9b BP |
5833 | if [[ $i -eq 1 ]]; then |
5834 | sleep 1 | |
5835 | fi | |
0a740f48 EJ |
5836 | done |
5837 | ||
5838 | for i in $(seq 1 5); do | |
5839 | 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)' | |
3b401f9b BP |
5840 | if [[ $i -eq 1 ]]; then |
5841 | sleep 1 | |
5842 | fi | |
0a740f48 EJ |
5843 | done |
5844 | ||
0a8763fc EJ |
5845 | AT_CHECK([ovs-appctl time/warp 500], [0], |
5846 | [warped | |
735d7efb | 5847 | ]) |
732207ad | 5848 | sleep 1 # wait for log writer |
735d7efb | 5849 | |
0a740f48 | 5850 | AT_CHECK([ovs-appctl dpif/show], [0], [dnl |
dc54ef36 | 5851 | dummy@ovs-dummy: hit:13 missed:2 |
e79a6c83 | 5852 | br0: |
dc54ef36 EJ |
5853 | br0 65534/100: (dummy) |
5854 | p2 2/2: (dummy) | |
5855 | pbr0 1/none: (patch: peer=pbr1) | |
e79a6c83 | 5856 | br1: |
dc54ef36 EJ |
5857 | br1 65534/101: (dummy) |
5858 | p3 3/3: (dummy) | |
5859 | pbr1 1/none: (patch: peer=pbr0) | |
0a740f48 EJ |
5860 | ]) |
5861 | ||
70e5ed6f | 5862 | AT_CHECK([cat ovs-vswitchd.log | STRIP_UFID | FILTER_FLOW_INSTALL | STRIP_USED], [0], [dnl |
16194afd DDP |
5863 | recirc_id=0,ip,in_port=100,nw_frag=no, actions:101,3,2 |
5864 | recirc_id=0,ip,in_port=101,nw_frag=no, actions:100,2,3 | |
c2a77f33 JS |
5865 | ]) |
5866 | ||
70e5ed6f | 5867 | AT_CHECK([cat ovs-vswitchd.log | grep -e 'in_port(100).*packets:9' | STRIP_UFID | FILTER_FLOW_DUMP], [0], [dnl |
16194afd | 5868 | skb_priority(0/0),skb_mark(0/0),recirc_id(0),dp_hash(0/0),in_port(100),eth(src=50:54:00:00:00:05/00:00:00:00:00:00,dst=50:54:00:00:00:07/00:00:00:00:00:00),eth_type(0x0800),ipv4(src=192.168.0.1/0.0.0.0,dst=192.168.0.2/0.0.0.0,proto=1/0,tos=0/0,ttl=64/0,frag=no),icmp(type=8/0,code=0/0), packets:9, bytes:540, used:0.0s, actions:101,3,2 |
c2a77f33 | 5869 | ]) |
70e5ed6f | 5870 | AT_CHECK([cat ovs-vswitchd.log | grep -e 'in_port(101).*packets:4' | STRIP_UFID | FILTER_FLOW_DUMP], [0], [dnl |
16194afd | 5871 | skb_priority(0/0),skb_mark(0/0),recirc_id(0),dp_hash(0/0),in_port(101),eth(src=50:54:00:00:00:07/00:00:00:00:00:00,dst=50:54:00:00:00:05/00:00:00:00:00:00),eth_type(0x0800),ipv4(src=192.168.0.2/0.0.0.0,dst=192.168.0.1/0.0.0.0,proto=1/0,tos=0/0,ttl=64/0,frag=no),icmp(type=8/0,code=0/0), packets:4, bytes:240, used:0.0s, actions:100,2,3 |
0a740f48 EJ |
5872 | ]) |
5873 | ||
5874 | AT_CHECK([ovs-ofctl dump-ports br0 pbr0], [0], [dnl | |
5875 | OFPST_PORT reply (xid=0x4): 1 ports | |
5876 | port 1: rx pkts=5, bytes=300, drop=0, errs=0, frame=0, over=0, crc=0 | |
5877 | tx pkts=10, bytes=600, drop=0, errs=0, coll=0 | |
5878 | ]) | |
5879 | ||
5880 | AT_CHECK([ovs-ofctl dump-ports br1 pbr1], [0], [dnl | |
5881 | OFPST_PORT reply (xid=0x4): 1 ports | |
5882 | port 1: rx pkts=10, bytes=600, drop=0, errs=0, frame=0, over=0, crc=0 | |
5883 | tx pkts=5, bytes=300, drop=0, errs=0, coll=0 | |
5884 | ]) | |
5885 | ||
5886 | OVS_VSWITCHD_STOP | |
5887 | AT_CLEANUP | |
655ab909 | 5888 | |
1774d762 JR |
5889 | AT_SETUP([ofproto-dpif - patch ports - stack]) |
5890 | OVS_VSWITCHD_START([add-br br1 \ | |
5891 | -- set bridge br1 datapath-type=dummy fail-mode=secure \ | |
5892 | -- add-port br1 pbr1 -- set int pbr1 type=patch options:peer=pbr0 \ | |
5893 | -- add-port br0 pbr0 -- set int pbr0 type=patch options:peer=pbr1]) | |
5894 | ||
5895 | ADD_OF_PORTS([br0], [2]) | |
5896 | ADD_OF_PORTS([br1], [3]) | |
5897 | ||
5898 | AT_CHECK([ovs-appctl upcall/disable-ufid], [0], [Datapath dumping tersely using UFID disabled | |
5899 | ], []) | |
5900 | AT_CHECK([ovs-appctl time/stop]) | |
5901 | AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg]) | |
5902 | ||
5903 | AT_CHECK([ovs-ofctl add-flow br0 "ip actions=push:OXM_OF_IN_PORT[[0..31]],output:1,pop:OXM_OF_IPV4_SRC[[0..31]],output:2"]) | |
5904 | # Try to pop from empty stack, and push and leave data to stack. | |
5905 | AT_CHECK([ovs-ofctl add-flow br1 "ip actions=pop:OXM_OF_IPV4_DST[[0..31]],push:NXM_NX_REG1[[0..31]],LOCAL"]) | |
5906 | ||
5907 | 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)' | |
5908 | ||
5909 | AT_CHECK([ovs-appctl time/warp 500], [0], | |
5910 | [warped | |
5911 | ]) | |
5912 | ||
5913 | OVS_WAIT_UNTIL([test `grep flow_add ovs-vswitchd.log | wc -l` -ge 1]) | |
5914 | ||
5915 | AT_CHECK([ovs-appctl dpif/show], [0], [dnl | |
5916 | dummy@ovs-dummy: hit:0 missed:1 | |
5917 | br0: | |
5918 | br0 65534/100: (dummy) | |
5919 | p2 2/2: (dummy) | |
5920 | pbr0 1/none: (patch: peer=pbr1) | |
5921 | br1: | |
5922 | br1 65534/101: (dummy) | |
5923 | p3 3/3: (dummy) | |
5924 | pbr1 1/none: (patch: peer=pbr0) | |
5925 | ]) | |
5926 | ||
5927 | AT_CHECK([cat ovs-vswitchd.log | STRIP_UFID | FILTER_FLOW_INSTALL | STRIP_USED], [0], [dnl | |
5928 | recirc_id=0,ip,in_port=100,nw_src=192.168.0.1,nw_frag=no, actions:101,set(ipv4(src=255.255.255.254)),2 | |
5929 | ]) | |
5930 | ||
5931 | AT_CHECK([cat ovs-vswitchd.log | grep -e '|nx_match|WARN|' | sed "s/^.*|WARN|//"], [0], [dnl | |
5932 | Failed to pop from an empty stack. On flow | |
5933 | ]) | |
5934 | ||
5935 | OVS_VSWITCHD_STOP(["/Failed to pop from an empty stack/d"]) | |
5936 | AT_CLEANUP | |
5937 | ||
65e0be10 BP |
5938 | AT_SETUP([ofproto-dpif - port duration]) |
5939 | OVS_VSWITCHD_START([set Bridge br0 protocols=OpenFlow13]) | |
5940 | ADD_OF_PORTS([br0], 1, 2) | |
5941 | ||
31ef9f51 | 5942 | ovs-appctl time/stop |
65e0be10 BP |
5943 | ovs-appctl time/warp 10000 |
5944 | ||
5945 | AT_CHECK([ovs-ofctl -O openflow13 dump-ports br0], [0], [stdout]) | |
125bf01d | 5946 | AT_CHECK([sed -n 's/=[[0-9]][[0-9]]\(\.[[0-9]][[0-9]]*\)\{0,1\}s/=?s/p' stdout], [0], |
65e0be10 | 5947 | [dnl |
65e0be10 | 5948 | duration=?s |
65e0be10 | 5949 | duration=?s |
65e0be10 BP |
5950 | duration=?s |
5951 | ]) | |
5952 | OVS_VSWITCHD_STOP | |
5953 | AT_CLEANUP | |
bcd2633a JP |
5954 | |
5955 | dnl ---------------------------------------------------------------------- | |
5956 | AT_BANNER([ofproto-dpif -- megaflows]) | |
5957 | ||
bcd2633a JP |
5958 | AT_SETUP([ofproto-dpif megaflow - port classification]) |
5959 | OVS_VSWITCHD_START | |
623540e4 | 5960 | AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg]) |
bcd2633a JP |
5961 | ADD_OF_PORTS([br0], [1], [2]) |
5962 | AT_DATA([flows.txt], [dnl | |
5963 | table=0 in_port=1 actions=output(2) | |
5964 | ]) | |
5965 | AT_CHECK([ovs-ofctl add-flows br0 flows.txt]) | |
5966 | 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)']) | |
53555f51 | 5967 | sleep 1 |
bcd2633a | 5968 | 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)']) |
ae692725 | 5969 | sleep 1 |
c2a77f33 | 5970 | AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl |
16194afd | 5971 | recirc_id=0,ip,in_port=1,nw_frag=no, actions: <del> |
bcd2633a JP |
5972 | ]) |
5973 | OVS_VSWITCHD_STOP | |
5974 | AT_CLEANUP | |
5975 | ||
5976 | AT_SETUP([ofproto-dpif megaflow - L2 classification]) | |
5977 | OVS_VSWITCHD_START | |
623540e4 | 5978 | AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg]) |
bcd2633a JP |
5979 | ADD_OF_PORTS([br0], [1], [2]) |
5980 | AT_DATA([flows.txt], [dnl | |
5981 | table=0 in_port=1,dl_src=50:54:00:00:00:09 actions=output(2) | |
5982 | ]) | |
5983 | AT_CHECK([ovs-ofctl add-flows br0 flows.txt]) | |
5984 | 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)']) | |
5985 | 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)']) | |
ae692725 | 5986 | sleep 1 |
c2a77f33 | 5987 | AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl |
16194afd DDP |
5988 | recirc_id=0,ip,in_port=1,dl_src=50:54:00:00:00:09,nw_frag=no, actions: <del> |
5989 | recirc_id=0,ip,in_port=1,dl_src=50:54:00:00:00:0b/ff:ff:00:00:00:02,nw_frag=no, actions: <del> | |
bcd2633a JP |
5990 | ]) |
5991 | OVS_VSWITCHD_STOP | |
5992 | AT_CLEANUP | |
5993 | ||
5994 | AT_SETUP([ofproto-dpif megaflow - L3 classification]) | |
5995 | OVS_VSWITCHD_START | |
623540e4 | 5996 | AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg]) |
bcd2633a | 5997 | ADD_OF_PORTS([br0], [1], [2]) |
13751fd8 | 5998 | 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], []) |
bcd2633a JP |
5999 | AT_DATA([flows.txt], [dnl |
6000 | table=0 in_port=1,icmp,nw_src=10.0.0.4 actions=output(2) | |
6001 | ]) | |
6002 | AT_CHECK([ovs-ofctl add-flows br0 flows.txt]) | |
6003 | 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)']) | |
6004 | 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)']) | |
ae692725 | 6005 | sleep 1 |
c2a77f33 | 6006 | AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl |
16194afd DDP |
6007 | recirc_id=0,icmp,in_port=1,nw_src=10.0.0.4,nw_frag=no, actions: <del> |
6008 | recirc_id=0,ip,in_port=1,nw_src=10.0.0.2/0.0.0.2,nw_frag=no, actions: <del> | |
bcd2633a JP |
6009 | ]) |
6010 | OVS_VSWITCHD_STOP | |
6011 | AT_CLEANUP | |
6012 | ||
13751fd8 JR |
6013 | AT_SETUP([ofproto-dpif megaflow - IPv6 classification]) |
6014 | OVS_VSWITCHD_START | |
623540e4 | 6015 | AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg]) |
13751fd8 JR |
6016 | ADD_OF_PORTS([br0], [1], [2]) |
6017 | 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], []) | |
6018 | AT_DATA([flows.txt], [dnl | |
6019 | table=0 in_port=1,ipv6,ipv6_src=2001:db8:3c4d:1:2:3:4:5 actions=output(2) | |
6020 | ]) | |
6021 | AT_CHECK([ovs-ofctl add-flows br0 flows.txt]) | |
6022 | 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)']) | |
6023 | 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)']) | |
ae692725 | 6024 | sleep 1 |
c2a77f33 | 6025 | AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl |
16194afd | 6026 | recirc_id=0,ipv6,in_port=1,ipv6_src=2001:db8:3c4d:1:2:3:4:5,nw_frag=no, actions: <del> |
d70e8c28 | 6027 | recirc_id=0,ipv6,in_port=1,ipv6_src=2001:db8:3c4d:5:4:3:2:1/0:0:0:4::,nw_frag=no, actions: <del> |
13751fd8 JR |
6028 | ]) |
6029 | OVS_VSWITCHD_STOP | |
6030 | AT_CLEANUP | |
6031 | ||
bcd2633a JP |
6032 | AT_SETUP([ofproto-dpif megaflow - L4 classification]) |
6033 | OVS_VSWITCHD_START | |
623540e4 | 6034 | AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg]) |
bcd2633a JP |
6035 | ADD_OF_PORTS([br0], [1], [2]) |
6036 | AT_DATA([flows.txt], [dnl | |
6037 | table=0 in_port=1,icmp,icmp_type=8 actions=output(2) | |
6038 | ]) | |
6039 | AT_CHECK([ovs-ofctl add-flows br0 flows.txt]) | |
6040 | 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)']) | |
53555f51 | 6041 | sleep 1 |
bcd2633a | 6042 | 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)']) |
53555f51 | 6043 | sleep 1 |
c2a77f33 | 6044 | AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl |
16194afd | 6045 | recirc_id=0,icmp,in_port=1,nw_frag=no,icmp_type=0x8/0xff, actions: <del> |
bcd2633a JP |
6046 | ]) |
6047 | OVS_VSWITCHD_STOP | |
6048 | AT_CLEANUP | |
6049 | ||
6050 | AT_SETUP([ofproto-dpif megaflow - normal]) | |
6051 | OVS_VSWITCHD_START | |
623540e4 | 6052 | AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg]) |
bcd2633a JP |
6053 | ADD_OF_PORTS([br0], [1], [2]) |
6054 | AT_CHECK([ovs-ofctl add-flow br0 action=normal]) | |
6055 | 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)']) | |
6056 | 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)']) | |
ae692725 | 6057 | sleep 1 |
c2a77f33 | 6058 | AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl |
16194afd DDP |
6059 | recirc_id=0,ip,in_port=1,vlan_tci=0x0000/0x1fff,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,nw_frag=no, actions: <del> |
6060 | recirc_id=0,ip,in_port=1,vlan_tci=0x0000/0x1fff,dl_src=50:54:00:00:00:0b,dl_dst=50:54:00:00:00:0c,nw_frag=no, actions: <del> | |
bcd2633a JP |
6061 | ]) |
6062 | OVS_VSWITCHD_STOP | |
6063 | AT_CLEANUP | |
6064 | ||
6065 | AT_SETUP([ofproto-dpif megaflow - mpls]) | |
6066 | OVS_VSWITCHD_START | |
623540e4 | 6067 | AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg]) |
bcd2633a JP |
6068 | ADD_OF_PORTS([br0], [1], [2]) |
6069 | AT_DATA([flows.txt], [dnl | |
6070 | table=0 dl_src=50:54:00:00:00:09 actions=push_mpls:0x8847,2 | |
6071 | table=0 dl_src=50:54:00:00:00:0b actions=pop_mpls:0x0800,2 | |
6072 | ]) | |
6073 | AT_CHECK([ovs-ofctl add-flows br0 flows.txt]) | |
6074 | AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x8847),mpls(label=11,tc=3,ttl=64,bos=1)']) | |
6075 | AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0a),eth_type(0x8847),mpls(label=11,tc=3,ttl=64,bos=1)']) | |
ae692725 | 6076 | sleep 1 |
c2a77f33 | 6077 | AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl |
22d38fca JR |
6078 | recirc_id=0,mpls,in_port=1,dl_src=50:54:00:00:00:09,mpls_label=11,mpls_tc=3,mpls_ttl=64,mpls_bos=1, actions: <del> |
6079 | recirc_id=0,mpls,in_port=1,dl_src=50:54:00:00:00:0b,mpls_bos=1, actions: <del> | |
bcd2633a JP |
6080 | ]) |
6081 | OVS_VSWITCHD_STOP | |
6082 | AT_CLEANUP | |
6083 | ||
4819b3a5 | 6084 | # CHECK_MEGAFLOW_NETFLOW(LOOPBACK_ADDR) |
e731d71b | 6085 | m4_define([CHECK_MEGAFLOW_NETFLOW], |
4819b3a5 | 6086 | [OVS_VSWITCHD_START |
623540e4 | 6087 | AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg]) |
e731d71b AS |
6088 | ADD_OF_PORTS([br0], [1], [2]) |
6089 | ||
6090 | dnl NetFlow configuration disables wildcarding relevant fields | |
6091 | ON_EXIT([kill `cat test-netflow.pid`]) | |
eadd1644 | 6092 | AT_CHECK([ovstest test-netflow --log-file --detach --no-chdir --pidfile 0:$1 > netflow.log], [0], [], [ignore]) |
e731d71b | 6093 | AT_CAPTURE_FILE([netflow.log]) |
b52ecd96 | 6094 | NETFLOW_PORT=`parse_listening_port < test-netflow.log` |
e731d71b AS |
6095 | ovs-vsctl \ |
6096 | set Bridge br0 netflow=@nf -- \ | |
6097 | --id=@nf create NetFlow targets=\"$1:$NETFLOW_PORT\" \ | |
6098 | engine_id=1 engine_type=2 active_timeout=30 add-id-to-interface=false | |
6099 | ||
6100 | AT_CHECK([ovs-ofctl add-flow br0 action=normal]) | |
6101 | AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)']) | |
6102 | 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)']) | |
6103 | sleep 1 | |
c2a77f33 | 6104 | AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl |
16194afd DDP |
6105 | recirc_id=0,icmp,in_port=1,vlan_tci=0x0000/0x1fff,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,nw_src=10.0.0.2,nw_dst=10.0.0.1,nw_tos=0,nw_frag=no,icmp_type=0x8/0xff,icmp_code=0x0/0xff, actions: <del> |
6106 | recirc_id=0,icmp,in_port=1,vlan_tci=0x0000/0x1fff,dl_src=50:54:00:00:00:0b,dl_dst=50:54:00:00:00:0c,nw_src=10.0.0.4,nw_dst=10.0.0.3,nw_tos=0,nw_frag=no,icmp_type=0x8/0xff,icmp_code=0x0/0xff, actions: <del> | |
bcd2633a | 6107 | ]) |
4819b3a5 | 6108 | OVS_VSWITCHD_STOP]) |
e731d71b | 6109 | |
4819b3a5 | 6110 | AT_SETUP([ofproto-dpif megaflow - netflow - IPv4 collector]) |
e731d71b | 6111 | CHECK_MEGAFLOW_NETFLOW([127.0.0.1], [IPv4]) |
4819b3a5 BP |
6112 | AT_CLEANUP |
6113 | ||
6114 | AT_SETUP([ofproto-dpif megaflow - netflow - IPv6 collector]) | |
6115 | AT_SKIP_IF([test $HAVE_IPV6 = no]) | |
e731d71b | 6116 | CHECK_MEGAFLOW_NETFLOW([[[::1]]], [IPv6]) |
4819b3a5 | 6117 | AT_CLEANUP |
bcd2633a JP |
6118 | |
6119 | AT_SETUP([ofproto-dpif megaflow - normal, active-backup bonding]) | |
6120 | OVS_VSWITCHD_START( | |
6121 | [add-port br0 p1 -- set Interface p1 type=dummy ofport_request=1 -- \ | |
6122 | add-bond br0 bond0 p2 p3 bond_mode=active-backup -- \ | |
6123 | set interface p2 type=dummy ofport_request=2 -- \ | |
6124 | set interface p3 type=dummy ofport_request=3]) | |
6125 | AT_CHECK([ovs-appctl netdev-dummy/set-admin-state up], 0, [OK | |
6126 | ]) | |
623540e4 | 6127 | AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg]) |
bcd2633a JP |
6128 | |
6129 | AT_CHECK([ovs-ofctl add-flow br0 action=normal]) | |
6130 | 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)']) | |
6131 | 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)']) | |
ae692725 | 6132 | sleep 1 |
c2a77f33 | 6133 | AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl |
16194afd DDP |
6134 | recirc_id=0,ip,in_port=1,vlan_tci=0x0000/0x1fff,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,nw_frag=no, actions: <del> |
6135 | recirc_id=0,ip,in_port=1,vlan_tci=0x0000/0x1fff,dl_src=50:54:00:00:00:0b,dl_dst=50:54:00:00:00:0c,nw_frag=no, actions: <del> | |
bcd2633a JP |
6136 | ]) |
6137 | OVS_VSWITCHD_STOP | |
6138 | AT_CLEANUP | |
6139 | ||
6140 | AT_SETUP([ofproto-dpif megaflow - normal, balance-slb bonding]) | |
6141 | OVS_VSWITCHD_START( | |
6142 | [add-port br0 p1 -- set Interface p1 type=dummy ofport_request=1 -- \ | |
6143 | add-bond br0 bond0 p2 p3 bond_mode=balance-slb -- \ | |
6144 | set interface p2 type=dummy ofport_request=2 -- \ | |
6145 | set interface p3 type=dummy ofport_request=3]) | |
6146 | AT_CHECK([ovs-appctl netdev-dummy/set-admin-state up], 0, [OK | |
6147 | ]) | |
623540e4 | 6148 | AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg]) |
bcd2633a JP |
6149 | |
6150 | AT_CHECK([ovs-ofctl add-flow br0 action=normal]) | |
6151 | 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)']) | |
6152 | 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)']) | |
ae692725 | 6153 | sleep 1 |
c2a77f33 | 6154 | AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl |
16194afd DDP |
6155 | recirc_id=0,ip,in_port=1,vlan_tci=0x0000/0x1fff,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,nw_frag=no, actions: <del> |
6156 | recirc_id=0,ip,in_port=1,vlan_tci=0x0000/0x1fff,dl_src=50:54:00:00:00:0b,dl_dst=50:54:00:00:00:0c,nw_frag=no, actions: <del> | |
bcd2633a JP |
6157 | ]) |
6158 | OVS_VSWITCHD_STOP | |
6159 | AT_CLEANUP | |
6160 | ||
6161 | AT_SETUP([ofproto-dpif megaflow - normal, balance-tcp bonding]) | |
6162 | # Create bond0 on br0 with interfaces p0 and p1 | |
6163 | # and bond1 on br1 with interfaces p2 and p3 | |
6164 | # with p0 patched to p2 and p1 patched to p3. | |
6165 | OVS_VSWITCHD_START( | |
6166 | [add-bond br0 bond0 p0 p1 bond_mode=balance-tcp lacp=active \ | |
6167 | other-config:lacp-time=fast \ | |
6168 | other-config:bond-rebalance-interval=0 -- \ | |
6169 | set interface p0 type=patch options:peer=p2 ofport_request=1 -- \ | |
6170 | set interface p1 type=patch options:peer=p3 ofport_request=2 -- \ | |
6171 | add-br br1 -- \ | |
6172 | set bridge br1 other-config:hwaddr=aa:66:aa:66:00:00 -- \ | |
6173 | set bridge br1 datapath-type=dummy other-config:datapath-id=1234 \ | |
6174 | fail-mode=secure -- \ | |
6175 | add-bond br1 bond1 p2 p3 bond_mode=balance-tcp lacp=active \ | |
6176 | other-config:lacp-time=fast \ | |
6177 | other-config:bond-rebalance-interval=0 -- \ | |
6178 | set interface p2 type=patch options:peer=p0 ofport_request=3 -- \ | |
6179 | set interface p3 type=patch options:peer=p1 ofport_request=4 --]) | |
6180 | ||
6181 | AT_CHECK([ovs-appctl netdev-dummy/set-admin-state up], 0, [OK | |
6182 | ]) | |
623540e4 | 6183 | AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg]) |
bcd2633a JP |
6184 | ADD_OF_PORTS([br0], [7]) |
6185 | AT_CHECK([ovs-ofctl add-flow br0 action=normal]) | |
6186 | AT_CHECK([ovs-ofctl add-flow br1 action=normal]) | |
31ef9f51 | 6187 | ovs-appctl time/stop |
bcd2633a JP |
6188 | ovs-appctl time/warp 5000 |
6189 | 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)']) | |
6190 | 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)']) | |
53555f51 | 6191 | sleep 1 |
c2a77f33 | 6192 | AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl |
16194afd DDP |
6193 | recirc_id=0,ip,in_port=7,vlan_tci=0x0000/0x1fff,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,nw_frag=no, actions: <del> |
6194 | recirc_id=0,ip,in_port=7,vlan_tci=0x0000/0x1fff,dl_src=50:54:00:00:00:0b,dl_dst=50:54:00:00:00:0c,nw_frag=no, actions: <del> | |
bcd2633a JP |
6195 | ]) |
6196 | OVS_VSWITCHD_STOP | |
6197 | AT_CLEANUP | |
6198 | ||
6199 | AT_SETUP([ofproto-dpif megaflow - resubmit port action]) | |
6200 | OVS_VSWITCHD_START | |
623540e4 | 6201 | AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg]) |
bcd2633a JP |
6202 | ADD_OF_PORTS([br0], [1], [2]) |
6203 | AT_DATA([flows.txt], [dnl | |
6204 | table=0 in_port=1,ip actions=resubmit(90) | |
6205 | table=0 in_port=90,dl_src=50:54:00:00:00:09 actions=output(2) | |
6206 | ]) | |
6207 | AT_CHECK([ovs-ofctl add-flows br0 flows.txt]) | |
6208 | 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)']) | |
6209 | 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)']) | |
ae692725 | 6210 | sleep 1 |
c2a77f33 | 6211 | AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl |
16194afd DDP |
6212 | recirc_id=0,ip,in_port=1,dl_src=50:54:00:00:00:09,nw_frag=no, actions: <del> |
6213 | recirc_id=0,ip,in_port=1,dl_src=50:54:00:00:00:0b/ff:ff:00:00:00:02,nw_frag=no, actions: <del> | |
bcd2633a JP |
6214 | ]) |
6215 | OVS_VSWITCHD_STOP | |
6216 | AT_CLEANUP | |
6217 | ||
6218 | AT_SETUP([ofproto-dpif megaflow - resubmit table action]) | |
6219 | OVS_VSWITCHD_START | |
623540e4 | 6220 | AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg]) |
bcd2633a JP |
6221 | ADD_OF_PORTS([br0], [1], [2]) |
6222 | AT_DATA([flows.txt], [dnl | |
6223 | table=0 in_port=1,ip actions=resubmit(,1) | |
6224 | table=1 dl_src=50:54:00:00:00:09 actions=output(2) | |
6225 | ]) | |
6226 | AT_CHECK([ovs-ofctl add-flows br0 flows.txt]) | |
6227 | 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)']) | |
6228 | 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= | |
6229 | 1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)']) | |
ae692725 | 6230 | sleep 1 |
c2a77f33 | 6231 | AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl |
16194afd DDP |
6232 | recirc_id=0,ip,in_port=1,dl_src=50:54:00:00:00:09,nw_frag=no, actions: <del> |
6233 | recirc_id=0,ip,in_port=1,dl_src=50:54:00:00:00:0b,nw_frag=no, actions: <del> | |
bcd2633a JP |
6234 | ]) |
6235 | OVS_VSWITCHD_STOP | |
6236 | AT_CLEANUP | |
6237 | ||
6238 | AT_SETUP([ofproto-dpif megaflow - goto_table action]) | |
6239 | OVS_VSWITCHD_START | |
623540e4 | 6240 | AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg]) |
bcd2633a JP |
6241 | ADD_OF_PORTS([br0], [1], [2]) |
6242 | AT_DATA([flows.txt], [dnl | |
6243 | table=0 in_port=1,ip actions=goto_table(1) | |
6244 | table=1 dl_src=50:54:00:00:00:09 actions=output(2) | |
6245 | ]) | |
6246 | AT_CHECK([ovs-ofctl -O OpenFlow12 add-flows br0 flows.txt]) | |
6247 | 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)']) | |
6248 | 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)']) | |
ae692725 | 6249 | sleep 1 |
c2a77f33 | 6250 | AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl |
16194afd DDP |
6251 | recirc_id=0,ip,in_port=1,dl_src=50:54:00:00:00:09,nw_frag=no, actions: <del> |
6252 | recirc_id=0,ip,in_port=1,dl_src=50:54:00:00:00:0b,nw_frag=no, actions: <del> | |
bcd2633a JP |
6253 | ]) |
6254 | OVS_VSWITCHD_STOP | |
6255 | AT_CLEANUP | |
6256 | ||
6257 | AT_SETUP([ofproto-dpif megaflow - mirroring, select_all]) | |
6258 | OVS_VSWITCHD_START | |
623540e4 | 6259 | AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg]) |
bcd2633a JP |
6260 | ADD_OF_PORTS([br0], [1], [2], [3]) |
6261 | ovs-vsctl \ | |
6262 | set Bridge br0 mirrors=@m --\ | |
6263 | --id=@p3 get Port p3 --\ | |
6264 | --id=@m create Mirror name=mymirror select_all=true output_port=@p3 | |
6265 | ||
6266 | AT_DATA([flows.txt], [dnl | |
6267 | in_port=1 actions=output:2 | |
6268 | ]) | |
6269 | AT_CHECK([ovs-ofctl add-flows br0 flows.txt]) | |
6270 | 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)']) | |
53555f51 | 6271 | sleep 1 |
bcd2633a | 6272 | 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)']) |
ae692725 | 6273 | sleep 1 |
c2a77f33 | 6274 | AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl |
16194afd | 6275 | recirc_id=0,ip,in_port=1,nw_frag=no, actions: <del> |
bcd2633a JP |
6276 | ]) |
6277 | OVS_VSWITCHD_STOP | |
6278 | AT_CLEANUP | |
6279 | ||
6280 | AT_SETUP([ofproto-dpif megaflow - mirroring, select_vlan]) | |
6281 | OVS_VSWITCHD_START | |
623540e4 | 6282 | AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg]) |
bcd2633a JP |
6283 | ADD_OF_PORTS([br0], [1], [2], [3]) |
6284 | ovs-vsctl \ | |
6285 | set Bridge br0 mirrors=@m --\ | |
6286 | --id=@p2 get Port p2 -- --id=@p3 get Port p3 --\ | |
6287 | --id=@m create Mirror name=mymirror select_all=true select_vlan=11 output_port=@p3 | |
6288 | ||
6289 | AT_DATA([flows.txt], [dnl | |
6290 | in_port=1 actions=output:2 | |
6291 | ]) | |
6292 | AT_CHECK([ovs-ofctl add-flows br0 flows.txt]) | |
6293 | 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))']) | |
6294 | 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)']) | |
ae692725 | 6295 | sleep 1 |
c2a77f33 | 6296 | AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl |
16194afd DDP |
6297 | recirc_id=0,ip,in_port=1,dl_vlan=11,nw_frag=no, actions: <del> |
6298 | recirc_id=0,ip,in_port=1,vlan_tci=0x0000/0x1fff,nw_frag=no, actions: <del> | |
bcd2633a JP |
6299 | ]) |
6300 | OVS_VSWITCHD_STOP | |
6301 | AT_CLEANUP | |
6302 | ||
6303 | AT_SETUP([ofproto-dpif megaflow - move action]) | |
6304 | OVS_VSWITCHD_START | |
623540e4 | 6305 | AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg]) |
bcd2633a JP |
6306 | ADD_OF_PORTS([br0], [1], [2]) |
6307 | AT_DATA([flows.txt], [dnl | |
6308 | table=0 in_port=1 ip,actions=move:NXM_OF_IP_SRC[[]]->NXM_NX_REG0[[]],resubmit(90) | |
6309 | table=0 in_port=90 ip,actions=move:NXM_NX_REG0[[]]->NXM_NX_REG1[[]],resubmit(91) | |
6310 | table=0 in_port=91 reg0=0x0a000002,actions=output(2) | |
6311 | ]) | |
6312 | AT_CHECK([ovs-ofctl add-flows br0 flows.txt]) | |
6313 | 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)']) | |
6314 | 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)']) | |
ae692725 | 6315 | sleep 1 |
c2a77f33 | 6316 | AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl |
16194afd DDP |
6317 | recirc_id=0,ip,in_port=1,nw_src=10.0.0.2,nw_frag=no, actions: <del> |
6318 | recirc_id=0,ip,in_port=1,nw_src=10.0.0.4,nw_frag=no, actions: <del> | |
bcd2633a JP |
6319 | ]) |
6320 | OVS_VSWITCHD_STOP | |
6321 | AT_CLEANUP | |
6322 | ||
6323 | AT_SETUP([ofproto-dpif megaflow - push action]) | |
6324 | OVS_VSWITCHD_START | |
623540e4 | 6325 | AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg]) |
bcd2633a JP |
6326 | ADD_OF_PORTS([br0], [1], [2]) |
6327 | AT_DATA([flows.txt], [dnl | |
6328 | table=0 in_port=1 ip,actions=push:NXM_OF_IP_SRC[[]],output(2) | |
6329 | ]) | |
6330 | AT_CHECK([ovs-ofctl add-flows br0 flows.txt]) | |
6331 | AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)']) | |
6332 | 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)']) | |
ae692725 | 6333 | sleep 1 |
c2a77f33 | 6334 | AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl |
16194afd DDP |
6335 | recirc_id=0,ip,in_port=1,nw_src=10.0.0.2,nw_frag=no, actions: <del> |
6336 | recirc_id=0,ip,in_port=1,nw_src=10.0.0.4,nw_frag=no, actions: <del> | |
bcd2633a JP |
6337 | ]) |
6338 | OVS_VSWITCHD_STOP | |
6339 | AT_CLEANUP | |
6340 | ||
6341 | AT_SETUP([ofproto-dpif megaflow - learning]) | |
6342 | OVS_VSWITCHD_START | |
623540e4 | 6343 | AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg]) |
bcd2633a JP |
6344 | ADD_OF_PORTS([br0], [1], [2]) |
6345 | AT_DATA([flows.txt], [dnl | |
6346 | 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 | |
6347 | ]) | |
6348 | AT_CHECK([ovs-ofctl add-flows br0 flows.txt]) | |
31ef9f51 | 6349 | ovs-appctl time/stop |
956f2bf0 BP |
6350 | # We send each packet twice because the first packet in each flow causes the |
6351 | # flow table to change and thus revalidations, which (depending on timing) | |
6352 | # can keep a megaflow from being installed. The revalidations are done by | |
6353 | # the second iteration, allowing the flows to be installed. | |
6354 | for i in 1 2; do | |
6355 | 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)']) | |
6356 | AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:0b,dst=50:54:00:00:00:0c),eth_type(0x0800),ipv4(src=10.0.0.4,dst=10.0.0.3,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0)']) | |
6357 | ovs-appctl time/warp 100 | |
6358 | done | |
ae692725 | 6359 | sleep 1 |
bcd2633a | 6360 | dnl The original flow is missing due to a revalidation. |
c2a77f33 | 6361 | AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl |
d8485a90 AW |
6362 | recirc_id=0,ip,in_port=1,vlan_tci=0x0000/0x1fff,dl_src=50:54:00:00:00:09,nw_frag=no, actions: <del> |
6363 | recirc_id=0,ip,in_port=1,vlan_tci=0x0000/0x1fff,dl_src=50:54:00:00:00:0b,nw_frag=no, actions: <del> | |
bcd2633a JP |
6364 | ]) |
6365 | OVS_VSWITCHD_STOP | |
6366 | AT_CLEANUP | |
d4f4a9b2 JP |
6367 | |
6368 | AT_SETUP([ofproto-dpif megaflow - tunnels]) | |
6369 | OVS_VSWITCHD_START( | |
2c0ea78f | 6370 | [add-port br0 p1 -- set Interface p1 type=dummy ofport_request=1]) |
623540e4 | 6371 | AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg]) |
2c0ea78f GS |
6372 | AT_CHECK([ovs-vsctl add-port br0 p2 -- set Interface p2 type=gre \ |
6373 | options:remote_ip=1.1.1.1 ofport_request=2 options:key=flow]) | |
6374 | AT_CHECK([ovs-vsctl add-port br0 p3 -- set Interface p3 type=dummy \ | |
6375 | ofport_request=3]) | |
6376 | AT_CHECK([ovs-vsctl add-port br0 p4 -- set Interface p4 type=gre \ | |
6377 | options:remote_ip=1.1.1.2 options:tos=inherit options:ttl=inherit \ | |
6378 | ofport_request=4 options:key=flow]) | |
d4f4a9b2 JP |
6379 | AT_DATA([flows.txt], [dnl |
6380 | in_port=1,actions=output(2) | |
6381 | in_port=3,actions=output(4) | |
6382 | ]) | |
6383 | AT_CHECK([ovs-ofctl add-flows br0 flows.txt]) | |
6384 | dnl ECN bits are always copied out, but don't use 0x3 (CE), since that | |
6385 | dnl will cause the packet to be dropped. | |
6386 | AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(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)']) | |
53555f51 | 6387 | sleep 1 |
d4f4a9b2 JP |
6388 | 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)']) |
6389 | 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)']) | |
53555f51 | 6390 | sleep 1 |
d4f4a9b2 | 6391 | 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)']) |
ae692725 | 6392 | sleep 1 |
c2a77f33 | 6393 | AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl |
16194afd DDP |
6394 | recirc_id=0,ip,in_port=1,nw_ecn=1,nw_frag=no, actions: <del> |
6395 | recirc_id=0,ip,in_port=3,nw_tos=0,nw_ecn=1,nw_ttl=64,nw_frag=no, actions: <del> | |
6396 | recirc_id=0,ip,in_port=3,nw_tos=252,nw_ecn=1,nw_ttl=128,nw_frag=no, actions: <del> | |
1dd35f8a JP |
6397 | ]) |
6398 | OVS_VSWITCHD_STOP | |
6399 | AT_CLEANUP | |
6400 | ||
6401 | AT_SETUP([ofproto-dpif megaflow - dec_ttl]) | |
6402 | OVS_VSWITCHD_START | |
623540e4 | 6403 | AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg]) |
1dd35f8a | 6404 | ADD_OF_PORTS([br0], [1], [2]) |
13751fd8 | 6405 | 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], []) |
1dd35f8a JP |
6406 | AT_DATA([flows.txt], [dnl |
6407 | table=0 in_port=1,icmp,nw_src=10.0.0.4 actions=dec_ttl,output(2) | |
6408 | ]) | |
6409 | AT_CHECK([ovs-ofctl add-flows br0 flows.txt]) | |
6410 | 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)']) | |
6411 | 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)']) | |
ae692725 | 6412 | sleep 1 |
c2a77f33 | 6413 | AT_CHECK([cat ovs-vswitchd.log | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl |
16194afd DDP |
6414 | recirc_id=0,icmp,in_port=1,nw_src=10.0.0.4,nw_ttl=64,nw_frag=no, actions: <del> |
6415 | recirc_id=0,ip,in_port=1,nw_src=10.0.0.2/0.0.0.2,nw_frag=no, actions: <del> | |
d4f4a9b2 JP |
6416 | ]) |
6417 | OVS_VSWITCHD_STOP | |
6418 | AT_CLEANUP | |
74cc3969 | 6419 | |
f74e7df7 JP |
6420 | AT_SETUP([ofproto-dpif megaflow - set dl_dst]) |
6421 | OVS_VSWITCHD_START | |
623540e4 | 6422 | AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg]) |
f74e7df7 JP |
6423 | ADD_OF_PORTS([br0], [1], [2]) |
6424 | AT_DATA([flows.txt], [dnl | |
6425 | table=0 in_port=1 actions=mod_dl_dst(50:54:00:00:00:0a),output(2) | |
6426 | ]) | |
6427 | AT_CHECK([ovs-ofctl add-flows br0 flows.txt]) | |
6428 | 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)']) | |
6429 | 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)']) | |
ae692725 | 6430 | sleep 1 |
d23df9a8 JR |
6431 | dnl The first packet is essentially a no-op, as the new destination MAC is the |
6432 | dnl same as the original. The second entry actually updates the destination | |
6433 | dnl MAC. | |
70e5ed6f | 6434 | AT_CHECK([cat ovs-vswitchd.log | STRIP_UFID | FILTER_FLOW_INSTALL | STRIP_USED], [0], [dnl |
16194afd DDP |
6435 | recirc_id=0,ip,in_port=1,dl_dst=50:54:00:00:00:0a,nw_frag=no, actions:2 |
6436 | recirc_id=0,ip,in_port=1,dl_dst=50:54:00:00:00:0c,nw_frag=no, actions:set(eth(dst=50:54:00:00:00:0a)),2 | |
f74e7df7 JP |
6437 | ]) |
6438 | OVS_VSWITCHD_STOP | |
6439 | AT_CLEANUP | |
6440 | ||
8c301900 JR |
6441 | AT_SETUP([ofproto-dpif megaflow - disabled]) |
6442 | OVS_VSWITCHD_START | |
623540e4 | 6443 | AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg]) |
8c301900 JR |
6444 | ADD_OF_PORTS([br0], [1], [2]) |
6445 | AT_DATA([flows.txt], [dnl | |
6446 | table=0 in_port=1,ip,nw_dst=10.0.0.1 actions=output(2) | |
6447 | table=0 in_port=1,ip,nw_dst=10.0.0.3 actions=drop | |
6448 | ]) | |
e79a6c83 | 6449 | AT_CHECK([ovs-appctl upcall/disable-megaflows], [0], [megaflows disabled |
8c301900 | 6450 | ], []) |
64bb477f JS |
6451 | AT_CHECK([ovs-appctl upcall/disable-ufid], [0], [Datapath dumping tersely using UFID disabled |
6452 | ], []) | |
8c301900 JR |
6453 | AT_CHECK([ovs-appctl vlog/set dpif_netdev:dbg], [0], [], []) |
6454 | AT_CHECK([ovs-ofctl add-flows br0 flows.txt]) | |
6455 | for i in 1 2 3 4; do | |
6456 | 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)']) | |
6457 | 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)']) | |
53555f51 YT |
6458 | if [[ $i -eq 1 ]]; then |
6459 | sleep 1 | |
6460 | fi | |
8c301900 | 6461 | done |
ae692725 | 6462 | sleep 1 |
70e5ed6f | 6463 | AT_CHECK([cat ovs-vswitchd.log | STRIP_UFID | FILTER_FLOW_INSTALL | STRIP_USED], [0], [dnl |
330de069 JR |
6464 | pkt_mark=0,recirc_id=0,dp_hash=0,skb_priority=0,icmp,in_port=1,vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,nw_src=10.0.0.2,nw_dst=10.0.0.1,nw_tos=0,nw_ecn=0,nw_ttl=64,icmp_type=8,icmp_code=0, actions:2 |
6465 | pkt_mark=0,recirc_id=0,dp_hash=0,skb_priority=0,icmp,in_port=1,vlan_tci=0x0000,dl_src=50:54:00:00:00:0b,dl_dst=50:54:00:00:00:0c,nw_src=10.0.0.4,nw_dst=10.0.0.3,nw_tos=0,nw_ecn=0,nw_ttl=64,icmp_type=8,icmp_code=0, actions:drop | |
c2a77f33 | 6466 | ]) |
70e5ed6f | 6467 | AT_CHECK([cat ovs-vswitchd.log | STRIP_UFID | FILTER_FLOW_DUMP | grep 'packets:3'], [0], [dnl |
7d170098 | 6468 | 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 |
7d170098 | 6469 | 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 |
8c301900 JR |
6470 | ]) |
6471 | OVS_VSWITCHD_STOP | |
6472 | AT_CLEANUP | |
6473 | ||
74cc3969 BP |
6474 | AT_SETUP([ofproto-dpif - datapath port number change]) |
6475 | OVS_VSWITCHD_START([set Bridge br0 fail-mode=standalone]) | |
6476 | ADD_OF_PORTS([br0], 1) | |
6477 | ||
6478 | # Trace a flow that should output to p1. | |
6479 | AT_CHECK([ovs-appctl ofproto/trace br0 in_port=LOCAL,dl_src=10:20:30:40:50:60], | |
6480 | [0], [stdout]) | |
6481 | AT_CHECK([tail -1 stdout], [0], [Datapath actions: 1 | |
6482 | ]) | |
6483 | ||
6484 | # Change p1's port number to 5. | |
6485 | AT_CHECK([ovs-appctl dpif-dummy/change-port-number ovs-dummy p1 5]) | |
6486 | ||
6487 | # Trace a flow that should output to p1 in its new location. | |
6488 | AT_CHECK([ovs-appctl ofproto/trace br0 in_port=LOCAL,dl_src=10:20:30:40:50:60], | |
6489 | [0], [stdout]) | |
6490 | AT_CHECK([tail -1 stdout], [0], [Datapath actions: 5 | |
6491 | ]) | |
6492 | OVS_VSWITCHD_STOP | |
6493 | AT_CLEANUP | |
2d344ba5 AW |
6494 | |
6495 | # Tests the bundling with various bfd and cfm configurations. | |
6496 | AT_SETUP([ofproto - bundle with variable bfd/cfm config]) | |
6497 | OVS_VSWITCHD_START([add-br br1 -- set bridge br1 datapath-type=dummy -- \ | |
6498 | add-bond br0 br0bond p0 p2 bond-mode=active-backup -- \ | |
6499 | add-bond br1 br1bond p1 p3 bond-mode=active-backup -- \ | |
6500 | set Interface p1 type=patch options:peer=p0 ofport_request=2 -- \ | |
6501 | set Interface p3 type=patch options:peer=p2 ofport_request=4 -- \ | |
6502 | set Interface p0 type=patch options:peer=p1 ofport_request=1 -- \ | |
6503 | set Interface p2 type=patch options:peer=p3 ofport_request=3 -- \ | |
6504 | set Interface p0 bfd:enable=true bfd:min_tx=300 bfd:min_rx=300 -- \ | |
6505 | set Interface p0 cfm_mpid=1 -- \ | |
6506 | set Interface p1 bfd:enable=true bfd:min_tx=500 bfd:min_rx=500]) | |
6507 | ||
6508 | ovs-appctl time/stop | |
6509 | # advance the clock to stablize everything. | |
bdba1947 | 6510 | ovs-appctl time/warp 5000 100 |
2d344ba5 AW |
6511 | # cfm/show should show 'recv' fault. |
6512 | AT_CHECK([ovs-appctl cfm/show | sed -n '/^.*fault:.*/p'], [0], [dnl | |
6513 | fault: recv | |
6514 | ]) | |
6515 | # bfd/show should show 'up'. | |
6516 | AT_CHECK([ovs-appctl bfd/show | sed -n '/^.*Session State:.*/p'], [0], [dnl | |
6517 | Local Session State: up | |
6518 | Remote Session State: up | |
6519 | Local Session State: up | |
6520 | Remote Session State: up | |
6521 | ]) | |
6522 | # bond/show should show 'may-enable: true' for all slaves. | |
6523 | AT_CHECK([ovs-appctl bond/show | sed -n '/^.*may_enable:.*/p'], [0], [dnl | |
6524 | may_enable: true | |
6525 | may_enable: true | |
6526 | may_enable: true | |
6527 | may_enable: true | |
6528 | ]) | |
6529 | ||
6530 | # now disable the bfd on p1. | |
6531 | AT_CHECK([ovs-vsctl set Interface p1 bfd:enable=false]) | |
6532 | # advance the clock to stablize everything. | |
bdba1947 | 6533 | ovs-appctl time/warp 5000 100 |
2d344ba5 AW |
6534 | # cfm/show should show 'recv' fault. |
6535 | AT_CHECK([ovs-appctl cfm/show | sed -n '/^.*fault:.*/p'], [0], [dnl | |
6536 | fault: recv | |
6537 | ]) | |
6538 | # bfd/show should show 'down'. | |
6539 | AT_CHECK([ovs-appctl bfd/show | sed -n '/^.*Session State:.*/p'], [0], [dnl | |
6540 | Local Session State: down | |
6541 | Remote Session State: down | |
6542 | ]) | |
6543 | # bond/show should show 'may-enable: false' for p0. | |
125bf01d | 6544 | AT_CHECK([ovs-appctl bond/show br0bond | sed -n '/^.*may_enable:.*/p'], [0], [dnl |
2d344ba5 AW |
6545 | may_enable: false |
6546 | may_enable: true | |
2d344ba5 AW |
6547 | ]) |
6548 | ||
6549 | # now enable the bfd on p1 and disable bfd on p0. | |
6550 | AT_CHECK([ovs-vsctl set Interface p1 bfd:enable=true]) | |
6551 | AT_CHECK([ovs-vsctl set Interface p0 bfd:enable=false]) | |
6552 | # advance the clock to stablize everything. | |
bdba1947 | 6553 | ovs-appctl time/warp 5000 100 |
2d344ba5 AW |
6554 | # cfm/show should show 'recv' fault. |
6555 | AT_CHECK([ovs-appctl cfm/show | sed -n '/^.*fault:.*/p'], [0], [dnl | |
6556 | fault: recv | |
6557 | ]) | |
6558 | # bfd/show should show 'down'. | |
6559 | AT_CHECK([ovs-appctl bfd/show | sed -n '/^.*Session State:.*/p'], [0], [dnl | |
6560 | Local Session State: down | |
6561 | Remote Session State: down | |
6562 | ]) | |
6563 | # bond/show should show 'may-enable: false' for p0 and p1. | |
6564 | AT_CHECK([ovs-appctl bond/show | sed -n '/^.*may_enable:.*/p'], [0], [dnl | |
6565 | may_enable: false | |
6566 | may_enable: true | |
6567 | may_enable: false | |
6568 | may_enable: true | |
6569 | ]) | |
6570 | ||
e441a806 AW |
6571 | OVS_VSWITCHD_STOP |
6572 | AT_CLEANUP | |
6573 | ||
6574 | AT_SETUP([ofproto-dpif - ofproto-dpif-monitor 1]) | |
6575 | OVS_VSWITCHD_START([add-port br0 p0 -- set interface p0 type=gre options:remote_ip=1.2.3.4]) | |
6576 | ||
6577 | # enable bfd on p0. | |
6578 | AT_CHECK([ovs-vsctl set interface p0 bfd:enable=true]) | |
6579 | # check log. | |
1335a8d5 | 6580 | OVS_WAIT_UNTIL([grep "monitor thread created" ovs-vswitchd.log]) |
e441a806 AW |
6581 | # disable bfd on p0. |
6582 | AT_CHECK([ovs-vsctl set interface p0 bfd:enable=false]) | |
6583 | # check log. | |
1335a8d5 | 6584 | OVS_WAIT_UNTIL([grep "monitor thread terminated" ovs-vswitchd.log]) |
e441a806 AW |
6585 | AT_CHECK([cat ovs-vswitchd.log | sed -e '/^.*ofproto_dpif_monitor.*$/d' > ovs-vswitchd.log]) |
6586 | ||
6587 | # enable cfm on p0. | |
6588 | AT_CHECK([ovs-vsctl set interface p0 cfm_mpid=10]) | |
6589 | # check log. | |
1335a8d5 | 6590 | OVS_WAIT_UNTIL([grep "monitor thread created" ovs-vswitchd.log]) |
e441a806 AW |
6591 | # disable cfm on p0. |
6592 | AT_CHECK([ovs-vsctl remove interface p0 cfm_mpid 10]) | |
6593 | # check log. | |
1335a8d5 | 6594 | OVS_WAIT_UNTIL([grep "monitor thread terminated" ovs-vswitchd.log]) |
e441a806 AW |
6595 | AT_CHECK([cat ovs-vswitchd.log | sed -e '/^.*ofproto_dpif_monitor.*$/d' > ovs-vswitchd.log]) |
6596 | ||
6597 | # enable both bfd and cfm on p0. | |
6598 | AT_CHECK([ovs-vsctl set interface p0 bfd:enable=true cfm_mpid=10]) | |
6599 | # check log. | |
1335a8d5 | 6600 | OVS_WAIT_UNTIL([grep "monitor thread created" ovs-vswitchd.log]) |
e441a806 AW |
6601 | # disable bfd on p0. |
6602 | AT_CHECK([ovs-vsctl set interface p0 bfd:enable=false]) | |
6603 | # check log, there should not be the log of thread terminated. | |
738cd849 | 6604 | AT_CHECK([sed -n "s/^.*|ofproto_dpif_monitor(monitor[[0-9]]*)|INFO|\(.* terminated\)$/\1/p" ovs-vswitchd.log], [0], [dnl |
e441a806 AW |
6605 | ]) |
6606 | # reenable bfd on p0. | |
6607 | AT_CHECK([ovs-vsctl set interface p0 bfd:enable=true]) | |
6608 | # check log, should still be on log of thread created. | |
738cd849 | 6609 | AT_CHECK([sed -n "s/^.*|ofproto_dpif_monitor(monitor[[0-9]]*)|INFO|\(.* created\)$/\1/p" ovs-vswitchd.log], [0], [dnl |
e441a806 AW |
6610 | monitor thread created |
6611 | ]) | |
6612 | # disable bfd and cfm together. | |
6613 | AT_CHECK([ovs-vsctl set interface p0 bfd:enable=false -- remove interface p0 cfm_mpid 10]) | |
6614 | # check log. | |
1335a8d5 | 6615 | OVS_WAIT_UNTIL([grep "monitor thread terminated" ovs-vswitchd.log]) |
e441a806 AW |
6616 | |
6617 | OVS_VSWITCHD_STOP | |
6618 | AT_CLEANUP | |
6619 | ||
6620 | # this test helps avoid the deadlock between the main thread and monitor thread. | |
6621 | AT_SETUP([ofproto-dpif - ofproto-dpif-monitor 2]) | |
6622 | OVS_VSWITCHD_START | |
6623 | ||
6624 | for i in `seq 1 199` | |
6625 | do | |
6626 | 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]) | |
6627 | done | |
6628 | ||
98cf638b AW |
6629 | OVS_VSWITCHD_STOP |
6630 | AT_CLEANUP | |
98b07853 BP |
6631 | \f |
6632 | AT_BANNER([ofproto-dpif - flow translation resource limits]) | |
6633 | ||
6634 | AT_SETUP([ofproto-dpif - infinite resubmit]) | |
6635 | OVS_VSWITCHD_START | |
6636 | AT_CHECK([ovs-ofctl add-flow br0 actions=resubmit:1,resubmit:2,output:3]) | |
222820c6 | 6637 | AT_CHECK([ovs-appctl -vpoll_loop:off ofproto/trace br0 'eth_dst=ff:ff:ff:ff:ff:ff'], |
98b07853 BP |
6638 | [0], [stdout]) |
6639 | AT_CHECK([tail -1 stdout], [0], [Datapath actions: drop | |
6640 | ]) | |
6641 | AT_CHECK([grep -c 'resubmit actions recursed over 64 times' ovs-vswitchd.log], | |
6642 | [0], [1 | |
6643 | ]) | |
6644 | OVS_VSWITCHD_STOP(["/resubmit actions recursed/d"]) | |
6645 | AT_CLEANUP | |
6646 | ||
6647 | AT_SETUP([ofproto-dpif - exponential resubmit chain]) | |
6648 | OVS_VSWITCHD_START | |
6649 | ADD_OF_PORTS([br0], 1) | |
6650 | (for i in `seq 1 64`; do | |
6651 | j=`expr $i + 1` | |
6652 | echo "in_port=$i, actions=resubmit:$j, resubmit:$j, local" | |
6653 | done | |
6654 | echo "in_port=65, actions=local") > flows | |
6655 | AT_CHECK([ovs-ofctl add-flows br0 flows]) | |
222820c6 | 6656 | AT_CHECK([ovs-appctl -vpoll_loop:off ofproto/trace br0 'in_port=1'], [0], [stdout]) |
98b07853 BP |
6657 | AT_CHECK([grep -c 'over 4096 resubmit actions' ovs-vswitchd.log], [0], [1 |
6658 | ]) | |
6659 | OVS_VSWITCHD_STOP(["/over.*resubmit actions/d"]) | |
6660 | AT_CLEANUP | |
6661 | ||
6662 | AT_SETUP([ofproto-dpif - too many output actions]) | |
6663 | OVS_VSWITCHD_START | |
6664 | ADD_OF_PORTS([br0], 1) | |
6665 | (for i in `seq 1 12`; do | |
6666 | j=`expr $i + 1` | |
6667 | echo "in_port=$i, actions=resubmit:$j, resubmit:$j, local" | |
6668 | done | |
6669 | echo "in_port=13, actions=local,local,local,local,local,local,local,local") > flows | |
542024c4 | 6670 | AT_CHECK([ovs-ofctl add-flows br0 flows]) |
222820c6 | 6671 | AT_CHECK([ovs-appctl -vpoll_loop:off ofproto/trace br0 'in_port=1'], [0], [stdout]) |
0f032e95 BP |
6672 | AT_CHECK([grep -c -e '- Uses action(s) not supported by datapath' stdout], |
6673 | [0], [1 | |
98b07853 | 6674 | ]) |
0f032e95 | 6675 | AT_CHECK([grep -c 'resubmits yielded over 64 kB of actions' ovs-vswitchd.log], [0], [1 |
542024c4 | 6676 | ]) |
0f032e95 | 6677 | OVS_VSWITCHD_STOP(["/resubmits yielded over 64 kB of actions/d"]) |
98b07853 BP |
6678 | AT_CLEANUP |
6679 | ||
6680 | AT_SETUP([ofproto-dpif - stack too deep]) | |
6681 | OVS_VSWITCHD_START | |
6682 | ADD_OF_PORTS([br0], 1) | |
6683 | (for i in `seq 1 12`; do | |
6684 | j=`expr $i + 1` | |
6685 | echo "in_port=$i, actions=resubmit:$j, resubmit:$j, local" | |
6686 | done | |
6687 | push="push:NXM_NX_REG0[[]]" | |
6688 | echo "in_port=13, actions=$push,$push,$push,$push,$push,$push,$push,$push") > flows | |
6689 | AT_CHECK([ovs-ofctl add-flows br0 flows]) | |
222820c6 | 6690 | AT_CHECK([ovs-appctl -vpoll_loop:off ofproto/trace br0 'in_port=1'], [0], [stdout]) |
98b07853 BP |
6691 | AT_CHECK([grep -c 'resubmits yielded over 64 kB of stack' ovs-vswitchd.log], [0], [1 |
6692 | ]) | |
6693 | OVS_VSWITCHD_STOP(["/resubmits yielded over 64 kB of stack/d"]) | |
6694 | AT_CLEANUP | |
d611866c SH |
6695 | |
6696 | ||
2608616d | 6697 | AT_SETUP([ofproto-dpif packet-out controller]) |
d611866c SH |
6698 | OVS_VSWITCHD_START |
6699 | ADD_OF_PORTS([br0], 1, 2) | |
6700 | ||
6701 | AT_CHECK([ovs-ofctl add-flow br0 'dl_dst=50:54:00:00:00:0a actions=controller']) | |
6702 | ||
6703 | AT_CAPTURE_FILE([ofctl_monitor.log]) | |
6704 | AT_CHECK([ovs-ofctl monitor br0 65534 invalid_ttl --detach --no-chdir --pidfile 2> ofctl_monitor.log]) | |
6705 | ||
6706 | for i in 1 2 3; do | |
6707 | AT_CHECK([ovs-ofctl -O OpenFlow13 packet-out br0 CONTROLLER controller '50540000000a5054000000091234']) | |
6708 | done | |
6709 | ||
6710 | OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit]) | |
6711 | AT_CHECK([cat ofctl_monitor.log], [0], [dnl | |
6712 | NXT_PACKET_IN (xid=0x0): total_len=14 in_port=CONTROLLER (via action) data_len=14 (unbuffered) | |
e6d9ab56 | 6713 | vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,dl_type=0x1234 |
d611866c SH |
6714 | dnl |
6715 | NXT_PACKET_IN (xid=0x0): total_len=14 in_port=CONTROLLER (via action) data_len=14 (unbuffered) | |
e6d9ab56 | 6716 | vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,dl_type=0x1234 |
d611866c SH |
6717 | dnl |
6718 | NXT_PACKET_IN (xid=0x0): total_len=14 in_port=CONTROLLER (via action) data_len=14 (unbuffered) | |
e6d9ab56 | 6719 | vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,dl_type=0x1234 |
d611866c SH |
6720 | ]) |
6721 | ||
6722 | AT_CHECK([ovs-ofctl dump-flows br0 | ofctl_strip | sort], [0], [dnl | |
6723 | dl_dst=50:54:00:00:00:0a actions=CONTROLLER:65535 | |
6724 | NXST_FLOW reply: | |
6725 | ]) | |
6726 | ||
3c1bb396 BP |
6727 | (echo "OFPST_TABLE reply (OF1.3) (xid=0x2): |
6728 | table 0: | |
8811fc0a BP |
6729 | active=1, lookup=0, matched=0 |
6730 | ||
6731 | table 1: | |
6732 | active=0, lookup=0, matched=0 | |
6733 | " | |
6734 | for i in `seq 2 253`; do | |
6735 | printf ' table %d: ditto\n' $i | |
d611866c SH |
6736 | done) > expout |
6737 | AT_CHECK([ovs-ofctl -O OpenFlow13 dump-tables br0 ], [0], [expout]) | |
6738 | ||
6739 | OVS_VSWITCHD_STOP | |
6740 | AT_CLEANUP | |
6741 | ||
2608616d | 6742 | AT_SETUP([ofproto-dpif packet-out controller (patch port)]) |
d611866c SH |
6743 | OVS_VSWITCHD_START( |
6744 | [-- \ | |
6745 | add-port br0 p1 -- \ | |
6746 | set interface p1 type=patch options:peer=p2 -- \ | |
6747 | add-br br1 -- \ | |
6748 | set bridge br1 datapath-type=dummy -- \ | |
6749 | set bridge br1 fail-mode=secure -- \ | |
6750 | set bridge br1 protocols='[OpenFlow10,OpenFlow11,OpenFlow12,OpenFlow13]' -- \ | |
6751 | add-port br1 p2 -- \ | |
6752 | set interface p2 type=patch options:peer=p1 --]) | |
6753 | ||
6754 | AT_CAPTURE_FILE([ofctl_monitor.log]) | |
6755 | AT_CHECK([ovs-ofctl monitor br1 65534 invalid_ttl --detach --no-chdir --pidfile 2> ofctl_monitor.log]) | |
6756 | ||
6757 | for i in 1 2 3; do | |
6758 | AT_CHECK([ovs-ofctl -O OpenFlow13 packet-out br0 CONTROLLER output:1 '50540000000a5054000000091234']) | |
6759 | done | |
6760 | ||
6761 | OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit]) | |
6762 | AT_CHECK([cat ofctl_monitor.log], [0], [dnl | |
6763 | NXT_PACKET_IN (xid=0x0): cookie=0x0 total_len=14 in_port=1 (via no_match) data_len=14 (unbuffered) | |
e6d9ab56 | 6764 | vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,dl_type=0x1234 |
d611866c SH |
6765 | dnl |
6766 | NXT_PACKET_IN (xid=0x0): cookie=0x0 total_len=14 in_port=1 (via no_match) data_len=14 (unbuffered) | |
e6d9ab56 | 6767 | vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,dl_type=0x1234 |
d611866c SH |
6768 | dnl |
6769 | NXT_PACKET_IN (xid=0x0): cookie=0x0 total_len=14 in_port=1 (via no_match) data_len=14 (unbuffered) | |
e6d9ab56 | 6770 | vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,dl_type=0x1234 |
d611866c SH |
6771 | ]) |
6772 | ||
8811fc0a BP |
6773 | (echo "OFPST_TABLE reply (OF1.3) (xid=0x2): |
6774 | table 0: | |
6775 | active=0, lookup=0, matched=0 | |
6776 | " | |
6777 | for i in `seq 1 253`; do | |
6778 | printf ' table %d: ditto\n' $i | |
d611866c SH |
6779 | done) > expout |
6780 | AT_CHECK([ovs-ofctl -O OpenFlow13 dump-tables br0 ], [0], [expout]) | |
6781 | ||
3c1bb396 BP |
6782 | (echo "OFPST_TABLE reply (OF1.3) (xid=0x2): |
6783 | table 0: | |
8811fc0a BP |
6784 | active=0, lookup=3, matched=0 |
6785 | ||
6786 | table 1: | |
6787 | active=0, lookup=0, matched=0 | |
6788 | " | |
6789 | for i in `seq 2 253`; do | |
6790 | printf ' table %d: ditto\n' $i | |
d611866c SH |
6791 | done) > expout |
6792 | AT_CHECK([ovs-ofctl -O OpenFlow13 dump-tables br1 ], [0], [expout]) | |
6793 | ||
6794 | OVS_VSWITCHD_STOP | |
6795 | AT_CLEANUP | |
6796 | ||
6797 | ||
2608616d | 6798 | AT_SETUP([ofproto-dpif packet-out goto_table]) |
d611866c SH |
6799 | OVS_VSWITCHD_START |
6800 | ADD_OF_PORTS([br0], 1, 2) | |
6801 | ||
6802 | AT_DATA([flows.txt], [dnl | |
6803 | table=0 dl_dst=50:54:00:00:00:0a actions=goto_table(1) | |
6804 | table=1 dl_dst=50:54:00:00:00:0a actions=controller | |
6805 | ]) | |
6806 | AT_CHECK([ovs-ofctl -O OpenFlow13 add-flows br0 flows.txt]) | |
6807 | ||
6808 | AT_CAPTURE_FILE([ofctl_monitor.log]) | |
6809 | AT_CHECK([ovs-ofctl monitor br0 65534 invalid_ttl --detach --no-chdir --pidfile 2> ofctl_monitor.log]) | |
6810 | ||
6811 | for i in 1 2 3; do | |
6812 | 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)' | |
6813 | done | |
6814 | ||
6815 | OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6]) | |
6816 | OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit]) | |
6817 | AT_CHECK([cat ofctl_monitor.log], [0], [dnl | |
6818 | NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered) | |
e6d9ab56 | 6819 | vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,dl_type=0x1234 |
d611866c SH |
6820 | dnl |
6821 | NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered) | |
e6d9ab56 | 6822 | vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,dl_type=0x1234 |
d611866c SH |
6823 | dnl |
6824 | NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered) | |
e6d9ab56 | 6825 | vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,dl_type=0x1234 |
d611866c SH |
6826 | ]) |
6827 | ||
cea4a6d7 | 6828 | AT_CHECK([ovs-appctl revalidator/purge], [0]) |
d611866c SH |
6829 | AT_CHECK([ovs-ofctl -O OpenFlow13 dump-flows br0 | ofctl_strip | sort], [0], [dnl |
6830 | n_packets=3, n_bytes=180, dl_dst=50:54:00:00:00:0a actions=goto_table:1 | |
6831 | table=1, n_packets=3, n_bytes=180, dl_dst=50:54:00:00:00:0a actions=CONTROLLER:65535 | |
6832 | OFPST_FLOW reply (OF1.3): | |
6833 | ]) | |
6834 | ||
3c1bb396 BP |
6835 | (echo "OFPST_TABLE reply (OF1.3) (xid=0x2): |
6836 | table 0: | |
6837 | active=1, lookup=3, matched=3 | |
6838 | ||
8811fc0a BP |
6839 | table 1: ditto |
6840 | table 2: | |
6841 | active=0, lookup=0, matched=0 | |
6842 | " | |
6843 | for i in `seq 3 253`; do | |
6844 | printf ' table %d: ditto\n' $i | |
d611866c SH |
6845 | done) > expout |
6846 | AT_CHECK([ovs-ofctl -O OpenFlow13 dump-tables br0 ], [0], [expout]) | |
6847 | ||
6848 | OVS_VSWITCHD_STOP | |
6849 | AT_CLEANUP | |
6850 | ||
6851 | ||
2608616d | 6852 | AT_SETUP([ofproto-dpif packet-out table-miss (continue)]) |
d611866c SH |
6853 | OVS_VSWITCHD_START |
6854 | ADD_OF_PORTS([br0], 1, 2) | |
6855 | ||
3c1bb396 BP |
6856 | AT_CHECK([ovs-ofctl -O OpenFlow11 add-flow br0 'table=1 dl_dst=50:54:00:00:00:0a actions=controller']) |
6857 | AT_CHECK([ovs-ofctl -O OpenFlow11 mod-table br0 all continue]) | |
d611866c SH |
6858 | |
6859 | AT_CAPTURE_FILE([ofctl_monitor.log]) | |
6860 | AT_CHECK([ovs-ofctl monitor br0 65534 invalid_ttl --detach --no-chdir --pidfile 2> ofctl_monitor.log]) | |
6861 | ||
6862 | for i in 1 2 3; do | |
6863 | 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)' | |
6864 | done | |
6865 | ||
6866 | OVS_WAIT_UNTIL([test `wc -l < ofctl_monitor.log` -ge 6]) | |
6867 | OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit]) | |
6868 | AT_CHECK([cat ofctl_monitor.log], [0], [dnl | |
6869 | NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered) | |
e6d9ab56 | 6870 | vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,dl_type=0x1234 |
d611866c SH |
6871 | dnl |
6872 | NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered) | |
e6d9ab56 | 6873 | vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,dl_type=0x1234 |
d611866c SH |
6874 | dnl |
6875 | NXT_PACKET_IN (xid=0x0): table_id=1 cookie=0x0 total_len=60 in_port=1 (via action) data_len=60 (unbuffered) | |
e6d9ab56 | 6876 | vlan_tci=0x0000,dl_src=50:54:00:00:00:09,dl_dst=50:54:00:00:00:0a,dl_type=0x1234 |
d611866c SH |
6877 | ]) |
6878 | ||
cea4a6d7 | 6879 | AT_CHECK([ovs-appctl revalidator/purge], [0]) |
3c1bb396 | 6880 | AT_CHECK([ovs-ofctl -O OpenFlow11 dump-flows br0 | ofctl_strip | sort], [0], [dnl |
d611866c | 6881 | table=1, n_packets=3, n_bytes=180, dl_dst=50:54:00:00:00:0a actions=CONTROLLER:65535 |
3c1bb396 | 6882 | OFPST_FLOW reply (OF1.1): |
d611866c SH |
6883 | ]) |
6884 | ||
3c1bb396 BP |
6885 | (echo "OFPST_TABLE reply (OF1.3) (xid=0x2): |
6886 | table 0: | |
6887 | active=0, lookup=3, matched=0 | |
6888 | ||
6889 | table 1: | |
8811fc0a BP |
6890 | active=1, lookup=3, matched=3 |
6891 | ||
6892 | table 2: | |
6893 | active=0, lookup=0, matched=0 | |
6894 | " | |
6895 | for i in `seq 3 253`; do | |
6896 | printf ' table %d: ditto\n' $i | |
d611866c SH |
6897 | done) > expout |
6898 | AT_CHECK([ovs-ofctl -O OpenFlow13 dump-tables br0 ], [0], [expout]) | |
6899 | ||
6900 | OVS_VSWITCHD_STOP | |
6901 | AT_CLEANUP | |
b0e2ec32 JR |
6902 | |
6903 | AT_SETUP([ofproto-dpif - ICMPv6]) | |
6904 | OVS_VSWITCHD_START | |
6905 | ADD_OF_PORTS([br0], 1) | |
6906 | ||
6907 | AT_CAPTURE_FILE([ofctl_monitor.log]) | |
6908 | ||
6909 | AT_CHECK([ovs-ofctl monitor br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log]) | |
6910 | ||
6911 | ovs-appctl netdev-dummy/receive p1 '0060970769ea0000860580da86dd6000000000203afffe80000000000000020086fffe0580dafe80000000000000026097fffe0769ea870068bd00000000fe80000000000000026097fffe0769ea01010000860580da' | |
6912 | ||
6913 | OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit]) | |
6914 | ||
6915 | AT_CHECK([cat ofctl_monitor.log], [0], [dnl | |
6916 | NXT_PACKET_IN (xid=0x0): cookie=0x0 total_len=86 in_port=1 (via no_match) data_len=86 (unbuffered) | |
e6d9ab56 | 6917 | icmp6,vlan_tci=0x0000,dl_src=00:00:86:05:80:da,dl_dst=00:60:97:07:69:ea,ipv6_src=fe80::200:86ff:fe05:80da,ipv6_dst=fe80::260:97ff:fe07:69ea,ipv6_label=0x00000,nw_tos=0,nw_ecn=0,nw_ttl=255,icmp_type=135,icmp_code=0,nd_target=fe80::260:97ff:fe07:69ea,nd_sll=00:00:86:05:80:da,nd_tll=00:00:00:00:00:00 icmp6_csum:68bd |
b0e2ec32 JR |
6918 | ]) |
6919 | ||
6920 | OVS_VSWITCHD_STOP | |
6921 | AT_CLEANUP | |
e60e935b SRCSA |
6922 | |
6923 | AT_SETUP([ofproto-dpif - Neighbor Discovery set-field with checksum update]) | |
6924 | OVS_VSWITCHD_START | |
6925 | ADD_OF_PORTS([br0], 1) | |
6926 | AT_CHECK([ovs-ofctl add-flow br0 icmp6,icmpv6_type=135,action=set_field:fe80::1-\>nd_target,set_field:32:21:14:86:11:74-\>nd_sll,output:controller]) | |
6927 | ||
6928 | AT_CAPTURE_FILE([ofctl_monitor.log]) | |
6929 | ||
6930 | AT_CHECK([ovs-ofctl monitor br0 65534 --detach --no-chdir --pidfile 2> ofctl_monitor.log]) | |
6931 | ||
6932 | ovs-appctl netdev-dummy/receive p1 '0060970769ea0000860580da86dd6000000000203afffe80000000000000020086fffe0580dafe80000000000000026097fffe0769ea870068bd00000000fe80000000000000026097fffe0769ea01010000860580da' | |
6933 | ||
6934 | OVS_WAIT_UNTIL([ovs-appctl -t ovs-ofctl exit]) | |
6935 | ||
6936 | AT_CHECK([cat ofctl_monitor.log], [0], [dnl | |
6937 | NXT_PACKET_IN (xid=0x0): cookie=0x0 total_len=86 in_port=1 (via action) data_len=86 (unbuffered) | |
e6d9ab56 | 6938 | icmp6,vlan_tci=0x0000,dl_src=00:00:86:05:80:da,dl_dst=00:60:97:07:69:ea,ipv6_src=fe80::200:86ff:fe05:80da,ipv6_dst=fe80::260:97ff:fe07:69ea,ipv6_label=0x00000,nw_tos=0,nw_ecn=0,nw_ttl=255,icmp_type=135,icmp_code=0,nd_target=fe80::1,nd_sll=32:21:14:86:11:74,nd_tll=00:00:00:00:00:00 icmp6_csum:19d3 |
e60e935b SRCSA |
6939 | ]) |
6940 | ||
6941 | OVS_VSWITCHD_STOP | |
6942 | AT_CLEANUP | |
6943 | ||
f171fa88 AW |
6944 | # Tests the exact match of CFI bit in installed datapath flows matching VLAN. |
6945 | AT_SETUP([ofproto-dpif - vlan matching]) | |
6946 | OVS_VSWITCHD_START( | |
6947 | [add-port br0 p0 -- set Interface p0 type=dummy ofport_request=1]) | |
6948 | AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg]) | |
6949 | ||
6950 | AT_CHECK([ovs-ofctl del-flows br0]) | |
6951 | AT_CHECK([ovs-ofctl add-flow br0 "vlan_tci=0x000a/0x0fff,action=output:local"]) | |
6952 | ||
6953 | AT_CHECK([ovs-appctl netdev-dummy/receive p0 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x8100),vlan(vid=10,pcp=0),encap(eth_type(0x0800),ipv4(src=10.0.0.2,dst=10.0.0.1,proto=1,tos=0,ttl=64,frag=no),icmp(type=8,code=0))']) | |
6954 | ||
6955 | AT_CHECK([cat ovs-vswitchd.log | grep 'in_port=[[1]]' | FILTER_FLOW_INSTALL | STRIP_XOUT], [0], [dnl | |
6956 | recirc_id=0,ip,in_port=1,dl_vlan=10,nw_frag=no, actions: <del> | |
6957 | ]) | |
6958 | OVS_VSWITCHD_STOP | |
6959 | AT_CLEANUP |