From 6157d0b5c1b3a6be7928748df2cda19838889f4f Mon Sep 17 00:00:00 2001 From: Vladimir Homutov Date: Tue, 20 Jul 2021 12:37:12 +0300 Subject: 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). --- src/event/quic/ngx_event_quic_output.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/event/quic/ngx_event_quic_output.c') diff --git a/src/event/quic/ngx_event_quic_output.c b/src/event/quic/ngx_event_quic_output.c index ce3805c8f..dc4cf59be 100644 --- a/src/event/quic/ngx_event_quic_output.c +++ b/src/event/quic/ngx_event_quic_output.c @@ -212,13 +212,17 @@ ngx_quic_allow_segmentation(ngx_connection_t *c, ngx_quic_socket_t *qsock) ngx_quic_send_ctx_t *ctx; ngx_quic_connection_t *qc; + qc = ngx_quic_get_connection(c); + + if (!qc->conf->gso_enabled) { + return 0; + } + if (qsock->path->state != NGX_QUIC_PATH_VALIDATED) { /* don't even try to be faster on non-validated paths */ return 0; } - qc = ngx_quic_get_connection(c); - ctx = ngx_quic_get_send_ctx(qc, ssl_encryption_initial); if (!ngx_queue_empty(&ctx->frames)) { return 0; -- cgit