comparison src/event/quic/ngx_event_quic_output.c @ 8540:8ab0d609af09 quic

QUIC: the "quic_gso" directive. The directive enables usage of UDP segmentation offloading by quic. By default, gso is disabled since it is not always operational when detected (depends on interface configuration).
author Vladimir Homutov <vl@nginx.com>
date Tue, 20 Jul 2021 12:37:12 +0300
parents bb5152ed045b
children ad046179eb91
comparison
equal deleted inserted replaced
8539:913ff20e4c62 8540:8ab0d609af09
210 ngx_queue_t *q; 210 ngx_queue_t *q;
211 ngx_quic_frame_t *f; 211 ngx_quic_frame_t *f;
212 ngx_quic_send_ctx_t *ctx; 212 ngx_quic_send_ctx_t *ctx;
213 ngx_quic_connection_t *qc; 213 ngx_quic_connection_t *qc;
214 214
215 qc = ngx_quic_get_connection(c);
216
217 if (!qc->conf->gso_enabled) {
218 return 0;
219 }
220
215 if (qsock->path->state != NGX_QUIC_PATH_VALIDATED) { 221 if (qsock->path->state != NGX_QUIC_PATH_VALIDATED) {
216 /* don't even try to be faster on non-validated paths */ 222 /* don't even try to be faster on non-validated paths */
217 return 0; 223 return 0;
218 } 224 }
219
220 qc = ngx_quic_get_connection(c);
221 225
222 ctx = ngx_quic_get_send_ctx(qc, ssl_encryption_initial); 226 ctx = ngx_quic_get_send_ctx(qc, ssl_encryption_initial);
223 if (!ngx_queue_empty(&ctx->frames)) { 227 if (!ngx_queue_empty(&ctx->frames)) {
224 return 0; 228 return 0;
225 } 229 }