summaryrefslogtreecommitdiffstats
path: root/ssl
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2023-06-13 13:08:00 +0100
committerPauli <pauli@openssl.org>2023-06-28 09:53:22 +1000
commitb49d9de0e66a5fe7570652186e3bb8c4a4d9f556 (patch)
tree102358075f30e8c3c25e5bd70ba38fb1a061deed /ssl
parent23fe02e59785f0cfaa6d50aa3fa0d82bffe22a8d (diff)
The CC wake up deadline is now if we have TX allowance
If we have TX allowance then there is no need to wait if we have something to send - the wake up deadline is immediate. Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Hugo Landau <hlandau@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/21204)
Diffstat (limited to 'ssl')
-rw-r--r--ssl/quic/cc_newreno.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/ssl/quic/cc_newreno.c b/ssl/quic/cc_newreno.c
index 850ff9899a..de4c10c6a2 100644
--- a/ssl/quic/cc_newreno.c
+++ b/ssl/quic/cc_newreno.c
@@ -296,11 +296,16 @@ static uint64_t newreno_get_tx_allowance(OSSL_CC_DATA *cc)
static OSSL_TIME newreno_get_wakeup_deadline(OSSL_CC_DATA *cc)
{
- /*
- * The NewReno congestion controller does not vary its state in time, only
- * in response to stimulus.
- */
- return ossl_time_infinite();
+ if (newreno_get_tx_allowance(cc) > 0) {
+ /* We have TX allowance now so wakeup immediately */
+ return ossl_time_zero();
+ } else {
+ /*
+ * The NewReno congestion controller does not vary its state in time,
+ * only in response to stimulus.
+ */
+ return ossl_time_infinite();
+ }
}
static int newreno_on_data_sent(OSSL_CC_DATA *cc, uint64_t num_bytes)