15
15
AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
17
AT_CHECK([ovs-appctl dpif/show], [0], [dnl
18
br0 (dummy@ovs-dummy):
19
lookups: hit:0 missed:0
20
flows: cur: 0, avg: 0.000, max: 0, life span: 0(ms)
21
overall avg: add rate: 0.000/min, del rate: 0.000/min
22
br0 65534/100: (dummy)
23
p1 1/1: (gre: remote_ip=1.1.1.1)
24
p2 2/1: (gre: local_ip=2.2.2.2, remote_ip=1.1.1.1)
25
p3 3/1: (gre: remote_ip=2.2.2.2)
17
AT_CHECK([ovs-appctl dpif/show | tail -n +5], [0], [dnl
18
br0 65534/100: (dummy)
19
p1 1/1: (gre: remote_ip=1.1.1.1)
20
p2 2/1: (gre: local_ip=2.2.2.2, remote_ip=1.1.1.1)
21
p3 3/1: (gre: remote_ip=2.2.2.2)
29
AT_CHECK([ovs-appctl ofproto/trace br0 'tunnel(tun_id=0x0,src=1.1.1.1,dst=1.2.3.4,tos=0x0,ttl=64,flags()),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)'], [0], [stdout])
25
AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'tunnel(tun_id=0x0,src=1.1.1.1,dst=1.2.3.4,tos=0x0,ttl=64,flags()),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)'], [0], [stdout])
30
26
AT_CHECK([tail -1 stdout], [0],
31
27
[Datapath actions: set(tunnel(tun_id=0x0,src=0.0.0.0,dst=1.1.1.1,tos=0x0,ttl=64,flags(df))),1
34
30
dnl local_ip, remote_ip
35
AT_CHECK([ovs-appctl ofproto/trace br0 'tunnel(tun_id=0x0,src=1.1.1.1,dst=2.2.2.2,tos=0x0,ttl=64,flags()),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)'], [0], [stdout])
31
AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'tunnel(tun_id=0x0,src=1.1.1.1,dst=2.2.2.2,tos=0x0,ttl=64,flags()),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)'], [0], [stdout])
36
32
AT_CHECK([tail -1 stdout], [0],
37
33
[Datapath actions: set(tunnel(tun_id=0x0,src=2.2.2.2,dst=1.1.1.1,tos=0x0,ttl=64,flags(df))),1
41
37
AT_CHECK([ovs-vsctl set Interface p2 type=gre options:local_ip=2.2.2.3 \
42
38
options:df_default=false options:ttl=1 options:csum=true \
43
39
-- set Interface p3 type=gre64])
44
AT_CHECK([ovs-appctl dpif/show], [0], [dnl
45
br0 (dummy@ovs-dummy):
46
lookups: hit:0 missed:0
47
flows: cur: 0, avg: 0.000, max: 0, life span: 0(ms)
48
overall avg: add rate: 0.000/min, del rate: 0.000/min
49
br0 65534/100: (dummy)
50
p1 1/1: (gre: remote_ip=1.1.1.1)
51
p2 2/1: (gre: csum=true, df_default=false, local_ip=2.2.2.3, remote_ip=1.1.1.1, ttl=1)
52
p3 3/64: (gre64: remote_ip=2.2.2.2)
40
AT_CHECK([ovs-appctl dpif/show | tail -n +5], [0], [dnl
41
br0 65534/100: (dummy)
42
p1 1/1: (gre: remote_ip=1.1.1.1)
43
p2 2/1: (gre: csum=true, df_default=false, local_ip=2.2.2.3, remote_ip=1.1.1.1, ttl=1)
44
p3 3/64: (gre64: remote_ip=2.2.2.2)
54
AT_CHECK([ovs-appctl ofproto/trace br0 'tunnel(tun_id=0x0,src=1.1.1.1,dst=2.2.2.2,tos=0x0,ttl=64,flags()),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)'], [0], [stdout])
46
AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'tunnel(tun_id=0x0,src=1.1.1.1,dst=2.2.2.2,tos=0x0,ttl=64,flags()),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)'], [0], [stdout])
55
47
AT_CHECK([tail -1 stdout], [0],
56
48
[Datapath actions: set(tunnel(tun_id=0x0,src=0.0.0.0,dst=1.1.1.1,tos=0x0,ttl=64,flags(df))),1
58
AT_CHECK([ovs-appctl ofproto/trace br0 'tunnel(tun_id=0x0,src=1.1.1.1,dst=2.2.2.3,tos=0x0,ttl=64,flags()),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)'], [0], [stdout])
50
AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'tunnel(tun_id=0x0,src=1.1.1.1,dst=2.2.2.3,tos=0x0,ttl=64,flags()),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)'], [0], [stdout])
59
51
AT_CHECK([tail -1 stdout], [0],
60
52
[Datapath actions: set(tunnel(tun_id=0x0,src=2.2.2.3,dst=1.1.1.1,tos=0x0,ttl=1,flags(csum))),1
63
55
dnl nonexistent tunnel
64
AT_CHECK([ovs-appctl ofproto/trace br0 'tunnel(tun_id=0x0,src=5.5.5.5,dst=6.6.6.6,tos=0x0,ttl=64,flags()),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)'], [2], [ignore], [dnl
56
AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'tunnel(tun_id=0x0,src=5.5.5.5,dst=6.6.6.6,tos=0x0,ttl=64,flags()),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)'], [2], [ignore], [dnl
66
58
ovs-appctl: ovs-vswitchd: server returned an error
61
OVS_VSWITCHD_STOP(["/receive tunnel port not found/d"])
72
64
AT_SETUP([tunnel - ECN decapsulation])
81
73
AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
83
AT_CHECK([ovs-appctl dpif/show], [0], [dnl
84
br0 (dummy@ovs-dummy):
85
lookups: hit:0 missed:0
86
flows: cur: 0, avg: 0.000, max: 0, life span: 0(ms)
87
overall avg: add rate: 0.000/min, del rate: 0.000/min
88
br0 65534/100: (dummy)
89
p1 1/1: (gre: remote_ip=1.1.1.1)
75
AT_CHECK([ovs-appctl dpif/show | tail -n +5], [0], [dnl
76
br0 65534/100: (dummy)
77
p1 1/1: (gre: remote_ip=1.1.1.1)
93
81
dnl Tunnel CE and encapsulated packet CE
94
AT_CHECK([ovs-appctl ofproto/trace br0 'tunnel(tun_id=0x0,src=1.1.1.1,dst=2.2.2.2,tos=0x3,ttl=64,flags()),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=3,ttl=64,frag=no),tcp(src=8,dst=9)'], [0], [stdout])
82
AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'tunnel(tun_id=0x0,src=1.1.1.1,dst=2.2.2.2,tos=0x3,ttl=64,flags()),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=3,ttl=64,frag=no),tcp(src=8,dst=9)'], [0], [stdout])
95
83
AT_CHECK([tail -1 stdout], [0],
96
84
[Datapath actions: 2
99
87
dnl Tunnel CE and encapsulated packet ECT(1)
100
AT_CHECK([ovs-appctl ofproto/trace br0 'tunnel(tun_id=0x0,src=1.1.1.1,dst=2.2.2.2,tos=0x3,ttl=64,flags()),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=1,ttl=64,frag=no),tcp(src=8,dst=9)'], [0], [stdout])
88
AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'tunnel(tun_id=0x0,src=1.1.1.1,dst=2.2.2.2,tos=0x3,ttl=64,flags()),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=1,ttl=64,frag=no),tcp(src=8,dst=9)'], [0], [stdout])
101
89
AT_CHECK([tail -1 stdout], [0],
102
90
[Datapath actions: set(ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0x3,ttl=64,frag=no)),2
105
93
dnl Tunnel CE and encapsulated packet ECT(2)
106
AT_CHECK([ovs-appctl ofproto/trace br0 'tunnel(tun_id=0x0,src=1.1.1.1,dst=2.2.2.2,tos=0x3,ttl=64,flags()),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=2,ttl=64,frag=no),tcp(src=8,dst=9)'], [0], [stdout])
94
AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'tunnel(tun_id=0x0,src=1.1.1.1,dst=2.2.2.2,tos=0x3,ttl=64,flags()),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=2,ttl=64,frag=no),tcp(src=8,dst=9)'], [0], [stdout])
107
95
AT_CHECK([tail -1 stdout], [0],
108
96
[Datapath actions: set(ipv4(src=192.168.0.1,dst=192.168.0.2,proto=6,tos=0x3,ttl=64,frag=no)),2
111
99
dnl Tunnel CE and encapsulated packet Non-ECT
112
AT_CHECK([ovs-appctl ofproto/trace br0 'tunnel(tun_id=0x0,src=1.1.1.1,dst=2.2.2.2,tos=0x3,ttl=64,flags()),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)'], [0], [stdout])
100
AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'tunnel(tun_id=0x0,src=1.1.1.1,dst=2.2.2.2,tos=0x3,ttl=64,flags()),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)'], [0], [stdout])
113
101
AT_CHECK([tail -1 stdout], [0],
114
102
[Datapath actions: drop
129
117
AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
131
AT_CHECK([ovs-appctl dpif/show], [0], [dnl
132
br0 (dummy@ovs-dummy):
133
lookups: hit:0 missed:0
134
flows: cur: 0, avg: 0.000, max: 0, life span: 0(ms)
135
overall avg: add rate: 0.000/min, del rate: 0.000/min
136
br0 65534/100: (dummy)
137
p1 1/1: (gre: key=5, local_ip=2.2.2.2, remote_ip=1.1.1.1)
119
AT_CHECK([ovs-appctl dpif/show | tail -n +5], [0], [dnl
120
br0 65534/100: (dummy)
121
p1 1/1: (gre: key=5, local_ip=2.2.2.2, remote_ip=1.1.1.1)
142
AT_CHECK([ovs-appctl ofproto/trace br0 '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=4,ttl=128,frag=no),tcp(src=8,dst=9)'], [0], [stdout])
126
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=6,tos=4,ttl=128,frag=no),tcp(src=8,dst=9)'], [0], [stdout])
143
127
AT_CHECK([tail -1 stdout], [0],
144
128
[Datapath actions: set(tunnel(tun_id=0x5,src=2.2.2.2,dst=1.1.1.1,tos=0x0,ttl=64,flags(df,key))),1
148
AT_CHECK([ovs-appctl ofproto/trace br0 '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=1,ttl=64,frag=no),tcp(src=8,dst=9)'], [0], [stdout])
132
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=6,tos=1,ttl=64,frag=no),tcp(src=8,dst=9)'], [0], [stdout])
149
133
AT_CHECK([tail -1 stdout], [0],
150
134
[Datapath actions: set(tunnel(tun_id=0x5,src=2.2.2.2,dst=1.1.1.1,tos=0x1,ttl=64,flags(df,key))),1
165
149
AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
167
AT_CHECK([ovs-appctl dpif/show], [0], [dnl
168
br0 (dummy@ovs-dummy):
169
lookups: hit:0 missed:0
170
flows: cur: 0, avg: 0.000, max: 0, life span: 0(ms)
171
overall avg: add rate: 0.000/min, del rate: 0.000/min
172
br0 65534/100: (dummy)
173
p1 1/1: (gre: remote_ip=1.1.1.1, tos=inherit, ttl=inherit)
151
AT_CHECK([ovs-appctl dpif/show | tail -n +5], [0], [dnl
152
br0 65534/100: (dummy)
153
p1 1/1: (gre: remote_ip=1.1.1.1, tos=inherit, ttl=inherit)
178
AT_CHECK([ovs-appctl ofproto/trace br0 '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=4,ttl=128,frag=no),tcp(src=8,dst=9)'], [0], [stdout])
158
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=6,tos=4,ttl=128,frag=no),tcp(src=8,dst=9)'], [0], [stdout])
179
159
AT_CHECK([tail -1 stdout], [0],
180
160
[Datapath actions: set(tunnel(tun_id=0x0,src=0.0.0.0,dst=1.1.1.1,tos=0x4,ttl=128,flags(df))),1
184
AT_CHECK([ovs-appctl ofproto/trace br0 '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=5,ttl=128,frag=no),tcp(src=8,dst=9)'], [0], [stdout])
164
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=6,tos=5,ttl=128,frag=no),tcp(src=8,dst=9)'], [0], [stdout])
185
165
AT_CHECK([tail -1 stdout], [0],
186
166
[Datapath actions: set(tunnel(tun_id=0x0,src=0.0.0.0,dst=1.1.1.1,tos=0x5,ttl=128,flags(df))),1
190
AT_CHECK([ovs-appctl ofproto/trace br0 'in_port(2),eth(src=50:54:00:00:00:05,dst=50:54:00:00:00:07),eth_type(0x0806),arp(sip=1.2.3.4,tip=5.6.7.8,op=1,sha=00:0f:10:11:12:13,tha=00:14:15:16:17:18)'], [0], [stdout])
170
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(0x0806),arp(sip=1.2.3.4,tip=5.6.7.8,op=1,sha=00:0f:10:11:12:13,tha=00:14:15:16:17:18)'], [0], [stdout])
191
171
AT_CHECK([tail -1 stdout], [0],
192
172
[Datapath actions: set(tunnel(tun_id=0x0,src=0.0.0.0,dst=1.1.1.1,tos=0x0,ttl=64,flags(df))),1
211
191
AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
213
AT_CHECK([ovs-appctl dpif/show], [0], [dnl
214
br0 (dummy@ovs-dummy):
215
lookups: hit:0 missed:0
216
flows: cur: 0, avg: 0.000, max: 0, life span: 0(ms)
217
overall avg: add rate: 0.000/min, del rate: 0.000/min
218
br0 65534/100: (dummy)
219
p1 1/1: (gre: key=flow, remote_ip=1.1.1.1)
220
p2 2/1: (gre: key=flow, remote_ip=2.2.2.2)
221
p3 3/1: (gre: key=flow, remote_ip=3.3.3.3)
222
p4 4/1: (gre: key=flow, remote_ip=4.4.4.4)
193
AT_CHECK([ovs-appctl dpif/show | tail -n +5], [0], [dnl
194
br0 65534/100: (dummy)
195
p1 1/1: (gre: key=flow, remote_ip=1.1.1.1)
196
p2 2/1: (gre: key=flow, remote_ip=2.2.2.2)
197
p3 3/1: (gre: key=flow, remote_ip=3.3.3.3)
198
p4 4/1: (gre: key=flow, remote_ip=4.4.4.4)
225
AT_CHECK([ovs-appctl ofproto/trace 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=128,frag=no),icmp(type=8,code=0)'], [0], [stdout])
201
AT_CHECK([ovs-appctl ofproto/trace ovs-dummy '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=128,frag=no),icmp(type=8,code=0)'], [0], [stdout])
226
202
AT_CHECK([tail -1 stdout], [0], [Datapath actions: dnl
227
203
set(tunnel(tun_id=0x1,src=0.0.0.0,dst=1.1.1.1,tos=0x0,ttl=64,flags(df,key))),1,dnl
228
204
set(tunnel(tun_id=0x2,src=0.0.0.0,dst=2.2.2.2,tos=0x0,ttl=64,flags(df,key))),1,dnl
247
223
AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
249
AT_CHECK([ovs-appctl dpif/show], [0], [dnl
250
br0 (dummy@ovs-dummy):
251
lookups: hit:0 missed:0
252
flows: cur: 0, avg: 0.000, max: 0, life span: 0(ms)
253
overall avg: add rate: 0.000/min, del rate: 0.000/min
254
br0 65534/100: (dummy)
255
p1 1/1: (gre: key=1, remote_ip=1.1.1.1)
256
p2 2/1: (gre: in_key=2, out_key=3, remote_ip=1.1.1.1)
257
p3 3/1: (gre: out_key=5, remote_ip=1.1.1.1)
260
AT_CHECK([ovs-appctl ofproto/trace br0 'tunnel(tun_id=0x1,src=1.1.1.1,dst=2.2.2.2,tos=0x0,ttl=64,flags(key)),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)'], [0], [stdout])
261
AT_CHECK([tail -1 stdout], [0], [Datapath actions: dnl
262
set(tunnel(tun_id=0x1,src=0.0.0.0,dst=1.1.1.1,tos=0x0,ttl=64,flags(df,key))),1,dnl
263
set(tunnel(tun_id=0x3,src=0.0.0.0,dst=1.1.1.1,tos=0x0,ttl=64,flags(df,key))),1,dnl
264
set(tunnel(tun_id=0x5,src=0.0.0.0,dst=1.1.1.1,tos=0x0,ttl=64,flags(df,key))),1
267
AT_CHECK([ovs-appctl ofproto/trace br0 'tunnel(tun_id=0x2,src=1.1.1.1,dst=2.2.2.2,tos=0x0,ttl=64,flags(key)),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)'], [0], [stdout])
268
AT_CHECK([tail -1 stdout], [0], [Datapath actions: dnl
269
set(tunnel(tun_id=0x3,src=0.0.0.0,dst=1.1.1.1,tos=0x0,ttl=64,flags(df,key))),1,dnl
270
set(tunnel(tun_id=0x1,src=0.0.0.0,dst=1.1.1.1,tos=0x0,ttl=64,flags(df,key))),1,dnl
271
set(tunnel(tun_id=0x5,src=0.0.0.0,dst=1.1.1.1,tos=0x0,ttl=64,flags(df,key))),1
274
AT_CHECK([ovs-appctl ofproto/trace br0 'tunnel(tun_id=0x0,src=1.1.1.1,dst=2.2.2.2,tos=0x0,ttl=64,flags()),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)'], [0], [stdout])
225
AT_CHECK([ovs-appctl dpif/show | tail -n +5], [0], [dnl
226
br0 65534/100: (dummy)
227
p1 1/1: (gre: key=1, remote_ip=1.1.1.1)
228
p2 2/1: (gre: in_key=2, out_key=3, remote_ip=1.1.1.1)
229
p3 3/1: (gre: out_key=5, remote_ip=1.1.1.1)
232
AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'tunnel(tun_id=0x1,src=1.1.1.1,dst=2.2.2.2,tos=0x0,ttl=64,flags(key)),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)'], [0], [stdout])
233
AT_CHECK([tail -1 stdout], [0], [Datapath actions: dnl
234
set(tunnel(tun_id=0x1,src=0.0.0.0,dst=1.1.1.1,tos=0x0,ttl=64,flags(df,key))),1,dnl
235
set(tunnel(tun_id=0x3,src=0.0.0.0,dst=1.1.1.1,tos=0x0,ttl=64,flags(df,key))),1,dnl
236
set(tunnel(tun_id=0x5,src=0.0.0.0,dst=1.1.1.1,tos=0x0,ttl=64,flags(df,key))),1
239
AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'tunnel(tun_id=0x2,src=1.1.1.1,dst=2.2.2.2,tos=0x0,ttl=64,flags(key)),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)'], [0], [stdout])
240
AT_CHECK([tail -1 stdout], [0], [Datapath actions: dnl
241
set(tunnel(tun_id=0x3,src=0.0.0.0,dst=1.1.1.1,tos=0x0,ttl=64,flags(df,key))),1,dnl
242
set(tunnel(tun_id=0x1,src=0.0.0.0,dst=1.1.1.1,tos=0x0,ttl=64,flags(df,key))),1,dnl
243
set(tunnel(tun_id=0x5,src=0.0.0.0,dst=1.1.1.1,tos=0x0,ttl=64,flags(df,key))),1
246
AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'tunnel(tun_id=0x0,src=1.1.1.1,dst=2.2.2.2,tos=0x0,ttl=64,flags()),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)'], [0], [stdout])
275
247
AT_CHECK([tail -1 stdout], [0], [Datapath actions: dnl
276
248
set(tunnel(tun_id=0x5,src=0.0.0.0,dst=1.1.1.1,tos=0x0,ttl=64,flags(df,key))),1,dnl
277
249
set(tunnel(tun_id=0x1,src=0.0.0.0,dst=1.1.1.1,tos=0x0,ttl=64,flags(df,key))),1,dnl
278
250
set(tunnel(tun_id=0x3,src=0.0.0.0,dst=1.1.1.1,tos=0x0,ttl=64,flags(df,key))),1
281
AT_CHECK([ovs-appctl ofproto/trace br0 'tunnel(tun_id=0xf,src=1.1.1.1,dst=2.2.2.2,tos=0x0,ttl=64,flags(key)),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)'], [2], [ignore], [dnl
253
AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'tunnel(tun_id=0xf,src=1.1.1.1,dst=2.2.2.2,tos=0x0,ttl=64,flags(key)),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)'], [2], [ignore], [dnl
254
Invalid datapath flow
283
255
ovs-appctl: ovs-vswitchd: server returned an error
257
OVS_VSWITCHD_STOP(["/receive tunnel port not found/d"])
288
260
AT_SETUP([tunnel - key match])
303
275
AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
305
AT_CHECK([ovs-appctl dpif/show], [0], [dnl
306
br0 (dummy@ovs-dummy):
307
lookups: hit:0 missed:0
308
flows: cur: 0, avg: 0.000, max: 0, life span: 0(ms)
309
overall avg: add rate: 0.000/min, del rate: 0.000/min
310
br0 65534/100: (dummy)
311
p1 1/1: (gre: key=flow, remote_ip=1.1.1.1)
312
p2 2/1: (gre: key=3, remote_ip=3.3.3.3)
277
AT_CHECK([ovs-appctl dpif/show | tail -n +5], [0], [dnl
278
br0 65534/100: (dummy)
279
p1 1/1: (gre: key=flow, remote_ip=1.1.1.1)
280
p2 2/1: (gre: key=3, remote_ip=3.3.3.3)
318
AT_CHECK([ovs-appctl ofproto/trace br0 'tunnel(tun_id=0x2,src=1.1.1.1,dst=2.2.2.2,tos=0x0,ttl=64,flags(key)),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)'], [0], [stdout])
286
AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'tunnel(tun_id=0x2,src=1.1.1.1,dst=2.2.2.2,tos=0x0,ttl=64,flags(key)),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)'], [0], [stdout])
319
287
AT_CHECK([tail -1 stdout], [0], [dnl
320
288
Datapath actions: 3
323
AT_CHECK([ovs-appctl ofproto/trace br0 'tunnel(tun_id=0x3,src=1.1.1.1,dst=2.2.2.2,tos=0x0,ttl=64,flags(key)),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)'], [0], [stdout])
291
AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'tunnel(tun_id=0x3,src=1.1.1.1,dst=2.2.2.2,tos=0x0,ttl=64,flags(key)),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)'], [0], [stdout])
324
292
AT_CHECK([tail -1 stdout], [0], [dnl
325
293
Datapath actions: 4,3,set(tunnel(tun_id=0x3,src=0.0.0.0,dst=3.3.3.3,tos=0x0,ttl=64,flags(df,key))),1,5
328
AT_CHECK([ovs-appctl ofproto/trace br0 'tunnel(tun_id=0x3,src=3.3.3.3,dst=2.2.2.2,tos=0x0,ttl=64,flags(key)),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)'], [0], [stdout])
296
AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'tunnel(tun_id=0x3,src=3.3.3.3,dst=2.2.2.2,tos=0x0,ttl=64,flags(key)),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)'], [0], [stdout])
329
297
AT_CHECK([tail -1 stdout], [0], [dnl
330
298
Datapath actions: 4,3,5
333
AT_CHECK([ovs-appctl ofproto/trace br0 'tunnel(tun_id=0x0,src=1.1.1.1,dst=2.2.2.2,tos=0x0,ttl=64,flags(key)),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)'], [0], [stdout])
301
AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'tunnel(tun_id=0x0,src=1.1.1.1,dst=2.2.2.2,tos=0x0,ttl=64,flags(key)),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)'], [0], [stdout])
334
302
AT_CHECK([tail -1 stdout], [0], [dnl
335
303
- Sends "packet-in" messages to the OpenFlow controller.
358
334
OVS_VSWITCHD_START([add-port br0 p1 -- set Interface p1 type=vxlan \
359
335
options:remote_ip=1.1.1.1 ofport_request=1 options:dst_port=4341])
361
AT_CHECK([ovs-appctl dpif/show], [0], [dnl
362
br0 (dummy@ovs-dummy):
363
lookups: hit:0 missed:0
364
flows: cur: 0, avg: 0.000, max: 0, life span: 0(ms)
365
overall avg: add rate: 0.000/min, del rate: 0.000/min
366
br0 65534/100: (dummy)
367
p1 1/1: (vxlan: dst_port=4341, remote_ip=1.1.1.1)
337
AT_CHECK([ovs-appctl dpif/show | tail -n +5], [0], [dnl
338
br0 65534/100: (dummy)
339
p1 1/1: (vxlan: dst_port=4341, remote_ip=1.1.1.1)
370
342
dnl change UDP port
372
344
AT_CHECK([ovs-vsctl -- set Interface p1 options:dst_port=5000])
374
AT_CHECK([ovs-appctl dpif/show], [0], [dnl
375
br0 (dummy@ovs-dummy):
376
lookups: hit:0 missed:0
377
flows: cur: 0, avg: 0.000, max: 0, life span: 0(ms)
378
overall avg: add rate: 0.000/min, del rate: 0.000/min
379
br0 65534/100: (dummy)
380
p1 1/2: (vxlan: dst_port=5000, remote_ip=1.1.1.1)
346
AT_CHECK([ovs-appctl dpif/show | tail -n +5], [0], [dnl
347
br0 65534/100: (dummy)
348
p1 1/2: (vxlan: dst_port=5000, remote_ip=1.1.1.1)
383
351
dnl change UDP port to default
385
353
AT_CHECK([ovs-vsctl -- set Interface p1 options:dst_port=4789])
387
AT_CHECK([ovs-appctl dpif/show], [0], [dnl
388
br0 (dummy@ovs-dummy):
389
lookups: hit:0 missed:0
390
flows: cur: 0, avg: 0.000, max: 0, life span: 0(ms)
391
overall avg: add rate: 0.000/min, del rate: 0.000/min
392
br0 65534/100: (dummy)
393
p1 1/1: (vxlan: remote_ip=1.1.1.1)
355
AT_CHECK([ovs-appctl dpif/show | tail -n +5], [0], [dnl
356
br0 65534/100: (dummy)
357
p1 1/1: (vxlan: remote_ip=1.1.1.1)
362
AT_SETUP([ofproto-dpif - set_field - tun_src/tun_dst/tun_id])
363
OVS_VSWITCHD_START([dnl
364
add-port br0 p1 -- set Interface p1 type=gre options:key=flow \
365
options:remote_ip=1.1.1.1 ofport_request=1 \
366
-- add-port br0 p2 -- set Interface p2 type=gre options:key=flow \
367
options:remote_ip=flow ofport_request=2 \
368
-- add-port br0 p3 -- set Interface p3 type=gre options:key=flow \
369
options:remote_ip=flow options:local_ip=flow ofport_request=3 \
370
-- add-port br0 p4 -- set Interface p4 type=gre options:key=3 \
371
options:remote_ip=flow ofport_request=4 \
372
-- add-port br0 p5 -- set Interface p5 type=gre options:key=flow \
373
options:remote_ip=5.5.5.5 ofport_request=5])
374
ADD_OF_PORTS([br0], [90])
375
AT_DATA([flows.txt], [dnl
376
in_port=90 actions=resubmit:1,resubmit:2,resubmit:3,resubmit:4,resubmit:5
377
in_port=1 actions=set_field:42->tun_id,output:1
378
in_port=2 actions=set_field:3.3.3.3->tun_dst,output:2
379
in_port=3 actions=set_field:1.1.1.1->tun_src,set_field:4.4.4.4->tun_dst,output:3
380
in_port=4 actions=set_field:2.2.2.2->tun_dst,output:4
381
in_port=5 actions=set_field:5->tun_id
383
AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
384
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])
385
AT_CHECK([tail -1 stdout], [0],
386
[Datapath actions: set(tunnel(tun_id=0x2a,src=0.0.0.0,dst=1.1.1.1,tos=0x0,ttl=64,flags(df,key))),1,set(tunnel(tun_id=0x2a,src=0.0.0.0,dst=3.3.3.3,tos=0x0,ttl=64,flags(df,key))),1,set(tunnel(tun_id=0x2a,src=1.1.1.1,dst=4.4.4.4,tos=0x0,ttl=64,flags(df,key))),1,set(tunnel(tun_id=0x3,src=0.0.0.0,dst=2.2.2.2,tos=0x0,ttl=64,flags(df,key))),1
396
388
OVS_VSWITCHD_STOP