]>
Commit | Line | Data |
---|---|---|
daff3353 EJ |
1 | AT_BANNER([bundle link selection]) |
2 | ||
3 | # The test-bundle program prints a lot of output on stdout, but each of the | |
4 | # tests below ignores it because it will vary a bit depending on endianness and | |
5 | # floating point precision. test-bundle will output an error message on | |
6 | # stderr and return with exit code 1 if anything really goes wrong. In each | |
7 | # case, we list the (approximate) expected output in a comment to aid debugging | |
8 | # if the test does fail. | |
9 | ||
10 | AT_SETUP([hrw bundle link selection]) | |
63460a30 | 11 | AT_KEYWORDS([bundle_action]) |
eadd1644 | 12 | AT_CHECK([[ovstest test-bundle 'symmetric_l4,60,hrw,ofport,NXM_NX_REG0[],slaves:1,2,3,4,5']], |
daff3353 EJ |
13 | [0], [ignore]) |
14 | # 100000: disruption=1.00 (perfect=1.00) 1.00 0.00 0.00 0.00 0.00 0.00 | |
15 | # 110000: disruption=0.50 (perfect=0.50) 0.50 0.50 0.00 0.00 0.00 0.00 | |
16 | # 010000: disruption=0.50 (perfect=0.50) 0.00 1.00 0.00 0.00 0.00 0.00 | |
17 | # 011000: disruption=0.50 (perfect=0.50) 0.00 0.50 0.50 0.00 0.00 0.00 | |
18 | # 111000: disruption=0.33 (perfect=0.33) 0.33 0.33 0.34 0.00 0.00 0.00 | |
19 | # 101000: disruption=0.33 (perfect=0.33) 0.50 0.00 0.50 0.00 0.00 0.00 | |
20 | # 001000: disruption=0.50 (perfect=0.50) 0.00 0.00 1.00 0.00 0.00 0.00 | |
21 | # 001100: disruption=0.50 (perfect=0.50) 0.00 0.00 0.50 0.50 0.00 0.00 | |
22 | # 101100: disruption=0.33 (perfect=0.33) 0.33 0.00 0.34 0.33 0.00 0.00 | |
23 | # 111100: disruption=0.25 (perfect=0.25) 0.25 0.25 0.25 0.25 0.00 0.00 | |
24 | # 011100: disruption=0.25 (perfect=0.25) 0.00 0.33 0.33 0.33 0.00 0.00 | |
25 | # 010100: disruption=0.33 (perfect=0.33) 0.00 0.50 0.00 0.50 0.00 0.00 | |
26 | # 110100: disruption=0.33 (perfect=0.33) 0.33 0.33 0.00 0.34 0.00 0.00 | |
27 | # 100100: disruption=0.33 (perfect=0.33) 0.50 0.00 0.00 0.50 0.00 0.00 | |
28 | # 000100: disruption=0.50 (perfect=0.50) 0.00 0.00 0.00 1.00 0.00 0.00 | |
29 | # 000110: disruption=0.50 (perfect=0.50) 0.00 0.00 0.00 0.50 0.50 0.00 | |
30 | # 100110: disruption=0.33 (perfect=0.33) 0.33 0.00 0.00 0.33 0.33 0.00 | |
31 | # 110110: disruption=0.25 (perfect=0.25) 0.25 0.25 0.00 0.25 0.25 0.00 | |
32 | # 010110: disruption=0.25 (perfect=0.25) 0.00 0.34 0.00 0.33 0.33 0.00 | |
33 | # 011110: disruption=0.25 (perfect=0.25) 0.00 0.25 0.25 0.25 0.25 0.00 | |
34 | # 111110: disruption=0.20 (perfect=0.20) 0.20 0.20 0.20 0.20 0.20 0.00 | |
35 | # 101110: disruption=0.20 (perfect=0.20) 0.25 0.00 0.25 0.25 0.25 0.00 | |
36 | # 001110: disruption=0.25 (perfect=0.25) 0.00 0.00 0.34 0.33 0.33 0.00 | |
37 | # 001010: disruption=0.33 (perfect=0.33) 0.00 0.00 0.50 0.00 0.50 0.00 | |
38 | # 101010: disruption=0.33 (perfect=0.33) 0.33 0.00 0.34 0.00 0.33 0.00 | |
39 | # 111010: disruption=0.25 (perfect=0.25) 0.25 0.25 0.25 0.00 0.25 0.00 | |
40 | # 011010: disruption=0.25 (perfect=0.25) 0.00 0.33 0.34 0.00 0.33 0.00 | |
41 | # 010010: disruption=0.34 (perfect=0.33) 0.00 0.50 0.00 0.00 0.50 0.00 | |
42 | # 110010: disruption=0.33 (perfect=0.33) 0.33 0.33 0.00 0.00 0.33 0.00 | |
43 | # 100010: disruption=0.33 (perfect=0.33) 0.50 0.00 0.00 0.00 0.50 0.00 | |
44 | # 000010: disruption=0.50 (perfect=0.50) 0.00 0.00 0.00 0.00 1.00 0.00 | |
45 | # 000011: disruption=0.50 (perfect=0.50) 0.00 0.00 0.00 0.00 0.50 0.50 | |
46 | # 100011: disruption=0.33 (perfect=0.33) 0.33 0.00 0.00 0.00 0.33 0.33 | |
47 | # 110011: disruption=0.25 (perfect=0.25) 0.25 0.25 0.00 0.00 0.25 0.25 | |
48 | # 010011: disruption=0.25 (perfect=0.25) 0.00 0.33 0.00 0.00 0.33 0.33 | |
49 | # 011011: disruption=0.25 (perfect=0.25) 0.00 0.25 0.25 0.00 0.25 0.25 | |
50 | # 111011: disruption=0.20 (perfect=0.20) 0.20 0.20 0.20 0.00 0.20 0.20 | |
51 | # 101011: disruption=0.20 (perfect=0.20) 0.25 0.00 0.25 0.00 0.25 0.25 | |
52 | # 001011: disruption=0.25 (perfect=0.25) 0.00 0.00 0.34 0.00 0.33 0.33 | |
53 | # 001111: disruption=0.25 (perfect=0.25) 0.00 0.00 0.25 0.25 0.25 0.25 | |
54 | # 101111: disruption=0.20 (perfect=0.20) 0.20 0.00 0.20 0.20 0.20 0.20 | |
55 | # 111111: disruption=0.17 (perfect=0.17) 0.17 0.17 0.17 0.17 0.17 0.17 | |
56 | # 011111: disruption=0.17 (perfect=0.17) 0.00 0.20 0.20 0.20 0.20 0.20 | |
57 | # 010111: disruption=0.20 (perfect=0.20) 0.00 0.25 0.00 0.25 0.25 0.25 | |
58 | # 110111: disruption=0.20 (perfect=0.20) 0.20 0.20 0.00 0.20 0.20 0.20 | |
59 | # 100111: disruption=0.20 (perfect=0.20) 0.25 0.00 0.00 0.25 0.25 0.25 | |
60 | # 000111: disruption=0.25 (perfect=0.25) 0.00 0.00 0.00 0.33 0.33 0.33 | |
61 | # 000101: disruption=0.33 (perfect=0.33) 0.00 0.00 0.00 0.50 0.00 0.50 | |
62 | # 100101: disruption=0.33 (perfect=0.33) 0.33 0.00 0.00 0.33 0.00 0.33 | |
63 | # 110101: disruption=0.25 (perfect=0.25) 0.25 0.25 0.00 0.25 0.00 0.25 | |
64 | # 010101: disruption=0.25 (perfect=0.25) 0.00 0.33 0.00 0.33 0.00 0.33 | |
65 | # 011101: disruption=0.25 (perfect=0.25) 0.00 0.25 0.25 0.25 0.00 0.25 | |
66 | # 111101: disruption=0.20 (perfect=0.20) 0.20 0.20 0.20 0.20 0.00 0.20 | |
67 | # 101101: disruption=0.20 (perfect=0.20) 0.25 0.00 0.25 0.25 0.00 0.25 | |
68 | # 001101: disruption=0.25 (perfect=0.25) 0.00 0.00 0.33 0.33 0.00 0.33 | |
69 | # 001001: disruption=0.33 (perfect=0.33) 0.00 0.00 0.50 0.00 0.00 0.50 | |
70 | # 101001: disruption=0.33 (perfect=0.33) 0.33 0.00 0.33 0.00 0.00 0.33 | |
71 | # 111001: disruption=0.25 (perfect=0.25) 0.25 0.25 0.25 0.00 0.00 0.25 | |
72 | # 011001: disruption=0.25 (perfect=0.25) 0.00 0.33 0.34 0.00 0.00 0.33 | |
73 | # 010001: disruption=0.34 (perfect=0.33) 0.00 0.50 0.00 0.00 0.00 0.50 | |
74 | # 110001: disruption=0.33 (perfect=0.33) 0.33 0.33 0.00 0.00 0.00 0.34 | |
75 | # 100001: disruption=0.33 (perfect=0.33) 0.50 0.00 0.00 0.00 0.00 0.50 | |
76 | # 000001: disruption=0.50 (perfect=0.50) 0.00 0.00 0.00 0.00 0.00 1.00 | |
77 | # 000000: disruption=1.00 (perfect=1.00) 0.00 0.00 0.00 0.00 0.00 0.00 | |
78 | # 100000: disruption=1.00 (perfect=1.00) 1.00 0.00 0.00 0.00 0.00 0.00 | |
79 | AT_CLEANUP | |
80 | ||
04a85497 | 81 | AT_SETUP([active_backup bundle link selection]) |
63460a30 | 82 | AT_KEYWORDS([bundle_action]) |
eadd1644 | 83 | AT_CHECK([[ovstest test-bundle 'symmetric_l4,60,active_backup,ofport,NXM_NX_REG0[],slaves:1,2,3,4,5,6']], |
04a85497 EJ |
84 | [0], |
85 | [100000: disruption=1.00 (perfect=1.00) 1.00 0.00 0.00 0.00 0.00 0.00 | |
86 | 110000: disruption=0.00 (perfect=0.00) 1.00 0.00 0.00 0.00 0.00 0.00 | |
87 | 010000: disruption=1.00 (perfect=1.00) 0.00 1.00 0.00 0.00 0.00 0.00 | |
88 | 011000: disruption=0.00 (perfect=0.00) 0.00 1.00 0.00 0.00 0.00 0.00 | |
89 | 111000: disruption=1.00 (perfect=1.00) 1.00 0.00 0.00 0.00 0.00 0.00 | |
90 | 101000: disruption=0.00 (perfect=0.00) 1.00 0.00 0.00 0.00 0.00 0.00 | |
91 | 001000: disruption=1.00 (perfect=1.00) 0.00 0.00 1.00 0.00 0.00 0.00 | |
92 | 001100: disruption=0.00 (perfect=0.00) 0.00 0.00 1.00 0.00 0.00 0.00 | |
93 | 101100: disruption=1.00 (perfect=1.00) 1.00 0.00 0.00 0.00 0.00 0.00 | |
94 | 111100: disruption=0.00 (perfect=0.00) 1.00 0.00 0.00 0.00 0.00 0.00 | |
95 | 011100: disruption=1.00 (perfect=1.00) 0.00 1.00 0.00 0.00 0.00 0.00 | |
96 | 010100: disruption=0.00 (perfect=0.00) 0.00 1.00 0.00 0.00 0.00 0.00 | |
97 | 110100: disruption=1.00 (perfect=1.00) 1.00 0.00 0.00 0.00 0.00 0.00 | |
98 | 100100: disruption=0.00 (perfect=0.00) 1.00 0.00 0.00 0.00 0.00 0.00 | |
99 | 000100: disruption=1.00 (perfect=1.00) 0.00 0.00 0.00 1.00 0.00 0.00 | |
100 | 000110: disruption=0.00 (perfect=0.00) 0.00 0.00 0.00 1.00 0.00 0.00 | |
101 | 100110: disruption=1.00 (perfect=1.00) 1.00 0.00 0.00 0.00 0.00 0.00 | |
102 | 110110: disruption=0.00 (perfect=0.00) 1.00 0.00 0.00 0.00 0.00 0.00 | |
103 | 010110: disruption=1.00 (perfect=1.00) 0.00 1.00 0.00 0.00 0.00 0.00 | |
104 | 011110: disruption=0.00 (perfect=0.00) 0.00 1.00 0.00 0.00 0.00 0.00 | |
105 | 111110: disruption=1.00 (perfect=1.00) 1.00 0.00 0.00 0.00 0.00 0.00 | |
106 | 101110: disruption=0.00 (perfect=0.00) 1.00 0.00 0.00 0.00 0.00 0.00 | |
107 | 001110: disruption=1.00 (perfect=1.00) 0.00 0.00 1.00 0.00 0.00 0.00 | |
108 | 001010: disruption=0.00 (perfect=0.00) 0.00 0.00 1.00 0.00 0.00 0.00 | |
109 | 101010: disruption=1.00 (perfect=1.00) 1.00 0.00 0.00 0.00 0.00 0.00 | |
110 | 111010: disruption=0.00 (perfect=0.00) 1.00 0.00 0.00 0.00 0.00 0.00 | |
111 | 011010: disruption=1.00 (perfect=1.00) 0.00 1.00 0.00 0.00 0.00 0.00 | |
112 | 010010: disruption=0.00 (perfect=0.00) 0.00 1.00 0.00 0.00 0.00 0.00 | |
113 | 110010: disruption=1.00 (perfect=1.00) 1.00 0.00 0.00 0.00 0.00 0.00 | |
114 | 100010: disruption=0.00 (perfect=0.00) 1.00 0.00 0.00 0.00 0.00 0.00 | |
115 | 000010: disruption=1.00 (perfect=1.00) 0.00 0.00 0.00 0.00 1.00 0.00 | |
116 | 000011: disruption=0.00 (perfect=0.00) 0.00 0.00 0.00 0.00 1.00 0.00 | |
117 | 100011: disruption=1.00 (perfect=1.00) 1.00 0.00 0.00 0.00 0.00 0.00 | |
118 | 110011: disruption=0.00 (perfect=0.00) 1.00 0.00 0.00 0.00 0.00 0.00 | |
119 | 010011: disruption=1.00 (perfect=1.00) 0.00 1.00 0.00 0.00 0.00 0.00 | |
120 | 011011: disruption=0.00 (perfect=0.00) 0.00 1.00 0.00 0.00 0.00 0.00 | |
121 | 111011: disruption=1.00 (perfect=1.00) 1.00 0.00 0.00 0.00 0.00 0.00 | |
122 | 101011: disruption=0.00 (perfect=0.00) 1.00 0.00 0.00 0.00 0.00 0.00 | |
123 | 001011: disruption=1.00 (perfect=1.00) 0.00 0.00 1.00 0.00 0.00 0.00 | |
124 | 001111: disruption=0.00 (perfect=0.00) 0.00 0.00 1.00 0.00 0.00 0.00 | |
125 | 101111: disruption=1.00 (perfect=1.00) 1.00 0.00 0.00 0.00 0.00 0.00 | |
126 | 111111: disruption=0.00 (perfect=0.00) 1.00 0.00 0.00 0.00 0.00 0.00 | |
127 | 011111: disruption=1.00 (perfect=1.00) 0.00 1.00 0.00 0.00 0.00 0.00 | |
128 | 010111: disruption=0.00 (perfect=0.00) 0.00 1.00 0.00 0.00 0.00 0.00 | |
129 | 110111: disruption=1.00 (perfect=1.00) 1.00 0.00 0.00 0.00 0.00 0.00 | |
130 | 100111: disruption=0.00 (perfect=0.00) 1.00 0.00 0.00 0.00 0.00 0.00 | |
131 | 000111: disruption=1.00 (perfect=1.00) 0.00 0.00 0.00 1.00 0.00 0.00 | |
132 | 000101: disruption=0.00 (perfect=0.00) 0.00 0.00 0.00 1.00 0.00 0.00 | |
133 | 100101: disruption=1.00 (perfect=1.00) 1.00 0.00 0.00 0.00 0.00 0.00 | |
134 | 110101: disruption=0.00 (perfect=0.00) 1.00 0.00 0.00 0.00 0.00 0.00 | |
135 | 010101: disruption=1.00 (perfect=1.00) 0.00 1.00 0.00 0.00 0.00 0.00 | |
136 | 011101: disruption=0.00 (perfect=0.00) 0.00 1.00 0.00 0.00 0.00 0.00 | |
137 | 111101: disruption=1.00 (perfect=1.00) 1.00 0.00 0.00 0.00 0.00 0.00 | |
138 | 101101: disruption=0.00 (perfect=0.00) 1.00 0.00 0.00 0.00 0.00 0.00 | |
139 | 001101: disruption=1.00 (perfect=1.00) 0.00 0.00 1.00 0.00 0.00 0.00 | |
140 | 001001: disruption=0.00 (perfect=0.00) 0.00 0.00 1.00 0.00 0.00 0.00 | |
141 | 101001: disruption=1.00 (perfect=1.00) 1.00 0.00 0.00 0.00 0.00 0.00 | |
142 | 111001: disruption=0.00 (perfect=0.00) 1.00 0.00 0.00 0.00 0.00 0.00 | |
143 | 011001: disruption=1.00 (perfect=1.00) 0.00 1.00 0.00 0.00 0.00 0.00 | |
144 | 010001: disruption=0.00 (perfect=0.00) 0.00 1.00 0.00 0.00 0.00 0.00 | |
145 | 110001: disruption=1.00 (perfect=1.00) 1.00 0.00 0.00 0.00 0.00 0.00 | |
146 | 100001: disruption=0.00 (perfect=0.00) 1.00 0.00 0.00 0.00 0.00 0.00 | |
147 | 000001: disruption=1.00 (perfect=1.00) 0.00 0.00 0.00 0.00 0.00 1.00 | |
148 | 000000: disruption=1.00 (perfect=1.00) 0.00 0.00 0.00 0.00 0.00 0.00 | |
149 | 100000: disruption=1.00 (perfect=1.00) 1.00 0.00 0.00 0.00 0.00 0.00 | |
150 | ]) | |
151 | AT_CLEANUP | |
152 | ||
daff3353 | 153 | AT_SETUP([hrw bundle single link selection]) |
63460a30 | 154 | AT_KEYWORDS([bundle_action]) |
eadd1644 | 155 | AT_CHECK([[ovstest test-bundle 'symmetric_l4,60,hrw,ofport,NXM_NX_REG0[],slaves:1']], |
daff3353 EJ |
156 | [0], [ignore]) |
157 | # 1: disruption=1.00 (perfect=1.00) 1.00 | |
158 | # 0: disruption=1.00 (perfect=1.00) 0.00 | |
159 | # 1: disruption=1.00 (perfect=1.00) 1.00 | |
160 | AT_CLEANUP | |
161 | ||
162 | AT_SETUP([hrw bundle no link selection]) | |
63460a30 | 163 | AT_KEYWORDS([bundle_action]) |
eadd1644 | 164 | AT_CHECK([[ovstest test-bundle 'symmetric_l4,60,hrw,ofport,NXM_NX_REG0[],slaves:']], |
daff3353 EJ |
165 | [0], [ignore]) |
166 | AT_CLEANUP | |
167 | #: disruption=0.00 (perfect=0.00) | |
168 | #: disruption=0.00 (perfect=0.00) | |
169 | ||
170 | AT_SETUP([bundle action missing argument]) | |
63460a30 | 171 | AT_KEYWORDS([bundle_action]) |
daff3353 EJ |
172 | AT_CHECK([ovs-ofctl parse-flow actions=bundle], [1], [], |
173 | [ovs-ofctl: : not enough arguments to bundle action | |
174 | ]) | |
175 | AT_CLEANUP | |
176 | ||
177 | AT_SETUP([bundle action bad fields]) | |
63460a30 | 178 | AT_KEYWORDS([bundle_action]) |
daff3353 EJ |
179 | AT_CHECK([ovs-ofctl parse-flow 'actions=bundle(xyzzy,60,hrw,ofport,slaves:1,2))'], [1], [], |
180 | [ovs-ofctl: xyzzy,60,hrw,ofport,slaves:1,2: unknown fields `xyzzy' | |
181 | ]) | |
182 | AT_CLEANUP | |
183 | ||
184 | AT_SETUP([bundle action bad algorithm]) | |
63460a30 | 185 | AT_KEYWORDS([bundle_action]) |
daff3353 EJ |
186 | AT_CHECK([ovs-ofctl parse-flow 'actions=bundle(symmetric_l4,60,fubar,ofport,slaves:1,2))'], [1], [], |
187 | [ovs-ofctl: symmetric_l4,60,fubar,ofport,slaves:1,2: unknown algorithm `fubar' | |
188 | ]) | |
189 | AT_CLEANUP | |
190 | ||
191 | AT_SETUP([bundle action bad slave type]) | |
63460a30 | 192 | AT_KEYWORDS([bundle_action]) |
daff3353 EJ |
193 | AT_CHECK([ovs-ofctl parse-flow 'actions=bundle(symmetric_l4,60,hrw,robot,slaves:1,2))'], [1], [], |
194 | [ovs-ofctl: symmetric_l4,60,hrw,robot,slaves:1,2: unknown slave_type `robot' | |
195 | ]) | |
196 | AT_CLEANUP | |
197 | ||
198 | AT_SETUP([bundle action bad slave delimiter]) | |
63460a30 | 199 | AT_KEYWORDS([bundle_action]) |
daff3353 EJ |
200 | AT_CHECK([ovs-ofctl parse-flow 'actions=bundle(symmetric_l4,60,hrw,ofport,robot:1,2))'], [1], [], |
201 | [ovs-ofctl: symmetric_l4,60,hrw,ofport,robot:1,2: missing slave delimiter, expected `slaves' got `robot' | |
202 | ]) | |
203 | AT_CLEANUP | |
8b8ef592 | 204 | |
8a8b8fbd JS |
205 | dnl Bundle actions with <= 2 ports typically align nicely within ofpbuf memory |
206 | dnl allocation, so will not trigger reallocation codepaths. This test was | |
207 | dnl introduced to ensure that when bundle actions with a larger number of ports | |
208 | dnl are used, the encode/decode still works correctly. By placing the bundle | |
209 | dnl action deep within a list of actions, this test was able to trigger | |
210 | dnl Valgrind warnings for use-after-free bugs. | |
8b8ef592 | 211 | AT_SETUP([bundle action with many ports]) |
63460a30 | 212 | AT_KEYWORDS([bundle_action]) |
8b8ef592 JS |
213 | OVS_VSWITCHD_START |
214 | AT_CHECK([ovs-ofctl add-flow br0 'actions=set_field:0x1->metadata,set_field:0x2->metadata,set_field:0x3->metadata,set_field:0x4->metadata,bundle(symmetric_l4,0,hrw,ofport,slaves:[[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40]])']) | |
1b3758c3 | 215 | AT_CHECK([ovs-ofctl dump-flows br0 --no-stats], [0], [dnl |
8a8b8fbd | 216 | actions=load:0x1->OXM_OF_METADATA[[]],load:0x2->OXM_OF_METADATA[[]],load:0x3->OXM_OF_METADATA[[]],load:0x4->OXM_OF_METADATA[[]],bundle(symmetric_l4,0,hrw,ofport,slaves:1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40) |
8a8b8fbd | 217 | ]) |
8b8ef592 JS |
218 | OVS_VSWITCHD_STOP |
219 | AT_CLEANUP | |
63460a30 TLSC |
220 | |
221 | AT_SETUP([bundle action with ports up and down]) | |
222 | AT_KEYWORDS([bundle_action]) | |
223 | OVS_VSWITCHD_START([dnl | |
224 | add-port br0 p1 -- set Interface p1 type=dummy -- \ | |
225 | set Interface p1 ofport_request=1 -- \ | |
226 | add-port br0 p2 -- set Interface p2 type=dummy -- \ | |
227 | set Interface p2 ofport_request=2 | |
228 | ]) | |
1099a569 | 229 | AT_CHECK([ovs-ofctl add-flow br0 'actions=bundle(eth_src,50,active_backup,ofport,slaves:1,2)']) |
63460a30 TLSC |
230 | AT_CHECK([ovs-ofctl mod-port br0 p1 up]) |
231 | AT_CHECK([ovs-ofctl mod-port br0 p2 up]) | |
232 | AT_CHECK([ovs-appctl ofproto/trace br0 'in_port=LOCAL,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:06'], [0], [stdout]) | |
233 | AT_CHECK([tail -1 stdout], [0], | |
234 | [Datapath actions: 1 | |
235 | ]) | |
236 | AT_CHECK([ovs-ofctl mod-port br0 p1 down]) | |
237 | AT_CHECK([ovs-appctl ofproto/trace br0 'in_port=LOCAL,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:06'], [0], [stdout]) | |
238 | AT_CHECK([tail -1 stdout], [0], | |
239 | [Datapath actions: 2 | |
240 | ]) | |
241 | AT_CHECK([ovs-ofctl mod-port br0 p2 down]) | |
242 | AT_CHECK([ovs-appctl ofproto/trace br0 'in_port=LOCAL,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:06'], [0], [stdout]) | |
243 | AT_CHECK([tail -1 stdout], [0], | |
244 | [Datapath actions: drop | |
245 | ]) | |
246 | AT_CHECK([ovs-ofctl mod-port br0 p1 up]) | |
247 | AT_CHECK([ovs-appctl ofproto/trace br0 'in_port=LOCAL,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:06'], [0], [stdout]) | |
248 | AT_CHECK([tail -1 stdout], [0], | |
249 | [Datapath actions: 1 | |
250 | ]) | |
251 | AT_CHECK([ovs-ofctl mod-port br0 p2 up]) | |
252 | AT_CHECK([ovs-appctl ofproto/trace br0 'in_port=LOCAL,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:06'], [0], [stdout]) | |
253 | AT_CHECK([tail -1 stdout], [0], | |
254 | [Datapath actions: 1 | |
255 | ]) | |
256 | OVS_VSWITCHD_STOP | |
257 | AT_CLEANUP | |
258 | ||
259 | AT_SETUP([bundle_load action with ports down]) | |
260 | AT_KEYWORDS([bundle_action]) | |
261 | OVS_VSWITCHD_START([dnl | |
262 | add-port br0 p1 -- set Interface p1 type=dummy -- \ | |
263 | set Interface p1 ofport_request=1 -- \ | |
264 | add-port br0 p2 -- set Interface p2 type=dummy -- \ | |
265 | set Interface p2 ofport_request=2 | |
266 | ]) | |
267 | AT_CHECK([ovs-ofctl add-flow br0 'actions=bundle_load(eth_src,50,hrw,ofport,OXM_OF_ETH_SRC[[0..15]],slaves:1,2)']) | |
268 | AT_CHECK([ovs-ofctl mod-port br0 p1 down]) | |
269 | AT_CHECK([ovs-ofctl mod-port br0 p2 down]) | |
270 | AT_CHECK([ovs-appctl ofproto/trace br0 'in_port=LOCAL,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:06'], [0], [stdout]) | |
271 | AT_CHECK([grep Final stdout], [0], | |
272 | [Final flow: in_port=LOCAL,vlan_tci=0x0000,dl_src=50:54:00:00:ff:ff,dl_dst=50:54:00:00:00:06,dl_type=0x0000 | |
273 | ]) | |
274 | OVS_VSWITCHD_STOP | |
275 | AT_CLEANUP |