Skip to content

Commit cd0223f

Browse files
authored
Merge pull request #1831 from private-octopus/fix-cubic-start-bounce
Fix cubic start bounce
2 parents 1a32798 + ef75124 commit cd0223f

File tree

5 files changed

+15
-7
lines changed

5 files changed

+15
-7
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ else()
88
endif()
99

1010
project(picoquic
11-
VERSION 1.1.30.0
11+
VERSION 1.1.30.1
1212
DESCRIPTION "picoquic library"
1313
LANGUAGES C CXX)
1414

picoquic/cubic.c

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,13 +344,21 @@ static void cubic_notify(
344344
uint64_t delta_window = path_x->cwin - base_window;
345345
path_x->cwin -= (delta_window / 2);
346346
}
347+
#if 1
348+
else {
349+
/* In the general case, compensate for the growth of the window after the acknowledged packet was sent. */
350+
path_x->cwin /= 2;
351+
}
352+
#endif
347353

348354
cubic_state->ssthresh = path_x->cwin;
349355
cubic_state->W_max = (double)path_x->cwin / (double)path_x->send_mtu;
350356
cubic_state->W_last_max = cubic_state->W_max;
351357
cubic_state->W_reno = ((double)path_x->cwin);
352358
path_x->is_ssthresh_initialized = 1;
353-
cubic_enter_avoidance(cubic_state, current_time);
359+
/* enter recovery to ignore the losses expected if the window grew
360+
* too large after the acknowleded packet was sent. */
361+
cubic_enter_recovery(cnx, path_x, notification, cubic_state, current_time);
354362
/* apply a correction to enter the test phase immediately */
355363
uint64_t K_micro = (uint64_t)(cubic_state->K * 1000000.0);
356364
if (K_micro > current_time) {

picoquic/picoquic.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
extern "C" {
4141
#endif
4242

43-
#define PICOQUIC_VERSION "1.1.30.0"
43+
#define PICOQUIC_VERSION "1.1.30.1"
4444
#define PICOQUIC_ERROR_CLASS 0x400
4545
#define PICOQUIC_ERROR_DUPLICATE (PICOQUIC_ERROR_CLASS + 1)
4646
#define PICOQUIC_ERROR_AEAD_CHECK (PICOQUIC_ERROR_CLASS + 3)

picoquictest/ack_frequency_test.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ int ackfrq_short_test()
198198
spec.max_ack_delay_remote = 1000;
199199
spec.max_ack_gap_remote = 32;
200200
spec.min_ack_delay_remote = 1000;
201-
spec.target_interval = 1500;
201+
spec.target_interval = 1000;
202202

203203
return ackfrq_test_one(&spec);
204204
}

picoquictest/satellite_test.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -279,8 +279,8 @@ int satellite_bbr1_test()
279279

280280
int satellite_cubic_test()
281281
{
282-
/* Should be less than 7 sec per draft etosat, but cubic is much slower */
283-
return satellite_test_one(picoquic_cubic_algorithm, 100000000, 11000000, 250, 3, 0, 0, 0, 0, 0, 0);
282+
/* Should be less than 7 sec per draft etosat */
283+
return satellite_test_one(picoquic_cubic_algorithm, 100000000, 6500000, 250, 3, 0, 0, 0, 0, 0, 0);
284284
}
285285

286286
int satellite_cubic_seeded_test()
@@ -291,7 +291,7 @@ int satellite_cubic_seeded_test()
291291
int satellite_cubic_loss_test()
292292
{
293293
/* Should be less than 10 sec per draft etosat, but cubic is a bit slower */
294-
return satellite_test_one(picoquic_cubic_algorithm, 100000000, 12100000, 250, 3, 0, 1, 0, 0, 0, 0);
294+
return satellite_test_one(picoquic_cubic_algorithm, 100000000, 7500000, 250, 3, 0, 1, 0, 0, 0, 0);
295295
}
296296

297297
int satellite_dcubic_seeded_test()

0 commit comments

Comments
 (0)