comparison src/event/quic/ngx_event_quic_ack.c @ 9196:6c8595b77e66

QUIC: path aware in-flight bytes accounting. On-packet acknowledgement is made path aware, as per RFC 9000, Section 9.4: Packets sent on the old path MUST NOT contribute to congestion control or RTT estimation for the new path. To make this possible in a single congestion control context, the first packet to be sent after the new path has been validated, which includes resetting the congestion controller and RTT estimator, is now remembered in the connection. Packets sent previously, such as on the old path, are not taken into account. Note that although the packet number is saved per-connection, the added checks affect application level packets only. For non-application level packets, which are only processed prior to the handshake is complete, the remembered packet number remains set to zero.
author Sergey Kandaurov <pluknet@nginx.com>
date Tue, 12 Dec 2023 20:21:12 +0400
parents ce1ff81e9b92
children
comparison
equal deleted inserted replaced
9195:ff452f283aa9 9196:6c8595b77e66
323 } 323 }
324 324
325 qc = ngx_quic_get_connection(c); 325 qc = ngx_quic_get_connection(c);
326 cg = &qc->congestion; 326 cg = &qc->congestion;
327 327
328 if (f->pnum < qc->rst_pnum) {
329 return;
330 }
331
328 blocked = (cg->in_flight >= cg->window) ? 1 : 0; 332 blocked = (cg->in_flight >= cg->window) ? 1 : 0;
329 333
330 cg->in_flight -= f->plen; 334 cg->in_flight -= f->plen;
331 335
332 timer = f->send_time - cg->recovery_start; 336 timer = f->send_time - cg->recovery_start;
665 } 669 }
666 670
667 qc = ngx_quic_get_connection(c); 671 qc = ngx_quic_get_connection(c);
668 cg = &qc->congestion; 672 cg = &qc->congestion;
669 673
674 if (f->pnum < qc->rst_pnum) {
675 return;
676 }
677
670 blocked = (cg->in_flight >= cg->window) ? 1 : 0; 678 blocked = (cg->in_flight >= cg->window) ? 1 : 0;
671 679
672 cg->in_flight -= f->plen; 680 cg->in_flight -= f->plen;
673 f->plen = 0; 681 f->plen = 0;
674 682