Skip to content

Commit

Permalink
Merge pull request #1831 from private-octopus/fix-cubic-start-bounce
Browse files Browse the repository at this point in the history
Fix cubic start bounce
  • Loading branch information
huitema authored Feb 4, 2025
2 parents 1a32798 + ef75124 commit cd0223f
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 7 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ else()
endif()

project(picoquic
VERSION 1.1.30.0
VERSION 1.1.30.1
DESCRIPTION "picoquic library"
LANGUAGES C CXX)

Expand Down
10 changes: 9 additions & 1 deletion picoquic/cubic.c
Original file line number Diff line number Diff line change
Expand Up @@ -344,13 +344,21 @@ static void cubic_notify(
uint64_t delta_window = path_x->cwin - base_window;
path_x->cwin -= (delta_window / 2);
}
#if 1
else {
/* In the general case, compensate for the growth of the window after the acknowledged packet was sent. */
path_x->cwin /= 2;
}
#endif

cubic_state->ssthresh = path_x->cwin;
cubic_state->W_max = (double)path_x->cwin / (double)path_x->send_mtu;
cubic_state->W_last_max = cubic_state->W_max;
cubic_state->W_reno = ((double)path_x->cwin);
path_x->is_ssthresh_initialized = 1;
cubic_enter_avoidance(cubic_state, current_time);
/* enter recovery to ignore the losses expected if the window grew
* too large after the acknowleded packet was sent. */
cubic_enter_recovery(cnx, path_x, notification, cubic_state, current_time);
/* apply a correction to enter the test phase immediately */
uint64_t K_micro = (uint64_t)(cubic_state->K * 1000000.0);
if (K_micro > current_time) {
Expand Down
2 changes: 1 addition & 1 deletion picoquic/picoquic.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
extern "C" {
#endif

#define PICOQUIC_VERSION "1.1.30.0"
#define PICOQUIC_VERSION "1.1.30.1"
#define PICOQUIC_ERROR_CLASS 0x400
#define PICOQUIC_ERROR_DUPLICATE (PICOQUIC_ERROR_CLASS + 1)
#define PICOQUIC_ERROR_AEAD_CHECK (PICOQUIC_ERROR_CLASS + 3)
Expand Down
2 changes: 1 addition & 1 deletion picoquictest/ack_frequency_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ int ackfrq_short_test()
spec.max_ack_delay_remote = 1000;
spec.max_ack_gap_remote = 32;
spec.min_ack_delay_remote = 1000;
spec.target_interval = 1500;
spec.target_interval = 1000;

return ackfrq_test_one(&spec);
}
6 changes: 3 additions & 3 deletions picoquictest/satellite_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -279,8 +279,8 @@ int satellite_bbr1_test()

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

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

int satellite_dcubic_seeded_test()
Expand Down

0 comments on commit cd0223f

Please sign in to comment.