Skip to content

Commit 01dd305

Browse files
authored
Merge pull request #1685 from private-octopus/priority_bypass_cc
High priority bypass CC
2 parents a90123b + c1d1ba0 commit 01dd305

24 files changed

+791
-487
lines changed

CMakeLists.txt

Lines changed: 3 additions & 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.19.12
11+
VERSION 1.1.20.0
1212
DESCRIPTION "picoquic library"
1313
LANGUAGES C CXX)
1414

@@ -84,6 +84,7 @@ set(PICOQUIC_LIBRARY_FILES
8484
picoquic/logwriter.c
8585
picoquic/loss_recovery.c
8686
picoquic/newreno.c
87+
picoquic/pacing.c
8788
picoquic/packet.c
8889
picoquic/performance_log.c
8990
picoquic/picohash.c
@@ -157,6 +158,7 @@ set(PICOQUIC_TEST_LIBRARY_FILES
157158
picoquictest/multipath_test.c
158159
picoquictest/netperf_test.c
159160
picoquictest/openssl_test.c
161+
picoquictest/pacing_test.c
160162
picoquictest/parseheadertest.c
161163
picoquictest/picoquic_lb_test.c
162164
picoquictest/pn2pn64test.c

UnitTest1/unittest1.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -435,6 +435,13 @@ namespace UnitTest1
435435
{
436436
int ret = pacing_test();
437437

438+
Assert::AreEqual(ret, 0);
439+
}
440+
441+
TEST_METHOD(pacing_repeat)
442+
{
443+
int ret = pacing_repeat_test();
444+
438445
Assert::AreEqual(ret, 0);
439446
}
440447

picoquic/bbr.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1922,7 +1922,7 @@ void BBRCheckStartupLongRtt(picoquic_bbr_state_t* bbr_state, picoquic_path_t* pa
19221922
}
19231923

19241924
if (picoquic_hystart_test(&bbr_state->rtt_filter, rs->rtt_sample,
1925-
path_x->pacing_packet_time_microsec, current_time, 0)) {
1925+
path_x->pacing.packet_time_microsec, current_time, 0)) {
19261926
BBRExitStartupLongRtt(bbr_state, path_x, current_time);
19271927
}
19281928
else if (rs->ecn_alpha > BBRExcessiveEcnCE) {

picoquic/bbr1.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1161,7 +1161,7 @@ static void picoquic_bbr1_notify(
11611161

11621162
if (bbr1_state->state == picoquic_bbr1_alg_startup_long_rtt) {
11631163
if (picoquic_hystart_test(&bbr1_state->rtt_filter, (cnx->is_time_stamp_enabled) ? ack_state->one_way_delay : ack_state->rtt_measurement,
1164-
cnx->path[0]->pacing_packet_time_microsec, current_time, cnx->is_time_stamp_enabled)) {
1164+
cnx->path[0]->pacing.packet_time_microsec, current_time, cnx->is_time_stamp_enabled)) {
11651165
BBR1ExitStartupLongRtt(bbr1_state, path_x, current_time);
11661166
}
11671167
}
@@ -1188,7 +1188,7 @@ static void picoquic_bbr1_notify(
11881188
path_x->cwin = min_win;
11891189
}
11901190
else if (path_x->smoothed_rtt > PICOQUIC_TARGET_RENO_RTT) {
1191-
path_x->pacing_bandwidth_pause = 1;
1191+
path_x->pacing.bandwidth_pause = 1;
11921192
}
11931193

11941194
picoquic_update_pacing_data(cnx, path_x, 1);

picoquic/cubic.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ static void picoquic_cubic_notify(
266266
/* Using RTT increases as signal to get out of initial slow start */
267267
if (cubic_state->ssthresh == UINT64_MAX &&
268268
picoquic_hystart_test(&cubic_state->rtt_filter, (cnx->is_time_stamp_enabled) ? ack_state->one_way_delay : ack_state->rtt_measurement,
269-
cnx->path[0]->pacing_packet_time_microsec, current_time, cnx->is_time_stamp_enabled)) {
269+
cnx->path[0]->pacing.packet_time_microsec, current_time, cnx->is_time_stamp_enabled)) {
270270
/* RTT increased too much, get out of slow start! */
271271
if (cubic_state->rtt_filter.rtt_filtered_min > PICOQUIC_TARGET_RENO_RTT){
272272
double correction;
@@ -518,7 +518,7 @@ static void picoquic_dcubic_notify(
518518
* for getting out of slow start, but also for ending a cycle
519519
* during congestion avoidance */
520520
if (picoquic_hystart_test(&cubic_state->rtt_filter, (cnx->is_time_stamp_enabled) ? ack_state->one_way_delay : ack_state->rtt_measurement,
521-
cnx->path[0]->pacing_packet_time_microsec, current_time, cnx->is_time_stamp_enabled)) {
521+
cnx->path[0]->pacing.packet_time_microsec, current_time, cnx->is_time_stamp_enabled)) {
522522
dcubic_exit_slow_start(cnx, path_x, notification, cubic_state, current_time);
523523
}
524524
break;
@@ -578,7 +578,7 @@ static void picoquic_dcubic_notify(
578578
}
579579

580580
if (picoquic_hystart_test(&cubic_state->rtt_filter, (cnx->is_time_stamp_enabled) ? ack_state->one_way_delay : ack_state->rtt_measurement,
581-
cnx->path[0]->pacing_packet_time_microsec, current_time, cnx->is_time_stamp_enabled)) {
581+
cnx->path[0]->pacing.packet_time_microsec, current_time, cnx->is_time_stamp_enabled)) {
582582
if (current_time - cubic_state->start_of_epoch > path_x->smoothed_rtt ||
583583
cubic_state->recovery_sequence <= picoquic_cc_get_ack_number(cnx, path_x)) {
584584
/* re-enter recovery if this is a new event */
@@ -643,7 +643,7 @@ static void picoquic_dcubic_notify(
643643
break;
644644
case picoquic_congestion_notification_rtt_measurement:
645645
if (picoquic_hystart_test(&cubic_state->rtt_filter, (cnx->is_time_stamp_enabled) ? ack_state->one_way_delay : ack_state->rtt_measurement,
646-
cnx->path[0]->pacing_packet_time_microsec, current_time, cnx->is_time_stamp_enabled)) {
646+
cnx->path[0]->pacing.packet_time_microsec, current_time, cnx->is_time_stamp_enabled)) {
647647
if (current_time - cubic_state->start_of_epoch > path_x->smoothed_rtt ||
648648
cubic_state->recovery_sequence <= picoquic_cc_get_ack_number(cnx, path_x)) {
649649
/* re-enter recovery */

picoquic/logwriter.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1176,7 +1176,7 @@ void binlog_cc_dump(picoquic_cnx_t* cnx, uint64_t current_time)
11761176
bytewrite_vint(ps_msg, path->bandwidth_estimate);
11771177
bytewrite_vint(ps_msg, path->receive_rate_estimate);
11781178
bytewrite_vint(ps_msg, path->send_mtu);
1179-
bytewrite_vint(ps_msg, path->pacing_packet_time_microsec);
1179+
bytewrite_vint(ps_msg, path->pacing.packet_time_microsec);
11801180
if (cnx->is_simple_multipath_enabled || cnx->is_multipath_enabled) {
11811181
bytewrite_vint(ps_msg, path->nb_losses_found);
11821182
bytewrite_vint(ps_msg, path->nb_spurious);

picoquic/newreno.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ static void picoquic_newreno_notify(
268268
}
269269

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

0 commit comments

Comments
 (0)