From 7c644ded6d91599d501a1ce3d4e670e653579c25 Mon Sep 17 00:00:00 2001 From: Christian Huitema Date: Sun, 14 Apr 2024 11:40:31 -0700 Subject: [PATCH 1/2] Fix detection of sudden congestion --- CMakeLists.txt | 2 +- picoquic/bbr.c | 10 +++++++--- picoquic/picoquic.h | 2 +- picoquictest/mediatest.c | 6 +++--- 4 files changed, 12 insertions(+), 8 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8acd1a3f9..c34aabf00 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,7 +8,7 @@ else() endif() project(picoquic - VERSION 1.1.19.8 + VERSION 1.1.19.9 DESCRIPTION "picoquic library" LANGUAGES C CXX) diff --git a/picoquic/bbr.c b/picoquic/bbr.c index d76ab22f5..d08a370a6 100644 --- a/picoquic/bbr.c +++ b/picoquic/bbr.c @@ -1517,11 +1517,10 @@ static uint64_t BBRTargetInflight(picoquic_bbr_state_t* bbr_state, picoquic_path #ifdef RTTJitterBufferProbe static int BBRCheckPathSaturated(picoquic_bbr_state_t* bbr_state, picoquic_path_t* path_x, bbr_per_ack_state_t * rs, uint64_t current_time) { - if (!rs->is_app_limited && - bbr_state->state != picoquic_bbr_alg_drain && + if (IsInAProbeBWState(bbr_state) && + rs->rtt_sample > 2*bbr_state->min_rtt && bbr_state->rounds_since_bw_probe >= 1 && bbr_state->pacing_rate > 3 * rs->delivery_rate && - rs->rtt_sample > 2*bbr_state->min_rtt && bbr_state->wifi_shadow_rtt == 0) { bbr_state->prior_cwnd = rs->delivered; bbr_state->probe_rtt_done_stamp = 0; @@ -2142,6 +2141,11 @@ static void BBRSetRsFromAckState(picoquic_path_t* path_x, picoquic_per_ack_state rs->delivered = ack_state->nb_bytes_delivered_since_packet_sent; /* variable in path */ rs->rtt_sample = path_x->rtt_sample; +#if 1 + if (path_x->cnx->client_mode && rs->rtt_sample > 100000) { + DBG_PRINTF("%s", "Bug"); + } +#endif /* variables from call */ rs->newly_acked = ack_state->nb_bytes_acknowledged; /* volume of data acked by current ack */ rs->newly_lost = ack_state->nb_bytes_newly_lost; /* volume of data marked lost on ack received */ diff --git a/picoquic/picoquic.h b/picoquic/picoquic.h index 8e8df72cc..949edf9e5 100644 --- a/picoquic/picoquic.h +++ b/picoquic/picoquic.h @@ -40,7 +40,7 @@ extern "C" { #endif -#define PICOQUIC_VERSION "1.1.19.8" +#define PICOQUIC_VERSION "1.1.19.9" #define PICOQUIC_ERROR_CLASS 0x400 #define PICOQUIC_ERROR_DUPLICATE (PICOQUIC_ERROR_CLASS + 1) #define PICOQUIC_ERROR_AEAD_CHECK (PICOQUIC_ERROR_CLASS + 3) diff --git a/picoquictest/mediatest.c b/picoquictest/mediatest.c index 1d9c3a908..65bfe4681 100644 --- a/picoquictest/mediatest.c +++ b/picoquictest/mediatest.c @@ -1326,7 +1326,7 @@ int mediatest_video2_down_test() spec.do_video2 = 1; spec.do_audio = 1; spec.data_size = 0; - spec.latency_average = 110000; + spec.latency_average = 100000; spec.latency_max = 600000; spec.do_not_check_video2 = 1; ret = mediatest_one(mediatest_video2_down, &spec); @@ -1344,8 +1344,8 @@ int mediatest_video2_back_test() spec.do_video2 = 1; spec.do_audio = 1; spec.data_size = 0; - spec.latency_average = 110000; - spec.latency_max = 600000; + spec.latency_average = 50000; + spec.latency_max = 450000; spec.do_not_check_video2 = 1; ret = mediatest_one(mediatest_video2_back, &spec); From a300da5c410f849066432097a4670a31601c5b11 Mon Sep 17 00:00:00 2001 From: Christian Huitema Date: Sun, 14 Apr 2024 20:07:56 -0700 Subject: [PATCH 2/2] Relax mediatest-wifi for now --- picoquic/bbr.c | 5 ----- picoquictest/mediatest.c | 4 ++-- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/picoquic/bbr.c b/picoquic/bbr.c index d08a370a6..56ac30ac5 100644 --- a/picoquic/bbr.c +++ b/picoquic/bbr.c @@ -2141,11 +2141,6 @@ static void BBRSetRsFromAckState(picoquic_path_t* path_x, picoquic_per_ack_state rs->delivered = ack_state->nb_bytes_delivered_since_packet_sent; /* variable in path */ rs->rtt_sample = path_x->rtt_sample; -#if 1 - if (path_x->cnx->client_mode && rs->rtt_sample > 100000) { - DBG_PRINTF("%s", "Bug"); - } -#endif /* variables from call */ rs->newly_acked = ack_state->nb_bytes_acknowledged; /* volume of data acked by current ack */ rs->newly_lost = ack_state->nb_bytes_newly_lost; /* volume of data marked lost on ack received */ diff --git a/picoquictest/mediatest.c b/picoquictest/mediatest.c index 65bfe4681..80fd6d593 100644 --- a/picoquictest/mediatest.c +++ b/picoquictest/mediatest.c @@ -1376,8 +1376,8 @@ int mediatest_wifi_test() spec.do_video2 = 1; spec.do_audio = 1; spec.data_size = 0; - spec.latency_average = 45000; - spec.latency_max = 240000; + spec.latency_average = 50000; + spec.latency_max = 300000; spec.do_not_check_video2 = 1; ret = mediatest_one(mediatest_wifi, &spec);