From ff892190ddc72b7031eb8c9ef87e5c677f77f71d Mon Sep 17 00:00:00 2001 From: Dmitri Tikhonov Date: Wed, 18 Dec 2019 08:15:02 -0500 Subject: [PATCH] Release 2.7.3 - [DEBUG] Further dedup next advisory tick messages when reason is the same. - [BUGFIX] Update size of `a` array in TP struct. Fixes (benign) GitHub bug #94. - Use Cubic by default again instead of BBR, as it delivers more consistent performance. --- CHANGELOG | 9 +++++++++ include/lsquic.h | 4 ++-- src/liblsquic/lsquic_engine.c | 24 +++++++++++++++--------- src/liblsquic/lsquic_trans_params.h | 2 +- 4 files changed, 27 insertions(+), 12 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 7eda5d9c7..032ac1653 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,12 @@ +2019-12-18 + - 2.7.3 + - [DEBUG] Further dedup next advisory tick messages when reason is + the same. + - [BUGFIX] Update size of `a` array in TP struct. Fixes (benign) + GitHub bug #94. + - Use Cubic by default again instead of BBR, as it delivers more + consistent performance. + 2019-12-11 - 2.7.2 - [BUGFIX] Send controller: update scheduled bytes when DCID length diff --git a/include/lsquic.h b/include/lsquic.h index 948f1ff54..5f5d33e97 100644 --- a/include/lsquic.h +++ b/include/lsquic.h @@ -25,7 +25,7 @@ extern "C" { #define LSQUIC_MAJOR_VERSION 2 #define LSQUIC_MINOR_VERSION 7 -#define LSQUIC_PATCH_VERSION 2 +#define LSQUIC_PATCH_VERSION 3 /** * Engine flags: @@ -373,7 +373,7 @@ typedef struct ssl_ctx_st * (*lsquic_lookup_cert_f)( #define LSQUIC_DF_QL_BITS 1 /* 1: Cubic; 2: BBR */ -#define LSQUIC_DF_CC_ALGO 2 +#define LSQUIC_DF_CC_ALGO 1 struct lsquic_engine_settings { /** diff --git a/src/liblsquic/lsquic_engine.c b/src/liblsquic/lsquic_engine.c index f855b3ab9..6ddd9bb07 100644 --- a/src/liblsquic/lsquic_engine.c +++ b/src/liblsquic/lsquic_engine.c @@ -253,7 +253,9 @@ struct lsquic_engine unsigned long n_engine_calls; #endif #if LSQUIC_DEBUG_NEXT_ADV_TICK - uintptr_t last_logged_idle_conn; + uintptr_t last_logged_conn; + unsigned last_logged_ae_why; + int last_tick_diff; #endif }; @@ -2714,7 +2716,7 @@ lsquic_engine_earliest_adv_tick (lsquic_engine_t *engine, int *diff) { #if LSQUIC_DEBUG_NEXT_ADV_TICK conn = lsquic_mh_peek(&engine->conns_out); - engine->last_logged_idle_conn = 0; + engine->last_logged_conn = 0; LSQ_LOGC(L, "next advisory tick is now: went past deadline last time " "and have %u outgoing connection%.*s (%"CID_FMT" first)", lsquic_mh_count(&engine->conns_out), @@ -2728,7 +2730,7 @@ lsquic_engine_earliest_adv_tick (lsquic_engine_t *engine, int *diff) if (engine->pr_queue && prq_have_pending(engine->pr_queue)) { #if LSQUIC_DEBUG_NEXT_ADV_TICK - engine->last_logged_idle_conn = 0; + engine->last_logged_conn = 0; LSQ_LOG(L, "next advisory tick is now: have pending PRQ elements"); #endif *diff = 0; @@ -2739,7 +2741,7 @@ lsquic_engine_earliest_adv_tick (lsquic_engine_t *engine, int *diff) { #if LSQUIC_DEBUG_NEXT_ADV_TICK conn = lsquic_mh_peek(&engine->conns_tickable); - engine->last_logged_idle_conn = 0; + engine->last_logged_conn = 0; LSQ_LOGC(L, "next advisory tick is now: have %u tickable " "connection%.*s (%"CID_FMT" first)", lsquic_mh_count(&engine->conns_tickable), @@ -2778,15 +2780,19 @@ lsquic_engine_earliest_adv_tick (lsquic_engine_t *engine, int *diff) #if LSQUIC_DEBUG_NEXT_ADV_TICK if (next_attq) { - /* Deduplicate consecutive log messages about IDLE timer for the + /* Deduplicate consecutive log messages about the same reason for the * same connection. + * If diff is always zero or diff reset to a higher value, event is + * still logged. */ - if (!((unsigned) next_attq->ae_why == (unsigned) (N_AEWS + AL_IDLE) + if (!((unsigned) next_attq->ae_why == engine->last_logged_ae_why && (uintptr_t) next_attq->ae_conn - == engine->last_logged_idle_conn)) + == engine->last_logged_conn + && *diff < engine->last_tick_diff)) { - if ((unsigned) next_attq->ae_why == (unsigned) (N_AEWS + AL_IDLE)) - engine->last_logged_idle_conn = (uintptr_t) next_attq->ae_conn; + engine->last_logged_conn = (uintptr_t) next_attq->ae_conn; + engine->last_logged_ae_why = (unsigned) next_attq->ae_why; + engine->last_tick_diff = *diff; LSQ_LOGC(L, "next advisory tick is %d usec away: conn %"CID_FMT ": %s", *diff, CID_BITS(lsquic_conn_log_cid(next_attq->ae_conn)), lsquic_attq_why2str(next_attq->ae_why)); diff --git a/src/liblsquic/lsquic_trans_params.h b/src/liblsquic/lsquic_trans_params.h index 33673d16e..2873a38ee 100644 --- a/src/liblsquic/lsquic_trans_params.h +++ b/src/liblsquic/lsquic_trans_params.h @@ -79,7 +79,7 @@ struct transport_params uint64_t max_ack_delay; uint64_t active_connection_id_limit; } s; - uint64_t a[10]; + uint64_t a[11]; } tp_numerics_u; #define tp_init_max_stream_data_bidi_local tp_numerics_u.s.init_max_stream_data_bidi_local #define tp_init_max_stream_data_bidi_remote tp_numerics_u.s.init_max_stream_data_bidi_remote