Skip to content

Commit

Permalink
QUIC: fixed congesion control in GSO mode.
Browse files Browse the repository at this point in the history
In non-GSO mode, a datagram is sent if congestion window is not exceeded by the
time of send.  The window could be exceeded by a small amount after the send.
In GSO mode, congestion window was checked in a similar way, but for all
concatenated datagrams as a whole.  This could result in exceeding congestion
window by a lot.  Now congestion window is checked for every datagram in GSO
mode as well.
  • Loading branch information
arut committed Jul 27, 2023
1 parent 6f5f173 commit 968293d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/event/quic/ngx_event_quic_output.c
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ ngx_quic_create_segments(ngx_connection_t *c)

len = ngx_min(segsize, (size_t) (end - p));

if (len && cg->in_flight < cg->window) {
if (len && cg->in_flight + (p - dst) < cg->window) {

n = ngx_quic_output_packet(c, ctx, p, len, len);
if (n == NGX_ERROR) {
Expand Down

0 comments on commit 968293d

Please sign in to comment.