@@ -2276,7 +2276,7 @@ static quicly_conn_t *create_connection(quicly_context_t *ctx, uint32_t protocol
2276
2276
quicly_linklist_init (& conn -> egress .pending_streams .control );
2277
2277
quicly_ratemeter_init (& conn -> egress .ratemeter );
2278
2278
if (server_name == NULL && conn -> super .ctx -> use_pacing && conn -> egress .cc .type -> cc_jumpstart != NULL &&
2279
- (conn -> super .ctx -> default_jumpstart_cwnd_bytes != 0 || conn -> super .ctx -> max_jumpstart_cwnd_bytes != 0 ))
2279
+ (conn -> super .ctx -> default_jumpstart_cwnd_packets != 0 || conn -> super .ctx -> max_jumpstart_cwnd_packets != 0 ))
2280
2280
conn -> egress .try_jumpstart = 1 ;
2281
2281
conn -> crypto .tls = tls ;
2282
2282
if (handshake_properties != NULL ) {
@@ -4201,8 +4201,10 @@ static uint32_t derive_jumpstart_cwnd(quicly_context_t *ctx, uint32_t new_rtt, u
4201
4201
cwnd = cwnd * new_rtt / prev_rtt ;
4202
4202
4203
4203
/* cap to the configured value */
4204
- if (cwnd > ctx -> max_jumpstart_cwnd_bytes )
4205
- cwnd = ctx -> max_jumpstart_cwnd_bytes ;
4204
+ size_t jumpstart_cwnd =
4205
+ quicly_cc_calc_initial_cwnd (ctx -> max_jumpstart_cwnd_packets , ctx -> transport_params .max_udp_payload_size );
4206
+ if (cwnd > jumpstart_cwnd )
4207
+ cwnd = jumpstart_cwnd ;
4206
4208
4207
4209
return (uint32_t )cwnd ;
4208
4210
}
@@ -5017,14 +5019,15 @@ static int do_send(quicly_conn_t *conn, quicly_send_context_t *s)
5017
5019
conn -> egress .try_jumpstart = 0 ;
5018
5020
uint32_t jumpstart_cwnd = 0 ;
5019
5021
conn -> super .stats .jumpstart .new_rtt = conn -> egress .loss .rtt .minimum ;
5020
- if (conn -> super .ctx -> max_jumpstart_cwnd_bytes != 0 && conn -> super .stats .jumpstart .prev_rate != 0 &&
5022
+ if (conn -> super .ctx -> max_jumpstart_cwnd_packets != 0 && conn -> super .stats .jumpstart .prev_rate != 0 &&
5021
5023
conn -> super .stats .jumpstart .prev_rtt != 0 ) {
5022
5024
/* Careful Resume */
5023
5025
jumpstart_cwnd = derive_jumpstart_cwnd (conn -> super .ctx , conn -> super .stats .jumpstart .new_rtt ,
5024
5026
conn -> super .stats .jumpstart .prev_rate , conn -> super .stats .jumpstart .prev_rtt );
5025
- } else if (conn -> super .ctx -> default_jumpstart_cwnd_bytes != 0 ) {
5027
+ } else if (conn -> super .ctx -> default_jumpstart_cwnd_packets != 0 ) {
5026
5028
/* jumpstart without previous information */
5027
- jumpstart_cwnd = conn -> super .ctx -> default_jumpstart_cwnd_bytes ;
5029
+ jumpstart_cwnd = quicly_cc_calc_initial_cwnd (conn -> super .ctx -> default_jumpstart_cwnd_packets ,
5030
+ conn -> super .ctx -> transport_params .max_udp_payload_size );
5028
5031
}
5029
5032
/* Jumpstart if the flow rate would be higher. Comparison target is CWND + inflight bytes in 1/2 RTT, as that is the
5030
5033
* amount that can be sent at most, with pacer controlling the send rate. */
0 commit comments