Skip to content

Commit

Permalink
Merge pull request #1754 from hfstco/cubic-seed-bug
Browse files Browse the repository at this point in the history
cubic seed bug
  • Loading branch information
huitema authored Sep 16, 2024
2 parents d66c78b + 6bc69ab commit 79f0aa3
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 0 deletions.
7 changes: 7 additions & 0 deletions PerfAndStressTest/PerfAndStressTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,13 @@ namespace PerfAndStressTest
Assert::AreEqual(ret, 0);
}

TEST_METHOD(satellite_cubic_seed)
{
int ret = satellite_cubic_seeded_test();

Assert::AreEqual(ret, 0);
}

TEST_METHOD(satellite_cubic_loss)
{
int ret = satellite_cubic_loss_test();
Expand Down
3 changes: 3 additions & 0 deletions picoquic/cubic.c
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,9 @@ static void picoquic_cubic_notify(
path_x->cwin = ack_state->nb_bytes_acknowledged;
}
cubic_state->ssthresh = ack_state->nb_bytes_acknowledged;
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;
picoquic_cubic_enter_avoidance(cubic_state, current_time);
}
Expand Down
1 change: 1 addition & 0 deletions picoquic_t/picoquic_t.c
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,7 @@ static const picoquic_test_def_t test_table[] = {
{ "satellite_small", satellite_small_test },
{ "satellite_small_up", satellite_small_up_test },
{ "satellite_cubic", satellite_cubic_test },
{ "satellite_cubic_seeded", satellite_cubic_seeded_test },
{ "satellite_cubic_loss", satellite_cubic_loss_test },
{ "bdp_basic", bdp_basic_test },
{ "bdp_delay", bdp_delay_test },
Expand Down
1 change: 1 addition & 0 deletions picoquictest/picoquictest.h
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,7 @@ int satellite_preemptive_fc_test();
int satellite_small_test();
int satellite_small_up_test();
int satellite_cubic_test();
int satellite_cubic_seeded_test();
int satellite_cubic_loss_test();
int bdp_basic_test();
int bdp_reno_test();
Expand Down
5 changes: 5 additions & 0 deletions picoquictest/satellite_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,11 @@ int satellite_cubic_test()
return satellite_test_one(picoquic_cubic_algorithm, 100000000, 11000000, 250, 3, 0, 0, 0, 0, 0, 0);
}

int satellite_cubic_seeded_test()
{
return satellite_test_one(picoquic_cubic_algorithm, 100000000, 5000000, 250, 3, 0, 0, 0, 1, 0, 0);
}

int satellite_cubic_loss_test()
{
/* Should be less than 10 sec per draft etosat, but cubic is a bit slower */
Expand Down

0 comments on commit 79f0aa3

Please sign in to comment.