Skip to content

Commit

Permalink
Merge pull request #1685 from private-octopus/priority_bypass_cc
Browse files Browse the repository at this point in the history
High priority bypass CC
  • Loading branch information
huitema authored May 3, 2024
2 parents a90123b + c1d1ba0 commit 01dd305
Show file tree
Hide file tree
Showing 24 changed files with 791 additions and 487 deletions.
4 changes: 3 additions & 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.19.12
VERSION 1.1.20.0
DESCRIPTION "picoquic library"
LANGUAGES C CXX)

Expand Down Expand Up @@ -84,6 +84,7 @@ set(PICOQUIC_LIBRARY_FILES
picoquic/logwriter.c
picoquic/loss_recovery.c
picoquic/newreno.c
picoquic/pacing.c
picoquic/packet.c
picoquic/performance_log.c
picoquic/picohash.c
Expand Down Expand Up @@ -157,6 +158,7 @@ set(PICOQUIC_TEST_LIBRARY_FILES
picoquictest/multipath_test.c
picoquictest/netperf_test.c
picoquictest/openssl_test.c
picoquictest/pacing_test.c
picoquictest/parseheadertest.c
picoquictest/picoquic_lb_test.c
picoquictest/pn2pn64test.c
Expand Down
7 changes: 7 additions & 0 deletions UnitTest1/unittest1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -435,6 +435,13 @@ namespace UnitTest1
{
int ret = pacing_test();

Assert::AreEqual(ret, 0);
}

TEST_METHOD(pacing_repeat)
{
int ret = pacing_repeat_test();

Assert::AreEqual(ret, 0);
}

Expand Down
2 changes: 1 addition & 1 deletion picoquic/bbr.c
Original file line number Diff line number Diff line change
Expand Up @@ -1922,7 +1922,7 @@ void BBRCheckStartupLongRtt(picoquic_bbr_state_t* bbr_state, picoquic_path_t* pa
}

if (picoquic_hystart_test(&bbr_state->rtt_filter, rs->rtt_sample,
path_x->pacing_packet_time_microsec, current_time, 0)) {
path_x->pacing.packet_time_microsec, current_time, 0)) {
BBRExitStartupLongRtt(bbr_state, path_x, current_time);
}
else if (rs->ecn_alpha > BBRExcessiveEcnCE) {
Expand Down
4 changes: 2 additions & 2 deletions picoquic/bbr1.c
Original file line number Diff line number Diff line change
Expand Up @@ -1161,7 +1161,7 @@ static void picoquic_bbr1_notify(

if (bbr1_state->state == picoquic_bbr1_alg_startup_long_rtt) {
if (picoquic_hystart_test(&bbr1_state->rtt_filter, (cnx->is_time_stamp_enabled) ? ack_state->one_way_delay : ack_state->rtt_measurement,
cnx->path[0]->pacing_packet_time_microsec, current_time, cnx->is_time_stamp_enabled)) {
cnx->path[0]->pacing.packet_time_microsec, current_time, cnx->is_time_stamp_enabled)) {
BBR1ExitStartupLongRtt(bbr1_state, path_x, current_time);
}
}
Expand All @@ -1188,7 +1188,7 @@ static void picoquic_bbr1_notify(
path_x->cwin = min_win;
}
else if (path_x->smoothed_rtt > PICOQUIC_TARGET_RENO_RTT) {
path_x->pacing_bandwidth_pause = 1;
path_x->pacing.bandwidth_pause = 1;
}

picoquic_update_pacing_data(cnx, path_x, 1);
Expand Down
8 changes: 4 additions & 4 deletions picoquic/cubic.c
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ static void picoquic_cubic_notify(
/* Using RTT increases as signal to get out of initial slow start */
if (cubic_state->ssthresh == UINT64_MAX &&
picoquic_hystart_test(&cubic_state->rtt_filter, (cnx->is_time_stamp_enabled) ? ack_state->one_way_delay : ack_state->rtt_measurement,
cnx->path[0]->pacing_packet_time_microsec, current_time, cnx->is_time_stamp_enabled)) {
cnx->path[0]->pacing.packet_time_microsec, current_time, cnx->is_time_stamp_enabled)) {
/* RTT increased too much, get out of slow start! */
if (cubic_state->rtt_filter.rtt_filtered_min > PICOQUIC_TARGET_RENO_RTT){
double correction;
Expand Down Expand Up @@ -518,7 +518,7 @@ static void picoquic_dcubic_notify(
* for getting out of slow start, but also for ending a cycle
* during congestion avoidance */
if (picoquic_hystart_test(&cubic_state->rtt_filter, (cnx->is_time_stamp_enabled) ? ack_state->one_way_delay : ack_state->rtt_measurement,
cnx->path[0]->pacing_packet_time_microsec, current_time, cnx->is_time_stamp_enabled)) {
cnx->path[0]->pacing.packet_time_microsec, current_time, cnx->is_time_stamp_enabled)) {
dcubic_exit_slow_start(cnx, path_x, notification, cubic_state, current_time);
}
break;
Expand Down Expand Up @@ -578,7 +578,7 @@ static void picoquic_dcubic_notify(
}

if (picoquic_hystart_test(&cubic_state->rtt_filter, (cnx->is_time_stamp_enabled) ? ack_state->one_way_delay : ack_state->rtt_measurement,
cnx->path[0]->pacing_packet_time_microsec, current_time, cnx->is_time_stamp_enabled)) {
cnx->path[0]->pacing.packet_time_microsec, current_time, cnx->is_time_stamp_enabled)) {
if (current_time - cubic_state->start_of_epoch > path_x->smoothed_rtt ||
cubic_state->recovery_sequence <= picoquic_cc_get_ack_number(cnx, path_x)) {
/* re-enter recovery if this is a new event */
Expand Down Expand Up @@ -643,7 +643,7 @@ static void picoquic_dcubic_notify(
break;
case picoquic_congestion_notification_rtt_measurement:
if (picoquic_hystart_test(&cubic_state->rtt_filter, (cnx->is_time_stamp_enabled) ? ack_state->one_way_delay : ack_state->rtt_measurement,
cnx->path[0]->pacing_packet_time_microsec, current_time, cnx->is_time_stamp_enabled)) {
cnx->path[0]->pacing.packet_time_microsec, current_time, cnx->is_time_stamp_enabled)) {
if (current_time - cubic_state->start_of_epoch > path_x->smoothed_rtt ||
cubic_state->recovery_sequence <= picoquic_cc_get_ack_number(cnx, path_x)) {
/* re-enter recovery */
Expand Down
2 changes: 1 addition & 1 deletion picoquic/logwriter.c
Original file line number Diff line number Diff line change
Expand Up @@ -1176,7 +1176,7 @@ void binlog_cc_dump(picoquic_cnx_t* cnx, uint64_t current_time)
bytewrite_vint(ps_msg, path->bandwidth_estimate);
bytewrite_vint(ps_msg, path->receive_rate_estimate);
bytewrite_vint(ps_msg, path->send_mtu);
bytewrite_vint(ps_msg, path->pacing_packet_time_microsec);
bytewrite_vint(ps_msg, path->pacing.packet_time_microsec);
if (cnx->is_simple_multipath_enabled || cnx->is_multipath_enabled) {
bytewrite_vint(ps_msg, path->nb_losses_found);
bytewrite_vint(ps_msg, path->nb_spurious);
Expand Down
2 changes: 1 addition & 1 deletion picoquic/newreno.c
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ static void picoquic_newreno_notify(
}

if (picoquic_hystart_test(&nr_state->rtt_filter, (cnx->is_time_stamp_enabled) ? ack_state->one_way_delay : ack_state->rtt_measurement,
cnx->path[0]->pacing_packet_time_microsec, current_time,
cnx->path[0]->pacing.packet_time_microsec, current_time,
cnx->is_time_stamp_enabled)) {
/* RTT increased too much, get out of slow start! */
nr_state->nrss.ssthresh = nr_state->nrss.cwin;
Expand Down
Loading

0 comments on commit 01dd305

Please sign in to comment.