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)
if (!TEST_uint64_t_ge(allowance = ccm->get_tx_allowance(cc), 1472))
goto err;
- /*
- * No wakeups should be scheduled currently as we don't currently implement
- * pacing.
- */
- if (!TEST_true(ossl_time_is_infinite(ccm->get_wakeup_deadline(cc))))
+ /* There is TX allowance so wakeup should be immediate */
+ if (!TEST_true(ossl_time_is_zero(ccm->get_wakeup_deadline(cc))))
goto err;
/* No bytes should currently be in flight. */
No extensions
Received Datagram
- Length: 256
+ Length: 234
Received Packet
Packet Type: Handshake
Version: 0x00000001
Finished, Length=32
verify_data (len=32): ????????????????????????????????????????????????????????????????
-
-Received Frame: Ping
Sent Frame: Ack (without ECN)
Largest acked: 1
Ack delay (raw) 0
Source Conn Id: <zero length id>
Payload length: 60
Packet Number: 0x00000000
-Sent Frame: Ack (without ECN)
- Largest acked: 0
- Ack delay (raw) 0
- Ack range count: 0
- First ack range: 0
-
Sent Datagram
- Length: 115
+ Length: 81