Mercurial > hg > nginx
comparison src/event/ngx_event_quic.c @ 8616:64405f970f6f quic
QUIC: avoided retransmission of stale ack frames.
Acknowledgments are regenerated using the most recent data available.
author | Vladimir Homutov <vl@nginx.com> |
---|---|
date | Wed, 28 Oct 2020 14:22:51 +0300 |
parents | 27e305834078 |
children | 69dc750cf66f |
comparison
equal
deleted
inserted
replaced
8615:27e305834078 | 8616:64405f970f6f |
---|---|
4841 start = ngx_queue_data(q, ngx_quic_frame_t, queue); | 4841 start = ngx_queue_data(q, ngx_quic_frame_t, queue); |
4842 | 4842 |
4843 ngx_log_debug1(NGX_LOG_DEBUG_EVENT, c->log, 0, | 4843 ngx_log_debug1(NGX_LOG_DEBUG_EVENT, c->log, 0, |
4844 "quic resend packet pnum:%uL", start->pnum); | 4844 "quic resend packet pnum:%uL", start->pnum); |
4845 | 4845 |
4846 ngx_quic_congestion_lost(c, start); | |
4847 | |
4846 do { | 4848 do { |
4847 f = ngx_queue_data(q, ngx_quic_frame_t, queue); | 4849 f = ngx_queue_data(q, ngx_quic_frame_t, queue); |
4848 | 4850 |
4849 if (f->pnum != start->pnum) { | 4851 if (f->pnum != start->pnum) { |
4850 break; | 4852 break; |
4851 } | 4853 } |
4852 | 4854 |
4853 q = ngx_queue_next(q); | 4855 q = ngx_queue_next(q); |
4854 | 4856 |
4855 ngx_queue_remove(&f->queue); | 4857 ngx_queue_remove(&f->queue); |
4856 ngx_queue_insert_tail(&ctx->frames, &f->queue); | 4858 |
4859 switch (f->type) { | |
4860 case NGX_QUIC_FT_ACK: | |
4861 case NGX_QUIC_FT_ACK_ECN: | |
4862 /* force generation of most recent acknowledgment */ | |
4863 ctx->send_ack = NGX_QUIC_MAX_ACK_GAP; | |
4864 ngx_quic_free_frame(c, f); | |
4865 break; | |
4866 | |
4867 default: | |
4868 ngx_queue_insert_tail(&ctx->frames, &f->queue); | |
4869 } | |
4857 | 4870 |
4858 } while (q != ngx_queue_sentinel(&ctx->sent)); | 4871 } while (q != ngx_queue_sentinel(&ctx->sent)); |
4859 | |
4860 ngx_quic_congestion_lost(c, start); | |
4861 | 4872 |
4862 if (qc->closing) { | 4873 if (qc->closing) { |
4863 return; | 4874 return; |
4864 } | 4875 } |
4865 | 4876 |