@@ -114,11 +114,191 @@ int cc_compete_d_cubic_test()
114
114
spec .background_start_time = 0 ;
115
115
spec .background_scenario_text = cc_compete_batch_scenario_10M ;
116
116
spec .nb_connections = 2 ;
117
- spec .main_target_time = 10000000 ;
117
+ spec .main_target_time = 8500000 ;
118
118
spec .data_rate_in_gbps = 0.02 ;
119
119
spec .latency = 40000 ;
120
120
spec .icid = icid ;
121
121
spec .qlog_dir = "." ;
122
122
123
123
return picoquic_ns (& spec );
124
- }
124
+ }
125
+
126
+ /* Check that the picoquic_ns simulations can correctly test asymmetric paths.
127
+ */
128
+ int cc_ns_asym_test ()
129
+ {
130
+ picoquic_ns_spec_t spec = { 0 };
131
+ picoquic_connection_id_t icid = { { 0xcc , 0xa5 , 0xcb , 0 , 0 , 0 , 0 , 0 }, 8 };
132
+ spec .main_cc_algo = picoquic_cubic_algorithm ;
133
+ spec .main_start_time = 0 ;
134
+ spec .main_scenario_text = cc_compete_batch_scenario_4M ;
135
+ spec .background_cc_algo = picoquic_cubic_algorithm ;
136
+ spec .background_start_time = 0 ;
137
+ spec .background_scenario_text = cc_compete_batch_scenario_10M ;
138
+ spec .nb_connections = 1 ;
139
+ spec .data_rate_in_gbps = 0.01 ;
140
+ spec .data_rate_up_in_gbps = 0.001 ;
141
+ spec .latency = 300000 ;
142
+ spec .main_target_time = 7000000 ;
143
+ spec .queue_delay_max = 600000 ;
144
+ spec .icid = icid ;
145
+ spec .qlog_dir = "." ;
146
+
147
+ return picoquic_ns (& spec );
148
+ }
149
+
150
+ /* Check that the picoquic_ns simulations can correctly test the black hole scenario.
151
+ */
152
+ int cc_ns_blackhole_test ()
153
+ {
154
+ picoquic_ns_spec_t spec = { 0 };
155
+ picoquic_connection_id_t icid = { { 0xcc , 0xb1 , 0xcb , 0 , 0 , 0 , 0 , 0 }, 8 };
156
+ spec .main_cc_algo = picoquic_cubic_algorithm ;
157
+ spec .main_start_time = 0 ;
158
+ spec .main_scenario_text = cc_compete_batch_scenario_4M ;
159
+ spec .background_cc_algo = picoquic_cubic_algorithm ;
160
+ spec .background_start_time = 0 ;
161
+ spec .background_scenario_text = cc_compete_batch_scenario_10M ;
162
+ spec .nb_connections = 1 ;
163
+ spec .data_rate_in_gbps = 0.01 ;
164
+ spec .latency = 40000 ;
165
+ spec .main_target_time = 6000000 ;
166
+ spec .queue_delay_max = 80000 ;
167
+ spec .icid = icid ;
168
+ spec .qlog_dir = "." ;
169
+ spec .link_scenario = link_scenario_black_hole ;
170
+
171
+ return picoquic_ns (& spec );
172
+ }
173
+
174
+ /* Check that the picoquic_ns simulations can correctly test the drop_and_back scenario.
175
+ */
176
+ int cc_ns_drop_and_back_test ()
177
+ {
178
+ picoquic_ns_spec_t spec = { 0 };
179
+ picoquic_connection_id_t icid = { { 0xcc , 0xdb , 0xcb , 0 , 0 , 0 , 0 , 0 }, 8 };
180
+ spec .main_cc_algo = picoquic_cubic_algorithm ;
181
+ spec .main_start_time = 0 ;
182
+ spec .main_scenario_text = cc_compete_batch_scenario_4M ;
183
+ spec .background_cc_algo = picoquic_cubic_algorithm ;
184
+ spec .background_start_time = 0 ;
185
+ spec .background_scenario_text = cc_compete_batch_scenario_10M ;
186
+ spec .nb_connections = 1 ;
187
+ spec .data_rate_in_gbps = 0.01 ;
188
+ spec .latency = 40000 ;
189
+ spec .main_target_time = 5000000 ;
190
+ spec .queue_delay_max = 80000 ;
191
+ spec .icid = icid ;
192
+ spec .qlog_dir = "." ;
193
+ spec .link_scenario = link_scenario_drop_and_back ;
194
+
195
+ return picoquic_ns (& spec );
196
+ }
197
+
198
+ /* Check that the picoquic_ns simulations can correctly test the low_and_up scenario.
199
+ */
200
+ int cc_ns_low_and_up_test ()
201
+ {
202
+ picoquic_ns_spec_t spec = { 0 };
203
+ picoquic_connection_id_t icid = { { 0xcc , 0x1a , 0xcb , 0 , 0 , 0 , 0 , 0 }, 8 };
204
+ spec .main_cc_algo = picoquic_cubic_algorithm ;
205
+ spec .main_start_time = 0 ;
206
+ spec .main_scenario_text = cc_compete_batch_scenario_4M ;
207
+ spec .background_cc_algo = picoquic_cubic_algorithm ;
208
+ spec .background_start_time = 0 ;
209
+ spec .background_scenario_text = cc_compete_batch_scenario_10M ;
210
+ spec .nb_connections = 1 ;
211
+ spec .data_rate_in_gbps = 0.01 ;
212
+ spec .latency = 40000 ;
213
+ spec .main_target_time = 5500000 ;
214
+ spec .queue_delay_max = 80000 ;
215
+ spec .icid = icid ;
216
+ spec .qlog_dir = "." ;
217
+ spec .link_scenario = link_scenario_low_and_up ;
218
+
219
+ return picoquic_ns (& spec );
220
+ }
221
+
222
+ /* Check that the picoquic_ns simulations can correctly test the low_and_up scenario.
223
+ */
224
+ int cc_ns_wifi_fade_test ()
225
+ {
226
+ picoquic_ns_spec_t spec = { 0 };
227
+ picoquic_connection_id_t icid = { { 0xcc , 0xff , 0xbb , 0 , 0 , 0 , 0 , 0 }, 8 };
228
+ spec .main_cc_algo = picoquic_bbr_algorithm ;
229
+ spec .main_start_time = 0 ;
230
+ spec .main_scenario_text = cc_compete_batch_scenario_4M ;
231
+ spec .background_cc_algo = picoquic_bbr_algorithm ;
232
+ spec .background_start_time = 0 ;
233
+ spec .background_scenario_text = cc_compete_batch_scenario_10M ;
234
+ spec .nb_connections = 1 ;
235
+ spec .data_rate_in_gbps = 0.01 ;
236
+ spec .latency = 5000 ;
237
+ spec .main_target_time = 7000000 ;
238
+ spec .queue_delay_max = 15000 ;
239
+ spec .icid = icid ;
240
+ spec .qlog_dir = "." ;
241
+ spec .link_scenario = link_scenario_wifi_fade ;
242
+
243
+ return picoquic_ns (& spec );
244
+ }
245
+
246
+
247
+ /* Check that the picoquic_ns simulations can correctly test the low_and_up scenario.
248
+ */
249
+ int cc_ns_wifi_suspension_test ()
250
+ {
251
+ picoquic_ns_spec_t spec = { 0 };
252
+ picoquic_connection_id_t icid = { { 0xcc , 0xf5 , 0xbb , 0 , 0 , 0 , 0 , 0 }, 8 };
253
+ spec .main_cc_algo = picoquic_bbr_algorithm ;
254
+ spec .main_start_time = 0 ;
255
+ spec .main_scenario_text = cc_compete_batch_scenario_4M ;
256
+ spec .background_cc_algo = picoquic_bbr_algorithm ;
257
+ spec .background_start_time = 0 ;
258
+ spec .background_scenario_text = cc_compete_batch_scenario_10M ;
259
+ spec .nb_connections = 1 ;
260
+ spec .data_rate_in_gbps = 0.01 ;
261
+ spec .latency = 5000 ;
262
+ spec .main_target_time = 4000000 ;
263
+ spec .queue_delay_max = 15000 ;
264
+ spec .icid = icid ;
265
+ spec .qlog_dir = "." ;
266
+ spec .link_scenario = link_scenario_wifi_suspension ;
267
+
268
+ return picoquic_ns (& spec );
269
+ }
270
+
271
+
272
+ /* Check that the picoquic_ns simulations can correctly test the low_and_up scenario.
273
+ * The simple scenario merely duplicates the "wifi fade" scenario, the only difference
274
+ * being that the "varylink" structure is user specified.
275
+ */
276
+ picoquic_ns_link_spec_t cc_varylink_test_spec [] = {
277
+ { 1000000 , 0.01 , 0.01 , 5000 , 0 , 15000 , 0 },
278
+ { 2000000 , 0.001 , 0.001 , 5000 , 0 , 15000 , 0 },
279
+ { UINT64_MAX , 0.01 , 0.01 , 5000 , 0 , 15000 , 0 }
280
+ };
281
+
282
+ int cc_ns_varylink_test ()
283
+ {
284
+ picoquic_ns_spec_t spec = { 0 };
285
+ picoquic_connection_id_t icid = { { 0xcc , 0x11 , 0xbb , 0 , 0 , 0 , 0 , 0 }, 8 };
286
+ spec .main_cc_algo = picoquic_bbr_algorithm ;
287
+ spec .main_start_time = 0 ;
288
+ spec .main_scenario_text = cc_compete_batch_scenario_4M ;
289
+ spec .background_cc_algo = picoquic_bbr_algorithm ;
290
+ spec .background_start_time = 0 ;
291
+ spec .background_scenario_text = cc_compete_batch_scenario_10M ;
292
+ spec .nb_connections = 1 ;
293
+ spec .data_rate_in_gbps = 0.01 ;
294
+ spec .latency = 5000 ;
295
+ spec .main_target_time = 7000000 ;
296
+ spec .queue_delay_max = 15000 ;
297
+ spec .icid = icid ;
298
+ spec .qlog_dir = "." ;
299
+ spec .link_scenario = link_scenario_none ;
300
+ spec .vary_link_nb = sizeof (cc_varylink_test_spec ) / sizeof (picoquic_ns_link_spec_t );
301
+ spec .vary_link_spec = cc_varylink_test_spec ;
302
+
303
+ return picoquic_ns (& spec );
304
+ }
0 commit comments